mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-12 15:20:44 +08:00
32 lines
953 KiB
JavaScript
32 lines
953 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("VJsoneditor",[],t):"object"==typeof exports?exports.VJsoneditor=t():e.VJsoneditor=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="./dist/",t(t.s=5)}([function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKIC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9ImNjY2NjY2NjIiAvPgogIDxyZWN0CiAgICAgc3R5bGU9ImZpbGw6IzRjNGM0YztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MCIKICAgICBpZD0ic3ZnXzEtMyIKICAgICBoZWlnaHQ9IjE2IgogICAgIHdpZHRoPSIxNiIKICAgICB5PSIyOCIKICAgICB4PSI0IiAvPgogIDxwYXRoCiAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjY2NjY2NjY2MiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICBpZD0icGF0aDQ0MDItNS03IgogICAgIGQ9Im0gMTUsNDEgMCwtNyAtNCwwIDAsMyAtNSwtNCA1LC00IDAsMyA2LDAgMCw5IgogICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjAuNjg0NjUzNTJweDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2Utb3BhY2l0eToxIiAvPgo8L3N2Zz4K"},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t){function i(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var r=n(o);return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([r]).join("\n")}return[i].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=i(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}},function(e,t,i){function n(e){for(var t=0;t<e.length;t++){var i=e[t],n=d[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(r(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{for(var s=[],o=0;o<i.parts.length;o++)s.push(r(i.parts[o]));d[i.id]={id:i.id,refs:1,parts:s}}}}function o(){var e=document.createElement("style");return e.type="text/css",h.appendChild(e),e}function r(e){var t,i,n=document.querySelector("style["+C+'~="'+e.id+'"]');if(n){if(p)return m;n.parentNode.removeChild(n)}if(I){var r=g++;n=u||(u=o()),t=s.bind(null,n,r,!1),i=s.bind(null,n,r,!0)}else n=o(),t=a.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}function s(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=A(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function a(e,t){var i=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(C,t.id),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=i(10),d={},h=l&&(document.head||document.getElementsByTagName("head")[0]),u=null,g=0,p=!1,m=function(){},f=null,C="data-vue-ssr-id",I="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,i,o){p=i,f=o||{};var r=c(e,t);return n(r),function(t){for(var i=[],o=0;o<r.length;o++){var s=r[o],a=d[s.id];a.refs--,i.push(a)}t?(r=c(e,t),n(r)):r=[];for(var o=0;o<i.length;o++){var a=i[o];if(0===a.refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete d[a.id]}}}};var A=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}()},function(e,t,i){"use strict";var n=i(12),o=i.n(n),r=i(13);i.n(r);t.a={name:"v-jsoneditor",data:function(){return{editor:null,style:{},max:!1,internalChange:!1}},props:{options:{type:Object,default:function(){return{}}},value:[Object,Array,Number,String,Boolean],height:{type:String},plus:{type:Boolean,default:!0}},methods:{onChange:function(){var e,t=this,i=null,n={};try{n=this.editor.get()}catch(e){i=e}i?this.$emit("error",i):this.editor&&(this.internalChange=!0,this.$emit("input",n),this.$nextTick(function(){t.internalChange=!1})),this.options.onChange&&(e=this.options).onChange.apply(e,arguments)},initView:function(){if(!this.editor){var e=this.$refs.jsoneditor,t=this.options.onChange;delete this.options.onChange;var i=Object.assign(this.options,{onChange:this.onChange});this.editor=new o.a(e,i),this.options.onChange=t}this.editor.set(void 0!==this.value?this.value:{})},destroyView:function(){this.editor&&(this.editor.destroy(),this.editor=null)}},watch:{value:{handler:function(e){this.editor&&void 0!==e&&!this.internalChange&&this.editor.set(e)},deep:!0},max:function(e){var t=this;this.$nextTick(function(){t.initView()})},options:{handler:function(e){this.options&&this.options.mode&&this.editor&&this.editor.setMode(this.options.mode)},deep:!0}},mounted:function(){this.initView()},beforeDestroy:function(){this.destroyView()},computed:{getHeight:function(){return this.height&&!this.max?{height:this.height}:{}}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);t.default=n.a,n.a.install=function(e){e.component(n.a.name,n.a)},"undefined"!=typeof window&&window.Vue&&window.Vue.component(n.a.name,n.a)},function(e,t,i){"use strict";function n(e){i(7)}var o=i(4),r=i(15),s=i(11),a=n,l=s(o.a,r.a,!1,a,"data-v-79481ed6",null);t.a=l.exports},function(e,t,i){var n=i(8);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(3)("a599bfce",n,!0,{})},function(e,t,i){var n=i(1);t=e.exports=i(2)(!1),t.push([e.i,".jsoneditor-container.max-box[data-v-79481ed6]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000}.jsoneditor-container.min-box[data-v-79481ed6]{position:relative;min-width:300px;width:100%}.jsoneditor-box[data-v-79481ed6]{height:100%}.jsoneditor-container:hover .max-btn[data-v-79481ed6]{display:block}.max-btn[data-v-79481ed6]{display:none;position:absolute;top:7px;right:110px;color:#fff;width:24px;height:24px;background:transparent url("+n(i(9))+") no-repeat;background-position:3px;border:1px solid transparent;border-radius:3px}.max-btn[data-v-79481ed6]:hover{border:1px solid #d7e6fe}",""])},function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTIzNzY1NTcxODU1IiBjbGFzcz0iaWNvbiIgc3R5bGU9IiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE5MjciIHhtbG5zOnhsaW5rPSJ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1NjAyIDk1OC4wMjk0OTYgOTE2LjY3MTU1M0w5NTguMDI5NDk2IDkxNi42NzE1NTN6IiBwLWlkPSIxOTMxIiBmaWxsPSIjZTZlNmU2Ij48L3BhdGg+PC9zdmc+"},function(e,t){e.exports=function(e,t){for(var i=[],n={},o=0;o<t.length;o++){var r=t[o],s=r[0],a=r[1],l=r[2],c=r[3],d={id:e+":"+o,css:a,media:l,sourceMap:c};n[s]?n[s].parts.push(d):i.push(n[s]={id:s,parts:[d]})}return i}},function(e,t){e.exports=function(e,t,i,n,o,r){var s,a=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(s=e,a=e.default);var c="function"==typeof a?a.options:a;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId=o);var d;if(r?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=d):n&&(d=n),d){var h=c.functional,u=h?c.render:c.beforeCreate;h?(c._injectStyles=d,c.render=function(e,t){return d.call(t),u(e,t)}):c.beforeCreate=u?[].concat(u,d):[d]}return{esModule:s,exports:a,options:c}}},function(e,t,i){/*!
|
||
* jsoneditor.js
|
||
*
|
||
* @brief
|
||
* JSONEditor is a web-based tool to view, edit, format, and validate JSON.
|
||
* It has various modes such as a tree editor, a code editor, and a plain text
|
||
* editor.
|
||
*
|
||
* Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
|
||
*
|
||
* @license
|
||
* 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.
|
||
*
|
||
* Copyright (c) 2011-2021 Jos de Jong, http://jsoneditoronline.org
|
||
*
|
||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||
* @version 9.5.3
|
||
* @date 2021-07-28
|
||
*/
|
||
!function(t,i){e.exports=i()}(self,function(){function e(n){var o=i[n];return void 0!==o?o.exports:(o=i[n]={id:n,loaded:!1,exports:{}},t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports)}return t={6835:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},2689:function(e){"use strict";e.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},1030:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},38:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},897:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.d(t,{x:function(){return a}});var o=i(2602),r=i(9791),s=i(7907),a=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=t,this.eventListeners={},this.selection=void 0,this.onClose=i?i.close:void 0,this.limitHeight=!!i&&i.limitHeight;var r=document.createElement("div");r.className="jsoneditor-contextmenu-root",o.root=r,i=document.createElement("div"),i.className="jsoneditor-contextmenu",o.menu=i,r.appendChild(i),r=document.createElement("ul"),r.className="jsoneditor-menu",i.appendChild(r),o.list=r,o.items=[],i=document.createElement("button"),i.type="button",o.focusButton=i,o=document.createElement("li"),o.style.overflow="hidden",o.style.height="0",o.appendChild(i),r.appendChild(o),function e(t,i,o){o.forEach(function(o){var r,a,l,c,d,h,u;"separator"===o.type?((l=document.createElement("div")).className="jsoneditor-separator",(d=document.createElement("li")).appendChild(l),t.appendChild(d)):(r={},a=document.createElement("li"),t.appendChild(a),(l=document.createElement("button")).type="button",l.className=o.className,r.button=l,o.title&&(l.title=o.title),o.click&&(l.onclick=function(e){e.preventDefault(),n.hide(),o.click()}),a.appendChild(l),o.submenu?((d=document.createElement("div")).className="jsoneditor-icon",l.appendChild(d),(d=document.createElement("div")).className="jsoneditor-text"+(o.click?"":" jsoneditor-right-margin"),d.appendChild(document.createTextNode(o.text)),l.appendChild(d),(c=o.click?(l.className+=" jsoneditor-default",(u=document.createElement("button")).type="button",(r.buttonExpand=u).className="jsoneditor-expand",(d=document.createElement("div")).className="jsoneditor-expand",u.appendChild(d),a.appendChild(u),o.submenuTitle&&(u.title=o.submenuTitle),u):((h=document.createElement("div")).className="jsoneditor-expand",l.appendChild(h),l)).onclick=function(e){e.preventDefault(),n._onExpandItem(r),c.focus()},r.subItems=u=[],h=document.createElement("ul"),(r.ul=h).className="jsoneditor-menu",h.style.height="0",a.appendChild(h),e(h,u,o.submenu)):((u=document.createElement("div")).className="jsoneditor-icon",l.appendChild(u),(u=document.createElement("div")).className="jsoneditor-text",u.appendChild(document.createTextNode((0,s.Iu)(o.text))),l.appendChild(u)),i.push(r))})}(r,this.dom.items,t),this.maxHeight=0,t.forEach(function(e){e=24*(t.length+(e.submenu?e.submenu.length:0)),n.maxHeight=Math.max(n.maxHeight,e)})}var t,i;return t=e,(i=[{key:"_getVisibleButtons",value:function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i===t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e}},{key:"show",value:function(t,i,n){this.hide();var s=!0,a=t.parentNode,l=t.getBoundingClientRect(),c=a.getBoundingClientRect(),a=i.getBoundingClientRect(),d=this;this.dom.absoluteAnchor=(0,o.w)(t,i,function(){d.hide()}),l.bottom+this.maxHeight<a.bottom||l.top-this.maxHeight>a.top&&(s=!1),n=n?0:l.top-c.top,s?(c=t.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=n+c+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(a=s?a.bottom-l.bottom-10:l.top-a.top-10,this.dom.list.style.maxHeight=a+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,r.getSelection)(),this.anchor=t,setTimeout(function(){d.dom.focusButton.focus()},0),e.visibleMenu&&e.visibleMenu.hide(),e.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose&&this.onClose()),e.visibleMenu===this&&(e.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(e){var t,i=this,n=e===this.expandedItem,o=this.expandedItem;o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout(function(){i.expandedItem!==o&&(o.ul.style.display="",r.removeClassName)(o.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),n||((t=e.ul).style.display="block",t.clientHeight,setTimeout(function(){if(i.expandedItem===e){for(var n=0,o=0;o<t.childNodes.length;o++)n+=t.childNodes[o].clientHeight;t.style.height=n+"px",t.style.padding="5px 10px"}},0),(0,r.addClassName)(t.parentNode,"jsoneditor-selected"),this.expandedItem=e)}},{key:"_onKeyDown",value:function(e){var t,i,n,o,s=e.target,a=e.which,l=!1;27===a?(this.selection&&(0,r.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9===a?e.shiftKey?0===(i=(t=this._getVisibleButtons()).indexOf(s))&&(t[t.length-1].focus(),l=!0):(i=(t=this._getVisibleButtons()).indexOf(s))===t.length-1&&(t[0].focus(),l=!0):37===a?("jsoneditor-expand"===s.className&&(i=(t=this._getVisibleButtons()).indexOf(s),(n=t[i-1])&&n.focus()),l=!0):38===a?(i=(t=this._getVisibleButtons()).indexOf(s),(n=(n=(n=t[i-1])&&"jsoneditor-expand"===n.className?t[i-2]:n)||t[t.length-1])&&n.focus(),l=!0):39===a?(i=(t=this._getVisibleButtons()).indexOf(s),(o=t[i+1])&&"jsoneditor-expand"===o.className&&o.focus(),l=!0):40===a&&(i=(t=this._getVisibleButtons()).indexOf(s),(o=(o=(o=t[i+1])&&"jsoneditor-expand"===o.className?t[i+2]:o)||t[0])&&(o.focus(),l=!0),l=!0),l&&(e.stopPropagation(),e.preventDefault())}}])&&n(t.prototype,i),e}();a.visibleMenu=void 0},6436:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.d(t,{Q:function(){return o}});var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errorTableVisible=t.errorTableVisible,this.onToggleVisibility=t.onToggleVisibility,this.onFocusLine=t.onFocusLine||function(){},this.onChangeHeight=t.onChangeHeight,this.dom={};var i=document.createElement("div");i.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=i,t=document.createElement("div"),t.style.display="none",t.className="jsoneditor-additional-errors fadein",t.textContent="Scroll for more ▿",this.dom.additionalErrorsIndication=t,i.appendChild(t),t=document.createElement("span"),t.className="jsoneditor-validation-error-icon",t.style.display="none",this.dom.validationErrorIcon=t,t=document.createElement("span"),t.className="jsoneditor-validation-error-count",t.style.display="none",this.dom.validationErrorCount=t,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var t,i;return t=e,(i=[{key:"getErrorTable",value:function(){return this.dom.validationErrorsContainer}},{key:"getErrorCounter",value:function(){return this.dom.validationErrorCount}},{key:"getWarningIcon",value:function(){return this.dom.validationErrorIcon}},{key:"getErrorIcon",value:function(){return this.dom.parseErrorIndication}},{key:"toggleTableVisibility",value:function(){this.errorTableVisible=!this.errorTableVisible,this.onToggleVisibility(this.errorTableVisible)}},{key:"setErrors",value:function(e,t){var i,n,o=this;this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<e.length?((r=document.createElement("div")).className="jsoneditor-validation-errors",(i=document.createElement("table")).className="jsoneditor-text-errors",r.appendChild(i),n=document.createElement("tbody"),i.appendChild(n),e.forEach(function(e){var i;isNaN(e.line)?!e.dataPath||(a=t.find(function(t){return t.path===e.dataPath}))&&(i=a.line+1):i=e.line;var r=document.createElement("tr");r.className=isNaN(i)?"":"jump-to-line","error"===e.type?r.className+=" parse-error":r.className+=" validation-error";var s=document.createElement("td"),a=document.createElement("button");a.className="jsoneditor-schema-error",s.appendChild(a),r.appendChild(s);var l,c,s=document.createElement("td");s.style="white-space: nowrap;",s.textContent=isNaN(i)?"":"Ln "+i,r.appendChild(s),"string"==typeof e?((l=document.createElement("td")).colSpan=2,(c=document.createElement("pre")).appendChild(document.createTextNode(e)),l.appendChild(c),r.appendChild(l)):((c=document.createElement("td")).appendChild(document.createTextNode(e.dataPath||"")),r.appendChild(c),l=document.createElement("td"),(c=document.createElement("pre")).appendChild(document.createTextNode(e.message)),l.appendChild(c),r.appendChild(l)),r.onclick=function(){o.onFocusLine(i)},n.appendChild(r)}),this.dom.validationErrors=r,this.dom.validationErrorsContainer.appendChild(r),this.dom.additionalErrorsIndication.title=e.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){o.dom.additionalErrorsIndication.style.display=0<o.dom.validationErrorsContainer.clientHeight&&0===o.dom.validationErrorsContainer.scrollTop?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,r=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight(r)):this.onChangeHeight(0);var r=e.filter(function(e){return"error"!==e.type}).length;0<r?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=r,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=r+" schema validation error(s) found",this.dom.validationErrorIcon.onclick=this.toggleTableVisibility.bind(this)):(this.dom.validationErrorCount.style.display="none",this.dom.validationErrorIcon.style.display="none"),e.some(function(e){return"error"===e.type})?(e=e[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(e)?"parse error - check that the json is valid":"parse error on line "+e,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&n(t.prototype,i),e}()},2474:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.d(t,{R:function(){return o}});var o=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=t.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus="function"==typeof t.onFocus?t.onFocus:null,this.onBlur="function"==typeof t.onBlur?t.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(e){9!==e.which&&9!==e.keyCode||this._onEvent(e)}.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp))}var t,i;return t=e,(i=[{key:"destroy",value:function(){document.removeEventListener("click",this._onClick),document.removeEventListener("keyup",this._onKeyUp),this._onEvent({target:document.body})}},{key:"_onEvent",value:function(e){e=e.target,e=e===this.target||!(!this.target.contains(e)&&!this.target.contains(document.activeElement)),e?this.focusFlag||(this.onFocus&&this.onFocus({type:"focus",target:this.target}),this.focusFlag=!0):(this.focusFlag||this.firstEventFlag)&&(this.onBlur&&this.onBlur({type:"blur",target:this.target}),this.focusFlag=!1,this.firstEventFlag&&(this.firstEventFlag=!1))}}])&&n(t.prototype,i),e}()},3161:function(e,t,i){"use strict";function n(e,t,i){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var o=g();if(-1!==o&&o<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t.onChangeJSON&&("text"!==t.mode&&"code"!==t.mode&&(!t.modes||-1===t.modes.indexOf("text")&&-1===t.modes.indexOf("code"))||console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.')),t&&Object.keys(t).forEach(function(e){-1===n.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})),arguments.length&&this._create(e,t,i)}var o=i(8170),r=i(8037),s=i(8038).treeModeMixins,a=i(5956).textModeMixins,l=i(341).previewModeMixins,c=i(9791),d=c.clear,h=c.extend,u=c.getInnerText,g=c.getInternetExplorerVersion,p=c.parse,m=i(2744).tryRequireAjv,f=i(2558).showTransformModal,c=i(6210).showSortModal,C=m();"undefined"==typeof Promise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","onFocus","onBlur","colorPicker","onColorPicker","timestampTag","timestampFormat","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","limitDragging","maxVisibleChilds","onValidationError","modalAnchor","popupAnchor","createQuery","executeQuery","queryDescription"],n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{},i=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(i)},n.prototype.destroy=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=p(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){var t=this.container,i=h({},this.options),o=i.mode;i.mode=e;var r=n.modes[e];if(!r)throw new Error('Unknown mode "'+i.mode+'"');try{var s="text"===r.data,a=this.getName(),l=this[s?"getText":"get"]();if(this.destroy(),d(this),h(this,r.mixin),this.create(t,i),this.setName(a),this[s?"setText":"set"](l),"function"==typeof r.load)try{r.load.call(this)}catch(e){console.error(e)}if("function"==typeof i.onModeChange&&e!==o)try{i.onModeChange(e,o)}catch(e){console.error(e)}}catch(e){this._onError(e)}}},n.prototype.getMode=function(){return this.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeof this.options.onError)throw e;this.options.onError(e)},n.prototype.setSchema=function(e,t){if(e){var n;try{this.options.ajv?n=this.options.ajv:((n=C({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(i(2689)),n.addMetaSchema(i(1030)))}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(n){if(t){for(var o in t)n.removeSchema(o),t[o]&&n.addSchema(t[o],o);this.options.schemaRefs=t}this.validateSchema=n.compile(e),this.options.schema=e,this.validate()}this.refresh()}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate(),this.refresh()},n.prototype.validate=function(){},n.prototype.refresh=function(){},n.registerMode=function(e){var t;if(Array.isArray(e))for(r=0;r<e.length;r++)n.registerMode(e[r]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var i=e.mode;if(i in n.modes)throw new Error('Mode "'+i+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');for(var o=["setMode","registerMode","modes"],r=0;r<o.length;r++)if((t=o[r])in e.mixin)throw new Error('Reserved property "'+t+'" not allowed in mixin');n.modes[i]=e}},n.registerMode(s),n.registerMode(a),n.registerMode(l),n.ace=o,n.Ajv=C,n.VanillaPicker=r,n.showTransformModal=f,n.showSortModal=c,n.getInnerText=u,n.default=n,e.exports=n},6617:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.d(t,{x:function(){return s}});var o=i(897),r=i(7907),s=function(){function e(t,i,n,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var a={code:{text:(0,r.Iu)("modeCodeText"),title:(0,r.Iu)("modeCodeTitle"),click:function(){s("code")}},form:{text:(0,r.Iu)("modeFormText"),title:(0,r.Iu)("modeFormTitle"),click:function(){s("form")}},text:{text:(0,r.Iu)("modeTextText"),title:(0,r.Iu)("modeTextTitle"),click:function(){s("text")}},tree:{text:(0,r.Iu)("modeTreeText"),title:(0,r.Iu)("modeTreeTitle"),click:function(){s("tree")}},view:{text:(0,r.Iu)("modeViewText"),title:(0,r.Iu)("modeViewTitle"),click:function(){s("view")}},preview:{text:(0,r.Iu)("modePreviewText"),title:(0,r.Iu)("modePreviewTitle"),click:function(){s("preview")}}},l=[],c=0;c<i.length;c++){var d=i[c],h=a[d];if(!h)throw new Error('Unknown mode "'+d+'"');h.className="jsoneditor-type-modes"+(n===d?" jsoneditor-selected":""),l.push(h)}var u=a[n];if(!u)throw new Error('Unknown mode "'+n+'"');var u=u.text,g=document.createElement("button");g.type="button",g.className="jsoneditor-modes jsoneditor-separator",g.textContent=u+" ▾",g.title=(0,r.Iu)("modeEditorTitle"),g.onclick=function(){new o.x(l).show(g,t)},u=document.createElement("div"),u.className="jsoneditor-modes",u.style.position="relative",u.appendChild(g),t.appendChild(u),this.dom={container:t,box:g,frame:u}}var t,i;return t=e,(i=[{key:"focus",value:function(){this.dom.box.focus()}},{key:"destroy",value:function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null}}])&&n(t.prototype,i),e}()},8170:function(e,t,i){var n;if(window.ace)n=window.ace;else try{n=i(6225),i(4091),i(3330);var o=i(7923);n.config.setModuleUrl("ace/mode/json_worker",o)}catch(e){}e.exports=n},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(e,t,i){t.isDark=!1,t.cssClass="ace-jsoneditor",t.cssText='.ace-jsoneditor .ace_gutter {\nbackground: #ebebeb;\ncolor: #333\n}\n\n.ace-jsoneditor.ace_editor {\nfont-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;\nline-height: 1.3;\nbackground-color: #fff;\n}\n.ace-jsoneditor .ace_print-margin {\nwidth: 1px;\nbackground: #e8e8e8\n}\n.ace-jsoneditor .ace_scroller {\nbackground-color: #FFFFFF\n}\n.ace-jsoneditor .ace_text-layer {\ncolor: gray\n}\n.ace-jsoneditor .ace_variable {\ncolor: #1a1a1a\n}\n.ace-jsoneditor .ace_cursor {\nborder-left: 2px solid #000000\n}\n.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\nborder-left: 0px;\nborder-bottom: 1px solid #000000\n}\n.ace-jsoneditor .ace_marker-layer .ace_selection {\nbackground: lightgray\n}\n.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\nbox-shadow: 0 0 3px 0px #FFFFFF;\nborder-radius: 2px\n}\n.ace-jsoneditor .ace_marker-layer .ace_step {\nbackground: rgb(255, 255, 0)\n}\n.ace-jsoneditor .ace_marker-layer .ace_bracket {\nmargin: -1px 0 0 -1px;\nborder: 1px solid #BFBFBF\n}\n.ace-jsoneditor .ace_marker-layer .ace_active-line {\nbackground: #FFFBD1\n}\n.ace-jsoneditor .ace_gutter-active-line {\nbackground-color : #dcdcdc\n}\n.ace-jsoneditor .ace_marker-layer .ace_selected-word {\nborder: 1px solid lightgray\n}\n.ace-jsoneditor .ace_invisible {\ncolor: #BFBFBF\n}\n.ace-jsoneditor .ace_keyword,\n.ace-jsoneditor .ace_meta,\n.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\ncolor: #AF956F\n}\n.ace-jsoneditor .ace_keyword.ace_operator {\ncolor: #484848\n}\n.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\ncolor: #96DC5F\n}\n.ace-jsoneditor .ace_constant.ace_language {\ncolor: darkorange\n}\n.ace-jsoneditor .ace_constant.ace_numeric {\ncolor: red\n}\n.ace-jsoneditor .ace_constant.ace_character.ace_entity {\ncolor: #BF78CC\n}\n.ace-jsoneditor .ace_invalid {\ncolor: #FFFFFF;\nbackground-color: #FF002A;\n}\n.ace-jsoneditor .ace_fold {\nbackground-color: #AF956F;\nborder-color: #000000\n}\n.ace-jsoneditor .ace_storage,\n.ace-jsoneditor .ace_support.ace_class,\n.ace-jsoneditor .ace_support.ace_function,\n.ace-jsoneditor .ace_support.ace_other,\n.ace-jsoneditor .ace_support.ace_type {\ncolor: #C52727\n}\n.ace-jsoneditor .ace_string {\ncolor: green\n}\n.ace-jsoneditor .ace_comment {\ncolor: #BCC8BA\n}\n.ace-jsoneditor .ace_entity.ace_name.ace_tag,\n.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\ncolor: #606060\n}\n.ace-jsoneditor .ace_markup.ace_underline {\ntext-decoration: underline\n}\n.ace-jsoneditor .ace_indent-guide {\nbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\n}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})},6589:function(e,t){var i=function(){var e,t={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,i,n,o,r,s){var a=r.length-1;switch(o){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=r[a-1];case 13:this.$={};break;case 14:this.$=r[a-1];break;case 15:this.$=[r[a-2],r[a]];break;case 16:this.$={},this.$[r[a][0]]=r[a][1];break;case 17:this.$=r[a-2],r[a-2][r[a][0]]=r[a][1];break;case 18:this.$=[];break;case 19:this.$=r[a-1];break;case 20:this.$=[r[a]];break;case 21:this.$=r[a-2],r[a-2].push(r[a])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(){var e=i.lexer.lex()||1;return e="number"!=typeof e?i.symbols_[e]||e:e}var i=this,n=[0],o=[null],r=[],s=this.table,a="",l=0,c=0,d=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;r.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,g,p,m,f,C,I,A,b,v={};;){if(p=n[n.length-1],void 0===(m=this.defaultActions[p]||(null==u&&(u=t()),s[p]&&s[p][u]))||!m.length||!m[0]){if(!d){for(C in A=[],s[p])this.terminals_[C]&&2<C&&A.push("'"+this.terminals_[C]+"'");var y="",y=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", ")+", got '"+this.terminals_[u]+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'");this.parseError(y,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:h,expected:A})}if(3==d){if(1==u)throw new Error(y||"Parsing halted.");c=this.lexer.yyleng,a=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,u=t()}for(;!(2..toString()in s[p]);){if(0==p)throw new Error(y||"Parsing halted.");b=1,n.length=n.length-2*b,o.length=o.length-b,r.length=r.length-b,p=n[n.length-1]}g=u,u=2,m=s[p=n[n.length-1]]&&s[p][2],d=3}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+u);switch(m[0]){case 1:n.push(u),o.push(this.lexer.yytext),r.push(this.lexer.yylloc),n.push(m[1]),u=null,g?(u=g,g=null):(c=this.lexer.yyleng,a=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,0<d&&d--);break;case 2:if(I=this.productions_[m[1]][1],v.$=o[o.length-I],v._$={first_line:r[r.length-(I||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(I||1)].first_column,last_column:r[r.length-1].last_column},void 0!==(f=this.performAction.call(v,a,c,l,this.yy,m[1],o,r)))return f;I&&(n=n.slice(0,-1*I*2),o=o.slice(0,-1*I),r=r.slice(0,-1*I)),n.push(this.productions_[m[1]][0]),o.push(v.$),r.push(v._$),I=s[n[n.length-2]][n[n.length-1]],n.push(I);break;case 3:return!0}}return!0}};return e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),r=0;r<o.length&&(!(t=this._input.match(this.rules[o[r]]))||e&&!(t[0].length>e[0].length)||(e=t,i=r,this.options.flex));r++);return e?((n=e[0].match(/\n.*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,o[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}},t.lexer=e,t}();t.parser=i,t.parse=i.parse.bind(i)},3879:function(e){"use strict";function t(){}function i(e,t){return e.hasOwnProperty(t)&&(!0===e[t]||e[t].length)}function n(e,t,i){e.parentNode?e.parentNode.parentNode||t.appendChild(e.parentNode):t.appendChild(e),c.removeClass(e,"excluded"),i||(e.textContent=e.textContent+"")}function o(){var e,t;this.items.length&&(e=document.createDocumentFragment(),this.config.pagination?(t=this.pages.slice(0,this.pageIndex),c.each(t,function(t,i){c.each(i,function(t,i){n(i,e,this.customOption)},this)},this)):c.each(this.items,function(t,i){n(i,e,this.customOption)},this),e.childElementCount&&(c.removeClass(this.items[this.navIndex],"active"),this.navIndex=e.querySelector(".selectr-option").idx,c.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(e))}function r(e,t){return t=t||e,t=this.customOption?this.config.renderOption(t):e.textContent,(t=c.createElement("li",{class:"selectr-option",html:t,role:"treeitem","aria-selected":!1})).idx=e.idx,this.items.push(t),e.defaultSelected&&this.defaultSelected.push(e.idx),e.disabled&&(t.disabled=!0,c.addClass(t,"disabled")),t}function s(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&c.removeClass(this.inputContainer,"active"),c.hasClass(this.container,"notice")&&(c.removeClass(this.container,"notice"),c.addClass(this.container,"open"),this.input.focus()),c.each(this.items,function(e,t){c.removeClass(t,"excluded"),this.customOption||(t.textContent=t.textContent+"")},this))}function a(e,t){if(t=t||{},!e)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if("string"==typeof(this.el=e)&&(this.el=document.querySelector(e)),null===this.el)throw new Error("The element you passed to Selectr can not be found.");if("select"!==this.el.nodeName.toLowerCase())throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(t)}var l={defaultSelected:!0,width:"auto",disabled:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag..."};t.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){this._events=this._events||{},e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=0)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},t.mixin=function(e){for(var i=["on","off","emit"],n=0;n<i.length;n++)"function"==typeof e?e.prototype[i[n]]=t.prototype[i[n]]:e[i[n]]=t.prototype[i[n]];return e};var c={extend:function(e,t){for(var i in t=t||{},e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)||(t[i]=e[i]));return t},each:function(e,t,i){if("[object Object]"===Object.prototype.toString.call(e))for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(i,n,e[n],e);else for(var o=0,r=e.length;o<r;o++)t.call(i,o,e[o],e)},createElement:function(e,t){var i,n,o=document,r=o.createElement(e);if(t&&"[object Object]"===Object.prototype.toString.call(t))for(i in t)i in r?r[i]=t[i]:"html"===i?r.textContent=t[i]:"text"===i?(n=o.createTextNode(t[i]),r.appendChild(n)):r.setAttribute(i,t[i]);return r},hasClass:function(e,t){if(e)return e.classList?e.classList.contains(t):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){c.hasClass(e,t)||(e.classList?e.classList.add(t):e.className=e.className.trim()+" "+t)},removeClass:function(e,t){c.hasClass(e,t)&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(e,t){return e&&e!==document.body&&(t(e)?e:c.closest(e.parentNode,t))},isInt:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},debounce:function(e,t,i){var n;return function(){var o=this,r=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(o,r)},t),s&&e.apply(o,r)}},rect:function(e,t){var i=window,n=e.getBoundingClientRect(),e=t?i.pageXOffset:0,i=t?i.pageYOffset:0;return{bottom:n.bottom+i,height:n.height,left:n.left+e,right:n.right+e,top:n.top+i,width:n.width}},includes:function(e,t){return-1<e.indexOf(t)},truncate:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}},d=function(){var e,t=this.tree,i=t.scrollTop;t.scrollHeight-t.offsetHeight<=i&&this.pageIndex<this.pages.length&&(e=document.createDocumentFragment(),c.each(this.pages[this.pageIndex],function(t,i){n(i,e,this.customOption)},this),t.appendChild(e),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))};a.prototype.render=function(e){var n;this.rendered||(this.config=c.extend(l,e),this.originalType=this.el.type,this.originalIndex=this.el.tabIndex,this.defaultSelected=[],this.originalOptionCount=this.el.options.length,(this.config.multiple||this.config.taggable)&&(this.el.multiple=!0),this.disabled=i(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&"function"==typeof this.config.renderOption,this.customSelected=this.config.hasOwnProperty("renderSelection")&&"function"==typeof this.config.renderSelection,t.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,i(this.config,"width")&&(c.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":c.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=c.createElement("div",{class:"selectr-container"}),this.config.customClass&&c.addClass(this.container,this.config.customClass),this.mobileDevice?c.addClass(this.container,"selectr-mobile"):c.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?c.addClass(this.el,"selectr-visible"):c.addClass(this.el,"selectr-hidden"),this.selected=c.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:1,"aria-expanded":!1}),this.label=c.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var e,t=c.createElement("div",{class:"selectr-options-container"});this.tree=c.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=c.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple&&(c.addClass(this.label,"selectr-tags"),c.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.getSelectedProperties("value"),this.selectedIndexes=this.getSelectedProperties("idx")),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=c.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),c.addClass(this.container,"clearable")),this.config.taggable&&(e=c.createElement("li",{class:"input-tag"}),this.input=c.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),e.appendChild(this.input),this.label.appendChild(e),c.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators&&(this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators))),this.config.searchable&&(this.input=c.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),this.inputClear=c.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=c.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),t.appendChild(this.inputContainer)),t.appendChild(this.notice),t.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var n,o,s,a=!1,l=0;this.el.children.length&&c.each(this.el.children,function(e,t){"OPTGROUP"===t.nodeName?(a=c.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.label+"</li>"}),c.each(t.children,function(e,t){t.idx=l,a.appendChild(r.call(this,t,a)),l++},this)):(t.idx=l,r.call(this,t),l++)},this),this.config.data&&Array.isArray(this.config.data)&&(n=!(this.data=[]),a=!1,l=0,c.each(this.config.data,function(e,t){i(t,"children")?(n=c.createElement("optgroup",{label:t.text}),a=c.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.text+"</li>"}),c.each(t.children,function(e,t){(o=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(o),n.appendChild(o),o.idx=l,a.appendChild(r.call(this,o,t)),this.data[l]=t,l++},this)):((o=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(o),o.idx=l,r.call(this,o,t),this.data[l]=t,l++)},this)),this.setSelected(!0);for(var d=this.navIndex=0;d<this.items.length;d++)if(s=this.items[d],!c.hasClass(s,"disabled")){c.addClass(s,"active"),this.navIndex=d;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(t),this.placeEl=c.createElement("div",{class:"selectr-placeholder"}),this.setPlaceholder(),this.selected.appendChild(this.placeEl),this.disabled&&this.disable(),this.el.parentNode.insertBefore(this.container,this.el),this.container.appendChild(this.el)}.call(this),this.bindEvents(),this.update(),this.optsRect=c.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),n=this,setTimeout(function(){n.emit("selectr.init")},20))},a.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},a.prototype.getSelectedProperties=function(e){var t=this.getSelected();return[].slice.call(t).map(function(t){return t[e]}).filter(function(e){return null!=e})},a.prototype.bindEvents=function(){var e=this;this.events={},this.events.dismiss=function(e){e=e.target,this.container.contains(e)||!this.opened&&!c.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(e){if(e=e||window.event,this.items.length&&this.opened&&c.includes([13,38,40],e.which)){if(e.preventDefault(),13===e.which)return!(this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var t,i=this.items[this.navIndex];switch(e.which){case 38:(t=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(t=1)&&this.navIndex++}for(this.navigating=!0;c.hasClass(this.items[this.navIndex],"disabled")||c.hasClass(this.items[this.navIndex],"excluded");)if(t?this.navIndex++:this.navIndex--,this.searching){if(this.navIndex>this.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndex<this.tree.firstElementChild.idx){this.navIndex=this.tree.firstElementChild.idx;break}}e=c.rect(this.items[this.navIndex]),t?(0===this.navIndex?this.tree.scrollTop=0:e.top+e.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(e.top+e.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&d.call(this)):0===this.navIndex?this.tree.scrollTop=0:e.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(e.top-this.optsRect.top)),i&&c.removeClass(i,"active"),c.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",function(t){t.changedTouches[0].target===e.el&&e.toggle()}),(this.config.nativeDropdown||this.mobileDevice)&&this.container.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),t.target===e.el&&e.toggle()}),this.el.addEventListener("change",function(t){var i;e.el.multiple?(i=e.getSelectedProperties("idx"),i=function(e,t){for(var i,n=[],o=e.slice(0),r=0;r<t.length;r++)-1<(i=o.indexOf(t[r]))?o.splice(i,1):n.push(t[r]);return[n,o]}(e.selectedIndexes,i),c.each(i[0],function(t,i){e.select(i)},e),c.each(i[1],function(t,i){e.deselect(i)},e)):-1<e.el.selectedIndex&&e.select(e.el.selectedIndex)})),this.config.nativeDropdown&&this.container.addEventListener("keydown",function(t){"Enter"===t.key&&e.selected===document.activeElement&&(e.toggle(),setTimeout(function(){e.el.focus()},200))}),this.selected.addEventListener("click",function(t){e.disabled||e.toggle(),t.preventDefault(),t.stopPropagation()}),this.label.addEventListener("click",function(t){c.hasClass(t.target,"selectr-tag-remove")&&e.deselect(t.target.parentNode.idx)}),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",function(e){e.preventDefault()}),this.tree.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),(t=c.closest(t.target,function(e){return e&&c.hasClass(e,"selectr-option")}))&&(c.hasClass(t,"disabled")||(c.hasClass(t,"selected")?(e.el.multiple||!e.el.multiple&&e.config.allowDeselect)&&e.deselect(t.idx):e.select(t.idx),e.opened&&!e.el.multiple&&e.close()))}),this.tree.addEventListener("mouseover",function(t){c.hasClass(t.target,"selectr-option")&&(c.hasClass(t.target,"disabled")||(c.removeClass(e.items[e.navIndex],"active"),c.addClass(t.target,"active"),e.navIndex=[].slice.call(e.items).indexOf(t.target)))}),this.config.searchable&&(this.input.addEventListener("focus",function(t){e.searching=!0}),this.input.addEventListener("blur",function(t){e.searching=!1}),this.input.addEventListener("keyup",function(t){e.search(),e.config.taggable||(this.value.length?c.addClass(this.parentNode,"active"):c.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(t){e.input.value=null,s.call(e),e.tree.childElementCount||o.call(e)})),this.config.taggable&&this.input.addEventListener("keyup",function(t){var i;e.search(),e.config.taggable&&this.value.length&&(i=this.value.trim(),13!==t.which&&!c.includes(e.tagSeperators,t.key)||(c.each(e.tagSeperators,function(e,t){i=i.replace(t,"")}),e.add({value:i,text:i,selected:!0},!0)?(e.close(),s.call(e)):(this.value="",e.setMessage("That tag is already in use."))))}),this.update=c.debounce(function(){e.opened&&e.config.closeOnScroll&&e.close(),e.width&&(e.container.style.width=e.width),e.invert()},50),this.requiresPagination&&(this.paginateItems=c.debounce(function(){d.call(this)},50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.el.form&&this.el.form.addEventListener("reset",this.events.reset)},a.prototype.setSelected=function(e){var t;this.config.data||this.el.multiple||!this.el.options.length||(0===this.el.selectedIndex&&(this.el.options[0].defaultSelected||this.config.defaultSelected||(this.el.selectedIndex=-1)),this.selectedIndex=this.el.selectedIndex,-1<this.selectedIndex&&this.select(this.selectedIndex)),this.config.multiple&&"select-one"===this.originalType&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),c.each(this.options,function(e,t){t.selected&&t.defaultSelected&&this.select(t.idx)},this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data&&(!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&this.select(0),t=0,c.each(this.config.data,function(e,n){i(n,"children")?c.each(n.children,function(e,i){i.hasOwnProperty("selected")&&!0===i.selected&&this.select(t),t++},this):(n.hasOwnProperty("selected")&&!0===n.selected&&this.select(t),t++)},this))},a.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),"select-one"===this.originalType&&(this.el.multiple=!1),this.config.data&&(this.el.textContent=""),c.removeClass(this.el,"selectr-hidden"),this.el.form&&c.off(this.el.form,"reset",this.events.reset),c.off(document,"click",this.events.dismiss),c.off(document,"keydown",this.events.navigate),c.off(window,"resize",this.update),c.off(window,"scroll",this.update),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1)},a.prototype.change=function(e){var t=this.items[e],i=this.options[e];i.disabled||(i.selected&&c.hasClass(t,"selected")?this.deselect(e):this.select(e),this.opened&&!this.el.multiple&&this.close())},a.prototype.select=function(e){var t=this.items[e],i=[].slice.call(this.el.options),n=this.options[e];if(this.el.multiple){if(c.includes(this.selectedIndexes,e))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage("A maximum of "+this.config.maxSelections+" items can be selected.",!0),!1;this.selectedValues.push(n.value),this.selectedIndexes.push(e),function(e){var t,i=this,n=document.createDocumentFragment(),o=this.options[e.idx],r=this.data?this.data[e.idx]:o,s=this.customSelected?this.config.renderSelection(r):o.textContent,r=c.createElement("li",{class:"selectr-tag",html:s}),s=c.createElement("button",{class:"selectr-tag-remove",type:"button"});r.appendChild(s),r.idx=e.idx,r.tag=o.value,this.tags.push(r),this.config.sortSelected?(o=this.tags.slice(),t=function(e,t){e.replace(/(\d+)|(\D+)/g,function(e,i,n){t.push([i||1/0,n||""])})},o.sort(function(e,n){var o,r,s=[],a=[];for(!0===i.config.sortSelected?(o=e.tag,r=n.tag):"text"===i.config.sortSelected&&(o=e.textContent,r=n.textContent),t(o,s),t(r,a);s.length&&a.length;){var l=s.shift(),c=a.shift(),c=l[0]-c[0]||l[1].localeCompare(c[1]);if(c)return c}return s.length-a.length}),c.each(o,function(e,t){n.appendChild(t)}),this.label.textContent=""):n.appendChild(r),this.config.taggable?this.label.insertBefore(n,this.input.parentNode):this.label.appendChild(n)}.call(this,t)}else{var o=this.data?this.data[e]:n;this.label.textContent=this.customSelected?this.config.renderSelection(o):n.textContent,this.selectedValue=n.value,this.selectedIndex=e,c.each(this.options,function(t,i){var n=this.items[t];t!==e&&(n&&c.removeClass(n,"selected"),i.selected=!1,i.removeAttribute("selected"))},this)}c.includes(i,n)||this.el.add(n),t.setAttribute("aria-selected",!0),c.addClass(t,"selected"),c.addClass(this.container,"has-selected"),n.selected=!0,n.setAttribute("selected",""),this.emit("selectr.change",n),this.emit("selectr.select",n)},a.prototype.deselect=function(e,t){var i=this.items[e],n=this.options[e];if(this.el.multiple){var o=this.selectedIndexes.indexOf(e);this.selectedIndexes.splice(o,1),o=this.selectedValues.indexOf(n.value),this.selectedValues.splice(o,1),function(e){var t=!1;c.each(this.tags,function(i,n){n.idx===e.idx&&(t=n)},this),t&&(this.label.removeChild(t),this.tags.splice(this.tags.indexOf(t),1))}.call(this,i),this.tags.length||c.removeClass(this.container,"has-selected")}else{if(!t&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.textContent="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,c.removeClass(this.container,"has-selected")}this.items[e].setAttribute("aria-selected",!1),c.removeClass(this.items[e],"selected"),n.selected=!1,n.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",n)},a.prototype.setValue=function(e){var t=Array.isArray(e);if(t||(e=e.toString().trim()),!this.el.multiple&&t)return!1;c.each(this.options,function(i,n){(t&&c.includes(e.toString(),n.value)||n.value===e)&&this.change(n.idx)},this)},a.prototype.getValue=function(e,t){var i,n;return this.el.multiple?e?this.selectedIndexes.length&&(n={values:[]},c.each(this.selectedIndexes,function(e,t){t=this.options[t],n.values[e]={value:t.value,text:t.textContent}},this)):n=this.selectedValues.slice():n=e?{value:(i=this.options[this.selectedIndex]).value,text:i.textContent}:this.selectedValue,n=e&&t?JSON.stringify(n):n},a.prototype.add=function(e,t){if(e){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(e))c.each(e,function(e,i){this.add(i,t)},this);else if("[object Object]"===Object.prototype.toString.call(e)){if(t){var i=!1;if(c.each(this.options,function(t,n){n.value.toLowerCase()===e.value.toLowerCase()&&(i=!0)}),i)return!1}var n=c.createElement("option",e);return this.data.push(e),this.options.push(n),n.idx=0<this.options.length?this.options.length-1:0,r.call(this,n),e.selected&&this.select(n.idx),n}return this.setPlaceholder(),this.config.pagination&&this.paginate(),!0}},a.prototype.remove=function(e){var t,i=[];Array.isArray(e)?c.each(e,function(t,n){c.isInt(n)?i.push(this.getOptionByIndex(n)):"string"==typeof e&&i.push(this.getOptionByValue(n))},this):c.isInt(e)?i.push(this.getOptionByIndex(e)):"string"==typeof e&&i.push(this.getOptionByValue(e)),i.length&&(c.each(i,function(e,i){t=i.idx,this.el.remove(i),this.options.splice(t,1),i=this.items[t].parentNode,i&&i.removeChild(this.items[t]),this.items.splice(t,1),c.each(this.options,function(e,t){t.idx=e,this.items[e].idx=e},this)},this),this.setPlaceholder(),this.config.pagination&&this.paginate())},a.prototype.removeAll=function(){this.clear(!0),c.each(this.el.options,function(e,t){this.el.remove(t)},this),c.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},a.prototype.search=function(e){var t,i,r;this.navigating||(e=e||this.input.value,t=document.createDocumentFragment(),this.removeMessage(),c.truncate(this.tree),1<e.length?(c.each(this.options,function(i,o){var r,s=this.items[o.idx];c.includes(o.textContent.toLowerCase(),e.toLowerCase())&&!o.disabled?(n(s,t,this.customOption),c.removeClass(s,"excluded"),this.customOption||(s.textContent="",(r=function(e,t){var i=new RegExp(e,"i").exec(t);return i?(e=i.index,i=i.index+i[0].length,{before:t.substring(0,e),match:t.substring(e,i),after:t.substring(i)}):null}(e,o.textContent))&&(s.appendChild(document.createTextNode(r.before)),(o=document.createElement("span")).className="selectr-match",o.appendChild(document.createTextNode(r.match)),s.appendChild(o),s.appendChild(document.createTextNode(r.after))))):c.addClass(s,"excluded")},this),t.childElementCount?(i=this.items[this.navIndex],r=t.firstElementChild,c.removeClass(i,"active"),this.navIndex=r.idx,c.addClass(r,"active")):this.config.taggable||this.setMessage("no results.")):o.call(this),this.tree.appendChild(t))},a.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},a.prototype.open=function(){var e=this;return!!this.options.length&&(this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(c.addClass(this.container,"native-open"),void(this.config.data&&c.each(this.options,function(e,t){this.el.add(t)},this))):(c.addClass(this.container,"open"),o.call(this),this.invert(),this.tree.scrollTop=0,c.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),void(this.config.searchable&&!this.config.taggable&&setTimeout(function(){e.input.focus(),e.input.tabIndex=0},10))))},a.prototype.close=function(){var e;this.opened&&this.emit("selectr.close"),this.opened=!1,this.mobileDevice||this.config.nativeDropdown?c.removeClass(this.container,"native-open"):(e=c.hasClass(this.container,"notice"),this.config.searchable&&!e&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),e&&(c.removeClass(this.container,"notice"),this.notice.textContent=""),c.removeClass(this.container,"open"),c.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),c.truncate(this.tree),s.call(this))},a.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&c.each(this.tags,function(e,t){t.lastElementChild.tabIndex=0}),c.removeClass(this.container,"selectr-disabled")},a.prototype.disable=function(e){e||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&c.each(this.tags,function(e,t){t.lastElementChild.tabIndex=-1}),this.disabled=!0,c.addClass(this.container,"selectr-disabled")},a.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),c.each(this.defaultSelected,function(e,t){this.select(t)},this),this.emit("selectr.reset"))},a.prototype.clear=function(e){var t;this.el.multiple?this.selectedIndexes.length&&(t=this.selectedIndexes.slice(),c.each(t,function(e,t){this.deselect(t)},this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,e),this.emit("selectr.clear")},a.prototype.serialise=function(e){var t=[];return c.each(this.options,function(e,i){var n={value:i.value,text:i.textContent};i.selected&&(n.selected=!0),i.disabled&&(n.disabled=!0),t[e]=n}),e?JSON.stringify(t):t},a.prototype.serialize=function(e){return this.serialise(e)},a.prototype.setPlaceholder=function(e){e=e||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(e="No options available"),this.placeEl.textContent=e},a.prototype.paginate=function(){if(this.items.length){var e=this;return this.pages=this.items.map(function(t,i){return i%e.config.pagination==0?e.items.slice(i,i+e.config.pagination):null}).filter(function(e){return e}),this.pages}},a.prototype.setMessage=function(e,t){t&&this.close(),c.addClass(this.container,"notice"),this.notice.textContent=e},a.prototype.removeMessage=function(){c.removeClass(this.container,"notice"),this.notice.textContent=""},a.prototype.invert=function(){var e=c.rect(this.selected),t=this.tree.parentNode.offsetHeight,i=window.innerHeight;e.top+e.height+t>i?(c.addClass(this.container,"inverted"),this.isInverted=!0):(c.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=c.rect(this.tree)},a.prototype.getOptionByIndex=function(e){return this.options[e]},a.prototype.getOptionByValue=function(e){for(var t=!1,i=0,n=this.options.length;i<n;i++)if(this.options[i].value.trim()===e.toString().trim()){t=this.options[i];break}return t},e.exports=a},4188:function(e,t,i){"use strict";i.d(t,{qD:function(){return n},EX:function(){return o},WF:function(){return r},oW:function(){return s}});var n=document.body,o=10485760,r=2e4,s=2147483648},2602:function(e,t,i){"use strict";function n(e,t,i){function n(){if(u&&u.parentNode){for(var t in u.parentNode.removeChild(u),c)n=t,Object.prototype.hasOwnProperty.call(c,n)&&((n=c[t])&&(0,o.removeEventListener)(l,t,n),delete c[t]);"function"==typeof i&&i(e)}var n}function r(e){(e=e.target)===u||(0,o.isChildOf)(e,u)||n()}var s,a=3<arguments.length&&void 0!==arguments[3]&&arguments[3],l="function"==typeof(h=e).getRootNode?h.getRootNode():window,c={},d=e.getBoundingClientRect(),h=t.getBoundingClientRect(),u=document.createElement("div");return u.className="jsoneditor-anchor",u.style.position="absolute",u.style.left=d.left-h.left+"px",u.style.top=d.top-h.top+"px",u.style.width=d.width-2+"px",u.style.height=d.height-2+"px",u.style.boxSizing="border-box",t.appendChild(u),c.mousedown=(0,o.addEventListener)(l,"mousedown",r),c.mousewheel=(0,o.addEventListener)(l,"mousewheel",r),a&&(s=null,u.onmouseover=function(){clearTimeout(s),s=null},u.onmouseout=function(){s=s||setTimeout(n,200)}),u.destroy=n,u}i.d(t,{w:function(){return n}});var o=i(9791)},7923:function(e){e.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb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KICAgIH0KICAgIHJldHVybiBpZDsKfQp3aW5kb3cucmVxdWlyZS5tb2R1bGVzID0ge307CndpbmRvdy5yZXF1aXJlLnRsbnMgPSB7fTsKCndpbmRvdy5kZWZpbmUgPSBmdW5jdGlvbihpZCwgZGVwcywgZmFjdG9yeSkgewogICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT0gMikgewogICAgICAgIGZhY3RvcnkgPSBkZXBzOwogICAgICAgIGlmICh0eXBlb2YgaWQgIT0gInN0cmluZyIpIHsKICAgICAgICAgICAgZGVwcyA9IGlkOwogICAgICAgICAgICBpZCA9IHdpbmRvdy5yZXF1aXJlLmlkOwogICAgICAgIH0KICAgIH0gZWxzZSBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7CiAgICAgICAgZmFjdG9yeSA9IGlkOwogICAgICAgIGRlcHMgPSBbXTsKICAgICAgICBpZCA9IHdpbmRvdy5yZXF1aXJlLmlkOwogICAgfQogICAgCiAgICBpZiAodHlwZW9mIGZhY3RvcnkgIT0gImZ1bmN0aW9uIikgewogICAgICAgIHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdID0gewogICAgICAgICAgICBleHBvcnRzOiBmYWN0b3J5LAogICAgICAgICAgICBpbml0aWFsaXplZDogdHJ1ZQogICAgICAgIH07CiAgICAgICAgcmV0dXJuOwogICAgfQoKICAgIGlmICghZGVwcy5sZW5ndGgpCiAgICAgICAgLy8gSWYgdGhlcmUgaXMgbm8gZGVwZW5kZW5jaWVzLCB3ZSBpbmplY3QgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kCiAgICAgICAgLy8gIm1vZHVsZSIgYXMgZGVwZW5kZW5jaWVzLCB0byBwcm92aWRlIENvbW1vbkpTIGNvbXBhdGliaWxpdHkuCiAgICAgICAgZGVwcyA9IFsicmVxdWlyZSIsICJleHBvcnRzIiwgIm1vZHVsZSJdOwoKICAgIHZhciByZXEgPSBmdW5jdGlvbihjaGlsZElkKSB7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKGlkLCBjaGlsZElkKTsKICAgIH07CgogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgZXhwb3J0czoge30sCiAgICAgICAgZmFjdG9yeTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHZhciBtb2R1bGUgPSB0aGlzOwogICAgICAgICAgICB2YXIgcmV0dXJuRXhwb3J0cyA9IGZhY3RvcnkuYXBwbHkodGhpcywgZGVwcy5zbGljZSgwLCBmYWN0b3J5Lmxlbmd0aCkubWFwKGZ1bmN0aW9uKGRlcCkgewogICAgICAgICAgICAgICAgc3dpdGNoIChkZXApIHsKICAgICAgICAgICAgICAgICAgICAvLyBCZWNhdXNlICJyZXF1aXJlIiwgImV4cG9ydHMiIGFuZCAibW9kdWxlIiBhcmVuJ3QgYWN0dWFsCiAgICAgICAgICAgICAgICAgICAgLy8gZGVwZW5kZW5jaWVzLCB3ZSBtdXN0IGhhbmRsZSB0aGVtIHNlcGVyYXRlbHkuCiAgICAgICAgICAgICAgICAgICAgY2FzZSAicmVxdWlyZSI6IHJldHVybiByZXE7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAiZXhwb3J0cyI6IHJldHVybiBtb2R1bGUuZXhwb3J0czsKICAgICAgICAgICAgICAgICAgICBjYXNlICJtb2R1bGUiOiAgcmV0dXJuIG1vZHVsZTsKICAgICAgICAgICAgICAgICAgICAvLyBCdXQgZm9yIGFsbCBvdGhlciBkZXBlbmRlbmNpZXMsIHdlIGNhbiBqdXN0IGdvIGFoZWFkIGFuZAogICAgICAgICAgICAgICAgICAgIC8vIHJlcXVpcmUgdGhlbS4KICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiAgICAgICAgcmV0dXJuIHJlcShkZXApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChyZXR1cm5FeHBvcnRzKQogICAgICAgICAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSByZXR1cm5FeHBvcnRzOwogICAgICAgICAgICByZXR1cm4gbW9kdWxlOwogICAgICAgIH0KICAgIH07Cn07CndpbmRvdy5kZWZpbmUuYW1kID0ge307CnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHJlcXVpcmUudGxuc1tpXSA9IHRvcExldmVsTmFtZXNwYWNlc1tpXTsKfTsKCndpbmRvdy5pbml0U2VuZGVyID0gZnVuY3Rpb24gaW5pdFNlbmRlcigpIHsKCiAgICB2YXIgRXZlbnRFbWl0dGVyID0gd2luZG93LnJlcXVpcmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKICAgIHZhciBvb3AgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9vb3AiKTsKICAgIAogICAgdmFyIFNlbmRlciA9IGZ1bmN0aW9uKCkge307CiAgICAKICAgIChmdW5jdGlvbigpIHsKICAgICAgICAKICAgICAgICBvb3AuaW1wbGVtZW50KHRoaXMsIEV2ZW50RW1pdHRlcik7CiAgICAgICAgICAgICAgICAKICAgICAgICB0aGlzLmNhbGxiYWNrID0gZnVuY3Rpb24oZGF0YSwgY2FsbGJhY2tJZCkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiY2FsbCIsCiAgICAgICAgICAgICAgICBpZDogY2FsbGJhY2tJZCwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgIAogICAgICAgIHRoaXMuZW1pdCA9IGZ1bmN0aW9uKG5hbWUsIGRhdGEpIHsKICAgICAgICAgICAgcG9zdE1lc3NhZ2UoewogICAgICAgICAgICAgICAgdHlwZTogImV2ZW50IiwKICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsCiAgICAgICAgICAgICAgICBkYXRhOiBkYXRhCiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgCiAgICB9KS5jYWxsKFNlbmRlci5wcm90b3R5cGUpOwogICAgCiAgICByZXR1cm4gbmV3IFNlbmRlcigpOwp9OwoKdmFyIG1haW4gPSB3aW5kb3cubWFpbiA9IG51bGw7CnZhciBzZW5kZXIgPSB3aW5kb3cuc2VuZGVyID0gbnVsbDsKCndpbmRvdy5vbm1lc3NhZ2UgPSBmdW5jdGlvbihlKSB7CiAgICB2YXIgbXNnID0gZS5kYXRhOwogICAgaWYgKG1zZy5ldmVudCAmJiBzZW5kZXIpIHsKICAgICAgICBzZW5kZXIuX3NpZ25hbChtc2cuZXZlbnQsIG1zZy5kYXRhKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5jb21tYW5kKSB7CiAgICAgICAgaWYgKG1haW5bbXNnLmNvbW1hbmRdKQogICAgICAgICAgICBtYWluW21zZy5jb21tYW5kXS5hcHBseShtYWluLCBtc2cuYXJncyk7CiAgICAgICAgZWxzZSBpZiAod2luZG93W21zZy5jb21tYW5kXSkKICAgICAgICAgICAgd2luZG93W21zZy5jb21tYW5kXS5hcHBseSh3aW5kb3csIG1zZy5hcmdzKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiVW5rbm93biBjb21tYW5kOiIgKyBtc2cuY29tbWFuZCk7CiAgICB9CiAgICBlbHNlIGlmIChtc2cuaW5pdCkgewogICAgICAgIHdpbmRvdy5pbml0QmFzZVVybHMobXNnLnRsbnMpOwogICAgICAgIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSB3aW5kb3cuaW5pdFNlbmRlcigpOwogICAgICAgIHZhciBjbGF6eiA9IHJlcXVpcmUobXNnLm1vZHVsZSlbbXNnLmNsYXNzbmFtZV07CiAgICAgICAgbWFpbiA9IH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GZ1bmN0aW9uKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pIHsKICAgIHRoaXMuc3RhcnQgPSB7CiAgICAgICAgcm93OiBzdGFydFJvdywKICAgICAgICBjb2x1bW46IHN0YXJ0Q29sdW1uCiAgICB9OwoKICAgIHRoaXMuZW5kID0gewogICAgICAgIHJvdzogZW5kUm93LAogICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICB9Owp9OwoKKGZ1bmN0aW9uKCkgewogICAgdGhpcy5pc0VxdWFsID0gZnVuY3Rpb24ocmFuZ2UpIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT09IHJhbmdlLnN0YXJ0LnJvdyAmJgogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPT09IHJhbmdlLmVuZC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPT09IHJhbmdlLnN0YXJ0LmNvbHVtbiAmJgogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPT09IHJhbmdlLmVuZC5jb2x1bW47CiAgICB9OwogICAgdGhpcy50b1N0cmluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAoIlJhbmdlOiBbIiArIHRoaXMuc3RhcnQucm93ICsgIi8iICsgdGhpcy5zdGFydC5jb2x1bW4gKwogICAgICAgICAgICAiXSAtPiBbIiArIHRoaXMuZW5kLnJvdyArICIvIiArIHRoaXMuZW5kLmNvbHVtbiArICJdIik7CiAgICB9OwoKICAgIHRoaXMuY29udGFpbnMgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7CiAgICB9OwogICAgdGhpcy5jb21wYXJlUmFuZ2UgPSBmdW5jdGlvbihyYW5nZSkgewogICAgICAgIHZhciBjbXAsCiAgICAgICAgICAgIGVuZCA9IHJhbmdlLmVuZCwKICAgICAgICAgICAgc3RhcnQgPSByYW5nZS5zdGFydDsKCiAgICAgICAgY21wID0gdGhpcy5jb21wYXJlKGVuZC5yb3csIGVuZC5jb2x1bW4pOwogICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoc3RhcnQucm93LCBzdGFydC5jb2x1bW4pOwogICAgICAgICAgICBpZiAoY21wID09IDEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAyOwogICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgcmV0dXJuIC0yOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfSBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlUG9pbnQgPSBmdW5jdGlvbihwKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pOwogICAgfTsKICAgIHRoaXMuY29udGFpbnNSYW5nZSA9IGZ1bmN0aW9uKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDsKICAgIH07CiAgICB0aGlzLmludGVyc2VjdHMgPSBmdW5jdGlvbihyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIHRoaXMuaXNFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW47CiAgICB9OwogICAgdGhpcy5pc1N0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbjsKICAgIH07CiAgICB0aGlzLnNldFN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0aGlzLnN0YXJ0LnJvdyA9IHJvdzsKICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuc2V0RW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSByb3cuY29sdW1uOwogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3cucm93OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdzsKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID0gY29sdW1uOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLmluc2lkZSA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkgewogICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikgfHwgdGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHRoaXMuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9OwogICAgdGhpcy5pbnNpZGVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH07CiAgICB0aGlzLmNvbXBhcmUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICghdGhpcy5pc011bHRpTGluZSgpKSB7CiAgICAgICAgICAgIGlmIChyb3cgPT09IHRoaXMuc3RhcnQucm93KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29sdW1uIDwgdGhpcy5zdGFydC5jb2x1bW4gPyAtMSA6IChjb2x1bW4gPiB0aGlzLmVuZC5jb2x1bW4gPyAxIDogMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdykKICAgICAgICAgICAgcmV0dXJuIC0xOwoKICAgICAgICBpZiAocm93ID4gdGhpcy5lbmQucm93KQogICAgICAgICAgICByZXR1cm4gMTsKCiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09PSByb3cpCiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPj0gdGhpcy5zdGFydC5jb2x1bW4gPyAwIDogLTE7CgogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdykKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTsKCiAgICAgICAgcmV0dXJuIDA7CiAgICB9OwogICAgdGhpcy5jb21wYXJlU3RhcnQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlRW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLmNvbXBhcmVJbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA+IGxhc3RSb3cpCiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiBsYXN0Um93ICsgMSwgY29sdW1uOiAwfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHtyb3c6IGZpcnN0Um93LCBjb2x1bW46IDB9OwoKICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBsYXN0Um93ICsgMSwgY29sdW1uOiAwfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1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YXRjaCBkZWx0YSBsaW5lcyIpOwp9CgpleHBvcnRzLmFwcGx5RGVsdGEgPSBmdW5jdGlvbihkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIAogICAgdmFyIHJvdyA9IGRlbHRhLnN0YXJ0LnJvdzsKICAgIHZhciBzdGFydENvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjsKICAgIHZhciBsaW5lID0gZG9jTGluZXNbcm93XSB8fCAiIjsKICAgIHN3aXRjaCAoZGVsdGEuYWN0aW9uKSB7CiAgICAgICAgY2FzZSAiaW5zZXJ0IjoKICAgICAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgICAgIGlmIChsaW5lcy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBkZWx0YS5saW5lc1swXSArIGxpbmUuc3Vic3RyaW5nKHN0YXJ0Q29sdW1uKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHZhciBhcmdzID0gW3JvdywgMV0uY29uY2F0KGRlbHRhLmxpbmVzKTsKICAgICAgICAgICAgICAgIGRvY0xpbmVzLnNwbGljZS5hcHBseShkb2NMaW5lcywgYXJncyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbcm93XTsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3JvdyArIGRlbHRhLmxpbmVzLmxlbmd0aCAtIDFdICs9IGxpbmUuc3Vic3RyaW5nKHN0YXJ0Q29sdW1uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICJyZW1vdmUiOgogICAgICAgICAgICB2YXIgZW5kQ29sdW1uID0gZGVsdGEuZW5kLmNvbHVtbjsKICAgICA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sdW1uOiBkZWx0YVN0YXJ0LmNvbHVtbgogICAgICAgIH07CiAgICB9CiAgICB0aGlzLnNldFBvc2l0aW9uID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIG5vQ2xpcCkgewogICAgICAgIHZhciBwb3M7CiAgICAgICAgaWYgKG5vQ2xpcCkgewogICAgICAgICAgICBwb3MgPSB7CiAgICAgICAgICAgICAgICByb3c6IHJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogY29sdW1uCiAgICAgICAgICAgIH07CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgcG9zID0gdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudChyb3csIGNvbHVtbik7CiAgICAgICAgfQoKICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CgogICAgICAgIHZhciBvbGQgPSB7CiAgICAgICAgICAgIHJvdzogdGhpcy5yb3csCiAgICAgICAgICAgIGNvbHVtbjogdGhpcy5jb2x1bW4KICAgICAgICB9OwoKICAgICAgICB0aGlzLnJvdyA9IHBvcy5yb3c7CiAgICAgICAgdGhpcy5jb2x1bW4gPSBwb3MuY29sdW1uOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlIiwgewogICAgICAgICAgICBvbGQ6IG9sZCwKICAgICAgICAgICAgdmFsdWU6IHBvcwogICAgICAgIH0pOwogICAgfTsKICAgIHRoaXMuZGV0YWNoID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5kb2N1bWVudC5vZmYoImNoYW5nZSIsIHRoaXMuJG9uQ2hhbmdlKTsKICAgIH07CiAgICB0aGlzLmF0dGFjaCA9IGZ1bmN0aW9uKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLC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GZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmNob3IodGhpcywgcm93LCBjb2x1bW4pOwogICAgfTsKICAgIGlmICgiYWFhIi5zcGxpdCgvYS8pLmxlbmd0aCA9PT0gMCkgewogICAgICAgIHRoaXMuJHNwbGl0ID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgICAgICByZXR1cm4gdGV4dC5yZXBsYWNlKC9cclxufFxyL2csICJcbiIpLnNwbGl0KCJcbiIpOwogICAgICAgIH07CiAgICB9IGVsc2UgewogICAgICAgIHRoaXMuJHNwbGl0ID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgICAgICByZXR1cm4gdGV4dC5zcGxpdCgvXHJcbnxccnxcbi8pOwogICAgICAgIH07CiAgICB9CgoKICAgIHRoaXMuJGRldGVjdE5ld0xpbmUgPSBmdW5jdGlvbih0ZXh0KSB7CiAgICAgICAgdmFyIG1hdGNoID0gdGV4dC5tYXRjaCgvXi4qPyhcclxufFxyfFxuKS9tKTsKICAgICAgICB0aGlzLiRhdXRvTmV3TGluZSA9IG1hdGNoID8gbWF0Y2hbMV0gOiAiXG4iOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICB0aGlzLmdldE5ld0xpbmVDaGFyYWN0ZXIgPSBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuJG5ld0xpbmVNb2RlKSB7CiAgICAgICAgICBjYXNlICJ3aW5kb3dzIjoKICAgICAgICAgICAgcmV0dXJuICJcclxuIjsKICAgICAgICAgIGNhc2UgInVuaXgiOgogICAgICAgICAgICByZXR1cm4gIlxuIjsKICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIHJldHVybiB0aGlzLiRhdXRvTmV3TGluZSB8fCAiXG4iOwogICAgICAgIH0KICAgIH07CgogICAgdGhpcy4kYXV0b05ld0xpbmUgPSAiIjsKICAgIHRoaXMu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KICAgICAgICB2YXIgZW5kID0gdGhpcy5wb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4gKyB0ZXh0Lmxlbmd0aCk7CiAgICAgICAgCiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IFt0ZXh0XQogICAgICAgIH0sIHRydWUpOwogICAgICAgIAogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgCiAgICB0aGlzLmNsaXBwZWRQb3MgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpOwogICAgICAgIGlmIChyb3cgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByb3cgPSBsZW5ndGg7CiAgICAgICAgfSBlbHNlIGlmIChyb3cgPCAwKSB7CiAgICAgICAgICAgIHJvdyA9IDA7CiAgICAgICAgfSBlbHNlIGlmIChyb3cgPj0gbGVuZ3RoKSB7CiAgICAgICAgICAgIHJvdyA9IGxlbmd0aCAtIDE7CiAgICAgICAgICAgIGNvbHVtbiA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgdmFyIGxpbmUgPSB0aGlzLmdldExpbmUocm93KTsKICAgICAgICBpZiAoY29sdW1uID09IHVuZGVmaW5lZCkKICAgICAgICAgICAgY29sdW1uID0gbGluZS5sZW5ndGg7CiAgICAgICAgY29sdW1uID0gTWF0aC5taW4oTWF0aC5tYXgoY29sdW1uLCAwKSwgbGluZS5sZW5ndGgpOwogICAgICAgIHJldHVybiB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTsKICAgIH07CiAgICAKICAgIHRoaXMuY2xvbmVQb3MgPSBmdW5jdGlvbihwb3MpIHsKICAgICAgICByZXR1cm4ge3JvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1ufTsKICAgIH07CiAgICAKICAgIHRoaXMucG9zID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4ge3Jvdzogcm93LCBjb2x1bW46IGNvbHVtbn07CiAgICB9OwogICAgCiAgICB0aGlzLiRjbGlwUG9zaXRpb24gPSBmdW5jdGlvbihwb3NpdGlvbikgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpOwogICAgICAgIGlmIChwb3NpdGlvbi5yb3cgPj0gbGVuZ3RoKSB7CiAgICAgICAgICAgIHBvc2l0aW9uLnJvdyA9IE1hdGgubWF4KDAsIGxlbmd0aCAtIDEpOwogICAgICAgICAgICBwb3NpdGlvbi5jb2x1bW4gPSB0aGlzLmdldExpbmUobGVuZ3RoIC0gMSkubGVuZ3RoOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHBvc2l0aW9uLnJvdyA9IE1hdGgubWF4KDAsIHBvc2l0aW9uLnJvdyk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IE1hdGgubWluKE1hdGgubWF4KHBvc2l0aW9uLmNvbHVtbiwgMCksIHRoaXMuZ2V0TGluZShwb3NpdGlvbi5yb3cpLmxlbmd0aCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBwb3NpdGlvbjsKICAgIH07CiAgICB0aGlzLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uKHJvdywgbGluZXMpIHsKICAgICAgICByb3cgPSBNYXRoLm1pbihNYXRoLm1heChyb3csIDApLCB0aGlzLmdldExlbmd0aCgpKTsKICAgICAgICB2YXIgY29sdW1uID0gMDsKICAgICAgICBpZiAocm93IDwgdGhpcy5nZXRMZW5ndGgoKSkgewogICAgICAgICAgICBsaW5lcyA9IGxpbmVzLmNvbmNhdChbIiJdKTsKICAgICAgICAgICAgY29sdW1uID0gMDsKICAgICAgICB9IGVsc2UgewogICA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uZC5yb3csIHJhbmdlLmVuZC5jb2x1bW4pOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgIGxpbmVzOiB0aGlzLmdldExpbmVzRm9yUmFuZ2Uoe3N0YXJ0OiBzdGFydCwgZW5kOiBlbmR9KQogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICB0aGlzLnJlbW92ZUluTGluZSA9IGZ1bmN0aW9uKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICAKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHtzdGFydDogc3RhcnQsIGVuZDogZW5kfSkKICAgICAgICB9LCB0cnVlKTsKICAgICAgICAKICAgICAgICByZXR1cm4gdGhpcy5jbG9uZVBvcyhzdGFydCk7CiAgICB9OwogICAgdGhpcy5yZW1vdmVGdWxsTGluZXMgPSBmdW5jdGlvbihmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGZpcnN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgZmlyc3RSb3cpLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7CiAgICAgICAgbGFzdFJvdyAgPSBNYXRoLm1pbihNYXRoLm1heCgwLCBsYXN0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LmVuZCwKICAgICAgICAgICAgYWN0aW9uOiAicmVtb3ZlIiwKICAgICAgICAgICAgbGluZXM6IHRoaXMuZ2V0TGluZXNGb3JSYW5nZShyYW5nZSkKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gZGVsZXRlZExpbmVzOwogICAgfTsKICAgIHRoaXMucmVtb3ZlTmV3TGluZSA9IGZ1bmN0aW9uKHJvdykgewogICAgICAgIGlmIChyb3cgPCB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiByb3cgPj0gMCkgewogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICAgICAgc3RhcnQ6IHRoaXMucG9zKHJvdywgdGhpcy5nZXRMaW5lKHJvdykubGVuZ3RoKSwKICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgMSwgMCksCiAgICAgICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICAgICAgbGluZXM6IFsiIiwgIiJdCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLnJlcGxhY2UgPSBmdW5jdGlvbihyYW5nZSwgdGV4dCkgewogICAgICAgIGlmICghKHJhbmdlIGluc3RhbmNlb2YgUmFuZ2UpKQogICAgICAgICAgICByYW5nZSA9IFJhbmdlLmZyb21Qb2ludHMocmFuZ2Uuc3RhcnQsIHJhbmdlLmVuZCk7CiAgICAgICAgaWYgKHRleHQubGVuZ3RoID09PSAwICYmIHJhbmdlLmlzRW1wdHkoKSkKICAgICAgICAgICAgcmV0dXJuIHJhbmdlLnN0YXJ0OwogICAgICAgIGlmICh0ZXh0ID09IHRoaXMuZ2V0VGV4dFJhbmdlKHJhbmdlKSkKICAgICAgICAgICAgcmV0dXJuIHJhbmdlLmVuZDsKCiAgICAgICAgdGhpcy5yZW1vdmUocmFuZ2UpOwogICAgICAgIHZhciBlbmQ7CiAgICAgICAgaWYgKHRleHQpIHsKICAgICAgICAgICAgZW5kID0gdGhpcy5pb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VsdGEoewogICAgICAgICAgICAgICAgc3RhcnQ6IHRoaXMucG9zKHJvdyArIGZyb20sIGNvbHVtbiksCiAgICAgICAgICAgICAgICBlbmQ6IHRoaXMucG9zKHJvdyArIHRvLCBjb2x1bW4gPSAwKSwKICAgICAgICAgICAgICAgIGFjdGlvbjogZGVsdGEuYWN0aW9uLAogICAgICAgICAgICAgICAgbGluZXM6IGNodW5rCiAgICAgICAgICAgIH0sIHRydWUpOwogICAgICAgIH0KICAgICAgICBkZWx0YS5saW5lcyA9IGxpbmVzLnNsaWNlKGZyb20pOwogICAgICAgIGRlbHRhLnN0YXJ0LnJvdyA9IHJvdyArIGZyb207CiAgICAgICAgZGVsdGEuc3RhcnQuY29sdW1uID0gY29sdW1uOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YShkZWx0YSwgdHJ1ZSk7CiAgICB9OwogICAgdGhpcy5yZXZlcnREZWx0YSA9IGZ1bmN0aW9uKGRlbHRhKSB7CiAgICAgICAgdGhpcy4kc2FmZUFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogdGhpcy5jbG9uZVBvcyhkZWx0YS5zdGFydCksCiAgICAgICAgICAgIGVuZDogdGhpcy5jbG9uZVBvcyhkZWx0YS5lbmQpLAogICAgICAgICAgICBhY3Rpb246IChkZWx0YS5hY3Rpb24gPT0gImluc2VydCIgPyAicmVtb3ZlIiA6ICJpbnNlcnQiKSwKICAgICAgICAgICAgbGluZXM6IGRlbHRhLmxpbmVzLnNsaWNlKCkKICAgICAgICB9KTsKICAgIH07CiAgICB0aGlzLmluZGV4VG9Qb3NpdGlvbiA9IGZ1bmN0aW9uKGluZGV4LCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICBmb3IgKHZ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dGlvbihhcnJheSl7CiAgICB2YXIgY29weSA9IFtdOwogICAgZm9yICh2YXIgaT0wLCBsPWFycmF5Lmxlbmd0aDsgaTxsOyBpKyspIHsKICAgICAgICBpZiAoYXJyYXlbaV0gJiYgdHlwZW9mIGFycmF5W2ldID09ICJvYmplY3QiKQogICAgICAgICAgICBjb3B5W2ldID0gdGhpcy5jb3B5T2JqZWN0KGFycmF5W2ldKTsKICAgICAgICBlbHNlIAogICAgICAgICAgICBjb3B5W2ldID0gYXJyYXlbaV07CiAgICB9CiAgICByZXR1cm4gY29weTsKfTsKCmV4cG9ydHMuZGVlcENvcHkgPSBmdW5jdGlvbiBkZWVwQ29weShvYmopIHsKICAgIGlmICh0eXBlb2Ygb2JqICE9PSAib2JqZWN0IiB8fCAhb2JqKQogICAgICAgIHJldHVybiBvYmo7CiAgICB2YXIgY29weTsKICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHsKICAgICAgICBjb3B5ID0gW107CiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHsKICAgICAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29weTsKICAgIH0KICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSAhPT0gIltvYmplY3QgT2JqZWN0XSIpCiAgICAgICAgcmV0dXJuIG9iajsKICAgIAogICAgY29weSA9IHt9OwogICAgZm9yICh2YXIga2V5IGluIG9iaikKICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICByZXR1cm4gY29weTsKfTsKCmV4cG9ydHMuYXJyYXlUb01hcCA9IGZ1bmN0aW9uKGFycikgewogICAgdmFyIG1hcCA9IHt9OwogICAgZm9yICh2YXIgaT0wOyBpPGFyci5sZW5ndGg7IGkrKykgewogICAgICAgIG1hcFthcnJbaV1dID0gMTsKICAgIH0KIC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IH0pOwoKICAgIHJldHVybiBtYXRjaGVzOwp9OwpleHBvcnRzLmRlZmVycmVkQ2FsbCA9IGZ1bmN0aW9uKGZjbikgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICBmY24oKTsKICAgIH07CgogICAgdmFyIGRlZmVycmVkID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIGRlZmVycmVkLmNhbmNlbCgpOwogICAgICAgIHRpbWVyID0gc2V0VGltZW91dChjYWxsYmFjaywgdGltZW91dCB8fCAwKTsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwoKICAgIGRlZmVycmVkLnNjaGVkdWxlID0gZGVmZXJyZWQ7CgogICAgZGVmZXJyZWQuY2FsbCA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKCiAgICBkZWZlcnJlZC5jYW5jZWwgPSBmdW5jdGlvbigpIHsKICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwogICAgCiAgICBkZWZlcnJlZC5pc1BlbmRpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwoKICAgIHJldHVybiBkZWZlcnJlZDsKfTsKCgpleHBvcnRzLmRlbGF5ZWRDYWxsID0gZnVuY3Rpb24oZmNuLCBkZWZhdWx0VGltZW91dCkgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICBmY24oKTsKICAgIH07CgogICAgdmFyIF9zZWxmID0gZnVuY3Rpb24odG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ID0gc2VuZGVyOwogICAgdmFyIGRvYyA9IHRoaXMuZG9jID0gbmV3IERvY3VtZW50KCIiKTsKICAgIAogICAgdmFyIGRlZmVycmVkVXBkYXRlID0gdGhpcy5kZWZlcnJlZFVwZGF0ZSA9IGxhbmcuZGVsYXllZENhbGwodGhpcy5vblVwZGF0ZS5iaW5kKHRoaXMpKTsKICAgIAogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHNlbmRlci5vbigiY2hhbmdlIiwgZnVuY3Rpb24oZSkgewogICAgICAgIHZhciBkYXRhID0gZS5kYXRhOwogICAgICAgIGlmIChkYXRhWzBdLnN0YXJ0KSB7CiAgICAgICAgICAgIGRvYy5hcHBseURlbHRhcyhkYXRhKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRhdGEubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGRhdGFbaSsxXSkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IHthY3Rpb246ICJpbnNlcnQiLCBzdGFydDogZGF0YVtpXSwgbGluZXM6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHZhciBkID0ge2FjdGlvbjogInJlbW92ZSIsIHN0YXJ0OiBkYXRhW2ldLCBlbmQ6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkb2MuYXBwbHlEZWx0YShkLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoX3NlbGYuJHRpbWVvdXQpCiAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZFVwZGF0ZS5zY2hlZHVsZShfc2VsZi4kdGltZW91dCk7CiAgICAgICAgX3NlbGYub25VcGRhdGUoKTsKICAgIH0pOwp9OwoKKGZ1bmN0aW9uKCkgewogICAgCiAgICB0aGlzLiR0aW1lb3V0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AgICBmOiAgICAnXGYnLAogICAgICAgICAgICBuOiAgICAnXG4nLAogICAgICAgICAgICByOiAgICAnXHInLAogICAgICAgICAgICB0OiAgICAnXHQnCiAgICAgICAgfSwKICAgICAgICB0ZXh0LAoKICAgICAgICBlcnJvciA9IGZ1bmN0aW9uIChtKSB7CgogICAgICAgICAgICB0aHJvdyB7CiAgICAgICAgICAgICAgICBuYW1lOiAgICAnU3ludGF4RXJyb3InLAogICAgICAgICAgICAgICAgbWVzc2FnZTogbSwKICAgICAgICAgICAgICAgIGF0OiAgICAgIGF0LAogICAgICAgICAgICAgICAgdGV4dDogICAgdGV4dAogICAgICAgICAgICB9OwogICAgICAgIH0sCgogICAgICAgIG5leHQgPSBmdW5jdGlvbiAoYykgewoKICAgICAgICAgICAgaWYgKGMgJiYgYyAhPT0gY2gpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJFeHBlY3RlZCAnIiArIGMgKyAiJyBpbnN0ZWFkIG9mICciICsgY2ggKyAiJyIpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBjaCA9IHRleHQuY2hhckF0KGF0KTsKICAgICAgICAgICAgYXQgKz0gMTsKICAgICAgICAgICAgcmV0dXJuIGNoOwogICAgICAgIH0sCgogICAgICAgIG51bWJlciA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBudW1iZXIsCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJzsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJy0nKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnLSc7CiAgICAgICAgICAgICAgICBuZXh0KCctJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICcuJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9ICcuJzsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkgJiYgY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICdlJyB8fCBjaCA9PT0gJ0UnKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICctJyB8fCBjaCA9PT0gJysnKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBudW1iZXIgPSArc3RyaW5nOwogICAgICAgICAgICBpZiAoaXNOYU4obnVtYmVyKSkgewogICAgICAgICAgICAgICAgZXJyb3IoIkJhZCBudW1iZXIiKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBzdHJpbmcgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgaGV4LAogICAgICAgICAgICAgICAgaSwKICAgICAgICAgICAgICAgIHN0cmluZyA9ICcnLAogICAgICAgICAgICAgICAgdWZmZmY7CgogICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgd2hpbGUgKG5leHQoKSkgewogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJyInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0cmluZzsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFwnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAndScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCA0OyBpICs9IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZXggPSBwYXJzZUludChuZXh0KCksIDE2KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzRmluaXRlKGhleCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gdWZmZmYgKiAxNiArIGhleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKHVmZmZmKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZXNjYXBlZVtjaF0gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gZXNjYXBlZVtjaF07CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT0gIlxuIiB8fCBjaCA9PSAiXHIiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBzdHJpbmciKTsKICAgICAgICB9LAoKICAgICAgICB3aGl0ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHdoaWxlIChjaCAmJiBjaCA8PSAnICcpIHsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIHdvcmQgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgICAgIGNhc2UgJ3QnOgogICAgICAgICAgICAgICAgbmV4dCgndCcpOwogICAgICAgICAgICAgICAgbmV4dCgncicpOwogICAgICAgICAgICAgICAgbmV4dCgndScpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIGNhc2UgJ2YnOgogICAgICAgICAgICAgICAgbmV4dCgnZicpOwogICAgICAgICAgICAgICAgbmV4dCgnYScpOwogICAgICAgICAgICAgICAgbmV4dCgnbCcpOwogICAgICAgICAgICAgICAgbmV4dCgncycpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICBjYXNlICduJzoKICAgICAgICAgICAgICAgIG5leHQoJ24nKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJVbmV4cGVjdGVkICciICsgY2ggKyAiJyIpOwogICAgICAgIH0sCgogICAgICAgIHZhbHVlLCAgLy8gUGxhY2UgaG9sZGVyIGZvciB0aGUgdmFsdWUgZnVuY3Rpb24uCgogICAgICAgIGFycmF5ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGFycmF5ID0gW107CgogICAgICAgICAgICBpZiAoY2ggPT09ICdbJykgewogICAgICAgICAgICAgICAgbmV4dCgnWycpOwogICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnXScpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsgICAvLyBlbXB0eSBhcnJheQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyYXkucHVzaCh2YWx1ZSgpKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFycmF5OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBuZXh0KCcsJyk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiQmFkIGFycmF5Iik7CiAgICAgICAgfSwKCiAgICAgICAgb2JqZWN0ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGtleSwKICAgICAgICAgICAgICAgIG9iamVjdCA9IHt9OwoKICAgICAgICAgICAgaWYgKGNoID09PSAneycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ3snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0OyAgIC8vIGVtcHR5IG9iamVjdAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAga2V5ID0gc3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBuZXh0KCc6Jyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwga2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICBlcnJvcignRHVwbGljYXRlIGtleSAiJyArIGtleSArICciJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG9iamVjdFtrZXldID0gdmFsdWUoKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ30nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBvYmplY3QiKTsKICAgICAgICB9OwoKICAgIHZhbHVlID0gZnVuY3Rpb24gKCkgewoKICAgICAgICB3aGl0ZSgpOwogICAgICAgIHN3aXRjaCAoY2gpIHsKICAgICAgICBjYXNlICd7JzoKICAgICAgICAgICAgcmV0dXJuIG9iamVjdCgpOwogICAgICAgIGNhc2UgJ1snOgogICAgICAgICAgICByZXR1cm4gYXJyYXkoKTsKICAgICAgICBjYXNlICciJzoKICAgICAgICAgICAgcmV0dXJuIHN0cmluZygpOwogICAgICAgIGNhc2UgJy0nOgogICAgICAgICAgICByZXR1cm4gbnVtYmVyKCk7CiAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgcmV0dXJuIGNoID49ICcwJyAmJiBjaCA8PSAnOScgPyBudW1iZXIoKSA6IHdvcmQoKTsKICAgICAgICB9CiAgICB9OwoKICAgIHJldHVybiBmdW5jdGlvbiAoc291cmNlLCByZXZpdmVyKSB7CiAgICAgICAgdmFyIHJlc3VsdDsKCiAgICAgICAgdGV4dCA9IHNvdXJjZTsKICAgICAgICBhdCA9IDA7CiAgICAgICAgY2ggPSAnICc7CiAgICAgICAgcmVzdWx0ID0gdmFsdWUoKTsKICAgICAgICB3aGl0ZSgpOwogICAgICAgIGlmIChjaCkgewogICAgICAgICAgICBlcnJvcigiU3ludGF4IGVycm9yIik7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdHlwZW9mIHJldml2ZXIgPT09ICdmdW5jdGlvbicgPyBmdW5jdGlvbiB3YWxrKGhvbGRlciwga2V5KSB7CiAgICAgICAgICAgIHZhciBrLCB2LCB2YWx1ZSA9IGhvbGRlcltrZXldOwogICAgICAgICAgICBpZiAodmFsdWUgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgZm9yIChrIGluIHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKHZhbHVlLCBrKSkgewogICAgICAgICAgICAgICAgICAgICAgICB2ID0gd2Fsayh2YWx1ZSwgayk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlW2tdID0gdjsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB2YWx1ZVtrXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmV2aXZlci5jYWxsKGhvbGRlciwga2V5LCB2YWx1ZSk7CiAgICAgICAgfSh7Jyc6IHJlc3VsdH0sICcnKSA6IHJlc3VsdDsKICAgIH07Cn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbl93b3JrZXIiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIG9vcCA9IHJlcXVpcmUoIi4uL2xpYi9vb3AiKTsKdmFyIE1pcnJvciA9IHJlcXVpcmUoIi4uL3dvcmtlci9taXJyb3IiKS5NaXJyb3I7CnZhciBwYXJzZSA9IHJlcXVpcmUoIi4vanNvbi9qc29uX3BhcnNlIik7Cgp2YXIgSnNvbldvcmtlciA9IGV4cG9ydHMuSnNvbldvcmtlciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgTWlycm9yLmNhbGwodGhpcywgc2VuZGVyKTsKICAgIHRoaXMuc2V0VGltZW91dCgyMDApOwp9OwoKb29wLmluaGVyaXRzKEpzb25Xb3JrZXIsIE1pcnJvcik7CgooZnVuY3Rpb24oKSB7CgogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB2YWx1ZSA9IHRoaXMuZG9jLmdldFZhbHVlKCk7CiAgICAgICAgdmFyIGVycm9ycyA9IFtdOwogICAgICAgIHRyeSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSkKICAgICAgICAgICAgICAgIHBhcnNlKHZhbHVlKTsKICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIHZhciBwb3MgPSB0aGlzLmRvYy5pbmRleFRvUG9zaXRpb24oZS5hdC0xKTsKICAgICAgICAgICAgZXJyb3JzLnB1c2goewogICAgICAgICAgICAgICAgcm93OiBwb3Mucm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBwb3MuY29sdW1uLAogICAgICAgICAgICAgICAgdGV4dDogZS5tZXNzYWdlLAogICAgICAgICAgICAgICAgdHlwZTogImVycm9yIgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgdGhpcy5zZW5kZXIuZW1pdCgiYW5ub3RhdGUiLCBlcnJvcnMpOwogICAgfTsKCn0pLmNhbGwoSnNvbldvcmtlci5wcm90b3R5cGUpOwoKfSk7Cg=="},7907:function(e,t,i){"use strict";function n(e){var t;e&&((t=a.find(function(t){return t===e}))?d=t:console.error("Language not found"))}function o(e){if(e)for(var t in e)!function(t){a.find(function(e){return e===t})||a.push(t),s[t]=Object.assign({},s[l],s[t],e[t])}(t)}function r(e,t,i){var n=s[i=i||d][e]||s[l][e]||e;if(t)for(var o in t)n=n.replace("${"+o+"}",t[o]);return n}i.d(t,{m0:function(){return n},cC:function(){return o},Iu:function(){return r}});var t=i(4987),s={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' después de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregará",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el menú de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + Mayús + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:"Haga clic para expandir/contraer este campo (Ctrl + E). \n Ctrl+Clic para expandir/contraer incluyendo todos los niños.",formatTitle:"Formatee los datos JSON, con la sangría y los avances de línea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+Mayús+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notación JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de búsqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar más",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dirección:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la última acción (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de sí mismo.",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Tipo de campo "objeto". Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz". Una matriz contiene una colección ordenada de valores.',stringType:'Tipo de campo "cadena". El tipo de campo no se determina a partir del valor, pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Codigo",modeCodeTitle:"Cambiar al resaltador de código",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Arbol",modeTreeTitle:"Cambiar al editor de árbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de árbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no validas",containsInvalidItems:"Contiene items no validos"},"zh-CN":{array:"数组",auto:"自动",appendText:"追加",appendTitle:"在此字段后追加一个类型为“auto”的新字段 (Ctrl+Shift+Ins)",appendSubmenuTitle:"选择要追加的字段类型",appendTitleAuto:"追加类型为“auto”的新字段 (Ctrl+Shift+Ins)",ascending:"升序",ascendingTitle:"升序排列${type}的子节点",actionsMenu:"点击打开动作菜单(Ctrl+M)",cannotParseFieldError:"无法将字段解析为JSON",cannotParseValueError:"无法将值解析为JSON",collapseAll:"缩进所有字段",compactTitle:"压缩JSON数据,删除所有空格 (Ctrl+Shift+I)",descending:"降序",descendingTitle:"降序排列${type}的子节点",drag:"拖拽移动该节点(Alt+Shift+Arrows)",duplicateKey:"重复键",duplicateText:"复制",duplicateTitle:"复制选中字段(Ctrl+D)",duplicateField:"复制该字段(Ctrl+D)",duplicateFieldError:"重复的字段名称",empty:"清空",expandAll:"展开所有字段",expandTitle:"点击 展开/收缩 该字段(Ctrl+E). \nCtrl+Click 展开/收缩 包含所有子节点.",formatTitle:"使用适当的缩进和换行符格式化JSON数据 (Ctrl+I)",insert:"插入",insertTitle:"在此字段前插入类型为“auto”的新字段 (Ctrl+Ins)",insertSub:"选择要插入的字段类型",object:"对象",ok:"Ok",redo:"重做 (Ctrl+Shift+Z)",removeText:"移除",removeTitle:"移除选中字段 (Ctrl+Del)",removeField:"移除该字段 (Ctrl+Del)",repairTitle:"修复JSON:修复引号和转义符,删除注释和JSONP表示法,将JavaScript对象转换为JSON。",selectNode:"选择一个节点...",showAll:"展示全部",showMore:"展示更多",showMoreStatus:"显示${totalChilds}的${visibleChilds}项目.",sort:"排序",sortTitle:"排序${type}的子节点",sortTitleShort:"内容排序",sortFieldLabel:"字段:",sortDirectionLabel:"方向:",sortFieldTitle:"选择用于对数组或对象排序的嵌套字段",sortAscending:"升序排序",sortAscendingTitle:"按照该字段升序排序",sortDescending:"降序排序",sortDescendingTitle:"按照该字段降序排序",string:"字符串",transform:"变换",transformTitle:"筛选,排序,或者转换${type}的子节点",transformTitleShort:"筛选,排序,或者转换内容",extract:"提取",extractTitle:"提取这个 ${type}",transformQueryTitle:"输入JMESPath查询",transformWizardLabel:"向导",transformWizardFilter:"筛选",transformWizardSortBy:"排序",transformWizardSelectFields:"选择字段",transformQueryLabel:"查询",transformPreviewLabel:"预览",type:"类型",typeTitle:"更改字段类型",openUrl:"Ctrl+Click 或者 Ctrl+Enter 在新窗口打开链接",undo:"撤销上次动作 (Ctrl+Z)",validationCannotMove:"无法将字段移入其子节点",autoType:'字段类型 "auto". 字段类型由值自动确定 可以为 string,number,boolean,或者 null.',objectType:'字段类型 "object". 对象包含一组无序的键/值对.',arrayType:'字段类型 "array". 数组包含值的有序集合.',stringType:'字段类型 "string". 字段类型由值自动确定,但始终作为字符串返回.',modeCodeText:"代码",modeCodeTitle:"切换至代码高亮",modeFormText:"表单",modeFormTitle:"切换至表单编辑",modeTextText:"文本",modeTextTitle:"切换至文本编辑",modeTreeText:"树",modeTreeTitle:"切换至树编辑",modeViewText:"视图",modeViewTitle:"切换至树视图",modePreviewText:"预览",modePreviewTitle:"切换至预览模式",examples:"例子",default:"缺省",containsInvalidProperties:"包含无效的属性",containsInvalidItems:"包含无效项目"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de ações (Ctrl+M)",cannotParseFieldError:"Não é possível analisar o campo no JSON",cannotParseValueError:"Não é possível analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espaços em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:"Clique para expandir/encolher este campo (Ctrl+E). \nCtrl+Click para expandir/encolher incluindo todos os filhos.",formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova comentários e notação JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um nódulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direção:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conteúdos",transformQueryTitle:"Insira uma expressão JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Expressão",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer último ação (Ctrl+Z)",validationCannotMove:"Não pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo é determinao automaticamente a partir do seu valor e pode ser texto, número, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto contém uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma coleção de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao é determinado através do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Contém propriedades inválidas",containsInvalidItems:"Contém itens inválidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alanın altına 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alanın tipini seç",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'ın alt tiplerini artan düzende sırala",actionsMenu:"Aksiyon menüsünü açmak için tıklayın (Ctrl+M)",collapseAll:"Tüm alanları kapat",descending:"Azalan",descendingTitle:"${type}'ın alt tiplerini azalan düzende sırala",drag:"Bu alanı taşımak için sürükleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"Aşağıya kopyala",duplicateTitle:"Seçili alanlardan bir daha oluştur (Ctrl+D)",duplicateField:"Bu alandan bir daha oluştur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayrıştırılamıyor",cannotParseValueError:"JSON'a değer ayrıştırılamıyor",empty:"boş",expandAll:"Tüm alanları aç",expandTitle:"Bu alanı açmak/kapatmak için tıkla (Ctrl+E). \nAlt alanlarda dahil tüm alanları açmak için Ctrl+Click ",insert:"Ekle",insertTitle:"Bu alanın üstüne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alanın tipini seç",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kaldır",removeTitle:"Seçilen alanları kaldır (Ctrl+Del)",removeField:"Bu alanı kaldır (Ctrl+Del)",selectNode:"Bir nesne seç...",showAll:"tümünü göster",showMore:"daha fazla göster",showMoreStatus:"${totalChilds} alanın ${visibleChilds} alt alanları gösteriliyor",sort:"Sırala",sortTitle:"${type}'ın alt alanlarını sırala",sortTitleShort:"İçerikleri sırala",sortFieldLabel:"Alan:",sortDirectionLabel:"Yön:",sortFieldTitle:"Diziyi veya nesneyi sıralamak için iç içe geçmiş alanı seçin",sortAscending:"Artan",sortAscendingTitle:"Seçili alanı artan düzende sırala",sortDescending:"Azalan",sortDescendingTitle:"Seçili alanı azalan düzende sırala",string:"Karakter Dizisi",transform:"Dönüştür",transformTitle:"${type}'ın alt alanlarını filtrele, sırala veya dönüştür",transformTitleShort:"İçerikleri filterele, sırala veya dönüştür",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"Sırala",transformWizardSelectFields:"Alanları seç",transformQueryLabel:"Sorgu",transformPreviewLabel:"Önizleme",type:"Tip",typeTitle:"Bu alanın tipini değiştir",openUrl:"URL'i yeni bir pencerede açmak için Ctrl+Click veya Ctrl+Enter",undo:"Son değişikliği geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak taşınamıyor",autoType:'Alan tipi "otomatik". Alan türü otomatik olarak değerden belirlenirve bir dize, sayı, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, sıralanmamış bir anahtar / değer çifti kümesi içerir.',arrayType:'Alan tipi "dizi". Bir dizi, düzenli değerler koleksiyonu içerir.',stringType:'Alan tipi "karakter dizisi". Alan türü değerden belirlenmez,ancak her zaman karakter dizisi olarak döndürülür.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulayıcıya geç",modeFormText:"Form",modeFormTitle:"Form düzenleyiciye geç",modeTextText:"Metin",modeTextTitle:"Düz metin düzenleyiciye geç",modeTreeText:"Ağaç",modeTreeTitle:"Ağaç düzenleyiciye geç",modeViewText:"Görünüm",modeViewTitle:"Ağaç görünümüne geç",examples:"Örnekler",default:"Varsayılan",containsInvalidProperties:"Geçersiz özellikler içeriyor",containsInvalidItems:"Geçersiz öğeler içeriyor"},ja:{array:"配列",auto:"オート",appendText:"追加",appendTitle:'次のフィールドに"オート"のフィールドを追加 (Ctrl+Shift+Ins)',appendSubmenuTitle:"追加するフィールドの型を選択してください",appendTitleAuto:'"オート"のフィールドを追加 (Ctrl+Shift+Ins)',ascending:"昇順",ascendingTitle:"${type}の子要素を昇順に並べ替え",actionsMenu:"クリックしてアクションメニューを開く (Ctrl+M)",collapseAll:"すべてを折りたたむ",descending:"降順",descendingTitle:"${type}の子要素を降順に並べ替え",drag:"ドラッグして選択中のフィールドを移動 (Alt+Shift+Arrows)",duplicateKey:"複製キー",duplicateText:"複製",duplicateTitle:"選択中のフィールドを複製 (Ctrl+D)",duplicateField:"選択中のフィールドを複製 (Ctrl+D)",duplicateFieldError:"フィールド名が重複しています",cannotParseFieldError:"JSONのフィールドを解析できません",cannotParseValueError:"JSONの値を解析できません",empty:"空",expandAll:"すべてを展開",expandTitle:"クリックしてフィールドを展開/折りたたむ (Ctrl+E). \nCtrl+Click ですべての子要素を展開/折りたたむ",insert:"挿入",insertTitle:"選択中のフィールドの前に新しいフィールドを挿入 (Ctrl+Ins)",insertSub:"挿入するフィールドの型を選択",object:"オブジェクト",ok:"実行",redo:"やり直す (Ctrl+Shift+Z)",removeText:"削除",removeTitle:"選択中のフィールドを削除 (Ctrl+Del)",removeField:"選択中のフィールドを削除 (Ctrl+Del)",selectNode:"ノードを選択...",showAll:"すべてを表示",showMore:"もっと見る",showMoreStatus:"${totalChilds}個のアイテムのうち ${visibleChilds}個を表示しています。",sort:"並べ替え",sortTitle:"${type}の子要素を並べ替え",sortTitleShort:"並べ替え",sortFieldLabel:"フィールド:",sortDirectionLabel:"順序:",sortFieldTitle:"配列またはオブジェクトを並び替えるためのフィールドを選択",sortAscending:"昇順",sortAscendingTitle:"選択中のフィールドを昇順に並び替え",sortDescending:"降順",sortDescendingTitle:"選択中のフィールドを降順に並び替え",string:"文字列",transform:"変換",transformTitle:"${type}の子要素をフィルター・並び替え・変換する",transformTitleShort:"内容をフィルター・並び替え・変換する",extract:"抽出",extractTitle:"${type}を抽出",transformQueryTitle:"JMESPathクエリを入力",transformWizardLabel:"ウィザード",transformWizardFilter:"フィルター",transformWizardSortBy:"並び替え",transformWizardSelectFields:"フィールドを選択",transformQueryLabel:"クエリ",transformPreviewLabel:"プレビュー",type:"型",typeTitle:"選択中のフィールドの型を変更",openUrl:"Ctrl+Click または Ctrl+Enter で 新規ウィンドウでURLを開く",undo:"元に戻す (Ctrl+Z)",validationCannotMove:"子要素に移動できません ",autoType:"オート: フィールドの型は値から自動的に決定されます。 (文字列・数値・ブール・null)",objectType:"オブジェクト: オブジェクトは順序が決まっていないキーと値のペア組み合わせです。",arrayType:"配列: 配列は順序が決まっている値の集合体です。",stringType:"文字列: フィールド型は値から決定されませんが、常に文字列として返されます。",modeCodeText:"コードモード",modeCodeTitle:"ハイライトモードに切り替え",modeFormText:"フォームモード",modeFormTitle:"フォームモードに切り替え",modeTextText:"テキストモード",modeTextTitle:"テキストモードに切り替え",modeTreeText:"ツリーモード",modeTreeTitle:"ツリーモードに切り替え",modeViewText:"ビューモード",modeViewTitle:"ビューモードに切り替え",modePreviewText:"プレビュー",modePreviewTitle:"プレビューに切り替え",examples:"例",default:"デフォルト",containsInvalidProperties:"無効なプロパティが含まれています",containsInvalidItems:"無効なアイテムが含まれています"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' après ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"Sélectionner le type du champ à ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"Déplacer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la clé",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs sélectionnés (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible à parser en JSON",cannotParseValueError:"Valeur impossible à parser en JSON",empty:"vide",expandAll:"Étendre",expandTitle:"Étendre/regrouper ce champ (Ctrl+E). \nCtrl+Click pour étendre/regrouper avec tous les champs.",insert:"Insérer",insertTitle:"Insérer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"Sélectionner le type de champ à insérer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs sélectionnés (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"Résultat suivant (Enter)",searchPreviousResultTitle:"Résultat précédent (Shift + Enter)",selectNode:"Sélectionner un nœud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} éléments affichés de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"Sélectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs sélectionnés par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs sélectionnés par ordre descendant",string:"Chaîne",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requête JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"Sélectionner les champs",transformQueryLabel:"Requête",transformPreviewLabel:"Prévisualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fenêtre",undo:"Annuler la dernière action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement déterminé en fonction de la valeur et peut être de type "chaîne", "nombre", "booléen" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonné de paires clé/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonnée de valeurs.',stringType:'Champ de type "chaîne". Ce type de champ n\'est pas déterminé en fonction de la valeur, mais retourne systématiquement une chaîne de caractères.',modeEditorTitle:"Changer mode d'édition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer éditeur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer éditeur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Prévisualisation",modePreviewTitle:"Activer mode prévisualiser",examples:"Exemples",default:"Défaut",containsInvalidProperties:"Contient des propriétés non valides",containsInvalidItems:"Contient des éléments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anhängen",appendTitle:"Fügen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"Wählen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzufügen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum Öffnen des Aktionsmenüs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schlüssel",duplicateText:"Duplikat",duplicateTitle:"Ausgewählte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:"Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E). \nStrg+Klicken Sie, um dieses Feld einschließlich aller Elemente zu erweitern/zu kollabieren.",formatTitle:"JSON-Daten mit korrekter Einrückung und Zeilenvorschüben formatieren (Strg+\\)",insert:"einfügen",insertTitle:"Fügen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"Wählen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgewählte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anführungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"Nächstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"Wählen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"Wählen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgewählte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgewählte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder auswählen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie ein.",typeTitle:"Ändern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu öffnen",undo:"Letzte Aktion rückgängig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enthält eine ungeordnete Menge von Schlüssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enthält eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zurückgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor für einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardmäßig",containsInvalidProperties:"Enthält ungültige Eigenschaften",containsInvalidItems:"Enthält ungültige Elemente"},ru:{array:"Массив",auto:"Авто",appendText:"Добавить",appendTitle:"Добавить новое поле с типом 'авто' после этого поля (Ctrl+Shift+Ins)",appendSubmenuTitle:"Выбрать тип поля для добавления",appendTitleAuto:"Добавить новое поле с типом 'авто' (Ctrl+Shift+Ins)",ascending:"По возрастанию",ascendingTitle:"Сортировать ${type} по возрастанию",actionsMenu:"Нажмите для открытия меню действий (Ctrl+M)",cannotParseFieldError:"Невозможно преобразовать поле в JSON",cannotParseValueError:"Невозможно преобразовать значение в JSON",collapseAll:"Свернуть все",compactTitle:"Минификация JSON (Ctrl+Shift+I)",descending:"По убыванию",descendingTitle:"Сортировать ${type} по убыванию",drag:"Потяните для перемещения этого поля (Alt+Shift+Arrows)",duplicateKey:"повторяющийся ключ",duplicateText:"Дублировать",duplicateTitle:"Дублирование полей (Ctrl+D)",duplicateField:"Дублировать поле (Ctrl+D)",duplicateFieldError:"Дублирование названия поля",empty:"пустой",expandAll:"Развернуть все",expandTitle:"Нажмите для раскрытия/скрытия поля (Ctrl+E)\nили Ctrl+Click для раскрытия/скрытия всех потомков.",formatTitle:"Форматирование JSON (Ctrl+I)",insert:"Вставить",insertTitle:"Вставить новое поле с типом 'авто' перед этим полем (Ctrl+Ins)",insertSub:"Выбрать тип поля для вставки",object:"Объект",ok:"ОК",redo:"Повторить (Ctrl+Shift+Z)",removeText:"Удалить",removeTitle:"Удалить выбранные поля (Ctrl+Del)",removeField:"Удалить поле (Ctrl+Del)",repairTitle:"Восстановите JSON: исправьте кавычки и escape-символы, удалите комментарии и нотацию JSONP, модифицируйте объекты JavaScript в JSON.",searchTitle:"Поиск",searchNextResultTitle:"Следующий результат (Enter)",searchPreviousResultTitle:"Предыдущий результат (Shift + Enter)",selectNode:"Выбор узла...",showAll:"показать все",showMore:"больше",showMoreStatus:"${visibleChilds} из ${totalChilds}",sort:"Сортировка",sortTitle:"Сортировка потомков типа ${type}",sortTitleShort:"Сортировка содержимого",sortFieldLabel:"Поле:",sortDirectionLabel:"Направление:",sortFieldTitle:"Выберите поле для сортировки массива или объекта",sortAscending:"По возрастанию",sortAscendingTitle:"Сортировка выбранного поря по возрастанию",sortDescending:"По убыванию",sortDescendingTitle:"Сортировка выбранного поря по убыванию",string:"Строка",transform:"Модификация",transformTitle:"Фильтрация, сортировка или модификация данных типа ${type}",transformTitleShort:"Фильтрация, сортировка или модификация данных",extract:"Извлечение",extractTitle:"Извлечь тип ${type}",transformQueryTitle:"Введите JMESpath запрос",transformWizardLabel:"Мастер",transformWizardFilter:"Фильтр",transformWizardSortBy:"Сортировка",transformWizardSelectFields:"Поля",transformQueryLabel:"Запрос",transformPreviewLabel:"Просмотр",type:"Тип",typeTitle:"Изменить тип этого поля",openUrl:"Ctrl+Click или Ctrl+Enter для открытия url в новом окне",undo:"Отменить (Ctrl+Z)",validationCannotMove:"Поле не может быть перемещено в потомка",autoType:"Тип поля автоматически определяется по значению и может быть строкой, числом, логическим значением или null.",objectType:"Объект содержит неупорядоченный набор пар ключ/значение.",arrayType:"Массив содержит упорядоченный набор значений.",stringType:"Тип поля не определяется из значения, но всегда возвращается как строка.",modeEditorTitle:"Переключение режима редактора",modeCodeText:"Код",modeCodeTitle:"Переключить в режим редактора кода",modeFormText:"Форма",modeFormTitle:"Переключить в режим формы",modeTextText:"Текст",modeTextTitle:"Переключить в режим редактора текста",modeTreeText:"Дерево",modeTreeTitle:"Переключить в режим редактора дерева",modeViewText:"Просмотр дерева",modeViewTitle:"Переключить в режим просмотра дерева",modePreviewText:"Просмотр",modePreviewTitle:"Переключить в режим просмотра",examples:"Примеры",default:"По умолчанию",containsInvalidProperties:"Содержит недопустимые свойства",containsInvalidItems:"Содержит недопустимые элементы"},ko:{array:"배열",auto:"자동",appendText:"추가",appendTitle:'선택한 요소 아래에 "자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',appendSubmenuTitle:"추가할 요소의 유형을 선택해주세요.",appendTitleAuto:'"자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',ascending:"오름차순",ascendingTitle:"선택한 ${type}의 하위 요소를 오름차순 정렬합니다.",actionsMenu:"메뉴 열기 (Ctrl + M)",cannotParseFieldError:"JSON의 요소를 해석할 수 없습니다.",cannotParseValueError:"JSON의 값을 해석할 수 없습니다.",collapseAll:"모두 접기",compactTitle:"모든 공백을 제거하여 JSON 데이터를 작게 만듭니다. (Ctrl + Shift + I)",descending:"내림차순",descendingTitle:"선택한 ${type}의 하위 요소를 내림차순으로 정렬",drag:"드래그하여 요소를 이동합니다. (Alt + Shift + Arrows)",duplicateKey:"복제키",duplicateText:"복제",duplicateTitle:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateField:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateFieldError:"요소 이름이 중복되었습니다.",empty:"비어있음",expandAll:"모두 열기",expandTitle:"클릭하여 요소를 열거나 닫습니다. (Ctrl + E) \nCtrl + Click으로 모든 하위 요소를 열거나 닫습니다.",formatTitle:"적절한 들여쓰기 및 줄바꿈으로 JSON 데이터를 정형화합니다. (Ctrl + I)",insert:"삽입",insertTitle:"선택한 요소 위에 새요소를 삽입합니다. (Ctrl + Ins)",insertSub:"삽입할 요소의 유형을 선택해주세요.",object:"객체",ok:"확인",redo:"다시 실행 (Ctrl + Shift + Z)",removeText:"삭제",removeTitle:"선택한 요소를 삭제합니다. (Ctrl + Del)",removeField:"선택한 요소를 삭제합니다. (Ctrl + Del)",repairTitle:"JSON 교정: JSON 내의 주석과 JSONP 표기법을 지우고 따옴표와 이스케이프 문자를 수정합니다.",searchTitle:"요소 또는 값 찾기",searchNextResultTitle:"다음으로 찾기 (Enter)",searchPreviousResultTitle:"이전으로 찾기 (Shift + Enter)",selectNode:"요소를 선택해주세요...",showAll:"모두보기",showMore:"더보기",showMoreStatus:"${totalChilds} 개의 항목 중 ${visibleChilds} 개를 표시합니다.",sort:"정렬",sortTitle:"선택한 ${type}의 하위 요소를 정렬합니다.",sortTitleShort:"정렬",sortFieldLabel:"요소:",sortDirectionLabel:"순서:",sortFieldTitle:"배열이나 객체를 정렬하는 요소를 선택해주세요.",sortAscending:"오름차순",sortAscendingTitle:"선택한 요소를 오름차순으로 정렬합니다.",sortDescending:"내림차순",sortDescendingTitle:"선택한 요소를 내림차순으로 정렬합니다.",string:"문자",transform:"변환",transformTitle:"선택한 ${type}의 하위 요소를 필터하거나 정렬 또는 변환합니다.",transformTitleShort:"내용을 필터하거나 정렬 또는 변환합니다.",extract:"추출",extractTitle:"선택한 ${type}의 값을 최상위에 위치시킵니다.",transformQueryTitle:"JMESPath 쿼리를 입력해주세요.",transformWizardLabel:"마법사",transformWizardFilter:"필터",transformWizardSortBy:"정렬",transformWizardSelectFields:"요소를 선택해주세요.",transformQueryLabel:"쿼리",transformPreviewLabel:"미리보기",type:"유형",typeTitle:"선택한 요소의 유형을 변경합니다.",openUrl:"Ctrl + Click 또는 Ctrl + Enter로 새 창에서 URL 열기",undo:"실행 취소 (Ctrl + Z)",validationCannotMove:"하위 요소로 이동할 수 없습니다.",autoType:"자동: 요소의 형식이 값의 유형으로 결정됩니다. 문자, 숫자, 부울, 또는 null만 허용됩니다.",objectType:"객체: 순서대로 나열되지 않은 이름/값 쌍으로 이루어진 집합입니다.",arrayType:"배열: 순서대로 나열된 값의 집합입니다.",stringType:"문자: 요소의 유형이 값에서 결정되지 않지만 항상 문자로 반환됩니다.",modeEditorTitle:"편집기 유형 변경",modeCodeText:"코드",modeCodeTitle:"형식 교정을 도와주는 기능이 포함된 문자 편집기",modeFormText:"입력 양식",modeFormTitle:"정해진 요소에 값을 입력하는 편집기",modeTextText:"문자",modeTextTitle:"단순 문자 편집기",modeTreeText:"트리",modeTreeTitle:"트리 구조로 표시되는 편집기",modeViewText:"보기",modeViewTitle:"읽기전용 트리 구조로 JSON을 표시",modePreviewText:"미리보기",modePreviewTitle:"읽기전용 문자로 JSON을 표시",examples:"예제",default:"기본값",containsInvalidProperties:"잘못된 속성이 포함되어 있습니다.",containsInvalidItems:"잘못된 항목이 포함되어 있습니다"}},a=Object.keys(s),l="en",c="undefined"!=typeof navigator?navigator.language||navigator.userLanguage:void 0,d=a.find(function(e){return e===c})||l},6056:function(e,t,i){"use strict";function n(e,t){var i=t.sort,n=t.filter,o=t.projection,r="";return n?(t="@"!==n.field?["0"].concat((0,s.parsePath)("."+n.field)):["0"],t="string"==typeof(0,s.get)(e,t)?n.value:(0,s.parseString)(n.value),r+="[? "+n.field+" "+n.relation+" `"+JSON.stringify(t)+"`]"):r+=Array.isArray(e)?"[*]":"@",i&&("desc"===i.direction?r+=" | reverse(sort_by(@, &"+i.field+"))":r+=" | sort_by(@, &"+i.field+")"),o&&("]"!==r[r.length-1]&&(r+=" | [*]"),1===o.fields.length?r+="."+o.fields[0]:1<o.fields.length&&(r+=".{"+o.fields.map(function(e){var t=e.split(".");return t[t.length-1]+": "+e}).join(", ")+"}")),r}function o(e,t){return r().search(e,t)}i.d(t,{r:function(){return n},J:function(){return o}});var t=i(5156),r=i.n(t),s=i(9791)},4987:function(){function e(e){"remove"in e||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){void 0!==this.parentNode&&this.parentNode.removeChild(this)}})}"undefined"!=typeof Element&&(void 0!==window.Element&&e(window.Element.prototype),void 0!==window.CharacterData&&e(window.CharacterData.prototype),void 0!==window.DocumentType&&e(window.DocumentType.prototype)),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){for(var t=0;t<this.length;t++){var i=this[t];if(e.call(this,i,t,this))return t}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){return e=this.findIndex(e),this[e]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.r(t),i.d(t,{previewModeMixins:function(){return m}});var t=i(8909),o=i.n(t),r=i(4188),s=i(6436),a=i(2474),l=function(){function e(t,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onChange=t,this.calculateItemSize=i||function(){return 1},this.limit=n,this.items=[],this.index=-1}var t,i;return t=e,(i=[{key:"add",value:function(e){for(;this._calculateHistorySize()>this.limit&&1<this.items.length;)this.items.shift(),this.index--;this.items=this.items.slice(0,this.index+1),this.items.push(e),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var e=this.calculateItemSize,t=0;return this.items.forEach(function(i){t+=e(i)}),t}},{key:"undo",value:function(){if(this.canUndo())return this.index--,this.onChange(),this.items[this.index]}},{key:"redo",value:function(){if(this.canRedo())return this.index++,this.onChange(),this.items[this.index]}},{key:"canUndo",value:function(){return 0<this.index}},{key:"canRedo",value:function(){return this.index<this.items.length-1}},{key:"clear",value:function(){this.items=[],this.index=-1,this.onChange()}}])&&n(t.prototype,i),e}(),c=i(7907),d=i(6056),h=i(6617),u=i(6210),g=i(2558),t=i(5956),p=i(9791),i=t.textModeMixins[0].mixin,t={create:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};void 0===t.statusBar&&(t.statusBar=!0),t.mainMenuBar=!1!==t.mainMenuBar,t.enableSort=!1!==t.enableSort,t.enableTransform=!1!==t.enableTransform,t.createQuery=t.createQuery||d.r,t.executeQuery=t.executeQuery||d.J,"number"==typeof(this.options=t).indentation?this.indentation=Number(t.indentation):this.indentation=2,(0,c.cC)(this.options.languages),(0,c.m0)(this.options.language),this.mode="preview";var i=this;this.container=e,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,p.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(e){e.preventDefault()};var n,e={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new a.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.dom.busy=document.createElement("div"),this.dom.busy.className="jsoneditor-busy",this.dom.busyContent=document.createElement("span"),this.dom.busyContent.textContent="busy...",this.dom.busy.appendChild(this.dom.busyContent),this.content.appendChild(this.dom.busy),this.dom.previewContent=document.createElement("pre"),this.dom.previewContent.className="jsoneditor-preview",this.dom.previewText=document.createTextNode(""),this.dom.previewContent.appendChild(this.dom.previewText),this.content.appendChild(this.dom.previewContent),this.options.mainMenuBar&&((0,p.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,c.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){i.executeWithBusyMessage(function(){try{i.format()}catch(e){i._onError(e)}},"formatting...")},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,c.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){i.executeWithBusyMessage(function(){try{i.compact()}catch(e){i._onError(e)}},"compacting...")},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,c.Iu)("sortTitleShort"),e.onclick=function(){i._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((n=document.createElement("button")).type="button",n.title=(0,c.Iu)("transformTitleShort"),n.className="jsoneditor-transform",n.onclick=function(){i._showTransformModal()},this.dom.transform=n,this.menu.appendChild(n)),(n=document.createElement("button")).type="button",n.className="jsoneditor-repair",n.title=(0,c.Iu)("repairTitle"),this.menu.appendChild(n),!(n.onclick=function(){void 0===i.json&&i.executeWithBusyMessage(function(){try{i.repair()}catch(e){i._onError(e)}},"repairing...")})!==this.options.history&&(this.history=new l(function(){i.dom.undo.disabled=!i.history.canUndo(),i.dom.redo.disabled=!i.history.canRedo()},function(e){return 2*e.text.length},r.oW),(n=document.createElement("button")).type="button",n.className="jsoneditor-undo jsoneditor-separator",n.title=(0,c.Iu)("undo"),n.onclick=function(){var e=i.history.undo();e&&i._applyHistory(e)},this.menu.appendChild(n),this.dom.undo=n,(n=document.createElement("button")).type="button",n.className="jsoneditor-redo",n.title=(0,c.Iu)("redo"),n.onclick=function(){var e=i.history.redo();e&&i._applyHistory(e)},this.menu.appendChild(n),this.dom.redo=n,this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new h.x(this.menu,this.options.modes,this.options.mode,function(e){i.setMode(e),i.modeSwitcher.focus()}))),this.errorTable=new s.Q({errorTableVisible:!0,onToggleVisibility:function(){i.validate()},onFocusLine:null,onChangeHeight:function(e){e=e+(i.dom.statusBar?i.dom.statusBar.clientHeight:0)+1,i.content.style.marginBottom=-e+"px",i.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),t.statusBar&&((0,p.addClassName)(this.content,"has-status-bar"),t=document.createElement("div"),(this.dom.statusBar=t).className="jsoneditor-statusbar",this.frame.appendChild(t),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",t.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",t.appendChild(this.dom.arrayInfo),t.appendChild(this.errorTable.getErrorCounter()),t.appendChild(this.errorTable.getWarningIcon()),t.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var e=this.getText();this.dom.previewText.nodeValue=(0,p.limitCharacters)(e,r.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,p.formatSize)(e.length)),this.dom.arrayInfo&&(Array.isArray(this.json)?this.dom.arrayInfo.innerText="Array: "+this.json.length+" items":this.dom.arrayInfo.innerText="")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}};t._showSortModal=function(){var e=this;this.executeWithBusyMessage(function(){var t=e.options.modalAnchor||r.qD,i=e.get();e._renderPreview(),(0,u.showSortModal)(t,i,function(t){e.executeWithBusyMessage(function(){var n,o,r;n=i,o=t,Array.isArray(n)&&(r=(0,p.sort)(n,o.path,o.direction),e.sortedBy=o,e._setAndFireOnChange(r)),(0,p.isObject)(n)&&(n=(0,p.sortObjectKeys)(n,o.direction),e.sortedBy=o,e._setAndFireOnChange(n))},"sorting...")},e.sortedBy)},"parsing...")},t._showTransformModal=function(){var e=this;this.executeWithBusyMessage(function(){var t=e.options,i=t.createQuery,n=t.executeQuery,o=t.modalAnchor,t=t.queryDescription,s=e.get();e._renderPreview(),(0,g.showTransformModal)({container:o||r.qD,json:s,queryDescription:t,createQuery:i,executeQuery:n,onTransform:function(t){e.executeWithBusyMessage(function(){var i=n(s,t);e._setAndFireOnChange(i)},"transforming...")}})},"parsing...")},t.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this._debouncedValidate=null,this.history&&(this.history.clear(),this.history=null),this.frameFocusTracker.destroy()},t.compact=function(){var e=this.get(),t=JSON.stringify(e);this._setTextAndFireOnChange(t,e)},t.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this._setTextAndFireOnChange(t,e)},t.repair=function(){var e=this.getText();try{var t=o()(e);this._setTextAndFireOnChange(t)}catch(e){}},t.focus=function(){this.dom.transform.focus()},t.set=function(e){this.history&&this.history.clear(),this._set(e)},t.update=function(e){this._set(e)},t._set=function(e){this.text=void 0,this.json=e,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},t._setAndFireOnChange=function(e){this._set(e),this._onChange()},t.get=function(){var e;return void 0===this.json&&(e=this.getText(),this.json=(0,p.parse)(e)),this.json},t.getText=function(){return void 0===this.text&&(this.text=JSON.stringify(this.json,null,this.indentation),!0===this.options.escapeUnicode&&(this.text=(0,p.escapeUnicodeChars)(this.text))),this.text},t.setText=function(e){this.history&&this.history.clear(),this._setText(e)},t.updateText=function(e){this.getText()!==e&&this._setText(e)},t._setText=function(e,t){var i;!0===this.options.escapeUnicode?this.text=(0,p.escapeUnicodeChars)(e):this.text=e,this.json=t,this._renderPreview(),void 0===this.json?(i=this).executeWithBusyMessage(function(){try{i.json=i.get(),i._renderPreview(),i._pushHistory()}catch(e){}},"parsing..."):this._pushHistory(),this._debouncedValidate()},t._setTextAndFireOnChange=function(e,t){this._setText(e,t),this._onChange()},t._applyHistory=function(e){this.json=e.json,this.text=e.text,this._renderPreview(),this._debouncedValidate()},t._pushHistory=function(){var e;this.history&&(e={text:this.text,json:this.json},this.history.add(e))},t.executeWithBusyMessage=function(e,t){var i;this.getText().length>r.EX?((0,p.addClassName)((i=this).frame,"busy"),i.dom.busyContent.innerText=t,setTimeout(function(){e(),(0,p.removeClassName)(i.frame,"busy"),i.dom.busyContent.innerText=""},100)):e()},t.validate=i.validate,t._renderErrors=i._renderErrors;var m=[{mode:"preview",mixin:t,data:"json"}]},6210:function(e,t,i){"use strict";function n(e,t,i,n){var a=Array.isArray(t)?(0,s.getChildPaths)(t):[""],l=n&&n.path&&(0,s.contains)(a,n.path)?n.path:a[0],c=n&&n.direction||"asc",n='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,r.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,r.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,r.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,r.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,r.Iu)("sortAscending")+'" title="'+(0,r.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,r.Iu)("sortDescending")+'" title="'+(0,r.Iu)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/> </div> </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,r.Iu)("ok")+'" /></td></tr></tbody></table></form></div>';o()({parent:e,content:n,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(e){function t(e){s.value=e,s.className="jsoneditor-button-group jsoneditor-button-group-value-"+s.value}var n=e.modalElem().querySelector("form"),o=e.modalElem().querySelector("#ok"),r=e.modalElem().querySelector("#field"),s=e.modalElem().querySelector("#direction");a.forEach(function(e){var t,i=document.createElement("option");i.text=""===(t=e)?"@":"."===t[0]?t.slice(1):t,i.value=e,r.appendChild(i)}),r.value=l||a[0],t(c||"asc"),s.onclick=function(e){t(e.target.getAttribute("data-value"))},o.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.close(),i({path:r.value,direction:s.value})},n&&(n.onsubmit=o.onclick)}).afterClose(function(e){e.destroy()}).show()}i.r(t),i.d(t,{showSortModal:function(){return n}});var t=i(483),o=i.n(t),r=i(7907),s=i(9791)},2558:function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,i,r){return"boolean"==typeof e||e instanceof Boolean||null===e||"number"==typeof e||e instanceof Number||"string"==typeof e||e instanceof String||e instanceof Date?JSON.stringify(e):Array.isArray(e)?function(e,t,i,n){for(var r=t?i+t:void 0,s=t?"[\n":"[",a=0;a<e.length;a++){var l=e[a];if(t&&(s+=r),s+=void 0!==l&&"function"!=typeof l?o(l,t,r,n):"null",a<e.length-1&&(s+=t?",\n":","),s.length>n)return s+"..."}return s+=t?"\n"+i+"]":"]"}(e,t,i,r):e&&"object"===n(e)?function(e,t,i,n){var r,s=t?i+t:void 0,a=!0,l=t?"{\n":"{";if("function"==typeof e.toJSON)return o(e.toJSON(),t,i,n);for(r in e)if(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,r)){var c=e[r];if(a?a=!1:l+=t?",\n":",",l+=t?s+'"'+r+'": ':'"'+r+'":',(l+=o(c,t,s,n)).length>n)return l+"..."}return l+=t?"\n"+i+"}":"}"}(e,t,i,r):void 0}function r(e,t){for(var i="";0<t--;)i+=e;return i}function s(e){var t=e.container,i=e.json,n=e.queryDescription,n=void 0===n?u:n,s=e.createQuery,g=e.executeQuery,p=e.onTransform,m=i,n='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,c.Iu)("transform")+"</div><p>"+n+'</p><div class="jsoneditor-jmespath-label">'+(0,c.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,c.Iu)("transformWizardFilter")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" > <select id="filterField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" > <select id="filterRelation"> <option value="==">==</option> <option value="!=">!=</option> <option value="<"><</option> <option value="<="><=</option> <option value=">">></option> <option value=">=">>=</option> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" > <input type="text" class="value" placeholder="value..." id="filterValue" /> </div> </td> </tr> <tr> <th>'+(0,c.Iu)("transformWizardSortBy")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-sort-field"> <select id="sortField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" > <select id="sortOrder"> <option value="asc">Ascending</option> <option value="desc">Descending</option> </select> </div> </td> </tr> <tr id="selectFieldsPart"> <th>'+(0,c.Iu)("transformWizardSelectFields")+'</th> <td class="jsoneditor-jmespath-filter"> <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select> </td> </tr> </tbody> </table></div><div class="jsoneditor-jmespath-label">'+(0,c.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,c.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,c.Iu)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="preview" class="jsoneditor-transform-preview" readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,c.Iu)("ok")+'" autofocus /></div></div>';a()({parent:t,content:n,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(e){function t(e){return""===e?"@":"."===e[0]?e.slice(1):e}function n(e,t){try{w.value=s(e,t),f.disabled=!1,N()}catch(e){t='Error: an error happened when executing "createQuery": '+(e.message||e.toString()),w.value="",f.disabled=!0,x.className="jsoneditor-transform-preview jsoneditor-error",x.value=t}}function a(){var e={};if(C.value&&I.value&&A.value&&(e.filter={field:C.value,relation:I.value,value:A.value}),b.value&&v.value&&(e.sort={field:b.value,direction:v.value}),y.value){for(var t,o=[],r=0;r<y.options.length;r++)y.options[r].selected&&(t=y.options[r].value,o.push(t));e.projection={fields:o}}n(i,e)}var c=e.modalElem(),u=c.querySelector("#wizard"),f=c.querySelector("#ok"),C=c.querySelector("#filterField"),I=c.querySelector("#filterRelation"),A=c.querySelector("#filterValue"),b=c.querySelector("#sortField"),v=c.querySelector("#sortOrder"),y=c.querySelector("#selectFields"),w=c.querySelector("#query"),x=c.querySelector("#preview");Array.isArray(m)||(u.style.fontStyle="italic",u.textContent="(wizard not available for objects, only for arrays)"),(0,d.getChildPaths)(i).forEach(function(e){var i=t(e),e=document.createElement("option");e.text=i,e.value=i,C.appendChild(e),e=document.createElement("option"),e.text=i,e.value=i,b.appendChild(e)});var S=(0,d.getChildPaths)(i,!0).filter(function(e){return""!==e});0<S.length?S.forEach(function(e){var i=t(e),e=document.createElement("option");e.text=i,e.value=i,y.appendChild(e)}):(M=c.querySelector("#selectFieldsPart"))&&(M.style.display="none");var k=new(l())(C,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),T=new(l())(I,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),u=new(l())(b,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),S=new(l())(v,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),M=new(l())(y,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});k.on("selectr.change",a),T.on("selectr.change",a),A.oninput=a,u.on("selectr.change",a),S.on("selectr.change",a),M.on("selectr.change",a),c.querySelector(".pico-modal-contents").onclick=function(e){"A"!==e.target.nodeName&&e.preventDefault()};var N=(0,d.debounce)(function(){try{var e=g(m,w.value);x.className="jsoneditor-transform-preview",x.value=(t=e,i=2,n=h.WF,"number"==typeof i?10<i?s=r(" ",10):1<=i&&(s=r(" ",i)):"string"==typeof i&&""!==i&&(s=i),(t=o(t,s,"",n)).length>n?(s=t,("number"==typeof(n=n)?s.slice(0,n):s)+"..."):t),f.disabled=!1}catch(e){x.className="jsoneditor-transform-preview jsoneditor-error",x.value=e.toString(),f.disabled=!0}var t,i,n,s},300);w.oninput=N,f.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.close(),p(w.value)},n(i,{}),setTimeout(function(){w.select(),w.focus(),w.selectionStart=3,w.selectionEnd=3})}).afterClose(function(e){e.destroy()}).show()}i.r(t),i.d(t,{showTransformModal:function(){return s}});var t=i(483),a=i.n(t),t=i(3879),l=i.n(t),c=i(7907),d=i(9791),h=i(4188),u='Enter a <a href="http://jmespath.org" target="_blank">JMESPath</a> query to filter, sort, or transform the JSON data.<br/>To learn JMESPath, go to <a href="http://jmespath.org/tutorial.html" target="_blank">the interactive tutorial</a>.'},5956:function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){try{this.format()}catch(e){}}i.r(t),i.d(t,{textModeMixins:function(){return I}});var t=i(8909),r=i.n(t),t=i(8170),s=i.n(t),a=i(4188),l=i(6436),c=i(2474),d=i(7907),h=i(6056),u=i(6617),g=i(6210),p=i(2558),m=i(9125),f=i(9791),i={},C="ace/theme/jsoneditor";i.create=function(e){var t=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};void 0===i.statusBar&&(i.statusBar=!0),i.mainMenuBar=!1!==i.mainMenuBar,i.enableSort=!1!==i.enableSort,i.enableTransform=!1!==i.enableTransform,i.createQuery=i.createQuery||h.r,i.executeQuery=i.executeQuery||h.J,"number"==typeof(this.options=i).indentation?this.indentation=Number(i.indentation):this.indentation=2,(0,d.cC)(this.options.languages),(0,d.m0)(this.options.language);var o=i.ace||s();this.mode="code"===i.mode?"code":"text","code"===this.mode&&void 0===o&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=i.theme||C,this.theme===C&&o&&(0,m.O)(),i.onTextSelectionChange&&this.onTextSelectionChange(i.onTextSelectionChange);var r=this;this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,f.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){r._onKeyDown(e)};var a,g,e={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new c.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,d.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){try{r.format(),r._onChange()}catch(e){r._onError(e)}},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,d.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){try{r.compact(),r._onChange()}catch(e){r._onError(e)}},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,d.Iu)("sortTitleShort"),e.onclick=function(){r._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((a=document.createElement("button")).type="button",a.title=(0,d.Iu)("transformTitleShort"),a.className="jsoneditor-transform",a.onclick=function(){r._showTransformModal()},this.menu.appendChild(a)),(a=document.createElement("button")).type="button",a.className="jsoneditor-repair",a.title=(0,d.Iu)("repairTitle"),this.menu.appendChild(a),a.onclick=function(){try{r.repair(),r._onChange()}catch(e){r._onError(e)}},"code"===this.mode&&((b=document.createElement("button")).type="button",b.className="jsoneditor-undo jsoneditor-separator",b.title=(0,d.Iu)("undo"),b.onclick=function(){t.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(b),this.dom.undo=b,(b=document.createElement("button")).type="button",b.className="jsoneditor-redo",b.title=(0,d.Iu)("redo"),b.onclick=function(){t.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(b),this.dom.redo=b),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new u.x(this.menu,this.options.modes,this.options.mode,function(e){r.setMode(e),r.modeSwitcher.focus()})),"code"===this.mode&&((g=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),g.href="https://ace.c9.io/",g.target="_blank",g.className="jsoneditor-poweredBy",g.onclick=function(){window.open(g.href,g.target,"noopener")},this.menu.appendChild(g)));var p,I,A,b=this.options.onEditable&&n("function"===this.options.onEditable)&&!this.options.onEditable({});this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"===this.mode?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),o=(I=o.edit(this.editorDom)).getSession(),I.$blockScrolling=1/0,I.setTheme(this.theme),I.setOptions({readOnly:b}),I.setShowPrintMargin(!1),I.setFontSize("13px"),o.setMode("ace/mode/json"),o.setTabSize(this.indentation),o.setUseSoftTabs(!0),o.setUseWrapMode(!0),p=o.setAnnotations,o.setAnnotations=function(e){p.call(this,e&&e.length?e:r.annotations)},I.commands.bindKey("Ctrl-L",null),I.commands.bindKey("Command-L",null),I.commands.bindKey("Ctrl-\\",null),I.commands.bindKey("Command-\\",null),I.commands.bindKey("Ctrl-Shift-\\",null),I.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=I).on("change",this._onChange.bind(this)),I.on("changeSelection",this._onSelect.bind(this))):((A=document.createElement("textarea")).className="jsoneditor-text",A.spellcheck=!1,this.content.appendChild(A),this.textarea=A,this.textarea.readOnly=b,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),A.onselect=this._onSelect.bind(this),A.onmousedown=this._onMouseDown.bind(this),A.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),this.errorTable=new l.Q({errorTableVisible:"text"===this.mode,onToggleVisibility:function(){r._validateAndCatch()},onFocusLine:function(e){r.isFocused=!0,isNaN(e)||r.setTextSelection({row:e,column:1},{row:e,column:1e3})},onChangeHeight:function(e){e=e+(r.dom.statusBar?r.dom.statusBar.clientHeight:0)+1,r.content.style.marginBottom=-e+"px",r.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),i.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},I=document.createElement("div"),(this.dom.statusBar=I).className="jsoneditor-statusbar",this.frame.appendChild(I),(b=document.createElement("span")).className="jsoneditor-curserinfo-label",b.innerText="Ln:",(A=document.createElement("span")).className="jsoneditor-curserinfo-val",A.innerText="1",I.appendChild(b),I.appendChild(A),(i=document.createElement("span")).className="jsoneditor-curserinfo-label",i.innerText="Col:",(b=document.createElement("span")).className="jsoneditor-curserinfo-val",b.innerText="1",I.appendChild(i),I.appendChild(b),this.curserInfoElements.colVal=b,this.curserInfoElements.lnVal=A,(b=document.createElement("span")).className="jsoneditor-curserinfo-label",b.innerText="characters selected",b.style.display="none",(A=document.createElement("span")).className="jsoneditor-curserinfo-count",A.innerText="0",A.style.display="none",this.curserInfoElements.countLabel=b,this.curserInfoElements.countVal=A,I.appendChild(A),I.appendChild(b),I.appendChild(this.errorTable.getErrorCounter()),I.appendChild(this.errorTable.getWarningIcon()),I.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},i._onChange=function(){var e=this;if(!this.onChangeDisabled){if(setTimeout(function(){e._updateHistoryButtons&&e._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},i._updateHistoryButtons=function(){var e;this.aceEditor&&this.dom.undo&&this.dom.redo&&(e=this.aceEditor.getSession().getUndoManager())&&e.hasUndo&&e.hasRedo&&(this.dom.undo.disabled=!e.hasUndo(),this.dom.redo.disabled=!e.hasRedo())},i._showSortModal=function(){var e=this,t=this.options.modalAnchor||a.qD,i=this.get();(0,g.showSortModal)(t,i,function(t){var n;Array.isArray(i)&&(n=(0,f.sort)(i,t.path,t.direction),e.sortedBy=t,e.update(n)),(0,f.isObject)(i)&&(n=(0,f.sortObjectKeys)(i,t.direction),e.sortedBy=t,e.update(n))},e.sortedBy)},i._showTransformModal=function(){var e=this,t=this.options,i=t.modalAnchor,n=t.createQuery,o=t.executeQuery,t=t.queryDescription,r=this.get();(0,p.showTransformModal)({container:i||a.qD,json:r,queryDescription:t,createQuery:n,executeQuery:o,onTransform:function(t){t=o(r,t),e.update(t)}})},i._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},i._onKeyDown=function(e){var t=!1;73===(e.which||e.keyCode)&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),this._onChange(),t=!0),t&&(e.preventDefault(),e.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},i._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},i._onBlur=function(){var e=this;setTimeout(function(){e.isFocused||(e._updateCursorInfo(),e._emitSelectionChange()),e.isFocused=!1})},i._updateCursorInfo=function(){function e(){s.curserInfoElements.countVal.innerText!==r&&(s.curserInfoElements.countVal.innerText=r,s.curserInfoElements.countVal.style.display=r?"inline":"none",s.curserInfoElements.countLabel.style.display=r?"inline":"none"),s.curserInfoElements.lnVal.innerText=n,s.curserInfoElements.colVal.innerText=o}var t,i,n,o,r,s=this;this.textarea?setTimeout(function(){var t=(0,f.getInputSelection)(s.textarea);t.startIndex!==t.endIndex&&(r=t.endIndex-t.startIndex),o=r&&s.cursorInfo&&s.cursorInfo.line===t.end.row&&s.cursorInfo.column===t.end.column?(n=t.start.row,t.start.column):(n=t.end.row,t.end.column),s.cursorInfo={line:n,column:o,count:r},s.options.statusBar&&e()},0):this.aceEditor&&this.curserInfoElements&&(t=this.aceEditor.getCursorPosition(),i=this.aceEditor.getSelectedText(),n=t.row+1,o=t.column+1,r=i.length,s.cursorInfo={line:n,column:o,count:r},this.options.statusBar&&e())},i._emitSelectionChange=function(){var e;this._selectionChangedHandler&&(e=this.getTextSelection(),this._selectionChangedHandler(e.start,e.end,e.text))},i._refreshAnnotations=function(){var e,t=this.aceEditor&&this.aceEditor.getSession();t&&(e=t.getAnnotations().filter(function(e){return"error"===e.type}),t.setAnnotations(e))},i.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null,this.frameFocusTracker.destroy()},i.compact=function(){var e=this.get(),e=JSON.stringify(e);this.updateText(e)},i.format=function(){var e=this.get(),e=JSON.stringify(e,null,this.indentation);this.updateText(e)},i.repair=function(){var e=this.getText();try{var t=r()(e);this.updateText(t)}catch(e){}},i.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},i.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},i.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.update=function(e){this.updateText(JSON.stringify(e,null,this.indentation))},i.get=function(){var e=this.getText();return(0,f.parse)(e)},i.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},i._setText=function(e,t){var i,n=this,e=!0===this.options.escapeUnicode?(0,f.escapeUnicodeChars)(e):e;this.textarea&&(this.textarea.value=e),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(e,-1),this.onChangeDisabled=!1,t&&(i=this,setTimeout(function(){i.aceEditor&&i.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){n._updateHistoryButtons&&n._updateHistoryButtons()})),this._debouncedValidate()},i.setText=function(e){this._setText(e,!0)},i.updateText=function(e){this.getText()!==e&&this._setText(e,!1)},i.validate=function(){var e,t=this,i=[],n=[];try{var o=this.get();this.validateSchema&&(this.validateSchema(o)||(i=this.validateSchema.errors.map(function(e){return e.type="validation",(0,f.improveSchemaError)(e)}))),this.validationSequence=(this.validationSequence||0)+1;var r=this,s=this.validationSequence;return function(e,t){if(!t)return Promise.resolve([]);try{var i=t(e);return((0,f.isPromise)(i)?i:Promise.resolve(i)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=(0,f.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t}).map(function(e){return{dataPath:(0,f.stringifyPath)(e.path),message:e.message,type:"customValidation"}}):[]})}catch(e){return Promise.reject(e)}}(o,this.options.onValidate).then(function(e){return s===r.validationSequence&&(e=i.concat(n).concat(e),r._renderErrors(e),"function"==typeof t.options.onValidationError&&(0,f.isValidationErrorChanged)(e,t.lastSchemaErrors)&&t.options.onValidationError.call(t,e),t.lastSchemaErrors=e),t.lastSchemaErrors})}catch(t){return this.getText()&&((o=/\w*line\s*(\d+)\w*/g.exec(t.message))&&(e=+o[1]),n=[{type:"error",message:t.message.replace(/\n/g,"<br>"),line:e}]),this._renderErrors(n),"function"==typeof this.options.onValidationError&&(0,f.isValidationErrorChanged)(n,this.lastSchemaErrors)&&this.options.onValidationError.call(this,n),this.lastSchemaErrors=n,Promise.resolve(this.lastSchemaErrors)}},i._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},i._renderErrors=function(e){var t=this.getText(),i=[];e.reduce(function(e,t){return"string"==typeof t.dataPath&&-1===e.indexOf(t.dataPath)&&e.push(t.dataPath),e},i),i=(0,f.getPositionForPath)(t,i),this.aceEditor&&(this.annotations=i.map(function(t){var i=e.filter(function(e){return e.dataPath===t.path}),n=i.map(function(e){return e.message}).join("\n");return n?{row:t.line,column:t.column,text:"Schema validation error"+(1!==i.length?"s":"")+": \n"+n,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(e,i),this.aceEditor&&this.aceEditor.resize(!1)},i.getTextSelection=function(){var e={};if(this.textarea){var t=(0,f.getInputSelection)(this.textarea);return this.cursorInfo&&this.cursorInfo.line===t.end.row&&this.cursorInfo.column===t.end.column?(e.start=t.end,e.end=t.start):e=t,{start:e.start,end:e.end,text:this.textarea.value.substring(t.startIndex,t.endIndex)}}if(this.aceEditor){var i=this.aceEditor.getSelection(),n=this.aceEditor.getSelectedText(),t=i.getRange(),i=i.getSelectionLead();return i.row===t.end.row&&i.column===t.end.column?e=t:(e.start=t.end,e.end=t.start),{start:{row:e.start.row+1,column:e.start.column+1},end:{row:e.end.row+1,column:e.end.column+1},text:n}}},i.onTextSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,f.debounce)(e,this.DEBOUNCE_INTERVAL))},i.setTextSelection=function(e,t){var i,n,o;e&&t&&(this.textarea?(i=(0,f.getIndexForPosition)(this.textarea,e.row,e.column),n=(0,f.getIndexForPosition)(this.textarea,t.row,t.column),-1<i&&-1<n&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(i,n)):this.textarea.createTextRange&&((o=this.textarea.createTextRange()).collapse(!0),o.moveEnd("character",n),o.moveStart("character",i),o.select()),o=(this.textarea.value.match(/\n/g)||[]).length+1,o=this.textarea.scrollHeight/o,o=e.row*o,this.textarea.scrollTop=o>this.textarea.clientHeight?o-this.textarea.clientHeight/2:0)):this.aceEditor&&(t={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}},this.aceEditor.selection.setRange(t),this.aceEditor.scrollToLine(e.row-1,!0)))};var I=[{mode:"text",mixin:i,data:"text",load:o},{mode:"code",mixin:i,data:"text",load:o}]},8038:function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=a(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,o=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw o}}}}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(i="Object"===i&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e){return e.getInternalPath()}function u(e){return e.getField()}function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e){this.editor=e,this.dom={}}function m(e,t){this.editor=e,this.parent=t,this.dom={}}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function C(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.r(t),i.d(t,{treeModeMixins:function(){return H}});var A={start:function(e,t,i){return 0===t.indexOf(e)},contain:function(e,t,i){return-1<t.indexOf(e)}},b=i(897),v=i(2474),y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.locked=!1}var t,i;return t=e,(i=[{key:"highlight",value:function(e){this.locked||(this.node!==e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var e;this.locked||(e=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&n(t.prototype,i),e}(),w=i(7907),x=i(6056),S=i(6617),t=i(233),k=i.n(t),T=i(2602),M=i(9791),N=i(6210),R=i(2558),E=i(4188),L=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=t,this.dom={},this.expanded=!1,i&&i instanceof Object?(this.setField(i.field,i.fieldEditable),"value"in i&&this.setValue(i.value,i.type),"internalValue"in i&&this.setInternalValue(i.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,M.debounce)(this._onChangeValue.bind(this),e.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,M.debounce)(this._onChangeField.bind(this),e.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var t,i;return t=e,(i=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:j}},{key:"_updateEditability",value:function(){var e;this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"!==this.editor.options.mode&&"form"!==this.editor.options.mode||"function"!=typeof this.editor.options.onEditable||("boolean"==typeof(e=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()}))?(this.editable.field=e,this.editable.value=e):"object"===c(e)&&null!==e?("boolean"==typeof e.field&&(this.editable.field=e.field),"boolean"==typeof e.value&&(this.editable.value=e.value)):(console.error("Invalid return value for function onEditable.","Actual value:",e,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var e=this,t=[];e;){var i=e.getName();void 0!==i&&t.unshift(i),e=e.parent}return t}},{key:"getInternalPath",value:function(){for(var e=this,t=[];e;)e.parent&&t.unshift(e.getIndex()),e=e.parent;return t}},{key:"getName",value:function(){return this.parent?"array"!==this.parent.type?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(e){if(e){if(0===e.length)return this;if(e.length&&this.childs&&this.childs.length)for(var t=0;t<this.childs.length;++t)if(""+e[0]==""+this.childs[t].getName())return this.childs[t].findNodeByPath(e.slice(1))}}},{key:"findNodeByInternalPath",value:function(e){if(e){for(var t=this,i=0;i<e.length&&t;i++)var n=e[i],t=t.childs[n];return t}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(e){for(var t=(0,M.parsePath)(e),i=this;i&&0<t.length;)!function(){var e=t.shift();if("number"==typeof e){if("array"!==i.type)throw new Error("Cannot get child node at index "+e+": node is no array");i=i.childs[e]}else{if("object"!==i.type)throw new Error("Cannot get child node "+e+": node is no object");i=i.childs.filter(function(t){return t.field===e})[0]}}();return i}},{key:"findParents",value:function(){for(var e=[],t=this.parent;t;)e.unshift(t),t=t.parent;return e}},{key:"setError",value:function(e,t){this.error=e,this.errorChild=t,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var e=this,t=this.fieldError||this.valueError||this.error,i=this.dom.tdError;if(t&&this.dom&&this.dom.tr){(0,M.addClassName)(this.dom.tr,"jsoneditor-validation-error"),i||(i=document.createElement("td"),this.dom.tdError=i,this.dom.tdValue.parentNode.appendChild(i));var n=document.createElement("button");n.type="button",n.className="jsoneditor-button jsoneditor-schema-error";var o=function(){e.dom.popupAnchor&&e.dom.popupAnchor.destroy()},r=function(){delete e.dom.popupAnchor},s=function(i){var o=e.editor.frame;e.dom.popupAnchor=(0,T.w)(n,e.editor.getPopupAnchor(),r,i),i=n.getBoundingClientRect(),o=120<o.getBoundingClientRect().width-i.x?"jsoneditor-above":"jsoneditor-left",i=document.createElement("div"),i.className="jsoneditor-popover "+o,i.appendChild(document.createTextNode(t.message)),e.dom.popupAnchor.appendChild(i)};n.onmouseover=function(){e.dom.popupAnchor||s(!0)},n.onfocus=function(){o(),s(!1)},n.onblur=function(){o()};var a=this.errorChild;for(a&&(n.onclick=function(){a.findParents().forEach(function(e){e.expand(!1)}),a.scrollTo(function(){a.focus()})});i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n)}else this.dom.tr&&(0,M.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),i&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){if(this.parent){var e=this.parent.childs.indexOf(this);return-1!==e?e:null}return-1}},{key:"setParent",value:function(e){this.parent=e}},{key:"setField",value:function(e,t){this.field=e,this.previousField=e,this.fieldEditable=!0===t}},{key:"getField",value:function(){return void 0===this.field&&this._getDomField(),this.field}},{key:"setValue",value:function(t,i){var n,o,r,s,a,l,c=this.childs;if(this.type=this._getType(t),i&&i!==this.type){if("string"!==i||"auto"!==this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+i+'"');this.type=i}if("array"===this.type){for(this.childs||(this.childs=[]),n=0;n<t.length;n++)void 0===(a=t[n])||a instanceof Function||(n<this.childs.length?((r=this.childs[n]).fieldEditable=!1,r.index=n,r.setValue(a)):(r=new e(this.editor,{value:a}),s=n<this.getMaxVisibleChilds(),this.appendChild(r,s,!1)));for(o=this.childs.length;o>=t.length;o--)this.removeChild(this.childs[o],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),o=this.childs.length-1;0<=o;o--)g(t,this.childs[o].field)||this.removeChild(this.childs[o],!1);for(var d in n=0,t)g(t,d)&&(void 0===(a=t[d])||a instanceof Function||((l=this.findChildByProperty(d))?(l.setField(d,!0),l.setValue(a)):(l=new e(this.editor,{field:d,value:a}),d=n<this.getMaxVisibleChilds(),this.appendChild(l,d,!1))),n++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=t;Array.isArray(c)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(t){var i,n,o,r,s,a=this.childs;if(this.type=t.type,"array"===t.type){for(this.childs||(this.childs=[]),r=0;r<t.childs.length;r++)void 0===(i=t.childs[r])||i instanceof Function||(r<this.childs.length?((n=this.childs[r]).fieldEditable=!1,n.index=r,n.setInternalValue(i)):(n=new e(this.editor,{internalValue:i}),o=r<this.getMaxVisibleChilds(),this.appendChild(n,o,!1)));for(s=this.childs.length;s>=t.childs.length;s--)this.removeChild(this.childs[s],!1)}else if("object"===t.type){for(this.childs||(this.childs=[]),r=0;r<t.childs.length;r++)void 0===(i=t.childs[r])||i instanceof Function||(r<this.childs.length?(delete(n=this.childs[r]).index,n.setField(i.field,!0),n.setInternalValue(i.value)):(n=new e(this.editor,{field:i.field,internalValue:i.value}),o=r<this.getMaxVisibleChilds(),this.appendChild(n,o,!1)));for(s=this.childs.length;s>=t.childs.length;s--)this.removeChild(this.childs[s],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=t.value;Array.isArray(a)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var e;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(e=this._detachFromDom(),this.clearDom(),this._attachToDom(e)):this.clearDom()}},{key:"getValue",value:function(){if("array"===this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"!==this.type)return void 0===this.value&&this._getDomValue(),this.value;var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}},{key:"getInternalValue",value:function(){return"array"===this.type?{type:this.type,childs:this.childs.map(function(e){return e.getInternalValue()})}:"object"===this.type?{type:this.type,childs:this.childs.map(function(e){return{field:e.getField(),value:e.getInternalValue()}})}:(void 0===this.value&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var e=this.parent?this.parent.getNodePath():[];return e.push(this),e}},{key:"clone",value:function(){var t,i;return(t=new e(this.editor)).type=this.type,t.field=this.field,t.fieldInnerText=this.fieldInnerText,t.fieldEditable=this.fieldEditable,t.previousField=this.previousField,t.value=this.value,t.valueInnerText=this.valueInnerText,t.previousValue=this.previousValue,t.expanded=this.expanded,t.visibleChilds=this.visibleChilds,this.childs?(i=[],this.childs.forEach(function(e){e=e.clone(),e.setParent(t),i.push(e)}),t.childs=i):t.childs=void 0,t}},{key:"expand",value:function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==e&&this.childs.forEach(function(t){t.expand(e)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(e){this.childs&&(this.hideChilds(),!1!==e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){e=this.getAppendDom(),e.parentNode||((o=t.nextSibling)?i.insertBefore(e,o):i.appendChild(e));for(var n=Math.min(this.childs.length,this.visibleChilds),o=this._getNextTr(),r=0;r<n;r++){var s=this.childs[r];s.getDom().parentNode||i.insertBefore(s.getDom(),o),s.showChilds()}e=this.getShowMoreDom(),o=this._getNextTr(),e.parentNode||i.insertBefore(e,o),this.showMore.updateDom()}}}},{key:"_getNextTr",value:function(){return this.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void 0}},{key:"hide",value:function(e){var t=this.dom.tr,i=t?t.parentNode:void 0;i&&i.removeChild(t),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(e)}},{key:"hideChilds",value:function(e){var t;this.childs&&this.expanded&&((t=this.getAppendDom()).parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()}),(t=this.getShowMoreDom()).parentNode&&t.parentNode.removeChild(t),e&&!e.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var e;this.dom.field&&this.editor&&this.editor.options&&"function"==typeof this.editor.options.onClassName&&this.dom.tree&&((0,M.removeAllClassNames)(this.dom.tree),e=this.editor.options.onClassName({path:this.getPath(),field:this.field,value:this.value})||"",(0,M.addClassName)(this.dom.tree,"jsoneditor-values "+e))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var e=0;e<this.childs.length;e++)this.childs[e].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var e=this.parent;e;)e.expanded||e.expand(),e=e.parent}},{key:"appendChild",value:function(e,t,i){var n,o;this._hasChilds()&&(e.setParent(this),e.fieldEditable="object"===this.type,"array"===this.type&&(e.index=this.childs.length),"object"===this.type&&void 0===e.field&&e.setField(""),this.childs.push(e),this.expanded&&!1!==t&&(n=e.getDom(),t=(o=this._getNextTr())?o.parentNode:void 0,o&&t&&t.insertBefore(n,o),e.showChilds(),this.visibleChilds++),!1!==i&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})))}},{key:"moveBefore",value:function(e,t,i){var n,o,r;this._hasChilds()&&((n=this.dom.tr?this.dom.tr.parentNode:void 0)&&((o=document.createElement("tr")).style.height=n.clientHeight+"px",n.appendChild(o)),e.parent&&e.parent.removeChild(e),t instanceof Z||!t?this.childs.length+1>this.visibleChilds?(r=this.childs[this.visibleChilds-1],this.insertBefore(e,r,i)):this.appendChild(e,!0,i):this.insertBefore(e,t,i),n&&o&&n.removeChild(o))}},{key:"insertBefore",value:function(e,t,i){if(this._hasChilds()){if(this.visibleChilds++,"object"===this.type&&void 0===e.field&&e.setField(""),t===this.append)e.setParent(this),e.fieldEditable="object"===this.type,this.childs.push(e);else{var n=this.childs.indexOf(t);if(-1===n)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"===this.type,this.childs.splice(n,0,e)}var o;this.expanded&&(o=e.getDom(),t=(n=t.getDom())?n.parentNode:void 0,n&&t&&t.insertBefore(o,n),e.showChilds(),this.showChilds()),!1!==i&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(e,t){this._hasChilds()&&(t=this.childs.indexOf(t),(t=this.childs[t+1])?this.insertBefore(e,t):this.appendChild(e))}},{key:"search",value:function(e,t){Array.isArray(t)||(t=[]);var i=e?e.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,void 0!==this.field&&t.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(i)&&(this.searchField=!0,t.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(i){i.search(e,t)}):void 0!==this.value&&t.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(i)&&(this.searchValue=!0,t.push({node:this,elem:"value"})),this._updateDomValue()),t}},{key:"scrollTo",value:function(e){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)}},{key:"expandPathToNode",value:function(){for(var e=this;e&&e.parent;){for(var t="array"===e.parent.type?e.index:e.parent.childs.indexOf(e);e.parent.visibleChilds<t+1;)e.parent.visibleChilds+=this.getMaxVisibleChilds();e.parent.expand(!1),e=e.parent}}},{key:"focus",value:function(t){if(e.focusElement=t,this.dom.tr&&this.dom.tr.parentNode){var i=this.dom;switch(t){case"drag":(i.drag||i.menu).focus();break;case"menu":i.menu.focus();break;case"expand":this._hasChilds()?i.expand.focus():i.field&&this.fieldEditable?(i.field.focus(),(0,M.selectContentEditable)(i.field)):i.value&&!this._hasChilds()?(i.value.focus(),(0,M.selectContentEditable)(i.value)):i.menu.focus();break;case"field":i.field&&this.fieldEditable?(i.field.focus(),(0,M.selectContentEditable)(i.field)):i.value&&!this._hasChilds()?(i.value.focus(),(0,M.selectContentEditable)(i.value)):(this._hasChilds()?i.expand:i.menu).focus();break;default:i.select?i.select.focus():i.value&&!this._hasChilds()?(i.value.focus(),(0,M.selectContentEditable)(i.value)):i.field&&this.fieldEditable?(i.field.focus(),(0,M.selectContentEditable)(i.field)):(this._hasChilds()?i.expand:i.menu).focus()}}}},{key:"containsNode",value:function(e){if(this===e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;i<n;i++)if(t[i].containsNode(e))return!0;return!1}},{key:"removeChild",value:function(e,t){if(this.childs){var i=this.childs.indexOf(e);if(-1!==i)return i<this.visibleChilds&&this.expanded&&this.visibleChilds--,e.hide(),delete e.searchField,delete e.searchValue,i=this.childs.splice(i,1)[0],i.parent=null,!1!==t&&this.updateDom({updateIndexes:!0}),i}}},{key:"_remove",value:function(e){this.removeChild(e)}},{key:"changeType",value:function(e){var t,i=this.type;i!==e&&("string"!==e&&"auto"!==e||"string"!==i&&"auto"!==i?(t=this._detachFromDom(),this.clearDom(),"object"===(this.type=e)?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0===e.field&&(e.field="")}),"string"!==i&&"auto"!==i||(this.expanded=!0)):"array"===e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),"string"!==i&&"auto"!==i||(this.expanded=!0)):this.expanded=!1,this._attachToDom(t)):this.type=e,"auto"!==e&&"string"!==e||(this.value="string"===e?String(this.value):(0,M.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(e){var t;if("array"===this.type){if(!Array.isArray(e))return!1;if(this.childs.length!==e.length)return!1;for(t=0;t<this.childs.length;t++)if(!this.childs[t].deepEqual(e[t]))return!1}else if("object"===this.type){if("object"!==c(e)||!e)return!1;var i=Object.keys(e);if(this.childs.length!==i.length)return!1;for(t=0;t<i.length;t++){var n=this.childs[t];if(n.field!==i[t]||!n.deepEqual(e[n.field]))return!1}}else if(this.value!==e)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&"array"!==this.type&&"object"!==this.type&&(this.valueInnerText=(0,M.getInnerText)(this.dom.value),""===this.valueInnerText&&""!==this.dom.value.innerHTML&&(this.dom.value.textContent="")),void 0!==this.valueInnerText)try{var e,t;(t="string"===this.type?this._unescapeHTML(this.valueInnerText):(e=this._unescapeHTML(this.valueInnerText),(0,M.parseString)(e)))!==this.value&&(this.value=t,this._debouncedOnChangeValue())}catch(e){this._setValueError((0,w.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(e){this.valueError={message:e},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(e){this.fieldError={message:e},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var e=this.editor.getDomSelection();e.range&&(t=(0,M.textDiff)(String(this.value),String(this.previousValue)),e.range.startOffset=t.start,e.range.endOffset=t.end);var t,i=this.editor.getDomSelection();i.range&&(t=(0,M.textDiff)(String(this.previousValue),String(this.value)),i.range.startOffset=t.start,i.range.endOffset=t.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:e,newSelection:i}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var e=this.editor.getDomSelection(),t=this.previousField||"";e.range&&(i=(0,M.textDiff)(this.field,t),e.range.startOffset=i.start,e.range.endOffset=i.end);var i=this.editor.getDomSelection();i.range&&(t=(0,M.textDiff)(t,this.field),i.range.startOffset=t.start,i.range.endOffset=t.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:e,newSelection:i}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var e=this.dom.value;if(e){var t=["jsoneditor-value"],i=this.value,n="auto"===this.type?(0,M.getType)(i):this.type,o="string"===n&&(0,M.isUrl)(i);if(t.push("jsoneditor-"+n),o&&t.push("jsoneditor-url"),""===String(this.value)&&"array"!==this.type&&"object"!==this.type&&t.push("jsoneditor-empty"),this.searchValueActive&&t.push("jsoneditor-highlight-active"),this.searchValue&&t.push("jsoneditor-highlight"),e.className=t.join(" "),"array"===n||"object"===n?(t=this.childs?this.childs.length:0,e.title=this.type+" containing "+t+" items"):o&&this.editable.value?e.title=(0,w.Iu)("openUrl"):e.title="","boolean"===n&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value){if(!this.dom.select){this.dom.select=document.createElement("select"),this.id=this.field+"_"+(new Date).getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id;var r=document.createElement("option");r.value="",r.textContent="--",this.dom.select.appendChild(r);for(var s=0;s<this.enum.length;s++){var a=document.createElement("option");a.value=this.enum[s],a.textContent=this.enum[s],this.dom.select.appendChild(a)}this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)}this.dom.select.value=-1!==this.enum.indexOf(this.value)?this.value:"",!this.schema||g(this.schema,"oneOf")||g(this.schema,"anyOf")||g(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")}else this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML);if(this.editable.value&&this.editor.options.colorPicker&&"string"==typeof i&&(0,M.isValidColor)(i)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,M.addClassName)(this.dom.value,"jsoneditor-color-value"),this.dom.color.style.backgroundColor=i):this._deleteDomColor(),this._showTimestampTag()){if(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),r=null,r="function"==typeof this.editor.options.timestampFormat?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):r){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(r))}else this.dom.date.textContent=new Date(i).toISOString();this.dom.date.title=new Date(i).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,M.stripFormatting)(e),this._updateDomDefault()}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,M.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var e,t=this.dom.field;t&&((e=(0,M.makeFieldTooltip)(this.schema,this.editor.options.language))&&(t.title=e),(""===String(this.field)&&this.parent&&"array"!==this.parent.type?M.addClassName:M.removeClassName)(t,"jsoneditor-empty"),(this.searchFieldActive?M.addClassName:M.removeClassName)(t,"jsoneditor-highlight-active"),(this.searchField?M.addClassName:M.removeClassName)(t,"jsoneditor-highlight"),(0,M.stripFormatting)(t))}},{key:"_getDomField",value:function(e){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,M.getInnerText)(this.dom.field),""===this.fieldInnerText&&""!==this.dom.field.innerHTML&&(this.dom.field.textContent="")),void 0!==this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText),i=this.parent.getFieldNames(this);-1!==i.indexOf(t)?e?(t=(0,M.findUniqueName)(t,i))!==this.field&&(this.field=t,this._debouncedOnChangeField()):this._setFieldError((0,w.Iu)("duplicateFieldError")):t!==this.field&&(this.field=t,this._debouncedOnChangeField())}catch(e){this._setFieldError((0,w.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var e;!this.schema||void 0===this.schema.default||this._hasChilds()||(e=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(e.title=(0,w.Iu)("default"),(0,M.addClassName)(e,"jsoneditor-is-default"),(0,M.removeClassName)(e,"jsoneditor-is-not-default")):(e.removeAttribute("title"),(0,M.removeClassName)(e,"jsoneditor-is-default"),(0,M.addClassName)(e,"jsoneditor-is-not-default")))}},{key:"_showTimestampTag",value:function(){if("number"!=typeof this.value)return!1;var e=this.editor.options.timestampTag;return"function"!=typeof e?!0===e&&(0,M.isTimestamp)(this.field,this.value):(e=e({field:this.field,value:this.value,path:this.getPath()}),"boolean"==typeof e?e:(0,M.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var e,t=this.dom;if(t.tr)return t.tr;this._updateEditability(),t.tr=document.createElement("tr"),"tree"===(t.tr.node=this).editor.options.mode&&(e=document.createElement("td"),this.editable.field&&this.parent&&((i=document.createElement("button")).type="button",(t.drag=i).className="jsoneditor-button jsoneditor-dragarea",i.title=(0,w.Iu)("drag"),e.appendChild(i)),t.tr.appendChild(e),i=document.createElement("td"),(e=document.createElement("button")).type="button",(t.menu=e).className="jsoneditor-button jsoneditor-contextmenu-button",e.title=(0,w.Iu)("actionsMenu"),i.appendChild(t.menu),t.tr.appendChild(i));var i=document.createElement("td");return t.tr.appendChild(i),t.tree=this._createDomTree(),i.appendChild(t.tree),this.updateDom({updateIndexes:!0}),t.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(e){this.dom.tr&&((e?M.addClassName:M.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))}},{key:"setSelected",value:function(e,t){this.selected=e,this.dom.tr&&((e?M.addClassName:M.removeClassName)(this.dom.tr,"jsoneditor-selected"),(t?M.addClassName:M.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(e),this.showMore&&this.showMore.setSelected(e),this.childs&&this.childs.forEach(function(t){t.setSelected(e)}))}},{key:"updateValue",value:function(e){this.value=e,this.previousValue=e,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(e){this.field=e,this.previousField=e,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(t){var i=this.dom.tree;i&&(i.style.marginLeft=24*this.getLevel()+"px"),(i=this.dom.field)&&(this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="jsoneditor-field"):(i.contentEditable=!1,i.className="jsoneditor-readonly"),n=void 0!==this.index?this.index:void 0!==this.field?this.field:(n=this.editor.options.schema?e._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&n.title?n.title:this._hasChilds()?this.type:"",n=this._escapeHTML(n),document.activeElement!==i&&n!==this._unescapeHTML((0,M.getInnerText)(i))&&(i.innerHTML=n),this._updateSchema());var n=this.dom.value;n&&("array"===this.type||"object"===this.type?this.updateNodeName():(o=this._escapeHTML(this.value),document.activeElement!==n&&o!==this._unescapeHTML((0,M.getInnerText)(n))&&(n.innerHTML=o)));var o=this.dom.tr;o&&("array"===this.type||"object"===this.type?((0,M.addClassName)(o,"jsoneditor-expandable"),this.expanded?((0,M.addClassName)(o,"jsoneditor-expanded"),(0,M.removeClassName)(o,"jsoneditor-collapsed")):((0,M.addClassName)(o,"jsoneditor-collapsed"),(0,M.removeClassName)(o,"jsoneditor-expanded"))):((0,M.removeClassName)(o,"jsoneditor-expandable"),(0,M.removeClassName)(o,"jsoneditor-expanded"),(0,M.removeClassName)(o,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),t&&!0===t.updateIndexes&&this._updateDomIndexes(),t&&!0===t.recurse&&this.childs&&this.childs.forEach(function(e){e.updateDom(t)}),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?e._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=e._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var e=this.dom.value,t=this.childs;e&&t&&("array"===this.type?t.forEach(function(e,t){e.index=t,(e=e.dom.field)&&(e.textContent=t)}):"object"===this.type&&t.forEach(function(e){void 0!==e.index&&(delete e.index,void 0===e.field&&(e.field=""))}))}},{key:"_createDomValue",value:function(){var e;return"array"===this.type?(e=document.createElement("div")).textContent="[...]":"object"===this.type?(e=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,M.isUrl)(this.value)?(e=document.createElement("a")).href=this.value:((e=document.createElement("div")).contentEditable=this.editable.value,e.spellcheck=!1),e.innerHTML=this._escapeHTML(this.value)),e}},{key:"_createDomExpandButton",value:function(){var e=document.createElement("button");return e.type="button",this._hasChilds()?(e.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",e.title=(0,w.Iu)("expandTitle")):(e.className="jsoneditor-button jsoneditor-invisible",e.title=""),e}},{key:"_createDomTree",value:function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(i);var n=document.createElement("tr");return i.appendChild(n),i=document.createElement("td"),i.className="jsoneditor-tree",n.appendChild(i),e.expand=this._createDomExpandButton(),i.appendChild(e.expand),e.tdExpand=i,i=document.createElement("td"),i.className="jsoneditor-tree",n.appendChild(i),e.field=this._createDomField(),i.appendChild(e.field),e.tdField=i,i=document.createElement("td"),i.className="jsoneditor-tree",n.appendChild(i),"object"!==this.type&&"array"!==this.type&&(i.appendChild(document.createTextNode(":")),i.className="jsoneditor-separator"),e.tdSeparator=i,i=document.createElement("td"),i.className="jsoneditor-tree",n.appendChild(i),e.value=this._createDomValue(),i.appendChild(e.value),e.tdValue=i,t}},{key:"onEvent",value:function(e){var t,i=e.type,n=e.target||e.srcElement,o=this.dom,r=this,s=this._hasChilds();n!==o.drag&&n!==o.menu||("mouseover"===i?this.editor.highlighter.highlight(this):"mouseout"===i&&this.editor.highlighter.unhighlight()),"click"===i&&n===o.menu&&((t=r.editor.highlighter).highlight(r),t.lock(),(0,M.addClassName)(o.menu,"jsoneditor-selected"),this.showContextMenu(o.menu,function(){(0,M.removeClassName)(o.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()})),"click"===i&&n===o.expand&&s&&(h=e.ctrlKey,this._onExpand(h)),"click"!==i||e.target!==r.dom.tdColor&&e.target!==r.dom.color||this._showColorPicker(),"change"===i&&n===o.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),"change"===i&&n===o.select&&(this.dom.value.innerHTML=this._escapeHTML(o.select.value),this._getDomValue(),this._updateDomValue());var a=o.value;if(n===a)switch(i){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var l=this._escapeHTML(this.value);l!==this._unescapeHTML((0,M.getInnerText)(a))&&(a.innerHTML=l);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":e.ctrlKey&&this.editable.value&&(0,M.isUrl)(this.value)&&(e.preventDefault(),window.open(this.value,"_blank","noopener"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(),r._updateDomValue()},1)}var c=o.field;if(n===c)switch(i){case"blur":this._getDomField(!0),this._updateDomField();var d=this._escapeHTML(this.field);d!==this._unescapeHTML((0,M.getInnerText)(c))&&(c.innerHTML=d);break;case"input":this._getDomField(),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"keyup":this._getDomField(),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(),r._updateDomField()},1)}var h=o.tree;h&&n===h.parentNode&&"click"===i&&!e.hasMoved&&((void 0!==e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<(0,M.getAbsoluteLeft)(o.tdSeparator))||s?c&&((0,M.setEndOfContentEditable)(c),c.focus()):a&&!this.enum&&((0,M.setEndOfContentEditable)(a),a.focus())),(n!==o.tdExpand||s)&&n!==o.tdField&&n!==o.tdSeparator||"click"!==i||e.hasMoved||c&&((0,M.setEndOfContentEditable)(c),c.focus()),"keydown"===i&&this.onKeyDown(e),"function"==typeof this.editor.options.onEvent&&this._onEvent(e)}},{key:"_onEvent",value:function(e){var t=e.target,i=t===this.dom.field,t=t===this.dom.value||t===this.dom.checkbox||t===this.dom.select;(i||t)&&(i={field:this.getField(),path:this.getPath()},t&&!this._hasChilds()&&(i.value=this.getValue()),this.editor.options.onEvent(i,e))}},{key:"onKeyDown",value:function(t){var i,n,o,r,s,a,l,c,d,h,g,p,m,f,C,I,A,b=t.which||t.keyCode,v=t.target||t.srcElement,y=t.ctrlKey,w=t.shiftKey,x=t.altKey,S=!1,k="tree"===this.editor.options.mode,T=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],N=T[0],R=T[T.length-1];13===b?v===this.dom.value?this.editable.value&&!t.ctrlKey||(0,M.isUrl)(this.value)&&(window.open(this.value,"_blank","noopener"),S=!0):v===this.dom.expand&&this._hasChilds()&&(g=t.ctrlKey,this._onExpand(g),v.focus(),S=!0):68===b?y&&k&&(e.onDuplicate(T),S=!0):69===b?y&&(this._onExpand(w),v.focus(),S=!0):77===b&&k?y&&(this.showContextMenu(v),S=!0):46===b&&k?y&&(e.onRemove(T),S=!0):45===b&&k?y&&!w?(this._onInsertBefore(),S=!0):y&&w&&(this._onInsertAfter(),S=!0):35===b?x&&((g=this._lastNode())&&g.focus(e.focusElement||this._getElementName(v)),S=!0):36===b?x&&((p=this._firstNode())&&p.focus(e.focusElement||this._getElementName(v)),S=!0):37===b?x&&!w?((p=this._previousElement(v))&&this.focus(this._getElementName(p)),S=!0):x&&w&&k&&(f=R.expanded?(f=R.getAppendDom())?f.nextSibling:void 0:R.getDom().nextSibling)&&(m=e.getNodeFromTarget(f),f=f.nextSibling,C=e.getNodeFromTarget(f),m&&m instanceof Z&&1!==R.parent.childs.length&&C&&C.parent&&(n=this.editor.getDomSelection(),o=(r=N.parent).childs[R.getIndex()+1]||r.append,s=N.getIndex(),a=C.getIndex(),l=r.getInternalPath(),c=C.parent.getInternalPath(),T.forEach(function(e){C.parent.moveBefore(e,C)}),this.focus(e.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:T.length,fieldNames:T.map(u),oldParentPath:r.getInternalPath(),newParentPath:N.parent.getInternalPath(),oldIndex:o.getIndex(),newIndex:N.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()}))):38===b?x&&!w?((i=this._previousNode())&&(this.editor.deselect(!0),i.focus(e.focusElement||this._getElementName(v))),S=!0):!x&&y&&w&&k?((i=this._previousNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=i,d=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(d),i.focus("field")),S=!0):x&&w&&k&&((i=N._previousNode())&&i.parent&&(n=this.editor.getDomSelection(),o=(r=N.parent).childs[R.getIndex()+1]||r.append,s=N.getIndex(),a=i.getIndex(),l=r.getInternalPath(),c=i.parent.getInternalPath(),T.forEach(function(e){i.parent.moveBefore(e,i)}),this.focus(e.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:T.length,fieldNames:T.map(u),oldParentPath:r.getInternalPath(),newParentPath:N.parent.getInternalPath(),oldIndex:o.getIndex(),newIndex:N.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()})),S=!0):39===b?x&&!w?((I=this._nextElement(v))&&this.focus(this._getElementName(I)),S=!0):x&&w&&k&&(I=N.getDom().previousSibling)&&(i=e.getNodeFromTarget(I))&&i.parent&&!i.isVisible()&&(n=this.editor.getDomSelection(),o=(r=N.parent).childs[R.getIndex()+1]||r.append,s=N.getIndex(),a=i.getIndex(),l=r.getInternalPath(),c=i.parent.getInternalPath(),T.forEach(function(e){i.parent.moveBefore(e,i)}),this.focus(e.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:T.length,fieldNames:T.map(u),oldParentPath:r.getInternalPath(),newParentPath:N.parent.getInternalPath(),oldIndex:o.getIndex(),newIndex:N.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()})):40===b&&(x&&!w?((m=this._nextNode())&&(this.editor.deselect(!0),m.focus(e.focusElement||this._getElementName(v))),S=!0):!x&&y&&w&&k?((m=this._nextNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=m,d=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(d),m.focus("field")),S=!0):x&&w&&k&&((A=(m=(m=(m=R.expanded?R.append?R.append._nextNode():void 0:R._nextNode())&&!m.isVisible()?m.parent.showMore:m)&&m instanceof Z?R:m)&&(m._nextNode()||m.parent.append))&&A.parent&&(n=this.editor.getDomSelection(),o=(r=N.parent).childs[R.getIndex()+1]||r.append,s=N.getIndex(),a=A.getIndex(),l=r.getInternalPath(),c=A.parent.getInternalPath(),T.forEach(function(e){A.parent.moveBefore(e,A)}),this.focus(e.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:T.length,fieldNames:T.map(u),oldParentPath:r.getInternalPath(),newParentPath:N.parent.getInternalPath(),oldParentPathRedo:l,newParentPathRedo:c,oldIndexRedo:s,newIndexRedo:a,oldIndex:o.getIndex(),newIndex:N.getIndex(),oldSelection:n,newSelection:this.editor.getDomSelection()})),S=!0)),S&&(t.preventDefault(),t.stopPropagation())}},{key:"_onExpand",value:function(e){var t,i,n;e&&(n=(i=(t=this.dom.tr.parentNode).parentNode).scrollTop,i.removeChild(t)),this.expanded?this.collapse(e):this.expand(e),e&&(i.appendChild(t),i.scrollTop=n)}},{key:"_showColorPicker",value:function(){var e,t;"function"==typeof this.editor.options.onColorPicker&&this.dom.color&&((e=this)._deleteDomColor(),e.updateDom(),t=(0,T.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(t,this.value,function(t){"string"==typeof t&&t!==e.value&&(e._deleteDomColor(),e.value=t,e.updateDom(),e._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(e){return"object"===this.type?this.childs.filter(function(t){return t!==e}).map(function(e){return e.field}):[]}},{key:"_onInsertBefore",value:function(t,i,n){var o=this.editor.getDomSelection(),t=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==i?i:"",type:n});t.expand(!0),i=this.getInternalPath(),this.parent.insertBefore(t,this),this.editor.highlighter.unhighlight(),t.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("insertBeforeNodes",{nodes:[t],paths:[t.getInternalPath()],beforePath:i,parentPath:this.parent.getInternalPath(),oldSelection:o,newSelection:n})}},{key:"_onInsertAfter",value:function(t,i,n){var o=this.editor.getDomSelection(),i=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==i?i:"",type:n});i.expand(!0),this.parent.insertAfter(i,this),this.editor.highlighter.unhighlight(),i.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("insertAfterNodes",{nodes:[i],paths:[i.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:o,newSelection:n})}},{key:"_onAppend",value:function(t,i,n){var o=this.editor.getDomSelection(),i=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==i?i:"",type:n});i.expand(!0),this.parent.appendChild(i),this.editor.highlighter.unhighlight(),i.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("appendNodes",{nodes:[i],paths:[i.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:o,newSelection:n})}},{key:"_onChangeType",value:function(e){var t,i,n=this.type;e!==n&&(t=this.editor.getDomSelection(),this.changeType(e),i=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:n,newType:e,oldSelection:t,newSelection:i}))}},{key:"sort",value:function(e,t){var i,n,o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];"string"==typeof e&&(e=(0,M.parsePath)(e)),this._hasChilds()&&(this.hideChilds(),i=this.childs,this.childs=this.childs.concat(),n="desc"===t?-1:1,"object"===this.type?this.childs.sort(function(e,t){return n*k()(e.field,t.field)}):this.childs.sort(function(t,i){return t=t.getNestedChild(e),i=i.getNestedChild(e),t?i?(t=t.value,i=i.value,"string"!=typeof t&&"string"!=typeof i?i<t?n:t<i?-n:0:n*k()(t,i)):-n:n}),this._updateDomIndexes(),this.showChilds(),!0===o&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:i,newChilds:this.childs}))}},{key:"update",value:function(e){var t=this.getInternalValue();this.setValue(e),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var e=this.dom.tr?this.dom.tr.parentNode:void 0,t=this.expanded?this.getAppendDom():this.getDom(),t=t&&t.parentNode?t.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:e,nextTr:t}}},{key:"_attachToDom",value:function(e){e.table&&(e.nextTr?e.table.insertBefore(this.getDom(),e.nextTr):e.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(e){if(this._hasChilds()){this.hideChilds();try{var t=this.getInternalValue(),i=this.getValue(),n=this.editor.options.executeQuery(i,e);this.setValue(n);var o=this.getInternalValue();this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:o}),this.showChilds()}catch(e){this.showChilds(),this.editor._onError(e)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var e=this.editor.node.getInternalValue();this.editor._setRoot(this);var t=this.editor.node.getInternalValue();this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:e,newValue:t})}catch(e){this.editor._onError(e)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(e){for(var t=0,i=this;i&&t<e.length;)i=i.findChildByProperty(e[t]),t++;return i}},{key:"findChildByProperty",value:function(e){if("object"===this.type)return this.childs.find(function(t){return t.field===e})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new Z(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new W(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var e=this.parent.childs.indexOf(this);return this.parent.childs[e+1]||this.parent.append}},{key:"_previousNode",value:function(){var t=null,i=this.getDom();if(i&&i.parentNode)for(var n=i;n=n.previousSibling,t=e.getNodeFromTarget(n),n&&t&&t instanceof Z&&!t.isVisible(););return t}},{key:"_nextNode",value:function(){var t=null,i=this.getDom();if(i&&i.parentNode)for(var n=i;n=n.nextSibling,t=e.getNodeFromTarget(n),n&&t&&t instanceof Z&&!t.isVisible(););return t}},{key:"_firstNode",value:function(){var t=null,i=this.getDom();return i&&i.parentNode&&(i=i.parentNode.firstChild,t=e.getNodeFromTarget(i)),t}},{key:"_lastNode",value:function(){var t=null,i=this.getDom();if(i&&i.parentNode)for(var n=i.parentNode.lastChild,t=e.getNodeFromTarget(n);n&&t&&!t.isVisible();)n=n.previousSibling,t=e.getNodeFromTarget(n);return t}},{key:"_previousElement",value:function(e){var t=this.dom;switch(e){case t.value:if(this.fieldEditable)return t.field;case t.field:if(this._hasChilds())return t.expand;case t.expand:return t.menu;case t.menu:if(t.drag)return t.drag;default:return null}}},{key:"_nextElement",value:function(e){var t=this.dom;switch(e){case t.drag:return t.menu;case t.menu:if(this._hasChilds())return t.expand;case t.expand:if(this.fieldEditable)return t.field;case t.field:if(!this._hasChilds())return t.value;default:return null}}},{key:"_getElementName",value:function(e){var t=this;return Object.keys(this.dom).find(function(i){return t.dom[i]===e})}},{key:"_hasChilds",value:function(){return"array"===this.type||"object"===this.type}},{key:"addTemplates",value:function(e,t){var i=this,n=i.editor.options.templates;null!=n&&(n.length&&e.push({type:"separator"}),n.forEach(function(n){e.push({text:n.text,className:n.className||"jsoneditor-type-object",title:n.title,click:(t?function(e,t){i._onAppend(e,t)}:function(e,t){i._onInsertBefore(e,t)}).bind(this,n.field,n.value)})}))}},{key:"showContextMenu",value:function(t,i){var n,o,r=this,s=[];this.editable.value&&s.push({text:(0,w.Iu)("type"),title:(0,w.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,w.Iu)("auto"),className:"jsoneditor-type-auto"+("auto"===this.type?" jsoneditor-selected":""),title:(0,w.Iu)("autoType"),click:function(){r._onChangeType("auto")}},{text:(0,w.Iu)("array"),className:"jsoneditor-type-array"+("array"===this.type?" jsoneditor-selected":""),title:(0,w.Iu)("arrayType"),click:function(){r._onChangeType("array")}},{text:(0,w.Iu)("object"),className:"jsoneditor-type-object"+("object"===this.type?" jsoneditor-selected":""),title:(0,w.Iu)("objectType"),click:function(){r._onChangeType("object")}},{text:(0,w.Iu)("string"),className:"jsoneditor-type-string"+("string"===this.type?" jsoneditor-selected":""),title:(0,w.Iu)("stringType"),click:function(){r._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&s.push({text:(0,w.Iu)("sort"),title:(0,w.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){r.showSortModal()}}),this.editor.options.enableTransform&&s.push({text:(0,w.Iu)("transform"),title:(0,w.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){r.showTransformModal()}}),this.parent&&s.push({text:(0,w.Iu)("extract"),title:(0,w.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){r.extract()}})),this.parent&&this.parent._hasChilds()&&(s.length&&s.push({type:"separator"}),n=r.parent.childs,r===n[n.length-1]&&(o=[{text:(0,w.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,w.Iu)("autoType"),click:function(){r._onAppend("","","auto")}},{text:(0,w.Iu)("array"),className:"jsoneditor-type-array",title:(0,w.Iu)("arrayType"),click:function(){r._onAppend("",[])}},{text:(0,w.Iu)("object"),className:"jsoneditor-type-object",title:(0,w.Iu)("objectType"),click:function(){r._onAppend("",{})}},{text:(0,w.Iu)("string"),className:"jsoneditor-type-string",title:(0,w.Iu)("stringType"),click:function(){r._onAppend("","","string")}}],r.addTemplates(o,!0),s.push({text:(0,w.Iu)("appendText"),title:(0,w.Iu)("appendTitle"),submenuTitle:(0,w.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){r._onAppend("","","auto")},submenu:o})),o=[{text:(0,w.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,w.Iu)("autoType"),click:function(){r._onInsertBefore("","","auto")}},{text:(0,w.Iu)("array"),className:"jsoneditor-type-array",title:(0,w.Iu)("arrayType"),click:function(){r._onInsertBefore("",[])}},{text:(0,w.Iu)("object"),className:"jsoneditor-type-object",title:(0,w.Iu)("objectType"),click:function(){r._onInsertBefore("",{})}},{text:(0,w.Iu)("string"),className:"jsoneditor-type-string",title:(0,w.Iu)("stringType"),click:function(){r._onInsertBefore("","","string")}}],r.addTemplates(o,!1),s.push({text:(0,w.Iu)("insert"),title:(0,w.Iu)("insertTitle"),submenuTitle:(0,w.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){r._onInsertBefore("","","auto")},submenu:o}),this.editable.field&&(s.push({text:(0,w.Iu)("duplicateText"),title:(0,w.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){e.onDuplicate(r)}}),s.push({text:(0,w.Iu)("removeText"),title:(0,w.Iu)("removeField"),className:"jsoneditor-remove",click:function(){e.onRemove(r)}}))),this.editor.options.onCreateMenu&&(o=r.getPath(),s=this.editor.options.onCreateMenu(s,{type:"single",path:o,paths:[o]})),new b.x(s,{close:i}).show(t,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var e=this,t=this.editor.options.modalAnchor||E.qD,i=this.getValue();(0,N.showSortModal)(t,i,function(t){var i=t.path,i=(0,M.parsePath)(i);e.sortedBy=t,e.sort(i,t.direction)},e.sortedBy)}},{key:"showTransformModal",value:function(){var e=this,t=this.editor.options,i=t.modalAnchor,n=t.createQuery,o=t.executeQuery,r=t.queryDescription,t=this.getValue();(0,R.showTransformModal)({container:i||E.qD,json:t,queryDescription:r,createQuery:n,executeQuery:o,onTransform:function(t){e.transform(t)}})}},{key:"_getType",value:function(e){return e instanceof Array?"array":e instanceof Object?"object":"string"==typeof e&&"string"!=typeof(0,M.parseString)(e)?"string":"auto"}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?String(e):(e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/^ /," ").replace(/ $/," "),e=JSON.stringify(e),e=e.substring(1,e.length-1),e=!0===this.editor.options.escapeUnicode?(0,M.escapeUnicodeChars)(e):e)}},{key:"_unescapeHTML",value:function(e){return e='"'+this._escapeJSON(e)+'"',(0,M.parse)(e).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(e){for(var t="",i=0;i<e.length;){var n=e.charAt(i);"\n"===n?t+="\\n":"\\"===n?(t+=n,i++,""!==(n=e.charAt(i))&&-1!=='"\\/bfnrtu'.indexOf(n)||(t+="\\"),t+=n):t+='"'===n?'\\"':n,i++}return t}},{key:"updateNodeName",value:function(){var e,t=this.childs?this.childs.length:0;if("object"===this.type||"array"===this.type){if(this.editor.options.onNodeName)try{e=this.editor.options.onNodeName({path:this.getPath(),size:t,type:this.type})}catch(e){console.error("Error in onNodeName callback: ",e)}this.dom.value.textContent="object"===this.type?"{"+(e||t)+"}":"["+(e||t)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),"undefined"!==this.childs))for(var e in this.childs)this.childs[e].recursivelyUpdateNodeName()}}])&&d(t.prototype,i),e}();L.prototype.DEBOUNCE_INTERVAL=150,L.prototype.MAX_SEARCH_RESULTS=999;var j=100;L.focusElement=void 0,L.select=function(e){setTimeout(function(){(0,M.selectContentEditable)(e)},0)},L.onDragStart=function(e,t){if(!Array.isArray(e))return L.onDragStart([e],t);var i,n,o,r,s;0!==e.length&&(i=e[0],n=e[e.length-1],o=i.parent,s=L.getNodeFromTarget(t.target),r=i.editor,s=(0,M.getAbsoluteTop)(s.dom.tr)-(0,M.getAbsoluteTop)(i.dom.tr),r.mousemove||(r.mousemove=(0,M.addEventListener)(t.view,"mousemove",function(t){L.onDrag(e,t)})),r.mouseup||(r.mouseup=(0,M.addEventListener)(t.view,"mouseup",function(t){L.onDragEnd(e,t)})),r.highlighter.lock(),r.drag={oldCursor:document.body.style.cursor,oldSelection:r.getDomSelection(),oldPaths:e.map(h),oldParent:o,oldNextNode:o.childs[n.getIndex()+1]||o.append,oldParentPathRedo:o.getInternalPath(),oldIndexRedo:i.getIndex(),mouseX:t.pageX,offsetY:s,level:i.getLevel()},document.body.style.cursor="move",t.preventDefault())},L.onDrag=function(e,t){if(!Array.isArray(e))return L.onDrag([e],t);if(0!==e.length){var i,n,o,r,s,a=e[0].editor,l=t.pageY-a.drag.offsetY,c=t.pageX,d=!1,h=e[0],u=h.dom.tr,g=(0,M.getAbsoluteTop)(u),p=u.offsetHeight;if(l<g){for(A=u;A=A.previousSibling,b=L.getNodeFromTarget(A),o=A?(0,M.getAbsoluteTop)(A):0,A&&l<o;);(b=b&&!b.parent?void 0:b)||(A=(m=u.parentNode.firstChild)?m.nextSibling:void 0,(b=L.getNodeFromTarget(A))===h&&(b=void 0)),!(b=b&&b.isVisible()&&(o=(A=b.dom.tr)?(0,M.getAbsoluteTop)(A):0)+p<l?void 0:b)||!1!==a.options.limitDragging&&b.parent!==e[0].parent||(e.forEach(function(e){b.parent.moveBefore(e,b)}),d=!0)}else{var m,f=e[e.length-1];if(p=(m=f.expanded&&f.append?f.append.getDom():f.dom.tr)?m.nextSibling:void 0){for(r=(0,M.getAbsoluteTop)(p),i=p;n=L.getNodeFromTarget(i),i&&(s=i.nextSibling?(0,M.getAbsoluteTop)(i.nextSibling):0,s=i?s-r:0,n&&n.parent.childs.length===e.length&&n.parent.childs[e.length-1]===f&&(g+=27),i=i.nextSibling),i&&g+s<l;);if(n&&n.parent){for(var p=c-a.drag.mouseX,p=Math.round(p/24/2),C=a.drag.level+p,I=n.getLevel(),A=n.dom.tr&&n.dom.tr.previousSibling;I<C&&A;){var b=L.getNodeFromTarget(A),v=e.some(function(e){return e===b||b.isDescendantOf(e)});if(!v){if(!(b instanceof Z))break;if(v=b.parent.childs,v.length===e.length&&v[e.length-1]===f)break;I=(n=L.getNodeFromTarget(A)).getLevel()}A=A.previousSibling}(n=n instanceof Z&&!n.isVisible()&&n.parent.showMore.isVisible()?n._nextNode():n)&&(!1===a.options.limitDragging||n.parent===e[0].parent)&&n.dom.tr&&n.dom.tr!==m.nextSibling&&(e.forEach(function(e){n.parent.moveBefore(e,n)}),d=!0)}}}d&&(a.drag.mouseX=c,a.drag.level=h.getLevel()),a.startAutoScroll(l),t.preventDefault()}},L.onDragEnd=function(e,t){if(!Array.isArray(e))return L.onDrag([e],t);var i,n,o,r,s,a,l,c,d;0!==e.length&&(d=e[0],i=d.editor,d&&d.dom.menu&&d.dom.menu.focus(),n=i.drag.oldParent.getInternalPath(),o=d.parent.getInternalPath(),r=i.drag.oldParent===d.parent,s=i.drag.oldNextNode.getIndex(),a=d.getIndex(),l=i.drag.oldParentPathRedo,c=i.drag.oldIndexRedo,d=r&&c<a?a+e.length:a,r&&c===a||i._onAction("moveNodes",{count:e.length,fieldNames:e.map(u),oldParentPath:n,newParentPath:o,oldIndex:s,newIndex:a,oldIndexRedo:c,newIndexRedo:d,oldParentPathRedo:l,newParentPathRedo:null,oldSelection:i.drag.oldSelection,newSelection:i.getDomSelection()}),document.body.style.cursor=i.drag.oldCursor,i.highlighter.unlock(),e.forEach(function(e){e.updateDom(),t.target!==e.dom.drag&&t.target!==e.dom.menu&&i.highlighter.unhighlight()}),delete i.drag,i.mousemove&&((0,M.removeEventListener)(t.view,"mousemove",i.mousemove),delete i.mousemove),i.mouseup&&((0,M.removeEventListener)(t.view,"mouseup",i.mouseup),delete i.mouseup),i.stopAutoScroll(),t.preventDefault())},L._findEnum=function(e){return e.enum?e.enum:(e=e.oneOf||e.anyOf||e.allOf,e&&(e=e.filter(function(e){return e.enum}),0<e.length)?e[0].enum:null)},L._findSchema=function(e,t,i){for(var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:e,a=i.slice(1,i.length),l=i[0],d=[n],h=0,u=[n.oneOf,n.anyOf,n.allOf];h<u.length;h++){var g=u[h];Array.isArray(g)&&(d=d.concat(g))}var p,m=s(d);try{for(m.s();!(p=m.n()).done;){if("$ref"in(n=p.value)&&"string"==typeof n.$ref){var f,C=n.$ref;if(C in t)n=t[C];else{if(!C.startsWith("#/")){if(1!==(null===(f=C.match(/#\//g))||void 0===f?void 0:f.length))throw Error("Unable to resolve reference ".concat(C));var I=r(C.split("#/"),2),A=I[0],b=I[1];if(A in t){var v=t[A],y={$ref:"#/".concat(b)},w=[];return w.push(l),0<a.length&&w.push.apply(w,o(a)),L._findSchema(v,t,w,y)}throw Error("Unable to resolve reference ".concat(C))}var x,S=C.substring(2).split("/"),n=e,k=s(S);try{for(k.s();!(x=k.n()).done;){var T=x.value;if(!(T in n))throw Error("Unable to resovle reference ".concat(C));n=n[T]}}catch(e){k.e(e)}finally{k.f()}}}if(void 0===l)return n;if("string"!=typeof l){if("number"==typeof l&&"object"===c(n.items)&&null!==n.items)return n=n.items,L._findSchema(e,t,a,n)}else{if("object"===c(n.properties)&&null!==n.properties&&l in n.properties)return n=n.properties[l],L._findSchema(e,t,a,n);if("object"===c(n.patternProperties)&&null!==n.patternProperties)for(var M in n.patternProperties)if(l.match(M))return n=n.patternProperties[M],L._findSchema(e,t,a,n);if("object"===c(n.additionalProperties))return n=n.additionalProperties,L._findSchema(e,t,a,n)}}}catch(e){m.e(e)}finally{m.f()}return null},L.onRemove=function(e){if(!Array.isArray(e))return L.onRemove([e]);var t,i,n,o,r,s;e&&0<e.length&&(t=(s=e[0]).parent,i=s.editor,n=s.getIndex(),i.highlighter.unhighlight(),o=i.getDomSelection(),L.blurNodes(e),r=i.getDomSelection(),s=e.map(h),e.forEach(function(e){e.parent._remove(e)}),i._onAction("removeNodes",{nodes:e,paths:s,parentPath:t.getInternalPath(),index:n,oldSelection:o,newSelection:r}))},L.onDuplicate=function(e){if(!Array.isArray(e))return L.onDuplicate([e]);var t,i,n,o,r,s,a;e&&0<e.length&&(t=e[e.length-1],i=t.parent,(n=t.editor).deselect(n.multiselection.nodes),o=n.getDomSelection(),r=t,s=e.map(function(e){var t,n=e.clone();return"object"===e.parent.type&&(t=e.parent.getFieldNames(),n.field=(0,M.findUniqueName)(e.field,t)),i.insertAfter(n,r),r=n}),1===e.length?"object"===s[0].parent.type?(s[0].dom.field.innerHTML=e[0]._escapeHTML(e[0].field),s[0].focus("field")):s[0].focus():n.select(s),a=n.getDomSelection(),n._onAction("duplicateNodes",{paths:e.map(h),clonePaths:s.map(h),afterPath:t.getInternalPath(),parentPath:i.getInternalPath(),oldSelection:o,newSelection:a}))},L.getNodeFromTarget=function(e){for(;e;){if(e.node)return e.node;e=e.parentNode}},L.targetIsColorPicker=function(e){var t=L.getNodeFromTarget(e);if(t)for(var i=e&&e.parentNode;i;){if(i===t.dom.color)return!0;i=i.parentNode}return!1},L.blurNodes=function(e){var t,i;Array.isArray(e)?(t=(i=e[0]).parent,i=i.getIndex(),(t.childs[i+e.length]?t.childs[i+e.length]:t.childs[i-1]||t).focus()):L.blurNodes([e])};var Z=((p.prototype=new L).getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr");t.className="jsoneditor-append",t.node=this,e.tr=t,"tree"===this.editor.options.mode&&(e.tdDrag=document.createElement("td"),n=document.createElement("td"),e.tdMenu=n,(i=document.createElement("button")).type="button",i.className="jsoneditor-button jsoneditor-contextmenu-button",i.title="Click to open the actions menu (Ctrl+M)",e.menu=i,n.appendChild(e.menu));var i=document.createElement("td"),n=document.createElement("div");return n.appendChild(document.createTextNode("("+(0,w.Iu)("empty")+")")),n.className="jsoneditor-readonly",i.appendChild(n),e.td=i,e.text=n,this.updateDom(),t},p.prototype.getPath=function(){return null},p.prototype.getIndex=function(){return null},p.prototype.updateDom=function(e){var t=this.dom,i=t.td;i&&(i.style.paddingLeft=24*this.getLevel()+26+"px");var n=t.text;n&&(n.firstChild.nodeValue="("+(0,w.Iu)("empty")+" "+this.parent.type+")"),n=t.tr,this.isVisible()?t.tr.firstChild||(t.tdDrag&&n.appendChild(t.tdDrag),t.tdMenu&&n.appendChild(t.tdMenu),n.appendChild(i)):t.tr.firstChild&&(t.tdDrag&&n.removeChild(t.tdDrag),t.tdMenu&&n.removeChild(t.tdMenu),n.removeChild(i))},p.prototype.isVisible=function(){return 0===this.parent.childs.length},p.prototype.showContextMenu=function(e,t){var i=this,n=[{text:(0,w.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,w.Iu)("autoType"),click:function(){i._onAppend("","","auto")}},{text:(0,w.Iu)("array"),className:"jsoneditor-type-array",title:(0,w.Iu)("arrayType"),click:function(){i._onAppend("",[])}},{text:(0,w.Iu)("object"),className:"jsoneditor-type-object",title:(0,w.Iu)("objectType"),click:function(){i._onAppend("",{})}},{text:(0,w.Iu)("string"),className:"jsoneditor-type-string",title:(0,w.Iu)("stringType"),click:function(){i._onAppend("","","string")}}];i.addTemplates(n,!0);var o=[{text:(0,w.Iu)("appendText"),title:(0,w.Iu)("appendTitleAuto"),submenuTitle:(0,w.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){i._onAppend("","","auto")},submenu:n}];this.editor.options.onCreateMenu&&(n=i.parent.getPath(),o=this.editor.options.onCreateMenu(o,{type:"append",path:n,paths:[n]})),new b.x(o,{close:t}).show(e,this.editor.getPopupAnchor())},p.prototype.onEvent=function(e){var t,i=e.type,n=e.target||e.srcElement,o=this.dom;n===o.menu&&("mouseover"===i?this.editor.highlighter.highlight(this.parent):"mouseout"===i&&this.editor.highlighter.unhighlight()),"click"===i&&n===o.menu&&((t=this.editor.highlighter).highlight(this.parent),t.lock(),(0,M.addClassName)(o.menu,"jsoneditor-selected"),this.showContextMenu(o.menu,function(){(0,M.removeClassName)(o.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()})),"keydown"===i&&this.onKeyDown(e)},p),W=((m.prototype=new L).getDom=function(){return this.dom.tr||(this._updateEditability(),this.dom.tr||(t=(e=this).parent,(o=document.createElement("a")).appendChild(document.createTextNode((0,w.Iu)("showMore"))),o.href="#",o.onclick=function(i){return t.visibleChilds=Math.floor(t.visibleChilds/t.getMaxVisibleChilds()+1)*t.getMaxVisibleChilds(),e.updateDom(),t.showChilds(),i.preventDefault(),!1},(r=document.createElement("a")).appendChild(document.createTextNode((0,w.Iu)("showAll"))),r.href="#",r.onclick=function(i){return t.visibleChilds=1/0,e.updateDom(),t.showChilds(),i.preventDefault(),!1},i=document.createElement("div"),n=document.createTextNode(this._getShowMoreText()),i.className="jsoneditor-show-more",i.appendChild(n),i.appendChild(o),i.appendChild(document.createTextNode(". ")),i.appendChild(r),i.appendChild(document.createTextNode(". ")),(o=document.createElement("td")).appendChild(i),r=document.createElement("tr"),"tree"===this.editor.options.mode&&(r.appendChild(document.createElement("td")),r.appendChild(document.createElement("td"))),r.appendChild(o),r.className="jsoneditor-show-more",this.dom.tr=r,this.dom.moreContents=i,this.dom.moreText=n),this.updateDom(),this.dom.tr);var e,t,i,n,o,r},m.prototype.updateDom=function(e){var t;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(t=this.parent._getNextTr())&&t.parentNode.insertBefore(this.dom.tr,t),this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"):this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},m.prototype._getShowMoreText=function(){return(0,w.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},m.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},m.prototype.onEvent=function(e){"keydown"===e.type&&this.onKeyDown(e)},m),O=function(){function e(t){function i(e){return t.node.findNodeByInternalPath(e)}!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=t,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(e){i(e.parentPath).childs[e.index].updateField(e.oldValue)},redo:function(e){i(e.parentPath).childs[e.index].updateField(e.newValue)}},editValue:{undo:function(e){i(e.path).updateValue(e.oldValue)},redo:function(e){i(e.path).updateValue(e.newValue)}},changeType:{undo:function(e){i(e.path).changeType(e.oldType)},redo:function(e){i(e.path).changeType(e.newType)}},appendNodes:{undo:function(e){var t=i(e.parentPath);e.paths.map(i).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=i(e.parentPath);e.nodes.forEach(function(e){t.appendChild(e)})}},insertBeforeNodes:{undo:function(e){var t=i(e.parentPath);e.paths.map(i).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=i(e.parentPath),n=i(e.beforePath);e.nodes.forEach(function(e){t.insertBefore(e,n)})}},insertAfterNodes:{undo:function(e){var t=i(e.parentPath);e.paths.map(i).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=i(e.parentPath),n=i(e.afterPath);e.nodes.forEach(function(e){t.insertAfter(e,n),n=e})}},removeNodes:{undo:function(e){var t=i(e.parentPath),n=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,n)})},redo:function(e){var t=i(e.parentPath);e.paths.map(i).forEach(function(e){t.removeChild(e)})}},duplicateNodes:{undo:function(e){var t=i(e.parentPath);e.clonePaths.map(i).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=i(e.parentPath),n=i(e.afterPath);e.paths.map(i).forEach(function(e){var i,o=e.clone();"object"===t.type&&(i=t.getFieldNames(),o.field=(0,M.findUniqueName)(e.field,i)),t.insertAfter(o,n),n=o})}},moveNodes:{undo:function(e){var t=i(e.oldParentPath),n=i(e.newParentPath),o=t.childs[e.oldIndex]||t.append;n.childs.slice(e.newIndex,e.newIndex+e.count).forEach(function(i,n){i.field=e.fieldNames[n],t.moveBefore(i,o)}),null===e.newParentPathRedo&&(e.newParentPathRedo=n.getInternalPath())},redo:function(e){var t=i(e.oldParentPathRedo),n=i(e.newParentPathRedo),o=n.childs[e.newIndexRedo]||n.append;t.childs.slice(e.oldIndexRedo,e.oldIndexRedo+e.count).forEach(function(t,i){t.field=e.fieldNames[i],n.moveBefore(t,o)})}},sort:{undo:function(e){var t=i(e.path);t.hideChilds(),t.childs=e.oldChilds,t.updateDom({updateIndexes:!0}),t.showChilds()},redo:function(e){var t=i(e.path);t.hideChilds(),t.childs=e.newChilds,t.updateDom({updateIndexes:!0}),t.showChilds()}},transform:{undo:function(e){i(e.path).setInternalValue(e.oldValue)},redo:function(e){i(e.path).setInternalValue(e.newValue)}}}}var t,i;return t=e,(i=[{key:"onChange",value:function(){}},{key:"add",value:function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.undo){if(t.undo(e.params),e.params.oldSelection)try{this.editor.setDomSelection(e.params.oldSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.redo){if(t.redo(e.params),e.params.newSelection)try{this.editor.setDomSelection(e.params.newSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&f(t.prototype,i),e}(),D=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;this.editor=t,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=i,t=document.createElement("div"),(this.dom.wrapper=t).className="jsoneditor-search",i.appendChild(t),i=document.createElement("div"),(this.dom.results=i).className="jsoneditor-results",t.appendChild(i),i=document.createElement("div"),(this.dom.input=i).className="jsoneditor-frame",i.title=(0,w.Iu)("searchTitle"),t.appendChild(i),t=document.createElement("button"),t.type="button",t.className="jsoneditor-refresh",i.appendChild(t);var o=document.createElement("input");o.type="text",(this.dom.search=o).oninput=function(e){n._onDelayedSearch(e)},o.onchange=function(e){n._onSearch()},o.onkeydown=function(e){n._onKeyDown(e)},o.onkeyup=function(e){n._onKeyUp(e)},t.onclick=function(e){o.select()},i.appendChild(o),t=document.createElement("button"),t.type="button",t.title=(0,w.Iu)("searchNextResultTitle"),t.className="jsoneditor-next",t.onclick=function(){n.next()},i.appendChild(t),t=document.createElement("button"),t.type="button",t.title=(0,w.Iu)("searchPreviousResultTitle"),t.className="jsoneditor-previous",t.onclick=function(){n.previous()},i.appendChild(t)}var t,i;return t=e,(i=[{key:"next",value:function(e){var t;this.results&&((t=null!==this.resultIndex?this.resultIndex+1:0)>this.results.length-1&&(t=0),this._setActiveResult(t,e))}},{key:"previous",value:function(e){var t,i;this.results&&(t=this.results.length-1,i=null!==this.resultIndex?this.resultIndex-1:t,this._setActiveResult(i=i<0?t:i,e))}},{key:"_setActiveResult",value:function(e,t){var i;if(this.activeResult&&(i=this.activeResult.node,"field"===this.activeResult.elem?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()),!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var n=this.results[this.resultIndex].node,o=this.results[this.resultIndex].elem;"field"===o?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo(function(){t&&n.focus(o)})}},{key:"_clearDelay",value:function(){void 0!==this.timeout&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)}},{key:"_onSearch",value:function(e){this._clearDelay();var t=this.dom.search.value,t=0<t.length?t:void 0;if(t!==this.lastText||e){this.lastText=t,this.results=this.editor.search(t);var e=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,i=0;if(this.activeResult)for(var n=0;n<this.results.length;n++)if(this.results[n].node===this.activeResult.node){i=n;break}this._setActiveResult(i,!1),void 0!==t?(t=this.results.length,this.dom.results.textContent=0===t?"no results":1===t?"1 result":e<t?e+"+ results":t+" results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(e){var t=e.which;27===t?(this.dom.search.value="",this._onSearch(),e.preventDefault(),e.stopPropagation()):13===t&&(e.ctrlKey?this._onSearch(!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())}},{key:"_onKeyUp",value:function(e){var t=e.keyCode;27!==t&&13!==t&&this._onDelayedSearch(e)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return""===this.dom.search.value}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&C(t.prototype,i),e}(),G=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.root=i,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,t.appendChild(this.path),this.reset())}var t,i;return t=e,(i=[{key:"reset",value:function(){this.path.textContent=(0,w.Iu)("selectNode")}},{key:"setPath",value:function(e){var t=this;this.path.textContent="",e&&e.length&&e.forEach(function(i,n){var o,r=document.createElement("span");r.className="jsoneditor-treepath-element",r.innerText=i.name,r.onclick=function(e){this.selectionCallback&&this.selectionCallback(e)}.bind(t,i),t.path.appendChild(r),i.children.length&&((o=document.createElement("span")).className="jsoneditor-treepath-seperator",o.textContent="►",o.onclick=function(){t.contentMenuClicked=!0;var r=[];i.children.forEach(function(o){r.push({text:o.name,className:"jsoneditor-type-modes"+(e[n+1]+1&&e[n+1].name===o.name?" jsoneditor-selected":""),click:function(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}.bind(t,i,o.name)})}),new b.x(r,{limitHeight:!0}).show(o,t.root,!0)},t.path.appendChild(o)),n===e.length-1&&(r=(o||r).getBoundingClientRect().right,t.path.offsetWidth<r&&(t.path.scrollLeft=r),t.path.scrollLeft&&((r=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",r.title="show all path",r.textContent="...",r.onclick=function(e){(t.contentMenuClicked=!1,M.addClassName)(t.path,"show-all"),t.path.style.width=t.path.parentNode.getBoundingClientRect().width-10+"px",t.path.onblur=function(){if(t.contentMenuClicked)return t.contentMenuClicked=!1,void t.path.focus();(0,M.removeClassName)(t.path,"show-all"),t.path.onblur=void 0,t.path.style.width="",t.setPath(e)}}.bind(t,e),t.path.insertBefore(r,t.path.firstChild)))})}},{key:"onSectionSelected",value:function(e){"function"==typeof e&&(this.selectionCallback=e)}},{key:"onContextMenuItemSelected",value:function(e){"function"==typeof e&&(this.contextMenuCallback=e)}}])&&I(t.prototype,i),e}(),t=i(8037),B=i.n(t),t={};t.create=function(e,t){if(!e)throw new Error("No container element provided.");this.container=e,this.dom={},this.highlighter=new y,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.lastSchemaErrors=void 0,this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=function(e){function t(e){var t,i;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(i=window.getSelection()).removeAllRanges(),i.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())}function i(e){return void 0===c&&((c=document.createElement("span")).style.visibility="hidden",c.style.position="fixed",c.style.outline="0",c.style.margin="0",c.style.padding="0",c.style.border="0",c.style.left="0",c.style.whiteSpace="pre",c.style.fontSize=s,c.style.fontFamily=a,c.style.fontWeight="normal",document.body.appendChild(c)),c.textContent=e,c.getBoundingClientRect().right}function n(){this.style.backgroundColor="#ddd"}function o(){this.style.backgroundColor=""}function r(){f.hide(),f.onmouseselection(this.__hint,f.rs)}(e=e||{}).filter=e.filter||"start",e.trigger=e.trigger||"keydown",e.confirmKeys=e.confirmKeys||[39,35,9],e.caseSensitive=e.caseSensitive||!1;var s="",a="",l=document.createElement("div");l.style.position="relative",l.style.outline="0",l.style.border="0",l.style.margin="0",l.style.padding="0";var c,d,h=document.createElement("div");h.className="autocomplete dropdown",h.style.position="absolute",h.style.visibility="hidden";var u,g,p,m,f,C={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:l,show:function(e,t,i){var n=this;this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""===s&&(s=window.getComputedStyle(e).getPropertyValue("font-size")),""===a&&(a=window.getComputedStyle(e).getPropertyValue("font-family")),h.style.marginLeft="0",h.style.marginTop=e.getBoundingClientRect().height+"px",this.options=i.map(String),this.element!==e&&(this.element=e,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=e.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){n.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",b),this.element.addEventListener("keydown",b,!1),this.element.removeEventListener("blur",v),this.element.addEventListener("blur",v,!1)),l.appendChild(this.elementHint),l.appendChild(h),e.parentElement.appendChild(l),this.repaint(e)},setText:function(e){this.element.innerText=e},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,I.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(t){var t=(t=t.innerText).replace("\n",""),n=this.options.length,o=t.substring(this.startFrom);d=t.substring(0,this.startFrom);for(var r=0;r<n;r++){var s=this.options[r];if(!e.caseSensitive&&0===s.toLowerCase().indexOf(o.toLowerCase())||e.caseSensitive&&0===s.indexOf(o)){this.elementHint.innerText=d+o+s.substring(o.length),this.elementHint.realInnerText=d+s;break}}h.style.left=i(d)+"px",I.refresh(o,this.options),this.elementHint.style.width=i(this.elementHint.innerText)+10+"px","hidden"===h.style.visibility||(this.elementHint.style.width=i(this.elementHint.innerText)+h.clientWidth+"px")}},I=(u=h,g=[],p=0,m=-1,f={rs:C,hide:function(){u.style.visibility="hidden"},refresh:function(t,i){u.style.visibility="hidden",p=0,u.textContent="";var s=window.innerHeight||document.documentElement.clientHeight,a=u.parentNode.getBoundingClientRect(),l=a.top-6,a=s-a.bottom-6;g=[];var c="function"==typeof e.filter?e.filter:A[e.filter],i=c?i.filter(function(i){return c(e.caseSensitive?t:t.toLowerCase(),e.caseSensitive?i:i.toLowerCase(),e)}):[];0!==(g=i.map(function(e){var i=document.createElement("div");i.className="item",i.onmouseover=n,i.onmouseout=o,i.onmousedown=r,i.__hint=e,i.textContent="",i.appendChild(document.createTextNode(e.substring(0,t.length)));var s=document.createElement("b");return s.appendChild(document.createTextNode(e.substring(t.length))),i.appendChild(s),u.appendChild(i),i})).length&&(1===g.length&&(t.toLowerCase()===g[0].__hint.toLowerCase()&&!e.caseSensitive||t===g[0].__hint&&e.caseSensitive)||g.length<2||(f.highlight(0),3*a<l?(u.style.maxHeight=l+"px",u.style.top="",u.style.bottom="100%"):(u.style.top="100%",u.style.bottom="",u.style.maxHeight=a+"px"),u.style.visibility="visible"))},highlight:function(e){-1!==m&&g[m]&&(g[m].className="item"),g[e].className="item hover",m=e},move:function(e){return"hidden"===u.style.visibility?"":(p+e===-1||p+e===g.length||(p+=e,f.highlight(p)),g[p].__hint)},onmouseselection:function(){}}),b=function(i){var n=(i=i||window.event).keyCode;if(null!=this.elementHint&&33!==n&&34!==n){if(27===n)return C.hideDropDown(),C.element.focus(),i.preventDefault(),void i.stopPropagation();var o=(o=this.element.innerText).replace("\n","");if(0<=e.confirmKeys.indexOf(n))return 9===n&&0===this.elementHint.innerText.length&&C.onTab(),void(0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,C.hideDropDown(),t(this.element),9===n&&(C.element.focus(),i.preventDefault(),i.stopPropagation())));if(13!==n){if(40===n){var r=o.substring(this.startFrom),s=I.move(1);return""===s&&C.onArrowDown(),this.elementHint.innerText=d+r+s.substring(r.length),this.elementHint.realInnerText=d+s,i.preventDefault(),void i.stopPropagation()}38===n&&(o=o.substring(this.startFrom),""===(a=I.move(-1))&&C.onArrowUp(),this.elementHint.innerText=d+o+a.substring(o.length),this.elementHint.realInnerText=d+a,i.preventDefault(),i.stopPropagation())}else if(0===this.elementHint.innerText.length)C.onEnter();else{var a="hidden"===h.style.visibility;if(I.hide(),a)return C.hideDropDown(),C.element.focus(),void C.onEnter();this.element.innerText=this.elementHint.realInnerText,C.hideDropDown(),t(this.element),i.preventDefault(),i.stopPropagation()}}}.bind(C),v=function(e){C.hideDropDown()};return I.onmouseselection=function(e,i){i.element.innerText=i.elementHint.innerText=d+e,i.hideDropDown(),window.setTimeout(function(){i.element.focus(),t(i.element)},1)},C}(t.autocomplete)),this.options.history&&"view"!==this.options.mode&&(this.history=new O(this)),this._createFrame(),this._createTable()},t.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.frameFocusTracker.destroy()},t._setOptions=function(e){var t=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,limitDragging:!1,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,i){var n;B()?(n=e.getBoundingClientRect().top,n=(0,M.getWindow)(e).innerHeight-n<300&&300<n,new(B())({parent:e,color:t,popup:n?"top":"bottom",onDone:function(e){e=1===e.rgba[3]?e.hex.substr(0,7):e.hex,i(e)}}).show()):console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,timestampFormat:null,createQuery:x.r,executeQuery:x.J,onEvent:null,enableSort:!0,enableTransform:!0},e&&(Object.keys(e).forEach(function(i){t.options[i]=e[i]}),null==e.limitDragging&&null!=e.schema&&(this.options.limitDragging=!0)),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,M.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),e.onSelectionChange&&this.onSelectionChange(e.onSelectionChange),(0,w.cC)(this.options.languages),(0,w.m0)(this.options.language)},t.set=function(e){e instanceof Function||void 0===e?this.clear():(this.content.removeChild(this.table),e={field:this.options.name,value:e},e=new L(this,e),this._setRoot(e),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},t.update=function(e){var t,i;this.node.deepEqual(e)||(t=this.getSelection(),this.onChangeDisabled=!0,this.node.update(e),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),t&&t.start&&t.end?(i=this.node.findNodeByPath(t.start.path),e=this.node.findNodeByPath(t.end.path),i&&e?this.setSelection(t.start,t.end):this.setSelection({},{})):this.setSelection({},{}))},t.get=function(){if(this.node)return this.node.getValue()},t.getText=function(){return JSON.stringify(this.get())},t.setText=function(e){try{this.set((0,M.parse)(e))}catch(t){e=(0,M.tryJsonRepair)(e),this.set((0,M.parse)(e))}},t.updateText=function(e){try{this.update((0,M.parse)(e))}catch(t){e=(0,M.tryJsonRepair)(e),this.update((0,M.parse)(e))}},t.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},t.getName=function(){return this.options.name},t.focus=function(){var e=this.scrollableContent.querySelector("[contenteditable=true]");e?e.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(e=this.frame.querySelector("button"))&&e.focus()},t.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},t._setRoot=function(e){this.clear(),(this.node=e).setParent(null),e.setField(this.getName(),!1),delete e.index,this.tbody.appendChild(e.getDom())},t.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},t.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},t.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},t._onAction=function(e,t){this.history&&this.history.add(e,t),this._onChange()},t._onChange=function(){if(!this.onChangeDisabled){var e;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((e=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(e.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(e){console.error("Error in onNodeName callback: ",e)}}},t.validate=function(){var e=this,t=this.node;if(t){var i=t.getValue(),n=[];this.validateSchema&&(this.validateSchema(i)||(n=this.validateSchema.errors.map(function(e){return(0,M.improveSchemaError)(e)}).map(function(e){return{node:t.findNode(e.dataPath),error:e,type:"validation"}}).filter(function(e){return null!=e.node})));try{this.validationSequence++;var o=this,r=this.validationSequence;return this._validateCustom(i).then(function(t){return r===o.validationSequence&&(t=[].concat(n,t||[]),o._renderValidationErrors(t),"function"==typeof e.options.onValidationError&&(0,M.isValidationErrorChanged)(t,e.lastSchemaErrors)&&e.options.onValidationError.call(e,t),e.lastSchemaErrors=t),e.lastSchemaErrors})}catch(i){return Promise.reject(i)}}},t._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},t._renderValidationErrors=function(e){this.errorNodes&&this.errorNodes.forEach(function(e){e.setError(null)});var t=e.reduce(function(e,t){return t.node.findParents().filter(function(t){return!e.some(function(e){return e[0]===t})}).map(function(e){return[e,t.node]}).concat(e)},[]);this.errorNodes=t.map(function(e){return{node:e[0],child:e[1],error:{message:"object"===e[0].type?(0,w.Iu)("containsInvalidProperties"):(0,w.Iu)("containsInvalidItems")}}}).concat(e).map(function(e){return e.node.setError(e.error,e.child),e.node})},t._validateCustom=function(e){try{if(this.options.onValidate){var t=this.node,i=this.options.onValidate(e);return((0,M.isPromise)(i)?i:Promise.resolve(i)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=(0,M.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t}).map(function(e){var i;try{i=e&&e.path?t.findNodeByPath(e.path):null}catch(e){}return i||console.warn("Ignoring validation error: node not found. Path:",e.path,"Error:",e),{node:i,error:e,type:"customValidation"}}).filter(function(e){return e&&e.node&&e.error&&e.error.message}):null})}}catch(e){return Promise.reject(e)}return Promise.resolve(null)},t.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},t.startAutoScroll=function(e){var t=this,i=this.scrollableContent,n=(0,M.getAbsoluteTop)(i),o=i.clientHeight,r=n+o;e<n+24&&0<i.scrollTop?this.autoScrollStep=(n+24-e)/3:r-24<e&&o+i.scrollTop<i.scrollHeight?this.autoScrollStep=(r-24-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){t.autoScrollStep?i.scrollTop-=t.autoScrollStep:t.stopAutoScroll()},50)):this.stopAutoScroll()},t.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},t.setDomSelection=function(e){var t,i,n;e&&("scrollTop"in e&&this.scrollableContent&&(this.scrollableContent.scrollTop=e.scrollTop),e.paths?(t=this,n=e.paths.map(function(e){return t.node.findNodeByInternalPath(e)}),this.select(n)):(n=(i=e.path?this.node.findNodeByInternalPath(e.path):null)&&e.domName?i.dom[e.domName]:null,e.range&&n?(n=Object.assign({},e.range,{container:n}),(0,M.setSelectionOffset)(n)):i&&i.focus()))},t.getDomSelection=function(){var e=L.getNodeFromTarget(this.focusTarget),t=this.focusTarget,i=e?Object.keys(e.dom).find(function(i){return e.dom[i]===t}):null,n=(0,M.getSelectionOffset)();return(n=(n=n&&"DIV"!==n.container.nodeName?null:n)&&n.container!==t?null:n)&&delete n.container,{path:e?e.getInternalPath():null,domName:i,range:n,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(e){return e.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},t.scrollTo=function(e,t){var i,n,o,r,s=this.scrollableContent;s?((i=this).animateTimeout&&(clearTimeout(i.animateTimeout),delete i.animateTimeout),i.animateCallback&&(i.animateCallback(!1),delete i.animateCallback),n=s.clientHeight,o=s.scrollHeight-n,r=Math.min(Math.max(e-n/4,0),o),function e(){var n=s.scrollTop,n=r-n;3<Math.abs(n)?(s.scrollTop+=n/3,i.animateCallback=t,i.animateTimeout=setTimeout(e,50)):(t&&t(!0),s.scrollTop=r,delete i.animateTimeout,delete i.animateCallback)}()):t&&t(!1)},t._createFrame=function(){function e(e){r._onEvent&&r._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame),this.contentOuter=document.createElement("div"),this.contentOuter.className="jsoneditor-outer";var t,i,n,o,r=this,s={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new v.R(s),this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"===i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,(0,M.addEventListener)(this.frame,"focus",e,!0),(0,M.addEventListener)(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.options.mainMenuBar&&((0,M.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(s=document.createElement("button")).type="button",s.className="jsoneditor-expand-all",s.title=(0,w.Iu)("expandAll"),s.onclick=function(){r.expandAll()},this.menu.appendChild(s),(s=document.createElement("button")).type="button",s.title=(0,w.Iu)("collapseAll"),s.className="jsoneditor-collapse-all",s.onclick=function(){r.collapseAll()},this.menu.appendChild(s),this.options.enableSort&&((t=document.createElement("button")).type="button",t.className="jsoneditor-sort",t.title=(0,w.Iu)("sortTitleShort"),t.onclick=function(){r.node.showSortModal()},this.menu.appendChild(t)),this.options.enableTransform&&((t=document.createElement("button")).type="button",t.title=(0,w.Iu)("transformTitleShort"),t.className="jsoneditor-transform",t.onclick=function(){r.node.showTransformModal()},this.menu.appendChild(t)),this.history&&((i=document.createElement("button")).type="button",i.className="jsoneditor-undo jsoneditor-separator",i.title=(0,w.Iu)("undo"),i.onclick=function(){r._onUndo()},this.menu.appendChild(i),this.dom.undo=i,(n=document.createElement("button")).type="button",n.className="jsoneditor-redo",n.title=(0,w.Iu)("redo"),n.onclick=function(){r._onRedo()},this.menu.appendChild(n),this.dom.redo=n,this.history.onChange=function(){i.disabled=!r.history.canUndo(),n.disabled=!r.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((o=this).modeSwitcher=new S.x(this.menu,this.options.modes,this.options.mode,function(e){o.setMode(e),o.modeSwitcher.focus()})),this.options.search&&(this.searchBox=new D(this,this.menu))),this.options.navigationBar&&(this.navBar=document.createElement("div"),this.navBar.className="jsoneditor-navigation-bar nav-bar-empty",this.frame.appendChild(this.navBar),this.treePath=new G(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},t._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},t._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},t._onEvent=function(e){if(!L.targetIsColorPicker(e.target)){var t,i=L.getNodeFromTarget(e.target);if("keydown"===e.type&&this._onKeyDown(e),i&&"focus"===e.type&&(this.focusTarget=e.target,this.options.autocomplete&&"focus"===this.options.autocomplete.trigger&&this._showAutoComplete(e.target)),"mousedown"===e.type&&this._startDragDistance(e),"mousemove"!==e.type&&"mouseup"!==e.type&&"click"!==e.type||this._updateDragDistance(e),i&&this.options&&this.options.navigationBar&&i&&("keydown"===e.type||"mousedown"===e.type)&&(t=this,setTimeout(function(){t._updateTreePath(i.getNodePath())})),i&&i.selected){if("click"===e.type){if(e.target===i.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"===e.type&&L.onDragStart(this.multiselection.nodes,e)}else"mousedown"===e.type&&(0,M.hasParentNode)(e.target,this.content)&&(this.deselect(),i&&e.target===i.dom.drag?L.onDragStart(i,e):i&&(e.target===i.dom.field||e.target===i.dom.value||e.target===i.dom.select)||this._onMultiSelectStart(e));i&&i.onEvent(e)}},t._updateTreePath=function(e){function t(e){return e.parent?"array"===e.parent.type?e.index:e.field:e.field||e.type}var i;e&&e.length?((0,M.removeClassName)(this.navBar,"nav-bar-empty"),i=[],e.forEach(function(e){var n={name:t(e),node:e,children:[]};e.childs&&e.childs.length&&e.childs.forEach(function(e){n.children.push({name:t(e),node:e})}),i.push(n)}),this.treePath.setPath(i)):(0,M.addClassName)(this.navBar,"nav-bar-empty")},t._onTreePathSectionSelected=function(e){e&&e.node&&(e.node.expandTo(),e.node.focus())},t._onTreePathMenuItemSelected=function(e,t){e&&e.children.length&&(e=e.children.find(function(e){return e.name===t}))&&e.node&&(this._updateTreePath(e.node.getNodePath()),e.node.expandTo(),e.node.focus())},t._startDragDistance=function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},t._updateDragDistance=function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,i=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+i*i),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},t._onMultiSelectStart=function(e){var t,i=L.getNodeFromTarget(e.target);"tree"===this.options.mode&&void 0===this.options.onEditable&&(this.multiselection={start:i||null,end:null,nodes:[]},this._startDragDistance(e),(t=this).mousemove||(this.mousemove=(0,M.addEventListener)(e.view,"mousemove",function(e){t._onMultiSelect(e)})),this.mouseup||(this.mouseup=(0,M.addEventListener)(e.view,"mouseup",function(e){t._onMultiSelectEnd(e)})),e.preventDefault())},t._onMultiSelect=function(e){var t;e.preventDefault(),this._updateDragDistance(e),e.hasMoved&&((t=L.getNodeFromTarget(e.target))&&(null==this.multiselection.start&&(this.multiselection.start=t),this.multiselection.end=t),this.deselect(),e=this.multiselection.start,t=this.multiselection.end||this.multiselection.start,e&&t&&(this.multiselection.nodes=this._findTopLevelNodes(e,t),this.multiselection.nodes&&this.multiselection.nodes.length&&(t=this.multiselection.nodes[0],this.multiselection.start===t||this.multiselection.start.isDescendantOf(t)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes)))},t._onMultiSelectEnd=function(e){var t=this.multiselection.nodes[0];t&&t.dom.menu&&t.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,M.removeEventListener)(e.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,M.removeEventListener)(e.view,"mouseup",this.mouseup),delete this.mouseup)},t.deselect=function(e){var t=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(e){e.setSelected(!1)}),this.multiselection.nodes=[],e&&(this.multiselection.start=null,this.multiselection.end=null),t&&this._selectionChangedHandler&&this._selectionChangedHandler()},t.select=function(e){if(!Array.isArray(e))return this.select([e]);var t;e&&(this.deselect(),this.multiselection.nodes=e.slice(0),t=e[0],e.forEach(function(e){e.expandPathToNode(),e.setSelected(!0,e===t)}),this._selectionChangedHandler&&(e=this.getSelection(),this._selectionChangedHandler(e.start,e.end)))},t._findTopLevelNodes=function(e,t){for(var i=e.getNodePath(),n=t.getNodePath(),o=0;o<i.length&&i[o]===n[o];)o++;var r=i[o-1],s=i[o],e=n[o];return s&&e||(r.parent?r=(e=s=r).parent:(s=r.childs[0],e=r.childs[r.childs.length-1])),r&&s&&e?(t=r.childs.indexOf(s),s=r.childs.indexOf(e),e=Math.min(t,s),s=Math.max(t,s),r.childs.slice(e,s+1)):[]},t._showAutoComplete=function(e){var t,i=L.getNodeFromTarget(e),n="";0<=e.className.indexOf("jsoneditor-value")&&(n="value"),""!==(n=0<=e.className.indexOf("jsoneditor-field")?"field":n)&&(t=this,setTimeout(function(){var o;i&&("focus"===t.options.autocomplete.trigger||0<e.innerText.length)&&null!==(o=t.options.autocomplete.getOptions(e.innerText,i.getPath(),n,i.editor))?"function"==typeof o.then?o.then(function(i){null===i?t.autocomplete.hideDropDown():i.options?t.autocomplete.show(e,i.startFrom,i.options):t.autocomplete.show(e,0,i)}).catch(function(e){console.error(e)}):o.options?t.autocomplete.show(e,o.startFrom,o.options):t.autocomplete.show(e,0,o):t.autocomplete.hideDropDown()},50))},t._onKeyDown=function(e){var t,i=e.which||e.keyCode,n=e.altKey,o=e.ctrlKey,r=e.metaKey,s=e.shiftKey,a=!1,l=this.focusTarget;9===i&&(t=this,setTimeout(function(){t.focusTarget!==l&&(0,M.selectContentEditable)(t.focusTarget)},0)),this.searchBox&&(o&&70===i?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),a=!0):(114===i||o&&71===i)&&(s?this.searchBox.previous(!0):this.searchBox.next(!0),a=!0)),this.history&&(o&&!s&&90===i?(this._onUndo(),a=!0):o&&s&&90===i&&(this._onRedo(),a=!0)),this.options.autocomplete&&!a&&(o||n||r||1!==e.key.length&&8!==i&&46!==i||(a=!1,this._showAutoComplete(e.target))),a&&(e.preventDefault(),e.stopPropagation())},t._createTable=function(){var e;this.options.navigationBar&&(0,M.addClassName)(this.contentOuter,"has-nav-bar"),this.scrollableContent=document.createElement("div"),this.scrollableContent.className="jsoneditor-tree",this.contentOuter.appendChild(this.scrollableContent),this.content=document.createElement("div"),this.content.className="jsoneditor-tree-inner",this.scrollableContent.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&((e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e)),(e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e),e=document.createElement("col"),this.colgroupContent.appendChild(e),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},t.showContextMenu=function(e,t){var i,n=[],o=this.multiselection.nodes.slice();n.push({text:(0,w.Iu)("duplicateText"),title:(0,w.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){L.onDuplicate(o)}}),n.push({text:(0,w.Iu)("remove"),title:(0,w.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){L.onRemove(o)}}),this.options.onCreateMenu&&(i=o.map(function(e){return e.getPath()}),n=this.options.onCreateMenu(n,{type:"multiple",path:i[0],paths:i})),new b.x(n,{close:t}).show(e,this.getPopupAnchor())},t.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},t.getSelection=function(){var e,t,i={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(e=this.multiselection.nodes[0],t=this.multiselection.nodes[this.multiselection.nodes.length-1],"down"===this.multiselection.direction?(i.start=e.serialize(),i.end=t.serialize()):(i.start=t.serialize(),i.end=e.serialize())),i},t.onSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,M.debounce)(e,this.DEBOUNCE_INTERVAL))},t.setSelection=function(e,t){e&&e.dom&&e.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(e)),t=this._getNodeInstancesByRange(e,t),t.forEach(function(e){e.expandTo()}),this.select(t)},t._getNodeInstancesByRange=function(e,t){var i,n;e&&e.path&&(i=this.node.findNodeByPath(e.path),t&&t.path&&(n=this.node.findNodeByPath(t.path)));var o=[];if(i instanceof L)if(n instanceof L&&n!==i)if(i.parent===n.parent){t=i.getIndex()<n.getIndex()?(e=i,n):(e=n,i);var r=e;for(o.push(r);r=r.nextSibling(),o.push(r),r&&r!==t;);}else o=this._findTopLevelNodes(i,n);else o.push(i);return o},t.getNodesByRange=function(e,t){var t=this._getNodeInstancesByRange(e,t),i=[];return t.forEach(function(e){i.push(e.serialize())}),i};var H=[{mode:"tree",mixin:t,data:"json"},{mode:"view",mixin:t,data:"json"},{mode:"form",mixin:t,data:"json"}]},2744:function(e,t,i){t.tryRequireAjv=function(){try{return i(8903)}catch(e){}}},9125:function(e,t,i){t.O=function(){try{i(4864)}catch(e){console.error(e)}}},9791:function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){try{return JSON.parse(e)}catch(t){throw a(e),t}}function r(e){try{return le()(e)}catch(t){return e}}function s(e){return e.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})}function a(e){(void 0!==ce?ce:JSON).parse(e)}function l(e,t){for(var i in t)se(t,i)&&(e[i]=t[i]);return e}function c(e){for(var t in e)se(e,t)&&delete e[t];return e}function d(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp?"regexp":u(e)?"array":"object"}function h(e){return("string"==typeof e||e instanceof String)&&pe.test(e)}function u(e){return"[object Array]"===Object.prototype.toString.call(e)}function g(e){return e.ownerDocument.defaultView}function p(e){return e.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function m(e){return e.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function f(e,t){var i=e.className.split(" ");-1===i.indexOf(t)&&(i.push(t),e.className=i.join(" "))}function C(e){e.className=""}function I(e,t){var i=e.className.split(" "),t=i.indexOf(t);-1!==t&&(i.splice(t,1),e.className=i.join(" "))}function A(e){for(var t=e.childNodes,i=0,n=t.length;i<n;i++){var o=t[i];o.style&&o.removeAttribute("style");var r=o.attributes;if(r)for(var s=r.length-1;0<=s;s--){var a=r[s];!0===a.specified&&o.removeAttribute(a.name)}A(o)}}function b(e){var t;document.createRange&&((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function v(e){var t;e&&"DIV"===e.nodeName&&window.getSelection&&document.createRange&&((t=document.createRange()).selectNodeContents(e),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function y(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null}function w(e){var t;e&&window.getSelection&&((t=window.getSelection()).removeAllRanges(),t.addRange(e))}function x(){var e=y();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer===e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null}function S(e){var t;document.createRange&&window.getSelection&&window.getSelection()&&(t=document.createRange(),e.container.firstChild||e.container.appendChild(document.createTextNode("")),t.setStart(e.container.firstChild,e.startOffset),t.setEnd(e.container.firstChild,e.endOffset),w(t))}function k(e,t){if(void 0===t&&(t={_text:"",flush:function(){var e=this._text;return this._text="",e},set:function(e){this._text=e}}),e.nodeValue){var i=e.nodeValue.replace(/\s*\n\s*/g,"");return""!==i?t.flush()+i:""}if(e.hasChildNodes()){for(var n=e.childNodes,o="",r=0,s=n.length;r<s;r++){var a,l=n[r];"DIV"===l.nodeName||"P"===l.nodeName?((a=(a=n[r-1])?a.nodeName:void 0)&&"DIV"!==a&&"P"!==a&&"BR"!==a&&(""!==o&&(o+="\n"),t.flush()),o+=k(l,t),t.set("\n")):"BR"===l.nodeName?(o+=t.flush(),t.set("\n")):o+=k(l,t)}return o}return""}function T(e,t){for(var i=e?e.parentNode:void 0;i;){if(i===t)return!0;i=i.parentNode}return!1}function M(){var e;return-1===me&&(e=-1,"undefined"!=typeof navigator&&"Microsoft Internet Explorer"===navigator.appName&&null!=/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)&&(e=parseFloat(RegExp.$1)),me=e),me}function N(){return"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Firefox")}function R(e,t,i,n){return e.addEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&N()&&(t="DOMMouseScroll"),e.addEventListener(t,i,n),i):e.attachEvent?(n=function(){return i.call(e,window.event)},e.attachEvent("on"+t,n),n):void 0}function E(e,t,i,n){e.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&N()&&(t="DOMMouseScroll"),e.removeEventListener(t,i,n)):e.detachEvent&&e.detachEvent("on"+t,i)}function L(e,t){for(var i=e.parentNode;i;){if(i===t)return!0;i=i.parentNode}return!1}function j(e){function t(t){for(var i="";void 0!==e[n]&&e[n]!==t;)i+=e[n],n++;if(e[n]!==t)throw new Error("Invalid JSON path: unexpected end, character "+t+" expected");return i}for(var i=[],n=0;void 0!==e[n];)if("."===e[n])n++,i.push(function(){for(var t="";void 0!==e[n]&&/[\w$]/.test(e[n]);)t+=e[n],n++;if(""===t)throw new Error("Invalid JSON path: property name expected at index "+n);return t}());else{if("["!==e[n])throw new Error('Invalid JSON path: unexpected character "'+e[n]+'" at index '+n);if("'"===e[++n]||'"'===e[n]){var o=e[n];if(n++,i.push(t(o)),e[n]!==o)throw new Error("Invalid JSON path: closing quote ' expected at index "+n);n++}else{if(o=t("]").trim(),0===o.length)throw new Error("Invalid JSON path: array value expected at index "+n);o="*"===o?o:JSON.parse(o),i.push(o)}if("]"!==e[n])throw new Error("Invalid JSON path: closing bracket ] expected at index "+n);n++}return i}function Z(e){return e.map(function(e){return"number"==typeof e?"["+e+"]":"string"==typeof e&&e.match(/^[A-Za-z0-9_$]+$/)?"."+e:'["'+e+'"]'}).join("")}function W(e){var t,i;return"enum"!==e.keyword||!Array.isArray(e.schema)||(i=e.schema)&&(5<(i=i.map(function(e){return JSON.stringify(e)})).length&&(t=["("+(i.length-5)+" more...)"],(i=i.slice(0,5)).push(t)),e.message="should be equal to one of: "+i.join(", ")),"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}function O(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function D(e){return"object"===n(e)&&Array.isArray(e.path)&&"string"==typeof e.message}function G(e,t,i){return i=void 0!==i?i:0,t.left-i>=e.left&&t.right+i<=e.right&&t.top-i>=e.top&&t.bottom+i<=e.bottom}function B(e,t,i){var n;return function(){var o=this,r=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(o,r)},t),s&&e.apply(o,r)}}function H(e,t){for(var i=t.length,n=0,o=e.length,r=t.length;t.charAt(n)===e.charAt(n)&&n<i;)n++;for(;t.charAt(r-1)===e.charAt(o-1)&&n<r&&0<o;)r--,o--;return{start:n,end:r}}function _(e){function t(t){return t=e.value.substring(0,t),{row:(t.match(/\n/g)||[]).length+1,column:t.length-t.lastIndexOf("\n")}}var i,n,o,r,s=0,a=0;return"number"==typeof e.selectionStart&&"number"==typeof e.selectionEnd?(s=e.selectionStart,a=e.selectionEnd):(r=document.selection.createRange())&&r.parentElement()===e&&(o=e.value.length,i=e.value.replace(/\r\n/g,"\n"),(n=e.createTextRange()).moveToBookmark(r.getBookmark()),(r=e.createTextRange()).collapse(!1),-1<n.compareEndPoints("StartToEnd",r)?s=a=o:(s=-n.moveStart("character",-o),s+=i.slice(0,s).split("\n").length-1,-1<n.compareEndPoints("EndToEnd",r)?a=o:(a=-n.moveEnd("character",-o),a+=i.slice(0,a).split("\n").length-1))),{startIndex:s,endIndex:a,start:t(s),end:t(a)}}function $(e,t,i){return e=e.value||"",0<t&&0<i?(e=e.split("\n",t),t=Math.min(e.length,t),i=Math.min(e[t-1].length,i-1),i=1===t?i:i+1,e.slice(0,t-1).join("\n").length+i):-1}function z(e,t){var i,n=[];if(!t||!t.length)return n;try{i=de.parse(e)}catch(e){return n}return t.forEach(function(e){var t=P(j(e)),t=i.pointers[t];t&&n.push({path:e,line:t.key?t.key.line:t.value?t.value.line:0,column:t.key?t.key.column:t.value?t.value.column:0})}),n}function P(e){return e.map(function(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function V(e){var t=document.createElement("div");return t.style.color=e,t.style.color.split(/\s+/).join("").toLowerCase()||null}function F(e){return!!V(e)}function K(e,t){if(!e)return"";var i="";return e.title&&(i+=e.title),e.description&&(0<i.length&&(i+="\n"),i+=e.description),e.default&&(0<i.length&&(i+="\n\n"),i+=(0,he.Iu)("default",void 0,t)+"\n",i+=JSON.stringify(e.default,null,2)),Array.isArray(e.examples)&&0<e.examples.length&&(0<i.length&&(i+="\n\n"),i+=(0,he.Iu)("examples",void 0,t)+"\n",e.examples.forEach(function(t,n){i+=JSON.stringify(t,null,2),n!==e.examples.length-1&&(i+="\n")})),i}function Y(e,t){for(var i=e,n=0;n<t.length&&null!=i;n++)i=i[t[n]];return i}function X(e,t){for(var i=e.replace(/ \(copy( \d+)?\)$/,""),n=i,o=1;-1!==t.indexOf(n);)n=i+" (copy"+(1<o?" "+o:"")+")",o++;return n}function J(e,t){var i={};if(Array.isArray(e))for(var n=Math.min(e.length,ue),o=0;o<n;o++)!function e(t,i,n,o){(Array.isArray(t)||ne(t))&&!o||(i[n||""]=!0),ne(t)&&Object.keys(t).forEach(function(r){e(t[r],i,n+"."+r,o)})}(e[o],i,"",t);else i[""]=!0;return Object.keys(i).sort()}function U(e,t,i){var n=t&&"."!==t?j(t):[],o="desc"===i?-1:1,e=e.slice();return e.sort(function(e,t){return e=Y(e,n),t=Y(t,n),o*(t<e?1:e<t?-1:0)}),e}function Q(e,t){var i="desc"===t?-1:1,t=Object.keys(e).sort(function(e,t){return i*ae()(e,t)}),n={};return t.forEach(function(t){n[t]=e[t]}),n}function q(e){if(""===e)return"";var t=e.toLowerCase();if("null"===t)return null;if("true"===t)return!0;if("false"===t)return!1;var i=Number(e),t=parseFloat(e);return isNaN(i)||isNaN(t)?e:i}function ee(e,t){return"number"==typeof t&&ge<t&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf())}function te(e){return e<900?e.toFixed()+" B":(e/=1e3)<900?e.toFixed(1)+" KB":(e/=1e3)<900?e.toFixed(1)+" MB":(e/=1e3,e<900?e.toFixed(1)+" GB":(e/1e3).toFixed(1)+" TB")}function ie(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function ne(e){return"object"===n(e)&&null!==e&&!Array.isArray(e)}function oe(e,t){return-1!==e.indexOf(t)}function re(e,t){if(!t&&!e)return!1;if(t&&!e||!t&&e)return!0;if(t.length!==e.length)return!0;for(var i=0;i<e.length;++i){var o=function(i){if(!("error"===e[i].type?t.find(function(t){return t.line===e[i].line}):t.find(function(t){return t.dataPath===e[i].dataPath&&t.schemaPath===e[i].schemaPath})))return{v:!0}}(i);if("object"===n(o))return o.v}return!1}function se(e,t){return Object.prototype.hasOwnProperty.call(e,t)}i.r(t),i.d(t,{parse:function(){return o},tryJsonRepair:function(){return r},escapeUnicodeChars:function(){return s},validate:function(){return a},extend:function(){return l},clear:function(){return c},getType:function(){return d},isUrl:function(){return h},isArray:function(){return u},getWindow:function(){return g},getAbsoluteLeft:function(){return p},getAbsoluteTop:function(){return m},addClassName:function(){return f},removeAllClassNames:function(){return C},removeClassName:function(){return I},stripFormatting:function(){return A},setEndOfContentEditable:function(){return b},selectContentEditable:function(){return v},getSelection:function(){return y},setSelection:function(){return w},getSelectionOffset:function(){return x},setSelectionOffset:function(){return S},getInnerText:function(){return k},hasParentNode:function(){return T},getInternetExplorerVersion:function(){return M},isFirefox:function(){return N},addEventListener:function(){return R},removeEventListener:function(){return E},isChildOf:function(){return L},parsePath:function(){return j},stringifyPath:function(){return Z},improveSchemaError:function(){return W},isPromise:function(){return O},isValidValidationError:function(){return D},insideRect:function(){return G},debounce:function(){return B},textDiff:function(){return H},getInputSelection:function(){return _},getIndexForPosition:function(){return $},getPositionForPath:function(){return z},compileJSONPointer:function(){return P},getColorCSS:function(){return V},isValidColor:function(){return F},makeFieldTooltip:function(){return K},get:function(){return Y},findUniqueName:function(){return X},getChildPaths:function(){return J},sort:function(){return U},sortObjectKeys:function(){return Q},parseString:function(){return q},isTimestamp:function(){return ee},formatSize:function(){return te},limitCharacters:function(){return ie},isObject:function(){return ne},contains:function(){return oe},isValidationErrorChanged:function(){return re}});var t=i(4987),t=i(233),ae=i.n(t),t=i(8909),le=i.n(t),ce=i(6589),de=i(7026),he=i(7907),ue=1e4,ge=9466848e5,pe=/^https?:\/\/\S+$/,me=-1},8037:function(e,t,i){var n;if(window.Picker)n=window.Picker;else try{n=i(4049)}catch(e){}e.exports=n},6225:function(e,t,i){e=i.nmd(e),function(){function e(e,t,i){if("string"==typeof t){var n=a(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],s=0,l=t.length;s<l;++s){var c=a(e,t[s]);if(null==c&&r.original)return;o.push(c)}return i&&i.apply(null,o)||!0}}var t=function(){return this}();t||"undefined"==typeof window||(t=window);var i=function(e,t,n){"string"==typeof e?(2==arguments.length&&(n=t),i.modules[e]||(i.payloads[e]=n,i.modules[e]=null)):i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};i.modules={},i.payloads={};var n,o,r=function(t,i){var n=e("",t,i);return null==n&&r.original?r.original.apply(this,arguments):n},s=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return s(e,i[0])+"!"+s(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(t,n){n=s(t,n);var o,r=i.modules[n];return r||("function"==typeof(r=i.payloads[n])&&(t={id:n,uri:"",exports:o={},packaged:!0},o=r(function(t,i){return e(n,t,i)},o,t)||t.exports,i.modules[n]=o,delete i.payloads[n]),r=i.modules[n]=o||r),r};o=t,(n="ace")&&(t[n]||(t[n]={}),o=t[n]),o.define&&o.define.packaged||(i.original=o.define,o.define=i,o.define.packaged=!0),o.require&&o.require.packaged||(r.original=o.require,o.require=r,o.require.packaged=!0)}(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],function(e,t,i){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"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 n="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),r=n.userAgent||"",n=n.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==n||0<=n.indexOf("MSAppHost")?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=0<=r.indexOf("AdobeAIR"),t.isAndroid=0<=r.indexOf("Android"),t.isChromeOS=0<=r.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(r)&&!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,i){"use strict";var n=e("./useragent");t.buildDom=function e(t,i,n){if("string"==typeof t&&t){var o=document.createTextNode(t);return i&&i.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&i&&i.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s<t.length;s++){var a=e(t[s],i,n);a&&r.push(a)}return r}for(var l=document.createElement(t[0]),c=t[1],o=1,s=o=c&&"object"==typeof c&&!Array.isArray(c)?2:o;s<t.length;s++)e(t[s],l,n);return 2==o&&Object.keys(c).forEach(function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?n&&(n[t]=l):null!=t&&l.setAttribute(e,t)}),i&&i.appendChild(l),l},t.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var o=i.indexOf(t);if(-1==o)break;n=!1,i.splice(o,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},t.importCssString=function(e,i,n){var o=n,r=(o=n&&n.getRootNode&&(o=n.getRootNode())&&o!=n?o:document).ownerDocument||o;if(i&&t.hasCssString(i,o))return null;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n=t.createElement("style"),n.appendChild(r.createTextNode(e)),i&&(n.id=i),(o=o==r?t.getDocumentHead(r):o).insertBefore(n,o.firstChild)},t.importCssStylsheet=function(e,i){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(i))},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),o=n.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",n.appendChild(i);var r=e.documentElement;return r.appendChild(n),e=i.offsetWidth,o.overflow="scroll",i=i.offsetWidth,e==i&&(i=n.clientWidth),r.removeChild(n),e-i},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!n.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,"undefined"!=typeof document&&(e=document.createElement("div"),t.HI_DPI&&void 0!==e.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),n.isEdge||void 0===e.style.animationName||(t.HAS_CSS_ANIMATION=!0),e=null),t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:t.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,i){"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 i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./oop"),o=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return(t="string"!=typeof t?String.fromCharCode(e):t).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(){return null==l&&function(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){l={passive:!1}}})}catch(e){}}(),l}function o(e,t,i){this.elem=e,this.type=t,this.callback=i}function r(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function s(e,t,i){var n=r(t);if(!d.isMac&&h){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),h.altGr){if(3==(3&n))return;h.altGr=0}18!==i&&17!==i||(o="location"in t?t.location:t.keyLocation,17===i&&1===o?1==h[i]&&(u=t.timeStamp):18===i&&3===n&&2===o&&t.timeStamp-u<50&&(h.altGr=!0))}if(i in c.MODIFIER_KEYS&&(i=-1),!n&&13===i){var o="location"in t?t.location:t.keyLocation;if(3===o&&(e(t,n,-i),t.defaultPrevented))return}if(d.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in c.FUNCTION_KEYS||i in c.PRINTABLE_KEYS)&&e(t,n,i)}function a(){h=Object.create(null)}var l,c=e("./keys"),d=e("./useragent"),h=null,u=0;o.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var g=t.addListener=function(e,t,i,r){e.addEventListener(t,i,n()),r&&r.$toDestroy.push(new o(e,t,i))},p=t.removeListener=function(e,t,i){e.removeEventListener(t,i,n())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||d.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,i){function n(e){t&&t(e),i&&i(e),p(o,"mousemove",t),p(o,"mouseup",n),p(o,"dragstart",n)}var o=e&&e.ownerDocument||document;return g(o,"mousemove",t),g(o,"mouseup",n),g(o,"dragstart",n),n},t.addMouseWheelListener=function(e,t,i){"onmousewheel"in e?g(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)},i):"onwheel"in e?g(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)},i):g(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)},i)},t.addMultiMouseDownListener=function(e,i,n,o,r){function s(e){var r;if(0!==t.getButton(e)?h=0:1<e.detail&&!(4<++h)||(h=1),d.isIE&&(r=5<Math.abs(e.clientX-a)||5<Math.abs(e.clientY-l),c&&!r||(h=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},i[h-1]||600),1==h&&(a=e.clientX,l=e.clientY)),e._clicks=h,n[o]("mousedown",e),4<h)h=0;else if(1<h)return n[o](u[h],e)}var a,l,c,h=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};(e=Array.isArray(e)?e:[e]).forEach(function(e){g(e,"mousedown",s,r)})};var m;t.getModifierString=function(e){return c.KEY_MODS[r(e)]},t.addCommandKeyListener=function(e,i,n){var o,r;d.isOldGecko||d.isOpera&&!("KeyboardEvent"in window)?(o=null,g(e,"keydown",function(e){o=e.keyCode},n),g(e,"keypress",function(e){return s(i,e,o)},n)):(r=null,g(e,"keydown",function(e){h[e.keyCode]=(h[e.keyCode]||0)+1;var t=s(i,e,e.keyCode);return r=e.defaultPrevented,t},n),g(e,"keypress",function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),r=null)},n),g(e,"keyup",function(e){h[e.keyCode]=null},n),h||(a(),g(window,"focus",a)))},"object"==typeof window&&window.postMessage&&!d.isOldIE&&(m=1,t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+m++,o=function(r){r.data==n&&(t.stopPropagation(r),p(i,"message",o),e())};g(i,"message",o),i.postMessage(n,"*")}),t.$idleBlocked=!1,t.onIdle=function(e,i){return setTimeout(function i(){t.$idleBlocked?setTimeout(i,100):e()},i)},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="object"==typeof window&&(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/range",["require","exports","module"],function(e,t,i){"use strict";function n(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}}(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){return-1==(e=this.compareRange(e))||0==e||1==e},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.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)},this.clipRows=function(e,t){var i,o;return this.end.row>t?i={row:t+1,column:0}:this.end.row<e&&(i={row:e,column:0}),this.start.row>t?o={row:t+1,column:0}:this.start.row<e&&(o={row:e,column:0}),n.fromPoints(o||this.start,i||this.end)},this.extend=function(e,t){var i,o,r=this.compare(e,t);return 0==r?this:(-1==r?i={row:e,column:t}:o={row:e,column:t},n.fromPoints(i||this.start,o||this.end))},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),e=e.documentToScreenPosition(this.end);return new n(t.row,t.column,e.row,e.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";0<t;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t,i={};for(t in e)i[t]=e[t];return i},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t,i=Object.create(null);for(t in e)i[t]=e[t];return i},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){function t(){i=null,e()}var i=null,n=function(e){return n.cancel(),i=setTimeout(t,e||0),n};return(n.schedule=n).call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(i),i=null,n},n.isPending=function(){return i},n},t.delayedCall=function(e,t){function i(){o=null,e()}function n(e){null==o&&(o=setTimeout(i,e||t))}var o=null;return n.delay=function(e){o&&clearTimeout(o),o=setTimeout(i,e||t)},(n.schedule=n).call=function(){this.cancel(),e()},n.cancel=function(){o&&clearTimeout(o),o=null},n.isPending=function(){return o},n}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,i){"use strict";var n;i.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=o.isChrome<18,c=o.isIE,d=63<o.isChrome,h=e("../lib/keys"),u=h.KEY_MODS,g=o.isIOS,p=g?/\s/:/\n/,m=o.isMobile;t.TextInput=function(e,t){function i(e,i){if(G=G&&!1,S)return O(),e&&t.onPaste(e),S=!1,"";for(var n=w.selectionStart,r=w.selectionEnd,s=L,a=E.length-j,l=e,c=e.length-n,d=e.length-r,h=0;0<s&&E[h]==e[h];)h++,s--;for(l=l.slice(h),h=1;0<a&&E.length-h>L-1&&E[E.length-h]==e[e.length-h];)h++,a--;c-=h-1,d-=h-1;var u=l.length-h+1;return u<0&&(s=-u,u=0),l=l.slice(0,u),i||l||c||s||a||d?(i=!(T=!0),o.isAndroid&&". "==l&&(l=" ",i=!0),l&&!s&&!a&&!c&&!d||N?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:d}),T=!1,E=e,L=n,j=r,Z=d,i?"\n":l):""}function f(e){if(k)return _();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var n=w.value,e=i(n,!0);(500<n.length||p.test(e)||m&&L<1&&L==j)&&O()}function C(e,i){var o=t.getCopyText();if(!o)return n.preventDefault(e);B(e,o)?(g&&(O(o),x=o,setTimeout(function(){x=!1},10)),i?t.onCut():t.onCopy(),n.preventDefault(e)):(x=!0,w.value=o,w.select(),setTimeout(function(){x=!1,O(),i?t.onCut():t.onCopy()}))}function I(e){C(e,!0)}function A(e){C(e,!1)}function b(e){var i=B(e);a.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),o.isIE&&setTimeout(O),n.preventDefault(e)):(w.value="",S=!0))}function v(){R=!0,w.blur(),w.focus(),R=!1}function y(){clearTimeout(H),H=setTimeout(function(){M&&(w.style.cssText=M,M=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()},0)}var w=r.createElement("textarea");w.className="ace_text-input",w.setAttribute("wrap","off"),w.setAttribute("autocorrect","off"),w.setAttribute("autocapitalize","off"),w.setAttribute("spellcheck",!1),w.style.opacity="0",e.insertBefore(w,e.firstChild);var x=!1,S=!1,k=!1,T=!1,M="";m||(w.style.fontSize="1px");var N=!1,R=!1,E="",L=0,j=0,Z=0;try{var W=document.activeElement===w}catch(e){}n.addListener(w,"blur",function(e){R||(t.onBlur(e),W=!1)},t),n.addListener(w,"focus",function(e){if(!R){if(W=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(O):O()}},t),this.$focusScroll=!1,this.focus=function(){if(M||d||"browser"==this.$focusScroll)return w.focus({preventScroll:!0});var e=w.style.top;w.style.position="fixed",w.style.top="0px";try{var t=0!=w.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var n=w.parentElement;n&&1==n.nodeType;)i.push(n),n.setAttribute("ace_nocontext",!0),n=!n.parentElement&&n.getRootNode?n.getRootNode().host:n.parentElement;w.focus({preventScroll:!0}),t&&i.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){w.style.position="","0px"==w.style.top&&(w.style.top=e)},0)},this.blur=function(){w.blur()},this.isFocused=function(){return W},t.on("beforeEndOperation",function(){var e=t.curOp,i=e&&e.command&&e.command.name;"insertstring"!=i&&(e=i&&(e.docChanged||e.selectionChanged),k&&e&&(E=w.value="",$()),O())});var O=g?function(e){var i;!W||x&&!e||T||((i="\n ab"+(e=e||"")+"cde fg\n")!=w.value&&(w.value=E=i),e=4+(e.length||(t.selection.isEmpty()?0:1)),4==L&&j==e||w.setSelectionRange(4,e),L=4,j=e)}:function(){if(!k&&!T&&(W||G)){k=!0;var e,i,n,o=0,r=0,s="";if(t.session&&(e=(i=t.selection).getRange(),i=i.cursor.row,o=e.start.column,r=e.end.column,s=t.session.getLine(i),e.start.row!=i?(n=t.session.getLine(i-1),o=e.start.row<i-1?0:o,r+=n.length+1,s=n+"\n"+s):e.end.row!=i?(n=t.session.getLine(i+1),r=e.end.row>i+1?n.length:r,r+=s.length+1,s=s+"\n"+n):m&&0<i&&(s="\n"+s,r+=1,o+=1),400<s.length&&(o<400&&r<400?s=s.slice(0,400):(s="\n",o==r?o=r=0:(o=0,r=1)))),s+="\n\n",s!=E&&(w.value=E=s,L=j=s.length),G&&(L=w.selectionStart,j=w.selectionEnd),j!=r||L!=o||w.selectionEnd!=j)try{w.setSelectionRange(o,r),L=o,j=r}catch(e){}k=!1}};this.resetSelection=O,W&&t.onFocus();var D=null;this.setInputHandler=function(e){D=e};var G=!(this.getInputHandler=function(){return D}),B=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!l){var o=c||i?"Text":"text/plain";try{return t?!1!==n.setData(o,t):n.getData(o)}catch(e){if(!i)return B(e,t,!0)}}};n.addCommandKeyListener(w,t.onCommandKey.bind(t),t),n.addListener(w,"select",function(e){var i;k||(x?x=!1:0===(i=w).selectionStart&&i.selectionEnd>=E.length&&i.value===E&&E&&i.selectionEnd!==j?(t.selectAll(),O()):m&&w.selectionStart!=L&&O())},t),n.addListener(w,"input",f,t),n.addListener(w,"cut",I,t),n.addListener(w,"copy",A,t),n.addListener(w,"paste",b,t),"oncut"in w&&"oncopy"in w&&"onpaste"in w||n.addListener(e,"keydown",function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:A(e);break;case 86:b(e);break;case 88:I(e)}},t);var H,_=function(){var e;if(k&&t.onCompositionUpdate&&!t.$readOnly)return N?v():void(k.useTextareaForIME?t.onCompositionUpdate(w.value):(e=w.value,i(e),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+j-k.selectionStart+Z)))},$=function(e){t.onCompositionEnd&&!t.$readOnly&&(k=!1,t.onCompositionEnd(),t.off("mousedown",v),e&&f())},z=s.delayedCall(_,50).schedule.bind(null,null);n.addListener(w,"compositionstart",function(e){k||!t.onCompositionStart||t.$readOnly||(k={},N||(e.data&&(k.useTextareaForIME=!1),setTimeout(_,0),t._signal("compositionStart"),t.on("mousedown",v),(e=t.getSelectionRange()).end.row=e.start.row,e.end.column=e.start.column,k.markerRange=e,k.selectionStart=L,t.onCompositionStart(k),k.useTextareaForIME?(E=w.value="",j=L=0):(w.msGetInputContext&&(k.context=w.msGetInputContext()),w.getInputContext&&(k.context=w.getInputContext()))))},t),n.addListener(w,"compositionupdate",_,t),n.addListener(w,"keyup",function(e){27==e.keyCode&&w.value.length<w.selectionStart&&(k||(E=w.value),L=j=-1,O()),z()},t),n.addListener(w,"keydown",z,t),n.addListener(w,"compositionend",$,t),this.getElement=function(){return w},this.setCommandMode=function(e){N=e,w.readOnly=!1},this.setReadOnly=function(e){N||(w.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){G=!0,O(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){M=M||w.style.cssText,w.style.cssText=(i?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(L+j)*t.renderer.characterWidth*.5+"px;";var s=t.container.getBoundingClientRect(),i=r.computedStyle(t.container),a=s.top+(parseInt(i.borderTopWidth)||0),l=s.left+(parseInt(s.borderLeftWidth)||0),c=s.bottom-a-w.clientHeight-2,s=function(e){r.translate(w,e.clientX-l-2,Math.min(e.clientY-a-2,c))};s(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(H),o.isWin&&n.capture(t.container,s,y))},this.onContextMenuClose=y,e=function(e){t.textInput.onContextMenu(e),y()},n.addListener(w,"mouseup",e,t),n.addListener(w,"mousedown",function(e){e.preventDefault(),y()},t),n.addListener(t.renderer.scroller,"contextmenu",e,t),n.addListener(w,"contextmenu",e,t),g&&function(e,t){function i(i){var n,r,s,a;document.activeElement===t&&(o||k||e.$mouseHandler.isMousePressed||x||(n=t.selectionStart,r=t.selectionEnd,a=null,(s=0)==n?a=h.up:1==n?a=h.home:j<r&&"\n"==E[r]?a=h.end:n<L&&" "==E[n-1]?(a=h.left,s=u.option):n<L||n==L&&j!=L&&n==r?a=h.left:j<r&&2<E.slice(0,r).split("\n").length?a=h.down:j<r&&" "==E[r-1]?(a=h.right,s=u.option):(j<r||r==j&&j!=L&&n==r)&&(a=h.right),n!==r&&(s|=u.shift),a&&(!e.onCommandKey({},s,a)&&e.commands&&(a=h.keyCodeToString(a),(a=e.commands.findKeyCommand(s,a))&&e.execCommand(a)),L=n,j=r,O(""))))}var n=null,o=!1;t.addEventListener("keydown",function(e){n&&clearTimeout(n),o=!0},!0),t.addEventListener("keyup",function(e){n=setTimeout(function(){o=!1},100)},!0),document.addEventListener("selectionchange",i),e.on("destroy",function(){document.removeEventListener("selectionchange",i)})}(t,w)},t.$setUserAgentForTests=function(e,t){m=e,g=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,i){"use strict";function n(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)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,o=e.getButton();return 0!==o?(!n.getSelectionRange().isEmpty()&&1!=o||n.selection.moveToPosition(i),void(2==o&&(n.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimeout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,1<e.domEvent._clicks),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(t=-1==(e=this.$clickSelection.comparePoint(n))?this.$clickSelection.end:1==e?this.$clickSelection.start:(n=(t=o(this.$clickSelection,n)).cursor,t.anchor),i.selection.setSelectionAnchor(t.row,t.column)),i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),s=n.selection[e](r.row,r.column);this.$clickSelection&&(t=this.$clickSelection.comparePoint(s.start),e=this.$clickSelection.comparePoint(s.end),-1==t&&e<=0?(i=this.$clickSelection.end,s.end.row==r.row&&s.end.column==r.column||(r=s.start)):1==e&&0<=t?(i=this.$clickSelection.start,s.start.row==r.row&&s.start.column==r.column||(r=s.end)):i=-1==t&&1==e?(r=s.end,s.start):(r=(s=o(this.$clickSelection,r)).cursor,s.anchor),n.selection.setSelectionAnchor(i.row,i.column)),n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,i,i=(e=this.mousedownEvent.x,n=this.mousedownEvent.y,t=this.x,i=this.y,Math.sqrt(Math.pow(t-e,2)+Math.pow(i-n,2))),n=Date.now();(0<i||n-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,e=i.session.getBracketRange(t);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines"),e=i.getSelectionRange(),e.isMultiLine()&&e.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(e.start.row),this.$clickSelection.end=i.selection.getLineRange(e.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){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 i=this.$lastScroll,n=e.domEvent.timeStamp,o=n-i.t,r=o?e.wheelX/o:i.vx,s=o?e.wheelY/o:i.vy;o<550&&(r=(r+i.vx)/2,s=(s+i.vy)/2);var a=Math.abs(r/s),o=!1;return 1<=a&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(o=!0),(o=!!(a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed))||o)?i.allowed=n:n-i.allowed<550&&(Math.abs(r)<=1.5*Math.abs(i.vx)&&Math.abs(s)<=1.5*Math.abs(i.vy)?(o=!0,i.allowed=n):i.allowed=0),i.t=n,i.vx=r,i.vy=s,o?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var o=e("./lib/dom");(function(){this.$init=function(){return this.$element=o.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){o.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),t.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function n(e){a.call(this,e)}var o=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;r.inherits(n,a),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();i<(e+=15)+o&&(e-=e+o-i),n<(t+=15)+r&&(t-=20+r),a.prototype.setPosition.call(this,e,t)}}.call(n.prototype),t.GutterHandler=function(e){function t(){r=r&&clearTimeout(r),l&&(h.hide(),l=null,c._signal("hideGutterTooltip",h),c.off("mousewheel",t))}function i(e){h.setPosition(e.x,e.y)}var r,a,l,c=e.editor,d=c.renderer.$gutterLayer,h=new n(c.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(c.isFocused()&&0==t.getButton()&&"foldWidgets"!=d.getRegion(t)){var i=t.getDocumentPosition().row,n=c.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return c.selectAll(),t.preventDefault();e.$clickSelection=c.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(n){var s=n.domEvent.target||n.domEvent.srcElement;if(o.hasCssClass(s,"ace_fold-widget"))return t();l&&e.$tooltipFollowsMouse&&i(n),a=n,r=r||setTimeout(function(){r=null,(a&&!e.isMousePressed?function(){var n=a.getDocumentPosition().row,o=d.$annotations[n];if(!o)return t();if(n==c.session.getLength()){var n=c.renderer.pixelToScreenCoordinates(0,a.y).row,r=a.$pos;if(n>c.session.documentToScreenRow(r.row,r.column))return t()}l!=o&&(l=o.text.join("<br/>"),h.setHtml(l),h.show(),c._signal("showGutterTooltip",h),c.on("mousewheel",t),e.$tooltipFollowsMouse?i(a):(r=a.domEvent.target.getBoundingClientRect(),(o=h.getElement().style).left=r.right+"px",o.top=r.bottom+"px"))}:t)()},50)}),s.addListener(c.renderer.$gutter,"mouseout",function(e){a=null,l&&!r&&(r=setTimeout(function(){r=null,t()},50))},c),c.on("changeSession",t)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),t=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e,t=this.editor.getSelectionRange();return t.isEmpty()?this.$inSelection=!1:(e=this.getDocumentPosition(),this.$inSelection=t.contains(e.row,e.column)),this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(t.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(e){function t(){var e,t,i,n,r,s,a,l,c=I;I=h.renderer.screenToTextCoordinates(p,m),a=I,s=c,l=Date.now(),r=!s||a.row!=s.row,s=!s||a.column!=s.column,!y||r||s?(h.moveCursorToPosition(a),y=l,w={x:p,y:m}):5<o(w.x,w.y,p,m)?y=null:200<=l-y&&(h.renderer.scrollCursorIntoView(),y=null),e=I,t=c,i=Date.now(),n=h.renderer.layerConfig.lineHeight,r=h.renderer.layerConfig.characterWidth,s=h.renderer.scroller.getBoundingClientRect(),a={x:{left:p-s.left,right:s.right-p},y:{top:m-s.top,bottom:s.bottom-m}},l=Math.min(a.x.left,a.x.right),c=Math.min(a.y.top,a.y.bottom),s={row:e.row,column:e.column},l/r<=2&&(s.column+=a.x.left<a.x.right?-3:2),c/n<=1&&(s.row+=a.y.top<a.y.bottom?-1:1),n=e.row!=s.row,a=e.column!=s.column,t=!t||e.row!=t.row,n||a&&!t?v?200<=i-v&&h.renderer.scrollCursorIntoView(s):v=i:v=null}function i(){C=h.selection.toOrientedRange(),g=h.session.addMarker(C,"ace_selection",h.getSelectionStyle()),h.clearSelection(),h.isFocused()&&h.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),t(),f=setInterval(t,20),S=0,s.addListener(document,"mousemove",l)}function n(){clearInterval(f),h.session.removeMarker(g),g=null,h.selection.fromOrientedRange(C),h.isFocused()&&!b&&h.$resetCursorStyle(),S=0,y=v=I=C=null,s.removeListener(document,"mousemove",l)}function l(){null==k&&(k=setTimeout(function(){null!=k&&g&&n()},20))}function c(e){return!(e=e.types)||Array.prototype.some.call(e,function(e){return"text/plain"==e||"Text"==e})}function d(e){var t=["copy","copymove","all","uninitialized"],i=a.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return i&&0<=t.indexOf(n)?o="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(n)?o="move":0<=t.indexOf(n)&&(o="copy"),o}var h=e.editor,u=r.createElement("img");u.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(u.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),h.on("mousedown",this.onMouseDown.bind(e));var g,p,m,f,C,I,A,b,v,y,w,x=h.container,S=0;this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}C=h.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=h.getReadOnly()?"copy":"copyMove",a.isOpera&&(h.container.appendChild(u),u.scrollTop=0),i.setDragImage&&i.setDragImage(u,0,0),a.isOpera&&h.container.removeChild(u),i.clearData(),i.setData("Text",h.session.getTextRange()),b=!0,this.setState("drag")},this.onDragEnd=function(e){x.draggable=!1,b=!1,this.setState(null),h.getReadOnly()||(e=e.dataTransfer.dropEffect,A||"move"!=e||h.session.remove(h.getSelectionRange()),h.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!h.getReadOnly()&&c(e.dataTransfer))return p=e.clientX,m=e.clientY,g||i(),S++,e.dataTransfer.dropEffect=A=d(e),s.preventDefault(e)},this.onDragOver=function(e){if(!h.getReadOnly()&&c(e.dataTransfer))return p=e.clientX,m=e.clientY,g||(i(),S++),null!==k&&(k=null),e.dataTransfer.dropEffect=A=d(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--S<=0&&g)return n(),A=null,s.preventDefault(e)},this.onDrop=function(e){if(I){var t=e.dataTransfer;if(b)switch(A){case"move":C=C.contains(I.row,I.column)?{start:I,end:I}:h.moveText(C,I);break;case"copy":C=h.moveText(C,I,!0)}else t=t.getData("Text"),C={start:I,end:h.session.insert(I,t)},h.focus(),A=null;return n(),s.preventDefault(e)}},s.addListener(x,"dragstart",this.onDragStart.bind(e),h),s.addListener(x,"dragend",this.onDragEnd.bind(e),h),s.addListener(x,"dragenter",this.onDragEnter.bind(e),h),s.addListener(x,"dragover",this.onDragOver.bind(e),h),s.addListener(x,"dragleave",this.onDragLeave.bind(e),h),s.addListener(x,"drop",this.onDrop.bind(e),h);var k=null}function o(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var r=e("../lib/dom"),s=e("../lib/event"),a=e("../lib/useragent");(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.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;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;a.isIE&&"dragReady"==this.state&&3<o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){var t,i,n;this.$dragEnabled&&(this.mousedownEvent=e,t=this.editor,n=e.inSelection(),i=e.getButton(),1===(e.domEvent.detail||1)&&0===i&&n&&(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(n=e.domEvent.target||e.domEvent.srcElement)&&(n.unselectable="on"),t.getDragDelay()?(a.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0)))}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){function i(){function e(e){var o,s=e.target.getAttribute("action");if("more"==s||!n)return n=!n,o=t.getCopyText(),e=t.session.getUndoManager().hasUndo(),void C.replaceChild(r.buildDom(n?["span",!o&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],o&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],o&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],i&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],e&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),C.firstChild);"paste"==s?i.readText().then(function(e){t.execCommand(s,e)}):s&&("cut"!=s&&"copy"!=s||(i?i.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(s)),C.firstChild.style.display="none",n=!1,"openCommandPallete"!=s&&t.focus()}var i=window.navigator&&window.navigator.clipboard,n=!1;C=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){I="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),e(t)},onclick:e},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function s(){C||i();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),o=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,e=t.container.getBoundingClientRect();C.style.top=n.pageY-e.top-3+"px",n.pageX-e.left<e.width-70?(C.style.left="",C.style.right="10px"):(C.style.right="",C.style.left=o+r-e.left+"px"),C.style.display="",C.firstChild.style.display="none",t.on("input",a)}function a(e){C&&(C.style.display="none"),t.off("input",a)}function l(){g=null,clearTimeout(g);var e=t.selection.getRange(),i=e.contains(m.row,m.column);!e.isEmpty()&&i||(t.selection.moveToPosition(m),t.selection.selectWord()),I="wait",s()}var c,d,h,u,g,p,m,f,C,I="scroll",A=0,b=0,v=0,y=0;o.addListener(e,"contextmenu",function(e){f&&t.textInput.getElement().focus()},t),o.addListener(e,"touchstart",function(e){var i=e.touches;if(g||1<i.length)return clearTimeout(g),g=null,h=-1,void(I="zoom");f=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.lineHeight,s=e.timeStamp;u=s;var a=i[0],p=a.clientX,C=a.clientY;Math.abs(c-p)+Math.abs(d-C)>o&&(h=-1),c=e.clientX=p,d=e.clientY=C,v=y=0;var w=new n(e,t);if(m=w.getDocumentPosition(),s-h<500&&1==i.length&&!A)b++,e.preventDefault(),e.button=0,function(){g=null,clearTimeout(g),t.selection.moveToPosition(m);var e=2<=b?t.selection.getLineRange(m.row):t.session.getBracketRange(m);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),I="wait"}();else{b=0;var x=t.selection.cursor,a=t.selection.isEmpty()?x:t.selection.anchor,p=t.renderer.$cursorLayer.getPixelPosition(x,!0),C=t.renderer.$cursorLayer.getPixelPosition(a,!0),w=t.renderer.scroller.getBoundingClientRect(),i=t.renderer.layerConfig.offset,x=t.renderer.scrollLeft,a=function(e,t){return(e/=r)*e+(t=t/o-.75)*t};if(e.clientX<w.left)return void(I="zoom");p=a(e.clientX-w.left-p.left+x,e.clientY-w.top-p.top+i),i=a(e.clientX-w.left-C.left+x,e.clientY-w.top-C.top+i),p<3.5&&i<3.5&&(I=i<p?"cursor":"anchor"),I=i<3.5?"anchor":p<3.5?"cursor":"scroll",g=setTimeout(l,450)}h=s},t),o.addListener(e,"touchend",function(e){f=t.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),"zoom"==I?(I="",A=0):g?(t.selection.moveToPosition(m),A=0,s()):"scroll"==I?(A+=60,p=setInterval(function(){A--<=0&&(clearInterval(p),p=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),A<20&&(v*=.9),A<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(A=0)},10),a()):s(),clearTimeout(g),g=null},t),o.addListener(e,"touchmove",function(e){g&&(clearTimeout(g),g=null);var i=e.touches;if(!(1<i.length||"zoom"==I)){var o=i[0],r=c-o.clientX,s=d-o.clientY;if("wait"==I){if(!(4<r*r+s*s))return e.preventDefault();I="cursor"}c=o.clientX,d=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var a,i=e.timeStamp,o=i-u;u=i,"scroll"==I?((a=new n(e,t)).speed=1,a.wheelX=r,a.wheelY=s,10*Math.abs(r)<Math.abs(s)&&(r=0),10*Math.abs(s)<Math.abs(r)&&(s=0),0!=o&&(v=r/o,y=s/o),t._emit("mousewheel",a),a.propagationStopped||(v=y=0)):(a=new n(e,t).getDocumentPosition(),"cursor"==I?t.selection.moveCursorToPosition(a):"anchor"==I&&t.selection.setSelectionAnchor(a.row,a.column),t.renderer.scrollCursorIntoView(a),e.preventDefault())}},t)}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),o=document.createElement("script");o.src=e,i.appendChild(o),o.onload=o.onreadystatechange=function(e,i){!i&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";function n(){this.propagationStopped=!0}function o(){this.defaultPrevented=!0}var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(i.length||r){(t="object"==typeof t&&t?t:{}).type||(t.type=e),t.stopPropagation||(t.stopPropagation=n),t.preventDefault||(t.preventDefault=o);for(var i=i.slice(),s=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){if(i=(this._eventRegistry||{})[e])for(var i=i.slice(),n=0;n<i.length;n++)i[n](t,this)},r.once=function(e,t){var i=this;if(this.on(e,function n(){i.off(e,n),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var i,n,o=this._defaultHandlers;(o=o||(this._defaultHandlers={_disabled_:{}}))[e]&&(n=o[e],(i=o._disabled_[e])||(o._disabled_[e]=i=[]),i.push(n),-1!=(n=i.indexOf(t))&&i.splice(n,1)),o[e]=t},r.removeDefaultHandler=function(e,t){var i,n=this._defaultHandlers;n&&(i=n._disabled_[e],n[e]==t?i&&this.setDefaultHandler(e,i.pop()):!i||-1!=(t=i.indexOf(t))&&i.splice(t,1))},r.on=r.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return-1==(n=n||(this._eventRegistry[e]=[])).indexOf(t)&&n[i?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{},!(e=this._eventRegistry[e])||-1!==(t=e.indexOf(t))&&e.splice(t,1)},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){function n(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function o(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}var r=e("./oop"),s=e("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t,i={};return e?Array.isArray(e)||(i=e,e=Object.keys(i)):(t=this.$options,e=Object.keys(t).filter(function(e){return!t[e].hidden})),e.forEach(function(e){i[e]=this.getOption(e)},this),i},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].setOption(e,t):(i.handlesSet||(this["$"+e]=t),void(i&&i.set&&i.set.call(this,t))):n('misspelled option "'+e+'"')}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};e=function(){this.$defaultOptions={}},function(){r.implement(this,s),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach(function(t){var n=i[t];(n="string"==typeof n?{forwardTo:n}:n).name||(n.name=t),"initialValue"in(e.$options[n.name]=n)&&(e["$"+n.name]=n.initialValue)}),r.implement(e,a),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)})},this.setDefaultValue=function(e,t,i){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(i){this.setDefaultValue(e,i,t[i])},this)},this.warn=n,this.reportError=o}.call(e.prototype),t.AppConfig=e}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){function o(o){if(l&&l.document){c.packaged=o||e.packaged||n.packaged||l.define&&i.amdD.packaged;for(var r,s={},a="",o=document.currentScript||document._currentScript,d=(o&&o.ownerDocument||document).getElementsByTagName("script"),h=0;h<d.length;h++){var u=d[h],g=u.src||u.getAttribute("src");if(g){for(var p=u.attributes,m=0,f=p.length;m<f;m++){var C=p[m];0===C.name.indexOf("data-ace-")&&(s[C.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=C.value)}g=g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/),g&&(a=g[1])}}for(r in a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[r]&&t.set(r,s[r])}}var r=e("./lib/lang"),s=(e("./lib/oop"),e("./lib/net")),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var l=function(){return this||"undefined"!=typeof window&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(c.hasOwnProperty(e))c[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},t.all=function(){return r.copyObject(c)},t.$modes={},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",o=i[i.length-1];return"worker"==t&&"-"==n&&(e=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),o=o.replace(e,"")),(!o||o==t)&&1<i.length&&(o=i[i.length-2]),i=c[t+"Path"],null==i?i=c.basePath:"/"==n&&(t=n=""),i&&"/"!=i.slice(-1)&&(i+="/"),i+t+n+o+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var o,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{o=e(i)}catch(n){}if(o&&!t.$loading[i])return n&&n(o);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(1<t.$loading[i].length)){if(n=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})},!t.get("packaged"))return n();s.loadScript(t.moduleUrl(i,r),n),d()}};var d=function(){c.basePath||c.workerPath||c.modePath||c.themePath||Object.keys(c.$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"),d=function(){})};o(!0),t.init=o,t.version="1.4.12"}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,d=e("../config"),e=function(e){function t(t){document.hasFocus&&document.hasFocus()&&(e.isFocused()||document.activeElement!=(e.textInput&&e.textInput.getElement()))||window.focus(),e.focus()}var i=this;this.editor=e,new r(this),new s(this),new l(this);var a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var d=e.renderer.$gutter;n.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),n.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick"),e),n.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),n.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),n.addListener(a,"mousedown",t,e),n.addListener(d,"mousedown",t,e),o.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",t,e),n.addListener(e.renderer.scrollBarH.element,"mousedown",t,e)),e.on("mousemove",function(t){var n,o;i.state||i.$dragDelay||!i.$dragEnabled||(n=e.renderer.screenToTextCoordinates(t.x,t.y),o=e.session.selection.getRange(),t=e.renderer,!o.isEmpty()&&o.insideStart(n.row,n.column)?t.setCursorStyle("default"):t.setCursorStyle(""))},e)};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){function i(e){if(e){if(o.isWebKit&&!e.which&&c.releaseMouse)return c.releaseMouse();c.x=e.clientX,c.y=e.clientY,t&&t(e),c.mouseEvent=new a(e,c.editor),c.$mouseMoved=!0}}function r(e){s.off("beforeEndOperation",h),clearInterval(u),d(),c[c.state+"End"]&&c[c.state+"End"](e),c.state="",c.isMousePressed=l.$isMousePressed=!1,l.$keepTextAreaAtCursor&&l.$moveTextAreaToCursor(),c.$onCaptureMouseMove=c.releaseMouse=null,e&&c.onMouseEvent("mouseup",e),s.endOperation()}this.x=e.x,this.y=e.y,this.isMousePressed=!0;var s=this.editor,l=this.editor.renderer;l.$isMousePressed=!0;var c=this,d=function(){c[c.state]&&c[c.state](),c.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){r(e)});var h=function(e){c.releaseMouse&&s.curOp.command.name&&s.curOp.selectionChanged&&(c[c.state+"End"]&&c[c.state+"End"](),c.state="",c.releaseMouse())};s.on("beforeEndOperation",h),s.startOperation({command:{name:"mouse"}}),c.$onCaptureMouseMove=i,c.releaseMouse=n.capture(this.editor.container,i,r);var u=setInterval(d,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(e.prototype),d.defineOptions(e.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=e}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom");t.FoldHandler=function(e){e.on("click",function(t){var i=t.getDocumentPosition(),o=e.session,i=o.getFoldAt(i.row,i.column,1);i&&(t.getAccelKey()?o.removeFold(i):o.expandFold(i),t.stop()),(t=t.domEvent&&t.domEvent.target)&&n.hasCssClass(t,"ace_inline_button")&&n.hasCssClass(t,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){var i,n;"foldWidgets"==e.renderer.$gutterLayer.getRegion(t)&&(i=t.getDocumentPosition().row,(n=e.session).foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop())}),e.on("gutterdblclick",function(t){var i,n,o;"foldWidgets"==e.renderer.$gutterLayer.getRegion(t)&&(o=t.getDocumentPosition().row,(n=(n=(i=e.session).getParentFoldRangeData(o,!0)).range||n.firstRange)&&(o=n.start.row,(o=i.getFoldAt(o,i.getLine(o).length,1))?i.removeFold(o):(i.addFold("...",n),e.renderer.scrollCursorIntoView({row:n.start.row,column:0}))),t.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),o=e("../lib/event"),e=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){var i;e&&("function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e),-1!=(i=this.$handlers.indexOf(e))&&this.$handlers.splice(i,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor))},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((r=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n))&&r.command&&((s="null"==r.command||a.exec(r.command,this.$editor,r.args,n))&&n&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&o.stopEvent(n),s)););return s||-1!=e||(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,i){var o=n.keyCodeToString(i);return this.$callKeyboardHandlers(t,o,i,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(e.prototype),t.KeyBinding=e}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,i){"use strict";function n(e,t,i,n){var o,L,j,Z,W=s?u:h,O=0,D=-1,G=null,B=null,H=[];if(!n)for(G=0,n=[];G<i;G++)n[G]=r(e[G]);for(a=s,d=c=l=!1,B=0;B<i;B++){if(o=O,H[B]=L=function(e,t,i,n){var o,r,a,h=t[n];switch(h){case g:case p:l=!1;case C:case f:return h;case m:return l?f:m;case b:return l=!0,p;case v:return C;case y:return n<1||n+1>=t.length||(o=i[n-1])!=m&&o!=f||(u=t[n+1])!=m&&u!=f?C:(u=l?f:u)==o?u:C;case w:return(o=0<n?i[n-1]:I)==m&&n+1<t.length&&t[n+1]==m?m:C;case x:if(0<n&&i[n-1]==m)return m;if(l)return C;for(a=n+1,r=t.length;a<r&&t[a]==x;)a++;return a<r&&t[a]==m?m:C;case S:for(r=t.length,a=n+1;a<r&&t[a]==S;)a++;if(a<r){var u=e[n],u=1425<=u&&u<=2303||64286==u;if(o=t[a],u&&(o==p||o==b))return p}return n<1||(o=t[n-1])==I?C:i[n-1];case I:return c=!(l=!1),s;case A:return d=!0,C;case k:case T:case N:case R:case M:l=!1;case E:return C}}(e,n,H,B),Z=240&(O=W[o][L]),O&=15,t[B]=j=W[O][5],0<Z)if(16==Z){for(G=D;G<B;G++)t[G]=1;D=-1}else D=-1;if(W[O][6])-1==D&&(D=B);else if(-1<D){for(G=D;G<B;G++)t[G]=j;D=-1}n[B]==I&&(t[B]=0),a|=j}if(d)for(G=0;G<i;G++)if(n[G]==A){t[G]=s;for(var _=G-1;0<=_&&n[_]==v;_--)t[_]=s}}function o(e,t,i){if(!(a<e))if(1!=e||1!=s||c)for(var n,o,r,l,d=i.length,h=0;h<d;){if(t[h]>=e){for(n=h+1;n<d&&t[n]>=e;)n++;for(o=h,r=n-1;o<r;o++,r--)l=i[o],i[o]=i[r],i[r]=l;h=n}h++}else i.reverse()}function r(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?191<t?g:L[t]:5==i?/[\u0591-\u05f4]/.test(e)?p:g:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?S:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?x:/[\u06f0-\u06f9]/.test(e)?m:b:32==i&&t<=8287?j[255&t]:254==i&&65136<=t?b:C}var s=0,a=0,l=!1,c=!1,d=!1,h=[[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]],u=[[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]],g=0,p=1,m=2,f=3,C=4,I=5,A=6,b=7,v=8,y=9,w=10,x=11,S=12,k=13,T=14,M=15,N=16,R=17,E=18,L=[E,E,E,E,E,E,E,E,E,A,I,A,v,I,E,E,E,E,E,E,E,E,E,E,E,E,E,E,I,I,I,A,v,C,C,x,x,x,C,C,C,C,C,w,y,w,y,y,m,m,m,m,m,m,m,m,m,m,y,C,C,C,C,C,C,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,C,C,C,C,C,C,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,C,C,C,C,E,E,E,E,E,E,I,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,y,C,x,x,x,x,C,C,C,C,g,C,C,E,C,C,x,x,m,m,C,g,C,C,C,m,g,C,C,C,C,C],j=[v,v,v,v,v,v,v,v,v,v,v,E,E,E,g,p,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,v,I,k,T,M,N,R,y,x,x,x,x,x,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,y,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,v];t.L=g,t.R=p,t.EN=m,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,i,r){if(e.length<2)return{};var a=e.split(""),l=new Array(a.length),c=new Array(a.length),d=[];s=r?1:0,n(a,d,a.length,i);for(var h=0;h<l.length;l[h]=h,h++);for(o(2,d,l),o(1,d,l),h=0;h<l.length-1;h++)i[h]===f?d[h]=t.AN:d[h]===p&&(i[h]>b&&i[h]<k||i[h]===C||i[h]===E)?d[h]=t.ON_R:0<h&&"ل"===a[h-1]&&/\u0622|\u0623|\u0625|\u0627/.test(a[h])&&(d[h-1]=d[h]=t.R_H,h++);for(a[a.length-1]===t.DOT&&(d[a.length-1]=t.B),""===a[0]&&(d[0]=t.RLE),h=0;h<l.length;h++)c[h]=d[l[h]];return{logicalFromVisual:l,bidiLevels:c}},t.hasBidiCharacters=function(e,t){for(var i=!1,n=0;n<e.length;n++)t[n]=r(e.charAt(n)),i||t[n]!=p&&t[n]!=b&&t[n]!=f||(i=!0);return i},t.getVisualFromLogicalIdx=function(e,t){for(var i=0;i<t.logicalFromVisual.length;i++)if(t.logicalFromVisual[i]==e)return i;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,i){"use strict";var n=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,e=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=n,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())};(function(){this.isBidiRow=function(e,t,i){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,i),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;return!t.length||0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))&&(e=this.session.$docRowCache[t]),e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-e&&(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=i,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){var i=(e=void 0===e?this.getDocumentRow():e)===this.session.getLength()-1?this.EOF:this.EOL;this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode?((e=this.session.$wrapData[e])&&(0<(t=void 0===t?this.getSplitIndex():t)&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t])),t==e.length&&(this.line+=this.showInvisibles?i:n.DOT)):this.line+=this.showInvisibles?i:n.DOT;var r,s=this.session,a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(r="\t"===e?s.getScreenTabSize(t+a):2,a+=r-1,o.stringRepeat(n.DOT,r)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==n.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];n.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=n.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){var t;this.characterWidth!==e.$characterSize.width&&(this.fontMetrics=e,t=this.characterWidth=e.$characterSize.width,e=e.$measureCharWidth("ה"),this.charWidths[n.L]=this.charWidths[n.EN]=this.charWidths[n.ON_R]=t,this.charWidths[n.R]=this.charWidths[n.AN]=e,this.charWidths[n.R_H]=.45*e,this.charWidths[n.B]=this.charWidths[n.RLE]=0,this.currentRow=null)},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var i=e.getCursorPosition(),n=e.selection.getSelectionAnchor().row;n<=i.row;n++)t||e.session.getLine(n).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(n).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:n},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(n,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,i=t<e?this.session.getOverwrite()?e:e-1:t,o=n.getVisualFromLogicalIdx(i,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!=0&&o++;for(var a=0;a<o;a++)s+=this.charWidths[r[a]];return!this.session.getOverwrite()&&t<e&&r[o]%2==0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var i,n=this.bidiMap,o=n.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var u,g=0;g<o.length;g++)u=n.logicalFromVisual[g],i=o[g],(c=a<=u&&u<l)&&!d?h=s:!c&&d&&r.push({left:h,width:s-h}),s+=this.charWidths[i],d=c;if(c&&g===o.length&&r.push({left:h,width:s-h}),this.isRtlDir)for(var p=0;p<r.length;p++)r[p].left+=this.rtlLineOffset;return r},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,e=Math.max(e,0),i=0,n=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[n]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i+r/2<e;){if(i+=r,n===o.length-1){r=0;break}r=this.charWidths[o[++n]]}return 0===(t=0<n&&o[n-1]%2!=0&&o[n]%2==0?(e<i&&n--,this.bidiMap.logicalFromVisual[n]):0<n&&o[n-1]%2==0&&o[n]%2!=0?1+(i<e?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===o.length-1&&0===r&&o[n-1]%2==0||!this.isRtlDir&&0===n&&o[n]%2!=0?1+this.bidiMap.logicalFromVisual[n]:(0<n&&o[n-1]%2!=0&&0!==r&&n--,this.bidiMap.logicalFromVisual[n]))&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(e.prototype),t.BidiHandler=e}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,e=function(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")})};(function(){n.implement(this,r),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var i=t?e.end:e.start,e=t?e.start:e.end;this.$setSelection(i.row,i.column,e.row,e.column)},this.$setSelection=function(e,t,i,n){var o,r;this.$silent||(o=this.$isEmpty,r=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(i,n),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection"))},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){var i;return void 0===t&&(e=(i=e||this.lead).row,t=i.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},this.getLineRange=function(e,t){var i="number"==typeof e?e:this.lead.row,e=this.session.getFoldLine(i),e=e?(i=e.start.row,e.end.row):i;return!0===t?new s(i,0,e,this.session.getLine(e).length):new s(i,0,e+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,o=e.column+t;return i<0&&(n=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(e=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,e,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-e):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(e.end.row,e.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(e=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,e,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,e):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(i,0),e=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);e[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=e[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);this.lead.column==t.column&&(e=this.session.getLine(t.row),t.column!=e.length||0<(e=e.search(/\s+$/))&&(t.column=e)),this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(i=this.session.getFoldAt(e,t,-1))this.moveCursorTo(i.start.row,i.start.column);else{var i=this.session.getFoldStringAt(e,t,-1);if(null==i&&(i=this.doc.getLine(e).substring(0,t)),i=o.stringReverse(i),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(t-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),t<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(0<e&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(o.lastIndex=0;(t=e[i])&&!o.test(t);)if(o.lastIndex=0,i++,n.test(t)){if(2<i){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(2<i)break}}return o.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==i.length){for(var r=this.doc.getLength();n=this.doc.getLine(++e),e<r&&/^\s*$/.test(n););/^\s+/.test(n)||(n=""),t=0}i=this.$shortWordEndIndex(n),this.moveCursorTo(e,t+i)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var i=this.session.getLine(e).substring(0,t);if(0===t){for(;i=this.doc.getLine(--e),0<e&&/^\s*$/.test(i););t=i.length,/\s+$/.test(i)||(i="")}var n=o.stringReverse(i),n=this.$shortWordEndIndex(n);return this.moveCursorTo(e,t-n)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(i=this.session.lineWidgets[this.lead.row],e<0?e-=i.rowsAbove||0:0<e&&(e+=i.rowCount-(i.rowsAbove||0)));var o=this.session.screenToDocumentPosition(n.row+e,n.column,o);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,n=this.session.getLine(e),/[\uDC00-\uDFFF]/.test(n.charAt(t))&&n.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){t=this.session.screenToDocumentPosition(e,t),this.moveCursorTo(t.row,t.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.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},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return s.fromPoints(t,i)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){var e;return this.rangeCount?e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}):(e=this.getRange()).isBackwards=this.isBackwards(),e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&1<e.length){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.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}}).call(e.prototype),t.Selection=e}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),o=2e3,e=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<i.length;l++){var c,d,h=i[l];h.defaultToken&&(r.defaultToken=h.defaultToken),h.caseInsensitive&&(s="gi"),null!=h.regex&&(h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1)),c=h.regex,d=new RegExp("(?:("+c+")|(.))").exec("a").length-2,Array.isArray(h.token)?1==h.token.length||1==d?h.token=h.token[0]:d-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:d-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):"function"!=typeof h.token||h.onMatch||(h.onMatch=1<d?this.$applyToken:h.token),1<d&&(c=/\\\d/.test(h.regex)?h.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)}):(d=1,this.removeCapturingGroups(h.regex)),h.splitRegex||"string"==typeof h.token||a.push(h)),r[o]=l,o+=d,n.push(c),h.onMatch||(h.onMatch=null))}n.length||(r[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],o=0,r=i.length;o<r;o++)t[o]&&(n[n.length]={type:i[o],value:t[o]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,o=0,r=n.length;o<r;o++)t[o+1]&&(i[i.length]={type:n[o],value:t[o+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){var i,n,o;return-1!=e.indexOf("(?=")&&(i=0,n=!1,o={},e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,r,s,a,l){return n?n="]"!=a:a?n=!0:s?(i==o.stack&&(o.end=l+1,o.stack=-1),i--):r&&(i++,1!=r.length&&(o.stack=i,o.start=l)),e}),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))),"$"!=(e="^"!=e.charAt(0)?"^"+e:e).charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){var i;t&&"string"!=typeof t?"#tmp"===(t=(i=t.slice(0))[0])&&(i.shift(),t=i.shift()):i=[];for(var n,r=t||"start",s=(s=this.states[r])||this.states[r="start"],a=this.matchMappings[r],l=this.regExps[r],c=[],d=l.lastIndex=0,h=0,u={type:null,value:""};n=l.exec(e);){var g,p=a.defaultToken,m=null,f=n[0],C=l.lastIndex;C-f.length>d&&(g=e.substring(d,C-f.length),u.type==p?u.value+=g:(u.type&&c.push(u),u={type:p,value:g}));for(var I=0;I<n.length-2;I++)if(void 0!==n[I+1]){p=(m=s[a[I]]).onMatch?m.onMatch(f,r,i,e):m.token,m.next&&(r="string"==typeof m.next?m.next:m.next(r,i),(s=this.states[r])||(this.reportError("state doesn't exist",r),s=this.states[r="start"]),a=this.matchMappings[r],(l=this.regExps[r]).lastIndex=d=C),m.consumeLineEnd&&(d=C);break}if(f)if("string"==typeof p)m&&!1===m.merge||u.type!==p?(u.type&&c.push(u),u={type:p,value:f}):u.value+=f;else if(p)for(u.type&&c.push(u),u={type:null,value:""},I=0;I<p.length;I++)c.push(p[I]);if(d==e.length)break;if(d=C,h++>o){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d<e.length;)u.type&&c.push(u),u={value:e.substring(d,d+=500),type:"overflow"};r="start",i=[];break}}return u.type&&c.push(u),1<i.length&&i[0]!==r&&i.unshift("#tmp",r),{tokens:c,state:i.length?i:r}},this.reportError=n.reportError}).call(e.prototype),t.Tokenizer=e}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){function e(e,t){return"start"==e&&!t.length||t.unshift(this.nextState,e),this.nextState}function t(e,t){return t.shift(),t.shift()||"start"}this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],o=0;o<n.length;o++){var r=n[o];(r.next||r.onMatch)&&("string"==typeof r.next&&0!==r.next.indexOf(t)&&(r.next=t+r.next),r.nextState&&0!==r.nextState.indexOf(t)&&(r.nextState=t+r.nextState))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,o,r){if(e="function"==typeof e?(new e).getRules():e,o)for(var s=0;s<o.length;s++)o[s]=t+o[s];else for(var a in o=[],e)o.push(t+a);if(this.addRules(e,t),i)for(var l=Array.prototype[r?"push":"unshift"],s=0;s<o.length;s++)l.apply(this.$rules[o[s]],n.deepCopy(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds},this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach(function o(r){var s=n[r];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d,h=l.next||l.push;if(h&&Array.isArray(h)?((d=l.stateName)||("string"!=typeof(d=l.token)&&(d=d[0]||""),n[d]&&(d+=i++)),n[d]=h,o(l.next=d)):"pop"==h&&(l.next=t),l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var u in l.rules)n[u]?n[u].push&&n[u].push.apply(n[u],l.rules[u]):n[u]=l.rules[u];h="string"==typeof l?l:l.include,(c=h?Array.isArray(h)?h.map(function(e){return n[e]}):n[h]:c)&&(c=[a,1].concat(c),l.noEscape&&(c=c.filter(function(e){return!e.next})),s.splice.apply(s,c),a--),l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,i,n){var o=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var r=e[t].split(n||"|"),s=r.length;s--;){var a=r[s];this.$keywordList.push(a),i&&(a=a.toLowerCase()),o[a]=t}},this),e=null,i?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(e.prototype),t.TextHighlightRules=e}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";function n(){this.$behaviours={}}(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){t=("function"==typeof e?new e:e).getBehaviours(t),this.addBehaviours(t)},this.getBehaviours=function(e){if(e){for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}return this.$behaviours}}).call(n.prototype),t.Behaviour=n}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range,e=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t),i=e.getTokenAt(t,i),this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;0<t;)i+=e[--t].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(e.prototype),t.TokenIterator=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";function n(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function o(e,t,i,n){var o=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}}var r,s=e("../../lib/oop"),a=e("../behaviour").Behaviour,l=e("../../token_iterator").TokenIterator,c=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],h=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},g={'"':'"',"'":"'"},p=function(e){this.add("braces","insertion",function(t,i,s,a,l){var d=s.getCursorPosition(),h=a.doc.getLine(d.row);if("{"==l){n(s);var u=s.getSelectionRange(),g=a.doc.getTextRange(u);return""!==g&&"{"!==g&&s.getWrapBehavioursEnabled()?o(u,g,"{","}"):p.isSaneInsertion(s,a)?/[\]\}\)]/.test(h[d.column])||s.inMultiSelectMode||e&&e.braces?(p.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(s,a,"{"),{text:"{",selection:[1,1]}):void 0}if("}"==l){n(s);var m=h.substring(d.column,d.column+1);if("}"==m&&null!==a.$findOpeningBracket("}",{column:d.column+1,row:d.row})&&p.isAutoInsertedClosing(d,h,l))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){if(n(s),s="",p.isMaybeInsertedClosing(d,h)&&(s=c.stringRepeat("}",r.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===(m=h.substring(d.column,d.column+1))){var f=a.findMatchingBracket({row:d.row,column:d.column+1},"}");if(!f)return null;f=this.$getIndent(a.getLine(f.row))}else{if(!s)return void p.clearMaybeInsertedClosing();f=this.$getIndent(h)}return a=f+a.getTabString(),{text:"\n"+a+"\n"+f+s,selection:[1,a.length,1,a.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,o,s){var a=o.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==a){if(n(i),"}"==o.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,i,r,s){if("("==s){n(i);var a=i.getSelectionRange(),l=r.doc.getTextRange(a);return""!==l&&i.getWrapBehavioursEnabled()?o(a,l,"(",")"):p.isSaneInsertion(i,r)?(p.recordAutoInsert(i,r,")"),{text:"()",selection:[1,1]}):void 0}if(")"==s&&(n(i),a=i.getCursorPosition(),l=r.doc.getLine(a.row),i=l.substring(a.column,a.column+1),")"==i&&null!==r.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,s)))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}),this.add("parens","deletion",function(e,t,i,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(n(i),")"==o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,i,r,s){if("["==s){n(i);var a=i.getSelectionRange(),l=r.doc.getTextRange(a);return""!==l&&i.getWrapBehavioursEnabled()?o(a,l,"[","]"):p.isSaneInsertion(i,r)?(p.recordAutoInsert(i,r,"]"),{text:"[]",selection:[1,1]}):void 0}if("]"==s&&(n(i),a=i.getCursorPosition(),l=r.doc.getLine(a.row),i=l.substring(a.column,a.column+1),"]"==i&&null!==r.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,s)))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}),this.add("brackets","deletion",function(e,t,i,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(n(i),"]"==o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,i,r,s){var a=r.$mode.$quotes||g;if(1==s.length&&a[s]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(s))){n(i);var l=s,c=i.getSelectionRange(),d=r.doc.getTextRange(c);if(!(""===d||1==d.length&&a[d])&&i.getWrapBehavioursEnabled())return o(c,d,l,l);if(!d){var h=i.getCursorPosition(),u=r.doc.getLine(h.row),s=u.substring(h.column-1,h.column),a=u.substring(h.column,h.column+1),c=r.getTokenAt(h.row,h.column),d=r.getTokenAt(h.row,h.column+1);if("\\"==s&&c&&/escape/.test(c.type))return null;var p,i=c&&/string|escape/.test(c.type),c=!d||/string|escape/.test(d.type);if(a==l)(p=i!==c)&&/string\.end/.test(d.type)&&(p=!1);else{if(i&&!c)return null;if(i&&c)return null;if(i=r.$mode.tokenRe,i.lastIndex=0,c=i.test(s),i.lastIndex=0,r=i.test(s),c||r)return null;if(a&&!/[\s;,.})\]\\]/.test(a))return null;if(h=u[h.column-2],s==l&&(h==l||i.test(h)))return null;p=!0}return{text:p?l+l:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,o,r){var s=o.$mode.$quotes||g,a=o.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(a)&&(n(i),o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==a))return r.end.column++,r})};p.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new l(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",d)){if(/[)}\]]/.test(e.session.getLine(i.row)[i.column]))return!0;if(t=new l(t,i.row,i.column+1),!this.$matchTokenType(t.getCurrentToken()||"text",d))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",h)},p.$matchTokenType=function(e,t){return-1<t.indexOf(e.type||e)},p.recordAutoInsert=function(e,t,i){e=e.getCursorPosition(),t=t.doc.getLine(e.row),this.isAutoInsertedClosing(e,t,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=e.row,r.autoInsertedLineEnd=i+t.substr(e.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,i){e=e.getCursorPosition(),t=t.doc.getLine(e.row),this.isMaybeInsertedClosing(e,t)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=e.row,r.maybeInsertedLineStart=t.substr(0,e.column)+i,r.maybeInsertedLineEnd=t.substr(e.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,i){return 0<r.autoInsertedBrackets&&e.row===r.autoInsertedRow&&i===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return 0<r.maybeInsertedBrackets&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},s.inherits(p,a),t.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){"use strict";for(var n=[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],o=0,r=[],s=0;s<n.length;s+=2)r.push(o+=n[s]),n[s+1]&&r.push(45,o+=n[s+1]);t.wordChars=String.fromCharCode.apply(null,r)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../config"),o=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),l=e("../lib/lang"),c=e("../token_iterator").TokenIterator,d=e("../range").Range,e=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function o(e){for(var t=i;t<=n;t++)e(r.getLine(t),t)}var r=t.doc,s=!0,a=!0,c=1/0,d=t.getTabSize(),h=!1;if(this.lineCommentStart){C=Array.isArray(this.lineCommentStart)?(A=this.lineCommentStart.map(l.escapeRegExp).join("|"),this.lineCommentStart[0]):(A=l.escapeRegExp(this.lineCommentStart),this.lineCommentStart),A=new RegExp("^(\\s*)(?:"+A+") ?");var h=t.getUseSoftTabs(),u=function(e,t){var i,n,o=e.match(A);o&&(i=o[1].length,n=o[0].length,f(e,i,n)||" "!=o[0][n-1]||n--,r.removeInLine(t,i,n))},g=C+" ",p=function(e,t){s&&!/\S/.test(e)||(f(e,c,c)?r.insertInLine({row:t,column:c},g):r.insertInLine({row:t,column:c},C))},m=function(e,t){return A.test(e)},f=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%d!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return 2<d?n%d!=d-1:n%d==0}}else{if(!this.blockComment)return!1;var C=this.blockComment.start,I=this.blockComment.end,A=new RegExp("^(\\s*)(?:"+l.escapeRegExp(C)+")"),b=new RegExp("(?:"+l.escapeRegExp(I)+")\\s*$"),p=function(e,t){m(e,t)||s&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},I),r.insertInLine({row:t,column:c},C))},u=function(e,t){var i;(i=e.match(b))&&r.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(A))&&r.removeInLine(t,i[1].length,i[0].length)},m=function(e,i){if(A.test(e))return!0;for(var n=t.getTokens(i),o=0;o<n.length;o++)if("comment"===n[o].type)return!0}}var v=1/0;o(function(e,t){var i=e.search(/\S/);-1!==i?(i<c&&(c=i),a&&!m(e,t)&&(a=!1)):v>e.length&&(v=e.length)}),c==1/0&&(c=v,a=s=!1),h&&c%d!=0&&(c=Math.floor(c/d)*d),o(a?u:p)},this.toggleBlockComment=function(e,t,i,n){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(p=new c(t,n.row,n.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var h=p.getCurrentTokenRow(),u=p.getCurrentTokenColumn()+m,g=new d(h,u,h,u+o.start.length);break}a=p.stepBackward()}for(var p,m,a=(p=new c(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.end))){var h=p.getCurrentTokenRow(),u=p.getCurrentTokenColumn()+m,f=new d(h,u,h,u+o.end.length);break}a=p.stepForward()}f&&t.remove(f),g&&(t.remove(g),r=g.start.row,s=-o.start.length)}else s=o.start.length,r=i.start.row,t.insert(i.end,o.end),t.insert(i.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e){var i,o,r;e[t]&&(o=(i=e[t]).prototype.$id,(r=n.$modes[o])||(n.$modes[o]=r=new i),n.$modes[t]||(n.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r)}for(var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<s.length;t++)!function(e){var i=s[t],n=e[i];e[s[t]]=function(){return this.$delegator(i,arguments,n)}}(this)},this.$delegator=function(e,t,i){var n=t[0]||"start";if("string"!=typeof n){if(Array.isArray(n[2])){var o=n[2][n[2].length-1];if(s=this.$modes[o])return s[e].apply(s,[n[1]].concat([].slice.call(t,1)))}n=n[0]||"start"}for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var s,a=n.split(this.$embeds[r]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[r]])[e].apply(s,t)}return o=i.apply(this,t),i?o:void 0},this.transformAction=function(e,t,i,n,o){if(this.$behaviour){var r,s=this.$behaviour.getBehaviours();for(r in s)if(s[r][t]){var a=s[r][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(s in t)for(var n=t[s],o=0,r=n.length;o<r;o++)if("string"==typeof n[o].token)/keyword|support|storage/.test(n[o].token)&&i.push(n[o].regex);else if("object"==typeof n[o].token)for(var s,a=0,l=n[o].token.length;a<l;a++)/keyword|support|storage/.test(n[o].token[a])&&(s=n[o].regex.match(/\(.+?\)/g)[a],i.push(s.substr(1,s.length-2)));this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(e.prototype),t.Mode=e}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,i){"use strict";t.applyDelta=function(e,t,i){var n=t.start.row,o=t.start.column,r=e[n]||"";switch(t.action){case"insert":1===t.lines.length?e[n]=r.substring(0,o)+t.lines[0]+r.substring(o):(a=[n,1].concat(t.lines),e.splice.apply(e,a),e[n]=r.substring(0,o)+e[n],e[n+t.lines.length-1]+=r.substring(o));break;case"remove":var s=t.end.column,a=t.end.row;n===a?e[n]=r.substring(0,o)+r.substring(s):e.splice(n,a-n+1,r.substring(0,o)+e[a].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,t=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function e(e,t,i){return i=i?e.column<=t.column:e.column<t.column,e.row<t.row||e.row==t.row&&i}n.implement(this,o),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row||(t=function(t,i,n){var o="insert"==t.action,r=(o?1:-1)*(t.end.row-t.start.row),s=(o?1:-1)*(t.end.column-t.start.column),a=t.start,t=o?a:t.end;return e(i,a,n)?{row:i.row,column:i.column}:e(t,i,!n)?{row:i.row+r,column:i.column+(i.row==t.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight),this.setPosition(t.row,t.column,!0))},this.setPosition=function(e,t,i){e=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row==e.row&&this.column==e.column||(t={row:this.row,column:this.column},this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(t.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,e=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,r),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t,i;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),i=t.length-1,e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))),t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},this.clippedPos=function(e,t){var i=this.getLength();return void 0===e?e=i:e<0?e=0:i<=e&&(e=i-1,t=void 0),i=this.getLine(e),null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$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},this.insertFullLines=function(e,t){var i=0,i=(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),0):(t=[""].concat(t),this.$lines[--e].length);this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var i=this.clippedPos(e.row,e.column),e={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:e,action:"insert",lines:t}),this.clonePos(e)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),e=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},this.removeInLine=function(e,t,i){return t=this.clippedPos(e,t),i=this.clippedPos(e,i),this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})},!0),this.clonePos(t)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&0<e,n=t<this.getLength()-1,o=i?e-1:e,r=i?this.getLine(o).length:0,i=n?t+1:t,n=n?0:this.getLine(i).length,n=new s(o,r,i,n),t=this.$lines.slice(e,t+1);return this.applyDelta({start:n.start,end:n.end,action:"remove",lines:this.getLinesForRange(n)}),t},this.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;0<=t;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(i&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length-t+1,o=e.start.row,r=e.start.column,s=0,a=0;s<n;s=a){a+=t-1;var l=i.slice(s,a);l.push(""),this.applyDelta({start:this.pos(o+s,r),end:this.pos(o+a,r=0),action:e.action,lines:l},!0)}e.lines=i.slice(s),e.start.row=o+s,e.start.column=r,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=t||0,r=i.length;o<r;o++)if((e-=i[o].length+n)<0)return{row:o,column:e+i[o].length+n};return{row:r-1,column:e+i[r-1].length+n}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,i.length),s=t||0;s<r;++s)o+=i[s].length+n;return o+e.column}}).call(e.prototype),t.Document=e}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,e=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,o=i.doc,r=t;i.lines[t];)t++;var s=o.getLength(),a=0;for(i.running=!1;t<s;){for(i.$tokenizeRow(t),n=t;t++,i.lines[t];);if(++a%5==0&&20<new Date-e){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,r<=(n=-1==n?t:n)&&i.fireUpdateEvent(r,n)}}};(function(){n.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){this._signal("update",{data:{first:e,last:t}})},this.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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;0==i?this.lines[t]=null:"remove"==e.action?(this.lines.splice(t,1+i,null),this.states.splice(t,1+i,null)):((i=Array(1+i)).unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)),this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],i=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(e.prototype),t.BackgroundTokenizer=e}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),e=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&(c=(c=(c=n.getMatchOffsets(i.getLine(l),this.regExp)).length>this.MAX_RANGES?c.slice(0,this.MAX_RANGES):c).map(function(e){return new o(l,e.offset,l,e.offset+e.length)}),this.cache[l]=c.length?c:"");for(var d=c.length;d--;)t.drawSingleLineMarker(e,c[d].toScreenRange(i),this.clazz,r)}}}).call(e.prototype),t.SearchHighlight=e}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t],e=t[t.length-1],this.range=new o(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var o=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.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)}),0<this.range.compareEnd(e.start.row,e.start.column)?(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},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(n=s[l]).range.compareStart(t,i)))return void e(null,t,i,r,a);if(!e(null,n.start.row,n.start.column,r,a)&&e(n.placeholder,n.start.row,n.start.column,r)||0===o)return;a=!n.sameRow,r=n.end.column}e(null,t,i,r,a)},this.getNextFoldTo=function(e,t){for(var i,n,o=0;o<this.folds.length;o++){if(-1==(n=(i=this.folds[o]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var r,s=(r=this.folds).indexOf(n);for(0===s&&(this.start.column+=i);s<r.length;s++){if((n=r[s]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)return null;var o=i.fold,e=this.folds,t=this.foldData,i=e.indexOf(o),o=e[i-1];return this.end.row=o.end.row,this.end.column=o.end.column,e=new n(t,e=e.splice(i,e.length-i)),t.splice(t.indexOf(this)+1,0,e),e},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(n.prototype),t.FoldLine=n}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range.comparePoints,e=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var o=this.ranges,r=i||0;r<o.length;r++){var s=o[r],a=n(e,s.end);if(!(0<a))return s=n(e,s.start),0===a?t&&0!==s?-r-2:r:0<s||0===s&&!t?r:-r-1}return-r-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t),t=this.pointIndex(e.end,t,i=i<0?-i-1:i);return t<0?t=-t-1:t++,this.ranges.splice(i,t-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){if(0<=(e=this.pointIndex(e)))return this.ranges.splice(e,1)},this.merge=function(){for(var e=[],t=this.ranges,i=(t=t.sort(function(e,t){return n(e.start,t.start)}))[0],o=1;o<t.length;o++){var r=i,i=t[o],s=n(r.end,i.start);s<0||(0!=s||r.isEmpty()||i.isEmpty())&&(n(r.end,i.end)<0&&(r.end.row=i.end.row,r.end.column=i.end.column),t.splice(o,1),e.push(i),i=r,o--)}return this.ranges=t,e},this.contains=function(e,t){return 0<=this.pointIndex({row:e,column:t})},this.containsPoint=function(e){return 0<=this.pointIndex(e)},this.rangeAtPoint=function(e){if(0<=(e=this.pointIndex(e)))return this.ranges[e]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var e=this.pointIndex({row:e,column:0}),n=this.pointIndex({row:t,column:0},e=e<0?-e-1:e);n<0&&(n=-n-1);for(var o=[],r=e;r<n;r++)o.push(i[r]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,i=e.end,n=t.row,o=i.row,r=this.ranges,s=0,a=r.length;s<a&&!((d=r[s]).end.row>=n);s++);if("insert"==e.action)for(var l=o-n,c=-t.column+i.column;s<a&&!((d=r[s]).start.row>n);s++)d.start.row==n&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==n&&d.end.column>=t.column&&(d.end.column==t.column&&this.$bias<0||(d.end.column==t.column&&0<c&&s<a-1&&d.end.column>d.start.column&&d.end.column==r[s+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l));else for(var d,l=n-o,c=t.column-i.column;s<a&&!((d=r[s]).start.row>o);s++)d.end.row<o&&(n<d.end.row||n==d.end.row&&t.column<d.end.column)?(d.end.row=n,d.end.column=t.column):d.end.row==o?d.end.column<=i.column?(l||d.end.column>t.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>o&&(d.end.row+=l),d.start.row<o&&(n<d.start.row||n==d.start.row&&t.column<d.start.column)?(d.start.row=n,d.start.column=t.column):d.start.row==o?d.start.column<=i.column?(l||d.start.column>t.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>o&&(d.start.row+=l);if(0!=l&&s<a)for(;s<a;s++)(d=r[s]).start.row+=l,d.end.row+=l}}).call(e.prototype),t.RangeList=e}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";function n(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function o(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}var r=e("../range_list").RangeList,e=e("../lib/oop"),s=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};e.inherits(s,r),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new s(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){s=e,a=this.start,n(s.start,a),n(s.end,a);for(var t=e.start.row,i=e.start.column,o=0,r=-1;o<this.subFolds.length&&1==(r=this.subFolds[o].range.compare(t,i));o++);var s=this.subFolds[o],a=0;if(0==r){if(s.range.containsRange(e))return s.addSubFold(e);a=1}for(var t=e.range.end.row,i=e.range.end.column,l=o,r=-1;l<this.subFolds.length&&1==(r=this.subFolds[l].range.compare(t,i));l++);0==r&&l++;for(var c=this.subFolds.splice(o,l-o,e),d=0==r?c.length-1:c.length,h=a;h<d;h++)e.addSubFold(c[h]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return t=e,e=this.start,o(t.start,e),void o(t.end,e);var t}}.call(s.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,i){"use strict";var n=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var o=n.folds,r=0;r<o.length;r++){var s=o[r].range;if(s.contains(e,t)&&(1!=i||!s.isEnd(e,t)||s.isEmpty())&&(-1!=i||!s.isStart(e,t)||s.isEmpty()))return o[r]}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,o=[];t.column+=1,--i.column;for(var r=0;r<n.length;r++)if(2!=(l=n[r].range.compareRange(e))){if(-2==l)break;for(var s=n[r].folds,a=0;a<s.length;a++){var l,c=s[a];if(-2==(l=c.range.compareRange(e)))break;if(2!=l){if(42==l)break;o.push(c)}}}return--t.column,i.column+=1,o},this.getFoldsInRangeList=function(e){var t;return Array.isArray(e)?(t=[],e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)):t=this.getFoldsInRange(e),t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var o,r={end:{column:0}},s=0;s<n.folds.length;s++){var a,l=(a=n.folds[s]).range.compareEnd(e,t);if(-1==l){o=this.getLine(a.start.row).substring(r.end.column,a.start.column);break}if(0===l)return null;r=a}return o=o||this.getLine(a.start.row).substring(r.end.column),-1==i?o.substring(0,t-r.end.column):1==i?o.substring(t-r.end.column):o},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(-1==(n=t?i.indexOf(t):n)&&(n=0);n<i.length;n++){var o=i[n];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(-1==(n=t?i.indexOf(t):n)&&(n=0);n<i.length;n++){var o=i[n];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,o=0;o<i.length;o++){var r=i[o],s=r.end.row,r=r.start.row;if(t<=s){r<t&&(e<=r?n-=t-r:n=0);break}e<=s&&(n-=e<=r?s-r:s-e+1)}return n},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 i,n=this.$foldData,s=!1;e instanceof r?i=e:(i=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,d=i.end.column,e=this.getFoldAt(a,l,1),t=this.getFoldAt(c,d,-1);if(e&&t==e)return e.addSubFold(i);e&&!e.range.isStart(a,l)&&this.removeFold(e),t&&!t.range.isEnd(c,d)&&this.removeFold(t),t=this.getFoldsInRange(i.range),0<t.length&&(this.removeFolds(t),i.collapseChildren||t.forEach(function(e){i.addSubFold(e)}));for(var h=0;h<n.length;h++){var u=n[h];if(c==u.start.row){u.addFold(i),s=!0;break}if(a==u.end.row){if(u.addFold(i),s=!0,!i.sameRow){var g=n[h+1];if(g&&g.start.row==c){u.merge(g);break}}break}if(c<=u.start.row)break}return s||(u=this.$addFoldLine(new o(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(u.start.row,u.start.row):this.$updateRowLengthCache(u.start.row,u.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,o=this.$foldData,r=t.folds;1==r.length?o.splice(o.indexOf(t),1):t.range.isEnd(e.end.row,e.end.column)?(r.pop(),t.end.row=r[r.length-1].end.row,t.end.column=r[r.length-1].end.column):t.range.isStart(e.start.row,e.start.column)?(r.shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column):e.sameRow?r.splice(r.indexOf(e),1):((r=(t=t.split(e.start.row,e.start.column)).folds).shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),0<e.collapseChildren&&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 i;if(null==e?(i=new n(0,0,this.getLength(),0),null==t&&(t=!0)):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,i=this.getFoldsInRangeList(i),0!=t?this.removeFolds(i):this.expandFolds(i),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){return t=this.getFoldLine(e,t),t?t.end.row:e},this.getRowFoldStart=function(e,t){return t=this.getFoldLine(e,t),t?t.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,o){null==n&&(n=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var r=this.doc,s="";return e.walk(function(e,t,i,a){if(!(t<n)){if(t==n){if(i<o)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,i)}},t,i),s},this.getDisplayLine=function(e,t,i,n){var o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,i,n):(e=this.doc.getLine(e),e.substring(n||0,t||e.length))},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){return t=t.folds.map(function(e){return e.clone()}),new o(e,t)})},this.toggleFold=function(e){var t,i=this.selection.getRange();if(i.isEmpty()){var n=i.start;if(o=this.getFoldAt(n.row,n.column))return void this.expandFold(o);(t=this.findMatchingBracket(n))?1==i.comparePoint(t)?i.end=t:(i.start=t,i.start.column++,i.end.column--):(t=this.findMatchingBracket({row:n.row,column:n.column+1}))?(1==i.comparePoint(t)?i.end=t:i.start=t,i.start.column++):i=this.getCommentFoldRange(n.row,n.column)||i}else{if(n=this.getFoldsInRange(i),e&&n.length)return void this.expandFolds(n);1==n.length&&(o=n[0])}if((o=o||this.getFoldAt(i.start.row,i.start.column))&&o.range.toString()==i.toString())this.expandFold(o);else{var o="...";if(!i.isMultiLine()){if((o=this.getTextRange(i)).length<4)return;o=o.trim().substring(0,2)+".."}this.addFold(o,i)}},this.getCommentFoldRange=function(e,t,i){var o=new s(this,e,t),r=o.getCurrentToken(),a=r&&r.type;if(r&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),a=new n;if(1!=i){for(;(r=o.stepBackward())&&l.test(r.type););o.stepForward()}if(a.start.row=o.getCurrentTokenRow(),a.start.column=o.getCurrentTokenColumn()+2,o=new s(this,e,t),-1!=i){var c=-1;do{if(r=o.stepForward(),-1==c){var d=this.getState(o.$row);l.test(d)||(c=o.$row)}else if(o.$row>c)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return a.end.row=o.getCurrentTokenRow(),a.end.column=o.getCurrentTokenColumn()+r.value.length-2,a}},this.foldAll=function(e,t,i,n){null==i&&(i=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r,s=e=e||0;s<t;s++)null==o[s]&&(o[s]=this.getFoldWidget(s)),"start"==o[s]&&(n&&!n(s)||(r=this.getFoldWidgetRange(s))&&r.isMultiLine()&&r.end.row<=t&&r.start.row>=e&&(s=r.end.row,r.collapseChildren=i,this.addFold("...",r)))}},this.foldToLevel=function(e){for(this.foldAll();0<e--;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var i=e.getTokens(t),n=0;n<i.length;n++){var o=i[n];if("text"!=o.type||!/^\s+$/.test(o.value))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=e&&("manual"==(this.$foldStyle=e)&&this.unfold(),e=this.$foldMode,this.$setFolding(null),this.$setFolding(e))},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n=e-1;0<=n;){var o=i[n];if("start"==(o=null==o?i[n]=this.getFoldWidget(n):o)){var r=this.getFoldWidgetRange(n),s=s||r;if(r&&r.end.row>=e)break}n--}return{range:-1!==n&&r,firstRange:s}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,i)||(t=t.target||t.srcElement)&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),i="end"===i?-1:1,n=this.getFoldAt(e,-1==i?0:n.length,i);if(n)return t.children||t.all?this.removeFold(n):this.expandFold(n),n;var o,r,i=this.getFoldWidgetRange(e,!0);return i&&!i.isMultiLine()&&(n=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(n.range)?(this.removeFold(n),n):(t.siblings?((n=this.getParentFoldRangeData(e)).range&&(o=n.range.start.row+1,r=n.range.end.row),this.foldAll(o,r,t.all?1e4:0)):t.children?(r=i?i.end.row:this.getLength(),this.foldAll(e+1,r,t.all?1e4:0)):i&&(t.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)}},this.toggleFoldWidget=function(e){var t,i,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),(i=this.$toggleFoldWidget(n,{}))||(i=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=i.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",i))},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;0==i?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+i,null):((i=Array(1+i)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data,e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0==e.column?null:""==(t=t||this.getLine(e.row).charAt(e.column-1))?null:(t=t.match(/([\(\[\{])|([\)\]\}])/),t?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null)},this.getBracketRange=function(e){var t,i,n=this.getLine(e.row),r=!0,s=n.charAt(e.column-1),a=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(a||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(i=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,i),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(i=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(i,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),i=t.charAt(e.column-1),n=i&&i.match(/([\(\[\{])|([\)\]\}])/);return n||(i=t.charAt(e.column),e={row:e.row,column:e.column+1},n=i&&i.match(/([\(\[\{])|([\)\]\}])/)),n?(i=new o(e.row,e.column-1,e.row,e.column),e=n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e),e?[i,new o(e.row,e.column,e.row,e.column+1)]:[i]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,i){var o=this.$brackets[e],r=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a=a||s.stepForward()){i=i||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;0<=l;){var d=c.charAt(l);if(d==o){if(0==--r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else d==e&&(r+=1);--l}for(;(a=s.stepBackward())&&!i.test(a.type););if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var o=this.$brackets[e],r=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a=a||s.stepForward()){i=i||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,d=c.length;l<d;){var h=c.charAt(l);if(h==o){if(0==--r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l+=1}for(;(a=s.stepForward())&&!i.test(a.type););if(null==a)break;l=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/lang"),r=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,h=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++p.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new r(this),s.resetOptions(this),this.setMode(t),s._signal("session",this)};p.$uid=0,function(){function e(e){return!(e<4352)&&(4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12288<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510)}n.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),(this.doc=e).on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,e=this.$getRowCacheIndex(this.$docRowCache,e)+1;e<t&&(this.$docRowCache.splice(e,t),this.$screenRowCache.splice(e,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var o=i+n>>1,r=e[o];if(r<t)i=1+o;else{if(!(t<r))return o;n=o-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){e=e.data,this.$resetRowCache(e.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i=this.bgTokenizer.getTokens(e),n=0;if(null==t)var o=i.length-1,n=this.getLine(e).length;else for(o=0;o<i.length&&!(t<=(n+=i[o].value.length));o++);return(e=i[o])?(e.index=o,e.start=n-e.value.length,e):null},this.setUndoManager=function(e){var t;this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e?(e.addSession(t=this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){(t=void 0===t?"ace_breakpoint":t)?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var o=this.$markerId++,t={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:o};return n?(this.$frontMarkers[o]=t,this._signal("changeFrontMarker")):(this.$backMarkers[o]=t,this._signal("changeBackMarker")),o},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){var t;this.$searchHighlight||(t=new g(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(t)),this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){return"number"!=typeof t&&(i=t,t=e),i=i||"ace_step",t=new d(e,0,t,1/0),t.id=this.addMarker(t,i,"fullLine",n),t},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){e=e.match(/^.*?(\r?\n)/m),this.$autoNewLine=e?e[1]:"\n"},this.getWordRange=function(e,t){var i,n=this.getLine(e),o=!1;i=(o=(o=0<t?!!n.charAt(t-1).match(this.tokenRe):o)||!!n.charAt(t).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var r=t;if(0<r){for(;0<=--r&&n.charAt(r).match(i););r++}for(var s=t;s<n.length&&n.charAt(s).match(i);)s++;return new d(e,r,e,s)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=s.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,s.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||((this.$modes[n]=e).$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){var i,n,o,r;t||(this.$modeId=e.$id),this.$mode!==e&&(i=this.$mode,this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(n=e.getTokenizer()).on&&(o=this.onReloadTokenizer.bind(this),n.on("update",o)),this.bgTokenizer?this.bgTokenizer.setTokenizer(n):(this.bgTokenizer=new u(n),(r=this).bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)})),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:i,mode:e})))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;l<a;l++){if(s<l){if(a<=(l=r.end.row+1))break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=e.length-1;-1!=i;i--){var n=e[i];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=0;i<e.length;i++){var n=e[i];"insert"!=n.action&&"remove"!=n.action||this.doc.$safeApplyDelta(n)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function i(e){return t?"insert"!==e.action:"insert"===e.action}for(var n,o,r=0;r<e.length;r++){var s=e[r];s.start&&(n?i(s)?(o=s.start,-1==n.compare(o.row,o.column)&&n.setStart(o),o=s.end,1==n.compare(o.row,o.column)&&n.setEnd(o)):(o=s.start,-1==n.compare(o.row,o.column)&&(n=d.fromPoints(s.start,s.start))):n=i(s)?d.fromPoints(s.start,s.end):d.fromPoints(s.start,s.start))}return n},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n,o,r,s=this.getTextRange(e),a=this.getFoldsInRange(e),t=d.fromPoints(t,t);return i||(this.remove(e),o=e.start.row-e.end.row,(r=o?-e.end.column:e.start.column-e.end.column)&&(t.start.row==e.end.row&&t.start.column>e.end.column&&(t.start.column+=r),t.end.row==e.end.row&&t.end.column>e.end.column&&(t.end.column+=r)),o&&t.start.row>=e.end.row&&(t.start.row+=o,t.end.row+=o)),t.end=this.insert(t.start,s),a.length&&(n=e.start,e=t.start,o=e.row-n.row,r=e.column-n.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==n.row&&(e.start.column+=r),e.end.row==n.row&&(e.end.column+=r),e.start.row+=o,e.end.row+=o,e}))),t},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new d(0,0,0,0),n=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);i.start.row=o,i.end.row=o;for(var s=0;s<n&&" "==r.charAt(s);++s);s<n&&"\t"==r.charAt(s)?(i.start.column=s,i.end.column=s+1):(i.start.column=0,i.end.column=s),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((o=this.getRowFoldStart(e+i))<0)return 0;var n=o-e}else if(0<i){if((o=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=o-t}else e=this.$clipRowToDocument(e),n=(t=this.$clipRowToDocument(t))-e+1;var o=new d(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),t=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,t),o.length&&this.addFolds(o),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){var i;return t=Math.max(0,t),t=e<0?e=0:(i=this.doc.getLength())<=e?this.doc.getLine(e=i-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},this.$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},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){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"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;return i.max<0&&(i={min:t,max:t}),(i=this.$constrainWrapLimit(e,i.min,i.max))!=this.$wrapLimit&&1<i&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),e=i?Math.min(i,e):e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,o=e.end,r=n.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData,l=this.getFoldsInRange(e);this.removeFolds(l);var d=0;for((g=this.getFoldLine(o.row))&&(g.addRemoveChars(o.row,o.column,n.column-o.column),g.shiftRow(-a),(u=this.getFoldLine(r))&&u!==g&&(u.merge(g),g=u),d=c.indexOf(g)+1);d<c.length;d++)(g=c[d]).start.row>=o.row&&g.shiftRow(-a);s=r}else{var h=Array(a);h.unshift(r,0);var u=t?this.$wrapData:this.$rowLengthCache;for(u.splice.apply(u,h),c=this.$foldData,d=0,(g=this.getFoldLine(r))&&(0==(h=g.range.compareInside(n.row,n.column))?(g=g.split(n.row,n.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,o.column-n.column)):-1==h&&(g.addRemoveChars(r,0,o.column-n.column),g.shiftRow(a)),d=c.indexOf(g)+1);d<c.length;d++)(g=c[d]).start.row>=r&&g.shiftRow(a)}else{var g,a=Math.abs(e.start.column-e.end.column);"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(r))&&g.addRemoveChars(r,n.column,a)}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(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,n){var o,r,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,d=e;for(n=Math.min(n,s.length-1);d<=n;)(r=this.getFoldLine(d,r))?(o=[],r.walk(function(e,n,r,a){var l;if(null!=e){(l=this.$getDisplayTokens(e,o.length))[0]=t;for(var c=1;c<l.length;c++)l[c]=i}else l=this.$getDisplayTokens(s[n].substring(a,r),o.length);o=o.concat(l)}.bind(this),r.end.row,s[r.end.row].length+1),l[r.start.row]=this.$computeWrapSplits(o,c,a),d=r.end.row+1):(o=this.$getDisplayTokens(s[d]),l[d]=this.$computeWrapSplits(o,c,a),d++)};var t=3,i=4;this.$computeWrapSplits=function(e,n,o){function r(t){for(var i=t-l,n=l;n<t;n++){var r=e[n];12!==r&&2!==r||--i}s.length||(g=function(){var t=0;if(0===u)return t;if(h)for(var i=0;i<e.length;i++){var n=e[i];if(10==n)t+=1;else if(11==n)t+=o;else if(12!=n)break}return d&&!1!==h&&(t+=o),Math.min(t,u)}(),s.indent=g),c+=i,s.push(c),l=t}if(0==e.length)return[];for(var s=[],a=e.length,l=0,c=0,d=this.$wrapAsCode,h=this.$indentedSoftWrap,u=n<=Math.max(2*o,8)||!1===h?0:Math.floor(n/2),g=0;n-g<a-l;){var p=l+n-g;if(10<=e[p-1]&&10<=e[p])r(p);else if(e[p]!=t&&e[p]!=i){for(var m=Math.max(p-(n-(n>>2)),l-1);m<p&&e[p]<t;)p--;if(d){for(;m<p&&e[p]<t;)p--;for(;m<p&&9==e[p];)p--}else for(;m<p&&e[p]<10;)p--;m<p?r(++p):(2==e[p=l+n]&&p--,r(p-g))}else{for(;p!=l-1&&e[p]!=t;p--);if(l<p)r(p);else{for(p=l+n;p<e.length&&e[p]==i;p++);if(p==e.length)break;r(p)}}}return s},this.$getDisplayTokens=function(t,i){var n,o=[];i=i||0;for(var r=0;r<t.length;r++){var s=t.charCodeAt(r);if(9==s){n=this.getScreenTabSize(o.length+i),o.push(11);for(var a=1;a<n;a++)o.push(12)}else 32==s?o.push(10):39<s&&s<48||57<s&&s<64?o.push(9):4352<=s&&e(s)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];var o,r;for(null==i&&(i=1/0),n=n||0,r=0;r<t.length&&(9==(o=t.charCodeAt(r))?n+=this.getScreenTabSize(n):4352<=o&&e(o)?n+=2:n+=1,!(i<n));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),e=this.$wrapData[t.row];return e.length&&e[0]<t.column?e.indent:0}return 0},this.getScreenLastRowColumn=function(e){return e=this.screenToDocumentPosition(e,Number.MAX_VALUE),this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(e,t){return t=this.documentToScreenRow(e,t),this.getScreenLastRowColumn(t)},this.getDocumentLastRowColumnPosition=function(e,t){return t=this.documentToScreenRow(e,t),this.screenToDocumentPosition(t,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){if(this.$useWrapMode)return this.$wrapData[e]},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,i){if(e<0)return{row:0,column:0};var n,o,r,s=0,a=0,l=0,c=0,d=this.$screenRowCache,h=this.$getRowCacheIndex(d,e),u=d.length;r=u&&0<=h?(l=d[h],s=this.$docRowCache[h],e>d[u-1]):!u;for(var g=this.getLength()-1,p=this.getNextFoldLine(s),m=p?p.start.row:1/0;l<=e&&!(e<l+(c=this.getRowLength(s))||g<=s);)l+=c,m<++s&&(s=p.end.row+1,m=(p=this.getNextFoldLine(s,p))?p.start.row:1/0),r&&(this.$docRowCache.push(s),this.$screenRowCache.push(l));if(p&&p.start.row<=s)n=this.getFoldDisplayLine(p),s=p.start.row;else{if(l+c<=e||g<s)return{row:g,column:this.getLine(g).length};n=this.getLine(s),p=null}return h=0,d=Math.floor(e-l),!this.$useWrapMode||(u=this.$wrapData[s])&&(o=u[d],0<d&&u.length&&(h=u.indent,a=u[d-1]||u[u.length-1],n=n.substring(a))),void 0!==i&&this.$bidiHandler.isBidiRow(l+d,s,d)&&(t=this.$bidiHandler.offsetToCol(i)),a+=this.$getStringScreenWidth(n,t-h)[1],this.$useWrapMode&&o<=a&&(a=o-1),p?p.idxToPosition(a):{row:s,column:a}},this.documentToScreenPosition=function(e,t){var i=void 0===t?this.$clipPositionToDocument(e.row,e.column):this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,o=null,r=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a,l=0,c=this.$docRowCache,i=this.$getRowCacheIndex(c,e),r=c.length;a=r&&0<=i?(l=c[i],n=this.$screenRowCache[i],e>c[r-1]):!r;for(var d=this.getNextFoldLine(l),h=d?d.start.row:1/0;l<e;){if(h<=l){if(e<(s=d.end.row+1))break;h=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=l+1;n+=this.getRowLength(l),l=s,a&&(this.$docRowCache.push(l),this.$screenRowCache.push(n))}var u="",o=d&&h<=l?(u=this.getFoldDisplayLine(d,e,t),d.start.row):(u=this.getLine(e).substring(0,t),e),t=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var p=0;u.length>=g[p];)n++,p++;u=u.substring(g[p-1]||0,u.length),t=0<p?g.indent:0}}return this.lineWidgets&&this.lineWidgets[l]&&this.lineWidgets[l].rowsAbove&&(n+=this.lineWidgets[l].rowsAbove),{row:n,column:t+this.$getStringScreenWidth(u)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,o=0,r=(t=this.$foldData[o++])?t.start.row:1/0;n<i;){var s=this.$wrapData[n];e+=s?s.length+1:1,r<++n&&(n=t.end.row+1,r=(t=this.$foldData[o++])?t.start.row:1/0)}else for(var e=this.getLength(),a=this.$foldData,o=0;o<a.length;o++)e-=(t=a[o]).end.row-t.start.row;return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,n){if(0===i)return[0,0];var o,r;for(i=i||1/0,n=n||0,r=0;r<t.length&&!(i<(n+="\t"===(o=t.charAt(r))?this.getScreenTabSize(n):e.getCharacterWidth(o)));r++);return[n,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=e}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e&&((this.$wrap=e)?(this.setWrapLimitRange(e="number"==typeof e?e:null,e),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"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){0<(e=parseInt(e))&&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=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,e=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,e=this.$matchIterator(e,t);if(!e)return!1;var i=null;return e.forEach(function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start)&&(i=null,1))}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,o=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,d=o.length-c;e:for(var h=a.offset||0;h<=d;h++){for(var u=0;u<c;u++)if(-1==o[h+u].search(a[u]))continue e;var g=o[h],p=o[h+c-1],g=g.length-g.match(a[0])[0].length,p=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new r(h,g,h+c-1,p)),2<c&&(h=h+c-2))}}else for(var m=0;m<o.length;m++)for(var f=n.getMatchOffsets(o[m],a),u=0;u<f.length;u++){var C=f[u];s.push(new r(m,C.offset,m,C.offset+C.length))}if(i){for(var I=i.start.column,A=i.start.column,m=0,u=s.length-1;m<u&&s[m].start.column<I&&s[m].start.row==i.start.row;)m++;for(;m<u&&s[u].end.column>A&&s[u].end.row==i.end.row;)u--;for(s=s.slice(m,u+1),m=0,u=s.length;m<u;m++)s[m].start.row+=i.start.row,s[m].end.row+=i.start.row}return s},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var o=n.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){function i(e){return/\w/.test(e)||o.regExp?"\\b":""}if(e.needle instanceof RegExp)return e.re=e.needle;var o,r=e.needle;if(!e.needle)return e.re=!1;e.regExp||(r=n.escapeRegExp(r)),e.wholeWord&&(o=e,r=i((s=r)[0])+s+i(s[s.length-1]));var s=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(r),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(r,s);try{var a=new RegExp(r,s)}catch(e){a=!1}return e.re=a},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],o=0;o<i.length;o++)try{n.push(new RegExp(i[o],t))}catch(e){return!1}return n},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var n=1==t.backwards,o=0!=t.skipCurrent,r=t.range,s=t.start;(s=s||(r?r[n?"end":"start"]:e.selection.getRange())).start&&(s=s[o!=n?"end":"start"]);var a,l,c=r?r.start.row:0,d=r?r.end.row:e.getLength()-1;return r=n?function(e){var i=s.row;if(!l(i,s.column,e)){for(i--;c<=i;i--)if(l(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=d,c=s.row;c<=i;i--)if(l(i,Number.MAX_VALUE,e))return}}:function(e){var i=s.row;if(!l(i,s.column,e)){for(i+=1;i<=d;i++)if(l(i,0,e))return;if(0!=t.wrap)for(i=c,d=s.row;i<=d;i++)if(l(i,0,e))return}},l=t.$isMultiLine?(a=i.length,function(t,o,r){var s=n?t-a+1:t;if(!(s<0)){var l=e.getLine(s),c=l.search(i[0]);if(!(!n&&c<o||-1===c)){for(var d=1;d<a;d++)if(-1==(l=e.getLine(s+d)).search(i[d]))return;if(t=l.match(i[a-1])[0].length,!(n&&o<t))return!!r(s,c,s+a-1,t)||void 0}}}):n?function(t,n,o){var r,s=e.getLine(t),a=[];for(i.lastIndex=0;r=i.exec(s);){var l=r[0].length,c=r.index;if(!l){if(c>=s.length)break;i.lastIndex=c+=1}if(r.index+l>n)break;a.push(r.index,l)}for(var d=a.length-1;0<=d;d-=2){var h=a[d-1];if(o(t,h,t,h+(l=a[d])))return!0}}:function(t,n,o){var r=e.getLine(t);for(i.lastIndex=n;s=i.exec(r);){var s,a=s[0].length;if(o(t,s=s.index,t,s+a))return!0;if(!a&&(i.lastIndex=s+=1,s>=r.length))return!1}},{forEach:r}}}).call(e.prototype),t.Search=e}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function o(e,t){n.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),s=e("../lib/useragent"),a=r.KEY_MODS;o.prototype=n.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n,o=this.commandKeyBinding;for(n in o){var r,s=o[n];s==e?delete o[n]:!Array.isArray(s)||-1!=(r=s.indexOf(e))&&(s.splice(r,1),1==s.length&&(o[n]=s[0]))}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(null==i&&(i=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n,o="";-1!=e.indexOf(" ")&&(e=(n=e.split(/\s+/)).pop(),n.forEach(function(e){e=this.parseKeys(e),e=a[e.hashId]+e.key,o+=(o?" ":"")+e,this._addCommandToBinding(o,"chainKeys")},this),o+=" "),e=this.parseKeys(e),e=a[e.hashId]+e.key,this._addCommandToBinding(o+e,t,i)},this)},this._addCommandToBinding=function(t,i,n){var o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(s=o[t].indexOf(i))&&o[t].splice(s,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));for(var r=o[t],s=0;s<r.length&&!(n<e(r[s]));s++);r.splice(s,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"object"==typeof(i="function"==typeof i?{exec:i}:i)&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),n=r[i];if(r.FUNCTION_KEYS[n])i=r.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=r.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){return t=a[e]+t,this.commandKeyBinding[t]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var o=a[t]+i,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||0<n)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=o}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,e=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(e,o),function(){n.implement(this,r),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if(!(e="string"==typeof e?this.commands[e]:e))return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:i};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)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)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e=e[1]?e:e[0]})}}.call(e.prototype),t.CommandManager=e}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var o=e("../lib/lang"),r=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:n("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:n("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:n("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",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:n("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:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:n("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:n("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:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){r.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:n("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:n("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:n("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:n("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:n("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:n("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:n("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:n("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:n("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:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:n("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:n("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:n("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:n("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:n("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:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:n("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:n("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:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:n("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:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:n("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:n(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:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:n("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:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:n("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:n("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:n("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:n(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()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),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:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:n("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:n("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:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:n("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:n("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:n("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:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:n("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(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:n("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:n(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:n("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:"joinlines",description:"Join lines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,t=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,a=e.session.doc.getLine(i.row),l=i.row+1;l<=n.row+1;l++){var c=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(l)));a+=c=0!==c.length?" "+c:c}n.row+1<e.session.doc.getLength()-1&&(a+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(i.row,0,n.row+2,0),a),0<t?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+t)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,o=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r<n.length;r++)r==n.length-1&&(n[r].end.row===t&&n[r].end.column===i||o.push(new s(n[r].end.row,n[r].end.column,t,i))),0===r?0===n[r].start.row&&0===n[r].start.column||o.push(new s(0,0,n[r].start.row,n[r].start.column)):o.push(new s(n[r-1].end.row,n[r-1].end.column,n[r].start.row,n[r].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),r=0;r<o.length;r++)e.selection.addRange(o[r],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:n("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:n(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,u=e("./search").Search,g=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,C=e("./config"),I=e("./token_iterator").TokenIterator,A=e("./clipboard"),b=function(e,t,i){this.$toDestroy=[];var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++b.$uid,this.commands=new m(s.isMac?"mac":"win",f),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new d(this),this.$search=(new u).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=r.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||i&&i.session||new h("")),C.resetOptions(this),i&&this.setOptions(i),C._signal("editor",this)};b.$uid=0,function(){n.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=r.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if((1!=e||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var e=this.curOp.command,t=e&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),n=this.renderer.layerConfig;(i.start.row>=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON(),this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){var t,i,n,o;this.$mergeUndoDeltas&&(t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(o=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0):n=n&&-1!==i.indexOf(e.command.name),(n=!("always"!=this.$mergeUndoDeltas&&2e3<Date.now()-this.sequenceStartTime)&&n)?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now()))},this.setKeyboardHandler=function(e,t){var i;e&&"string"==typeof e&&"ace"!=e?(this.$keybindingId=e,i=this,C.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t())},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){var t,i;this.session!=e&&(this.curOp&&this.endOperation(),this.curOp={},(t=this.session)&&(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),(i=this.session.getSelection()).off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)),(this.session=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.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}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart())},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){var e;this.$highlightPending||((e=this).$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t,i,n=e.session;n&&n.bgTokenizer&&(n.$bracketHighlight&&(n.$bracketHighlight.markerIds.forEach(function(e){n.removeMarker(e)}),n.$bracketHighlight=null),(t=!(t=n.getMatchingBracketRanges(e.getCursorPosition()))&&n.$mode.getMatching?n.$mode.getMatching(e.session):t)&&(i="ace_bracket",Array.isArray(t)?1==t.length&&(i="ace_error_bracket"):t=[t],2==t.length&&(0==g.comparePoints(t[0].end,t[1].start)?t=[g.fromPoints(t[0].start,t[1].end)]:0==g.comparePoints(t[0].start,t[1].end)&&(t=[g.fromPoints(t[1].start,t[0].end)])),n.$bracketHighlight={ranges:t,markerIds:t.map(function(e){return n.addMarker(e,i,"text")})}))},50))},this.$highlightTags=function(){var e;this.$highlightTagPending||((e=this).$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new I(e.session,i.row,i.column),o=n.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=n.stepForward())){var r=o.value,s=o.value,a=0,l=n.stepBackward();if("<"===l.value)for(;l=o,(o=n.stepForward())&&(-1!==o.type.indexOf("tag-name")?r===(s=o.value)&&("<"===l.value?a++:"</"===l.value&&a--):r===s&&"/>"===o.value&&a--),o&&0<=a;);else{do{if(o=l,l=n.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))r===o.value&&("<"===l.value?a++:"</"===l.value&&a--);else if("/>"===o.value){for(var c=0,d=l;d;){if(-1!==d.type.indexOf("tag-name")&&d.value===r){a--;break}if("<"===d.value)break;d=n.stepBackward(),c++}for(var h=0;h<c;h++)n.stepForward()}}while(l&&a<=0);n.stepForward()}if(!o)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var u=n.getCurrentTokenRow(),i=n.getCurrentTokenColumn(),u=new g(u,i,u,i+o.value.length),i=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=i&&0!==u.compareRange(i.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),t.$tagHighlight||(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}},50))},this.focus=function(){var e=this;setTimeout(function(){e.isFocused()||e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){e=e.data,this.renderer.updateLines(e.first,e.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t,i=this.getSession();this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||1<this.renderer.$minLines||(e=!1)),i.$highlightLineMarker&&!e?(i.removeMarker(i.$highlightLineMarker.id),i.$highlightLineMarker=null):!i.$highlightLineMarker&&e?((t=new g(e.row,e.column,e.row,1/0)).id=i.addMarker(t,"ace_active-line","screenLine"),i.$highlightLineMarker=t):e&&(i.$highlightLineMarker.start.row=e.row,i.$highlightLineMarker.end.row=e.row,i.$highlightLineMarker.start.column=e.column,i._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t,i=this.session;i.$selectionMarker&&i.removeMarker(i.$selectionMarker),i.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),n=this.getSelectionStyle(),i.$selectionMarker=i.addMarker(t,"ace_selection",n));var n=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(n),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column,n=t.end.column,e=e.getLine(t.start.row),t=e.substring(i,n);if(!(5e3<t.length)&&/[\w\d]/.test(t)&&(t=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t}),n=e.substring(i-1,n+1),t.test(n)))return t}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),i=!1;if(!e&&this.$copyWithEmptySelection)for(var i=!0,n=this.selection.getAllRanges(),o=0;o<n.length;o++){var r=n[o];o&&n[o-1].start.row==r.start.row||(e+=this.session.getLine(r.start.row)+t)}var s={text:e};return this._signal("copy",s),A.lineMode=i?s.text:"",s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){this.commands.exec("paste",this,{text:e,event:t})},this.$handlePaste=function(e){this._signal("paste",e="string"==typeof e?{text:e}:e);var t=e.text,e=t==A.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)e?i.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(e)this.selection.rangeList.ranges.forEach(function(e){i.insert({row:e.start.row,column:0},t)});else{var n=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,e=!(2!=n.length||n[0]&&n[1]);if(n.length!=o.length||e)return this.commands.exec("insertstring",this,t);for(var r=o.length;r--;){var s=o[r];s.isEmpty()||i.remove(s),i.insert(s.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i,n=this.session,o=n.getMode(),r=this.getCursorPosition();!this.getBehavioursEnabled()||t||(i=o.transformAction(n.getState(r.row),"insertion",this,n,e))&&(e!==i.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=i.text),"\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=new g.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)):(s=this.getSelectionRange(),r=this.session.remove(s),this.clearSelection()),"\n"!=e&&"\r\n"!=e||(a=n.getLine(r.row),r.column>a.search(/\S|$/)&&(l=a.substr(r.column).search(/\S|$/),n.doc.removeInLine(r.row,r.column,r.column+l))),this.clearSelection();var t=r.column,s=n.getState(r.row),a=n.getLine(r.row),l=o.checkOutdent(s,a,e);n.insert(r,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new g(r.row,t+i.selection[0],r.row,t+i.selection[1])):this.selection.setSelectionRange(new g(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent&&(n.getDocument().isNewLine(e)&&(a=o.getNextLineIndent(s,a.slice(0,r.column),n.getTabString()),n.insert({row:r.row+1,column:0},a)),l&&o.autoOutdent(s,n,r.row))},this.autoIndent=function(){var e,t,i,n=this.session,o=n.getMode();i=this.selection.isEmpty()?(t=0,n.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row);for(var r,s,a="",l="",c=n.getTabString(),d=t;d<=i;d++)0<d&&(a=n.getState(d-1),r=n.getLine(d-1),l=o.getNextLineIndent(a,r,c)),s=n.getLine(d),l!==(s=o.$getIndent(s))&&(0<s.length&&(s=new g(d,0,d,s.length),n.remove(s)),0<l.length&&n.insert({row:d,column:0},l)),o.autoOutdent(a,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}}),t=this.applyComposition.bind(this,e,t),this.selection.rangeCount?this.forEachSelection(t):t(),this.endOperation()},this.applyComposition=function(e,t){var i;(t.extendLeft||t.extendRight)&&((i=this.selection.getRange()).start.column-=t.extendLeft,i.end.column+=t.extendRight,i.start.column<0&&(i.start.row--,i.start.column+=this.session.getLine(i.start.row).length+1),this.selection.setRange(i),e||i.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((i=this.selection.getRange()).start.column-=t.restoreStart,i.end.column-=t.restoreEnd,this.selection.setRange(i))},this.onCommandKey=function(e,t,i){return this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t,i,n=this.getSelectionRange();this.getBehavioursEnabled()&&(t=(i=this.session).getState(n.start.row),e=i.getMode().transformAction(t,"deletion",this,i,n),0!==n.end.column||"\n"==(t=i.getTextRange(n))[t.length-1]&&(i=i.getLine(n.end.row),/^\s+$/.test(i)&&(n.end.column=i.length)),e&&(n=e)),this.session.remove(n),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.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()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){var e,t,i,n;!this.selection.isEmpty()||0!==(n=(e=this.getCursorPosition()).column)&&(n=n<(t=this.session.getLine(e.row)).length?(i=t.charAt(n)+t.charAt(n-1),new g(e.row,n-1,e.row,n+1)):(i=t.charAt(n-1)+t.charAt(n-2),new g(e.row,n-2,e.row,n)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end))},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i))return l=this.$getSelectedRows(),void e.indentRows(l.first,l.last,"\t")}var n=e.getLine(t.start.row),o=t.start,i=e.getTabSize(),o=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var s=i-o%i,a=r.stringRepeat(" ",s);else{for(s=o%i;" "==n[t.start.column-1]&&s;)t.start.column--,s--;this.selection.setSelectionRange(t),a="\t"}return this.insert(a)}var l=this.$getSelectedRows();e.indentRows(l.first,l.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,i=[],n=e.first;n<=e.last;n++)i.push(t.getLine(n));i.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var o=new g(0,0,0,0),n=e.first;n<=e.last;n++){var r=t.getLine(n);o.start.row=n,o.end.row=n,o.end.column=r.length,t.replace(o,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var o=i.exec(n);if(o.index<=t&&o.index+o[0].length>=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t,i,n=this.selection.getCursor().row,o=this.selection.getCursor().column,r=new g(n,o-1,n,o),s=this.session.getTextRange(r);!isNaN(parseFloat(s))&&isFinite(s)?(t=this.getNumberAt(n,o))&&(i=0<=t.value.indexOf(".")?t.start+t.value.indexOf(".")+1:t.end,r=t.start+t.value.length-i,s=parseFloat(t.value),s*=Math.pow(10,r),i!==t.end&&o<i?e*=Math.pow(10,t.end-o-1):e*=Math.pow(10,t.end-o),s+=e,s=(s/=Math.pow(10,r)).toFixed(r),r=new g(n,t.start,n,t.end),this.session.replace(r,s),this.moveCursorTo(n,Math.max(t.start+1,o+s.length-t.value.length))):this.toggleWord()},this.$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"],["&&","||"],["==","!="]],this.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var i=this.getSelectedText(),n=this.selection.getWordRange().start.column,o=i.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),s=t-n-1;s<0&&(s=0);var a,l=0,c=this;i.match(/[A-Za-z0-9_]+/)&&o.forEach(function(t,o){a=l+t.length,l<=s&&s<=a&&(i=t,c.selection.clearSelection(),c.moveCursorTo(e,l+n),c.selection.selectTo(e,a+n)),l=a});for(var d=this.$toggleWordPairs,h=0;h<d.length;h++)for(var u=d[h],g=0;g<=1;g++){var p=+!g,m=i.match(new RegExp("^\\s?_?("+r.escapeRegExp(u[g])+")\\s?$","i"));m&&i.match(new RegExp("([_]|^|\\s)("+r.escapeRegExp(m[1])+")($|\\s)","g"))&&(m=i.replace(new RegExp(r.escapeRegExp(u[g]),"i"),function(e){var t=u[p];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+u[p].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(m))}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e,t=this.selection,i=this.session,n=t.getRange(),o=t.isBackwards();n.isEmpty()?(e=n.start.row,i.duplicateLines(e,e)):(e=o?n.start:n.end,i=i.insert(e,i.getTextRange(n),!1),n.start=e,n.end=i,t.setSelectionRange(n,o))},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var n=i.toOrientedRange(),o=this.$getSelectedRows(n),r=this.session.$moveLines(o.first,o.last,t?0:e);n.moveBy(r=t&&-1==e?0:r,0),i.fromOrientedRange(n)}else{var s=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,d=0;d<c;d++){var h=d;s[d].moveBy(a,0);for(var u=(o=this.$getSelectedRows(s[d])).first,g=o.last;++d<c;){l&&s[d].moveBy(l,0);var p=this.$getSelectedRows(s[d]);if(t&&p.first!=g)break;if(!t&&p.first>g+1)break;g=p.last}for(d--,a=this.session.$moveLines(u,g,t?0:e),t&&-1==e&&(h=d+1);h<=d;)s[h].moveBy(a,0),h++;l+=a=t?a:0}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,o=e*Math.floor(n.height/n.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),e=i.scrollTop,i.scrollBy(0,o*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(e)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),e={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(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new I(this.session,i.row,i.column),o=n.getCurrentToken(),r=o||n.stepForward();if(r){var s,a,l,c=!1,d={},h=i.column-r.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;h<r.value.length&&!c;h++)if(u[r.value[h]])switch(a=u[r.value[h]]+"."+r.type.replace("rparen","lparen"),isNaN(d[a])&&(d[a]=0),r.value[h]){case"(":case"[":case"{":d[a]++;break;case")":case"]":case"}":-1===--d[a]&&(s="bracket",c=!0)}}else-1!==r.type.indexOf("tag-name")&&(isNaN(d[r.value])&&(d[r.value]=0),"<"===o.value?d[r.value]++:"</"===o.value&&d[r.value]--,-1===d[r.value]&&(s="tag",c=!0))}while(c||(o=r,r=n.stepForward(),h=0),r&&!c);if(s){if("bracket"===s)(p=this.session.getBracketRange(i))||(l=(p=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+h-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+h-1)).start,(t||l.row===i.row&&Math.abs(l.column-i.column)<2)&&(p=this.session.getBracketRange(l)));else if("tag"===s){if(!r||-1===r.type.indexOf("tag-name"))return;var p,m=r.value;if(0===(p=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column))for(c=!1;r=o,(o=n.stepBackward())&&(-1!==o.type.indexOf("tag-close")&&p.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),r.value===m&&-1!==r.type.indexOf("tag-name")&&("<"===o.value?d[m]++:"</"===o.value&&d[m]--,0===d[m]&&(c=!0))),o&&!c;);r&&r.type.indexOf("tag-name")&&(l=p.start).row==i.row&&Math.abs(l.column-i.column)<2&&(l=p.end)}(l=p&&p.cursor||l)&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(l.row,l.column):this.selection.moveTo(l.row,l.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var i=this.$search.find(this.session),t=0;return i&&(this.$tryReplace(i,e)&&(t=1),this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),t},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;t=this.getSelectionRange(),this.selection.moveTo(0,0);for(var o=i.length-1;0<=o;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(t),n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t=t||{},"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var o=this.selection.getRange();return null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o}),e=this.$search.find(this.session),t.preventScroll?e:e?(this.revealRange(e,i),e):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.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()},this.setAutoScrollEditorIntoView=function(e){var t,i,n,o,r,s,a;e&&(n=!1,(i=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(o=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild),r=this.on("changeSelection",function(){n=!0}),s=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){var e,r,s;n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())&&(e=(s=i.renderer).$cursorLayer.$pixelPos,r=s.layerConfig,s=e.top-r.offset,null!=(n=0<=e.top&&s+t.top<0||!(e.top<r.height&&e.top+t.top+r.lineHeight>window.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=e.left+"px",o.style.height=r.lineHeight+"px",o.scrollIntoView(n)),n=t=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))})},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,i){var n=this;C.loadModule("./ext/prompt",function(o){o.prompt(n,e,t,i)})}}.call(b.prototype),C.defineOptions(b.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?v.attach(this):v.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?v.attach(this):v.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder"),(e=o.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"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 v={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,i){return Math.max(t.toString().length,(i.lastRow+1).toString().length,2)*i.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=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(){this.$maxRev=0,this.$fromUndo=!1,this.reset()}function o(e){return{row:e.row,column:e.column}}function r(e){if(e=e||this,Array.isArray(e))return e.map(r).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(s).join("\n"):s(e.value)),e.start&&(t+=s(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function s(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function a(e,t){var i="insert"==e.action,n="insert"==t.action;if(i&&n)if(0<=u(t.start,e.end))l(t,e,-1);else{if(!(u(t.start,e.start)<=0))return;l(e,t,1)}else if(i&&!n)if(0<=u(t.start,e.end))l(t,e,-1);else{if(!(u(t.end,e.start)<=0))return;l(e,t,-1)}else if(!i&&n)if(0<=u(t.start,e.start))l(t,e,1);else{if(!(u(t.start,e.start)<=0))return;l(e,t,1)}else if(!i&&!n)if(0<=u(t.start,e.start))l(t,e,1);else{if(!(u(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,i){c(e.start,t.start,t.end,i),c(e.end,t.start,t.end,i)}function c(e,t,i,n){e.row==(1==n?t:i).row&&(e.column+=n*(i.column-t.column)),e.row+=n*(i.row-t.row)}function d(e,t){var i=e.lines,n=e.end;e.end=o(t);var r=e.end.row-e.start.row,s=i.splice(r,i.length),r=r?t.column:t.column-e.start.column;return i.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:o(t),end:n,lines:s,action:e.action}}(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,i){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var i=this.$undoStack,n=i.length;n--;){var o=i[n][0];if(o.id<=e)break;o.id<t&&(o.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var i=this.selections,n=i.length;n--;){var o=i[n];if(o.rev<e)return o=t?i[n+1]:o}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var i=this.$undoStack,n=null,o=0,r=i.length;r--;){var s=i[r][0];if(s.id<t&&!n&&(n=r+1),s.id<=e){o=r+1;break}}return i.slice(o,n)},this.getChangedRanges=function(e,t){null==t&&this.$rev},this.getChangedLines=function(e,t){null==t&&this.$rev},this.undo=function(e,t){this.lastDeltas=null;var i=this.$undoStack;if(function(e,t){for(var i=t;i--;){var n=e[i];if(n&&!n[0].ignore){for(;i<t-1;){var o=function(e,t){for(var i=e.length;i--;)for(var n=0;n<t.length;n++)if(!a(e[i],t[n])){for(;i<e.length;){for(;n--;)a(t[n],e[i]);n=t.length,i++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}(e[i],e[i+1]);e[i]=o[0],e[i+1]=o[1],i++}return!0}}}(i,i.length)){e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var n=i.pop(),i=null;return n&&(i=e.undoChanges(n,t),this.$redoStack.push(n),this.$syncRev()),this.$fromUndo=!1,i}},this.redo=function(e,t){this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev&&(n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),function(e,t){for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)!function(e,t){t=function(e){return{start:o(e.start),end:o(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var i=e.length;i--;){for(var n=e[i],r=0;r<n.length;r++){var s=function(e,t){var i,n,o="insert"==e.action,r="insert"==t.action;if(o&&r)u(e.start,t.start)<0?l(t,e,1):l(e,t,1);else if(o&&!r)0<=u(e.start,t.end)?l(e,t,-1):(u(e.start,t.start)<=0||l(e,h.fromPoints(t.start,e.start),-1),l(t,e,1));else if(!o&&r)0<=u(t.start,e.end)?l(t,e,-1):(u(t.start,e.start)<=0||l(t,h.fromPoints(e.start,t.start),-1),l(e,t,1));else if(!o&&!r)if(0<=u(t.start,e.end))l(t,e,-1);else{if(!(u(t.end,e.start)<=0))return u(e.start,t.start)<0&&(e=d(i=e,t.start)),0<u(e.end,t.end)&&(n=d(e,t.end)),c(t.end,e.start,e.end,-1),n&&!i&&(e.lines=n.lines,e.start=n.start,e.end=n.end,n=e),[t,i,n].filter(Boolean);l(e,t,-1)}return[t,e]}(n[r],t);t=s[0],2!=s.length&&(s[2]?(n.splice(r+1,1,s[1],s[2]),r++):s[1]||(n.splice(r,1),r--))}n.length||e.splice(i,1)}}(e,n[r])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this));var i=this.$redoStack.pop(),n=null;return i&&(n=e.redoChanges(i,t),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,n},this.$syncRev=function(){var e=this.$undoStack,e=e[e.length-1],e=e&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return 0<this.$undoStack.length},this.canRedo=function(){return 0<this.$redoStack.length},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)}}).call(n.prototype);var h=e("./range").Range,u=h.comparePoints;h.comparePoints,t.UndoManager=n}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom"),e=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){n.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,i){var n=t.firstRowScreen*t.lineHeight,n=Math.floor(n/this.canvasHeight);return i.documentToScreenRow(e,0)*t.lineHeight-n*this.canvasHeight},this.computeLineHeight=function(e,t,i){return t.lineHeight*i.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=n.createFragment(this.element),i=0;i<e.length;i++)t.appendChild(e[i].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=n.createFragment(this.element),i=0;i<e.length;i++)t.appendChild(e[i].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,i,o){var r,s=this.cellCache.pop();return s||(r=n.createElement("div"),o&&o(r),this.element.appendChild(r),s={element:r,text:"",row:e}),s.row=e,s}}).call(e.prototype),t.Lines=e}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],function(e,t,i){"use strict";function n(e){var t=document.createTextNode("");return e.appendChild(t),t=o.createElement("span"),e.appendChild(t),e}var o=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,l=e("./lines").Lines,e=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1};(function(){r.implement(this,a),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var i=e[t],n=i.row,o=(o=this.$annotations[n])||(this.$annotations[n]={text:[]}),n=(n=i.text)?s.escapeHTML(n):i.html||"";-1===o.text.indexOf(n)&&o.text.push(n),i=i.type,"error"==i?o.className=" ace_error":"warning"==i&&" ace_error"!=o.className?o.className=" ace_warning":"info"!=i||o.className||(o.className=" ace_info")}},this.$updateAnnotations=function(e){var t,i;this.$annotations.length&&(t=e.start.row,0==(i=e.end.row-t)||("remove"==e.action?this.$annotations.splice(t,1+i,null):((i=new Array(1+i)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,i))))},this.update=function(e){this.config=e;var t=this.session,i=e.firstRow,o=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=o,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var r=t.getNextFoldLine(i),s=r?r.start.row:1/0,a=null,l=-1,c=i;;){if(s<c&&(c=r.end.row+1,s=(r=t.getNextFoldLine(c,r))?r.start.row:1/0),o<c){for(;this.$lines.getLength()>l+1;)this.$lines.pop();break}(a=this.$lines.get(++l))?a.row=c:(a=this.$lines.createCell(c,e,this.session,n),this.$lines.push(a)),this.$renderCell(a,e,r,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,i=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+n-1),o=i?i.getWidth(t,o,e):o.toString().length*e.characterWidth,e=this.$padding||this.$computePadding(),(o+=e.left+e.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row&&(this.$cursorRow=e.row))},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){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 i=0;i<t.length;i++){var n=t[i];if(n.row>=this.$cursorRow){if(n.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(0<i&&o&&o.start.row==t[i-1].row))break;n=t[i-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var i=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=i,!t||n<e.firstRow)return this.update(e);if(i<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<o;o--)this.$lines.shift();if(i<n)for(o=this.session.getFoldedRowCount(i+1,n);0<o;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n<i&&this.$lines.push(this.$renderLines(e,n+1,i)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,i){for(var o=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;a<r&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(i<r);){var l=this.$lines.createCell(r,e,this.session,n);this.$renderCell(l,e,s,r),o.push(l),r++}return o},this.$renderCell=function(e,t,i,n){var r,s=e.element,a=this.session,l=s.childNodes[0],c=s.childNodes[1],d=a.$firstLineNumber,h=a.$breakpoints,u=a.$decorations,g=a.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&a.foldWidgets,m=i?i.start.row:Number.MAX_VALUE,f="ace_gutter-cell ";return this.$highlightGutterLine&&(n==this.$cursorRow||i&&n<this.$cursorRow&&m<=n&&this.$cursorRow<=i.end.row)&&(f+="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)),h[n]&&(f+=h[n]),u[n]&&(f+=u[n]),this.$annotations[n]&&(f+=this.$annotations[n].className),s.className!=f&&(s.className=f),!p||null==(r=p[n])&&(r=p[n]=a.getFoldWidget(n)),r?(f="ace_fold-widget ace_"+r,"start"==r&&n==m&&n<i.end.row?f+=" ace_closed":f+=" ace_open",c.className!=f&&(c.className=f),f=t.lineHeight+"px",o.setStyle(c.style,"height",f),o.setStyle(c.style,"display","inline-block")):c&&o.setStyle(c.style,"display","none"),d=(g?g.getText(a,n):n+d).toString(),d!==l.data&&(l.data=d),o.setStyle(e.element.style,"height",this.$lines.computeLineHeight(n,t,a)+"px"),o.setStyle(e.element.style,"top",this.$lines.computeLineTop(n,t,a)+"px"),e.text=d,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.right-t.right?"foldWidgets":void 0}}).call(e.prototype),t.Gutter=e}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,o=e("../lib/dom"),e=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=t,i.className=e},this.update=function(e){if(e){var t,i;for(i in this.config=e,this.i=0,this.markers){var n,o,r,s=this.markers[i];s.range?(r=s.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(r=r.toScreenRange(this.session),s.renderer?(n=this.$getTop(r.start.row,e),o=this.$padding+r.start.column*e.characterWidth,s.renderer(t,r,o,n,e)):"fullLine"==s.type?this.drawFullLineMarker(t,r,s.clazz,e):"screenLine"==s.type?this.drawScreenLineMarker(t,r,s.clazz,e):r.isMultiLine()?"text"==s.type?this.drawTextMarker(t,r,s.clazz,e):this.drawMultiLineMarker(t,r,s.clazz,e):this.drawSingleLineMarker(t,r,s.clazz+" ace_start ace_br15",e)):s.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,o,r){for(var s,a=this.session,l=t.start.row,c=t.end.row,d=l,h=0,u=a.getScreenLastRowColumn(d),g=new n(d,t.start.column,d,h);d<=c;d++)g.start.row=g.end.row=d,g.start.column=d==l?t.start.column:a.getRowWrapIndent(d),s=h,h=g.end.column=u,u=d+1<c?a.getScreenLastRowColumn(d+1):d==c?0:t.end.column,this.drawSingleLineMarker(e,g,i+(d==l?" ace_start":"")+" ace_br"+((d==l||d==l+1&&t.start.column?1:0)|(s<h?2:0)|(u<h?4:0)|(d==c?8:0)),o,d==c?0:1,r)},this.drawMultiLineMarker=function(e,t,i,n,o){var r,s=this.$padding,a=n.lineHeight,l=this.$getTop(t.start.row,n),c=s+t.start.column*n.characterWidth;o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((r=t.clone()).end.row=r.start.row,r.end.column=this.session.getLine(r.start.row).length,this.drawBidiSingleLineMarker(e,r,i+" ace_br1 ace_start",n,null,o)):this.elt(i+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(o||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((r=t.clone()).start.row=r.end.row,r.start.column=0,this.drawBidiSingleLineMarker(e,r,i+" ace_br12",n,null,o)):(l=this.$getTop(t.end.row,n),r=t.end.column*n.characterWidth,this.elt(i+" ace_br12","height:"+a+"px;width:"+r+"px;top:"+l+"px;left:"+s+"px;"+(o||""))),(a=(t.end.row-t.start.row-1)*n.lineHeight)<=0||(l=this.$getTop(t.start.row+1,n),t=(t.start.column?1:0)|(t.end.column?0:8),this.elt(i+(t?" ace_br"+t:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+s+"px;"+(o||"")))},this.drawSingleLineMarker=function(e,t,i,n,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,i,n,o,r);var s=n.lineHeight,e=(t.end.column+(o||0)-t.start.column)*n.characterWidth,o=this.$getTop(t.start.row,n),n=this.$padding+t.start.column*n.characterWidth;this.elt(i,"height:"+s+"px;width:"+e+"px;top:"+o+"px;left:"+n+"px;"+(r||""))},this.drawBidiSingleLineMarker=function(e,t,i,n,o,r){var s=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(i,"height:"+s+"px;width:"+e.width+(o||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(r||""))},this)},this.drawFullLineMarker=function(e,t,i,n,o){var r=this.$getTop(t.start.row,n),s=n.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,n)-r),this.elt(i,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,i,n,o){t=this.$getTop(t.start.row,n),n=n.lineHeight,this.elt(i,"height:"+n+"px;top:"+t+"px;left:0;right:0;"+(o||""))}}).call(e.prototype),t.Marker=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"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,e=function(e){this.dom=o,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 s(this.element)};(function(){n.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,e="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){(this.session=e)&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&("string"==typeof(this.showInvisibles=e)?(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)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t,i,n,o,s,a,l=this.$tabStrings=[0],c=1;c<e+1;c++)this.showTabs?((a=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",a.textContent=r.stringRepeat(this.TAB_CHAR,c),l.push(a)):l.push(this.dom.createTextNode(r.stringRepeat(" ",c),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,t="ace_indent-guide",i=this.showSpaces?" ace_invisible ace_invisible_space":"",n=this.showSpaces?r.stringRepeat(this.SPACE_CHAR,this.tabSize):r.stringRepeat(" ",this.tabSize),o=this.showTabs?" ace_invisible ace_invisible_tab":"",s=this.showTabs?r.stringRepeat(this.TAB_CHAR,this.tabSize):n,(a=this.dom.createElement("span")).className=t+i,a.textContent=n,this.$tabStrings[" "]=a,(a=this.dom.createElement("span")).className=t+o,a.textContent=s,this.$tabStrings["\t"]=a)},this.updateLines=function(e,t,i){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var n=Math.max(t,e.firstRow),o=Math.min(i,e.lastRow),r=this.element.childNodes,s=0,a=e.firstRow;a<n;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,a=n,d=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;d<a&&(a=l.end.row+1,d=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(o<a);){var h,u=r[s++];u&&(this.dom.removeChildren(u),this.$renderLine(u,a,a==d&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px"),h=e.lineHeight*this.session.getRowLength(a)+"px",u.style.height!=h&&(c=!0,u.style.height=h)),a++}if(c)for(;s<this.$lines.cells.length;){var g=this.$lines.cells[s++];g.element.style.top=this.$lines.computeLineTop(g.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var i=e.lastRow,n=t?t.lastRow:-1;if(!t||n<e.firstRow)return this.update(e);if(i<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<o;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0<o;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,i){for(var n=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;a<r&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(i<r);){var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",n.push(l),r++}return n},this.update=function(e){this.$lines.moveContainer(e);for(var t=(this.config=e).firstRow,i=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,t,i))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){for(var o,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\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,l=this.dom.createFragment(this.element),c=0;h=a.exec(n);){var d,h,u,g=h[1],p=h[2],m=h[3],f=h[4],C=h[5];!s.showSpaces&&p||(d=c!=h.index?n.slice(c,h.index):"",c=h.index+h[0].length,d&&l.appendChild(this.dom.createTextNode(d,this.element)),g?(h=s.session.getScreenTabSize(t+h.index),l.appendChild(s.$tabStrings[h].cloneNode(!0)),t+=h-1):p?s.showSpaces?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",u.textContent=r.stringRepeat(s.SPACE_CHAR,p.length),l.appendChild(u)):l.appendChild(this.com.createTextNode(p,this.element)):m?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",u.textContent=r.stringRepeat(s.SPACE_CHAR,m.length),l.appendChild(u)):f?(t+=1,(u=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",u.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(u)):C&&(t+=1,(u=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",u.className="ace_cjk",u.textContent=C,l.appendChild(u)))}return l.appendChild(this.dom.createTextNode(c?n.slice(c):n,this.element)),this.$textToken[i.type]?e.appendChild(l):(o="ace_"+i.type.replace(/\./g," ace_"),u=this.dom.createElement("span"),"fold"==i.type&&(u.style.width=i.value.length*this.config.characterWidth+"px"),u.className=o,u.appendChild(l),e.appendChild(u)),t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);if(n<=0||i<=n)return t;if(" "==t[0]){for(var o=(n-=n%this.tabSize)/this.tabSize,r=0;r<o;r++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return t.substr(n)}if("\t"!=t[0])return t;for(r=0;r<n;r++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return t.substr(n)},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,i){var n=0,o=0,s=i[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var d=t[c],h=d.value;if(0==c&&this.displayIndentGuides){if(n=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;n-=h.length}if(n+h.length<s)a=this.$renderToken(l,a,d,h),n+=h.length;else{for(;n+h.length>=s;)a=this.$renderToken(l,a,d,h.substring(0,s-n)),h=h.substring(s-n),n=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(r.stringRepeat(" ",i.indent),this.element)),a=0,s=i[++o]||Number.MAX_VALUE;0!=h.length&&(n+=h.length,a=this.$renderToken(l,a,d,h))}}i[i.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],o=n.value;(o=this.displayIndentGuides?this.renderIndentGuide(e,o):o)&&(i=this.$renderToken(e,i,n,o));for(var r=1;r<t.length;r++){if(i+(o=(n=t[r]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,i,n,o);i=this.$renderToken(e,i,n,o)}},this.$renderOverflowMessage=function(e,t,i,n,o){i&&this.$renderToken(e,t,i,n.slice(0,this.MAX_LINE_LENGTH-t)),t=this.dom.createElement("span"),t.className="ace_inline_button ace_keyword ace_toggle_wrap",t.textContent=o?"<hide>":"<click to see more...>",e.appendChild(t)},this.$renderLine=function(e,t,i){var n,o,r=e;(n=(i=i||0==i?i:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,i):this.session.getTokens(t)).length?(o=this.session.getRowSplitData(t))&&o.length?(this.$renderWrappedLine(e,n,o),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,n)):this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.showEOL&&r&&(i&&(t=i.end.row),(i=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",i.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(i))},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[],o=i.getTokens(e);return t.walk(function(e,t,r,s,a){null!=e?n.push({type:"fold",value:e}):(o=a?i.getTokens(t):o).length&&function(e,t,i){for(var o,r=0,s=0;s+e[r].value.length<t;)if(s+=e[r].value.length,++r==e.length)return;for(s!=t&&((o=e[r].value.substring(t-s)).length>i-t&&(o=o.substring(0,i-t)),n.push({type:e[r].type,value:o}),s=t+o.length,r+=1);s<i&&r<e.length;)(o=e[r].value).length+s>i?n.push({type:e[r].type,value:o.substring(0,i-s)}):n.push(e[r]),s+=o.length,r+=1}(o,s,r)},t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(e.prototype),t.Text=e}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom"),e=function(e){this.element=n.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(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)n.setStyle(t[i].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){n.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){n.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(1<this.cursors.length){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e,t=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),n.HAS_CSS_ANIMATION?this.$startCssAnimation():(e=function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e())):this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e=e||this.session.selection.getCursor();var i=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return 0<=e.top&&e.top<t.maxHeight},this.update=function(e){this.config=e;for(var t=this.session.$selectionMarkers,i=0,o=0,i=0,r=(t=void 0===t||0===t.length?[{cursor:null}]:t).length;i<r;i++){var s,a,l=this.getPixelPosition(t[i].cursor,!0);(l.top>e.height+e.offset||l.top<0)&&1<i||(a=(s=this.cursors[o++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,l,e,t[i],this.session):this.isCursorInView(l,e)?(n.setStyle(a,"display","block"),n.translate(s,l.left,l.top),n.setStyle(a,"width",Math.round(e.characterWidth)+"px"),n.setStyle(a,"height",e.lineHeight+"px")):n.setStyle(a,"display","none"))}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=l,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(e.prototype),t.Cursor=e}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}function o(e,t){n.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}var r=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;(function(){r.implement(this,l),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(n.prototype),r.inherits(o,n),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(o.prototype),e=function(e,t){n.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"},r.inherits(e,n),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(e.prototype),t.ScrollBar=o,t.ScrollBarV=o,t.ScrollBarH=e,t.VScrollBar=o,t.HScrollBar=e}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),e=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var i=this;this._flush=function(e){i.pending=!1;var t=i.changes;t&&(n.blockIdle(100),i.changes=0,i.onRender(t)),i.changes?i.$recursionLimit--<0||i.schedule():i.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(n.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(e.prototype),t.RenderLoop=e}),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,i){var n=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,t=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){n.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",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}))},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle(function t(){e.checkForSizeChanges(),s.onIdle(t,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){return e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256},0===e.width||0===e.height?null:e},this.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=o.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},this.transformCoordinates=function(e,t){function i(e,t,i){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*i[0]+t[0]*i[1])/n,(+e[1]*i[0]-e[0]*i[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){return e=e.getBoundingClientRect(),[e.left,e.top]}e=e&&r(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),d=s(this.els[3]),h=i(n(d,l),n(d,c),n(o(l,c),o(d,a))),d=r(1+h[0],n(l,a)),l=r(1+h[1],n(c,a));return t?(c=h[0]*t[0]/200+h[1]*t[1]/200+1,t=o(r(t[0],d),r(t[1],l)),o(r(1/c/200,t),a)):(a=n(e,a),a=i(n(d,r(h[0],a)),n(l,r(h[1],a)),a),r(200,a))}}).call(t.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/dom"),r=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,u=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {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==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {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==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',f=e("./lib/useragent"),C=f.isIE;o.importCssString(m,"ace_editor.css"),e=function(e,t){var i=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content),t=this.$textLayer=new l(this.content),this.canvas=t.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._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=!f.isIOS,this.$loop=new u(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._signal("renderer",this)},function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.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(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=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),e&&(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))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=e?1:0;var o=this.container;if(n=n||o.clientHeight||o.scrollHeight,i=i||o.clientWidth||o.scrollWidth,t=this.$updateCachedSize(e,t,i,n),!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(t|this.$changes,!0):this.$loop.schedule(t|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var r=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};return n&&(e||s.height!=n)&&(s.height=n,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),i&&(e||s.width!=i)&&(r|=this.CHANGE_SIZE,s.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px"),t=this.scrollBarV.getWidth()+"px",o.setStyle(this.scrollBarH.element.style,"right",t),o.setStyle(this.scroller.style,"right",t),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),s.$dirty=!i||!n,r&&this._signal("resize",a),r},this.onGutterResize=function(e){e=this.$showGutter?e:0,e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){var e;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((e=o.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)),(e=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit())},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){var e,t,i,n,r,s,a;this.$isMousePressed||(e=this.textarea.style,s=this.$composition,this.$keepTextAreaAtCursor||s?(a=this.$cursorLayer.$pixelPos)&&(s&&s.markerRange&&(a=this.$cursorLayer.getPixelPosition(s.markerRange.start,!0)),r=this.layerConfig,t=a.top,i=a.left,t-=r.offset,n=s&&s.useTextareaForIME?this.lineHeight:C?0:1,t<0||t>r.height-n?o.translate(this.textarea,0,0):(a=1,r=this.$size.height-n,s?s.useTextareaForIME?(s=this.textarea.value,a=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(i-=this.scrollLeft)>this.$size.scrollerWidth-a&&(i=this.$size.scrollerWidth-a),i+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",n+"px"),o.setStyle(e,"width",a+"px"),o.translate(this.textarea,Math.min(i,this.$size.scrollerWidth-a),Math.min(t,r)))):o.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.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()},this.setScrollMargin=function(e,t,i,n){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|n,o.left=0|i,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,i,n){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|n,o.left=0|i,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$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)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){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 i,n=this.layerConfig;return(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(),n.firstRow==this.layerConfig.firstRow||n.firstRowScreen!=this.layerConfig.firstRowScreen||0<(i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear()),n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset),t=n.width+2*this.$padding+"px",i=n.minHeight+"px",o.setStyle(this.content.style,"width",t),o.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e)):(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.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(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)),void this._signal("afterRender",e))}this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),e=!((i=this.$maxPixelHeight&&i>this.$maxPixelHeight?this.$maxPixelHeight:i)<=2*this.lineHeight)&&t<e,i==this.desiredHeight&&this.$size.height==this.desiredHeight&&e==this.$vScroll||(e!=this.$vScroll&&(this.$vScroll=e,this.scrollBarV.setVisible(e)),e=this.container.clientWidth,this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,i),this.desiredHeight=i,this._signal("autosize"))},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),r=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==r;s&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var a=this.$vScroll;this.$maxLines&&1<this.lineHeight&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,n-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+d.right)));var h=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+c<0||this.scrollTop>d.top),u=a!==h;u&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var r=this.scrollTop%this.lineHeight,i=Math.ceil(l/this.lineHeight)-1,d=(c=Math.max(0,Math.round((this.scrollTop-r)/this.lineHeight)))+i,a=this.lineHeight,c=e.screenToDocumentRow(c,0),h=e.getFoldLine(c);return h&&(c=h.start.row),i=e.documentToScreenRow(c,0),h=e.getRowLength(c)*a,d=Math.min(e.screenToDocumentRow(d,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(d)*a+h,r=this.scrollTop-i*a,h=0,this.layerConfig.width==o&&!s||(h=this.CHANGE_H_SCROLL),(s||u)&&(h|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),u&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:c,firstRowScreen:i,lastRow:d,lineHeight:a,characterWidth:this.characterWidth,minHeight:l,maxHeight:n,offset:r,gutterOffset:a?Math.max(0,Math.ceil((r+t.height-t.scrollerHeight)/a)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),h},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){var n,o,r;0!==this.$size.scrollerHeight&&(n=(r=this.$cursorLayer.getPixelPosition(e)).left,o=r.top,e=i&&i.top||0,r=i&&i.bottom||0,o<(i=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+e?(t&&i+e>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):i+this.$size.scrollerHeight-r<o+this.lineHeight&&(t&&i+this.$size.scrollerHeight-r<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+r-this.$size.scrollerHeight)),n<(r=this.scrollLeft)?(n<this.$padding+2*this.layerConfig.characterWidth&&(n=-this.scrollMargin.left),this.session.setScrollLeft(n)):r+this.$size.scrollerWidth<n+this.characterWidth?this.session.setScrollLeft(Math.round(n+this.characterWidth-this.$size.scrollerWidth)):r<=this.$padding&&n-r<this.characterWidth&&this.session.setScrollLeft(0))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){var i=this.$cursorLayer.getPixelPosition(e="number"==typeof e?{row:e,column:0}:e),e=this.$size.scrollerHeight-this.lineHeight,t=i.top-e*(t||0);return this.session.setScrollTop(t),t},this.STEPS=8,this.$calcSteps=function(e,t){for(var i,n,o=0,r=this.STEPS,s=[],o=0;o<r;++o)s.push((i=o/this.STEPS,(t-(n=e))*(Math.pow(i-1,3)+1)+n));return s},this.scrollToLine=function(e,t,i,n){e=this.$cursorLayer.getPixelPosition({row:e,column:0}).top,t&&(e-=this.$size.scrollerHeight/2),t=this.scrollTop,this.session.setScrollTop(e),!1!==i&&this.animateScrolling(t,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0])==i)return}var r=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:r},clearInterval(this.$timer),n.session.setScrollTop(r.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){return n.session?void(r.length?(n.session.setScrollTop(r.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())):clearInterval(n.$timer)},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<t&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<e&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,e=i/this.characterWidth,t=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),n=this.$blockCursor?Math.floor(e):Math.round(e);return{row:t,column:n,side:0<e-n?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,e=i/this.characterWidth,e=this.$blockCursor?Math.floor(e):Math.round(e),n=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(n,Math.max(e,0),i)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),t=this.session.documentToScreenPosition(e,t),e=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,e)?this.session.$bidiHandler.getPosLeft(t.column):Math.round(t.column*this.characterWidth)),t=t.row*this.lineHeight;return{pageX:i.left+e-this.scrollLeft,pageY:i.top+t-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){(this.$composition=e).cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.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")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){var e;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,e=this.session.selection.cursor,this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(e,t,i,n){var o=this.session;o.bgTokenizer.lines[i]=null;var r={type:t,value:e},s=o.getTokens(i);if(null==n)s.push(r);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(n<=(a+=c.value.length)){var d=c.value.length-(a-n),h=c.value.slice(0,d),d=c.value.slice(d);s.splice(l,1,{type:c.type,value:h},r,{type:c.type,value:d});break}}this.updateLines(i,i)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(e,t){function i(i){if(s.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.$id&&(s.$themeId=i.$id),o.importCssString(i.cssText,i.cssClass,s.container),s.theme&&o.removeCssClass(s.container,s.theme.cssClass);var n="padding"in i?i.padding:"padding"in(s.theme||{})?4:s.$padding;s.$padding&&n!=s.$padding&&s.setPadding(n),s.$theme=i.cssClass,s.theme=i,o.addCssClass(s.container,i.cssClass),o.setCssClass(s.container,"ace_dark",i.isDark),s.$size&&(s.$size.width=0,s.$updateSizeAsync()),s._dispatchEvent("themeLoaded",{theme:i}),t&&t()}var n,s=this;this.$themeId=e,s._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e?i(e):(n=e||this.$options.theme.initialValue,r.loadModule(["theme",n],i))},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){o.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){o.removeCssClass(this.container,e)},this.setCursorStyle=function(e){o.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){o.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){o.importCssString(m,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}.call(e.prototype),r.defineOptions(e.prototype,"renderer",{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){"number"==typeof e&&(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},fadeFoldWidgets:{set:function(e){o.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},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){"number"==typeof e&&(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){this.$scrollPastEnd!=(e=+e||0)&&(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)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!f.isMobile&&!f.isIE}}),t.VirtualRenderer=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,i){"use strict";function n(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+s.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){return e=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder),e.append(t),e.getBlob("application/javascript")}}(e),t=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(t)}return new Worker(e)}function o(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}var r=e("../lib/oop"),s=e("../lib/net"),a=e("../lib/event_emitter").EventEmitter,l=e("../config");(function(){r.implement(this,a),this.$createWorkerFromOldConfig=function(t,i,o,r,s){var a,c;return e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),l.get("packaged")||!e.toUrl?r=r||l.moduleUrl(i,"worker"):(a=this.$normalizePath,r=r||a(e.toUrl("ace/worker/worker.js",null,"_")),c={},t.forEach(function(t){c[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=n(r),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:c,module:i,classname:o}),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 i=this.callbacks[t.id];i&&(i(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 s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),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,i){var n;i&&(n=this.callbackId++,this.callbacks[n]=i,t.push(n)),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.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,50<e.length&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(o.prototype),t.UIWorkerClient=function(e,t,i){var n=null,r=!1,s=Object.create(a),c=[],d=new o({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),n&&(r?setTimeout(h):h())}});d.setEmitSync=function(e){r=e};var h=function(){var e=c.shift();e.command?n[e.command].apply(n,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){d.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},l.loadModule(["worker",t],function(e){for(n=new e[i](s);c.length;)h()}),d},t.WorkerClient=o,t.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),e=function(e,t,i,n,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i,i=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1},this.$undoStackDepth=i.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){r.implement(this,o),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=i.addMarker(new n(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){i=t.createAnchor(i.row,i.column),i.$insertRight=!0,i.detach(),e.others.push(i)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){var e,t;this.othersActive||(e=this.session,(t=this).othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,o=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=i),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var a={row:(l=this.others[s]).row,column:l.column+r};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var l,a={row:(l=this.others[s]).row,column:l.column+r};this.doc.remove(new n(a.row,a.column,a.row,a.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,o){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),o,null,!1)};i(this.pos,this.mainClass);for(var o=this.others.length;o--;)i(this.others[o],this.othersClass)}},this.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).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)))},this.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},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(e.prototype),t.PlaceHolder=e}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){function n(e,t){return e.row==t.row&&e.column==t.column}var o=e("../lib/event"),r=e("../lib/useragent");t.onMouseDown=function(e){function t(){var e=m.renderer.pixelToScreenCoordinates(b,v),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);n(x,e)&&n(t,f.lead)||(x=e,m.selection.moveToPosition(t),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(S),S=f.rectangularRangeBlock(x,w),m.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=m.$mouseHandler.$clickSelection.clone()),S.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())}var i=e.domEvent,s=i.altKey,a=i.shiftKey,l=i.ctrlKey,c=e.getAccelKey(),d=e.getButton();if(l&&r.isMac&&(d=i.button),e.editor.inMultiSelectMode&&2==d)e.editor.textInput.onContextMenu(e.domEvent);else if(l||s||c){if(0===d){var h,u,g,p,m=e.editor,f=m.selection,C=m.inMultiSelectMode,I=e.getDocumentPosition(),A=f.getCursor(),A=e.inSelection()||f.isEmpty()&&n(I,A),b=e.x,v=e.y,y=m.session,w=m.renderer.pixelToScreenCoordinates(b,v),x=w;if(m.$mouseHandler.$enableJumpToDef)l&&s||c&&s?h=a?"block":"add":s&&m.$blockSelectEnabled&&(h="block");else if(c&&!s){if(h="add",!C&&a)return}else s&&m.$blockSelectEnabled&&(h="block");if(h&&r.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),"add"==h)!C&&A||(C||(u=f.toOrientedRange(),m.addSelectionMarker(u)),g=f.rangeList.rangeAtPoint(I),m.inVirtualSelectionMode=!0,a&&(g=null,u=f.ranges[0]||u,m.removeSelectionMarker(u)),m.once("mouseup",function(){var e=f.toOrientedRange();g&&e.isEmpty()&&n(g.cursor,e.cursor)?f.substractPoint(e.cursor):(a?f.substractPoint(u.cursor):u&&(m.removeSelectionMarker(u),f.addRange(u)),f.addRange(e)),m.inVirtualSelectionMode=!1}));else if("block"==h){e.stop(),m.inVirtualSelectionMode=!0;var S=[];C&&!c?f.toSingleRange():!C&&c&&(p=f.toOrientedRange(),m.addSelectionMarker(p)),a?w=y.documentToScreenPosition(f.lead):f.moveToPosition(I);var x={row:-1,column:-1},k=t;o.capture(m.container,function(e){b=e.clientX,v=e.clientY},function(e){t(),clearInterval(T),m.removeSelectionMarkers(S),S.length||(S=[f.toOrientedRange()]),p&&(m.removeSelectionMarker(p),f.toSingleRange(p));for(var i=0;i<S.length;i++)f.addRange(S[i]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null});var T=setInterval(function(){k()},20);return e.preventDefault()}}}else 0===d&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){1<e.multiSelect.rangeCount?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}}],e=e("../keyboard/hash_handler").HashHandler,t.keyboardHandler=new e(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,i){function n(e){function i(e){o&&(n.renderer.setMouseCursor(""),o=!1)}var n,o;e.$multiselectOnSessionChange||(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",a),e.commands.addCommands(d.defaultCommands),(n=e).textInput&&(e=n.textInput.getElement(),o=!1,l.addListener(e,"keydown",function(e){e=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey),n.$blockSelectEnabled&&e?o||(n.renderer.setMouseCursor("crosshair"),o=!0):o&&i()},n),l.addListener(e,"keyup",i,n),l.addListener(e,"blur",i,n)))}var o=e("./range_list").RangeList,r=e("./range").Range,s=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,l=e("./lib/event"),c=e("./lib/lang"),d=e("./commands/multi_select_commands");t.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=new(e("./search").Search),u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}return e.cursor||(e.cursor=e.end),i=this.rangeList.add(e),this.$onAddRange(e),i.length&&this.$onRemoveRange(i),1<this.rangeCount&&!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){if(e=this.rangeList.substractPoint(e))return this.$onRemoveRange(e),e[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){var t;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),e.push(t),this.rangeCount=0);for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],i=0;i<e.length;i++){var n=e[i],o=n.start.row,s=n.end.row;if(o===s)t.push(n.clone());else{for(t.push(new r(o,n.start.column,o,this.session.getLine(o).length));++o<s;)t.push(this.getLineRange(o,!0));t.push(new r(s,0,s,n.end.column))}0!=i||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),i=t.length;i--;)this.addRange(t[i])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],e=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=r.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,i){var n,o,s,a,l=[],c=e.column<t.column;a=c?(n=e.column,o=t.column,s=e.offsetX,t.offsetX):(n=t.column,o=e.column,s=t.offsetX,e.offsetX);var d,h,u,g=e.row<t.row;h=g?(d=e.row,t.row):(d=t.row,e.row),n<0&&(n=0),(d=d<0?0:d)==h&&(i=!0);for(var p,m,f=d;f<=h;f++){var C=r.fromPoints(this.session.screenToDocumentPosition(f,n,s),this.session.screenToDocumentPosition(f,o,a));if(C.isEmpty()){if(u&&(p=C.end,m=u,p.row==m.row&&p.column==m.column))break;u=C.end}C.cursor=c?C.start:C.end,l.push(C)}if(g&&l.reverse(),!i){for(var I=l.length-1;l[I].isEmpty()&&0<I;)I--;if(0<I)for(var A=0;l[A].isEmpty();)A++;for(var b=I;A<=b;b--)l[b].isEmpty()&&l.splice(b,1)}return l}}.call(s.prototype),u=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){e.marker&&(this.session.removeMarker(e.marker),-1!=(e=this.session.$selectionMarkers.indexOf(e))&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];n.marker&&(this.session.removeMarker(n.marker),-1!=(n=t.indexOf(n))&&t.splice(n,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){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,i=e.command,n=e.editor;if(n.multiSelect)return i.multiSelectAction?t="forEach"==i.multiSelectAction?n.forEachSelection(i,e.args):"forEachLine"==i.multiSelectAction?n.forEachSelection(i,e.args,!0):"single"==i.multiSelectAction?(n.exitMultiSelectMode(),i.exec(n,e.args||{})):i.multiSelectAction(n,e.args||{}):(t=i.exec(n,e.args||{}),n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,o=i&&i.keepOrder,r=1==i||i&&i.$byLines,a=this.session,l=this.selection,i=l.rangeList,c=(o?l:i).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});i=l._eventRegistry,l._eventRegistry={};var d=new s(a);this.inVirtualSelectionMode=!0;for(var h=c.length;h--;){if(r)for(;0<h&&c[h].start.row==c[h-1].end.row;)h--;d.fromOrientedRange(c[h]),d.index=h,this.selection=a.selection=d;var u=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===u||(n=u),d.toOrientedRange(c[h])}return d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=i,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]),l=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),l&&l.from==l.to&&this.renderer.animateScrolling(l.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var o=this.session.getDocument().getNewLineCharacter();(e=i.join(o)).length==(i.length-1)*o.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var i;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(i=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((i=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor).row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,i){var n;(t=t||{}).needle=e||t.needle,null==t.needle&&(n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(n)),this.$search.set(t);var o=this.$search.findAll(this.session);if(!o.length)return 0;var r=this.multiSelect;i||r.toSingleRange(o[0]);for(var s=o.length;s--;)r.addRange(o[s],!0);return n&&r.rangeList.rangeAtPoint(n.start)&&r.addRange(n,!0),o.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,o=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a,l,c=this.session.screenToDocumentPosition(o.row+e,o.column);s=i.isEmpty()?c:(s=this.session.documentToScreenPosition(n?i.end:i.start),this.session.screenToDocumentPosition(s.row+e,s.column)),n?(a=r.fromPoints(c,s)).cursor=a.start:(a=r.fromPoints(s,c)).cursor=a.end,a.desiredColumn=o.column,this.selection.inMultiSelectMode?t&&(l=i.cursor):this.selection.addRange(i),this.selection.addRange(a),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,o=n.length;o--;)(s=n[o]).isEmpty()&&(a=t.getWordRange(s.start.row,s.start.column),s.start.row=a.start.row,s.start.column=a.start.column,s.end.row=a.end.row,s.end.column=a.end.column);i.mergeOverlappingRanges();for(var r=[],o=n.length;o--;){var s=n[o];r.unshift(t.getTextRange(s))}for(e<0?r.unshift(r.pop()):r.push(r.shift()),o=n.length;o--;){var a=(s=n[o]).clone();t.replace(s,r[o]),s.start.row=a.start.row,s.start.column=a.start.column}i.fromOrientedRange(i.ranges[0])},this.selectMore=function(e,t,i){var n,o=this.session,r=o.multiSelect.toOrientedRange();r.isEmpty()&&((r=o.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),i)||(n=o.getTextRange(r),i=o,o=n,n=e,h.$options.wrap=!0,h.$options.needle=o,h.$options.backwards=-1==n,(i=h.find(i))&&(i.cursor=-1==e?i.start:i.end,this.session.unfold(i),this.multiSelect.addRange(i),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor))},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,o=i.filter(function(e){return e.cursor.row==n||void(n=e.cursor.row)});if(i.length&&o.length!=i.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,l=i.map(function(t){var i=t.cursor,t=e.getLine(i.row).substr(i.column).search(/\S/g);return i.column>s&&(s=i.column),(t=-1==t?0:t)<a&&(a=t),t});i.forEach(function(t,i){var n=t.cursor,o=s-n.column,i=l[i]-a;i<o?e.insert(n,c.stringRepeat(" ",o-i)):e.remove(new r(n.row,n.column,n.row,n.column-o+i)),t.start.column=t.end.column=s,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),h=d.start.row,u=d.end.row,o=h==u;if(o){for(var g,p=this.session.getLength();g=this.session.getLine(u),/[=:]/.test(g)&&++u<p;);for(;g=this.session.getLine(h),/[=:]/.test(g)&&0<--h;);h<0&&(h=0),p<=u&&(u=p-1)}i=this.session.removeFullLines(h,u),i=this.$reAlignText(i,o),this.session.insert({row:h,column:0},i.join("\n")+"\n"),o||(d.start.column=0,d.end.column=i[i.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){function i(e){return c.stringRepeat(" ",e)}function n(e){return e[2]?i(o)+e[2]+i(r-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var o,r,s,a=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?(null==o?(o=t[1].length,r=t[2].length,s=t[3].length):(o+r+s!=t[1].length+t[2].length+t[3].length&&(l=!1),o!=t[1].length&&(a=!1),o>t[1].length&&(o=t[1].length),r<t[2].length&&(r=t[2].length),s>t[3].length&&(s=t[3].length)),t):[e]}).map(t?n:a?l?function(e){return e[2]?i(o+r-e[2].length)+e[2]+i(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:n:function(e){return e[2]?i(o)+e[2]+i(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}.call(u.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,e=e.oldSession,e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.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=n,e("./config").defineOptions(u.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},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,i){"use strict";var n=e("../../range").Range,t=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){return i=e.getLine(i),this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=i||r.length,l=e.getLength(),i=t,c=t;++t<l;){var d=e.getLine(t).search(o);if(-1!=d){if(d<=s&&(!(d=e.getTokenAt(t,0))||"string"!==d.type))break;c=t}}if(i<c)return r=e.getLine(c).length,new n(i,a,c,r)}},this.openingBracketBlock=function(e,t,i,o,r){if(o={row:i,column:o+1},t=e.$findClosingBracket(t,o,r))return r=e.foldWidgets[t.row],"start"==(r=null==r?e.getFoldWidget(t.row):r)&&t.row>o.row&&(t.row--,t.column=e.getLine(t.row).length),n.fromPoints(o,t)},this.closingBracketBlock=function(e,t,i,o,r){if(o={row:i,column:o},t=e.$findOpeningBracket(t,o))return t.column++,o.column--,n.fromPoints(t,o)}}).call(t.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var o=e("./lib/dom");(function(){this.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),(this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),(t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,t=n.start.row,o=n.end.row,r="add"==e.action,s=t+1;s<o;s++)i[s]&&(i[s].hidden=r);i[o]&&(r?i[t]?i[o].hidden=r:i[t]=i[o]:(i[t]==i[o]&&(i[t]=void 0),i[o].hidden=r))}},this.updateOnChange=function(e){var t,i,n,o=this.session.lineWidgets;o&&(t=e.start.row,0==(n=e.end.row-t)||("remove"==e.action?(i=o.splice(t+1,n),!o[t]&&i[i.length-1]&&(o[t]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this)):(n=new Array(n),o[t]&&null!=o[t].column&&e.start.column>o[t].column&&t++,n.unshift(t,0),o.splice.apply(o,n)),this.$updateRows()))},this.$updateRows=function(){var e,t=this.session.lineWidgets;t&&(e=!0,t.forEach(function(t,i){if(t)for(e=!1,t.row=i;t.$oldWidget;)t.$oldWidget.row=i,t=t.$oldWidget}),e&&(this.session.lineWidgets=null))},this.$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).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),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),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var i,n=this.session.getFoldAt(e.row,0);return(e.$fold=n)&&(i=this.session.lineWidgets,e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var o=1/0,r=0;r<i.length;r++){var s=i[r];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/n.characterWidth));var a=s.h/n.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<o&&(o=s.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var o=Math.min(this.firstRow,i.firstRow),r=Math.max(this.lastRow,i.lastRow,n.length);0<o&&!n[o];)o--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var s=o;s<=r;s++){var a,l=n[s];l&&l.el&&(l.hidden?l.el.style.top=-100-(l.pixelHeight||0)+"px":(l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el)),a=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top,l.coverLine||(a+=i.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=a-i.offset+"px",a=l.coverGutter?0:t.gutterWidth,l.fixedWidth||(a-=t.scrollLeft),l.el.style.left=a+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=i.width+2*i.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""))}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e,t,i){var n=e.getAnnotations().sort(s.comparePoints);if(n.length){var o=function(e,t,i){for(var n=0,o=e.length-1;n<=o;){var r=n+o>>1,s=i(t,e[r]);if(0<s)n=1+r;else{if(!(s<0))return r;o=r-1}}return-(n+1)}(n,{row:t,column:-1},s.comparePoints);(o=o<0?-o-1:o)>=n.length?o=0<i?0:n.length-1:0===o&&i<0&&(o=n.length-1);var r=n[o];if(r&&i){if(r.row===t){for(;(r=n[o+=i])&&r.row===t;);if(!r)return n.slice()}var a=[];for(t=r.row;a[i<0?"unshift":"push"](r),(r=n[o+=i])&&r.row==t;);return a.length&&a}}}var o=e("../line_widgets").LineWidgets,r=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){function i(e,t,i){if(0===t&&("esc"===i||"return"===i))return u.destroy(),{command:"null"}}var s=e.session;s.widgetManager||(s.widgetManager=new o(s),s.widgetManager.attach(e));var a=e.getCursorPosition(),l=a.row,c=s.widgetManager.getWidgetsAtRow(l).filter(function(e){return"errorMarker"==e.type})[0];c?c.destroy():l-=t;var d,t=n(s,l,t);if(t){var h=t[0];a.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,a.row=h.row,d=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;d={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var u={row:a.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},h=u.el.appendChild(r.createElement("div")),c=u.el.appendChild(r.createElement("div"));c.className="error_widget_arrow "+d.className,a=e.renderer.$cursorLayer.getPixelPosition(a).left,c.style.left=a+e.renderer.gutterWidth-5+"px",u.el.className="error_widget_wrapper",h.className="error_widget "+d.className,h.innerHTML=d.text.join("<br>"),h.appendChild(r.createElement("div")),u.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(i),s.widgetManager.removeLineWidget(u),e.off("changeSelection",u.destroy),e.off("changeSession",u.destroy),e.off("mouseup",u.destroy),e.off("change",u.destroy))},e.keyBinding.addKeyboardHandler(i),e.on("changeSelection",u.destroy),e.on("changeSession",u.destroy),e.on("mouseup",u.destroy),e.on("change",u.destroy),e.session.widgetManager.addLineWidget(u),u.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:u.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),r=e("./lib/event"),s=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,d=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=i.amdD,t.edit=function(e,i){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var s,n="";e&&/input|textarea/i.test(e.tagName)?(n=(s=e).value,e=o.createElement("pre"),s.parentNode.replaceChild(e,s)):e&&(n=e.textContent,e.innerHTML="");var n=t.createEditSession(n),i=new a(new d(e),n,i),l={document:n,editor:i,onResize:i.resize.bind(i,null)};return s&&(l.textarea=s),r.addListener(window,"resize",l.onResize),i.on("destroy",function(){r.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),i.container.env=i.env=l,i},t.createEditSession=function(e,t){return t=new l(e,t),t.setUndoManager(new c),t},t.Range=s,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=d,t.version=t.config.version}),ace.require(["ace/ace"],function(t){for(var i in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(i)&&(window.ace[i]=t[i]);window.ace.default=window.ace,e&&(e.exports=window.ace)})},3330:function(e,t,i){e=i.nmd(e),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";function n(e,t,i){var n=o.createElement("div");o.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:"Search for",spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:"Toggle Replace mode",style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],n),this.element=n.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e),o.importCssString(a,"ace_searchbox",e.container)}var o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a='.ace_search {background-color: #ddd;color: #666;border: 1px solid #cbcbcb;border-top: 0 none;overflow: hidden;margin: 0;padding: 4px 6px 0 4px;position: absolute;top: 0;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {margin: 0 20px 4px 0;overflow: hidden;line-height: 1.9;}.ace_replace_form {margin-right: 0;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {border-radius: 3px 0 0 3px;background-color: white;color: black;border: 1px solid #cbcbcb;border-right: 0 none;outline: 0;padding: 0;font-size: inherit;margin: 0;line-height: inherit;padding: 0 6px;min-width: 17em;vertical-align: top;min-height: 1.8em;box-sizing: content-box;}.ace_searchbtn {border: 1px solid #cbcbcb;line-height: inherit;display: inline-block;padding: 0 6px;background: #fff;border-right: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;margin: 0;position: relative;color: #666;}.ace_searchbtn:last-child {border-radius: 0 3px 3px 0;border-right: 1px solid #cbcbcb;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn:hover {background-color: #eef1f6;}.ace_searchbtn.prev, .ace_searchbtn.next {padding: 0px 0.7em}.ace_searchbtn.prev:after, .ace_searchbtn.next:after {content: "";border: solid 2px #888;width: 0.5em;height: 0.5em;border-width: 2px 0 0 2px;display:inline-block;transform: rotate(-45deg);}.ace_searchbtn.next:after {border-width: 0 2px 2px 0 ;}.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;font: 16px/16px Arial;padding: 0;height: 14px;width: 14px;top: 9px;right: 7px;position: absolute;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;box-sizing: border-box!important;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;clear: both;}.ace_search_counter {float: left;font-family: arial;padding: 0 8px;}',l=e("../keyboard/hash_handler").HashHandler,c=e("../lib/keys");o.importCssString(a,"ace_searchbox"),function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var i=(e.target||e.srcElement).getAttribute("action");i&&t[i]?t[i]():t.$searchBarKb.commands[i]&&t.$searchBarKb.commands[i].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,i,n){n=c.keyCodeToString(n),n=t.$searchBarKb.findKeyCommand(i,n),n&&n.exec&&(n.exec(t),s.stopEvent(e))}),this.$onChange=r.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new l([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new l,this.$searchBarKb.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){e.editor.getReadOnly()||(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()}}),this.$searchBarKb.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()}}]),this.setSearchRange=function(e){(this.searchRange=e)?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){o.setCssClass(this.replaceOption,"checked",this.searchRange),o.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",o.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),o.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),o.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,i){i=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:i,range:this.searchRange})&&this.searchInput.value,o.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,i=0,n=0;if(t){var o=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),r=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(r-=e.session.doc.positionToIndex(this.searchRange.start));var s,a;for(t.lastIndex=0;(a=t.exec(o))&&((s=a.index)<=r&&n++,!(999<++i))&&(a[0]||(t.lastIndex=s+=1,!(s>=o.length))););}this.searchCounter.textContent=n+" of "+(999<i?"999+":i)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;o.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}.call(n.prototype),t.SearchBox=n,t.Search=function(e,t){(e.searchBox||new n(e)).show(e.session.getTextRange(),t)}}),ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})},4091:function(e,t,i){e=i.nmd(e),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,e=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:"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"}]}};n.inherits(e,o),t.JsonHighlightRules=e}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range,e=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,i=e.findMatchingBracket({row:t,column:o});if(!i||i.row==t)return 0;i=this.$getIndent(e.getLine(i.row)),e.replace(new n(t,0,t,o-1),i)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(e.prototype),t.MatchingBraceOutdent=e}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,e=e("./fold_mode").FoldMode,t=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)))};n.inherits(t,e),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,i){var n=e.getLine(i);return!this.singleLineBlockCommentRe.test(n)||this.startRegionRe.test(n)||this.tripleStarBlockCommentRe.test(n)?(i=this._getFoldWidgetBase(e,t,i),!i&&this.startRegionRe.test(n)?"start":i):""},this.getFoldWidgetRange=function(e,t,i,n){var o=e.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,i);var r=o.match(this.foldingStartMarker);if(r){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,s);var a=e.getCommentFoldRange(i,s+r[0].length,1);return a&&!a.isMultiLine()&&(n?a=this.getSectionRange(e,i):"all"!=t&&(a=null)),a}return"markbegin"!==t&&(r=o.match(this.foldingStopMarker))?(s=r.index+r[0].length,r[1]?this.closingBracketBlock(e,r[1],i,s):e.getCommentFoldRange(i,s,-1)):void 0},this.getSectionRange=function(e,t){for(var i=(l=e.getLine(t)).search(/\S/),n=t,r=l.length,s=t+=1,a=e.getLength();++t<a;){var l,c=(l=e.getLine(t)).search(/\S/);if(-1!==c){if(c<i)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=n)break;if(d.isMultiLine())t=d.end.row;else if(i==c)break}s=t}}return new o(n,r,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,i){for(var n=t.search(/\s*$/),r=e.getLength(),s=i,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++i<r;){t=e.getLine(i);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(s<i)return new o(s,n,i,t.length)}}.call(t.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/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,r=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,e=function(){this.HighlightRules=r,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};n.inherits(e,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t);return"start"==e&&t.match(/^.*[\{\(\[]\s*$/)&&(n+=i),n},this.checkOutdent=function(e,t,i){return this.$outdent.checkOutdent(t,i)},this.autoOutdent=function(e,t,i){this.$outdent.autoOutdent(t,i)},this.createWorker=function(e){var t=new c(["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(e.prototype),t.Mode=e}),ace.require(["ace/mode/json"],function(t){e&&(e.exports=t)})},8903:function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);e=this._opts=A.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:d,warn:d,error:d};else{if(!("object"==typeof(t=void 0===t?console:t)&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=f(e.format),this._cache=e.cache||new g,this._loadingSchemas={},this._compilations=[],this.RULES=C(),this._getId=function(e){switch(e.schemaId){case"auto":return l;case"id":return s;default:return a}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=m),this._metaOpts=function(e){for(var t=A.copy(e._opts),i=0;i<v.length;i++)delete t[v[i]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var i=e._opts.formats[t];e.addFormat(t,i)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var i=e._opts.keywords[t];e.addKeyword(t,i)}}(this),function(e){var t;e._opts.$data&&(t=i(6835),e.addMetaSchema(t,t.$id,!0)),!1!==e._opts.meta&&(t=i(38),e._opts.$data&&(t=I(t,y)),e.addMetaSchema(t,b,!0),e._refs["http://json-schema.org/schema"]=b)}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(t)if(Array.isArray(t))e.addSchema(t);else for(var i in t)e.addSchema(t[i],i)}(this)}function o(e,t){return t=u.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function r(e,t,i){for(var n in t){var o=t[n];o.meta||i&&!i.test(n)||(e._cache.del(o.cacheKey),delete t[n])}}function s(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function a(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function l(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function c(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function d(){}var h=i(5689),u=i(3969),g=i(5255),p=i(4293),m=i(3508),f=i(3368),C=i(742),I=i(9394),A=i(3724);(e.exports=n).prototype.validate=function(e,t){var i;if("string"==typeof e){if(!(i=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else e=this._addSchema(e),i=e.validate||this._compile(e);return t=i(t),!0!==i.$async&&(this.errors=i.errors),t},n.prototype.compile=function(e,t){return t=this._addSchema(e,void 0,t),t.validate||this._compile(t)},n.prototype.addSchema=function(e,t,i,n){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,i,n);return this}var r=this._getId(e);if(void 0!==r&&"string"!=typeof r)throw new Error("schema id must be string");return c(this,t=u.normalizeId(t||r)),this._schemas[t]=this._addSchema(e,i,n,!0),this},n.prototype.addMetaSchema=function(e,t,i){return this.addSchema(e,t,i,!0),this},n.prototype.validateSchema=function(e,t){var i=e.$schema;if(void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(!(i=i||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(b)?b:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(!(e=this.validate(i,e))&&t){if(t="schema is invalid: "+this.errorsText(),"log"!=this._opts.validateSchema)throw new Error(t);this.logger.error(t)}return e},n.prototype.getSchema=function(e){var t=o(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var i=u.schema.call(e,{schema:{}},t);if(i){var n=i.schema,o=i.root,r=i.baseId,i=h.call(e,n,o,void 0,r);return e._fragments[t]=new p({ref:t,fragment:!0,schema:n,root:o,baseId:r,validate:i}),i}}(this,e)}},n.prototype.removeSchema=function(e){if(e instanceof RegExp)return r(this,this._schemas,e),r(this,this._refs,e),this;switch(typeof e){case"undefined":return r(this,this._schemas),r(this,this._refs),this._cache.clear(),this;case"string":var t=o(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":t=this._opts.serialize,t=t?t(e):e,this._cache.del(t),t=this._getId(e),t&&(t=u.normalizeId(t),delete this._schemas[t],delete this._refs[t])}return this},n.prototype.addFormat=function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this._formats[e]=t,this},n.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var i=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,o="",r=0;r<e.length;r++){var s=e[r];s&&(o+=n+s.dataPath+" "+s.message+i)}return o.slice(0,-i.length)},n.prototype._addSchema=function(e,t,i,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,r=o?o(e):e,s=this._cache.get(r);if(s)return s;n=n||!1!==this._opts.addUsedSchema,(o=u.normalizeId(this._getId(e)))&&n&&c(this,o);var a,s=!1!==this._opts.validateSchema&&!t;return s&&!(a=o&&o==u.normalizeId(e.$schema))&&this.validateSchema(e,!0),t=u.ids.call(this,e),i=new p({id:o,schema:e,localRefs:t,cacheKey:r,meta:i}),"#"!=o[0]&&n&&(this._refs[o]=i),this._cache.put(r,i),s&&a&&this.validateSchema(e,!0),i},n.prototype._compile=function(e,t){function i(){var t=e.validate,n=t.apply(this,arguments);return i.errors=t.errors,n}if(e.compiling)return(e.validate=i).schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var n,o;e.compiling=!0,e.meta&&(n=this._opts,this._opts=this._metaOpts);try{o=h.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=n)}return e.validate=o,e.refs=o.refs,e.refVal=o.refVal,e.root=o.root,o},n.prototype.compileAsync=i(9677),e=i(7931),n.prototype.addKeyword=e.add,n.prototype.getKeyword=e.get,n.prototype.removeKeyword=e.remove,n.prototype.validateKeyword=e.validate,e=i(5359),n.ValidationError=e.Validation,n.MissingRefError=e.MissingRef,n.$dataMetaSchema=I;var b="http://json-schema.org/draft-07/schema",v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],y=["/properties"]},5255:function(e){"use strict";e=e.exports=function(){this._cache={}},e.prototype.put=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.del=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}}},9677:function(e,t,i){"use strict";function n(e,t,i){function r(e){return e=e.$schema,e&&!s.getSchema(e)?n.call(s,{$ref:e},!0):Promise.resolve()}var s=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(i=t,t=void 0);var a=r(e).then(function(){var i=s._addSchema(e,void 0,t);return i.validate||function e(i){try{return s._compile(i)}catch(n){if(n instanceof o)return function(n){function o(){delete s._loadingSchemas[l]}function a(e){return s._refs[e]||s._schemas[e]}var l=n.missingSchema;if(a(l))throw new Error("Schema "+l+" is loaded but "+n.missingRef+" cannot be resolved");return n=s._loadingSchemas[l],n||(n=s._loadingSchemas[l]=s._opts.loadSchema(l)).then(o,o),n.then(function(e){if(!a(l))return r(e).then(function(){a(l)||s.addSchema(e,l,void 0,t)})}).then(function(){return e(i)})}(n);throw n}}(i)});return i&&a.then(function(e){i(null,e)},i),a}var o=i(5359).MissingRef;e.exports=n},5359:function(e,t,i){"use strict";function n(e,t,i){this.message=i||n.message(e,t),this.missingRef=r.url(e,t),this.missingSchema=r.normalizeId(r.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e}var r=i(3969);e.exports={Validation:o(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:o(n)},n.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},3368:function(e,t,i){"use strict";function n(e){return a.copy(n[e="full"==e?"full":"fast"])}function o(e){var t=e.match(l);if(!t)return!1;var i=+t[1],e=+t[2],t=+t[3];return 1<=e&&e<=12&&1<=t&&t<=(2!=e||(i=i)%4!=0||i%100==0&&i%400!=0?c[e]:29)}function r(e,t){var i=e.match(d);if(!i)return!1;var n=i[1],o=i[2],e=i[3],i=i[5];return(n<=23&&o<=59&&e<=59||23==n&&59==o&&60==e)&&(!t||i)}function s(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var a=i(3724),l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c=[0,31,28,31,30,31,30,31,31,30,31,30,31],d=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,h=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,g=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,m=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4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?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:s,uuid:m,"json-pointer":f,"json-pointer-uri-fragment":C,"relative-json-pointer":i},n.full={date:o,time:r,"date-time":function(e){return e=e.split(I),2==e.length&&o(e[0])&&r(e[1],!0)},uri:function(e){return A.test(e)&&u.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?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(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:s,uuid:m,"json-pointer":f,"json-pointer-uri-fragment":C,"relative-json-pointer":i};var I=/t|\s/i,A=/\/|:/,b=/[^\\]\\Z/},5689:function(e,t,i){"use strict";function n(e,t,i,I){function A(){var e=D.validate,t=e.apply(this,arguments);return A.errors=e.errors,t}function b(e,i,o,g){var I=!i||i&&i.schema==e;if(i.schema!=t.schema)return n.call(T,e,i,o,g);o=!0===e.$async,g=p({isTop:!0,schema:e,isRoot:I,baseId:g,root:i,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:u.MissingRef,RULES:B,validate:p,util:h,resolve:d,resolveRef:v,usePattern:x,useDefault:S,useCustomRule:k,opts:M,formats:G,logger:T.logger,self:T}),g=c(N,a)+c(E,r)+c(j,s)+c(W,l)+g,M.processCode&&(g=M.processCode(g,e));try{var A=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",g)(T,B,G,t,N,j,W,f,m,C);N[0]=A}catch(e){throw T.logger.error("Error compiling schema, function code:",g),e}return A.schema=e,A.errors=null,A.refs=R,A.refVal=N,A.root=I?A:i,o&&(A.$async=!0),!0===M.sourceCode&&(A.source={code:g,patterns:E,defaults:j}),A}function v(e,o,r){o=d.url(e,o);var s=R[o];if(void 0!==s)return w(l=N[s],c="refVal["+s+"]");if(!r&&t.refs){var a=t.refs[o];if(void 0!==a)return w(l=t.refVal[a],c=y(o,l))}var l,c=y(o),a=d.call(T,b,t,o);if(void 0!==a||(l=i&&i[o])&&(a=d.inlineRef(l,M.inlineRefs)?l:n.call(T,l,t,i,e)),void 0!==a)return function(e,t){e=R[e],N[e]=t}(o,a),w(a,c);delete R[o]}function y(e,t){var i=N.length;return N[i]=t,"refVal"+(R[e]=i)}function w(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function x(e){var t=L[e];return void 0===t&&(t=L[e]=E.length,E[t]=e),"pattern"+t}function S(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return h.toQuotedString(e);case"object":if(null===e)return"null";var t=g(e),i=Z[t];return void 0===i&&(i=Z[t]=j.length,j[i]=e),"default"+i}}function k(e,t,i,n){if(!1!==T._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every(function(e){return Object.prototype.hasOwnProperty.call(i,e)}))throw new Error("parent schema must have all required keywords: "+o.join(","));var r=e.definition.validateSchema;if(r&&!r(t)){var s="keyword schema is invalid: "+T.errorsText(r.errors);if("log"!=T._opts.validateSchema)throw new Error(s);T.logger.error(s)}}var a,o=e.definition.compile,r=e.definition.inline,s=e.definition.macro;if(o)a=o.call(T,t,i,n);else if(s)a=s.call(T,t,i,n),!1!==M.validateSchema&&T.validateSchema(a,!0);else if(r)a=r.call(T,n,e.keyword,t,i);else if(!(a=e.definition.validate))return;if(void 0===a)throw new Error('custom keyword "'+e.keyword+'"failed to compile');return e=W.length,{code:"customRule"+e,validate:W[e]=a}}var T=this,M=this._opts,N=[void 0],R={},E=[],L={},j=[],Z={},W=[];t=t||{schema:e,refVal:N,refs:R};var O=function(e,t,i){var n=o.call(this,e,t,i);return 0<=n?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:i},{index:n,compiling:!1})}.call(this,e,t,I),D=this._compilations[O.index];if(O.compiling)return D.callValidate=A;var G=this._formats,B=this.RULES;try{var H=b(e,t,i,I);D.validate=H;var _=D.callValidate;return _&&(_.schema=H.schema,_.errors=null,_.refs=H.refs,_.refVal=H.refVal,_.root=H.root,_.$async=H.$async,M.sourceCode&&(_.source=H.source)),H}finally{(function(e,t,i){0<=(i=o.call(this,e,t,i))&&this._compilations.splice(i,1)}).call(this,e,t,I)}}function o(e,t,i){for(var n=0;n<this._compilations.length;n++){var o=this._compilations[n];if(o.schema==e&&o.root==t&&o.baseId==i)return n}return-1}function r(e,t){return"var pattern"+e+" = new RegExp("+h.toQuotedString(t[e])+");"}function s(e){return"var default"+e+" = defaults["+e+"];"}function a(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function l(e){return"var customRule"+e+" = customRules["+e+"];"}function c(e,t){if(!e.length)return"";for(var i="",n=0;n<e.length;n++)i+=t(n,e);return i}var d=i(3969),h=i(3724),u=i(5359),g=i(3508),p=i(1869),m=h.ucs2length,f=i(2303),C=u.Validation;e.exports=n},3969:function(e,t,i){"use strict";function n(e,t,i){var r=this._refs[i];if("string"==typeof r){if(!this._refs[r])return n.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[i])instanceof p)return s(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var a,l,c,i=o.call(this,t,i);return i&&(a=i.schema,t=i.root,c=i.baseId),a instanceof p?l=a.validate||e.call(this,a.schema,t,void 0,c):void 0!==a&&(l=s(a,this._opts.inlineRefs)?a:e.call(this,a,t,void 0,c)),l}function o(e,t){var i=h.parse(t),n=l(i),s=a(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==s){var u=c(n),n=this._refs[u];if("string"==typeof n)return function(e,t,i){var n=o.call(this,e,t);if(n){var s=n.schema,t=n.baseId;return e=n.root,n=this._getId(s),n&&(t=d(t,n)),r.call(this,i,t,s,e)}}.call(this,e,n,i);if(n instanceof p)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[u])instanceof p))return;if(n.validate||this._compile(n),u==c(t))return{schema:n,root:e,baseId:s};e=n}if(!e.schema)return;s=a(this._getId(e.schema))}return r.call(this,i,s,e.schema,e)}function r(e,t,i,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var r=e.fragment.split("/"),s=1;s<r.length;s++){var a=r[s];if(a){if(void 0===(i=i[a=g.unescapeFragment(a)]))break;f[a]||((a=this._getId(i))&&(t=d(t,a)),i.$ref&&(a=d(t,i.$ref),(a=o.call(this,n,a))&&(i=a.schema,n=a.root,t=a.baseId)))}}return void 0!==i&&i!==n.schema?{schema:i,root:n,baseId:t}:void 0}}function s(e,t){return!1!==t&&(void 0===t||!0===t?function e(t){var i;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if("object"==typeof(i=t[n])&&!e(i))return!1}else for(var o in t){if("$ref"==o)return!1;if("object"==typeof(i=t[o])&&!e(i))return!1}return!0}(e):t?function e(t){var i,n=0;if(Array.isArray(t)){for(var o=0;o<t.length;o++)if("object"==typeof(i=t[o])&&(n+=e(i)),n==1/0)return 1/0}else for(var r in t){if("$ref"==r)return 1/0;if(C[r])n++;else if("object"==typeof(i=t[r])&&(n+=e(i)+1),n==1/0)return 1/0}return n}(e)<=t:void 0)}function a(e,t){return!1!==t&&(e=c(e)),l(h.parse(e))}function l(e){return h.serialize(e).split("#")[0]+"#"}function c(e){return e?e.replace(I,""):""}function d(e,t){return t=c(t),h.resolve(e,t)}var h=i(7533),u=i(2303),g=i(3724),p=i(4293),m=i(500);(e.exports=n).normalizeId=c,n.fullPath=a,n.url=d,n.ids=function(e){var t=c(this._getId(e)),i={"":t},n={"":a(t,!1)},o={},r=this;return m(e,{allKeys:!0},function(e,t,s,a,l,d,p){if(""!==t){var m=r._getId(e),f=i[a],l=n[a]+"/"+l;if(void 0!==p&&(l+="/"+("number"==typeof p?p:g.escapeFragment(p))),"string"==typeof m)if(m=f=c(f?h.resolve(f,m):m),p=r._refs[m],(p="string"==typeof p?r._refs[p]:p)&&p.schema){if(!u(e,p.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=c(l))if("#"==m[0]){if(o[m]&&!u(e,o[m]))throw new Error('id "'+m+'" resolves to more than one schema');o[m]=e}else r._refs[m]=l;i[t]=f,n[t]=l}}),o},n.inlineRef=s,n.schema=o;var f=g.toHash(["properties","patternProperties","enum","dependencies","definitions"]),C=g.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),I=/#\/?$/},742:function(e,t,i){"use strict";var n=i(9646),o=i(3724).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=o(t),e.types=o(["number","integer","string","array","object","boolean","null"]),e.forEach(function(i){i.rules=i.rules.map(function(i){var o,r;return"object"==typeof i&&(r=i[o=Object.keys(i)[0]],i=o,r.forEach(function(i){t.push(i),e.all[i]=!0})),t.push(i),e.all[i]={keyword:i,code:n[i],implements:r}}),e.all.$comment={keyword:"$comment",code:n.$comment},i.type&&(e.types[i.type]=i)}),e.keywords=o(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},4293:function(e,t,i){"use strict";var n=i(3724);e.exports=function(e){n.copy(e,this)}},6887:function(e){"use strict";e.exports=function(e){for(var t,i=0,n=e.length,o=0;o<n;)i++,55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<n&&56320==(64512&(t=e.charCodeAt(o)))&&o++;return i}},3724:function(e,t,i){"use strict";function n(e,t,i,n){var o=n?" !== ":" === ",r=n?" || ":" && ",s=n?"!":"",a=n?"":"!";switch(e){case"null":return t+o+"null";case"array":return s+"Array.isArray("+t+")";case"object":return"("+s+t+r+"typeof "+t+o+'"object"'+r+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+o+'"number"'+r+a+"("+t+" % 1)"+r+t+o+t+(i?r+s+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+o+'"'+e+'"'+(i?r+s+"isFinite("+t+")":"")+")";default:return"typeof "+t+o+'"'+e+'"'}}function o(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;return t}function r(e){return"number"==typeof e?"["+e+"]":u.test(e)?"."+e:"['"+s(e)+"']"}function s(e){return e.replace(g,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function a(e){return"'"+s(e)+"'"}function l(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function c(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports={copy:function(e,t){for(var i in t=t||{},e)t[i]=e[i];return t},checkDataType:n,checkDataTypes:function(e,t,i){if(1===e.length)return n(e[0],t,i,!0);var r,s="",e=o(e);for(r in e.array&&e.object&&(s=e.null?"(":"(!"+t+" || ",s+="typeof "+t+' !== "object")',delete e.null,delete e.array,delete e.object),e.number&&delete e.integer,e)s+=(s?" && ":"")+n(r,t,i,!0);return s},coerceToTypes:function(e,t){if(!Array.isArray(t))return h[t]?[t]:"array"===e&&"array"===t?["array"]:void 0;for(var i=[],n=0;n<t.length;n++){var o=t[n];(h[o]||"array"===e&&"array"===o)&&(i[i.length]=o)}return i.length?i:void 0},toHash:o,getProperty:r,escapeQuotes:s,equal:i(2303),ucs2length:i(6887),varOccurences:function(e,t){return t+="[^0-9]",t=e.match(new RegExp(t,"g")),t?t.length:0},varReplace:function(e,t,i){return t+="([^0-9])",i=i.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),i+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var i in e)if(t[i])return!0},schemaHasRulesExcept:function(e,t,i){if("boolean"==typeof e)return!e&&"not"!=i;for(var n in e)if(n!=i&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"!=typeof e)for(var i in e)if(!t[i])return i},toQuotedString:a,getPathExpr:function(e,t,i,n){return l(e,i?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,i){return t=a(i?"/"+c(t):r(t)),l(e,t)},getData:function(e,t,i){var n,o,s;if(""===e)return"rootData";if("/"==e[0]){if(!p.test(e))throw new Error("Invalid JSON-pointer: "+e);n=e,o="rootData"}else{if(!(s=e.match(m)))throw new Error("Invalid JSON-pointer: "+e);if(e=+s[1],"#"==(n=s[2])){if(t<=e)throw new Error("Cannot access property/index "+e+" levels up, current level is "+t);return i[t-e]}if(t<e)throw new Error("Cannot access data "+e+" levels up, current level is "+t);if(o="data"+(t-e||""),!n)return o}for(var a=o,l=n.split("/"),c=0;c<l.length;c++){var h=l[c];h&&(o+=r(d(h)),a+=" && "+o)}return a},unescapeFragment:function(e){return d(decodeURIComponent(e))},unescapeJsonPointer:d,escapeFragment:function(e){return encodeURIComponent(c(e))},escapeJsonPointer:c};var h=o(["string","number","integer","boolean","null"]),u=/^[a-z$_][a-z$_0-9]*$/i,g=/'|\\/g,p=/^\/(?:[^~]|~0|~1)*$/,m=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},9394:function(e){"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,i){for(var n=0;n<i.length;n++){e=JSON.parse(JSON.stringify(e));for(var o=i[n].split("/"),r=e,s=1;s<o.length;s++)r=r[o[s]];for(s=0;s<t.length;s++){var a=t[s],l=r[a];l&&(r[a]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},5868:function(e,t,i){"use strict";i=i(38),e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:i.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:i.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},1796:function(e){"use strict";e.exports=function(e,t,i){var n,o,r,s,a,l,c=" ",d=e.level,h=e.dataLevel,u=e.schema[t],g=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,m=!e.opts.allErrors,f="data"+(h||""),C=e.opts.$data&&u&&u.$data,I=C?(c+=" var schema"+d+" = "+e.util.getData(u.$data,h,e.dataPathArr)+"; ","schema"+d):u,A="maximum"==t,b=A?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[b],y=e.opts.$data&&v&&v.$data,w=A?"<":">",x=A?">":"<",S=void 0;if(!C&&"number"!=typeof u&&void 0!==u)throw new Error(t+" must be number");if(!y&&void 0!==v&&"number"!=typeof v&&"boolean"!=typeof v)throw new Error(b+" must be number or boolean");y?(n="exclusive"+d,o="exclType"+d,r="exclIsNumber"+d,s="' + "+(a="op"+d)+" + '",c+=" var schemaExcl"+d+" = "+(h=e.util.getData(v.$data,h,e.dataPathArr))+"; ",S=b,(l=l||[]).push(c+=" var "+n+"; var "+o+" = typeof "+(h="schemaExcl"+d)+"; if ("+o+" != 'boolean' && "+o+" != 'undefined' && "+o+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(S||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+b+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),c+=" } "):c+=" {} ",k=c,c=l.pop(),!e.compositeRule&&m?e.async?c+=" throw new ValidationError(["+k+"]); ":c+=" validate.errors = ["+k+"]; return false; ":c+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",C&&(c+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),c+=" "+o+" == 'number' ? ( ("+n+" = "+I+" === undefined || "+h+" "+w+"= "+I+") ? "+f+" "+x+"= "+h+" : "+f+" "+x+" "+I+" ) : ( ("+n+" = "+h+" === true) ? "+f+" "+x+"= "+I+" : "+f+" "+x+" "+I+" ) || "+f+" !== "+f+") { var op"+d+" = "+n+" ? '"+w+"' : '"+w+"='; ",void 0===u&&(p=e.errSchemaPath+"/"+(S=b),I=h,C=y)):(s=w,(r="number"==typeof v)&&C?(a="'"+s+"'",c+=" if ( ",C&&(c+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),c+=" ( "+I+" === undefined || "+v+" "+w+"= "+I+" ? "+f+" "+x+"= "+v+" : "+f+" "+x+" "+I+" ) || "+f+" !== "+f+") { "):(r&&void 0===u?(n=!0,p=e.errSchemaPath+"/"+(S=b),I=v,x+="="):(r&&(I=Math[A?"min":"max"](v,u)),v===(!r||I)?(n=!0,p=e.errSchemaPath+"/"+(S=b),x+="="):(n=!1,s+="=")),a="'"+s+"'",c+=" if ( ",C&&(c+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),c+=" "+f+" "+x+" "+I+" || "+f+" !== "+f+") { ")),S=S||t,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(S||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { comparison: "+a+", limit: "+I+", exclusive: "+n+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+s+" ",c+=C?"' + "+I:I+"'"),e.opts.verbose&&(c+=" , schema: ",c+=C?"validate.schema"+g:""+u,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),c+=" } "):c+=" {} ";var k=c;return c=l.pop(),!e.compositeRule&&m?e.async?c+=" throw new ValidationError(["+k+"]); ":c+=" validate.errors = ["+k+"]; return false; ":c+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},2407:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h=e.opts.$data&&s&&s.$data,r=h?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s;if(!h&&"number"!=typeof s)throw new Error(t+" must be number");n+="if ( ",h&&(n+=" ("+r+" !== undefined && typeof "+r+" != 'number') || ");var o=t,u=u||[];return u.push(n+=" "+d+".length "+("maxItems"==t?">":"<")+" "+r+") { "),n="",!1!==e.createErrors?(n+=" { keyword: '"+(o||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxItems"==t?"more":"fewer",n+=" than ",n+=h?"' + "+r+" + '":""+s,n+=" items' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",c&&(n+=" else { "),n}},1250:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h=e.opts.$data&&s&&s.$data,r=h?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s;if(!h&&"number"!=typeof s)throw new Error(t+" must be number");n+="if ( ",h&&(n+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?n+=" "+d+".length ":n+=" ucs2length("+d+") ";var o=t,u=u||[];return u.push(n+=" "+("maxLength"==t?">":"<")+" "+r+") { "),n="",!1!==e.createErrors?(n+=" { keyword: '"+(o||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be ",n+="maxLength"==t?"longer":"shorter",n+=" than ",n+=h?"' + "+r+" + '":""+s,n+=" characters' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",c&&(n+=" else { "),n}},2596:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h=e.opts.$data&&s&&s.$data,r=h?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s;if(!h&&"number"!=typeof s)throw new Error(t+" must be number");n+="if ( ",h&&(n+=" ("+r+" !== undefined && typeof "+r+" != 'number') || ");var o=t,u=u||[];return u.push(n+=" Object.keys("+d+").length "+("maxProperties"==t?">":"<")+" "+r+") { "),n="",!1!==e.createErrors?(n+=" { keyword: '"+(o||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxProperties"==t?"more":"fewer",n+=" than ",n+=h?"' + "+r+" + '":""+s,n+=" properties' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",c&&(n+=" else { "),n}},9486:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.schema[t],r=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var d="valid"+l.level,h=l.baseId,u=!0,g=o;if(g)for(var p,m=-1,f=g.length-1;m<f;)p=g[m+=1],(e.opts.strictKeywords?"object"==typeof p&&0<Object.keys(p).length||!1===p:e.util.schemaHasRules(p,e.RULES.all))&&(u=!1,l.schema=p,l.schemaPath=r+"["+m+"]",l.errSchemaPath=s+"/"+m,n+=" "+e.validate(l)+" ",l.baseId=h,a&&(n+=" if ("+d+") { ",c+="}"));return a&&(n+=u?" if (true) { ":" "+c.slice(0,-1)+" "),n}},5347:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,t="data"+(r||""),d="valid"+o,r="errs__"+o,h=e.util.copy(e),u="";h.level++;var g="valid"+h.level;if(s.every(function(t){return e.opts.strictKeywords?"object"==typeof t&&0<Object.keys(t).length||!1===t:e.util.schemaHasRules(t,e.RULES.all)})){var p=h.baseId;n+=" var "+r+" = errors; var "+d+" = false; ",o=e.compositeRule,e.compositeRule=h.compositeRule=!0;var m=s;if(m)for(var f,C=-1,I=m.length-1;C<I;)f=m[C+=1],h.schema=f,h.schemaPath=a+"["+C+"]",h.errSchemaPath=l+"/"+C,n+=" "+e.validate(h)+" ",h.baseId=p,n+=" "+d+" = "+d+" || "+g+"; if (!"+d+") { ",u+="}";e.compositeRule=h.compositeRule=o,n+=" "+u+" if (!"+d+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+t+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+r+"; if (vErrors !== null) { if ("+r+") vErrors.length = "+r+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else c&&(n+=" if (true) { ");return n}},923:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.schema[t],t=e.errSchemaPath+"/"+t,o=(e.opts.allErrors,e.util.toQuotedString(o));return!0===e.opts.$comment?n+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+o+", "+e.util.toQuotedString(t)+", validate.root.schema);"),n}},2617:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,t=e.opts.$data&&s&&s.$data;t&&(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; "),t||(n+=" var schema"+o+" = validate.schema"+a+";");var u=u||[];return u.push(n+="var "+h+" = equal("+d+", schema"+o+"); if (!"+h+") { "),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",c&&(n+=" else { "),n}},2119:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,u="errs__"+o,g=e.util.copy(e);g.level++;var p="valid"+g.level,m="i"+o,f=g.dataLevel=e.dataLevel+1,t="data"+f,r=e.baseId,o=e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all);n+="var "+u+" = errors;var "+h+";",o?(h=e.compositeRule,e.compositeRule=g.compositeRule=!0,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+d+".length; "+m+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),s=d+"["+m+"]",g.dataPathArr[f]=m,m=e.validate(g),g.baseId=r,e.util.varOccurences(m,t)<2?n+=" "+e.util.varReplace(m,t,s)+" ":n+=" var "+t+" = "+s+"; "+m+" ",n+=" if ("+p+") break; } ",e.compositeRule=g.compositeRule=h,n+=" if (!"+p+") {"):n+=" if ("+d+".length == 0) {";var C=C||[];return C.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=C.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",o&&(n+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n}},1793:function(e){"use strict";e.exports=function(e,t,i){var n,o,r,s=" ",a=e.level,l=e.dataLevel,c=e.schema[t],d=e.schemaPath+e.util.getProperty(t),h=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,g="data"+(l||""),p="valid"+a,m="errs__"+a,f=e.opts.$data&&c&&c.$data,C=f?(s+=" var schema"+a+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ","schema"+a):c,I="definition"+a,A=this.definition,b="";if(f&&A.$data){var v="keywordValidate"+a,y=A.validateSchema;s+=" var "+I+" = RULES.custom['"+t+"'].definition; var "+v+" = "+I+".validate;"}else{if(!(w=e.useCustomRule(this,c,e.schema,e)))return;C="validate.schema"+d,v=w.code,n=A.compile,o=A.inline,r=A.macro}var w,x,S,k,T,M=v+".errors",N="i"+a,t="ruleErr"+a,c=A.async;if(c&&!e.async)throw new Error("async keyword in sync schema");return o||r||(s+=M+" = null;"),s+="var "+m+" = errors;var "+p+";",f&&A.$data&&(b+="}",s+=" if ("+C+" === undefined) { "+p+" = true; } else { ",y&&(b+="}",s+=" "+p+" = "+I+".validateSchema("+C+"); if ("+p+") { ")),o?A.statements?s+=" "+w.validate+" ":s+=" "+p+" = "+w.validate+"; ":r?(b="",(y=e.util.copy(e)).level++,k="valid"+y.level,y.schema=w.validate,y.schemaPath="",I=e.compositeRule,e.compositeRule=y.compositeRule=!0,w=e.validate(y).replace(/validate\.schema/g,v),e.compositeRule=y.compositeRule=I,s+=" "+w):((T=T||[]).push(s),s="",s+=" "+v+".call( ",e.opts.passContext?s+="this":s+="self",n||!1===A.schema?s+=" , "+g+" ":s+=" , "+C+" , "+g+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath),l=s+=" , "+(x=l?"data"+(l-1||""):"parentData")+" , "+(S=l?e.dataPathArr[l]:"parentDataProperty")+" , rootData ) ",s=T.pop(),!1===A.errors?(s+=" "+p+" = ",c&&(s+="await "),s+=l+"; "):s+=c?" var "+(M="customErrors"+a)+" = null; try { "+p+" = await "+l+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+M+" = e.errors; else throw e; } ":" "+M+" = null; "+p+" = "+l+"; "),A.modifying&&(s+=" if ("+x+") "+g+" = "+x+"["+S+"];"),s+=""+b,A.valid?u&&(s+=" if (true) { "):(s+=" if ( ",void 0===A.valid?(s+=" !",s+=r?""+k:p):s+=" "+!A.valid+" ",k=this.keyword,(T=T||[]).push(s+=") { "),(T=T||[]).push(s=""),s="",!1!==e.createErrors?(s+=" { keyword: '"+(k||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),s+=" } "):s+=" {} ",p=s,s=T.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+p+"]); ":s+=" validate.errors = ["+p+"]; return false; ":s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",p=s,s=T.pop(),o?A.errors?"full"!=A.errors&&(s+=" for (var "+N+"="+m+"; "+N+"<errors; "+N+"++) { var "+t+" = vErrors["+N+"]; if ("+t+".dataPath === undefined) "+t+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+t+".schemaPath === undefined) { "+t+'.schemaPath = "'+h+'"; } ',e.opts.verbose&&(s+=" "+t+".schema = "+C+"; "+t+".data = "+g+"; "),s+=" } "):!1===A.errors?s+=" "+p+" ":(s+=" if ("+m+" == errors) { "+p+" } else { for (var "+N+"="+m+"; "+N+"<errors; "+N+"++) { var "+t+" = vErrors["+N+"]; if ("+t+".dataPath === undefined) "+t+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+t+".schemaPath === undefined) { "+t+'.schemaPath = "'+h+'"; } ',e.opts.verbose&&(s+=" "+t+".schema = "+C+"; "+t+".data = "+g+"; "),s+=" } } "):r?(s+=" var err = ",!1!==e.createErrors?(s+=" { keyword: '"+(k||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?s+=" throw new ValidationError(vErrors); ":s+=" validate.errors = vErrors; return false; ")):!1===A.errors?s+=" "+p+" ":(s+=" if (Array.isArray("+M+")) { if (vErrors === null) vErrors = "+M+"; else vErrors = vErrors.concat("+M+"); errors = vErrors.length; for (var "+N+"="+m+"; "+N+"<errors; "+N+"++) { var "+t+" = vErrors["+N+"]; if ("+t+".dataPath === undefined) "+t+".dataPath = (dataPath || '') + "+e.errorPath+"; "+t+'.schemaPath = "'+h+'"; ',e.opts.verbose&&(s+=" "+t+".schema = "+C+"; "+t+".data = "+g+"; "),s+=" } } else { "+p+" } "),s+=" } ",u&&(s+=" else { ")),s}},9115:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),r="errs__"+o,h=e.util.copy(e),u="";h.level++;var g,p="valid"+h.level,m={},f={},C=e.opts.ownProperties;for(E in s)"__proto__"!=E&&(j=s[E],(g=Array.isArray(j)?f:m)[E]=j);n+="var "+r+" = errors;";var I=e.errorPath;for(E in n+="var missing"+o+";",f)if((g=f[E]).length){if(n+=" if ( "+d+e.util.getProperty(E)+" !== undefined ",C&&(n+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(E)+"') "),c){n+=" && ( ";var A=g;if(A)for(var b=-1,v=A.length-1;b<v;)k=A[b+=1],b&&(n+=" || "),n+=" ( ( "+(R=d+(N=e.util.getProperty(k)))+" === undefined ",C&&(n+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(k)+"') "),n+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:N)+") ) ";n+=")) { ";var y="missing"+o,w="' + "+y+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,y,!0):I+" + "+y);var x=x||[];x.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+w+"', depsCount: "+g.length+", deps: '"+e.util.escapeQuotes(1==g.length?g[0]:g.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==g.length?n+="property "+e.util.escapeQuotes(g[0]):n+="properties "+e.util.escapeQuotes(g.join(", ")),n+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",y=n,n=x.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var S=g;if(S)for(var k,T=-1,M=S.length-1;T<M;){k=S[T+=1];var N=e.util.getProperty(k),w=e.util.escapeQuotes(k),R=d+N;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,k,e.opts.jsonPointers)),n+=" if ( "+R+" === undefined ",C&&(n+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(k)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+w+"', depsCount: "+g.length+", deps: '"+e.util.escapeQuotes(1==g.length?g[0]:g.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==g.length?n+="property "+e.util.escapeQuotes(g[0]):n+="properties "+e.util.escapeQuotes(g.join(", ")),n+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",c&&(u+="}",n+=" else { ")}e.errorPath=I;var E,L=h.baseId;for(E in m){var j=m[E];(e.opts.strictKeywords?"object"==typeof j&&0<Object.keys(j).length||!1===j:e.util.schemaHasRules(j,e.RULES.all))&&(n+=" "+p+" = true; if ( "+d+e.util.getProperty(E)+" !== undefined ",C&&(n+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(E)+"') "),n+=") { ",h.schema=j,h.schemaPath=a+e.util.getProperty(E),h.errSchemaPath=l+"/"+e.util.escapeFragment(E),n+=" "+e.validate(h)+" ",h.baseId=L,n+=" } ",c&&(n+=" if ("+p+") { ",u+="}"))}return c&&(n+=" "+u+" if ("+r+" == errors) {"),n}},9317:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,t=e.opts.$data&&s&&s.$data,r=(t&&(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; "),"i"+o),s="schema"+o;t||(n+=" var "+s+" = validate.schema"+a+";"),n+="var "+h+";",t&&(n+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),n+=h+" = false;for (var "+r+"=0; "+r+"<"+s+".length; "+r+"++) if (equal("+d+", "+s+"["+r+"])) { "+h+" = true; break; }",t&&(n+=" } ");var u=u||[];return u.push(n+=" if (!"+h+") { "),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",c&&(n+=" else { "),n}},8327:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||"");if(!1===e.opts.format)return c&&(n+=" if (true) { "),n;var h,u=e.opts.$data&&s&&s.$data,g=u?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s,t=e.opts.unknownFormats,r=Array.isArray(t);if(u)n+=" var "+(h="format"+o)+" = formats["+g+"]; var "+(p="isObject"+o)+" = typeof "+h+" == 'object' && !("+h+" instanceof RegExp) && "+h+".validate; var "+(f="formatType"+o)+" = "+p+" && "+h+".type || 'string'; if ("+p+") { ",e.async&&(n+=" var async"+o+" = "+h+".async; "),n+=" "+h+" = "+h+".validate; } if ( ",u&&(n+=" ("+g+" !== undefined && typeof "+g+" != 'string') || "),n+=" (","ignore"!=t&&(n+=" ("+g+" && !"+h+" ",r&&(n+=" && self._opts.unknownFormats.indexOf("+g+") == -1 "),n+=") || "),n+=" ("+h+" && "+f+" == '"+i+"' && !(typeof "+h+" == 'function' ? ",e.async?n+=" (async"+o+" ? await "+h+"("+d+") : "+h+"("+d+")) ":n+=" "+h+"("+d+") ",n+=" : "+h+".test("+d+"))))) {";else{if(!(h=e.formats[s])){if("ignore"==t)return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(n+=" if (true) { "),n;if(r&&0<=t.indexOf(s))return c&&(n+=" if (true) { "),n;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var p,m,f=(p="object"==typeof h&&!(h instanceof RegExp)&&h.validate)&&h.type||"string";if(p&&(m=!0===h.async,h=h.validate),f!=i)return c&&(n+=" if (true) { "),n;if(m){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(C="formats"+e.util.getProperty(s)+".validate")+"("+d+"))) { "}else{n+=" if (! ";var C="formats"+e.util.getProperty(s);p&&(C+=".validate"),n+="function"==typeof h?" "+C+"("+d+") ":" "+C+".test("+d+") ",n+=") { "}}var I=I||[];return I.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",n+=u?""+g:""+e.util.toQuotedString(s),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=u?"' + "+g+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=u?"validate.schema"+a:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=I.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { "),n}},5926:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,u="errs__"+o,g=e.util.copy(e);g.level++;var p,m="valid"+g.level,f=e.schema.then,t=e.schema.else,r=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&0<Object.keys(f).length||!1===f:e.util.schemaHasRules(f,e.RULES.all)),f=void 0!==t&&(e.opts.strictKeywords?"object"==typeof t&&0<Object.keys(t).length||!1===t:e.util.schemaHasRules(t,e.RULES.all)),t=g.baseId;return r||f?(g.createErrors=!1,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+u+" = errors; var "+h+" = true; ",s=e.compositeRule,e.compositeRule=g.compositeRule=!0,n+=" "+e.validate(g)+" ",g.baseId=t,g.createErrors=!0,n+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.compositeRule=g.compositeRule=s,r?(n+=" if ("+m+") { ",g.schema=e.schema.then,g.schemaPath=e.schemaPath+".then",g.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(g)+" ",g.baseId=t,n+=" "+h+" = "+m+"; ",r&&f?n+=" var "+(p="ifClause"+o)+" = 'then'; ":p="'then'",n+=" } ",f&&(n+=" else { ")):n+=" if (!"+m+") { ",f&&(g.schema=e.schema.else,g.schemaPath=e.schemaPath+".else",g.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(g)+" ",g.baseId=t,n+=" "+h+" = "+m+"; ",r&&f?n+=" var "+(p="ifClause"+o)+" = 'else'; ":p="'else'",n+=" } "),n+=" if (!"+h+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+p+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+p+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",c&&(n+=" else { ")):c&&(n+=" if (true) { "),n}},9646:function(e,t,i){"use strict";e.exports={$ref:i(2331),allOf:i(9486),anyOf:i(5347),$comment:i(923),const:i(2617),contains:i(2119),dependencies:i(9115),enum:i(9317),format:i(8327),if:i(5926),items:i(392),maximum:i(1796),minimum:i(1796),maxItems:i(2407),minItems:i(2407),maxLength:i(1250),minLength:i(1250),maxProperties:i(2596),minProperties:i(2596),multipleOf:i(6039),not:i(7946),oneOf:i(9344),pattern:i(9737),properties:i(2537),propertyNames:i(2127),required:i(1204),uniqueItems:i(1985),validate:i(1869)}},392:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,u="errs__"+o,g=e.util.copy(e),p="";g.level++;var m="valid"+g.level,t="i"+o,f=g.dataLevel=e.dataLevel+1,C="data"+f,I=e.baseId;if(n+="var "+u+" = errors;var "+h+";",Array.isArray(s)){var A,r=e.schema.additionalItems;!1===r&&(n+=" "+h+" = "+d+".length <= "+s.length+"; ",o=l,l=e.errSchemaPath+"/additionalItems",(A=A||[]).push(n+=" if (!"+h+") { "),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",h=n,n=A.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+h+"]); ":n+=" validate.errors = ["+h+"]; return false; ":n+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",l=o,c&&(p+="}",n+=" else { "));var b=s;if(b)for(var v=-1,y=b.length-1;v<y;){var w,x,S=b[v+=1];(e.opts.strictKeywords?"object"==typeof S&&0<Object.keys(S).length||!1===S:e.util.schemaHasRules(S,e.RULES.all))&&(n+=" "+m+" = true; if ("+d+".length > "+v+") { ",w=d+"["+v+"]",g.schema=S,g.schemaPath=a+"["+v+"]",g.errSchemaPath=l+"/"+v,g.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0),g.dataPathArr[f]=v,x=e.validate(g),g.baseId=I,e.util.varOccurences(x,C)<2?n+=" "+e.util.varReplace(x,C,w)+" ":n+=" var "+C+" = "+w+"; "+x+" ",n+=" } ",c&&(n+=" if ("+m+") { ",p+="}"))}"object"==typeof r&&(e.opts.strictKeywords?"object"==typeof r&&0<Object.keys(r).length||!1===r:e.util.schemaHasRules(r,e.RULES.all))&&(g.schema=r,g.schemaPath=e.schemaPath+".additionalItems",g.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+d+".length > "+s.length+") { for (var "+t+" = "+s.length+"; "+t+" < "+d+".length; "+t+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,t,e.opts.jsonPointers,!0),w=d+"["+t+"]",g.dataPathArr[f]=t,x=e.validate(g),g.baseId=I,e.util.varOccurences(x,C)<2?n+=" "+e.util.varReplace(x,C,w)+" ":n+=" var "+C+" = "+w+"; "+x+" ",c&&(n+=" if (!"+m+") break; "),n+=" } } ",c&&(n+=" if ("+m+") { ",p+="}"))}else(e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all))&&(g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" for (var "+t+" = 0; "+t+" < "+d+".length; "+t+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,t,e.opts.jsonPointers,!0),w=d+"["+t+"]",g.dataPathArr[f]=t,x=e.validate(g),g.baseId=I,e.util.varOccurences(x,C)<2?n+=" "+e.util.varReplace(x,C,w)+" ":n+=" var "+C+" = "+w+"; "+x+" ",c&&(n+=" if (!"+m+") break; "),n+=" }");return c&&(n+=" "+p+" if ("+u+" == errors) {"),n}},6039:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h=e.opts.$data&&s&&s.$data,r=h?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s;if(!h&&"number"!=typeof s)throw new Error(t+" must be number");n+="var division"+o+";if (",h&&(n+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),n+=" (division"+o+" = "+d+" / "+r+", ",e.opts.multipleOfPrecision?n+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":n+=" division"+o+" !== parseInt(division"+o+") ",n+=" ) ",h&&(n+=" ) ");var u=u||[];return u.push(n+=" ) { "),n="",!1!==e.createErrors?(n+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be multiple of ",n+=h?"' + "+r:r+"'"),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",c&&(n+=" else { "),n}},7946:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),t="errs__"+o,r=e.util.copy(e);r.level++;var h,u,o="valid"+r.level;return(e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all))?(r.schema=s,r.schemaPath=a,r.errSchemaPath=l,n+=" var "+t+" = errors; ",s=e.compositeRule,e.compositeRule=r.compositeRule=!0,r.createErrors=!1,r.opts.allErrors&&(h=r.opts.allErrors,r.opts.allErrors=!1),n+=" "+e.validate(r)+" ",r.createErrors=!0,h&&(r.opts.allErrors=h),e.compositeRule=r.compositeRule=s,(u=u||[]).push(n+=" if ("+o+") { "),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",o=n,n=u.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+o+"]); ":n+=" validate.errors = ["+o+"]; return false; ":n+=" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+t+"; if (vErrors !== null) { if ("+t+") vErrors.length = "+t+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")):(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")),n}},9344:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,t="data"+(r||""),d="valid"+o,r="errs__"+o,h=e.util.copy(e),u="";h.level++;var g="valid"+h.level,p=h.baseId,m="prevValid"+o,f="passingSchemas"+o;n+="var "+r+" = errors , "+m+" = false , "+d+" = false , "+f+" = null; ",o=e.compositeRule,e.compositeRule=h.compositeRule=!0;var C=s;if(C)for(var I,A=-1,b=C.length-1;A<b;)I=C[A+=1],(e.opts.strictKeywords?"object"==typeof I&&0<Object.keys(I).length||!1===I:e.util.schemaHasRules(I,e.RULES.all))?(h.schema=I,h.schemaPath=a+"["+A+"]",h.errSchemaPath=l+"/"+A,n+=" "+e.validate(h)+" ",h.baseId=p):n+=" var "+g+" = true; ",A&&(n+=" if ("+g+" && "+m+") { "+d+" = false; "+f+" = ["+f+", "+A+"]; } else { ",u+="}"),n+=" if ("+g+") { "+d+" = "+m+" = true; "+f+" = "+A+"; }";return e.compositeRule=h.compositeRule=o,n+=u+"if (!"+d+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+f+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+t+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+r+"; if (vErrors !== null) { if ("+r+") vErrors.length = "+r+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n}},9737:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),t=e.opts.$data&&s&&s.$data,r=t?(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ","schema"+o):s,o=t?"(new RegExp("+r+"))":e.usePattern(s);n+="if ( ",t&&(n+=" ("+r+" !== undefined && typeof "+r+" != 'string') || ");var h=h||[];return h.push(n+=" !"+o+".test("+d+") ) { "),n="",!1!==e.createErrors?(n+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { pattern: ",n+=t?""+r:""+e.util.toQuotedString(s),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match pattern \"",n+=t?"' + "+r+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=t?"validate.schema"+a:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",d=n,n=h.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",c&&(n+=" else { "),n}},2537:function(e){"use strict";e.exports=function(e,t,i){function n(e){return"__proto__"!==e}var o=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,h="data"+(s||""),u="errs__"+r,g=e.util.copy(e),p="";g.level++;var m,f="valid"+g.level,C="key"+r,I="idx"+r,A=g.dataLevel=e.dataLevel+1,b="data"+A,v="dataProperties"+r,y=Object.keys(a||{}).filter(n),w=e.schema.patternProperties||{},x=Object.keys(w).filter(n),S=e.schema.additionalProperties,k=y.length||x.length,T=!1===S,M="object"==typeof S&&Object.keys(S).length,N=e.opts.removeAdditional,t=T||M||N,R=e.opts.ownProperties,E=e.baseId,s=e.schema.required;if(s&&(!e.opts.$data||!s.$data)&&s.length<e.opts.loopRequired&&(m=e.util.toHash(s)),o+="var "+u+" = errors;var "+f+" = true;",R&&(o+=" var "+v+" = undefined;"),t){if(o+=R?" "+v+" = "+v+" || Object.keys("+h+"); for (var "+I+"=0; "+I+"<"+v+".length; "+I+"++) { var "+C+" = "+v+"["+I+"]; ":" for (var "+C+" in "+h+") { ",k){if(o+=" var isAdditional"+r+" = !(false ",y.length)if(8<y.length)o+=" || validate.schema"+l+".hasOwnProperty("+C+") ";else{var L=y;if(L)for(var j=-1,Z=L.length-1;j<Z;)H=L[j+=1],o+=" || "+C+" == "+e.util.toQuotedString(H)+" "}if(x.length){var W=x;if(W)for(var O=-1,D=W.length-1;O<D;)Q=W[O+=1],o+=" || "+e.usePattern(Q)+".test("+C+") "}o+=" ); if (isAdditional"+r+") { "}"all"==N?o+=" delete "+h+"["+C+"]; ":(V=e.errorPath,r="' + "+C+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers)),T?N?o+=" delete "+h+"["+C+"]; ":(F=c,c=e.errSchemaPath+"/additionalProperties",(Y=Y||[]).push(o+=" "+f+" = false; "),o="",!1!==e.createErrors?(o+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+r+"' } ",!1!==e.opts.messages&&(o+=" , message: '",e.opts._errorDataPathProperty?o+="is an invalid additional property":o+="should NOT have additional properties",o+="' "),e.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",X=o,o=Y.pop(),!e.compositeRule&&d?e.async?o+=" throw new ValidationError(["+X+"]); ":o+=" validate.errors = ["+X+"]; return false; ":o+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=F,d&&(o+=" break; ")):M&&("failing"==N?(o+=" var "+u+" = errors; ",N=e.compositeRule,e.compositeRule=g.compositeRule=!0,g.schema=S,g.schemaPath=e.schemaPath+".additionalProperties",g.errSchemaPath=e.errSchemaPath+"/additionalProperties",g.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers),te=h+"["+C+"]",g.dataPathArr[A]=C,ie=e.validate(g),g.baseId=E,e.util.varOccurences(ie,b)<2?o+=" "+e.util.varReplace(ie,b,te)+" ":o+=" var "+b+" = "+te+"; "+ie+" ",o+=" if (!"+f+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+C+"]; } ",e.compositeRule=g.compositeRule=N):(g.schema=S,g.schemaPath=e.schemaPath+".additionalProperties",g.errSchemaPath=e.errSchemaPath+"/additionalProperties",g.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers),te=h+"["+C+"]",g.dataPathArr[A]=C,ie=e.validate(g),g.baseId=E,e.util.varOccurences(ie,b)<2?o+=" "+e.util.varReplace(ie,b,te)+" ":o+=" var "+b+" = "+te+"; "+ie+" ",d&&(o+=" if (!"+f+") break; "))),e.errorPath=V),k&&(o+=" } "),o+=" } ",d&&(o+=" if ("+f+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(y.length){var B=y;if(B)for(var H,_=-1,$=B.length-1;_<$;){var z,P,V,F,K,Y,X,J=a[H=B[_+=1]];(e.opts.strictKeywords?"object"==typeof J&&0<Object.keys(J).length||!1===J:e.util.schemaHasRules(J,e.RULES.all))&&(te=h+(z=e.util.getProperty(H)),K=G&&void 0!==J.default,g.schema=J,g.schemaPath=l+z,g.errSchemaPath=c+"/"+e.util.escapeFragment(H),g.errorPath=e.util.getPath(e.errorPath,H,e.opts.jsonPointers),g.dataPathArr[A]=e.util.toQuotedString(H),ie=e.validate(g),g.baseId=E,e.util.varOccurences(ie,b)<2?(ie=e.util.varReplace(ie,b,te),P=te):o+=" var "+(P=b)+" = "+te+"; ",K?o+=" "+ie+" ":(m&&m[H]?(o+=" if ( "+P+" === undefined ",R&&(o+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),o+=") { "+f+" = false; ",V=e.errorPath,F=c,K=e.util.escapeQuotes(H),e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,H,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(Y=Y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+K+"' } ",!1!==e.opts.messages&&(o+=" , message: '",e.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+K+"\\'",o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",X=o,o=Y.pop(),!e.compositeRule&&d?e.async?o+=" throw new ValidationError(["+X+"]); ":o+=" validate.errors = ["+X+"]; return false; ":o+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=F,e.errorPath=V,o+=" } else { "):d?(o+=" if ( "+P+" === undefined ",R&&(o+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),o+=") { "+f+" = true; } else { "):(o+=" if ("+P+" !== undefined ",R&&(o+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),o+=" ) { "),o+=" "+ie+" } ")),d&&(o+=" if ("+f+") { ",p+="}")}}if(x.length){var U=x;if(U)for(var Q,q=-1,ee=U.length-1;q<ee;){var te,ie,J=w[Q=U[q+=1]];(e.opts.strictKeywords?"object"==typeof J&&0<Object.keys(J).length||!1===J:e.util.schemaHasRules(J,e.RULES.all))&&(g.schema=J,g.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(Q),g.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(Q),o+=R?" "+v+" = "+v+" || Object.keys("+h+"); for (var "+I+"=0; "+I+"<"+v+".length; "+I+"++) { var "+C+" = "+v+"["+I+"]; ":" for (var "+C+" in "+h+") { ",o+=" if ("+e.usePattern(Q)+".test("+C+")) { ",g.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers),te=h+"["+C+"]",g.dataPathArr[A]=C,ie=e.validate(g),g.baseId=E,e.util.varOccurences(ie,b)<2?o+=" "+e.util.varReplace(ie,b,te)+" ":o+=" var "+b+" = "+te+"; "+ie+" ",d&&(o+=" if (!"+f+") break; "),o+=" } ",d&&(o+=" else "+f+" = true; "),o+=" } ",d&&(o+=" if ("+f+") { ",p+="}"))}}return d&&(o+=" "+p+" if ("+u+" == errors) {"),o}},2127:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="errs__"+o,u=e.util.copy(e);u.level++;var g,p,m,f,C,I="valid"+u.level;return n+="var "+h+" = errors;",(e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all))&&(u.schema=s,u.schemaPath=a,u.errSchemaPath=l,C="idx"+o,p="i"+o,m="' + "+(g="key"+o)+" + '",f="data"+(u.dataLevel=e.dataLevel+1),t="dataProperties"+o,r=e.opts.ownProperties,s=e.baseId,r&&(n+=" var "+t+" = undefined; "),n+=r?" "+t+" = "+t+" || Object.keys("+d+"); for (var "+C+"=0; "+C+"<"+t+".length; "+C+"++) { var "+g+" = "+t+"["+C+"]; ":" for (var "+g+" in "+d+") { ",n+=" var startErrs"+o+" = errors; ",r=g,t=e.compositeRule,e.compositeRule=u.compositeRule=!0,C=e.validate(u),u.baseId=s,e.util.varOccurences(C,f)<2?n+=" "+e.util.varReplace(C,f,r)+" ":n+=" var "+f+" = "+r+"; "+C+" ",e.compositeRule=u.compositeRule=t,n+=" if (!"+I+") { for (var "+p+"=startErrs"+o+"; "+p+"<errors; "+p+"++) { vErrors["+p+"].propertyName = "+g+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+m+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+m+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),c&&(n+=" break; "),n+=" } }"),c&&(n+=" if ("+h+" == errors) {"),n}},2331:function(e){"use strict";e.exports=function(e,t,i){var n,o,r=" ",s=e.level,a=e.dataLevel,l=e.schema[t],c=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,h="data"+(a||""),t="valid"+s;if("#"==l||"#/"==l)o=e.isRoot?(n=e.async,"validate"):(n=!0===e.root.schema.$async,"root.refVal[0]");else if(void 0===(s=e.resolveRef(e.baseId,l,e.isRoot))){var u,g=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(g),(u=u||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(r+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ";var p=r,r=u.pop();!e.compositeRule&&d?e.async?r+=" throw new ValidationError(["+p+"]); ":r+=" validate.errors = ["+p+"]; return false; ":r+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(r+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,g);e.logger.warn(g),d&&(r+=" if (true) { ")}}else s.inline?((p=e.util.copy(e)).level++,g="valid"+p.level,p.schema=s.schema,p.schemaPath="",p.errSchemaPath=l,r+=" "+e.validate(p).replace(/validate\.schema/g,s.code)+" ",d&&(r+=" if ("+g+") { ")):(n=!0===s.$async||e.async&&!1!==s.$async,o=s.code);if(o)if((u=u||[]).push(r),r="",e.opts.passContext?r+=" "+o+".call(this, ":r+=" "+o+"( ",r+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(r+=" + "+e.errorPath),a=r+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ",r=u.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");d&&(r+=" var "+t+"; "),r+=" try { await "+a+"; ",d&&(r+=" "+t+" = true; "),r+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",d&&(r+=" "+t+" = false; "),r+=" } ",d&&(r+=" if ("+t+") { ")}else r+=" if (!"+a+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",d&&(r+=" else { ");return r}},1204:function(e){"use strict";e.exports=function(e,t,i){var n=" ",o=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(r||""),h="valid"+o,t=e.opts.$data&&s&&s.$data,r=(t&&(n+=" var schema"+o+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; "),"schema"+o);if(!t)if(s.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var u=[],g=s;if(g)for(var p=-1,m=g.length-1;p<m;){var f=g[p+=1],C=e.schema.properties[f];C&&(e.opts.strictKeywords?"object"==typeof C&&0<Object.keys(C).length||!1===C:e.util.schemaHasRules(C,e.RULES.all))||(u[u.length]=f)}}else u=s;if(t||u.length){var I=e.errorPath,s=t||u.length>=e.opts.loopRequired,A=e.opts.ownProperties;if(c)if(n+=" var missing"+o+"; ",s){t||(n+=" var "+r+" = validate.schema"+a+"; ");var b="' + "+(k="schema"+o+"["+(w="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,k,e.opts.jsonPointers)),n+=" var "+h+" = true; ",t&&(n+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),n+=" for (var "+w+" = 0; "+w+" < "+r+".length; "+w+"++) { "+h+" = "+d+"["+r+"["+w+"]] !== undefined ",A&&(n+=" && Object.prototype.hasOwnProperty.call("+d+", "+r+"["+w+"]) "),n+="; if (!"+h+") break; } ",t&&(n+=" } "),(S=S||[]).push(n+=" if (!"+h+") { "),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+b+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var v=n,n=S.pop();!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var y=u;if(y)for(var w=-1,x=y.length-1;w<x;)M=y[w+=1],w&&(n+=" || "),n+=" ( ( "+(L=d+(E=e.util.getProperty(M)))+" === undefined ",A&&(n+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(M)+"') "),n+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?M:E)+") ) ";n+=") { ";var S,b="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,k,!0):I+" + "+k),(S=S||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+b+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",v=n,n=S.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(s){t||(n+=" var "+r+" = validate.schema"+a+"; ");var k,b="' + "+(k="schema"+o+"["+(w="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,k,e.opts.jsonPointers)),t&&(n+=" if ("+r+" && !Array.isArray("+r+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+b+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+r+" !== undefined) { "),n+=" for (var "+w+" = 0; "+w+" < "+r+".length; "+w+"++) { if ("+d+"["+r+"["+w+"]] === undefined ",A&&(n+=" || ! Object.prototype.hasOwnProperty.call("+d+", "+r+"["+w+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+b+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",t&&(n+=" } ")}else{var T=u;if(T)for(var M,N=-1,R=T.length-1;N<R;){M=T[N+=1];var E=e.util.getProperty(M),b=e.util.escapeQuotes(M),L=d+E;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,M,e.opts.jsonPointers)),n+=" if ( "+L+" === undefined ",A&&(n+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(M)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+b+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=I}else c&&(n+=" if (true) {");return n}},1985:function(e){"use strict";e.exports=function(e,t,i){var n,o=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,h="data"+(s||""),u="valid"+r,t=e.opts.$data&&a&&a.$data,s=t?(o+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+r):a;return(a||t)&&!1!==e.opts.uniqueItems?(t&&(o+=" var "+u+"; if ("+s+" === false || "+s+" === undefined) "+u+" = true; else if (typeof "+s+" != 'boolean') "+u+" = false; else { "),o+=" var i = "+h+".length , "+u+" = true , j; if (i > 1) { ",r=e.schema.items&&e.schema.items.type,s=Array.isArray(r),!r||"object"==r||"array"==r||s&&(0<=r.indexOf("object")||0<=r.indexOf("array"))?o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+u+" = false; break outer; } } } ":(o+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ",o+=" if ("+e.util["checkDataType"+(s?"s":"")](r,"item",e.opts.strictNumbers,!0)+") continue; ",s&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+u+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),o+=" } ",t&&(o+=" } "),(n=n||[]).push(o+=" if (!"+u+") { "),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=t?"validate.schema"+l:""+a,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",h=o,o=n.pop(),!e.compositeRule&&d?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",d&&(o+=" else { ")):d&&(o+=" if (true) { "),o}},1869:function(e){"use strict";e.exports=function(e,t,i){function n(e){for(var t=e.rules,i=0;i<t.length;i++)if(o(t[i]))return 1}function o(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var i=t.implements,n=0;n<i.length;n++)if(void 0!==e.schema[i[n]])return 1}(t)}var r="",s=!0===e.schema.$async,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),l=e.self._getId(e.schema);if(e.opts.strictKeywords){var c=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(c){if(c="unknown keyword: "+c,"log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(r+=" var validate = ",s&&(e.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",l&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+l+" */ ")),"boolean"==typeof e.schema||!a&&!e.schema.$ref){var d=e.level,h=e.dataLevel,u=e.schema[t="false schema"],g=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,m=!e.opts.allErrors,f="data"+(h||""),C="valid"+d;return!1===e.schema?(e.isTop?m=!0:r+=" var "+C+" = false; ",(P=P||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",L=r,r=P.pop(),!e.compositeRule&&m?e.async?r+=" throw new ValidationError(["+L+"]); ":r+=" validate.errors = ["+L+"]; return false; ":r+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):e.isTop?r+=s?" return data; ":" validate.errors = null; return true; ":r+=" var "+C+" = true; ",e.isTop&&(r+=" }; return validate; "),r}if(e.isTop){var I=e.isTop,d=e.level=0,h=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var A="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(A);e.logger.warn(A)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{if(d=e.level,f="data"+((h=e.dataLevel)||""),l&&(e.baseId=e.resolve.url(e.baseId,l)),s&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+d+" = errors;"}var b,C="valid"+d,m=!e.opts.allErrors,v="",y="",w=e.schema.type,x=Array.isArray(w);if(w&&e.opts.nullable&&!0===e.schema.nullable&&(x?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],x=!0)),x&&1==w.length&&(w=w[0],x=!1),e.schema.$ref&&a){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(r+=" "+e.RULES.all.$comment.code(e,"$comment")),w){e.opts.coerceTypes&&(b=e.util.coerceToTypes(e.opts.coerceTypes,w));var S=e.RULES.types[w];if(b||x||!0===S||S&&!n(S)){if(g=e.schemaPath+".type",p=e.errSchemaPath+"/type",g=e.schemaPath+".type",p=e.errSchemaPath+"/type",r+=" if ("+e.util[x?"checkDataTypes":"checkDataType"](w,f,e.opts.strictNumbers,!0)+") { ",b){var k="dataType"+d,T="coerced"+d;r+=" var "+k+" = typeof "+f+"; var "+T+" = undefined; ","array"==e.opts.coerceTypes&&(r+=" if ("+k+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+k+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+T+" = "+f+"; } "),r+=" if ("+T+" !== undefined) ; ";var M=b;if(M)for(var N,R=-1,E=M.length-1;R<E;)"string"==(N=M[R+=1])?r+=" else if ("+k+" == 'number' || "+k+" == 'boolean') "+T+" = '' + "+f+"; else if ("+f+" === null) "+T+" = ''; ":"number"==N||"integer"==N?(r+=" else if ("+k+" == 'boolean' || "+f+" === null || ("+k+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==N&&(r+=" && !("+f+" % 1)"),r+=")) "+T+" = +"+f+"; "):"boolean"==N?r+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+T+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+T+" = true; ":"null"==N?r+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+T+" = null; ":"array"==e.opts.coerceTypes&&"array"==N&&(r+=" else if ("+k+" == 'string' || "+k+" == 'number' || "+k+" == 'boolean' || "+f+" == null) "+T+" = ["+f+"]; ");(P=P||[]).push(r+=" else { "),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",r+=x?""+w.join(","):""+w,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=x?""+w.join(","):""+w,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";var L=r;r=P.pop(),!e.compositeRule&&m?e.async?r+=" throw new ValidationError(["+L+"]); ":r+=" validate.errors = ["+L+"]; return false; ":r+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } if ("+T+" !== undefined) { ",l=h?"data"+(h-1||""):"parentData",r+=" "+f+" = "+T+"; ",h||(r+="if ("+l+" !== undefined)"),r+=" "+l+"["+(h?e.dataPathArr[h]:"parentDataProperty")+"] = "+T+"; } "}else(P=P||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",r+=x?""+w.join(","):""+w,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=x?""+w.join(","):""+w,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",L=r,r=P.pop(),!e.compositeRule&&m?e.async?r+=" throw new ValidationError(["+L+"]); ":r+=" validate.errors = ["+L+"]; return false; ":r+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";r+=" } "}}if(e.schema.$ref&&!a)r+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(r+=" } if (errors === ",r+=I?"0":"errs_"+d,r+=") { ",y+="}");else{var j=e.RULES;if(j)for(var Z=-1,W=j.length-1;Z<W;)if(n(S=j[Z+=1])){if(S.type&&(r+=" if ("+e.util.checkDataType(S.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==S.type&&e.schema.properties){var u=e.schema.properties,O=Object.keys(u);if(O)for(var D,G=-1,B=O.length-1;G<B;)if(void 0!==($=u[D=O[G+=1]]).default){var H=f+e.util.getProperty(D);if(e.compositeRule){if(e.opts.strictDefaults){if(A="default is ignored for: "+H,"log"!==e.opts.strictDefaults)throw new Error(A);e.logger.warn(A)}}else r+=" if ("+H+" === undefined ","empty"==e.opts.useDefaults&&(r+=" || "+H+" === null || "+H+" === '' "),r+=" ) "+H+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault($.default)+" ":r+=" "+JSON.stringify($.default)+" ",r+="; "}}else if("array"==S.type&&Array.isArray(e.schema.items)){var _=e.schema.items;if(_)for(var $,R=-1,z=_.length-1;R<z;)if(void 0!==($=_[R+=1]).default)if(H=f+"["+R+"]",e.compositeRule){if(e.opts.strictDefaults){if(A="default is ignored for: "+H,"log"!==e.opts.strictDefaults)throw new Error(A);e.logger.warn(A)}}else r+=" if ("+H+" === undefined ","empty"==e.opts.useDefaults&&(r+=" || "+H+" === null || "+H+" === '' "),r+=" ) "+H+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault($.default)+" ":r+=" "+JSON.stringify($.default)+" ",r+="; "}var P,V=S.rules;if(V)for(var F,K=-1,Y=V.length-1;K<Y;)!o(F=V[K+=1])||(F=F.code(e,F.keyword,S.type))&&(r+=" "+F+" ",m&&(v+="}"));m&&(r+=" "+v+" ",v=""),S.type&&(r+=" } ",w&&w===S.type&&!b&&(r+=" else { ",g=e.schemaPath+".type",p=e.errSchemaPath+"/type",(P=P||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",r+=x?""+w.join(","):""+w,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=x?""+w.join(","):""+w,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",L=r,r=P.pop(),!e.compositeRule&&m?e.async?r+=" throw new ValidationError(["+L+"]); ":r+=" validate.errors = ["+L+"]; return false; ":r+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ")),m&&(r+=" if (errors === ",r+=I?"0":"errs_"+d,r+=") { ",y+="}")}}return m&&(r+=" "+y+" "),I?(s?(r+=" if (errors === 0) return data; ",r+=" else throw new ValidationError(vErrors); "):(r+=" validate.errors = vErrors; ",r+=" return errors === 0; "),r+=" }; return validate;"):r+=" var "+C+" = errors === errs_"+d+";",r}},7931:function(e,t,i){"use strict";function n(e,t){n.errors=null;var i=this._validateKeyword=this._validateKeyword||this.compile(s,!0);if(i(e))return!0;if(n.errors=i.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(i.errors));return!1}var o=/^[a-z_$][a-z0-9_$-]*$/i,r=i(1793),s=i(5868);e.exports={add:function(e,t){function i(e,t,i){for(var o,s=0;s<n.length;s++){var a=n[s];if(a.type==t){o=a;break}}o||n.push(o={type:t,rules:[]}),i={keyword:e,definition:i,custom:!0,code:r,implements:i.implements},o.rules.push(i),n.custom[e]=i}var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!o.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var s=t.type;if(Array.isArray(s))for(var a=0;a<s.length;a++)i(e,s[a],t);else i(e,s,t);var l=t.metaSchema;l&&(t.$data&&this._opts.$data&&(l={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(l,!0))}return n.keywords[e]=n.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var i=0;i<t.length;i++)for(var n=t[i].rules,o=0;o<n.length;o++)if(n[o].keyword==e){n.splice(o,1);break}return this},validate:n}},2303:function(e){"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,o,r;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(o=n;0!=o--;)if(!e(t[o],i[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(i,r[o]))return!1;for(o=n;0!=o--;){var s=r[o];if(!e(t[s],i[s]))return!1}return!0}return t!=t&&i!=i}},3508:function(e){"use strict";e.exports=function(e,t){var i,n="boolean"==typeof(t="function"==typeof(t=t||{})?{cmp:t}:t).cycles&&t.cycles,o=t.cmp&&(i=t.cmp,function(e){return function(t,n){return t={key:t,value:e[t]},n={key:n,value:e[n]},i(t,n)}}),r=[];return function e(t){if(void 0!==(t=t&&t.toJSON&&"function"==typeof t.toJSON?t.toJSON():t)){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t)){for(a="[",l=0;l<t.length;l++)l&&(a+=","),a+=e(t[l])||"null";return a+"]"}if(null===t)return"null";if(-1!==r.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var i=r.push(t)-1,s=Object.keys(t).sort(o&&o(t)),a="",l=0;l<s.length;l++){var c=s[l],d=e(t[c]);d&&(a&&(a+=","),a+=JSON.stringify(c)+":"+d)}return r.splice(i,1),"{"+a+"}"}}(e)}},233:function(e){e.exports=function e(t,i){"use strict";function n(t){return e.insensitive&&(""+t).toLowerCase()||""+t}var o,r,s=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,l=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,d=/^0/,t=n(t).replace(a,"")||"",a=n(i).replace(a,"")||"",h=t.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=a.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),t=parseInt(t.match(c),16)||1!==h.length&&t.match(l)&&Date.parse(t),a=parseInt(a.match(c),16)||t&&a.match(l)&&Date.parse(a)||null;if(a){if(t<a)return-1;if(a<t)return 1}for(var g=0,p=Math.max(h.length,u.length);g<p;g++){if(o=!(h[g]||"").match(d)&&parseFloat(h[g])||h[g]||0,r=!(u[g]||"").match(d)&&parseFloat(u[g])||u[g]||0,isNaN(o)!==isNaN(r))return isNaN(o)?1:-1;if(typeof o!=typeof r&&(o+="",r+=""),o<r)return-1;if(r<o)return 1}return 0}},5156:function(e,t){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,o){if(e===o)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(o))return!1;if(!0===t(e)){if(e.length!==o.length)return!1;for(var r=0;r<e.length;r++)if(!1===n(e[r],o[r]))return!1;return!0}if(!0!==i(e))return!1;var s,a,l={};for(s in e)if(hasOwnProperty.call(e,s)){if(!1===n(e[s],o[s]))return!1;l[s]=!0}for(a in o)if(hasOwnProperty.call(o,a)&&!0!==l[a])return!1;return!0}function o(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(i(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}function r(e){return"0"<=e&&e<="9"||"-"===e}function s(){}function a(){}function l(e){this.runtime=e}function c(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[h]}]},avg:{_func:this._functionAvg,_signature:[{types:[C]}]},ceil:{_func:this._functionCeil,_signature:[{types:[h]}]},contains:{_func:this._functionContains,_signature:[{types:[g,p]},{types:[u]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[g]},{types:[g]}]},floor:{_func:this._functionFloor,_signature:[{types:[h]}]},length:{_func:this._functionLength,_signature:[{types:[g,p,m]}]},map:{_func:this._functionMap,_signature:[{types:[f]},{types:[p]}]},max:{_func:this._functionMax,_signature:[{types:[C,I]}]},merge:{_func:this._functionMerge,_signature:[{types:[m],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[p]},{types:[f]}]},sum:{_func:this._functionSum,_signature:[{types:[C]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[g]},{types:[g]}]},min:{_func:this._functionMin,_signature:[{types:[C,I]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[p]},{types:[f]}]},type:{_func:this._functionType,_signature:[{types:[u]}]},keys:{_func:this._functionKeys,_signature:[{types:[m]}]},values:{_func:this._functionValues,_signature:[{types:[m]}]},sort:{_func:this._functionSort,_signature:[{types:[I,C]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[p]},{types:[f]}]},join:{_func:this._functionJoin,_signature:[{types:[g]},{types:[I]}]},reverse:{_func:this._functionReverse,_signature:[{types:[g,p]}]},to_array:{_func:this._functionToArray,_signature:[{types:[u]}]},to_string:{_func:this._functionToString,_signature:[{types:[u]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[u]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[u],variadic:!0}]}}}var d="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]},h=0,u=1,g=2,p=3,m=4,f=6,C=8,I=9,A="UnquotedIdentifier",b="QuotedIdentifier",v="Rbracket",y="Rparen",w="Comma",x="Colon",S="Rbrace",k="Number",T="Current",M="Expref",N="Pipe",R="Flatten",E="Star",L="Filter",j="Lbrace",Z="Lbracket",W="Lparen",O="Literal",D={".":"Dot","*":E,",":w,":":x,"{":j,"}":S,"]":v,"(":W,")":y,"@":T},G={"<":!0,">":!0,"=":!0,"!":!0},B={" ":!0,"\t":!0,"\n":!0};s.prototype={tokenize:function(e){var t,i,n,o=[];for(this._current=0;this._current<e.length;)if("a"<=(n=e[this._current])&&n<="z"||"A"<=n&&n<="Z"||"_"===n)s=this._current,t=this._consumeUnquotedIdentifier(e),o.push({type:A,value:t,start:s});else if(void 0!==D[e[this._current]])o.push({type:D[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(r(e[this._current]))i=this._consumeNumber(e),o.push(i);else if("["===e[this._current])i=this._consumeLBracket(e),o.push(i);else if('"'===e[this._current])s=this._current,t=this._consumeQuotedIdentifier(e),o.push({type:b,value:t,start:s});else if("'"===e[this._current])s=this._current,t=this._consumeRawStringLiteral(e),o.push({type:O,value:t,start:s});else if("`"===e[this._current]){var s=this._current,a=this._consumeLiteral(e);o.push({type:O,value:a,start:s})}else if(void 0!==G[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==B[e[this._current]])this._current++;else if("&"===e[this._current])s=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:"And",value:"&&",start:s})):o.push({type:M,value:"&",start:s});else{if("|"!==e[this._current])throw a=new Error("Unknown character:"+e[this._current]),a.name="LexerError",a;s=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:"Or",value:"||",start:s})):o.push({type:N,value:"|",start:s})}return o},_consumeUnquotedIdentifier:function(e){var t,i=this._current;for(this._current++;this._current<e.length&&("a"<=(t=e[this._current])&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||"_"===t);)this._current++;return e.slice(i,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var i=e.length;'"'!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var i=e.length;"'"!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var i=e.length;r(e[this._current])&&this._current<i;)this._current++;var n=parseInt(e.slice(t,this._current));return{type:k,value:n,start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:L,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:R,value:"[]",start:t}):{type:Z,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,i=e[t];return this._current++,"!"===i?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===i?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===i?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===i&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t=this._current,i=e.length;"`"!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"`"!==e[n+1]?n++:n+=2,this._current=n}var t=(t=d(e.slice(t,this._current))).replace("\\`","`"),t=this._looksLikeJSON(t)?JSON.parse(t):JSON.parse('"'+t+'"');return this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if(0<='[{"'.indexOf(e[0]))return!0;if(0<=["true","false","null"].indexOf(e))return!0;if(!(0<="-0123456789".indexOf(e[0])))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var H={};H.EOF=0,H[A]=0,H[b]=0,H[v]=0,H[y]=0,H[w]=0,H[S]=0,H[k]=0,H[T]=0,H[M]=0,H.Pipe=1,H.Or=2,H.And=3,H.EQ=5,H.GT=5,H.LT=5,H.GTE=5,H.LTE=5,H.NE=5,H[R]=9,H.Star=20,H[L]=21,H.Dot=40,H.Not=45,H[j]=50,H[Z]=55,H[W]=60,a.prototype={parse:function(e){if(this._loadTokens(e),this.index=0,e=this.expression(0),"EOF"===this._lookahead(0))return e;throw e=this._lookaheadToken(0),e=new Error("Unexpected token type: "+e.type+", value: "+e.value),e.name="ParserError",e},_loadTokens:function(e){var t=(new s).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var i=this.nud(t),n=this._lookahead(0);e<H[n];)this._advance(),i=this.led(n,i),n=this._lookahead(0);return i},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,i;switch(e.type){case O:return{type:"Literal",value:e.value};case A:return{type:"Field",name:e.value};case b:var n={type:"Field",name:e.value};if(this._lookahead(0)===W)throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(H.Not)]};case E:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===v?{type:"Identity"}:this._parseProjectionRHS(H.Star)]};case L:return this.led(e.type,{type:"Identity"});case j:return this._parseMultiselectHash();case R:return{type:"Projection",children:[{type:R,children:[{type:"Identity"}]},t=this._parseProjectionRHS(H.Flatten)]};case Z:return this._lookahead(0)===k||this._lookahead(0)===x?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):this._lookahead(0)===E&&this._lookahead(1)===v?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(H.Star)]}):this._parseMultiselectList();case T:return{type:T};case M:return{type:"ExpressionReference",children:[i=this.expression(H.Expref)]};case W:for(var o=[];this._lookahead(0)!==y;)this._lookahead(0)===T?(i={type:T},this._advance()):i=this.expression(0),o.push(i);return this._match(y),o[0];default:this._errorToken(e)}},led:function(e,t){var i;switch(e){case"Dot":var n=H.Dot;return this._lookahead(0)!==E?{type:"Subexpression",children:[t,i=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,i=this._parseProjectionRHS(n)]});case N:return i=this.expression(H.Pipe),{type:N,children:[t,i]};case"Or":return{type:"OrExpression",children:[t,i=this.expression(H.Or)]};case"And":return{type:"AndExpression",children:[t,i=this.expression(H.And)]};case W:for(var o,n=t.name,r=[];this._lookahead(0)!==y;)this._lookahead(0)===T?(o={type:T},this._advance()):o=this.expression(0),this._lookahead(0)===w&&this._match(w),r.push(o);return this._match(y),{type:"Function",name:n,children:r};case L:var s=this.expression(0);return this._match(v),{type:"FilterProjection",children:[t,i=this._lookahead(0)===R?{type:"Identity"}:this._parseProjectionRHS(H.Filter),s]};case R:return{type:"Projection",children:[{type:R,children:[t]},this._parseProjectionRHS(H.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case Z:return s=this._lookaheadToken(0),s.type===k||s.type===x?(i=this._parseIndexExpression(),this._projectIfSlice(t,i)):(this._match(E),this._match(v),{type:"Projection",children:[t,i=this._parseProjectionRHS(H.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),t=new Error("Expected "+e+", got: "+t.type);throw t.name="ParserError",t}this._advance()},_errorToken:function(e){throw e=new Error("Invalid token ("+e.type+'): "'+e.value+'"'),e.name="ParserError",e},_parseIndexExpression:function(){if(this._lookahead(0)===x||this._lookahead(1)===x)return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(v),e},_projectIfSlice:function(e,t){return e={type:"IndexExpression",children:[e,t]},"Slice"===t.type?{type:"Projection",children:[e,this._parseProjectionRHS(H.Star)]}:e},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,i=this._lookahead(0);i!==v&&t<3;){if(i===x)t++,this._advance();else{if(i!==k){var n=this._lookahead(0),n=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw n.name="Parsererror",n}e[t]=this._lookaheadToken(0).value,this._advance()}i=this._lookahead(0)}return this._match(v),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(H[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return 0<=[A,b,E].indexOf(t)?this.expression(e):t===Z?(this._match(Z),this._parseMultiselectList()):t===j?(this._match(j),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(H[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===Z)t=this.expression(e);else if(this._lookahead(0)===L)t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var i=this._lookaheadToken(0),i=new Error("Sytanx error, unexpected token: "+i.value+"("+i.type+")");throw i.name="ParserError",i}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==v;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===w&&(this._match(w),this._lookahead(0)===v))throw new Error("Unexpected token Rbracket")}return this._match(v),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,i=[],n=[A,b];;){if(t=this._lookaheadToken(0),n.indexOf(t.type)<0)throw new Error("Expecting an identifier token, got: "+t.type);if(e=t.value,this._advance(),this._match(x),t=this.expression(0),i.push({type:"KeyValuePair",name:e,value:t}),this._lookahead(0)===w)this._match(w);else if(this._lookahead(0)===S){this._match(S);break}}return{type:"MultiSelectHash",children:i}}},l.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,r){var s,a,l,c,d;switch(e.type){case"Field":return null!==r&&i(r)&&void 0!==(u=r[e.name])?u:null;case"Subexpression":for(m=this.visit(e.children[0],r),A=1;A<e.children.length;A++)if(null===(m=this.visit(e.children[1],m)))return null;return m;case"IndexExpression":return k=this.visit(e.children[0],r),this.visit(e.children[1],k);case"Index":if(!t(r))return null;var h=e.value;return m=void 0===(m=r[h=h<0?r.length+h:h])?null:m;case"Slice":if(!t(r))return null;var u=e.children.slice(0),h=this.computeSliceParams(r.length,u),u=h[0],g=h[1],p=h[2],m=[];if(0<p)for(A=u;A<g;A+=p)m.push(r[A]);else for(A=u;g<A;A+=p)m.push(r[A]);return m;case"Projection":var f=this.visit(e.children[0],r);if(!t(f))return null;for(C=[],A=0;A<f.length;A++)null!==(a=this.visit(e.children[1],f[A]))&&C.push(a);return C;case"ValueProjection":if(!i(f=this.visit(e.children[0],r)))return null;for(var C=[],I=function(e){for(var t=Object.keys(e),i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}(f),A=0;A<I.length;A++)null!==(a=this.visit(e.children[1],I[A]))&&C.push(a);return C;case"FilterProjection":if(!t(f=this.visit(e.children[0],r)))return null;var b=[],v=[];for(A=0;A<f.length;A++)o(s=this.visit(e.children[2],f[A]))||b.push(f[A]);for(var y=0;y<b.length;y++)null!==(a=this.visit(e.children[1],b[y]))&&v.push(a);return v;case"Comparator":switch(l=this.visit(e.children[0],r),c=this.visit(e.children[1],r),e.name){case"EQ":m=n(l,c);break;case"NE":m=!n(l,c);break;case"GT":m=c<l;break;case"GTE":m=c<=l;break;case"LT":m=l<c;break;case"LTE":m=l<=c;break;default:throw new Error("Unknown comparator: "+e.name)}return m;case R:var w=this.visit(e.children[0],r);if(!t(w))return null;var x=[];for(A=0;A<w.length;A++)t(a=w[A])?x.push.apply(x,a):x.push(a);return x;case"Identity":return r;case"MultiSelectList":if(null===r)return null;for(C=[],A=0;A<e.children.length;A++)C.push(this.visit(e.children[A],r));return C;case"MultiSelectHash":if(null===r)return null;for(C={},A=0;A<e.children.length;A++)C[(d=e.children[A]).name]=this.visit(d.value,r);return C;case"OrExpression":return s=o(s=this.visit(e.children[0],r))?this.visit(e.children[1],r):s;case"AndExpression":return!0===o(l=this.visit(e.children[0],r))?l:this.visit(e.children[1],r);case"NotExpression":return o(l=this.visit(e.children[0],r));case"Literal":return e.value;case N:return k=this.visit(e.children[0],r),this.visit(e.children[1],k);case T:return r;case"Function":var S=[];for(A=0;A<e.children.length;A++)S.push(this.visit(e.children[A],r));return this.runtime.callFunction(e.name,S);case"ExpressionReference":var k=e.children[0];return k.jmespathType=M,k;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var i=t[0],n=t[1],o=t[2],t=[null,null,null];if(null===o)o=1;else if(0===o){var r=new Error("Invalid slice, step cannot be 0");throw r.name="RuntimeError",r}return r=o<0,i=null===i?r?e-1:0:this.capSliceRange(e,i,o),n=null===n?r?-1:e:this.capSliceRange(e,n,o),t[0]=i,t[1]=n,t[2]=o,t},capSliceRange:function(e,t,i){return t<0?(t+=e)<0&&(t=i<0?-1:0):e<=t&&(t=i<0?e-1:e),t}},c.prototype={callFunction:function(e,t){var i=this.functionTable[e];if(void 0===i)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,i._signature),i._func.call(this,t)},_validateArgs:function(e,t,i){var n;if(i[i.length-1].variadic){if(t.length<i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+i.length+n+" but received "+t.length)}else if(t.length!==i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+i.length+n+" but received "+t.length);for(var o=0;o<i.length;o++){for(var r=!1,s=i[o].types,a=this._getTypeName(t[o]),l=0;l<s.length;l++)if(this._typeMatches(a,s[l],t[o])){r=!0;break}if(!r)throw new Error("TypeError: "+e+"() expected argument "+(o+1)+" to be type "+s+" but received type "+a+" instead.")}},_typeMatches:function(e,t,i){if(t===u)return!0;if(t!==I&&t!==C&&t!==p)return e===t;if(t===p)return e===p;if(e===p){var n;t===C?n=h:t===I&&(n=g);for(var o=0;o<i.length;o++)if(!this._typeMatches(this._getTypeName(i[o]),n,i[o]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return g;case"[object Number]":return h;case"[object Array]":return p;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return e.jmespathType===M?f:m}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],e=e[1];return-1!==t.indexOf(e,t.length-e.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===g){for(var t=e[0],i="",n=t.length-1;0<=n;n--)i+=t[n];return i}return e=e[0].slice(0),e.reverse(),e},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t/i.length},_functionContains:function(e){return 0<=e[0].indexOf(e[1])},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return(i(e[0])?Object.keys(e[0]):e[0]).length},_functionMap:function(e){for(var t=[],i=this._interpreter,n=e[0],o=e[1],r=0;r<o.length;r++)t.push(i.visit(n,o[r]));return t},_functionMerge:function(e){for(var t={},i=0;i<e.length;i++){var n,o=e[i];for(n in o)t[n]=o[n]}return t},_functionMax:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===h)return Math.max.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)i.localeCompare(t[n])<0&&(i=t[n]);return i}return null},_functionMin:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===h)return Math.min.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)t[n].localeCompare(i)<0&&(i=t[n]);return i}return null},_functionSum:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case h:return"number";case g:return"string";case p:return"array";case m:return"object";case 5:return"boolean";case f:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],i=Object.keys(t),n=[],o=0;o<i.length;o++)n.push(t[i[o]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===p?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===g?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,i=this._getTypeName(e[0]);return i===h?e[0]:i!==g||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){return e=e[0].slice(0),e.sort(),e},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var i=this._interpreter,n=e[1],o=this._getTypeName(i.visit(n,t[0]));if([h,g].indexOf(o)<0)throw new Error("TypeError");for(var r=this,s=[],a=0;a<t.length;a++)s.push([a,t[a]]);s.sort(function(e,t){var s=i.visit(n,e[1]),a=i.visit(n,t[1]);if(r._getTypeName(s)!==o)throw new Error("TypeError: expected "+o+", received "+r._getTypeName(s));if(r._getTypeName(a)!==o)throw new Error("TypeError: expected "+o+", received "+r._getTypeName(a));return a<s?1:s<a?-1:e[0]-t[0]});for(var l=0;l<s.length;l++)t[l]=s[l][1];return t},_functionMaxBy:function(e){for(var t,i,n=e[1],o=e[0],r=this.createKeyFunction(n,[h,g]),s=-1/0,a=0;a<o.length;a++)s<(i=r(o[a]))&&(s=i,t=o[a]);return t},_functionMinBy:function(e){for(var t,i,n=e[1],o=e[0],r=this.createKeyFunction(n,[h,g]),s=1/0,a=0;a<o.length;a++)(i=r(o[a]))<s&&(s=i,t=o[a]);return t},createKeyFunction:function(e,t){var i=this,n=this._interpreter;return function(o){var r=n.visit(e,o);if(t.indexOf(i._getTypeName(r))<0)throw o="TypeError: expected one of "+t+", received "+i._getTypeName(r),new Error(o);return r}}},e.tokenize=function(e){return(new s).tokenize(e)},e.compile=function(e){return(new a).parse(e)},e.search=function(e,t){var i=new a,n=new c,o=new l(n);return n._interpreter=o,t=i.parse(t),o.search(t,e)},e.strictDeepEqual=n}(t)},500:function(e){"use strict";function t(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var i=e.exports=function(e,n,o){"function"==typeof n&&(o=n,n={}),function e(n,o,r,s,a,l,c,d,h,u){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var g in o(s,a,l,c,d,h,u),s){var p=s[g];if(Array.isArray(p)){if(g in i.arrayKeywords)for(var m=0;m<p.length;m++)e(n,o,r,p[m],a+"/"+g+"/"+m,l,a,g,s,m)}else if(g in i.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(n,o,r,p[f],a+"/"+g+"/"+t(f),l,a,g,s,f)}else(g in i.keywords||n.allKeys&&!(g in i.skipKeywords))&&e(n,o,r,p,a+"/"+g,l,a,g,s)}r(s,a,l,c,d,h,u)}}(n,"function"==typeof(o=n.cb||o)?o:o.pre||function(){},o.post||function(){},e,"",e)};i.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},i.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},i.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},i.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},7026:function(e,t){"use strict";function i(e){return 0<=a.indexOf(typeof e)}function n(e){return'"'+(e=e.replace(l,"\\$&").replace(d,"\\f").replace(c,"\\b").replace(h,"\\n").replace(u,"\\r").replace(g,"\\t"))+'"'}function o(e){return e.replace(p,"~0").replace(m,"~1")}var r={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},s="a".charCodeAt();t.parse=function(e,t,i){function n(t,i){var r;a(),g(t,"value");var s=d();switch(s){case"t":c("rue"),r=!0;break;case"f":c("alse"),r=!1;break;case"n":c("ull"),r=null;break;case'"':r=l();break;case"[":r=function(e){a();var t=[],i=0;if("]"==d())return t;for(h();;){var o=e+"/"+i;if(t.push(n(o)),a(),"]"==(o=d()))break;","!=o&&C(),a(),i++}return t}(t);break;case"{":r=function(e){a();var t={};if("}"==d())return t;for(h();;){var i=m();'"'!=d()&&C();var r=l(),s=e+"/"+o(r);if(p(s,"key",i),g(s,"keyEnd"),a(),":"!=d()&&C(),a(),t[r]=n(s),a(),"}"==(s=d()))break;","!=s&&C(),a()}return t}(t);break;default:h(),0<="-0123456789".indexOf(s)?r=function(){var t="",i=!0;"-"==e[y]&&(t+=d()),t+=("0"==e[y]?d:u)(),"."==e[y]&&(t+=d()+u(),i=!1),"e"!=e[y]&&"E"!=e[y]||(t+=d(),"+"!=e[y]&&"-"!=e[y]||(t+=d()),t+=u(),i=!1);var n=+t;return w&&i&&(n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)?BigInt(t):n}():f()}return g(t,"valueEnd"),a(),i&&y<e.length&&f(),r}function a(){e:for(;y<e.length;){switch(e[y]){case" ":v++;break;case"\t":v+=4;break;case"\r":v=0;break;case"\n":v=0,b++;break;default:break e}y++}}function l(){for(var e,t="";'"'!=(e=d());)"\\"==e?(e=d())in r?t+=r[e]:"u"==e?t+=function(){for(var e=4,t=0;e--;){t<<=4;var i=d().toLowerCase();"a"<=i&&i<="f"?t+=i.charCodeAt()-s+10:"0"<=i&&i<="9"?t+=+i:C()}return String.fromCharCode(t)}():C():t+=e;return t}function c(e){for(var t=0;t<e.length;t++)d()!==e[t]&&C()}function d(){I();var t=e[y];return y++,v++,t}function h(){y--,v--}function u(){for(var t="";"0"<=e[y]&&e[y]<="9";)t+=d();if(t.length)return t;I(),f()}function g(e,t){p(e,t,m())}function p(e,t,i){A[e]=A[e]||{},A[e][t]=i}function m(){return{line:b,column:v,pos:y}}function f(){throw new SyntaxError("Unexpected token "+e[y]+" in JSON at position "+y)}function C(){h(),f()}function I(){if(y>=e.length)throw new SyntaxError("Unexpected end of JSON input")}var A={},b=0,v=0,y=0,w=i&&i.bigint&&"undefined"!=typeof BigInt;return{data:n("",!0),pointers:A}},t.stringify=function(e,t,r){function s(e){A+=e.length,b+=e.length,f+=e}function a(e){if(u){for(f+="\n"+c(e,u),I++,A=0;e--;)d?(I+=d,A=p):A+=p,b+=g;b+=1}}function l(e,t){C[e]=C[e]||{},C[e][t]={line:I,column:A,pos:b}}function c(e,t){return Array(e+1).join(t)}if(i(e)){var d=0;switch(typeof(u="object"==typeof r?r.space:r)){case"number":var h=10<u?10:u<0?0:Math.floor(u),u=h&&c(h," "),g=h,p=h;break;case"string":u=u.slice(0,10);for(var m=p=g=0;m<u.length;m++){switch(u[m]){case" ":p++;break;case"\t":p+=4;break;case"\r":p=0;break;case"\n":p=0,d++;break;default:throw new Error("whitespace characters not allowed in JSON")}g++}break;default:u=void 0}var f="",C={},I=0,A=0,b=0,v=r&&r.es6&&"function"==typeof Map;return function e(t,r,c){function d(){if(t.length){s("[");for(var n=r+1,o=0;o<t.length;o++){o&&s(","),a(n);var l=i(t[o])?t[o]:null;e(l,n,c+"/"+o)}a(r),s("]")}else s("[]")}function h(){var d=Object.keys(t);if(d.length){s("{");for(var h=r+1,g=0;g<d.length;g++){var p,m=d[g],f=t[m];i(f)&&(g&&s(","),p=c+"/"+o(m),a(h),l(p,"key"),s(n(m)),l(p,"keyEnd"),s(":"),u&&s(" "),e(f,h,p))}a(r),s("}")}else s("{}")}function g(d){if(t.size){s("{");for(var h=r+1,g=!0,p=t.entries(),m=p.next();!m.done;){var f=m.value,C=f[0],I=!!d||f[1];i(I)&&(g||s(","),g=!1,f=c+"/"+o(C),a(h),l(f,"key"),s(n(C)),l(f,"keyEnd"),s(":"),u&&s(" "),e(I,h,f)),m=p.next()}a(r),s("}")}else s("{}")}switch(l(c,"value"),typeof t){case"number":case"bigint":case"boolean":s(""+t);break;case"string":s(n(t));break;case"object":null===t?s("null"):"function"==typeof t.toJSON?s(n(t.toJSON())):Array.isArray(t)?d():v?t.constructor.BYTES_PER_ELEMENT?d():t instanceof Map?g():t instanceof Set?g(!0):h():h()}l(c,"valueEnd")}(e,0,""),{json:f,pointers:C}}};var a=["number","bigint","boolean","string","object"],l=/"|\\/g,c=/[\b]/g,d=/\f/g,h=/\n/g,u=/\r/g,g=/\t/g,p=/~/g,m=/\//g},5755:function(e,t){"use strict";function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this.message=e+" (char "+t+")",this.char=t,this.stack=(new Error).stack}Object.defineProperty(t,"__esModule",{value:!0}),((t.default=i).prototype=new Error).constructor=Error},8909:function(e,t,i){e.exports=i(8107).default},8107:function(e,t,i){"use strict";function n(){T++,M=S.charAt(T)}function o(){n(),"\\"===M&&n()}function r(){return R===g&&("["===N||"{"===N)||R===m||R===p||R===f}function s(){k+=N,R=A,N="",b[M]?(R=g,N=M,n()):function(){if((0,u.isDigit)(M)||"-"===M){if(R=p,"-"===M){if(N+=M,n(),!(0,u.isDigit)(M))throw new h.default("Invalid number, digit expected",T)}else"0"===M&&(N+=M,n());for(;(0,u.isDigit)(M);)N+=M,n();if("."===M){if(N+=M,n(),!(0,u.isDigit)(M))throw new h.default("Invalid number, digit expected",T);for(;(0,u.isDigit)(M);)N+=M,n()}if("e"===M||"E"===M){if(N+=M,n(),"+"!==M&&"-"!==M||(N+=M,n()),!(0,u.isDigit)(M))throw new h.default("Invalid number, digit expected",T);for(;(0,u.isDigit)(M);)N+=M,n()}}else"\\"===M&&'"'===S.charAt(T+1)?(n(),l(o)):l(n)}(),R===C&&(N=(0,u.normalizeWhitespace)(N),s()),R===I&&(R=A,N="",s())}function a(){","===N&&(N="",R=A,s())}function l(e){if((0,u.isQuote)(M)){var t=(0,u.normalizeQuote)(M),i=(0,u.isSingleQuote)(M)?u.isSingleQuote:u.isDoubleQuote;for(N+='"',R=m,e();""!==M&&!i(M);)if("\\"===M)if(e(),void 0!==v[M])N+="\\"+M,e();else if("u"===M){N+="\\u",e();for(var o=0;o<4;o++){if(!(0,u.isHex)(M))throw new h.default("Invalid unicode character",T-N.length);N+=M,e()}}else{if("'"!==M)throw new h.default('Invalid escape character "\\'+M+'"',T);N+="'",e()}else y[M]?N+=y[M]:N+='"'===M?'\\"':M,e();if((0,u.normalizeQuote)(M)!==t)throw new h.default("End of string expected",T-N.length);return N+='"',void e()}!function(){if((0,u.isAlpha)(M))for(R=f;(0,u.isAlpha)(M)||(0,u.isDigit)(M)||"$"===M;)N+=M,n();else!function(){if((0,u.isWhitespace)(M)||(0,u.isSpecialWhitespace)(M))for(R=C;(0,u.isWhitespace)(M)||(0,u.isSpecialWhitespace)(M);)N+=M,n();else!function(){if("/"!==M||"*"!==S[T+1])if("/"!==M||"/"!==S[T+1])!function(){for(R=A;""!==M;)N+=M,n();throw new h.default('Syntax error in part "'+N+'"',T-N.length)}();else for(R=I;""!==M&&"\n"!==M;)N+=M,n();else{for(R=I;""!==M&&("*"!==M||"*"===M&&"/"!==S[T+1]);)N+=M,n();"*"===M&&"/"===S[T+1]&&(N+=M,n(),N+=M,n())}}()}()}()}function c(){if(R!==g||"{"!==N)!function(){if(R!==g||"["!==N)!function(){if(R!==m)(R!==p?function(){if(R!==f)!function(){throw""===N?new h.default("Unexpected end of json string",T-N.length):new h.default("Value expected",T-N.length)}();else if(w[N])s();else{if(x[N])return N=x[N],s();var e=N,t=k.length;if(N="",s(),R===g&&"("===N)return N="",s(),c(),R===g&&")"===N&&(N="",s(),R===g&&";"===N&&(N="",s()));for(k=(0,u.insertAtIndex)(k,'"'.concat(e),t);R===f||R===p;)s();k+='"'}}:s)();else for(s();R===g&&"+"===N;){var e;N="",s(),R===m&&(e=k.lastIndexOf('"'),k=k.substring(0,e)+N.substring(1),N="",s())}}();else if(s(),R!==g||"]"!==N){for(;;)if(c(),R===g&&","===N){if(s(),R===g&&"]"===N){k=(0,u.stripLastOccurrence)(k,",");break}if(""===N){k=(0,u.stripLastOccurrence)(k,",");break}}else{if(!r())break;k=(0,u.insertBeforeLastWhitespace)(k,",")}R===g&&"]"===N?s():k=(0,u.insertBeforeLastWhitespace)(k,"]")}else s()}();else if(s(),R!==g||"}"!==N){for(;;){if(R!==f&&R!==p||(R=m,N='"'.concat(N,'"')),R!==m)throw new h.default("Object key expected",T-N.length);if(s(),R===g&&":"===N)s();else{if(!r())throw new h.default("Colon expected",T-N.length);k=(0,u.insertBeforeLastWhitespace)(k,":")}if(c(),R===g&&","===N){if(s(),R===g&&"}"===N){k=(0,u.stripLastOccurrence)(k,",");break}if(""===N){k=(0,u.stripLastOccurrence)(k,",");break}}else{if(R!==m&&R!==p&&R!==f)break;k=(0,u.insertBeforeLastWhitespace)(k,",")}}R===g&&"}"===N?s():k=(0,u.insertBeforeLastWhitespace)(k,"}")}else s()}t.default=function(e){k="",T=0,M=(S=e).charAt(0),N="",R=A,s();var t=R;if(c(),a(),""===N)return k;if(t===R&&r()){for(var i="";t===R&&r();)k=(0,u.insertBeforeLastWhitespace)(k,","),i+=k,k="",c(),a();return"[\n".concat(i).concat(k,"\n]")}throw new h.default("Unexpected characters",T-N.length)};var d,h=(d=i(5755))&&d.__esModule?d:{default:d},u=i(1536),g=0,p=1,m=2,f=3,C=4,I=5,A=6,b={"":!0,"{":!0,"}":!0,"[":!0,"]":!0,":":!0,",":!0,"(":!0,")":!0,";":!0,"+":!0},v={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},y={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},w={null:"null",true:"true",false:"false"},x={None:"null",True:"true",False:"false"},S="",k="",T=0,M="",N="",R=A},1536:function(e,t){"use strict";function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function n(e){return" "===e||" "<=e&&e<=" "||" "===e||" "===e||" "===e}Object.defineProperty(t,"__esModule",{value:!0}),t.isAlpha=function(e){return s.test(e)},t.isHex=function(e){return a.test(e)},t.isDigit=function(e){return l.test(e)},t.isWhitespace=i,t.isSpecialWhitespace=n,t.normalizeWhitespace=function(e){for(var t="",i=0;i<e.length;i++){var o=e[i];t+=n(o)?" ":o}return t},t.isQuote=function(e){return!0===o[e]||!0===r[e]},t.isSingleQuote=function(e){return!0===o[e]},t.isDoubleQuote=function(e){return!0===r[e]},t.normalizeQuote=function(e){return!0!==o[e]?!0!==r[e]?e:'"':"'"},t.stripLastOccurrence=function(e,t){return t=e.lastIndexOf(t),-1!==t?e.substring(0,t)+e.substring(t+1):e},t.insertBeforeLastWhitespace=function(e,t){var n=e.length;if(!i(e[n-1]))return e+t;for(;i(e[n-1]);)n--;return e.substring(0,n)+t+e.substring(n)},t.insertAtIndex=function(e,t,i){return e.substring(0,i)+t+e.substring(i)};var o={"'":!0,"‘":!0,"’":!0,"`":!0,"´":!0},r={'"':!0,"“":!0,"”":!0},s=/^[a-zA-Z_]$/,a=/^[0-9a-fA-F]$/,l=/^[0-9]$/},483:function(e,t){var i,n;!function(){"use strict";i=[],void 0===(n="function"==typeof(n=function(){function e(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType}function t(e){return"string"==typeof e}function i(){var e=[];return{watch:e.push.bind(e),trigger:function(t,i){for(var n=!0,o={detail:i,preventDefault:function(){n=!1}},r=0;r<e.length;r++)e[r](t,o);return n}}}function n(e){return"none"===window.getComputedStyle(e).display}function o(e){this.elem=e}function r(e,t){return o.make(e("parent")).clazz("pico-overlay").clazz(e("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(e("overlayStyles",{opacity:.5,background:"#000"})).onClick(function(){e("overlayClose",!0)&&t()})}function s(e,t){var i=e("width","auto");"number"==typeof i&&(i+="px");var n=e("modalId","pico-"+h++);return o.make(e("parent")).clazz("pico-content").clazz(e("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:i,"-ms-transform":"translate(-50%,-38.1966%)","-moz-transform":"translate(-50%,-38.1966%)","-webkit-transform":"translate(-50%,-38.1966%)","-o-transform":"translate(-50%,-38.1966%)",transform:"translate(-50%,-38.1966%)"}).stylize(e("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(e("content")).attr("id",n).attr("role","dialog").attr("aria-labelledby",e("ariaLabelledBy")).attr("aria-describedby",e("ariaDescribedBy",n)).onClick(function(e){new o(e.target).anyAncestor(function(e){return/\bpico-close\b/.test(e.elem.className)})&&t()})}function a(e,t){if(t("closeButton",!0))return e.child("button").html(t("closeHtml","×")).clazz("pico-close").clazz(t("closeClass","")).stylize(t("closeStyles",{borderRadius:"2px",border:0,padding:0,cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})).attr("aria-label",t("close-label","Close"))}function l(e){return function(){return e().elem}}function c(e,t){function i(e,t){return(e.msMatchesSelector||e.webkitMatchesSelector||e.matches).call(e,t)}function o(e){return!(n(e)||i(e,":disabled")||e.hasAttribute("contenteditable"))&&(e.hasAttribute("tabindex")||i(e,"input,select,textarea,button,a[href],area[href],iframe"))}function r(e){for(var t=e.getElementsByTagName("*"),i=0;i<t.length;i++)if(o(t[i]))return t[i]}function s(e){for(var t=e.getElementsByTagName("*"),i=t.length;i--;)if(o(t[i]))return t[i]}var a;e.beforeShow(function(){a=document.activeElement}),e.afterShow(function(){if(t()){var i=r(e.modalElem());i&&i.focus()}}),e.afterClose(function(){t()&&a&&a.focus(),a=null}),g.watch(function(i){if(t()&&e.isVisible()){var n=r(e.modalElem()),o=s(e.modalElem());(i.shiftKey?n:o)===document.activeElement&&((i.shiftKey?o:n).focus(),i.preventDefault())}})}function d(e,t){var i,n=new o(document.body);e.beforeShow(function(){i=n.elem.style.overflow,t()&&n.stylize({overflow:"hidden"})}),e.afterClose(function(){n.stylize({overflow:i})})}o.make=function(e,t){"string"==typeof e&&(e=document.querySelector(e));var i=document.createElement(t||"div");return(e||document.body).appendChild(i),new o(i)},o.prototype={child:function(e){return o.make(this.elem,e)},stylize:function(e){e=e||{},void 0!==e.opacity&&(e.filter="alpha(opacity="+100*e.opacity+")");for(var t in e)e.hasOwnProperty(t)&&(this.elem.style[t]=e[t]);return this},clazz:function(e){return this.elem.className+=" "+e,this},html:function(t){return e(t)?this.elem.appendChild(t):this.elem.innerHTML=t,this},onClick:function(e){return this.elem.addEventListener("click",e),this},destroy:function(){this.elem.parentNode.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(e,t){return void 0!==t&&this.elem.setAttribute(e,t),this},anyAncestor:function(e){for(var t=this.elem;t;){if(e(new o(t)))return!0;t=t.parentNode}return!1},isVisible:function(){return!n(this.elem)}};var h=1,u=i(),g=i();return document.documentElement.addEventListener("keydown",function(e){var t=e.which||e.keyCode;27===t?u.trigger():9===t&&g.trigger(e)}),function(n){function o(e,t){var i=n[e];return"function"==typeof i&&(i=i(t)),void 0===i?t:i}function h(e){x().hide(),w().hide(),y.trigger(f,e)}function g(e){v.trigger(f,e)&&h(e)}function p(e){return function(){return e.apply(this,arguments),f}}function m(e,t){if(!C){var i=s(o,g);C={modal:i,overlay:r(o,g),close:a(i,o)},I.trigger(f,t)}return C[e]}(t(n)||e(n))&&(n={content:n});var f,C,I=i(),A=i(),b=i(),v=i(),y=i(),w=m.bind(window,"modal"),x=m.bind(window,"overlay"),S=m.bind(window,"close");return f={modalElem:l(w),closeElem:l(S),overlayElem:l(x),buildDom:p(m.bind(null,null)),isVisible:function(){return!!(C&&w&&w().isVisible())},show:function(e){return A.trigger(f,e)&&(x().show(),S(),w().show(),b.trigger(f,e)),this},close:p(g),forceClose:p(h),destroy:function(){w().destroy(),x().destroy(),x=w=S=void 0},options:function(e){Object.keys(e).map(function(t){n[t]=e[t]})},afterCreate:p(I.watch),beforeShow:p(A.watch),afterShow:p(b.watch),beforeClose:p(v.watch),afterClose:p(y.watch)},c(f,o.bind(null,"focus",!0)),d(f,o.bind(null,"bodyOverflow",!0)),u.watch(function(){o("escCloses",!0)&&f.isVisible()&&f.close()}),f}})?n.apply(t,i):n)||(e.exports=n)}()},7533:function(e,t){/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
||
!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function i(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function r(e){return void 0!==e&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function s(e,t){var i=e;if(t)for(var n in t)i[n]=t[n];return i}function a(e){var n="[A-Za-z]",o="[0-9]",r=t(o,"[A-Fa-f]"),s=i(i("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+i("%[89A-Fa-f]"+r+"%"+r+r)+"|"+i("%"+r+r)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",d=e?"[\\uE000-\\uF8FF]":"[]",h=t(n,o,"[\\-\\.\\_\\~]",c),u=i(n+t(n,o,"[\\+\\-\\.]")+"*"),g=i(i(s+"|"+t(h,a,"[\\:]"))+"*"),p=(i(i("25[0-5]")+"|"+i("2[0-4]"+o)+"|"+i("1"+o+o)+"|"+i("[1-9]"+o)+"|"+o),i(i("25[0-5]")+"|"+i("2[0-4]"+o)+"|"+i("1"+o+o)+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"+W+H)+"|"+_+"|"+$+"|"+P),J=i(X+i("\\?"+V)+"?"+i("\\#"+F)+"?");i(Y+"|"+J),i(u+"\\:"+K+i("\\?"+V)+"?"),i(i("\\/\\/("+i("("+g+")@")+"?("+j+")"+i("\\:("+Z+")")+"?)")+"?("+H+"|"+_+"|"+z+"|"+P+")"),i("\\?("+V+")"),i("\\#("+F+")"),i(i("\\/\\/("+i("("+g+")@")+"?("+j+")"+i("\\:("+Z+")")+"?)")+"?("+H+"|"+_+"|"+$+"|"+P+")"),i("\\?("+V+")"),i("\\#("+F+")"),i(i("\\/\\/("+i("("+g+")@")+"?("+j+")"+i("\\:("+Z+")")+"?)")+"?("+H+"|"+_+"|"+z+"|"+P+")"),i("\\?("+V+")"),i("\\#("+F+")"),i("("+g+")@"),i("\\:("+Z+")");return{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",h,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",h,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",h,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",h,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",h,a,"[\\:\\@\\/\\?]",d),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",h,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",h,a),"g"),UNRESERVED:new RegExp(h,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",h,l),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+m+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+i(i("\\%25|\\%(?!"+r+"{2})")+"("+M+")")+"?\\]?$")}}function l(e){throw new RangeError(B[e])}function c(e,t){for(var i=[],n=e.length;n--;)i[n]=t(e[n]);return i}function d(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),e=e.replace(G,"."),n+c(e.split("."),t).join(".")}function h(e){for(var t=[],i=0,n=e.length;i<n;){var o=e.charCodeAt(i++);if(o>=55296&&o<=56319&&i<n){var r=e.charCodeAt(i++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),i--)}else t.push(o)}return t}function u(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function g(e){for(var t="",i=0,n=e.length;i<n;){var o=parseInt(e.substr(i+1,2),16);if(o<128)t+=String.fromCharCode(o),i+=3;else if(o>=194&&o<224){if(n-i>=6){var r=parseInt(e.substr(i+4,2),16);t+=String.fromCharCode((31&o)<<6|63&r)}else t+=e.substr(i,6);i+=6}else if(o>=224){if(n-i>=9){var s=parseInt(e.substr(i+4,2),16),a=parseInt(e.substr(i+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&s)<<6|63&a)}else t+=e.substr(i,9);i+=9}else t+=e.substr(i,3),i+=3}return t}function p(e,t){function i(e){var i=g(e);return i.match(t.UNRESERVED)?i:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,i).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,i).replace(t.NOT_USERINFO,u).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,i).toLowerCase().replace(t.NOT_HOST,u).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,i).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,u).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,i).replace(t.NOT_QUERY,u).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,i).replace(t.NOT_FRAGMENT,u).replace(t.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function f(e,t){var i=e.match(t.IPV4ADDRESS)||[],n=L(i,2),o=n[1];return o?o.split(".").map(m).join("."):e}function C(e,t){var i=e.match(t.IPV6ADDRESS)||[],n=L(i,3),o=n[1],r=n[2];if(o){for(var s=o.toLowerCase().split("::").reverse(),a=L(s,2),l=a[0],c=a[1],d=c?c.split(":").map(m):[],h=l.split(":").map(m),u=t.IPV4ADDRESS.test(h[h.length-1]),g=u?7:8,p=h.length-g,C=Array(g),I=0;I<g;++I)C[I]=d[I]||h[p+I]||"";u&&(C[g-1]=f(C[g-1],t));var A=C.reduce(function(e,t,i){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===i?n.length++:e.push({index:i,length:1})}return e},[]),b=A.sort(function(e,t){return t.length-e.length})[0],v=void 0;if(b&&b.length>1){var y=C.slice(0,b.index),w=C.slice(b.index+b.length);v=y.join(":")+"::"+w.join(":")}else v=C.join(":");return r&&(v+="%"+r),v}return e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={},n=!1!==t.iri?E:R;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(X);if(o){J?(i.scheme=o[1],i.userinfo=o[3],i.host=o[4],i.port=parseInt(o[5],10),i.path=o[6]||"",i.query=o[7],i.fragment=o[8],isNaN(i.port)&&(i.port=o[5])):(i.scheme=o[1]||void 0,i.userinfo=-1!==e.indexOf("@")?o[3]:void 0,i.host=-1!==e.indexOf("//")?o[4]:void 0,i.port=parseInt(o[5],10),i.path=o[6]||"",i.query=-1!==e.indexOf("?")?o[7]:void 0,i.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(i.port)&&(i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),i.host&&(i.host=C(f(i.host,n),n)),void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||i.path||void 0!==i.query?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==i.reference&&(i.error=i.error||"URI is not a "+t.reference+" reference.");var r=Y[(t.scheme||i.scheme||"").toLowerCase()];if(t.unicodeSupport||r&&r.unicodeSupport)p(i,n);else{if(i.host&&(t.domainHost||r&&r.domainHost))try{i.host=K.toASCII(i.host.replace(n.PCT_ENCODED,g).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}p(i,R)}r&&r.parse&&r.parse(i,t)}else i.error=i.error||"URI can not be parsed.";return i}function A(e,t){var i=!1!==t.iri?E:R,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(C(f(String(e.host),i),i).replace(i.IPV6ADDRESS,function(e,t,i){return"["+t+(i?"%25"+i:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}function b(e){for(var t=[];e.length;)if(e.match(U))e=e.replace(U,"");else if(e.match(Q))e=e.replace(Q,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var i=e.match(ee);if(!i)throw new Error("Unexpected dot segment condition");var n=i[0];e=e.slice(n.length),t.push(n)}return t.join("")}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.iri?E:R,n=[],o=Y[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(i.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?K.toUnicode(e.host):K.toASCII(e.host.replace(i.PCT_ENCODED,g).toLowerCase())}catch(i){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+i}p(e,i),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var r=A(e,t);if(void 0!==r&&("suffix"!==t.reference&&n.push("//"),n.push(r),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var s=e.path;t.absolutePath||o&&o.absolutePath||(s=b(s)),void 0===r&&(s=s.replace(/^\/\//,"/%2F")),n.push(s)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function y(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],o={};return n||(e=I(v(e,i),i),t=I(v(t,i),i)),i=i||{},!i.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=b(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=b(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=b(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=b(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function w(e,t,i){var n=s({scheme:"null"},i);return v(y(I(e,n),I(t,n),n,!0),n)}function x(e,t){return"string"==typeof e?e=v(I(e,t),t):"object"===n(e)&&(e=I(v(e,t),t)),e}function S(e,t,i){return"string"==typeof e?e=v(I(e,i),i):"object"===n(e)&&(e=v(e,i)),"string"==typeof t?t=v(I(t,i),i):"object"===n(t)&&(t=v(t,i)),e===t}function k(e,t){return e&&e.toString().replace(t&&t.iri?E.ESCAPE:R.ESCAPE,u)}function T(e,t){return e&&e.toString().replace(t&&t.iri?E.PCT_ENCODED:R.PCT_ENCODED,g)}function M(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function N(e){var t=g(e);return t.match(de)?t:e}var R=a(!1),E=a(!0),L=function(){function e(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),j=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)},Z=2147483647,W=36,O=/^xn--/,D=/[^\0-\x7E]/,G=/[\x2E\u3002\uFF0E\uFF61]/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=Math.floor,_=String.fromCharCode,$=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:W},z=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},P=function(e,t,i){var n=0;for(e=i?H(e/700):e>>1,e+=H(e/t);e>455;n+=W)e=H(e/35);return H(n+36*e/(e+38))},V=function(e){var t=[],i=e.length,n=0,o=128,r=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var a=0;a<s;++a)e.charCodeAt(a)>=128&&l("not-basic"),t.push(e.charCodeAt(a));for(var c=s>0?s+1:0;c<i;){for(var d=n,h=1,u=W;;u+=W){c>=i&&l("invalid-input");var g=$(e.charCodeAt(c++));(g>=W||g>H((Z-n)/h))&&l("overflow"),n+=g*h;var p=u<=r?1:u>=r+26?26:u-r;if(g<p)break;var m=W-p;h>H(Z/m)&&l("overflow"),h*=m}var f=t.length+1;r=P(n-d,f,0==d),H(n/f)>Z-o&&l("overflow"),o+=H(n/f),n%=f,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},F=function(e){var t=[];e=h(e);var i=e.length,n=128,o=0,r=72,s=!0,a=!1,c=void 0;try{for(var d,u=e[Symbol.iterator]();!(s=(d=u.next()).done);s=!0){var g=d.value;g<128&&t.push(_(g))}}catch(e){a=!0,c=e}finally{try{!s&&u.return&&u.return()}finally{if(a)throw c}}var p=t.length,m=p;for(p&&t.push("-");m<i;){var f=Z,C=!0,I=!1,A=void 0;try{for(var b,v=e[Symbol.iterator]();!(C=(b=v.next()).done);C=!0){var y=b.value;y>=n&&y<f&&(f=y)}}catch(e){I=!0,A=e}finally{try{!C&&v.return&&v.return()}finally{if(I)throw A}}var w=m+1;f-n>H((Z-o)/w)&&l("overflow"),o+=(f-n)*w,n=f;var x=!0,S=!1,k=void 0;try{for(var T,M=e[Symbol.iterator]();!(x=(T=M.next()).done);x=!0){var N=T.value;if(N<n&&++o>Z&&l("overflow"),N==n){for(var R=o,E=W;;E+=W){var L=E<=r?1:E>=r+26?26:E-r;if(R<L)break;var j=R-L,O=W-L;t.push(_(z(L+j%O,0))),R=H(j/O)}t.push(_(z(R,0))),r=P(o,w,m==p),o=0,++m}}}catch(e){S=!0,k=e}finally{try{!x&&M.return&&M.return()}finally{if(S)throw k}}++o,++n}return t.join("")},K={version:"2.1.0",ucs2:{decode:h,encode:function(e){return String.fromCodePoint.apply(String,j(e))}},decode:V,encode:F,toASCII:function(e){return d(e,function(e){return D.test(e)?"xn--"+F(e):e})},toUnicode:function(e){return d(e,function(e){return O.test(e)?V(e.slice(4).toLowerCase()):e})}},Y={},X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,J=void 0==="".match(/(){0}/)[1],U=/^\.\.?\//,Q=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/,te={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var i="https"===String(e.scheme).toLowerCase();return e.port!==(i?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ie={scheme:"https",domainHost:te.domainHost,parse:te.parse,serialize:te.serialize},ne={scheme:"ws",domainHost:!0,parse:function(e,t){var i=e;return i.secure=M(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i},serialize:function(e,t){if(e.port!==(M(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var i=e.resourceName.split("?"),n=L(i,2),o=n[0],r=n[1];e.path=o&&"/"!==o?o:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},oe={scheme:"wss",domainHost:ne.domainHost,parse:ne.parse,serialize:ne.serialize},re={},se="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ae="[0-9A-Fa-f]",le=i(i("%[EFef]"+ae+"%"+ae+ae+"%"+ae+ae)+"|"+i("%[89A-Fa-f]"+ae+"%"+ae+ae)+"|"+i("%"+ae+ae)),ce=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),de=new RegExp(se,"g"),he=new RegExp(le,"g"),ue=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ce),"g"),ge=new RegExp(t("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),pe=ge,me={scheme:"mailto",parse:function(e,t){var i=e,n=i.to=i.path?i.path.split(","):[];if(i.path=void 0,i.query){for(var o=!1,r={},s=i.query.split("&"),a=0,l=s.length;a<l;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var d=c[1].split(","),h=0,u=d.length;h<u;++h)n.push(d[h]);break;case"subject":i.subject=T(c[1],t);break;case"body":i.body=T(c[1],t);break;default:o=!0,r[T(c[0],t)]=T(c[1],t)}}o&&(i.headers=r)}i.query=void 0;for(var g=0,p=n.length;g<p;++g){var m=n[g].split("@");if(m[0]=T(m[0]),t.unicodeSupport)m[1]=T(m[1],t).toLowerCase();else try{m[1]=K.toASCII(T(m[1],t).toLowerCase())}catch(e){i.error=i.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[g]=m.join("@")}return i},serialize:function(e,t){var i=e,n=r(e.to);if(n){for(var s=0,a=n.length;s<a;++s){var l=String(n[s]),c=l.lastIndexOf("@"),d=l.slice(0,c).replace(he,N).replace(he,o).replace(ue,u),h=l.slice(c+1);try{h=t.iri?K.toUnicode(h):K.toASCII(T(h,t).toLowerCase())}catch(e){i.error=i.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[s]=d+"@"+h}i.path=n.join(",")}var g=e.headers=e.headers||{};e.subject&&(g.subject=e.subject),e.body&&(g.body=e.body);var p=[];for(var m in g)g[m]!==re[m]&&p.push(m.replace(he,N).replace(he,o).replace(ge,u)+"="+g[m].replace(he,N).replace(he,o).replace(pe,u));return p.length&&(i.query=p.join("&")),i}},fe=/^([^\:]+)\:(.*)/,Ce={scheme:"urn",parse:function(e,t){var i=e.path&&e.path.match(fe),n=e;if(i){var o=t.scheme||n.scheme||"urn",r=i[1].toLowerCase(),s=i[2],a=o+":"+(t.nid||r),l=Y[a];n.nid=r,n.nss=s,n.path=void 0,l&&(n=l.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var i=t.scheme||e.scheme||"urn",n=e.nid,o=i+":"+(t.nid||n),r=Y[o];r&&(e=r.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ae={scheme:"urn:uuid",parse:function(e,t){var i=e;return i.uuid=i.nss,i.nss=void 0,t.tolerant||i.uuid&&i.uuid.match(Ie)||(i.error=i.error||"UUID is not valid."),i},serialize:function(e,t){var i=e;return i.nss=(e.uuid||"").toLowerCase(),i}};Y[te.scheme]=te,Y[ie.scheme]=ie,Y[ne.scheme]=ne,Y[oe.scheme]=oe,Y[me.scheme]=me,Y[Ce.scheme]=Ce,Y[Ae.scheme]=Ae,e.SCHEMES=Y,e.pctEncChar=u,e.pctDecChars=g,e.parse=I,e.removeDotSegments=b,e.serialize=v,e.resolveComponents=y,e.resolve=w,e.normalize=x,e.equal=S,e.escapeComponent=k,e.unescapeComponent=T,Object.defineProperty(e,"__esModule",{value:!0})}(t)},4049:function(e){e.exports=function(){"use strict";function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}function t(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function i(e,t,i){function n(e,t,i){return Math.max(t,Math.min(e,i))}function o(e,o,r){if(r&&(a=!0),a){e.preventDefault();var s=t.getBoundingClientRect(),l=s.width,c=s.height,d=o.clientX,h=o.clientY,u=n(d-s.left,0,l),g=n(h-s.top,0,c);i(u/l,g/c)}}function r(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):a=!1}function s(e,t){1===e.touches.length?o(e,e.touches[0],t):a=!1}var a=!1;e.add(t,"mousedown",function(e){r(e,!0)}),e.add(t,"touchstart",function(e){s(e,!0)}),e.add(window,"mousemove",r),e.add(t,"touchmove",s),e.add(window,"mouseup",function(e){a=!1}),e.add(t,"touchend",function(e){a=!1}),e.add(t,"touchcancel",function(e){a=!1})}function n(e,t){return(t||document).querySelector(e)}function o(e){e.preventDefault(),e.stopPropagation()}function r(e,t,i,n,r){e.add(t,u,function(e){i.indexOf(e.key)>=0&&(r&&o(e),n(e))})}var s=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),l=function(){function e(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var i=this;i.length<e;)i=t+i;return i};var c={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"},d=function(){function t(e,i,n,o){s(this,t);var r=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===n){var a=e&&""+e;a&&function(e){if(e.startsWith("hsl")){var i=e.match(/([\-\d\.e]+)/g).map(Number),n=l(i,4),o=n[0],s=n[1],a=n[2],c=n[3];void 0===c&&(c=1),o/=360,s/=100,a/=100,r.hsla=[o,s,a,c]}else if(e.startsWith("rgb")){var d=e.match(/([\-\d\.e]+)/g).map(Number),h=l(d,4),u=h[0],g=h[1],p=h[2],m=h[3];void 0===m&&(m=1),r.rgba=[u,g,p,m]}else e.startsWith("#")?r.rgba=t.hexToRgb(e):r.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(a.toLowerCase())}else this.rgba=[e,i,n,void 0===o?1:o]}return a(t,[{key:"printRGB",value:function(t){var i=t?this.rgba:this.rgba.slice(0,3),n=i.map(function(t,i){return e(t,3===i?3:0)});return t?"rgba("+n+")":"rgb("+n+")"}},{key:"printHSL",value:function(t){var i=[360,100,100,1],n=["","%","%",""],o=t?this.hsla:this.hsla.slice(0,3),r=o.map(function(t,o){return e(t*i[o],3===o?3:1)+n[o]});return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map(function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}).map(function(e){return e.padStart(2,"0")}).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var i=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e){return parseInt(e,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(e){var i=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),n=c[i];return void 0===n?n:t.hexToRgb(n.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=l(e,4),i=t[0],n=t[1],o=t[2],r=t[3];i/=255,n/=255,o/=255;var s=Math.max(i,n,o),a=Math.min(i,n,o),c=void 0,d=void 0,h=(s+a)/2;if(s===a)c=d=0;else{var u=s-a;switch(d=h>.5?u/(2-s-a):u/(s+a),s){case i:c=(n-o)/u+(n<o?6:0);break;case n:c=(o-i)/u+2;break;case o:c=(i-n)/u+4}c/=6}return[c,d,h,r]}},{key:"hslToRgb",value:function(e){var t=l(e,4),i=t[0],n=t[1],o=t[2],r=t[3],s=void 0,a=void 0,c=void 0;if(0===n)s=a=c=o;else{var d=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},h=o<.5?o*(1+n):o+n-o*n,u=2*o-h;s=d(u,h,i+1/3),a=d(u,h,i),c=d(u,h,i-1/3)}var g=[255*s,255*a,255*c].map(Math.round);return g[3]=r,g}}]),t}(),h=function(){function e(){s(this,e),this._events=[]}return a(e,[{key:"add",value:function(e,t,i){e.addEventListener(t,i,!1),this._events.push({target:e,type:t,handler:i})}},{key:"remove",value:function(t,i,n){this._events=this._events.filter(function(o){var r=!0;return t&&t!==o.target&&(r=!1),i&&i!==o.type&&(r=!1),n&&n!==o.handler&&(r=!1),r&&e._doRemove(o.target,o.type,o.handler),!r})}},{key:"destroy",value:function(){this._events.forEach(function(t){return e._doRemove(t.target,t.type,t.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(e,t,i){e.removeEventListener(t,i,!1)}}]),e}(),u="keydown",g="mousedown",p="focusin",m=document.createElement("style");return m.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{-webkit-box-ordinal-group:2;order:1;-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{-webkit-box-ordinal-group:2;order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px dodgerblue}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:whitesmoke;background-image:-webkit-gradient(linear, left bottom, left top, from(gainsboro), to(transparent));background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:-webkit-gradient(linear, left bottom, left top, from(transparent), to(gainsboro));background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:white}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(m),function(){function e(t){s(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new h,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return a(e,[{key:"setOptions",value:function(e){var t=this;if(e){var i=this.settings;if(e instanceof HTMLElement)i.parent=e;else{i.parent&&e.parent&&i.parent!==e.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(e,t,i){for(var n in e)i&&i.indexOf(n)>=0||(t[n]=e[n])}(e,i),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var n=e.color||e.colour;n&&this._setColor(n)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(e){return t.openHandler(e)};this._events.add(o,"click",s),r(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else e.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===u?this._domEdit:this.domElement;setTimeout(function(){return t.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,i=!1;if(e)if(t===g||t===p){var n=(this.__containedEvent||0)+100;e.timeStamp>n&&(i=!0)}else o(e),i=!0;else i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==g&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var i=void 0;try{i=new d(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var n=i.hsla;n[3]=1,i.hsla=n}this.colour=this.color=i,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=t(i);return this.domElement=o,this._domH=n(".picker_hue",o),this._domSL=n(".picker_sl",o),this._domA=n(".picker_alpha",o),this._domEdit=n(".picker_editor input",o),this._domSample=n(".picker_sample",o),this._domOkay=n(".picker_done button",o),this._domCancel=n(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){function e(e,t,i){s.add(e,t,i)}var t=this,n=this,o=this.domElement,s=this._events;e(o,"click",function(e){return e.preventDefault()}),i(s,this._domH,function(e,t){return n._setHSLA(e)}),i(s,this._domSL,function(e,t){return n._setHSLA(null,e,1-t)}),this.settings.alpha&&i(s,this._domA,function(e,t){return n._setHSLA(null,null,null,1-t)});var a=this._domEdit;e(a,"input",function(e){n._setColor(this.value,{fromEditor:!0,failSilently:!0})}),e(a,"focus",function(e){var t=this;t.selectionStart===t.selectionEnd&&t.select()}),this._ifPopup(function(){var i=function(e){return t.closeHandler(e)};e(window,g,i),e(window,p,i),r(s,o,["Esc","Escape"],i);var n=function(e){t.__containedEvent=e.timeStamp};e(o,g,n),e(o,p,n),e(t._domCancel,"click",i)});var l=function(e){t._ifPopup(function(){return t.closeHandler(e)}),t.onDone&&t.onDone(t.colour)};e(this._domOkay,"click",l),r(s,o,["Enter"],l)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup(function(i){"static"===getComputedStyle(e).position&&(e.style.position="relative");var n=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(e){e===n?t.classList.add(e):t.classList.remove(e)}),t.classList.add(n)})}},{key:"_setHSLA",value:function(e,t,i,n,o){o=o||{};var r=this.colour,s=r.hsla;[e,t,i,n].forEach(function(e,t){(e||0===e)&&(s[t]=e)}),r.hsla=s,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(r)}},{key:"_updateUI",value:function(e){function t(e,t,i){t.style.left=100*i+"%"}function i(e,t,i){t.style.top=100*i+"%"}if(this.domElement){e=e||{};var o=this.colour,r=o.hsla,s="hsl("+360*r[0]+", 100%, 50%)",a=o.hslString,l=o.hslaString,c=this._domH,d=this._domSL,h=this._domA,u=n(".picker_selector",c),g=n(".picker_selector",d),p=n(".picker_selector",h);t(c,u,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=s,t(d,g,r[1]),i(d,g,1-r[2]),d.style.color=a,i(h,p,1-r[3]);var m=a,f=m.replace("hsl","hsla").replace(")",", 0)"),C="linear-gradient("+[m,f]+")";if(this._domA.style.backgroundImage=C+", url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!e.fromEditor){var I=this.settings.editorFormat,A=this.settings.alpha,b=void 0;switch(I){case"rgb":b=o.printRGB(A);break;case"hsl":b=o.printHSL(A);break;default:b=o.printHex(A)}this._domEdit.value=b}this._domSample.style.color=l}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var i=e?"":"none",n=t.style.display!==i;return n&&(t.style.display=i),n}}],[{key:"StyleElement",get:function(){return m}}]),e}()}()}},i={},e.amdD=function(){throw new Error("define cannot be used indirect")},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,{a:i}),i},e.d=function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},e(3161);var t,i})},function(e,t,i){var n=i(14);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(3)("62bece8f",n,!0,{})},function(e,t,i){var n=i(1);t=e.exports=i(2)(!1),t.push([e.i,".jsoneditor-modal input,.jsoneditor-modal input:not([type]),.jsoneditor-modal input[type=search],.jsoneditor-modal input[type=text],.jsoneditor input,.jsoneditor input:not([type]),.jsoneditor input[type=search],.jsoneditor input[type=text]{height:auto;border:inherit;box-shadow:none;font-size:inherit;box-sizing:inherit;padding:inherit;font-family:inherit;transition:none;line-height:inherit}.jsoneditor-modal input:focus,.jsoneditor-modal input:not([type]):focus,.jsoneditor-modal input[type=search]:focus,.jsoneditor-modal input[type=text]:focus,.jsoneditor input:focus,.jsoneditor input:not([type]):focus,.jsoneditor input[type=search]:focus,.jsoneditor input[type=text]:focus{border:inherit;box-shadow:inherit}.jsoneditor-modal textarea,.jsoneditor textarea{height:inherit}.jsoneditor-modal select,.jsoneditor select{display:inherit;height:inherit}.jsoneditor-modal label,.jsoneditor label{font-size:inherit;font-weight:inherit;color:inherit}.jsoneditor-modal table,.jsoneditor table{border-collapse:collapse;width:auto}.jsoneditor-modal td,.jsoneditor-modal th,.jsoneditor td,.jsoneditor th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.jsoneditor .autocomplete.dropdown{position:absolute;background:#fff;box-shadow:2px 2px 12px hsla(0,0%,50%,.3);border:1px solid #d3d3d3;overflow-x:hidden;overflow-y:auto;cursor:default;margin:0;padding:5px;text-align:left;outline:0;font-family:dejavu sans mono,droid sans mono,consolas,monaco,lucida console,courier new,courier,monospace,sans-serif;font-size:10pt}.jsoneditor .autocomplete.dropdown .item{color:#1a1a1a}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ebebeb}.jsoneditor .autocomplete.hint{color:#a1a1a1;top:4px;left:4px}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;box-sizing:content-box;z-index:2}.jsoneditor-contextmenu .jsoneditor-menu{position:relative;left:0;top:0;width:128px;height:auto;background:#fff;border:1px solid #d3d3d3;box-shadow:2px 2px 12px hsla(0,0%,50%,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 8px 0 0;margin:0;width:128px;height:auto;border:none;cursor:pointer;color:#4d4d4d;background:0 0;font-size:10pt;font-family:arial,sans-serif;box-sizing:border-box;text-align:left}.jsoneditor-contextmenu .jsoneditor-menu button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-default{width:96px}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu .jsoneditor-menu li{overflow:hidden}.jsoneditor-contextmenu .jsoneditor-menu li ul{display:none;position:relative;left:-10px;top:0;border:none;box-shadow:inset 0 0 10px hsla(0,0%,50%,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu .jsoneditor-menu li ul .jsoneditor-icon{margin-left:24px}.jsoneditor-contextmenu .jsoneditor-menu li ul li button{padding-left:24px;animation:all ease-in-out 1s}.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url("+n(i(0))+");background-position:0 -72px}.jsoneditor-contextmenu .jsoneditor-icon{position:absolute;top:0;left:0;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url("+n(i(0))+')}.jsoneditor-contextmenu .jsoneditor-text{padding:4px 0 4px 24px;word-wrap:break-word}.jsoneditor-contextmenu .jsoneditor-text.jsoneditor-right-margin{padding-right:24px}.jsoneditor-contextmenu .jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.jsoneditor-remove .jsoneditor-icon{background-position:-24px 0}.jsoneditor-contextmenu button.jsoneditor-append .jsoneditor-icon,.jsoneditor-contextmenu button.jsoneditor-insert .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-duplicate .jsoneditor-icon{background-position:-48px 0}.jsoneditor-contextmenu button.jsoneditor-sort-asc .jsoneditor-icon{background-position:-168px 0}.jsoneditor-contextmenu button.jsoneditor-sort-desc .jsoneditor-icon{background-position:-192px 0}.jsoneditor-contextmenu button.jsoneditor-transform .jsoneditor-icon{background-position:-216px 0}.jsoneditor-contextmenu button.jsoneditor-extract .jsoneditor-icon{background-position:0 -24px}.jsoneditor-contextmenu button.jsoneditor-type-string .jsoneditor-icon{background-position:-144px 0}.jsoneditor-contextmenu button.jsoneditor-type-auto .jsoneditor-icon{background-position:-120px 0}.jsoneditor-contextmenu button.jsoneditor-type-object .jsoneditor-icon{background-position:-72px 0}.jsoneditor-contextmenu button.jsoneditor-type-array .jsoneditor-icon{background-position:-96px 0}.jsoneditor-contextmenu button.jsoneditor-type-modes .jsoneditor-icon{background-image:none;width:6px}.jsoneditor-contextmenu li,.jsoneditor-contextmenu ul{box-sizing:content-box;position:relative}.jsoneditor-contextmenu .jsoneditor-menu button:focus,.jsoneditor-contextmenu .jsoneditor-menu button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:focus,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}.jsoneditor-contextmenu .jsoneditor-menu li ul li button:focus,.jsoneditor-contextmenu .jsoneditor-menu li ul li button:hover{background-color:#f5f5f5}.jsoneditor-modal{max-width:95%;border-radius:2px!important;padding:45px 15px 15px!important;box-shadow:2px 2px 12px hsla(0,0%,50%,.3);color:#4d4d4d;line-height:1.3em}.jsoneditor-modal.jsoneditor-modal-transform{width:600px!important}.jsoneditor-modal .pico-modal-header{position:absolute;box-sizing:border-box;top:0;left:0;width:100%;padding:0 10px;height:30px;line-height:30px;font-family:arial,sans-serif;font-size:11pt;background:#3883fa;color:#fff}.jsoneditor-modal table{width:100%}.jsoneditor-modal table td{padding:3px 0}.jsoneditor-modal table td.jsoneditor-modal-input{text-align:right;padding-right:0;white-space:nowrap}.jsoneditor-modal table td.jsoneditor-modal-actions{padding-top:15px}.jsoneditor-modal table th{vertical-align:middle}.jsoneditor-modal p:first-child{margin-top:0}.jsoneditor-modal a{color:#3883fa}.jsoneditor-modal .jsoneditor-jmespath-block{margin-bottom:10px}.jsoneditor-modal .pico-close{background:0 0!important;font-size:24px!important;top:7px!important;right:7px!important;color:#fff}.jsoneditor-modal input{padding:4px}.jsoneditor-modal input[type=text]{cursor:inherit}.jsoneditor-modal input[disabled]{background:#d3d3d3;color:grey}.jsoneditor-modal .jsoneditor-select-wrapper{position:relative;display:inline-block}.jsoneditor-modal .jsoneditor-select-wrapper:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #666;position:absolute;right:8px;top:14px;pointer-events:none}.jsoneditor-modal select{padding:3px 24px 3px 10px;min-width:180px;max-width:350px;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:0;text-overflow:"";font-size:10pt;line-height:1.5em}.jsoneditor-modal select::-ms-expand{display:none}.jsoneditor-modal .jsoneditor-button-group input{padding:4px 10px;margin:0;border-radius:0;border-left-style:none}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left-style:solid}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.jsoneditor-modal .jsoneditor-transform-preview{background:#f5f5f5;height:200px}.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error{color:#ee422e}.jsoneditor-modal .jsoneditor-jmespath-wizard{line-height:1.2em;width:100%;padding:0;border-radius:3px}.jsoneditor-modal .jsoneditor-jmespath-label{font-weight:700;color:#1e90ff;margin-top:20px;margin-bottom:5px}.jsoneditor-modal .jsoneditor-jmespath-wizard-table{width:100%;border-collapse:collapse}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px}.jsoneditor-modal .jsoneditor-inline{position:relative;display:inline-block;width:100%;padding-top:2px;padding-bottom:2px}.jsoneditor-modal .jsoneditor-inline:not(:last-child){padding-right:2px}.jsoneditor-modal .jsoneditor-jmespath-filter{display:flex;flex-wrap:wrap}.jsoneditor-modal .jsoneditor-jmespath-filter-field{width:180px}.jsoneditor-modal .jsoneditor-jmespath-filter-relation{width:100px}.jsoneditor-modal .jsoneditor-jmespath-filter-value{min-width:180px;flex:1}.jsoneditor-modal .jsoneditor-jmespath-sort-field{width:170px}.jsoneditor-modal .jsoneditor-jmespath-sort-order{width:150px}.jsoneditor-modal .jsoneditor-jmespath-select-fields{width:100%}.jsoneditor-modal .selectr-selected{border-color:#d3d3d3;padding:4px 28px 4px 8px}.jsoneditor-modal .selectr-selected .selectr-tag{background-color:#3883fa;border-radius:5px}.jsoneditor-modal table td,.jsoneditor-modal table th{text-align:left;vertical-align:middle;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal input[type=text]:focus,.jsoneditor-modal select,.jsoneditor-modal textarea{background:#fff;border:1px solid #d3d3d3;color:#4d4d4d;border-radius:3px;padding:4px}.jsoneditor-modal,.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal option,.jsoneditor-modal select,.jsoneditor-modal table td,.jsoneditor-modal table th,.jsoneditor-modal textarea{font-size:10.5pt;font-family:arial,sans-serif}.jsoneditor-modal #query,.jsoneditor-modal .jsoneditor-transform-preview{font-family:dejavu sans mono,droid sans mono,consolas,monaco,lucida console,courier new,courier,monospace,sans-serif;font-size:10pt;width:100%;box-sizing:border-box}.jsoneditor-modal input[type=button],.jsoneditor-modal input[type=submit]{background:#f5f5f5;padding:4px 20px}.jsoneditor-modal input,.jsoneditor-modal select{cursor:pointer}.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc{background:#3883fa;border-color:#3883fa;color:#fff}.jsoneditor{color:#1a1a1a;border:thin solid #3883fa;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;position:relative;padding:0;line-height:100%}div.jsoneditor-default,div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-value.jsoneditor-empty:after{content:"value"}div.jsoneditor-value.jsoneditor-string{color:#006000}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ed0}div.jsoneditor-value.jsoneditor-color-value,div.jsoneditor-value.jsoneditor-invalid{color:#1a1a1a}div.jsoneditor-readonly{min-width:16px;color:grey}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty:after{content:"field"}div.jsoneditor td{vertical-align:top}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:grey}div.jsoneditor td.jsoneditor-tree{vertical-align:top}div.jsoneditor.busy pre.jsoneditor-preview{background:#f5f5f5;color:grey}div.jsoneditor.busy div.jsoneditor-busy{display:inherit}div.jsoneditor code.jsoneditor-preview{background:0 0}div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview{width:100%;height:100%;box-sizing:border-box;overflow:auto;padding:2px;margin:0;white-space:pre-wrap;word-break:break-all}div.jsoneditor-default{color:grey;padding-left:10px}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto;background:#fff}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background-color:transparent;background-image:url('+n(i(0))+")}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:1px solid #e5e5e5}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu-button{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background-image:url("+n(i(0))+");background-position:-72px -72px;cursor:move}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree div.jsoneditor-show-more{display:inline-block;padding:3px 4px;margin:2px 0;background-color:#e5e5e5;border-radius:3px;color:grey;font-family:arial,sans-serif;font-size:10pt}div.jsoneditor-tree div.jsoneditor-show-more a{display:inline-block;color:grey}div.jsoneditor-tree div.jsoneditor-color{display:inline-block;width:12px;height:12px;margin:4px;border:1px solid grey;cursor:pointer}div.jsoneditor-tree div.jsoneditor-date{background:#a1a1a1;color:#fff;font-family:arial,sans-serif;border-radius:3px;display:inline-block;padding:3px;margin:0 3px}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%}div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url("+n(i(0))+');background-position:-168px -48px;background-color:transparent}div.jsoneditor-outer{position:static;width:100%;height:100%;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}div.jsoneditor-outer.has-nav-bar{margin-top:-26px;padding-top:26px}div.jsoneditor-outer.has-nav-bar.has-main-menu-bar{margin-top:-61px;padding-top:61px}div.jsoneditor-outer.has-status-bar{margin-bottom:-26px;padding-bottom:26px}div.jsoneditor-outer.has-main-menu-bar{margin-top:-35px;padding-top:35px}div.jsoneditor-busy{position:absolute;top:15%;left:0;box-sizing:border-box;width:100%;text-align:center;display:none}div.jsoneditor-busy span{background-color:#ffffab;border:1px solid #fe0;border-radius:3px;padding:5px 15px;box-shadow:0 0 5px rgba(0,0,0,.4)}div.jsoneditor-field.jsoneditor-empty:after,div.jsoneditor-value.jsoneditor-empty:after{pointer-events:none;color:#d3d3d3;font-size:8pt}a.jsoneditor-value.jsoneditor-url,div.jsoneditor-value.jsoneditor-url{color:#006000;text-decoration:underline}a.jsoneditor-value.jsoneditor-url{display:inline-block;padding:2px;margin:2px}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#ffffab;border:1px solid #fe0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px}div.jsoneditor-tree button.jsoneditor-contextmenu-button.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu-button:focus,div.jsoneditor-tree button.jsoneditor-contextmenu-button:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button{background-position:-48px -48px}div.jsoneditor-tree div.jsoneditor-show-more a:focus,div.jsoneditor-tree div.jsoneditor-show-more a:hover{color:#ee422e}.ace-jsoneditor,textarea.jsoneditor-text{min-height:150px}.ace-jsoneditor *,textarea.jsoneditor-text *{font-family:dejavu sans mono,droid sans mono,consolas,monaco,lucida console,courier new,courier,monospace,sans-serif}textarea.jsoneditor-text{width:100%;height:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#d3d3d3}tr.jsoneditor-selected button.jsoneditor-contextmenu-button,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}.jsoneditor-popover,.jsoneditor-schema-error,div.jsoneditor-field,div.jsoneditor-value,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,pre.jsoneditor-preview{font-family:dejavu sans mono,droid sans mono,consolas,monaco,lucida console,courier new,courier,monospace,sans-serif;font-size:10pt;color:#1a1a1a}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}.jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;padding:7px 10px;position:absolute;cursor:auto;width:200px}.jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;right:-14px;left:inherit;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;left:-14px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:"";display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-text-errors tr.jump-to-line:hover{text-decoration:underline;cursor:pointer}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;animation:fade-in .3s linear 1,move-up .3s linear 1}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-validation-errors-container{max-height:130px;overflow-y:auto}.jsoneditor .jsoneditor-validation-errors{width:100%;overflow:hidden}.jsoneditor .jsoneditor-additional-errors{position:absolute;margin:auto;bottom:31px;left:calc(50% - 92px);color:grey;background-color:#ebebeb;padding:7px 15px;border-radius:8px}.jsoneditor .jsoneditor-additional-errors.visible{visibility:visible;opacity:1;transition:opacity 2s linear}.jsoneditor .jsoneditor-additional-errors.hidden{visibility:hidden;opacity:0;transition:visibility 0s 2s,opacity 2s linear}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;border-top:1px solid #ffc700}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor .jsoneditor-text-errors td pre{margin:0;white-space:normal}.jsoneditor .jsoneditor-text-errors tr{background-color:#ffffab}.jsoneditor .jsoneditor-text-errors tr.parse-error{background-color:#ee2e2e70}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;cursor:pointer}.jsoneditor-text-errors tr .jsoneditor-schema-error{background-image:url('+n(i(0))+");background-position:-168px -48px;background-color:transparent}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background-image:url("+n(i(0))+");background-position:-25px 0;background-color:transparent}.jsoneditor-anchor{cursor:pointer}.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@keyframes fadein{0%{opacity:0}to{opacity:1}}.jsoneditor-modal input[type=search].selectr-input{border:1px solid #d3d3d3;width:calc(100% - 4px);margin:2px;padding:4px;box-sizing:border-box}.jsoneditor-modal button.selectr-input-clear{right:8px}.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}.jsoneditor-menu>.jsoneditor-modes>button,.jsoneditor-menu>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background-color:transparent;background-image:url("+n(i(0))+");color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}.jsoneditor-menu>.jsoneditor-modes>button:hover,.jsoneditor-menu>button:hover{background-color:hsla(0,0%,100%,.2);border:1px solid hsla(0,0%,100%,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:hsla(0,0%,100%,.3)}.jsoneditor-menu>.jsoneditor-modes>button:disabled,.jsoneditor-menu>button:disabled{opacity:.5;background-color:transparent;border:none}.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}.jsoneditor-menu>button.jsoneditor-sort{background-position:-120px -96px}.jsoneditor-menu>button.jsoneditor-transform{background-position:-144px -96px}.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-transform,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-transform{display:none}.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}.jsoneditor-menu>button.jsoneditor-repair{background-position:-96px -96px}.jsoneditor-menu>.jsoneditor-modes{display:inline-block;float:left}.jsoneditor-menu>.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor-menu>.jsoneditor-modes>button.jsoneditor-separator,.jsoneditor-menu>button.jsoneditor-separator{margin-left:10px}.jsoneditor-menu a{font-family:arial,sans-serif;font-size:10pt;color:#fff;opacity:.8;vertical-align:middle}.jsoneditor-menu a:hover{opacity:1}.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor-navigation-bar{width:100%;height:26px;line-height:26px;padding:0;margin:0;border-bottom:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:grey;background-color:#ebebeb;overflow:hidden;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-search{font-family:arial,sans-serif;position:absolute;right:4px;top:4px;border-collapse:collapse;border-spacing:0;display:flex}.jsoneditor-search input{color:#1a1a1a;width:120px;border:none;outline:0;margin:1px;line-height:20px;font-family:arial,sans-serif}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url("+n(i(0))+");vertical-align:top}.jsoneditor-search button:hover{background-color:transparent}.jsoneditor-search button.jsoneditor-refresh{width:18px;background-position:-99px -73px}.jsoneditor-search button.jsoneditor-next{cursor:pointer;background-position:-124px -73px}.jsoneditor-search button.jsoneditor-next:hover{background-position:-124px -49px}.jsoneditor-search button.jsoneditor-previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor-search button.jsoneditor-previous:hover{background-position:-148px -49px}.jsoneditor-results{font-family:arial,sans-serif;color:#fff;padding-right:5px;line-height:26px}.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}.jsoneditor-statusbar{line-height:26px;height:26px;color:grey;background-color:#ebebeb;border-top:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:10pt}.jsoneditor-statusbar>.jsoneditor-curserinfo-val{margin-right:12px}.jsoneditor-statusbar>.jsoneditor-curserinfo-count{margin-left:4px}.jsoneditor-statusbar>.jsoneditor-validation-error-icon{float:right;width:24px;height:24px;padding:0;margin-top:1px;background-image:url("+n(i(0))+");background-position:-168px -48px;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-validation-error-count{float:right;margin:0 4px 0 0;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-parse-error-icon{float:right;width:24px;height:24px;padding:0;margin:1px;background-image:url("+n(i(0))+');background-position:-25px 0}.jsoneditor-statusbar .jsoneditor-array-info a{color:inherit}div.jsoneditor-statusbar>.jsoneditor-curserinfo-label,div.jsoneditor-statusbar>.jsoneditor-size-info{margin:0 4px}.jsoneditor-treepath{padding:0 5px;overflow:hidden;white-space:nowrap;outline:0}.jsoneditor-treepath.show-all{word-wrap:break-word;white-space:normal;position:absolute;background-color:#ebebeb;z-index:1;box-shadow:2px 2px 12px hsla(0,0%,50%,.3)}.jsoneditor-treepath.show-all span.jsoneditor-treepath-show-all-btn{display:none}.jsoneditor-treepath div.jsoneditor-contextmenu-root{position:absolute;left:0}.jsoneditor-treepath .jsoneditor-treepath-show-all-btn{position:absolute;background-color:#ebebeb;left:0;height:20px;padding:0 3px;cursor:pointer}.jsoneditor-treepath .jsoneditor-treepath-element{margin:1px;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-treepath .jsoneditor-treepath-seperator{margin:2px;font-size:9pt;font-family:arial,sans-serif}.jsoneditor-treepath span.jsoneditor-treepath-element:hover,.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover{cursor:pointer;text-decoration:underline}/*!\n * Selectr 2.4.0\n * https://github.com/Mobius1/Selectr\n *\n * Released under the MIT license\n */.selectr-container{position:relative}.selectr-container li{list-style:none}.selectr-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:-1px;padding:0;border:0 none}.selectr-visible{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:11}.selectr-desktop.multiple .selectr-visible{display:none}.selectr-desktop.multiple.native-open .selectr-visible{top:100%;min-height:200px!important;height:auto;opacity:1;display:block}.selectr-container.multiple.selectr-mobile .selectr-selected{z-index:0}.selectr-selected{position:relative;z-index:1;box-sizing:border-box;width:100%;padding:7px 28px 7px 14px;cursor:pointer;border:1px solid #999;border-radius:3px;background-color:#fff}.selectr-selected:before{position:absolute;top:50%;right:10px;width:0;height:0;content:"";-o-transform:rotate(0) translate3d(0,-50%,0);-ms-transform:rotate(0) translate3d(0,-50%,0);-moz-transform:rotate(0) translate3d(0,-50%,0);-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0);border-width:4px 4px 0;border-style:solid;border-color:#6c7a86 transparent transparent}.selectr-container.native-open .selectr-selected:before,.selectr-container.open .selectr-selected:before{border-width:0 4px 4px;border-style:solid;border-color:transparent transparent #6c7a86}.selectr-label{display:none;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.selectr-placeholder{color:#6c7a86}.selectr-tags{margin:0;padding:0;white-space:normal}.has-selected .selectr-tags{margin:0 0 -2px}.selectr-tag{list-style:none;position:relative;float:left;padding:2px 25px 2px 8px;margin:0 2px 2px 0;cursor:default;color:#fff;border:medium none;border-radius:10px;background:#acb7bf none repeat scroll 0 0}.selectr-container.multiple.has-selected .selectr-selected{padding:5px 28px 5px 5px}.selectr-options-container{position:absolute;z-index:10000;top:calc(100% - 1px);left:0;display:none;box-sizing:border-box;width:100%;border-width:0 1px 1px;border-style:solid;border-color:transparent #999 #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.open .selectr-options-container{display:block}.selectr-input-container{position:relative;display:none}.selectr-clear,.selectr-input-clear,.selectr-tag-remove{position:absolute;top:50%;right:22px;width:20px;height:20px;padding:0;cursor:pointer;-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);border:medium none;background-color:transparent;z-index:11}.selectr-clear,.selectr-input-clear{display:none}.selectr-container.has-selected .selectr-clear,.selectr-input-container.active .selectr-input-clear{display:block}.selectr-selected .selectr-tag-remove{right:2px}.selectr-clear:after,.selectr-clear:before,.selectr-input-clear:after,.selectr-input-clear:before,.selectr-tag-remove:after,.selectr-tag-remove:before{position:absolute;top:5px;left:9px;width:2px;height:10px;content:" ";background-color:#6c7a86}.selectr-tag-remove:after,.selectr-tag-remove:before{top:4px;width:3px;height:12px;background-color:#fff}.selectr-clear:before,.selectr-input-clear:before,.selectr-tag-remove:before{-o-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.selectr-clear:after,.selectr-input-clear:after,.selectr-tag-remove:after{-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.selectr-input-container.active,.selectr-input-container.active .selectr-clear{display:block}.selectr-input{top:5px;left:5px;box-sizing:border-box;width:calc(100% - 30px);margin:10px 15px;padding:7px 30px 7px 9px;border:1px solid #999;border-radius:3px}.selectr-notice{display:none;box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.notice .selectr-notice{display:block}.selectr-container.notice .selectr-selected{border-radius:3px 3px 0 0}.selectr-options{position:relative;top:calc(100% + 2px);display:none;overflow-x:auto;overflow-y:scroll;max-height:200px;margin:0;padding:0}.selectr-container.notice .selectr-options-container,.selectr-container.open .selectr-input-container,.selectr-container.open .selectr-options{display:block}.selectr-option{position:relative;display:block;padding:5px 20px;list-style:outside none none;cursor:pointer;font-weight:400}.selectr-options.optgroups>.selectr-option{padding-left:25px}.selectr-optgroup{font-weight:700;padding:0}.selectr-optgroup--label{font-weight:700;margin-top:10px;padding:5px 15px}.selectr-match{text-decoration:underline}.selectr-option.selected{background-color:#ddd}.selectr-option.active{color:#fff;background-color:#5897fb}.selectr-option.disabled{opacity:.4}.selectr-option.excluded{display:none}.selectr-container.open .selectr-selected{border-color:#999 #999 transparent;border-radius:3px 3px 0 0}.selectr-container.open .selectr-selected:after{-o-transform:rotate(180deg) translate3d(0,50%,0);-ms-transform:rotate(180deg) translate3d(0,50%,0);-moz-transform:rotate(180deg) translate3d(0,50%,0);-webkit-transform:rotate(180deg) translate3d(0,50%,0);transform:rotate(180deg) translate3d(0,50%,0)}.selectr-disabled{opacity:.6}.has-selected .selectr-placeholder,.selectr-empty{display:none}.has-selected .selectr-label{display:block}.taggable .selectr-selected{padding:4px 28px 4px 4px}.taggable .selectr-selected:after{display:table;content:" ";clear:both}.taggable .selectr-label{width:auto}.taggable .selectr-tags{float:left;display:block}.taggable .selectr-placeholder{display:none}.input-tag{float:left;min-width:90px;width:auto}.selectr-tag-input{border:medium none;padding:3px 10px;width:100%;font-family:inherit;font-weight:inherit;font-size:inherit}.selectr-input-container.loading:after{position:absolute;top:50%;right:20px;width:20px;height:20px;content:"";-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-o-transform-origin:50% 0 0;-ms-transform-origin:50% 0 0;-moz-transform-origin:50% 0 0;-webkit-transform-origin:50% 0 0;transform-origin:50% 0 0;-moz-animation:.5s linear 0s normal forwards infinite running selectr-spin;-webkit-animation:.5s linear 0s normal forwards infinite running selectr-spin;animation:.5s linear 0s normal forwards infinite running selectr-spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}to{-webkit-transform:rotate(1turn) translate3d(0,-50%,0);transform:rotate(1turn) translate3d(0,-50%,0)}}@keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}to{-webkit-transform:rotate(1turn) translate3d(0,-50%,0);transform:rotate(1turn) translate3d(0,-50%,0)}}.selectr-container.open.inverted .selectr-selected{border-color:transparent #999 #999;border-radius:0 0 3px 3px}.selectr-container.inverted .selectr-options-container{border-width:1px 1px 0;border-color:#999 #999 transparent;border-radius:3px 3px 0 0;background-color:#fff;top:auto;bottom:calc(100% - 1px)}.selectr-container ::-webkit-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-moz-placeholder{color:#6c7a86;opacity:1}.selectr-container :-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::placeholder{color:#6c7a86;opacity:1}',""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"jsoneditor-container",class:{"max-box":e.max,"min-box":!e.max},style:e.getHeight},[i("div",{ref:"jsoneditor",staticClass:"jsoneditor-box"}),e._v(" "),"code"==e.options.mode&&e.plus?i("button",{staticClass:"max-btn",attrs:{type:"button",size:"mini"},on:{click:function(t){e.max=!e.max}}}):e._e()])},o=[],r={render:n,staticRenderFns:o};t.a=r}])});
|
||
//# sourceMappingURL=v-jsoneditor.min.js.map
|