administrate-field-jsonb 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ /*!
2
+ * jsoneditor.js
3
+ *
4
+ * @brief
5
+ * JSONEditor is a web-based tool to view, edit, format, and validate JSON.
6
+ * It has various modes such as a tree editor, a code editor, and a plain text
7
+ * editor.
8
+ *
9
+ * Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
10
+ *
11
+ * @license
12
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
13
+ * use this file except in compliance with the License. You may obtain a copy
14
+ * of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
20
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
21
+ * License for the specific language governing permissions and limitations under
22
+ * the License.
23
+ *
24
+ * Copyright (c) 2011-2019 Jos de Jong, http://jsoneditoronline.org
25
+ *
26
+ * @author Jos de Jong, <wjosdejong@gmail.com>
27
+ * @version 7.0.4
28
+ * @date 2019-09-26
29
+ */
30
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(window,function(){return i={},o.m=n=[function(e,t,n){"use strict";n.r(t),n.d(t,"parse",function(){return u}),n.d(t,"repair",function(){return p}),n.d(t,"escapeUnicodeChars",function(){return f}),n.d(t,"validate",function(){return m}),n.d(t,"extend",function(){return g}),n.d(t,"clear",function(){return v}),n.d(t,"getType",function(){return y}),n.d(t,"isUrl",function(){return x}),n.d(t,"isArray",function(){return w}),n.d(t,"getAbsoluteLeft",function(){return _}),n.d(t,"getAbsoluteTop",function(){return C}),n.d(t,"addClassName",function(){return E}),n.d(t,"removeAllClassNames",function(){return j}),n.d(t,"removeClassName",function(){return S}),n.d(t,"stripFormatting",function(){return k}),n.d(t,"setEndOfContentEditable",function(){return T}),n.d(t,"selectContentEditable",function(){return O}),n.d(t,"getSelection",function(){return N}),n.d(t,"setSelection",function(){return I}),n.d(t,"getSelectionOffset",function(){return A}),n.d(t,"setSelectionOffset",function(){return P}),n.d(t,"getInnerText",function(){return D}),n.d(t,"hasParentNode",function(){return R}),n.d(t,"getInternetExplorerVersion",function(){return M}),n.d(t,"isFirefox",function(){return L}),n.d(t,"addEventListener",function(){return B}),n.d(t,"removeEventListener",function(){return V}),n.d(t,"isChildOf",function(){return H}),n.d(t,"parsePath",function(){return z}),n.d(t,"stringifyPath",function(){return $}),n.d(t,"improveSchemaError",function(){return q}),n.d(t,"isPromise",function(){return U}),n.d(t,"isValidValidationError",function(){return J}),n.d(t,"insideRect",function(){return W}),n.d(t,"debounce",function(){return K}),n.d(t,"textDiff",function(){return G}),n.d(t,"getInputSelection",function(){return X}),n.d(t,"getIndexForPosition",function(){return Q}),n.d(t,"getPositionForPath",function(){return Y}),n.d(t,"compileJSONPointer",function(){return Z}),n.d(t,"getColorCSS",function(){return ee}),n.d(t,"isValidColor",function(){return te}),n.d(t,"makeFieldTooltip",function(){return ne}),n.d(t,"get",function(){return ie}),n.d(t,"findUniqueName",function(){return oe}),n.d(t,"getChildPaths",function(){return re}),n.d(t,"sort",function(){return se}),n.d(t,"sortObjectKeys",function(){return ae}),n.d(t,"parseString",function(){return le}),n.d(t,"formatSize",function(){return ce}),n.d(t,"limitCharacters",function(){return he}),n.d(t,"isObject",function(){return de}),n.d(t,"contains",function(){return ue});n(17);var i=n(9),r=n.n(i),o=n(16),s=n.n(o),a=n(18),l=n.n(a),c=n(1);function h(e){return(h="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)}var d=1e4;function u(t){try{return JSON.parse(t)}catch(e){throw m(t),e}}function p(i){var n=[],o=0,e=i.match(/^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);e&&(i=e[3]);var t,r={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};function s(){return i.charAt(o)}function a(){return i.charAt(o+1)}function l(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function c(){for(var e=n.length-1;0<=e;){var t=n[e];if(!l(t))return t;e--}return""}function h(){for(var e=o+1;e<i.length&&l(i[e]);)e++;return i[e]}function d(){for(o+=2;o<i.length&&("*"!==s()||"/"!==a());)o++;o+=2}function u(){for(o+=2;o<i.length&&"\n"!==s();)o++}function p(e){var t="";t+='"',o++;for(var n=s();o<i.length&&n!==e;)'"'===n&&"\\"!==i.charAt(o-1)?t+='\\"':n in r?t+=r[n]:("\\"===n&&(o++,"'"!==(n=s())&&(t+="\\")),t+=n),o++,n=s();return n===e&&(t+='"',o++),t}function f(){for(var e="",t=s(),n=/[a-zA-Z_$\d]/;n.test(t);)e+=t,o++,t=s();return-1===["null","true","false"].indexOf(e)?'"'+e+'"':e}function m(){for(var e,t=s(),n="";/[a-zA-Z_$]/.test(t);)n+=t,o++,t=s();if(0<n.length&&"("===t){if(o++,'"'===(t=s()))e=p(t),t=s();else for(e="";")"!==t&&""!==t;)e+=t,o++,t=s();return")"===t?(o++,e):n+"("+e+t}return n}for(;o<i.length;){var g=s();"/"===g&&"*"===a()?d():"/"===g&&"/"===a()?u():" "===(t=g)||" "<=t&&t<=" "||" "===t||" "===t||" "===t?(n.push(" "),o++):"'"===g?n.push(p(g)):'"'===g?n.push(p('"')):"`"===g?n.push(p("´")):"‘"===g?n.push(p("’")):"“"===g?n.push(p("”")):","===g&&-1!==["]","}"].indexOf(h())?o++:/[a-zA-Z_$]/.test(g)&&-1!==["{",","].indexOf(c())?n.push(f()):/[a-zA-Z_$]/.test(g)?n.push(m()):(n.push(g),o++)}return n.join("")}function f(e){return e.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})}function m(e){void 0!==s.a?s.a.parse(e):JSON.parse(e)}function g(e,t){for(var n in t)pe(t,n)&&(e[n]=t[n]);return e}function v(e){for(var t in e)pe(e,t)&&delete e[t];return e}function y(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":w(e)?"array":"object"}var b=/^https?:\/\/\S+$/;function x(e){return("string"==typeof e||e instanceof String)&&b.test(e)}function w(e){return"[object Array]"===Object.prototype.toString.call(e)}function _(e){return e.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function C(e){return e.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function E(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(n.push(t),e.className=n.join(" "))}function j(e){e.className=""}function S(e,t){var n=e.className.split(" "),i=n.indexOf(t);-1!==i&&(n.splice(i,1),e.className=n.join(" "))}function k(e){for(var t=e.childNodes,n=0,i=t.length;n<i;n++){var o=t[n];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)}k(o)}}function T(e){var t,n;document.createRange&&((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(t))}function O(e){var t,n;e&&"DIV"===e.nodeName&&window.getSelection&&document.createRange&&((n=document.createRange()).selectNodeContents(e),(t=window.getSelection()).removeAllRanges(),t.addRange(n))}function N(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null}function I(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}function A(){var e=N();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 P(e){if(document.createRange&&window.getSelection&&window.getSelection()){var 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),I(t)}}function D(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)return t.flush()+e.nodeValue;if(e.hasChildNodes()){for(var n=e.childNodes,i="",o=0,r=n.length;o<r;o++){var s=n[o];if("DIV"===s.nodeName||"P"===s.nodeName){var a=n[o-1],l=a?a.nodeName:void 0;l&&"DIV"!==l&&"P"!==l&&"BR"!==l&&(i+="\n",t.flush()),i+=D(s,t),t.set("\n")}else"BR"===s.nodeName?(i+=t.flush(),t.set("\n")):i+=D(s,t)}return i}return"P"===e.nodeName&&-1!==M()?t.flush():""}function R(e,t){for(var n=e?e.parentNode:void 0;n;){if(n===t)return!0;n=n.parentNode}return!1}function M(){if(-1===F){var e=-1;if("undefined"!=typeof navigator&&"Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]+[.0-9]+)").exec(t)&&(e=parseFloat(RegExp.$1))}F=e}return F}function L(){return"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Firefox")}var F=-1;function B(e,t,n,i){if(e.addEventListener)return void 0===i&&(i=!1),"mousewheel"===t&&L()&&(t="DOMMouseScroll"),e.addEventListener(t,n,i),n;if(e.attachEvent){var o=function(){return n.call(e,window.event)};return e.attachEvent("on"+t,o),o}}function V(e,t,n,i){e.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===t&&L()&&(t="DOMMouseScroll"),e.removeEventListener(t,n,i)):e.detachEvent&&e.detachEvent("on"+t,n)}function H(e,t){for(var n=e.parentNode;n;){if(n===t)return!0;n=n.parentNode}return!1}function z(n){var e=[],i=0;function t(){for(var e="";void 0!==n[i]&&/[\w$]/.test(n[i]);)e+=n[i],i++;if(""===e)throw new Error("Invalid JSON path: property name expected at index "+i);return e}function o(e){for(var t="";void 0!==n[i]&&n[i]!==e;)t+=n[i],i++;if(n[i]!==e)throw new Error("Invalid JSON path: unexpected end, character "+e+" expected");return t}for(;void 0!==n[i];)if("."===n[i])i++,e.push(t());else{if("["!==n[i])throw new Error('Invalid JSON path: unexpected character "'+n[i]+'" at index '+i);if("'"===n[++i]||'"'===n[i]){var r=n[i];if(i++,e.push(o(r)),n[i]!==r)throw new Error("Invalid JSON path: closing quote ' expected at index "+i);i++}else{var s=o("]").trim();if(0===s.length)throw new Error("Invalid JSON path: array value expected at index "+i);s="*"===s?s:JSON.parse(s),e.push(s)}if("]"!==n[i])throw new Error("Invalid JSON path: closing bracket ] expected at index "+i);i++}return e}function $(e){return e.map(function(e){return"number"==typeof e?"["+e+"]":"string"==typeof e&&e.match(/^[A-Za-z0-9_$]+$/)?"."+e:'["'+e+'"]'}).join("")}function q(e){if("enum"===e.keyword&&Array.isArray(e.schema)){var t=e.schema;if(t){if(5<(t=t.map(function(e){return JSON.stringify(e)})).length){var n=["("+(t.length-5)+" more...)"];(t=t.slice(0,5)).push(n)}e.message="should be equal to one of: "+t.join(", ")}}return"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}function U(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function J(e){return"object"===h(e)&&Array.isArray(e.path)&&"string"==typeof e.message}function W(e,t,n){var i=void 0!==n?n:0;return t.left-i>=e.left&&t.right+i<=e.right&&t.top-i>=e.top&&t.bottom+i<=e.bottom}function K(i,o,r){var s;return function(){var e=this,t=arguments,n=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||i.apply(e,t)},o),n&&i.apply(e,t)}}function G(e,t){for(var n=t.length,i=0,o=e.length,r=t.length;t.charAt(i)===e.charAt(i)&&i<n;)i++;for(;t.charAt(r-1)===e.charAt(o-1)&&i<r&&0<o;)r--,o--;return{start:i,end:r}}function X(n){var e,t,i,o,r,s=0,a=0;return"number"==typeof n.selectionStart&&"number"==typeof n.selectionEnd?(s=n.selectionStart,a=n.selectionEnd):(t=document.selection.createRange())&&t.parentElement()===n&&(o=n.value.length,e=n.value.replace(/\r\n/g,"\n"),(i=n.createTextRange()).moveToBookmark(t.getBookmark()),(r=n.createTextRange()).collapse(!1),-1<i.compareEndPoints("StartToEnd",r)?s=a=o:(s=-i.moveStart("character",-o),s+=e.slice(0,s).split("\n").length-1,-1<i.compareEndPoints("EndToEnd",r)?a=o:(a=-i.moveEnd("character",-o),a+=e.slice(0,a).split("\n").length-1))),{startIndex:s,endIndex:a,start:l(s),end:l(a)};function l(e){var t=n.value.substring(0,e);return{row:(t.match(/\n/g)||[]).length+1,column:t.length-t.lastIndexOf("\n")}}}function Q(e,t,n){var i=e.value||"";if(0<t&&0<n){var o=i.split("\n",t);t=Math.min(o.length,t),n=Math.min(o[t-1].length,n-1);var r=1===t?n:n+1;return o.slice(0,t-1).join("\n").length+r}return-1}function Y(e,t){var i,o=[];if(!t||!t.length)return o;try{i=l.a.parse(e)}catch(e){return o}return t.forEach(function(e){var t=Z(z(e)),n=i.pointers[t];n&&o.push({path:e,line:n.key?n.key.line:n.value?n.value.line:0,column:n.key?n.key.column:n.value?n.value.column:0})}),o}function Z(e){return e.map(function(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function ee(e){var t=document.createElement("div");return t.style.color=e,t.style.color.split(/\s+/).join("").toLowerCase()||null}function te(e){return!!ee(e)}function ne(n,e){if(!n)return"";var i="";return n.title&&(i+=n.title),n.description&&(0<i.length&&(i+="\n"),i+=n.description),n.default&&(0<i.length&&(i+="\n\n"),i+=Object(c.c)("default",void 0,e)+"\n",i+=JSON.stringify(n.default,null,2)),Array.isArray(n.examples)&&0<n.examples.length&&(0<i.length&&(i+="\n\n"),i+=Object(c.c)("examples",void 0,e)+"\n",n.examples.forEach(function(e,t){i+=JSON.stringify(e,null,2),t!==n.examples.length-1&&(i+="\n")})),i}function ie(e,t){for(var n=e,i=0;i<t.length&&null!=n;i++)n=n[t[i]];return n}function oe(e,t){for(var n=e.replace(/ \(copy( \d+)?\)$/,""),i=n,o=1;-1!==t.indexOf(i);){i=n+" ("+("copy"+(1<o?" "+o:""))+")",o++}return i}function re(e,t){var n={};function r(t,n,i,o){(Array.isArray(t)||de(t))&&!o||(n[i||""]=!0),de(t)&&Object.keys(t).forEach(function(e){r(t[e],n,i+"."+e,o)})}if(Array.isArray(e))for(var i=Math.min(e.length,d),o=0;o<i;o++){r(e[o],n,"",t)}else n[""]=!0;return Object.keys(n).sort()}function se(e,t,n){var o=t&&"."!==t?z(t):[],r="desc"===n?-1:1,i=e.slice();return i.sort(function(e,t){var n=ie(e,o),i=ie(t,o);return r*(i<n?1:n<i?-1:0)}),i}function ae(t,e){var n="desc"===e?-1:1,i=Object.keys(t).sort(function(e,t){return n*r()(e,t)}),o={};return i.forEach(function(e){o[e]=t[e]}),o}function le(e){if(""===e)return"";var t=e.toLowerCase();if("null"===t)return null;if("true"===t)return!0;if("false"===t)return!1;var n=Number(e),i=parseFloat(e);return isNaN(n)||isNaN(i)?e:n}function ce(e){if(e<900)return e.toFixed()+" B";var t=e/1024;if(t<900)return t.toFixed(1)+" KiB";var n=t/1024;if(n<900)return n.toFixed(1)+" MiB";var i=n/1024;return i<900?i.toFixed(1)+" GiB":(i/1024).toFixed(1)+" TiB"}function he(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function de(e){return"object"===h(e)&&null!==e&&!Array.isArray(e)}function ue(e,t){return-1!==e.indexOf(t)}function pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return h});n(17);var i=["en","pt-BR","zh-CN","tr"],o={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)",collapseAll:"Collapse all fields",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",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",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)",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.',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"},"zh-CN":{array:"数组",auto:"自动",appendText:"追加",appendTitle:"在此字段后追加一个类型为“auto”的新字段 (Ctrl+Shift+Ins)",appendSubmenuTitle:"选择要追加的字段类型",appendTitleAuto:"追加类型为“auto”的新字段 (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:"在此字段前插入类型为“auto”的新字段 (Ctrl+Ins)",insertSub:"选择要插入的字段类型",object:"对象",ok:"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 在新窗口打开链接",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:"缺省"},"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)",collapseAll:"Fechar todos campos",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",cannotParseFieldError:"Não é possível analisar o campo no JSON",cannotParseValueError:"Não é possível analisar o valor em JSON",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:"Clique para expandir/encolher este campo (Ctrl+E). \nCtrl+Click para expandir/encolher incluindo todos os filhos.",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)",selectNode:"Select a node...",showAll:"mostre tudo",showMore:"mostre mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",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:"Texto",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",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"},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"}},r="en",s="undefined"!=typeof navigator?navigator.language||navigator.userLanguage:void 0,a=i.find(function(e){return e===s})||r;function l(t){if(t){var e=i.find(function(e){return e===t});e?a=e:console.error("Language not found")}}function c(e){if(e){var t=function(t){i.find(function(e){return e===t})||i.push(t),o[t]=Object.assign({},o[r],o[t],e[t])};for(var n in e)t(n)}}function h(e,t,n){var i=o[n=n||a][e];if(t)for(e in t)i=i.replace("${"+e+"}",t[e]);return i||e}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"d",function(){return o}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s});var i=document.body,o=10485760,r=2e4,s=2147483648},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var u=n(10),p=n(0),v=n(1);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=function(){function d(n,e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),this.dom={};var g=this,t=this.dom;this.anchor=void 0,this.items=n,this.eventListeners={},this.selection=void 0,this.onClose=e?e.close:void 0;var i=document.createElement("div");i.className="jsoneditor-contextmenu-root",t.root=i;var o=document.createElement("div");o.className="jsoneditor-contextmenu",t.menu=o,i.appendChild(o);var r=document.createElement("ul");r.className="jsoneditor-menu",o.appendChild(r),t.list=r,t.items=[];var s=document.createElement("button");s.type="button",t.focusButton=s;var a=document.createElement("li");a.style.overflow="hidden",a.style.height="0",a.appendChild(s),r.appendChild(a),function p(f,m,e){e.forEach(function(t){if("separator"===t.type){var e=document.createElement("div");e.className="jsoneditor-separator";var n=document.createElement("li");n.appendChild(e),f.appendChild(n)}else{var i={},o=document.createElement("li");f.appendChild(o);var r=document.createElement("button");if(r.type="button",r.className=t.className,i.button=r,t.title&&(r.title=t.title),t.click&&(r.onclick=function(e){e.preventDefault(),g.hide(),t.click()}),o.appendChild(r),t.submenu){var s=document.createElement("div");s.className="jsoneditor-icon",r.appendChild(s);var a,l=document.createElement("div");if(l.className="jsoneditor-text"+(t.click?"":" jsoneditor-right-margin"),l.appendChild(document.createTextNode(t.text)),r.appendChild(l),t.click){r.className+=" jsoneditor-default";var c=document.createElement("button");c.type="button",(i.buttonExpand=c).className="jsoneditor-expand",c.innerHTML='<div class="jsoneditor-expand"></div>',o.appendChild(c),t.submenuTitle&&(c.title=t.submenuTitle),a=c}else{var h=document.createElement("div");h.className="jsoneditor-expand",r.appendChild(h),a=r}a.onclick=function(e){e.preventDefault(),g._onExpandItem(i),a.focus()};var d=[];i.subItems=d;var u=document.createElement("ul");(i.ul=u).className="jsoneditor-menu",u.style.height="0",o.appendChild(u),p(u,d,t.submenu)}else r.innerHTML='<div class="jsoneditor-icon"></div><div class="jsoneditor-text">'+Object(v.c)(t.text)+"</div>";m.push(i)}})}(r,this.dom.items,n),this.maxHeight=0,n.forEach(function(e){var t=24*(n.length+(e.submenu?e.submenu.length:0));g.maxHeight=Math.max(g.maxHeight,t)})}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(d,[{key:"_getVisibleButtons",value:function(){var t=[],n=this;return this.dom.items.forEach(function(e){t.push(e.button),e.buttonExpand&&t.push(e.buttonExpand),e.subItems&&e===n.expandedItem&&e.subItems.forEach(function(e){t.push(e.button),e.buttonExpand&&t.push(e.buttonExpand)})}),t}},{key:"show",value:function(e,t,n){this.hide();var i=!0,o=e.parentNode,r=e.getBoundingClientRect(),s=o.getBoundingClientRect(),a=t.getBoundingClientRect(),l=this;this.dom.absoluteAnchor=Object(u.a)(e,t,function(){l.hide()}),r.bottom+this.maxHeight<a.bottom||r.top-this.maxHeight>a.top&&(i=!1);var c=n?0:r.top-s.top;if(i){var h=e.offsetHeight;this.dom.menu.style.left="0",this.dom.menu.style.top=c+h+"px",this.dom.menu.style.bottom=""}else this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px";this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=Object(p.getSelection)(),this.anchor=e,setTimeout(function(){l.dom.focusButton.focus()},0),d.visibleMenu&&d.visibleMenu.hide(),d.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()),d.visibleMenu===this&&(d.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(n){var i=this,e=n===this.expandedItem,t=this.expandedItem;if(t&&(t.ul.style.height="0",t.ul.style.padding="",setTimeout(function(){i.expandedItem!==t&&(t.ul.style.display="",Object(p.removeClassName)(t.ul.parentNode,"jsoneditor-selected"))},300),this.expandedItem=void 0),!e){var o=n.ul;o.style.display="block",o.clientHeight,setTimeout(function(){if(i.expandedItem===n){for(var e=0,t=0;t<o.childNodes.length;t++)e+=o.childNodes[t].clientHeight;o.style.height=e+"px",o.style.padding="5px 10px"}},0),Object(p.addClassName)(o.parentNode,"jsoneditor-selected"),this.expandedItem=n}}},{key:"_onKeyDown",value:function(e){var t,n,i,o,r=e.target,s=e.which,a=!1;27===s?(this.selection&&Object(p.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),a=!0):9===s?e.shiftKey?0===(n=(t=this._getVisibleButtons()).indexOf(r))&&(t[t.length-1].focus(),a=!0):(n=(t=this._getVisibleButtons()).indexOf(r))===t.length-1&&(t[0].focus(),a=!0):37===s?("jsoneditor-expand"===r.className&&(n=(t=this._getVisibleButtons()).indexOf(r),(i=t[n-1])&&i.focus()),a=!0):38===s?(n=(t=this._getVisibleButtons()).indexOf(r),(i=t[n-1])&&"jsoneditor-expand"===i.className&&(i=t[n-2]),(i=i||t[t.length-1])&&i.focus(),a=!0):39===s?(n=(t=this._getVisibleButtons()).indexOf(r),(o=t[n+1])&&"jsoneditor-expand"===o.className&&o.focus(),a=!0):40===s&&(n=(t=this._getVisibleButtons()).indexOf(r),(o=t[n+1])&&"jsoneditor-expand"===o.className&&(o=t[n+2]),(o=o||t[0])&&(o.focus(),a=!0),a=!0),a&&(e.stopPropagation(),e.preventDefault())}}]),d}();o.visibleMenu=void 0},function(e,t,n){!function(e){"use strict";function k(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function T(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function O(e,t){if(e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(!0===k(e)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!1===O(e[n],t[n]))return!1;return!0}if(!0!==T(e))return!1;var i={};for(var o in e)if(hasOwnProperty.call(e,o)){if(!1===O(e[o],t[o]))return!1;i[o]=!0}for(var r in t)if(hasOwnProperty.call(t,r)&&!0!==i[r])return!1;return!0}function N(e){if(""===e||!1===e||null===e)return!0;if(k(e)&&0===e.length)return!0;if(T(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1}var s;s="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var c=0,r=1,h=2,a=3,t=4,n=6,l=8,d=9,u="UnquotedIdentifier",p="QuotedIdentifier",f="Rbracket",m="Rparen",g="Comma",v="Colon",y="Rbrace",b="Number",I="Current",A="Expref",P="Pipe",D="GTE",R="LTE",M="Flatten",x="Star",w="Filter",_="Dot",C="Lbrace",E="Lbracket",j="Lparen",S="Literal",L={".":_,"*":x,",":g,":":v,"{":C,"}":y,"]":f,"(":j,")":m,"@":I},F={"<":!0,">":!0,"=":!0,"!":!0},B={" ":!0,"\t":!0,"\n":!0};function V(e){return"0"<=e&&e<="9"||"-"===e}function i(){}i.prototype={tokenize:function(e){var t,n,i,o,r=[];for(this._current=0;this._current<e.length;)if("a"<=(o=e[this._current])&&o<="z"||"A"<=o&&o<="Z"||"_"===o)t=this._current,n=this._consumeUnquotedIdentifier(e),r.push({type:u,value:n,start:t});else if(void 0!==L[e[this._current]])r.push({type:L[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(V(e[this._current]))i=this._consumeNumber(e),r.push(i);else if("["===e[this._current])i=this._consumeLBracket(e),r.push(i);else if('"'===e[this._current])t=this._current,n=this._consumeQuotedIdentifier(e),r.push({type:p,value:n,start:t});else if("'"===e[this._current])t=this._current,n=this._consumeRawStringLiteral(e),r.push({type:S,value:n,start:t});else if("`"===e[this._current]){t=this._current;var s=this._consumeLiteral(e);r.push({type:S,value:s,start:t})}else if(void 0!==F[e[this._current]])r.push(this._consumeOperator(e));else if(void 0!==B[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,r.push({type:"And",value:"&&",start:t})):r.push({type:A,value:"&",start:t});else{if("|"!==e[this._current]){var a=new Error("Unknown character:"+e[this._current]);throw a.name="LexerError",a}t=this._current,this._current++,"|"===e[this._current]?(this._current++,r.push({type:"Or",value:"||",start:t})):r.push({type:P,value:"|",start:t})}return r},_consumeUnquotedIdentifier:function(e){var t,n=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(n,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&'"'!==e[i+1]?i++:i+=2,this._current=i}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var n=e.length;"'"!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"'"!==e[i+1]?i++:i+=2,this._current=i}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var n=e.length;V(e[this._current])&&this._current<n;)this._current++;var i=parseInt(e.slice(t,this._current));return{type:b,value:i,start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:w,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:M,value:"[]",start:t}):{type:E,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,n=e[t];return this._current++,"!"===n?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===n?"="===e[this._current]?(this._current++,{type:R,value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===n?"="===e[this._current]?(this._current++,{type:D,value:">=",start:t}):{type:"GT",value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,i=e.length;"`"!==e[this._current]&&this._current<i;){var o=this._current;"\\"!==e[o]||"\\"!==e[o+1]&&"`"!==e[o+1]?o++:o+=2,this._current=o}var r=s(e.slice(n,this._current));return r=r.replace("\\`","`"),t=this._looksLikeJSON(r)?JSON.parse(r):JSON.parse('"'+r+'"'),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={};function z(){}function $(e){this.runtime=e}function q(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[c]}]},avg:{_func:this._functionAvg,_signature:[{types:[l]}]},ceil:{_func:this._functionCeil,_signature:[{types:[c]}]},contains:{_func:this._functionContains,_signature:[{types:[h,a]},{types:[r]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[h]},{types:[h]}]},floor:{_func:this._functionFloor,_signature:[{types:[c]}]},length:{_func:this._functionLength,_signature:[{types:[h,a,t]}]},map:{_func:this._functionMap,_signature:[{types:[n]},{types:[a]}]},max:{_func:this._functionMax,_signature:[{types:[l,d]}]},merge:{_func:this._functionMerge,_signature:[{types:[t],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[a]},{types:[n]}]},sum:{_func:this._functionSum,_signature:[{types:[l]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[h]},{types:[h]}]},min:{_func:this._functionMin,_signature:[{types:[l,d]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[a]},{types:[n]}]},type:{_func:this._functionType,_signature:[{types:[r]}]},keys:{_func:this._functionKeys,_signature:[{types:[t]}]},values:{_func:this._functionValues,_signature:[{types:[t]}]},sort:{_func:this._functionSort,_signature:[{types:[d,l]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[a]},{types:[n]}]},join:{_func:this._functionJoin,_signature:[{types:[h]},{types:[d]}]},reverse:{_func:this._functionReverse,_signature:[{types:[h,a]}]},to_array:{_func:this._functionToArray,_signature:[{types:[r]}]},to_string:{_func:this._functionToString,_signature:[{types:[r]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[r]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[r],variadic:!0}]}}}H.EOF=0,H[u]=0,H[p]=0,H[f]=0,H[m]=0,H[g]=0,H[y]=0,H[b]=0,H[I]=0,H[A]=0,H[P]=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[M]=9,H[x]=20,H[w]=21,H.Dot=40,H.Not=45,H[C]=50,H[E]=55,H[j]=60,z.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"===this._lookahead(0))return t;var n=this._lookaheadToken(0),i=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw i.name="ParserError",i},_loadTokens:function(e){var t=(new i).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 n=this.nud(t),i=this._lookahead(0);e<H[i];)this._advance(),n=this.led(i,n),i=this._lookahead(0);return n},_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,n;switch(e.type){case S:return{type:"Literal",value:e.value};case u:return{type:"Field",name:e.value};case p:var i={type:"Field",name:e.value};if(this._lookahead(0)===j)throw new Error("Quoted identifier not allowed for function names.");return i;case"Not":return{type:"NotExpression",children:[t=this.expression(H.Not)]};case x:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===f?{type:"Identity"}:this._parseProjectionRHS(H.Star)]};case w:return this.led(e.type,{type:"Identity"});case C:return this._parseMultiselectHash();case M:return{type:"Projection",children:[{type:M,children:[{type:"Identity"}]},t=this._parseProjectionRHS(H.Flatten)]};case E:return this._lookahead(0)===b||this._lookahead(0)===v?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):this._lookahead(0)===x&&this._lookahead(1)===f?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(H.Star)]}):this._parseMultiselectList();case I:return{type:I};case A:return{type:"ExpressionReference",children:[n=this.expression(H.Expref)]};case j:for(var o=[];this._lookahead(0)!==m;)this._lookahead(0)===I?(n={type:I},this._advance()):n=this.expression(0),o.push(n);return this._match(m),o[0];default:this._errorToken(e)}},led:function(e,t){var n;switch(e){case _:var i=H.Dot;return this._lookahead(0)!==x?{type:"Subexpression",children:[t,n=this._parseDotRHS(i)]}:(this._advance(),{type:"ValueProjection",children:[t,n=this._parseProjectionRHS(i)]});case P:return n=this.expression(H.Pipe),{type:P,children:[t,n]};case"Or":return{type:"OrExpression",children:[t,n=this.expression(H.Or)]};case"And":return{type:"AndExpression",children:[t,n=this.expression(H.And)]};case j:for(var o,r=t.name,s=[];this._lookahead(0)!==m;)this._lookahead(0)===I?(o={type:I},this._advance()):o=this.expression(0),this._lookahead(0)===g&&this._match(g),s.push(o);return this._match(m),{type:"Function",name:r,children:s};case w:var a=this.expression(0);return this._match(f),{type:"FilterProjection",children:[t,n=this._lookahead(0)===M?{type:"Identity"}:this._parseProjectionRHS(H.Filter),a]};case M:return{type:"Projection",children:[{type:M,children:[t]},this._parseProjectionRHS(H.Flatten)]};case"EQ":case"NE":case"GT":case D:case"LT":case R:return this._parseComparator(t,e);case E:var l=this._lookaheadToken(0);return l.type===b||l.type===v?(n=this._parseIndexExpression(),this._projectIfSlice(t,n)):(this._match(x),this._match(f),{type:"Projection",children:[t,n=this._parseProjectionRHS(H.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),n=new Error("Expected "+e+", got: "+t.type);throw n.name="ParserError",n}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if(this._lookahead(0)===v||this._lookahead(1)===v)return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(f),e},_projectIfSlice:function(e,t){var n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[n,this._parseProjectionRHS(H.Star)]}:n},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,n=this._lookahead(0);n!==f&&t<3;){if(n===v)t++,this._advance();else{if(n!==b){var i=this._lookahead(0),o=new Error("Syntax error, unexpected token: "+i.value+"("+i.type+")");throw o.name="Parsererror",o}e[t]=this._lookaheadToken(0).value,this._advance()}n=this._lookahead(0)}return this._match(f),{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<=[u,p,x].indexOf(t)?this.expression(e):t===E?(this._match(E),this._parseMultiselectList()):t===C?(this._match(C),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(H[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===E)t=this.expression(e);else if(this._lookahead(0)===w)t=this.expression(e);else{if(this._lookahead(0)!==_){var n=this._lookaheadToken(0),i=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw i.name="ParserError",i}this._match(_),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==f;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===g&&(this._match(g),this._lookahead(0)===f))throw new Error("Unexpected token Rbracket")}return this._match(f),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,i=[],o=[u,p];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(v),n={type:"KeyValuePair",name:t,value:this.expression(0)},i.push(n),this._lookahead(0)===g)this._match(g);else if(this._lookahead(0)===y){this._match(y);break}}return{type:"MultiSelectHash",children:i}}},$.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,t){var n,i,o,r,s,a,l,c,h;switch(e.type){case"Field":return null===t?null:T(t)?void 0===(a=t[e.name])?null:a:null;case"Subexpression":for(o=this.visit(e.children[0],t),h=1;h<e.children.length;h++)if(null===(o=this.visit(e.children[1],o)))return null;return o;case"IndexExpression":return l=this.visit(e.children[0],t),this.visit(e.children[1],l);case"Index":if(!k(t))return null;var d=e.value;return d<0&&(d=t.length+d),void 0===(o=t[d])&&(o=null),o;case"Slice":if(!k(t))return null;var u=e.children.slice(0),p=this.computeSliceParams(t.length,u),f=p[0],m=p[1],g=p[2];if(o=[],0<g)for(h=f;h<m;h+=g)o.push(t[h]);else for(h=f;m<h;h+=g)o.push(t[h]);return o;case"Projection":var v=this.visit(e.children[0],t);if(!k(v))return null;for(c=[],h=0;h<v.length;h++)null!==(i=this.visit(e.children[1],v[h]))&&c.push(i);return c;case"ValueProjection":if(!T(v=this.visit(e.children[0],t)))return null;c=[];var y=function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n}(v);for(h=0;h<y.length;h++)null!==(i=this.visit(e.children[1],y[h]))&&c.push(i);return c;case"FilterProjection":if(!k(v=this.visit(e.children[0],t)))return null;var b=[],x=[];for(h=0;h<v.length;h++)N(n=this.visit(e.children[2],v[h]))||b.push(v[h]);for(var w=0;w<b.length;w++)null!==(i=this.visit(e.children[1],b[w]))&&x.push(i);return x;case"Comparator":switch(r=this.visit(e.children[0],t),s=this.visit(e.children[1],t),e.name){case"EQ":o=O(r,s);break;case"NE":o=!O(r,s);break;case"GT":o=s<r;break;case D:o=s<=r;break;case"LT":o=r<s;break;case R:o=r<=s;break;default:throw new Error("Unknown comparator: "+e.name)}return o;case M:var _=this.visit(e.children[0],t);if(!k(_))return null;var C=[];for(h=0;h<_.length;h++)k(i=_[h])?C.push.apply(C,i):C.push(i);return C;case"Identity":return t;case"MultiSelectList":if(null===t)return null;for(c=[],h=0;h<e.children.length;h++)c.push(this.visit(e.children[h],t));return c;case"MultiSelectHash":if(null===t)return null;var E;for(c={},h=0;h<e.children.length;h++)c[(E=e.children[h]).name]=this.visit(E.value,t);return c;case"OrExpression":return N(n=this.visit(e.children[0],t))&&(n=this.visit(e.children[1],t)),n;case"AndExpression":return!0===N(r=this.visit(e.children[0],t))?r:this.visit(e.children[1],t);case"NotExpression":return N(r=this.visit(e.children[0],t));case"Literal":return e.value;case P:return l=this.visit(e.children[0],t),this.visit(e.children[1],l);case I:return t;case"Function":var j=[];for(h=0;h<e.children.length;h++)j.push(this.visit(e.children[h],t));return this.runtime.callFunction(e.name,j);case"ExpressionReference":var S=e.children[0];return S.jmespathType=A,S;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var n=t[0],i=t[1],o=t[2],r=[null,null,null];if(null===o)o=1;else if(0===o){var s=new Error("Invalid slice, step cannot be 0");throw s.name="RuntimeError",s}var a=o<0;return n=null===n?a?e-1:0:this.capSliceRange(e,n,o),i=null===i?a?-1:e:this.capSliceRange(e,i,o),r[0]=n,r[1]=i,r[2]=o,r},capSliceRange:function(e,t,n){return t<0?(t+=e)<0&&(t=n<0?-1:0):e<=t&&(t=n<0?e-1:e),t}},q.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var i,o,r,s;if(n[n.length-1].variadic){if(t.length<n.length)throw i=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+n.length+i+" but received "+t.length)}else if(t.length!==n.length)throw i=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+n.length+i+" but received "+t.length);for(var a=0;a<n.length;a++){s=!1,o=n[a].types,r=this._getTypeName(t[a]);for(var l=0;l<o.length;l++)if(this._typeMatches(r,o[l],t[a])){s=!0;break}if(!s)throw new Error("TypeError: "+e+"() expected argument "+(a+1)+" to be type "+o+" but received type "+r+" instead.")}},_typeMatches:function(e,t,n){if(t===r)return!0;if(t!==d&&t!==l&&t!==a)return e===t;if(t===a)return e===a;if(e===a){var i;t===l?i=c:t===d&&(i=h);for(var o=0;o<n.length;o++)if(!this._typeMatches(this._getTypeName(n[o]),i,n[o]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return h;case"[object Number]":return c;case"[object Array]":return a;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return e.jmespathType===A?n:t}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],n=e[1];return-1!==t.indexOf(n,t.length-n.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===h){for(var t=e[0],n="",i=t.length-1;0<=i;i--)n+=t[i];return n}var o=e[0].slice(0);return o.reverse(),o},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],i=0;i<n.length;i++)t+=n[i];return t/n.length},_functionContains:function(e){return 0<=e[0].indexOf(e[1])},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return T(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,i=e[0],o=e[1],r=0;r<o.length;r++)t.push(n.visit(i,o[r]));return t},_functionMerge:function(e){for(var t={},n=0;n<e.length;n++){var i=e[n];for(var o in i)t[o]=i[o]}return t},_functionMax:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===c)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],i=1;i<t.length;i++)n.localeCompare(t[i])<0&&(n=t[i]);return n}return null},_functionMin:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===c)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],i=1;i<t.length;i++)t[i].localeCompare(n)<0&&(n=t[i]);return n}return null},_functionSum:function(e){for(var t=0,n=e[0],i=0;i<n.length;i++)t+=n[i];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case c:return"number";case h:return"string";case a:return"array";case t:return"object";case 5:return"boolean";case n:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],n=Object.keys(t),i=[],o=0;o<n.length;o++)i.push(t[n[o]]);return i},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===a?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===h?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,n=this._getTypeName(e[0]);return n===c?e[0]:n!==h||(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){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var o=this._interpreter,r=e[1],s=this._getTypeName(o.visit(r,t[0]));if([c,h].indexOf(s)<0)throw new Error("TypeError");for(var a=this,n=[],i=0;i<t.length;i++)n.push([i,t[i]]);n.sort(function(e,t){var n=o.visit(r,e[1]),i=o.visit(r,t[1]);if(a._getTypeName(n)!==s)throw new Error("TypeError: expected "+s+", received "+a._getTypeName(n));if(a._getTypeName(i)!==s)throw new Error("TypeError: expected "+s+", received "+a._getTypeName(i));return i<n?1:n<i?-1:e[0]-t[0]});for(var l=0;l<n.length;l++)t[l]=n[l][1];return t},_functionMaxBy:function(e){for(var t,n,i=e[1],o=e[0],r=this.createKeyFunction(i,[c,h]),s=-1/0,a=0;a<o.length;a++)s<(n=r(o[a]))&&(s=n,t=o[a]);return t},_functionMinBy:function(e){for(var t,n,i=e[1],o=e[0],r=this.createKeyFunction(i,[c,h]),s=1/0,a=0;a<o.length;a++)(n=r(o[a]))<s&&(s=n,t=o[a]);return t},createKeyFunction:function(i,o){var r=this,s=this._interpreter;return function(e){var t=s.visit(i,e);if(o.indexOf(r._getTypeName(t))<0){var n="TypeError: expected one of "+o+", received "+r._getTypeName(t);throw new Error(n)}return t}}},e.tokenize=function(e){return(new i).tokenize(e)},e.compile=function(e){return(new z).parse(e)},e.search=function(e,t){var n=new z,i=new q,o=new $(i);i._interpreter=o;var r=n.parse(t);return o.search(r,e)},e.strictDeepEqual=O}(t)},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(12),o=n.n(i),r=n(1),h=n(0);function s(e,t,s,n){var a=Array.isArray(t)?Object(h.getChildPaths)(t):[""],l=n&&n.path&&Object(h.contains)(a,n.path)?n.path:a[0],c=n&&n.direction||"asc",i='<div class="pico-modal-contents"><div class="pico-modal-header">'+Object(r.c)("sort")+"</div><form><table><tbody><tr> <td>"+Object(r.c)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+Object(r.c)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+Object(r.c)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+Object(r.c)("sortAscending")+'" title="'+Object(r.c)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+Object(r.c)("sortDescending")+'" title="'+Object(r.c)("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="'+Object(r.c)("ok")+'" /></td></tr></tbody></table></form></div>';o()({parent:e,content:i,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(t){var e=t.modalElem().querySelector("form"),n=t.modalElem().querySelector("#ok"),i=t.modalElem().querySelector("#field"),o=t.modalElem().querySelector("#direction");function r(e){o.value=e,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}a.forEach(function(e){var t=document.createElement("option");t.text=function(e){return""===e?"@":"."===e[0]?e.slice(1):e}(e),t.value=e,i.appendChild(t)}),i.value=l||a[0],r(c||"asc"),o.onclick=function(e){r(e.target.getAttribute("data-value"))},n.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.close(),s({path:i.value,direction:o.value})},e&&(e.onsubmit=n.onclick)}).afterClose(function(e){e.destroy()}).show()}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var f=n(3),m=n(1);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=function(){function p(e,t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p);for(var o={code:{text:Object(m.c)("modeCodeText"),title:Object(m.c)("modeCodeTitle"),click:function(){i("code")}},form:{text:Object(m.c)("modeFormText"),title:Object(m.c)("modeFormTitle"),click:function(){i("form")}},text:{text:Object(m.c)("modeTextText"),title:Object(m.c)("modeTextTitle"),click:function(){i("text")}},tree:{text:Object(m.c)("modeTreeText"),title:Object(m.c)("modeTreeTitle"),click:function(){i("tree")}},view:{text:Object(m.c)("modeViewText"),title:Object(m.c)("modeViewTitle"),click:function(){i("view")}},preview:{text:Object(m.c)("modePreviewText"),title:Object(m.c)("modePreviewTitle"),click:function(){i("preview")}}},r=[],s=0;s<t.length;s++){var a=t[s],l=o[a];if(!l)throw new Error('Unknown mode "'+a+'"');l.className="jsoneditor-type-modes"+(n===a?" jsoneditor-selected":""),r.push(l)}var c=o[n];if(!c)throw new Error('Unknown mode "'+n+'"');var h=c.text,d=document.createElement("button");d.type="button",d.className="jsoneditor-modes jsoneditor-separator",d.innerHTML=h+" &#x25BE;",d.title="Switch editor mode",d.onclick=function(){new f.a(r).show(d,e)};var u=document.createElement("div");u.className="jsoneditor-modes",u.style.position="relative",u.appendChild(d),e.appendChild(u),this.dom={container:e,box:d,frame:u}}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(p,[{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}}]),p}()},function(e,t,n){"use strict";var i=n(4),j=n.n(i),o=n(12),r=n.n(o),s=n(8),S=n.n(s),a=n(1);function l(e){return(l="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 k(e,t,n,i){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,n,i){for(var o=t?n+t:void 0,r=t?"[\n":"[",s=0;s<e.length;s++){var a=e[s];if(t&&(r+=o),r+=void 0!==a&&"function"!=typeof a?k(a,t,o,i):"null",s<e.length-1&&(r+=t?",\n":","),r.length>i)return r+"..."}return r+=t?"\n"+n+"]":"]"}(e,t,n,i):e&&"object"===l(e)?function(e,t,n,i){var o=t?n+t:void 0,r=!0,s=t?"{\n":"{";if("function"==typeof e.toJSON)return k(e.toJSON(),t,n,i);for(var a in e)if(c=e,h=a,Object.prototype.hasOwnProperty.call(c,h)){var l=e[a];if(r?r=!1:s+=t?",\n":",",s+=t?o+'"'+a+'": ':'"'+a+'":',(s+=k(l,t,o,i)).length>i)return s+"..."}var c,h;return s+=t?"\n"+n+"}":"}"}(e,t,n,i):void 0}function T(e,t){for(var n="";0<t--;)n+=e;return n}var O=n(0),N=n(2);function c(e,_,C){var E=_,t='<label class="pico-modal-contents"><div class="pico-modal-header">'+Object(a.c)("transform")+'</div><p>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>.</p><div class="jsoneditor-jmespath-label">'+Object(a.c)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+Object(a.c)("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="<">&lt;</option> <option value="<=">&lt;=</option> <option value=">">&gt;</option> <option value=">=">&gt;=</option> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" > <input placeholder="value..." id="filterValue" /> </div> </td> </tr> <tr> <th>'+Object(a.c)("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>'+Object(a.c)("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">'+Object(a.c)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+Object(a.c)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+Object(a.c)("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="'+Object(a.c)("ok")+'" autofocus /></div></div>';r()({parent:e,content:t,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(t){var e=t.modalElem(),n=e.querySelector("#wizard"),i=e.querySelector("#ok"),a=e.querySelector("#filterField"),l=e.querySelector("#filterRelation"),c=e.querySelector("#filterValue"),h=e.querySelector("#sortField"),d=e.querySelector("#sortOrder"),u=e.querySelector("#selectFields"),p=e.querySelector("#query"),o=e.querySelector("#preview");Array.isArray(E)||(n.style.fontStyle="italic",n.innerHTML="(wizard not available for objects, only for arrays)"),Object(O.getChildPaths)(_).forEach(function(e){var t=b(e),n=document.createElement("option");n.text=t,n.value=t,a.appendChild(n);var i=document.createElement("option");i.text=t,i.value=t,h.appendChild(i)});var r=Object(O.getChildPaths)(_,!0).filter(function(e){return""!==e});if(0<r.length)r.forEach(function(e){var t=b(e),n=document.createElement("option");n.text=t,n.value=t,u.appendChild(n)});else{var s=e.querySelector("#selectFieldsPart");s&&(s.style.display="none")}var f=new S.a(a,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),m=new S.a(l,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),g=new S.a(h,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),v=new S.a(d,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),y=new S.a(u,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function b(e){return""===e?"@":"."===e[0]?e.slice(1):e}function x(){if(a.value&&l.value&&c.value){var e=a.value,t="@"!==e?["0"].concat(Object(O.parsePath)("."+e)):["0"],n="string"==typeof Object(O.get)(E,t)?c.value:Object(O.parseString)(c.value);p.value="[? "+e+" "+l.value+" `"+JSON.stringify(n)+"`]"}else p.value="[*]";if(h.value&&d.value){var i=h.value;"desc"===d.value?p.value+=" | reverse(sort_by(@, &"+i+"))":p.value+=" | sort_by(@, &"+i+")"}if(u.value){for(var o=[],r=0;r<u.options.length;r++)if(u.options[r].selected){var s=u.options[r].value;o.push(s)}"]"!==p.value[p.value.length-1]&&(p.value+=" | [*]"),1===o.length?p.value+="."+o[0]:1<o.length&&(p.value+=".{"+o.map(
31
+ function(e){var t=e.split(".");return t[t.length-1]+": "+e}).join(", ")+"}")}w()}f.on("selectr.change",x),m.on("selectr.change",x),c.oninput=x,g.on("selectr.change",x),v.on("selectr.change",x),y.on("selectr.change",x),e.querySelector(".pico-modal-contents").onclick=function(e){"A"!==e.target.nodeName&&e.preventDefault()},p.value=Array.isArray(E)?"[*]":"@";var w=Object(O.debounce)(function(){try{var e=j.a.search(E,p.value);o.className="jsoneditor-transform-preview",o.value=function(e,t,n){var i;"number"==typeof t?10<t?i=T(" ",10):1<=t&&(i=T(" ",t)):"string"==typeof t&&""!==t&&(i=t);var o=k(e,i,"",n);return o.length>n?function(e,t){return"number"==typeof t?e.slice(0,t):e}(o,n)+"...":o}(e,2,N.b),i.disabled=!1}catch(e){o.className="jsoneditor-transform-preview jsoneditor-error",o.value=e.toString(),i.disabled=!0}},300);(p.oninput=w)(),i.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.close(),C(p.value)},setTimeout(function(){p.select(),p.focus(),p.selectionStart=3,p.selectionEnd=3})}).afterClose(function(e){e.destroy()}).show()}n.d(t,"a",function(){return c})},function(e,t,n){"use strict";function i(){}var o={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..."};i.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!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},i.mixin=function(e){for(var t=["on","off","emit"],n=0;n<t.length;n++)"function"==typeof e?e.prototype[t[n]]=i.prototype[t[n]]:e[t[n]]=i.prototype[t[n]];return e};var l={extend:function(e,t){var n;for(n in t=t||{},e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=e[n]));return t},each:function(e,t,n){if("[object Object]"===Object.prototype.toString.call(e))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(n,i,e[i],e);else for(var o=0,r=e.length;o<r;o++)t.call(n,o,e[o],e)},createElement:function(e,t){var n,i=document,o=i.createElement(e);if(t&&"[object Object]"===Object.prototype.toString.call(t))for(n in t)if(n in o)o[n]=t[n];else if("html"===n)o.innerHTML=t[n];else if("text"===n){var r=i.createTextNode(t[n]);o.appendChild(r)}else o.setAttribute(n,t[n]);return o},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){l.hasClass(e,t)||(e.classList?e.classList.add(t):e.className=e.className.trim()+" "+t)},removeClass:function(e,t){l.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:l.closest(e.parentNode,t))},isInt:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},debounce:function(i,o,r){var s;return function(){var e=this,t=arguments,n=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||i.apply(e,t)},o),n&&i.apply(e,t)}},rect:function(e,t){var n=window,i=e.getBoundingClientRect(),o=t?n.pageXOffset:0,r=t?n.pageYOffset:0;return{bottom:i.bottom+r,height:i.height,left:i.left+o,right:i.right+o,top:i.top+r,width:i.width}},includes:function(e,t){return-1<e.indexOf(t)},truncate:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}};function c(e,t){return e.hasOwnProperty(t)&&(!0===e[t]||e[t].length)}function r(e,t,n){e.parentNode?e.parentNode.parentNode||t.appendChild(e.parentNode):t.appendChild(e),l.removeClass(e,"excluded"),n||(e.innerHTML=e.textContent)}function s(){if(this.items.length){var n=document.createDocumentFragment();if(this.config.pagination){var e=this.pages.slice(0,this.pageIndex);l.each(e,function(e,t){l.each(t,function(e,t){r(t,n,this.customOption)},this)},this)}else l.each(this.items,function(e,t){r(t,n,this.customOption)},this);n.childElementCount&&(l.removeClass(this.items[this.navIndex],"active"),this.navIndex=n.querySelector(".selectr-option").idx,l.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(n)}}function h(e,t){t=t||e;var n=this.customOption?this.config.renderOption(t):e.textContent,i=l.createElement("li",{class:"selectr-option",html:n,role:"treeitem","aria-selected":!1});return i.idx=e.idx,this.items.push(i),e.defaultSelected&&this.defaultSelected.push(e.idx),e.disabled&&(i.disabled=!0,l.addClass(i,"disabled")),i}function a(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&l.removeClass(this.inputContainer,"active"),l.hasClass(this.container,"notice")&&(l.removeClass(this.container,"notice"),l.addClass(this.container,"open"),this.input.focus()),l.each(this.items,function(e,t){l.removeClass(t,"excluded"),this.customOption||(t.innerHTML=t.textContent)},this))}function d(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 u=function(){var e=this.tree,t=e.scrollTop;if(e.scrollHeight-e.offsetHeight<=t&&this.pageIndex<this.pages.length){var n=document.createDocumentFragment();l.each(this.pages[this.pageIndex],function(e,t){r(t,n,this.customOption)},this),e.appendChild(n),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length})}};d.prototype.render=function(e){if(!this.rendered){this.config=l.extend(o,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=c(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,i.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,c(this.config,"width")&&(l.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":l.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=l.createElement("div",{class:"selectr-container"}),this.config.customClass&&l.addClass(this.container,this.config.customClass),this.mobileDevice?l.addClass(this.container,"selectr-mobile"):l.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?l.addClass(this.el,"selectr-visible"):l.addClass(this.el,"selectr-hidden"),this.selected=l.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:1,"aria-expanded":!1}),this.label=l.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var e=l.createElement("div",{class:"selectr-options-container"});if(this.tree=l.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=l.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple&&(l.addClass(this.label,"selectr-tags"),l.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=l.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),l.addClass(this.container,"clearable")),this.config.taggable){var t=l.createElement("li",{class:"input-tag"});this.input=l.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),t.appendChild(this.input),this.label.appendChild(t),l.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators&&(this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators))}this.config.searchable&&(this.input=l.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),this.inputClear=l.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=l.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),e.appendChild(this.inputContainer)),e.appendChild(this.notice),e.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var n,i=!1,o=0;if(this.el.children.length&&l.each(this.el.children,function(e,t){"OPTGROUP"===t.nodeName?(i=l.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.label+"</li>"}),l.each(t.children,function(e,t){t.idx=o,i.appendChild(h.call(this,t,i)),o++},this)):(t.idx=o,h.call(this,t),o++)},this),this.config.data&&Array.isArray(this.config.data)){var r,s=!(this.data=[]);i=!1,o=0,l.each(this.config.data,function(e,t){c(t,"children")?(s=l.createElement("optgroup",{label:t.text}),i=l.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.text+"</li>"}),l.each(t.children,function(e,t){(r=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=c(t,"disabled"),this.options.push(r),s.appendChild(r),r.idx=o,i.appendChild(h.call(this,r,t)),this.data[o]=t,o++},this)):((r=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=c(t,"disabled"),this.options.push(r),r.idx=o,h.call(this,r,t),this.data[o]=t,o++)},this)}this.setSelected(!0);for(var a=this.navIndex=0;a<this.items.length;a++)if(n=this.items[a],!l.hasClass(n,"disabled")){l.addClass(n,"active"),this.navIndex=a;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(e),this.placeEl=l.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=l.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex);var t=this;setTimeout(function(){t.emit("selectr.init")},20)}},d.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},d.prototype.getSelectedProperties=function(t){var e=this.getSelected();return[].slice.call(e).map(function(e){return e[t]}).filter(function(e){return null!=e})},d.prototype.bindEvents=function(){var i=this;if(this.events={},this.events.dismiss=function(e){var t=e.target;this.container.contains(t)||!this.opened&&!l.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(e){if(e=e||window.event,this.items.length&&this.opened&&l.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,n=this.items[this.navIndex];switch(e.which){case 38:(t=0)<this.navIndex&&this.navIndex--;break;case 40:t=1,this.navIndex<this.items.length-1&&this.navIndex++}for(this.navigating=!0;l.hasClass(this.items[this.navIndex],"disabled")||l.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}}var i=l.rect(this.items[this.navIndex]);t?(0===this.navIndex?this.tree.scrollTop=0:i.top+i.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(i.top+i.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&u.call(this)):0===this.navIndex?this.tree.scrollTop=0:i.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(i.top-this.optsRect.top)),n&&l.removeClass(n,"active"),l.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(e){e.changedTouches[0].target===i.el&&i.toggle()}),(this.config.nativeDropdown||this.mobileDevice)&&this.container.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.target===i.el&&i.toggle()});this.el.addEventListener("change",function(e){if(i.el.multiple){var t=i.getSelectedProperties("idx"),n=function(e,t){for(var n,i=[],o=e.slice(0),r=0;r<t.length;r++)-1<(n=o.indexOf(t[r]))?o.splice(n,1):i.push(t[r]);return[i,o]}(i.selectedIndexes,t);l.each(n[0],function(e,t){i.select(t)},i),l.each(n[1],function(e,t){i.deselect(t)},i)}else-1<i.el.selectedIndex&&i.select(i.el.selectedIndex)})}this.config.nativeDropdown&&this.container.addEventListener("keydown",function(e){"Enter"===e.key&&i.selected===document.activeElement&&(i.toggle(),setTimeout(function(){i.el.focus()},200))}),this.selected.addEventListener("click",function(e){i.disabled||i.toggle(),e.preventDefault(),e.stopPropagation()}),this.label.addEventListener("click",function(e){l.hasClass(e.target,"selectr-tag-remove")&&i.deselect(e.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(e){e.preventDefault(),e.stopPropagation();var t=l.closest(e.target,function(e){return e&&l.hasClass(e,"selectr-option")});t&&(l.hasClass(t,"disabled")||(l.hasClass(t,"selected")?(i.el.multiple||!i.el.multiple&&i.config.allowDeselect)&&i.deselect(t.idx):i.select(t.idx),i.opened&&!i.el.multiple&&i.close()))}),this.tree.addEventListener("mouseover",function(e){l.hasClass(e.target,"selectr-option")&&(l.hasClass(e.target,"disabled")||(l.removeClass(i.items[i.navIndex],"active"),l.addClass(e.target,"active"),i.navIndex=[].slice.call(i.items).indexOf(e.target)))}),this.config.searchable&&(this.input.addEventListener("focus",function(e){i.searching=!0}),this.input.addEventListener("blur",function(e){i.searching=!1}),this.input.addEventListener("keyup",function(e){i.search(),i.config.taggable||(this.value.length?l.addClass(this.parentNode,"active"):l.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(e){i.input.value=null,a.call(i),i.tree.childElementCount||s.call(i)})),this.config.taggable&&this.input.addEventListener("keyup",function(e){if(i.search(),i.config.taggable&&this.value.length){var n=this.value.trim();if(13===e.which||l.includes(i.tagSeperators,e.key))l.each(i.tagSeperators,function(e,t){n=n.replace(t,"")}),i.add({value:n,text:n,selected:!0},!0)?(i.close(),a.call(i)):(this.value="",i.setMessage("That tag is already in use."))}}),this.update=l.debounce(function(){i.opened&&i.config.closeOnScroll&&i.close(),i.width&&(i.container.style.width=i.width),i.invert()},50),this.requiresPagination&&(this.paginateItems=l.debounce(function(){u.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)},d.prototype.setSelected=function(e){if(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),l.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);var n=0;l.each(this.config.data,function(e,t){c(t,"children")?l.each(t.children,function(e,t){t.hasOwnProperty("selected")&&!0===t.selected&&this.select(n),n++},this):(t.hasOwnProperty("selected")&&!0===t.selected&&this.select(n),n++)},this)}},d.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),"select-one"===this.originalType&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),l.removeClass(this.el,"selectr-hidden"),this.el.form&&l.off(this.el.form,"reset",this.events.reset),l.off(document,"click",this.events.dismiss),l.off(document,"keydown",this.events.navigate),l.off(window,"resize",this.update),l.off(window,"scroll",this.update),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1)},d.prototype.change=function(e){var t=this.items[e],n=this.options[e];n.disabled||(n.selected&&l.hasClass(t,"selected")?this.deselect(e):this.select(e),this.opened&&!this.el.multiple&&this.close())},d.prototype.select=function(i){var e=this.items[i],t=[].slice.call(this.el.options),n=this.options[i];if(this.el.multiple){if(l.includes(this.selectedIndexes,i))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(i),function(e){var c,h=this,n=document.createDocumentFragment(),t=this.options[e.idx],i=this.data?this.data[e.idx]:t,o=this.customSelected?this.config.renderSelection(i):t.textContent,r=l.createElement("li",{class:"selectr-tag",html:o}),s=l.createElement("button",{class:"selectr-tag-remove",type:"button"});if(r.appendChild(s),r.idx=e.idx,r.tag=t.value,this.tags.push(r),this.config.sortSelected){var a=this.tags.slice();c=function(e,i){e.replace(/(\d+)|(\D+)/g,function(e,t,n){i.push([t||1/0,n||""])})},a.sort(function(e,t){var n,i,o=[],r=[];for(!0===h.config.sortSelected?(n=e.tag,i=t.tag):"text"===h.config.sortSelected&&(n=e.textContent,i=t.textContent),c(n,o),c(i,r);o.length&&r.length;){var s=o.shift(),a=r.shift(),l=s[0]-a[0]||s[1].localeCompare(a[1]);if(l)return l}return o.length-r.length}),l.each(a,function(e,t){n.appendChild(t)}),this.label.innerHTML=""}else n.appendChild(r);this.config.taggable?this.label.insertBefore(n,this.input.parentNode):this.label.appendChild(n)}.call(this,e)}else{var o=this.data?this.data[i]:n;this.label.innerHTML=this.customSelected?this.config.renderSelection(o):n.textContent,this.selectedValue=n.value,this.selectedIndex=i,l.each(this.options,function(e,t){var n=this.items[e];e!==i&&(n&&l.removeClass(n,"selected"),t.selected=!1,t.removeAttribute("selected"))},this)}l.includes(t,n)||this.el.add(n),e.setAttribute("aria-selected",!0),l.addClass(e,"selected"),l.addClass(this.container,"has-selected"),n.selected=!0,n.setAttribute("selected",""),this.emit("selectr.change",n),this.emit("selectr.select",n)},d.prototype.deselect=function(e,t){var n=this.items[e],i=this.options[e];if(this.el.multiple){var o=this.selectedIndexes.indexOf(e);this.selectedIndexes.splice(o,1);var r=this.selectedValues.indexOf(i.value);this.selectedValues.splice(r,1),function(n){var i=!1;l.each(this.tags,function(e,t){t.idx===n.idx&&(i=t)},this),i&&(this.label.removeChild(i),this.tags.splice(this.tags.indexOf(i),1))}.call(this,n),this.tags.length||l.removeClass(this.container,"has-selected")}else{if(!t&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,l.removeClass(this.container,"has-selected")}this.items[e].setAttribute("aria-selected",!1),l.removeClass(this.items[e],"selected"),i.selected=!1,i.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",i)},d.prototype.setValue=function(n){var i=Array.isArray(n);if(i||(n=n.toString().trim()),!this.el.multiple&&i)return!1;l.each(this.options,function(e,t){(i&&l.includes(n.toString(),t.value)||t.value===n)&&this.change(t.idx)},this)},d.prototype.getValue=function(e,t){var i;if(this.el.multiple)e?this.selectedIndexes.length&&(i={values:[]},l.each(this.selectedIndexes,function(e,t){var n=this.options[t];i.values[e]={value:n.value,text:n.textContent}},this)):i=this.selectedValues.slice();else if(e){var n=this.options[this.selectedIndex];i={value:n.value,text:n.textContent}}else i=this.selectedValue;return e&&t&&(i=JSON.stringify(i)),i},d.prototype.add=function(n,i){if(n){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(n))l.each(n,function(e,t){this.add(t,i)},this);else if("[object Object]"===Object.prototype.toString.call(n)){if(i){var o=!1;if(l.each(this.options,function(e,t){t.value.toLowerCase()===n.value.toLowerCase()&&(o=!0)}),o)return!1}var e=l.createElement("option",n);return this.data.push(n),this.options.push(e),e.idx=0<this.options.length?this.options.length-1:0,h.call(this,e),n.selected&&this.select(e.idx),e}return this.setPlaceholder(),this.config.pagination&&this.paginate(),!0}},d.prototype.remove=function(n){var i,o=[];Array.isArray(n)?l.each(n,function(e,t){l.isInt(t)?o.push(this.getOptionByIndex(t)):"string"==typeof n&&o.push(this.getOptionByValue(t))},this):l.isInt(n)?o.push(this.getOptionByIndex(n)):"string"==typeof n&&o.push(this.getOptionByValue(n)),o.length&&(l.each(o,function(e,t){i=t.idx,this.el.remove(t),this.options.splice(i,1);var n=this.items[i].parentNode;n&&n.removeChild(this.items[i]),this.items.splice(i,1),l.each(this.options,function(e,t){t.idx=e,this.items[e].idx=e},this)},this),this.setPlaceholder(),this.config.pagination&&this.paginate())},d.prototype.removeAll=function(){this.clear(!0),l.each(this.el.options,function(e,t){this.el.remove(t)},this),l.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},d.prototype.search=function(i){if(!this.navigating){i=i||this.input.value;var o=document.createDocumentFragment();if(this.removeMessage(),l.truncate(this.tree),1<i.length)if(l.each(this.options,function(e,t){var n=this.items[t.idx];l.includes(t.textContent.toLowerCase(),i.toLowerCase())&&!t.disabled?(r(n,o,this.customOption),l.removeClass(n,"excluded"),this.customOption||(n.innerHTML=function(e,t){var n=new RegExp(e,"i").exec(t.textContent);return!!n&&t.textContent.replace(n[0],"<span class='selectr-match'>"+n[0]+"</span>")}(i,t))):l.addClass(n,"excluded")},this),o.childElementCount){var e=this.items[this.navIndex],t=o.firstElementChild;l.removeClass(e,"active"),this.navIndex=t.idx,l.addClass(t,"active")}else this.config.taggable||this.setMessage("no results.");else s.call(this);this.tree.appendChild(o)}},d.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},d.prototype.open=function(){var e=this;return!!this.options.length&&(this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(l.addClass(this.container,"native-open"),void(this.config.data&&l.each(this.options,function(e,t){this.el.add(t)},this))):(l.addClass(this.container,"open"),s.call(this),this.invert(),this.tree.scrollTop=0,l.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))))},d.prototype.close=function(){if(this.opened&&this.emit("selectr.close"),this.opened=!1,this.mobileDevice||this.config.nativeDropdown)l.removeClass(this.container,"native-open");else{var e=l.hasClass(this.container,"notice");this.config.searchable&&!e&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),e&&(l.removeClass(this.container,"notice"),this.notice.textContent=""),l.removeClass(this.container,"open"),l.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),l.truncate(this.tree),a.call(this)}},d.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&l.each(this.tags,function(e,t){t.lastElementChild.tabIndex=0}),l.removeClass(this.container,"selectr-disabled")},d.prototype.disable=function(e){e||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&l.each(this.tags,function(e,t){t.lastElementChild.tabIndex=-1}),this.disabled=!0,l.addClass(this.container,"selectr-disabled")},d.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),l.each(this.defaultSelected,function(e,t){this.select(t)},this),this.emit("selectr.reset"))},d.prototype.clear=function(e){if(this.el.multiple){if(this.selectedIndexes.length){var t=this.selectedIndexes.slice();l.each(t,function(e,t){this.deselect(t)},this)}}else-1<this.selectedIndex&&this.deselect(this.selectedIndex,e);this.emit("selectr.clear")},d.prototype.serialise=function(e){var i=[];return l.each(this.options,function(e,t){var n={value:t.value,text:t.textContent};t.selected&&(n.selected=!0),t.disabled&&(n.disabled=!0),i[e]=n}),e?JSON.stringify(i):i},d.prototype.serialize=function(e){return this.serialise(e)},d.prototype.setPlaceholder=function(e){e=e||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(e="No options available"),this.placeEl.innerHTML=e},d.prototype.paginate=function(){if(this.items.length){var n=this;return this.pages=this.items.map(function(e,t){return t%n.config.pagination==0?n.items.slice(t,t+n.config.pagination):null}).filter(function(e){return e}),this.pages}},d.prototype.setMessage=function(e,t){t&&this.close(),l.addClass(this.container,"notice"),this.notice.textContent=e},d.prototype.removeMessage=function(){l.removeClass(this.container,"notice"),this.notice.innerHTML=""},d.prototype.invert=function(){var e=l.rect(this.selected),t=this.tree.parentNode.offsetHeight,n=window.innerHeight;e.top+e.height+t>n?(l.addClass(this.container,"inverted"),this.isInverted=!0):(l.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=l.rect(this.tree)},d.prototype.getOptionByIndex=function(e){return this.options[e]},d.prototype.getOptionByValue=function(e){for(var t=!1,n=0,i=this.options.length;n<i;n++)if(this.options[n].value.trim()===e.toString().trim()){t=this.options[n];break}return t},e.exports=d},function(e,t){e.exports=function t(e,n){"use strict";function i(e){return t.insensitive&&(""+e).toLowerCase()||""+e}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,h=/^0/,d=i(e).replace(a,"")||"",u=i(n).replace(a,"")||"",p=d.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),f=u.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(d.match(c),16)||1!==p.length&&d.match(l)&&Date.parse(d),g=parseInt(u.match(c),16)||m&&u.match(l)&&Date.parse(u)||null;if(g){if(m<g)return-1;if(g<m)return 1}for(var v=0,y=Math.max(p.length,f.length);v<y;v++){if(o=!(p[v]||"").match(h)&&parseFloat(p[v])||p[v]||0,r=!(f[v]||"").match(h)&&parseFloat(f[v])||f[v]||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}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var u=n(0);function i(o,e,r){var t=3<arguments.length&&void 0!==arguments[3]&&arguments[3],s=function(e){return"function"==typeof e.getRootNode?e.getRootNode():window}(o),a={},n=o.getBoundingClientRect(),i=e.getBoundingClientRect(),l=document.createElement("div");function c(){if(l&&l.parentNode){for(var e in l.parentNode.removeChild(l),a)if(n=a,i=e,Object.prototype.hasOwnProperty.call(n,i)){var t=a[e];t&&Object(u.removeEventListener)(s,e,t),delete a[e]}"function"==typeof r&&r(o)}var n,i}function h(e){!function(e){return e!==l&&!Object(u.isChildOf)(e,l)}(e.target)||c()}if(l.className="jsoneditor-anchor",l.style.position="absolute",l.style.left=n.left-i.left+"px",l.style.top=n.top-i.top+"px",l.style.width=n.width-2+"px",l.style.height=n.height-2+"px",l.style.boxSizing="border-box",e.appendChild(l),a.mousedown=Object(u.addEventListener)(s,"mousedown",h),a.mousewheel=Object(u.addEventListener)(s,"mousewheel",h),t){var d=null;l.onmouseover=function(){clearTimeout(d),d=null},l.onmouseout=function(){d=d||setTimeout(c,200)}}return l.destroy=c,l}},function(e,t,n){var i;if(window.Picker)i=window.Picker;else try{i=n(!function(){var e=new Error("Cannot find module 'vanilla-picker'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}e.exports=i},function(e,t,n){var i,o,r;!function(){"use strict";o=[],void 0===(r="function"==typeof(i=function(){"use strict";function g(e){if(typeof Node==="object"){return e instanceof Node}else{return e&&typeof e==="object"&&typeof e.nodeType==="number"}}function e(e){return"string"==typeof e}function v(){var r=[];return{watch:r.push.bind(r),trigger:function(e,t){var n=true;var i={detail:t,preventDefault:function e(){n=false}};for(var o=0;o<r.length;o++){r[o](e,i)}return n}}}function y(e){return window.getComputedStyle(e).display==="none"}function b(e){this.elem=e}function t(e,t){return b.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()})}b.make=function(e,t){if(typeof e==="string"){e=document.querySelector(e)}var n=document.createElement(t||"div");(e||document.body).appendChild(n);return new b(n)},b.prototype={child:function(e){return b.make(this.elem,e)},stylize:function(e){e=e||{};if(typeof e.opacity!=="undefined"){e.filter="alpha(opacity="+e.opacity*100+")"}for(var t in e){if(e.hasOwnProperty(t)){this.elem.style[t]=e[t]}}return this},clazz:function(e){this.elem.className+=" "+e;return this},html:function(e){if(g(e)){this.elem.appendChild(e)}else{this.elem.innerHTML=e}return this},onClick:function(e){this.elem.addEventListener("click",e);return 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){if(t!==undefined){this.elem.setAttribute(e,t)}return this},anyAncestor:function(e){var t=this.elem;while(t){if(e(new b(t))){return true}else{t=t.parentNode}}return false},isVisible:function(){return!y(this.elem)}};var x=1;function n(e,t){var n=e("width","auto");if("number"==typeof n)n+="px";var i=e("modalId","pico-"+x++);return b.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:n,"-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",i).attr("role","dialog").attr("aria-labelledby",e("ariaLabelledBy")).attr("aria-describedby",e("ariaDescribedBy",i)).onClick(function(e){new b(e.target).anyAncestor(function(e){return/\bpico-close\b/.test(e.elem.className)})&&t()})}function i(e,t){if(t("closeButton",!0))return e.child("button").html(t("closeHtml","&#xD7;")).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 w(e){return function(){return e().elem}}var _=v(),C=v();function o(i,o){function t(e,t){return(e.msMatchesSelector||e.webkitMatchesSelector||e.matches).call(e,t)}function r(e){return!(y(e)||t(e,":disabled")||e.hasAttribute("contenteditable"))&&(e.hasAttribute("tabindex")||t(e,"input,select,textarea,button,a[href],area[href],iframe"))}function s(e){for(var t=e.getElementsByTagName("*"),n=0;n<t.length;n++)if(r(t[n]))return t[n]}function r(e){for(var t=e.getElementsByTagName("*"),n=t.length;n--;)if(r(t[n]))return t[n]}var e;i.beforeShow(function(){e=document.activeElement}),i.afterShow(function(){if(o()){var e=s(i.modalElem());e&&e.focus()}}),i.afterClose(function(){o()&&e&&e.focus(),e=null}),C.watch(function(e){if(o()&&i.isVisible()){var t=s(i.modalElem()),n=function(e){for(var t=e.getElementsByTagName("*"),n=t.length;n--;)if(r(t[n]))return t[n]}(i.modalElem());(e.shiftKey?t:n)===document.activeElement&&((e.shiftKey?n:t).focus(),e.preventDefault())}})}function r(e,t){var n,i=new b(document.body);e.beforeShow(function(){n=i.elem.style.overflow,t()&&i.stylize({overflow:"hidden"})}),e.afterClose(function(){i.stylize({overflow:n})})}return document.documentElement.addEventListener("keydown",function(e){var t=e.which||e.keyCode;27===t?_.trigger():9===t&&C.trigger(e)}),function(i){(function(e){return"string"==typeof e}(i)||g(i))&&(i={content:i});var o=v(),t=v(),n=v(),r=v(),s=v();function a(e,t){var n=i[e];return"function"==typeof n&&(n=n(t)),void 0===n?t:n}var l,c,h=m.bind(window,"modal"),d=m.bind(window,"overlay"),u=m.bind(window,"close");function p(e){d().hide(),h().hide(),s.trigger(l,e)}function f(e){r.trigger(l,e)&&p(e)}function e(e){return function(){return e.apply(this,arguments),l}}function m(e,t){if(!c){var n=function(e,t){var n=e("width","auto");"number"==typeof n&&(n+="px");var i=e("modalId","pico-"+x++);return b.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:n,"-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",i).attr("role","dialog").attr("aria-labelledby",e("ariaLabelledBy")).attr("aria-describedby",e("ariaDescribedBy",i)).onClick(function(e){new b(e.target).anyAncestor(function(e){return/\bpico-close\b/.test(e.elem.className)})&&t()})}(a,f);c={modal:n,overlay:function(e,t){return b.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()})}(a,f),close:function(e,t){if(t("closeButton",!0))return e.child("button").html(t("closeHtml","&#xD7;")).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"))}(n,a)},o.trigger(l,t)}return c[e]}return function(i,o){function t(e,t){return(e.msMatchesSelector||e.webkitMatchesSelector||e.matches).call(e,t)}function r(e){return!(y(e)||t(e,":disabled")||e.hasAttribute("contenteditable"))&&(e.hasAttribute("tabindex")||t(e,"input,select,textarea,button,a[href],area[href],iframe"))}function s(e){for(var t=e.getElementsByTagName("*"),n=0;n<t.length;n++)if(r(t[n]))return t[n]}var e;i.beforeShow(function(){e=document.activeElement}),i.afterShow(function(){if(o()){var e=s(i.modalElem());e&&e.focus()}}),i.afterClose(function(){o()&&e&&e.focus(),e=null}),C.watch(function(e){if(o()&&i.isVisible()){var t=s(i.modalElem()),n=function(e){for(var t=e.getElementsByTagName("*"),n=t.length;n--;)if(r(t[n]))return t[n]}(i.modalElem());(e.shiftKey?t:n)===document.activeElement&&((e.shiftKey?n:t).focus(),e.preventDefault())}})}(l={modalElem:w(h),closeElem:w(u),overlayElem:w(d),buildDom:e(m.bind(null,null)),isVisible:function(){return!!(c&&h&&h().isVisible())},show:function(e){return t.trigger(l,e)&&(d().show(),u(),h().show(),n.trigger(l,e)),this},close:e(f),forceClose:e(p),destroy:function(){h().destroy(),d().destroy(),d=h=u=void 0},options:function(t){Object.keys(t).map(function(e){i[e]=t[e]})},afterCreate:e(o.watch),beforeShow:e(t.watch),afterShow:e(n.watch),beforeClose:e(r.watch),afterClose:e(s.watch)},a.bind(null,"focus",!0)),function(e,t){var n,i=new b(document.body);e.beforeShow(function(){n=i.elem.style.overflow,t()&&i.stylize({overflow:"hidden"})}),e.afterClose(function(){i.stylize({overflow:n})})}(l,a.bind(null,"bodyOverflow",!0)),_.watch(function(){a("escCloses",!0)&&l.isVisible()&&l.close()}),l}})?i.apply(t,o):i)||(e.exports=r)}()},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}n.d(t,"a",function(){return o});var o=function(){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.errorTableVisible=e.errorTableVisible,this.onToggleVisibility=e.onToggleVisibility,this.onFocusLine=e.onFocusLine||function(){},this.onChangeHeight=e.onChangeHeight,this.dom={};var t=document.createElement("div");t.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=t;var n=document.createElement("div");n.style.display="none",n.className="jsoneditor-additional-errors fadein",n.innerHTML="Scroll for more &#9663;",this.dom.additionalErrorsIndication=n,t.appendChild(n);var i=document.createElement("span");i.className="jsoneditor-validation-error-icon",i.style.display="none",this.dom.validationErrorIcon=i;var o=document.createElement("span");o.className="jsoneditor-validation-error-count",o.style.display="none",this.dom.validationErrorCount=o,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(r,[{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,r){var s=this;if(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){var t=document.createElement("div");t.className="jsoneditor-validation-errors",t.innerHTML='<table class="jsoneditor-text-errors"><tbody></tbody></table>';var a=t.getElementsByTagName("tbody")[0];e.forEach(function(t){var e,n;if(e="string"==typeof t?'<td colspan="2"><pre>'+t+"</pre></td>":"<td>"+(t.dataPath||"")+"</td><td><pre>"+t.message+"</pre></td>",isNaN(t.line)){if(t.dataPath){var i=r.find(function(e){return e.path===t.dataPath});i&&(n=i.line+1)}}else n=t.line;var o=document.createElement("tr");o.className=isNaN(n)?"":"jump-to-line","error"===t.type?o.className+=" parse-error":o.className+=" validation-error",o.innerHTML='<td><button class="jsoneditor-schema-error"></button></td><td style="white-space:nowrap;">'+(isNaN(n)?"":"Ln "+n)+"</td>"+e,o.onclick=function(){s.onFocusLine(n)},a.appendChild(o)}),this.dom.validationErrors=t,this.dom.validationErrorsContainer.appendChild(t),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(){s.dom.additionalErrorsIndication.style.display=0<s.dom.validationErrorsContainer.clientHeight&&0===s.dom.validationErrorsContainer.scrollTop?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0;var n=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0);this.onChangeHeight(n)}else this.onChangeHeight(0);var i=e.filter(function(e){return"error"!==e.type}).length;if(0<i?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=i,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=i+" 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})){var o=e[0].line;this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(o)?"parse error - check that the json is valid":"parse error on line "+o}else this.dom.parseErrorIndication.style.display="none"}}]),r}()},function(e,t,n){var i;if(window.ace)i=window.ace;else try{i=n(!function(){var e=new Error("Cannot find module 'brace'");throw e.code="MODULE_NOT_FOUND",e}()),n(21),n(23)}catch(e){}e.exports=i},function(e,t,n){"use strict";n.r(t);var i=n(14),_=n.n(i),o=n(4),r=n.n(o),C=n(1),E=n(6),j=n(13),S=n(0);var s=n(5),a=n(7),l=n(2),k=n(19);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"textModeMixins",function(){return d});var c={},O="ace/theme/jsoneditor";function h(){try{this.format()}catch(e){}}c.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,(this.options=t).indentation?this.indentation=Number(t.indentation):this.indentation=2;var n=t.ace?t.ace:_.a;this.mode="code"===t.mode?"code":"text","code"===this.mode&&void 0===n&&(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=t.theme||O,this.theme===O&&n&&Object(k.tryRequireThemeJsonEditor)(),t.onTextSelectionChange&&this.onTextSelectionChange(t.onTextSelectionChange);var i=this;if(this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this._debouncedValidate=Object(S.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-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){i._onKeyDown(e)},this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar){Object(S.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var o=document.createElement("button");o.type="button",o.className="jsoneditor-format",o.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(o),o.onclick=function(){try{i.format(),i._onChange()}catch(e){i._onError(e)}};var r=document.createElement("button");if(r.type="button",r.className="jsoneditor-compact",r.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(r),r.onclick=function(){try{i.compact(),i._onChange()}catch(e){i._onError(e)}},this.options.enableSort){var s=document.createElement("button");s.type="button",s.className="jsoneditor-sort",s.title=Object(C.c)("sortTitleShort"),s.onclick=function(){i._showSortModal()},this.menu.appendChild(s)}if(this.options.enableTransform){var a=document.createElement("button");a.type="button",a.title=Object(C.c)("transformTitleShort"),a.className="jsoneditor-transform",a.onclick=function(){i._showTransformModal()},this.menu.appendChild(a)}var l=document.createElement("button");if(l.type="button",l.className="jsoneditor-repair",l.title="Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",this.menu.appendChild(l),l.onclick=function(){try{i.repair(),i._onChange()}catch(e){i._onError(e)}},this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new E.a(this.menu,this.options.modes,this.options.mode,function(e){i.setMode(e),i.modeSwitcher.focus()})),"code"===this.mode){var c=document.createElement("a");c.appendChild(document.createTextNode("powered by ace")),c.href="http://ace.ajax.org",c.target="_blank",c.className="jsoneditor-poweredBy",c.onclick=function(){window.open(c.href,c.target)},this.menu.appendChild(c)}}var h=this.options.onEditable&&T("function"===this.options.onEditable)&&!this.options.onEditable({});if(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);var d=n.edit(this.editorDom),u=d.getSession();d.$blockScrolling=1/0,d.setTheme(this.theme),d.setOptions({readOnly:h}),d.setShowPrintMargin(!1),d.setFontSize(13),u.setMode("ace/mode/json"),u.setTabSize(this.indentation),u.setUseSoftTabs(!0),u.setUseWrapMode(!0);var p=u.setAnnotations;u.setAnnotations=function(e){p.call(this,e&&e.length?e:i.annotations)},d.commands.bindKey("Ctrl-L",null),d.commands.bindKey("Command-L",null),(this.aceEditor=d).on("change",this._onChange.bind(this)),d.on("changeSelection",this._onSelect.bind(this))}else{var f=document.createElement("textarea");f.className="jsoneditor-text",f.spellcheck=!1,this.content.appendChild(f),this.textarea=f,this.textarea.readOnly=h,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),f.onselect=this._onSelect.bind(this),f.onmousedown=this._onMouseDown.bind(this),f.onblur=this._onBlur.bind(this)}if(this.errorTable=new j.a({errorTableVisible:"text"===this.mode,onToggleVisibility:function(){i.validate()},onFocusLine:function(e){i.isFocused=!0,isNaN(e)||i.setTextSelection({row:e,column:1},{row:e,column:1e3})},onChangeHeight:function(e){var t=e+(i.dom.statusBar?i.dom.statusBar.clientHeight:0)+1;i.content.style.marginBottom=-t+"px",i.content.style.paddingBottom=t+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),t.statusBar){Object(S.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={};var m=document.createElement("div");(this.dom.statusBar=m).className="jsoneditor-statusbar",this.frame.appendChild(m);var g=document.createElement("span");g.className="jsoneditor-curserinfo-label",g.innerText="Ln:";var v=document.createElement("span");v.className="jsoneditor-curserinfo-val",v.innerText="1",m.appendChild(g),m.appendChild(v);var y=document.createElement("span");y.className="jsoneditor-curserinfo-label",y.innerText="Col:";var b=document.createElement("span");b.className="jsoneditor-curserinfo-val",b.innerText="1",m.appendChild(y),m.appendChild(b),this.curserInfoElements.colVal=b,this.curserInfoElements.lnVal=v;var x=document.createElement("span");x.className="jsoneditor-curserinfo-label",x.innerText="characters selected",x.style.display="none";var w=document.createElement("span");w.className="jsoneditor-curserinfo-count",w.innerText="0",w.style.display="none",this.curserInfoElements.countLabel=x,this.curserInfoElements.countVal=w,m.appendChild(w),m.appendChild(x),m.appendChild(this.errorTable.getErrorCounter()),m.appendChild(this.errorTable.getWarningIcon()),m.appendChild(this.errorTable.getErrorIcon())}this.setSchema(this.options.schema,this.options.schemaRefs)},c._onChange=function(){if(!this.onChangeDisabled){if(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)}}},c._showSortModal=function(){var i=this,e=this.options.modalAnchor||l.a,o=this.get();Object(s.a)(e,o,function(e){if(Array.isArray(o)){var t=Object(S.sort)(o,e.path,e.direction);i.sortedBy=e,i.set(t)}if(Object(S.isObject)(o)){var n=Object(S.sortObjectKeys)(o,e.direction);i.sortedBy=e,i.set(n)}},i.sortedBy)},c._showTransformModal=function(){var n=this,e=this.options.modalAnchor||l.a,i=this.get();Object(a.a)(e,i,function(e){var t=r.a.search(i,e);n.set(t)})},c._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},c._onKeyDown=function(e){var t=!1;220===(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()},c._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},c._onBlur=function(){var e=this;setTimeout(function(){e.isFocused||(e._updateCursorInfo(),e._emitSelectionChange()),e.isFocused=!1})},c._updateCursorInfo=function(){var t,n,i,o=this;if(this.textarea)setTimeout(function(){var e=Object(S.getInputSelection)(o.textarea);e.startIndex!==e.endIndex&&(i=e.endIndex-e.startIndex),n=i&&o.cursorInfo&&o.cursorInfo.line===e.end.row&&o.cursorInfo.column===e.end.column?(t=e.start.row,e.start.column):(t=e.end.row,e.end.column),o.cursorInfo={line:t,column:n,count:i},o.options.statusBar&&s()},0);else if(this.aceEditor&&this.curserInfoElements){var e=this.aceEditor.getCursorPosition(),r=this.aceEditor.getSelectedText();t=e.row+1,n=e.column+1,i=r.length,o.cursorInfo={line:t,column:n,count:i},this.options.statusBar&&s()}function s(){o.curserInfoElements.countVal.innerText!==i&&(o.curserInfoElements.countVal.innerText=i,o.curserInfoElements.countVal.style.display=i?"inline":"none",o.curserInfoElements.countLabel.style.display=i?"inline":"none"),o.curserInfoElements.lnVal.innerText=t,o.curserInfoElements.colVal.innerText=n}},c._emitSelectionChange=function(){if(this._selectionChangedHandler){var e=this.getTextSelection();this._selectionChangedHandler(e.start,e.end,e.text)}},c._refreshAnnotations=function(){var e=this.aceEditor&&this.aceEditor.getSession();if(e){var t=e.getAnnotations().filter(function(e){return"error"===e.type});e.setAnnotations(t)}},c.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},c.compact=function(){var e=this.get(),t=JSON.stringify(e);this._setText(t,!1)},c.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this._setText(t,!1)},c.repair=function(){var e=this.getText(),t=Object(S.repair)(e);this._setText(t,!1)},c.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},c.resize=function(){if(this.aceEditor){this.aceEditor.resize(!1)}},c.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},c.update=function(e){this.updateText(JSON.stringify(e,null,this.indentation))},c.get=function(){var e=this.getText();return Object(S.parse)(e)},c.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},c._setText=function(e,t){var n=!0===this.options.escapeUnicode?Object(S.escapeUnicodeChars)(e):e;if(this.textarea&&(this.textarea.value=n),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(n,-1),this.onChangeDisabled=!1,t)){var i=this;setTimeout(function(){i.aceEditor&&i.aceEditor.session.getUndoManager().reset()},0)}this._debouncedValidate()},c.setText=function(e){this._setText(e,!0)},c.updateText=function(e){this.getText()!==e&&this._setText(e,!1)},c.validate=function(){var e,n=[],i=[];try{if(e=this.get(),this.validateSchema)this.validateSchema(e)||(n=this.validateSchema.errors.map(function(e){return e.type="validation",Object(S.improveSchemaError)(e)}));this.validationSequence=(this.validationSequence||0)+1;var o=this,r=this.validationSequence;(function(e,t){if(!t)return Promise.resolve([]);try{var n=t(e);return(Object(S.isPromise)(n)?n:Promise.resolve(n)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=Object(S.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:Object(S.stringifyPath)(e.path),message:e.message}}):[]})}catch(e){return Promise.reject(e)}})(e,this.options.onValidate).then(function(e){if(r===o.validationSequence){var t=n.concat(i).concat(e);o._renderErrors(t)}}).catch(function(e){console.error("Custom validation function did throw an error",e)})}catch(e){if(this.getText()){var t,s=/\w*line\s*(\d+)\w*/g.exec(e.message);s&&(t=+s[1]),i=[{type:"error",message:e.message.replace(/\n/g,"<br>"),line:t}]}this._renderErrors(i)}},c._renderErrors=function(i){var e=this.getText(),t=[];i.reduce(function(e,t){return-1===e.indexOf(t.dataPath)&&e.push(t.dataPath),e},t);var n=Object(S.getPositionForPath)(e,t);if(this.aceEditor&&(this.annotations=n.map(function(t){var e=i.filter(function(e){return e.dataPath===t.path}),n=e.map(function(e){return e.message}).join("\n");return n?{row:t.line,column:t.column,text:"Schema validation error"+(1!==e.length?"s":"")+": \n"+n,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(i,n),this.aceEditor){this.aceEditor.resize(!1)}},c.getTextSelection=function(){var e={};if(this.textarea){var t=Object(S.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 n=this.aceEditor.getSelection(),i=this.aceEditor.getSelectedText(),o=n.getRange(),r=n.getSelectionLead();return r.row===o.end.row&&r.column===o.end.column?e=o:(e.start=o.end,e.end=o.start),{start:{row:e.start.row+1,column:e.start.column+1},end:{row:e.end.row+1,column:e.end.column+1},text:i}}},c.onTextSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=Object(S.debounce)(e,this.DEBOUNCE_INTERVAL))},c.setTextSelection=function(e,t){if(e&&t)if(this.textarea){var n=Object(S.getIndexForPosition)(this.textarea,e.row,e.column),i=Object(S.getIndexForPosition)(this.textarea,t.row,t.column);if(-1<n&&-1<i){if(this.textarea.setSelectionRange)this.textarea.focus(),this.textarea.setSelectionRange(n,i);else if(this.textarea.createTextRange){var o=this.textarea.createTextRange();o.collapse(!0),o.moveEnd("character",i),o.moveStart("character",n),o.select()}var r=(this.textarea.value.match(/\n/g)||[]).length+1,s=this.textarea.scrollHeight/r,a=e.row*s;this.textarea.scrollTop=a>this.textarea.clientHeight?a-this.textarea.clientHeight/2:0}}else if(this.aceEditor){var l={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}};this.aceEditor.selection.setRange(l),this.aceEditor.scrollToLine(e.row-1,!0)}};var d=[{mode:"text",mixin:c,data:"text",load:h},{mode:"code",mixin:c,data:"text",load:h}]},function(e,t,n){var i,o=((i={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,n,i,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){var t=this,n=[0],i=[null],o=[],r=this.table,s="",a=0,l=0,c=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;function d(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}o.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,p,f,m,g,v,y,b,x,w,_={};;){if(f=n[n.length-1],void 0===(m=this.defaultActions[f]?this.defaultActions[f]:(null==u&&(u=d()),r[f]&&r[f][u]))||!m.length||!m[0]){if(!c){for(v in x=[],r[f])this.terminals_[v]&&2<v&&x.push("'"+this.terminals_[v]+"'");var C="";C=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[u]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(C,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:h,expected:x})}if(3==c){if(1==u)throw new Error(C||"Parsing halted.");l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,u=d()}for(;!(2..toString()in r[f]);){if(0==f)throw new Error(C||"Parsing halted.");w=1,n.length=n.length-2*w,i.length=i.length-w,o.length=o.length-w,f=n[n.length-1]}p=u,u=2,m=r[f=n[n.length-1]]&&r[f][2],c=3}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+u);switch(m[0]){case 1:n.push(u),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),n.push(m[1]),u=null,p?(u=p,p=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,0<c&&c--);break;case 2:if(y=this.productions_[m[1]][1],_.$=i[i.length-y],_._$={first_line:o[o.length-(y||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(y||1)].first_column,last_column:o[o.length-1].last_column},void 0!==(g=this.performAction.call(_,s,l,a,this.yy,m[1],i,o)))return g;y&&(n=n.slice(0,-1*y*2),i=i.slice(0,-1*y),o=o.slice(0,-1*y)),n.push(this.productions_[m[1]][0]),i.push(_.$),o.push(_._$),b=r[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}}).lexer={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,n,i,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length&&(!(n=this._input.match(this.rules[r[s]]))||t&&!(n[0].length>t[0].length)||(t=n,i=s,this.options.flex));s++);return t?((o=t[0].match(/\n.*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(
32
+ this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||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,n,i){switch(n){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}}},i);t.parser=o,t.parse=o.parse.bind(o)},function(e,t){function n(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&&n(window.Element.prototype),void 0!==window.CharacterData&&n(window.CharacterData.prototype),void 0!==window.DocumentType&&n(window.DocumentType.prototype)),Array.prototype.find||(Array.prototype.find=function(e){for(var t=0;t<this.length;t++){var n=this[t];if(e.call(this,n,t,this))return n}}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},function(e,t,n){"use strict";var _={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},C="a".charCodeAt();t.parse=function(o,e,t){var i={},n=0,r=0,s=0,a=t&&t.bigint&&"undefined"!=typeof BigInt;return{data:l("",!0),pointers:i};function l(e,t){var n;c(),g(e,"value");var i=u();switch(i){case"t":d("rue"),n=!0;break;case"f":d("alse"),n=!1;break;case"n":d("ull"),n=null;break;case'"':n=h();break;case"[":n=function(e){c();var t=[],n=0;if("]"==u())return t;p();for(;;){var i=e+"/"+n;t.push(l(i)),c();var o=u();if("]"==o)break;","!=o&&x(),c(),n++}return t}(e);break;case"{":n=function(e){c();var t={};if("}"==u())return t;p();for(;;){var n=y();'"'!=u()&&x();var i=h(),o=e+"/"+E(i);v(o,"key",n),g(o,"keyEnd"),c(),":"!=u()&&x(),c(),t[i]=l(o),c();var r=u();if("}"==r)break;","!=r&&x(),c()}return t}(e);break;default:p(),0<="-0123456789".indexOf(i)?n=function(){var e="",t=!0;"-"==o[s]&&(e+=u());e+="0"==o[s]?u():m(),"."==o[s]&&(e+=u()+m(),t=!1);"e"!=o[s]&&"E"!=o[s]||(e+=u(),"+"!=o[s]&&"-"!=o[s]||(e+=u()),e+=m(),t=!1);var n=+e;return a&&t&&(n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)?BigInt(e):n}():b()}return g(e,"valueEnd"),c(),t&&s<o.length&&b(),n}function c(){e:for(;s<o.length;){switch(o[s]){case" ":r++;break;case"\t":r+=4;break;case"\r":r=0;break;case"\n":r=0,n++;break;default:break e}s++}}function h(){for(var e,t="";'"'!=(e=u());)"\\"==e?(e=u())in _?t+=_[e]:"u"==e?t+=f():x():t+=e;return t}function d(e){for(var t=0;t<e.length;t++)u()!==e[t]&&x()}function u(){w();var e=o[s];return s++,r++,e}function p(){s--,r--}function f(){for(var e=4,t=0;e--;){t<<=4;var n=u().toLowerCase();"a"<=n&&n<="f"?t+=n.charCodeAt()-C+10:"0"<=n&&n<="9"?t+=+n:x()}return String.fromCharCode(t)}function m(){for(var e="";"0"<=o[s]&&o[s]<="9";)e+=u();if(e.length)return e;w(),b()}function g(e,t){v(e,t,y())}function v(e,t,n){i[e]=i[e]||{},i[e][t]=n}function y(){return{line:n,column:r,pos:s}}function b(){throw new SyntaxError("Unexpected token "+o[s]+" in JSON at position "+s)}function x(){p(),b()}function w(){if(s>=o.length)throw new SyntaxError("Unexpected end of JSON input")}},t.stringify=function(e,t,n){if(b(e)){var i,o,r=0,p="object"==typeof n?n.space:n;switch(typeof p){case"number":var s=10<p?10:p<0?0:Math.floor(p);p=s&&y(s," "),o=i=s;break;case"string":p=p.slice(0,10);for(var a=o=i=0;a<p.length;a++){switch(p[a]){case" ":o++;break;case"\t":o+=4;break;case"\r":o=0;break;case"\n":o=0,r++;break;default:throw new Error("whitespace characters not allowed in JSON")}i++}break;default:p=void 0}var l="",c={},h=0,d=0,u=0,f=n&&n.es6&&"function"==typeof Map;return function c(h,d,u){v(u,"value");switch(typeof h){case"number":case"bigint":case"boolean":m(""+h);break;case"string":m(x(h));break;case"object":null===h?m("null"):"function"==typeof h.toJSON?m(x(h.toJSON())):Array.isArray(h)?e():f?h.constructor.BYTES_PER_ELEMENT?e():h instanceof Map?n():h instanceof Set?n(!0):t():t()}v(u,"valueEnd");function e(){if(h.length){m("[");for(var e=d+1,t=0;t<h.length;t++){t&&m(","),g(e);var n=b(h[t])?h[t]:null,i=u+"/"+t;c(n,e,i)}g(d),m("]")}else m("[]")}function t(){var e=Object.keys(h);if(e.length){m("{");for(var t=d+1,n=0;n<e.length;n++){var i=e[n],o=h[i];if(b(o)){n&&m(",");var r=u+"/"+E(i);g(t),v(r,"key"),m(x(i)),v(r,"keyEnd"),m(":"),p&&m(" "),c(o,t,r)}}g(d),m("}")}else m("{}")}function n(e){if(h.size){m("{");for(var t=d+1,n=!0,i=h.entries(),o=i.next();!o.done;){var r=o.value,s=r[0],a=!!e||r[1];if(b(a)){n||m(","),n=!1;var l=u+"/"+E(s);g(t),v(l,"key"),m(x(s)),v(l,"keyEnd"),m(":"),p&&m(" "),c(a,t,l)}o=i.next()}g(d),m("}")}else m("{}")}}(e,0,""),{json:l,pointers:c}}function m(e){d+=e.length,u+=e.length,l+=e}function g(e){if(p){for(l+="\n"+y(e,p),h++,d=0;e--;)r?(h+=r,d=o):d+=o,u+=i;u+=1}}function v(e,t){c[e]=c[e]||{},c[e][t]={line:h,column:d,pos:u}}function y(e,t){return Array(e+1).join(t)}};var i=["number","bigint","boolean","string","object"];function b(e){return 0<=i.indexOf(typeof e)}var o=/"|\\/g,r=/[\b]/g,s=/\f/g,a=/\n/g,l=/\r/g,c=/\t/g;function x(e){return'"'+(e=e.replace(o,"\\$&").replace(s,"\\f").replace(r,"\\b").replace(a,"\\n").replace(l,"\\r").replace(c,"\\t"))+'"'}var h=/~/g,d=/\//g;function E(e){return e.replace(h,"~0").replace(d,"~1")}},function(e,t,n){t.tryRequireThemeJsonEditor=function(){try{n(24)}catch(e){console.error(e)}}},function(e,t,o){"use strict";var n=o(14),i=o(11),r=o(26).treeModeMixins,s=o(15).textModeMixins,a=o(27).previewModeMixins,l=o(0),c=l.clear,h=l.extend,d=l.getInternetExplorerVersion,u=l.parse,p=(0,o(25).tryRequireAjv)();function f(e,t,n){if(!(this instanceof f))throw new Error('JSONEditor constructor called without "new".');var i=d();if(-1!==i&&i<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===f.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})),arguments.length&&this._create(e,t,n)}"undefined"==typeof Promise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),f.modes={},f.prototype.DEBOUNCE_INTERVAL=150,f.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","colorPicker","onColorPicker","timestampTag","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","maxVisibleChilds"],f.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{};var i=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(i)},f.prototype.destroy=function(){},f.prototype.set=function(e){this.json=e},f.prototype.get=function(){return this.json},f.prototype.setText=function(e){this.json=u(e)},f.prototype.getText=function(){return JSON.stringify(this.json)},f.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},f.prototype.getName=function(){return this.options&&this.options.name},f.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){var t,n,i=this.container,o=h({},this.options),r=o.mode;o.mode=e;var s=f.modes[e];if(!s)throw new Error('Unknown mode "'+o.mode+'"');try{var a="text"===s.data;if(n=this.getName(),t=this[a?"getText":"get"](),this.destroy(),c(this),h(this,s.mixin),this.create(i,o),this.setName(n),this[a?"setText":"set"](t),"function"==typeof s.load)try{s.load.call(this)}catch(e){console.error(e)}if("function"==typeof o.onModeChange&&e!==r)try{o.onModeChange(e,r)}catch(e){console.error(e)}}catch(e){this._onError(e)}}},f.prototype.getMode=function(){return this.options.mode},f.prototype._onError=function(e){if(!this.options||"function"!=typeof this.options.onError)throw e;this.options.onError(e)},f.prototype.setSchema=function(e,t){if(e){var n;try{this.options.ajv?n=this.options.ajv:((n=p({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(o(!function(){var e=new Error("Cannot find module 'ajv/lib/refs/json-schema-draft-04.json'");throw e.code="MODULE_NOT_FOUND",e}())),n.addMetaSchema(o(!function(){var e=new Error("Cannot find module 'ajv/lib/refs/json-schema-draft-06.json'");throw e.code="MODULE_NOT_FOUND",e}())))}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 i in t)n.removeSchema(i),t[i]&&n.addSchema(t[i],i);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()},f.prototype.validate=function(){},f.prototype.refresh=function(){},f.registerMode=function(e){var t,n;if(Array.isArray(e))for(t=0;t<e.length;t++)f.registerMode(e[t]);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 f.modes)throw new Error('Mode "'+i+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');var o=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if((n=o[t])in e.mixin)throw new Error('Reserved property "'+n+'" not allowed in mixin');f.modes[i]=e}},f.registerMode(r),f.registerMode(s),f.registerMode(a),f.ace=n,f.Ajv=p,f.VanillaPicker=i,f.default=f,e.exports=f},function(e,t,d){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function i(){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"}]}}var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules;o.inherits(i,r),t.JsonHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(){}var s=e("../range").Range;(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var r=this.$getIndent(e.getLine(o.row));e.replace(new s(t,0,t,i-1),r)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var i=e("../../lib/oop"),h=e("../../range").Range,o=e("./fold_mode").FoldMode,r=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)))};i.inherits(r,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(e,t,n,i){var o,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(o=r.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(o=r.match(this.foldingStopMarker))){s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,r=n.length,s=t+=1,a=e.getLength();++t<a;){var l=(n=e.getLine(t)).search(/\S/);if(-1!==l){if(l<i)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(i==l)break}s=t}}return new h(o,r,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),r=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++n<o;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?a--:a++,!a))break}if(r<n)return new h(r,i,n,t.length)}}.call(r.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,n){"use strict";function i(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c}var o=e("../lib/oop"),r=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=e("../worker/worker_client").WorkerClient;o.inherits(i,r),function(){this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);"start"==e&&t.match(/^.*[\{\(\[]\s*$/)&&(i+=n);return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(t){var e=new h(["ace"],d(22),"JsonWorker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(e){t.setAnnotations(e.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/json"}.call(i.prototype),t.Mode=i})},function(e,t){e.exports.id="ace/mode/json_worker",e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||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 Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[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(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r   ᠎              \\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(e,t){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,n){"use strict";var o=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),r=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");o.importCssString('.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;box-sizing: border-box!important;outline: 0;padding: 0;font-size: inherit;margin: 0;line-height: inherit;padding: 0 6px;min-width: 17em;vertical-align: top;}.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;box-sizing: content-box!important;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;}',"ace_searchbox");function l(e,t,n){var i=o.createElement("div");i.innerHTML=c,this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)}
33
+ var c='<div class="ace_search right"> <span action="hide" class="ace_searchbtn_close"></span> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <span action="findPrev" class="ace_searchbtn prev"></span> <span action="findNext" class="ace_searchbtn next"></span> <span action="findAll" class="ace_searchbtn" title="Alt-Enter">All</span> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <span action="replaceAndFindNext" class="ace_searchbtn">Replace</span> <span action="replaceAll" class="ace_searchbtn">All</span> </div> <div class="ace_search_options"> <span action="toggleReplace" class="ace_button" title="Toggel Replace mode" style="float:left;margin-top:-2px;padding:0 5px;">+</span> <span class="ace_search_counter"></span> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> <span action="searchInSelection" class="ace_button" title="Search In Selection">S</span> </div></div>'.replace(/> +/g,">");(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 r=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){r.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var t=(e.target||e.srcElement).getAttribute("action");t&&r[t]?r[t]():r.$searchBarKb.commands[t]&&r.$searchBarKb.commands[t].exec(r),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,t,n){var i=a.keyCodeToString(n),o=r.$searchBarKb.findKeyCommand(t,i);o&&o.exec&&(o.exec(r),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){r.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){r.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){r.activeInput=r.searchInput,r.searchInput.value&&r.highlight()}),s.addListener(this.replaceInput,"focus",function(){r.activeInput=r.replaceInput,r.searchInput.value&&r.highlight()})},this.$closeSearchBarKb=new r([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new r,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.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),this.replaceBox.style.display=this.replaceOption.checked?"":"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,n){var 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:n,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,n=0,i=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));for(var s,a=t.lastIndex=0;(s=t.exec(o))&&(n++,(a=s.index)<=r&&i++,!(999<n))&&(s[0]||(t.lastIndex=a+=1,!(a>=o.length))););}this.searchCounter.textContent=i+" of "+(999<n?"999+":n)},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(l.prototype),t.SearchBox=l,t.Search=function(e,t){(e.searchBox||new l(e)).show(e.session.getTextRange(),t)}}),ace.acequire(["ace/ext/searchbox"],function(){})},function(e,t){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(e,t,n){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)})},function(e,t,n){t.tryRequireAjv=function(){try{return n(!function(){var e=new Error("Cannot find module 'ajv'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}}},function(e,t,n){"use strict";n.r(t);var i=n(11),r=n.n(i);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=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}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{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(){if(!this.locked){var e=this;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}}]),e}(),R=n(0);function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var l=function(){function e(t){function r(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){r(e.parentPath).childs[e.index].updateField(e.oldValue)},redo:function(e){r(e.parentPath).childs[e.index].updateField(e.newValue)}},editValue:{undo:function(e){r(e.path).updateValue(e.oldValue)},redo:function(e){r(e.path).updateValue(e.newValue)}},changeType:{undo:function(e){r(e.path).changeType(e.oldType)},redo:function(e){r(e.path).changeType(e.newType)}},appendNodes:{undo:function(e){var t=r(e.parentPath);e.paths.map(r).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=r(e.parentPath);e.nodes.forEach(function(e){t.appendChild(e)})}},insertBeforeNodes:{undo:function(e){var t=r(e.parentPath);e.paths.map(r).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=r(e.parentPath),n=r(e.beforePath);e.nodes.forEach(function(e){t.insertBefore(e,n)})}},insertAfterNodes:{undo:function(e){var t=r(e.parentPath);e.paths.map(r).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=r(e.parentPath),n=r(e.afterPath);e.nodes.forEach(function(e){t.insertAfter(e,n),n=e})}},removeNodes:{undo:function(e){var t=r(e.parentPath),n=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,n)})},redo:function(e){var t=r(e.parentPath);e.paths.map(r).forEach(function(e){t.removeChild(e)})}},duplicateNodes:{undo:function(e){var t=r(e.parentPath);e.clonePaths.map(r).forEach(function(e){t.removeChild(e)})},redo:function(e){var i=r(e.parentPath),o=r(e.afterPath);e.paths.map(r).forEach(function(e){var t=e.clone();if("object"===i.type){var n=i.getFieldNames();t.field=Object(R.findUniqueName)(e.field,n)}i.insertAfter(t,o),o=t})}},moveNodes:{undo:function(n){var i=r(n.oldParentPath),e=r(n.newParentPath),o=i.childs[n.oldIndex]||i.append;e.childs.slice(n.newIndex,n.newIndex+n.count).forEach(function(e,t){e.field=n.fieldNames[t],i.moveBefore(e,o)}),null===n.newParentPathRedo&&(n.newParentPathRedo=e.getInternalPath())},redo:function(n){var e=r(n.oldParentPathRedo),i=r(n.newParentPathRedo),o=i.childs[n.newIndexRedo]||i.append;e.childs.slice(n.oldIndexRedo,n.oldIndexRedo+n.count).forEach(function(e,t){e.field=n.fieldNames[t],i.moveBefore(e,o)})}},sort:{undo:function(e){var t=r(e.path);t.hideChilds(),t.childs=e.oldChilds,t.updateDom({updateIndexes:!0}),t.showChilds()},redo:function(e){var t=r(e.path);t.hideChilds(),t.childs=e.newChilds,t.updateDom({updateIndexes:!0}),t.showChilds()}},transform:{undo:function(e){r(e.path).setInternalValue(e.oldValue)},redo:function(e){r(e.path).setInternalValue(e.newValue)}}}}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{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}}]),e}();function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var h=function(){function h(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h);var n=this;this.editor=e,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=t;var i=document.createElement("div");(this.dom.wrapper=i).className="jsoneditor-search",t.appendChild(i);var o=document.createElement("div");(this.dom.results=o).className="jsoneditor-results",i.appendChild(o);var r=document.createElement("div");(this.dom.input=r).className="jsoneditor-frame",r.title="Search fields and values",i.appendChild(r);var s=document.createElement("button");s.type="button",s.className="jsoneditor-refresh",r.appendChild(s);var a=document.createElement("input");a.type="text",(this.dom.search=a).oninput=function(e){n._onDelayedSearch(e)},a.onchange=function(e){n._onSearch()},a.onkeydown=function(e){n._onKeyDown(e)},a.onkeyup=function(e){n._onKeyUp(e)},s.onclick=function(e){a.select()},r.appendChild(a);var l=document.createElement("button");l.type="button",l.title="Next result (Enter)",l.className="jsoneditor-next",l.onclick=function(){n.next()},r.appendChild(l);var c=document.createElement("button");c.type="button",c.title="Previous result (Shift+Enter)",c.className="jsoneditor-previous",c.onclick=function(){n.previous()},r.appendChild(c)}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(h,[{key:"next",value:function(e){if(this.results){var t=null!==this.resultIndex?this.resultIndex+1:0;t>this.results.length-1&&(t=0),this._setActiveResult(t,e)}}},{key:"previous",value:function(e){if(this.results){var t=this.results.length-1,n=null!==this.resultIndex?this.resultIndex-1:t;n<0&&(n=t),this._setActiveResult(n,e)}}},{key:"_setActiveResult",value:function(e,t){if(this.activeResult){var n=this.activeResult.node;"field"===this.activeResult.elem?delete n.searchFieldActive:delete n.searchValueActive,n.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var i=this.results[this.resultIndex].node,o=this.results[this.resultIndex].elem;"field"===o?i.searchFieldActive=!0:i.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],i.updateDom(),i.scrollTo(function(){t&&i.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,n=0<t.length?t:void 0;if(n!==this.lastText||e){this.lastText=n,this.results=this.editor.search(n);var i=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,o=0;if(this.activeResult)for(var r=0;r<this.results.length;r++)if(this.results[r].node===this.activeResult.node){o=r;break}if(this._setActiveResult(o,!1),void 0!==n){var s=this.results.length;this.dom.results.innerHTML=0===s?"no&nbsp;results":1===s?"1&nbsp;result":i<s?i+"+&nbsp;results":s+"&nbsp;results"}else this.dom.results.innerHTML=""}}},{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()}}]),h}(),d=n(3),u=n(1);function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var f=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e&&(this.root=t,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,e.appendChild(this.path),this.reset())}return function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(n,[{key:"reset",value:function(){this.path.innerHTML=Object(u.c)("selectNode")}},{key:"setPath",value:function(s){var a=this;this.path.innerHTML="",s&&s.length&&s.forEach(function(n,i){var e,t=document.createElement("span");if(t.className="jsoneditor-treepath-element",t.innerText=n.name,t.onclick=function(e){this.selectionCallback&&this.selectionCallback(e)}.bind(a,n),a.path.appendChild(t),n.children.length&&((e=document.createElement("span")).className="jsoneditor-treepath-seperator",e.innerHTML="&#9658;",e.onclick=function(){a.contentMenuClicked=!0;var t=[];n.children.forEach(function(e){t.push({text:e.name,className:"jsoneditor-type-modes"+(s[i+1]+1&&s[i+1].name===e.name?" jsoneditor-selected":""),click:function(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}.bind(a,n,e.name)})}),new d.a(t).show(e,a.root,!0)},a.path.appendChild(e)),i===s.length-1){var o=(e||t).getBoundingClientRect().right;if(a.path.offsetWidth<o&&(a.path.scrollLeft=o),a.path.scrollLeft){var r=document.createElement("span");r.className="jsoneditor-treepath-show-all-btn",r.title="show all path",r.innerHTML="...",r.onclick=function(e){a.contentMenuClicked=!1,Object(R.addClassName)(a.path,"show-all"),a.path.style.width=a.path.parentNode.getBoundingClientRect().width-10+"px",a.path.onblur=function(){if(a.contentMenuClicked)return a.contentMenuClicked=!1,void a.path.focus();Object(R.removeClassName)(a.path,"show-all"),a.path.onblur=void 0,a.path.style.width="",a.setPath(e)}}.bind(a,s),a.path.insertBefore(r,a.path.firstChild)}}})}},{key:"onSectionSelected",value:function(e){"function"==typeof e&&(this.selectionCallback=e)}},{key:"onContextMenuItemSelected",value:function(e){"function"==typeof e&&(this.contextMenuCallback=e)}}]),n}(),m=n(4),g=n.n(m),v=n(9),y=n.n(v),b=n(10);var x=n(5),w=n(7),_=n(2);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 E(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var k=function(){function D(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,D),this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),"value"in t&&this.setValue(t.value,t.type),"internalValue"in t&&this.setInternalValue(t.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=Object(R.debounce)(this._onChangeValue.bind(this),D.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=Object(R.debounce)(this._onChangeField.bind(this),D.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}return function(e,t,n){t&&E(e.prototype,t),n&&E(e,n)}(D,[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:j}},{key:"_updateEditability",value:function(){if(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)){var e=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()});"boolean"==typeof e?(this.editable.field=e,this.editable.value=e):("boolean"==typeof e.field&&(this.editable.field=e.field),"boolean"==typeof e.value&&(this.editable.value=e.value))}}},{key:"getPath",value:function(){for(var e=this,t=[];e;){var n=e.getName();void 0!==n&&t.unshift(n),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,n=0;n<e.length&&t;n++){var i=e[n];t=t.childs[i]}return t}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(e){for(var n=Object(R.parsePath)(e),i=this,t=function(){var t=n.shift();if("number"==typeof t){if("array"!==i.type)throw new Error("Cannot get child node at index "+t+": node is no array");i=i.childs[t]}else{if("object"!==i.type)throw new Error("Cannot get child node "+t+": node is no object");i=i.childs.filter(function(e){return e.field===t})[0]}};i&&0<n.length;)t();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 r=this,s=this.fieldError||this.valueError||this.error,e=this.dom.tdError;if(s&&this.dom&&this.dom.tr){Object(R.addClassName)(this.dom.tr,"jsoneditor-validation-error"),e||(e=document.createElement("td"),this.dom.tdError=e,this.dom.tdValue.parentNode.appendChild(e));var a=document.createElement("button");a.type="button",a.className="jsoneditor-button jsoneditor-schema-error";var t=function(){r.dom.popupAnchor&&r.dom.popupAnchor.destroy()},l=function(){delete r.dom.popupAnchor},n=function(e){var t=r.editor.frame;r.dom.popupAnchor=Object(b.a)(a,t,l,e);var n=a.getBoundingClientRect(),i=120<t.getBoundingClientRect().width-n.x?"jsoneditor-above":"jsoneditor-left",o=document.createElement("div");o.className="jsoneditor-popover "+i,o.appendChild(document.createTextNode(s.message)),r.dom.popupAnchor.appendChild(o)};a.onmouseover=function(){r.dom.popupAnchor||n(!0)},a.onfocus=function(){t(),n(!1)},a.onblur=function(){t()};var i=this.errorChild;for(i&&(a.onclick=function(){i.findParents().forEach(function(e){e.expand(!1)}),i.scrollTo(function(){i.focus()})});e.firstChild;)e.removeChild(e.firstChild);e.appendChild(a)}else this.dom.tr&&Object(R.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),e&&(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(e,t){var n,i,o,r,s,a=this.childs;if(this.type=this._getType(e),t&&t!==this.type){if("string"!==t||"auto"!==this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"===this.type){for(this.childs||(this.childs=[]),r=0;r<e.length;r++)void 0===(n=e[r])||n instanceof Function||(r<this.childs.length?((i=this.childs[r]).fieldEditable=!1,i.index=r,i.setValue(n)):(i=new D(this.editor,{value:n}),o=r<this.getMaxVisibleChilds(),this.appendChild(i,o,!1)));for(s=this.childs.length;s>=e.length;s--)this.removeChild(this.childs[s],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),s=this.childs.length-1;0<=s;s--)T(e,this.childs[s].field)||this.removeChild(this.childs[s],!1);for(var l in r=0,e)T(e,l)&&(void 0===(n=e[l])||n instanceof Function||((i=this.findChildByProperty(l))?(i.setField(l,!0),i.setValue(n)):(i=new D(this.editor,{field:l,value:n}),o=r<this.getMaxVisibleChilds(),this.appendChild(i,o,!1))),r++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc")}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=e;Array.isArray(a)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(e){var t,n,i,o,r,s=this.childs;if(this.type=e.type,"array"===e.type){for(this.childs||(this.childs=[]),o=0;o<e.childs.length;o++)void 0===(t=e.childs[o])||t instanceof Function||(o<this.childs.length?((n=this.childs[o]).fieldEditable=!1,n.index=o,n.setInternalValue(t)):(n=new D(this.editor,{internalValue:t}),i=o<this.getMaxVisibleChilds(),this.appendChild(n,i,!1)));for(r=this.childs.length;r>=e.childs.length;r--)this.removeChild(this.childs[r],!1)}else if("object"===e.type){for(this.childs||(this.childs=[]),o=0;o<e.childs.length;o++)void 0===(t=e.childs[o])||t instanceof Function||(o<this.childs.length?(delete(n=this.childs[o]).index,n.setField(t.field,!0),n.setInternalValue(t.value)):(n=new D(this.editor,{field:t.field,internalValue:t.value}),i=o<this.getMaxVisibleChilds(),this.appendChild(n,i,!1)));for(r=this.childs.length;r>=e.childs.length;r--)this.removeChild(this.childs[r],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=e.value;Array.isArray(s)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){if(this.dom&&this.dom.tr&&this.dom.tr.parentNode){var e=this._detachFromDom();this.clearDom(),this._attachToDom(e)}else this.clearDom()}},{key:"getValue",value:function(){if("array"===this.type){var t=[];return this.childs.forEach(function(e){t.push(e.getValue())}),t}if("object"!==this.type)return void 0===this.value&&this._getDomValue(),this.value;var n={};return this.childs.forEach(function(e){n[e.getField()]=e.getValue()}),n}},{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 n=new D(this.editor);if(n.type=this.type,n.field=this.field,n.fieldInnerText=this.fieldInnerText,n.fieldEditable=this.fieldEditable,n.previousField=this.previousField,n.value=this.value,n.valueInnerText=this.valueInnerText,n.previousValue=this.previousValue,n.expanded=this.expanded,n.visibleChilds=this.visibleChilds,this.childs){var i=[];this.childs.forEach(function(e){var t=e.clone();t.setParent(n),i.push(t)}),n.childs=i}else n.childs=void 0;return n}},{key:"expand",value:function(t){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==t&&this.childs.forEach(function(e){e.expand(t)}))}},{key:"collapse",value:function(t){this.childs&&(this.hideChilds(),!1!==t&&this.childs.forEach(function(e){e.collapse(t)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1)}},{key:"showChilds",value:function(){if(this.childs&&this.expanded){var e,t=this.dom.tr,n=t?t.parentNode:void 0;if(n){var i=this.getAppendDom();i.parentNode||((e=t.nextSibling)?n.insertBefore(i,e):n.appendChild(i));var o=Math.min(this.childs.length,this.visibleChilds);e=this._getNextTr();for(var r=0;r<o;r++){var s=this.childs[r];s.getDom().parentNode||n.insertBefore(s.getDom(),e),s.showChilds()}var a=this.getShowMoreDom();e=this._getNextTr(),a.parentNode||n.insertBefore(a,e),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,n=t?t.parentNode:void 0;n&&n.removeChild(t),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(e)}},{key:"hideChilds",value:function(e){if(this.childs&&this.expanded){var t=this.getAppendDom();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()});var n=this.getShowMoreDom();n.parentNode&&n.parentNode.removeChild(n),e&&!e.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds())}}},{key:"_updateCssClassName",value:function(){if(this.dom.field&&this.editor&&this.editor.options&&"function"==typeof this.editor.options.onClassName&&this.dom.tree){Object(R.removeAllClassNames)(this.dom.tree);var e=this.editor.options.onClassName({path:this.getPath(),field:this.field,value:this.value})||"";Object(R.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,n){if(this._hasChilds()){if(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){var i=e.getDom(),o=this._getNextTr(),r=o?o.parentNode:void 0;o&&r&&r.insertBefore(i,o),e.showChilds(),this.visibleChilds++}!1!==n&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}}},{key:"moveBefore",value:function(e,t){if(this._hasChilds()){var n=this.dom.tr?this.dom.tr.parentNode:void 0;if(n){var i=document.createElement("tr");i.style.height=n.clientHeight+"px",n.appendChild(i)}if(e.parent&&e.parent.removeChild(e),t instanceof L||!t)if(this.childs.length+1>this.visibleChilds){var o=this.childs[this.visibleChilds-1];this.insertBefore(e,o)}else this.appendChild(e);else this.insertBefore(e,t);n&&n.removeChild(i)}}},{key:"insertBefore",value:function(e,t){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)}if(this.expanded){var i=e.getDom(),o=t.getDom(),r=o?o.parentNode:void 0;o&&r&&r.insertBefore(i,o),e.showChilds(),this.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}}},{key:"insertAfter",value:function(e,t){if(this._hasChilds()){var n=this.childs.indexOf(t),i=this.childs[n+1];i?this.insertBefore(e,i):this.appendChild(e)}}},{key:"search",value:function(t,n){Array.isArray(n)||(n=[]);var e=t?t.toLowerCase():void 0;delete this.searchField,delete this.searchValue,void 0!==this.field&&n.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(e)&&(this.searchField=!0,n.push({node:this,elem:"field"})),this._updateDomField());this._hasChilds()?this.childs&&this.childs.forEach(function(e){e.search(t,n)}):void 0!==this.value&&n.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(e)&&(this.searchValue=!0,n.push({node:this,elem:"value"})),this._updateDomValue());return n}},{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(e){if(D.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),Object(R.selectContentEditable)(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),Object(R.selectContentEditable)(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),Object(R.selectContentEditable)(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),Object(R.selectContentEditable)(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.select?t.select.focus():t.value&&!this._hasChilds()?(t.value.focus(),Object(R.selectContentEditable)(t.value)):t.field&&this.fieldEditable?(t.field.focus(),Object(R.selectContentEditable)(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}}},{key:"containsNode",value:function(e){if(this===e)return!0;var t=this.childs;if(t)for(var n=0,i=t.length;n<i;n++)if(t[n].containsNode(e))return!0;return!1}},{key:"removeChild",value:function(e,t){if(this.childs){var n=this.childs.indexOf(e);if(-1!==n){n<this.visibleChilds&&this.expanded&&this.visibleChilds--,e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(n,1)[0];return 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=this.type;if(t!==e){if("string"!==e&&"auto"!==e||"string"!==t&&"auto"!==t){var n=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"!==t&&"auto"!==t||(this.expanded=!0)):"array"===e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),"string"!==t&&"auto"!==t||(this.expanded=!0)):this.expanded=!1,this._attachToDom(n)}else this.type=e;"auto"!==e&&"string"!==e||(this.value="string"===e?String(this.value):Object(R.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 n={},i=0;for(t=0;t<this.childs.length;t++){var o=this.childs[t];if(!n[o.field]){if(n[o.field]=!0,i++,!(o.field in e))return!1;if(!o.deepEqual(e[o.field]))return!1}}if(i!==Object.keys(e).length)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=Object(R.getInnerText)(this.dom.value)),void 0!==this.valueInnerText)try{var e;if("string"===this.type)e=this._unescapeHTML(this.valueInnerText);else{var t=this._unescapeHTML(this.valueInnerText);e=Object(R.parseString)(t)}e!==this.value&&(this.value=e,this._debouncedOnChangeValue())}catch(e){this._setValueError(Object(u.c)("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();if(e.range){var t=Object(R.textDiff)(String(this.value),String(this.previousValue));e.range.startOffset=t.start,e.range.endOffset=t.end}var n=this.editor.getDomSelection();if(n.range){var i=Object(R.textDiff)(String(this.previousValue),String(this.value));n.range.startOffset=i.start,n.range.endOffset=i.end}this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:e,newSelection:n}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var e=this.editor.getDomSelection(),t=this.previousField||"";if(e.range){var n=Object(R.textDiff)(this.field,t);e.range.startOffset=n.start,e.range.endOffset=n.end}var i=this.editor.getDomSelection();if(i.range){var o=Object(R.textDiff)(t,this.field);i.range.startOffset=o.start,i.range.endOffset=o.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"],n=this.value,i="auto"===this.type?Object(R.getType)(n):this.type,o="string"===i&&Object(R.isUrl)(n);if(t.push("jsoneditor-"+i),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"===i||"object"===i){var r=this.childs?this.childs.length:0;e.title=this.type+" containing "+r+" items"}else o&&this.editable.value?e.title=Object(u.c)("openUrl"):e.title="";if("boolean"===i&&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,this.dom.select.option=document.createElement("option"),this.dom.select.option.value="",this.dom.select.option.innerHTML="--",this.dom.select.appendChild(this.dom.select.option);for(var s=0;s<this.enum.length;s++)this.dom.select.option=document.createElement("option"),this.dom.select.option.value=this.enum[s],this.dom.select.option.innerHTML=this.enum[s],this.dom.select.option.value===this.value&&(this.dom.select.option.selected=!0),this.dom.select.appendChild(this.dom.select.option);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.schema||T(this.schema,"oneOf")||T(this.schema,"anyOf")||T(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.innerHTML="")}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);this.editable.value&&this.editor.options.colorPicker&&"string"==typeof n&&Object(R.isValidColor)(n)?(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),this.dom.value.style.color="#1A1A1A"),this.dom.color.style.backgroundColor=n):this._deleteDomColor(),this.editor.options.timestampTag&&"number"==typeof n&&9466848e5<n&&!isNaN(new Date(n).valueOf())?(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),this.dom.date.innerHTML=new Date(n).toISOString(),this.dom.date.title=new Date(n).toString()):this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date),Object(R.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,this.dom.value.style.color="")}},{key:"_updateDomField",value:function(){var e=this.dom.field;if(e){var t=Object(R.makeFieldTooltip)(this.schema,this.editor.options.language);t&&(e.title=t),""===String(this.field)&&"array"!==this.parent.type?Object(R.addClassName)(e,"jsoneditor-empty"):Object(R.removeClassName)(e,"jsoneditor-empty"),this.searchFieldActive?Object(R.addClassName)(e,"jsoneditor-highlight-active"):Object(R.removeClassName)(e,"jsoneditor-highlight-active"),this.searchField?Object(R.addClassName)(e,"jsoneditor-highlight"):Object(R.removeClassName)(e,"jsoneditor-highlight"),Object(R.stripFormatting)(e)}}},{key:"_getDomField",value:function(e){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=Object(R.getInnerText)(this.dom.field)),void 0!==this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText),n=this.parent.getFieldNames(this);-1!==n.indexOf(t)?e?(t=Object(R.findUniqueName)(t,n))!==this.field&&(this.field=t,this._debouncedOnChangeField()):this._setFieldError(Object(u.c)("duplicateFieldError")):t!==this.field&&(this.field=t,this._debouncedOnChangeField())}catch(e){this._setFieldError(Object(u.c)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){if(this.schema&&void 0!==this.schema.default&&!this._hasChilds()){var e=this.dom.select?this.dom.select:this.dom.value;e&&(this.value===this.schema.default?(e.title=Object(u.c)("default"),Object(R.addClassName)(e,"jsoneditor-is-default"),Object(R.removeClassName)(e,"jsoneditor-is-not-default")):(e.removeAttribute("title"),Object(R.removeClassName)(e,"jsoneditor-is-default"),Object(R.addClassName)(e,"jsoneditor-is-not-default")))}}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var e=this.dom;if(e.tr)return e.tr;if(this._updateEditability(),e.tr=document.createElement("tr"),"tree"===(e.tr.node=this).editor.options.mode){var t=document.createElement("td");if(this.editable.field&&this.parent){var n=document.createElement("button");n.type="button",(e.drag=n).className="jsoneditor-button jsoneditor-dragarea",n.title=Object(u.c)("drag"),t.appendChild(n)}e.tr.appendChild(t);var i=document.createElement("td"),o=document.createElement("button");o.type="button",(e.menu=o).className="jsoneditor-button jsoneditor-contextmenu",o.title=Object(u.c)("actionsMenu"),i.appendChild(e.menu),e.tr.appendChild(i)}var r=document.createElement("td");return e.tr.appendChild(r),e.tree=this._createDomTree(),r.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.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(t){this.dom.tr&&(t?Object(R.addClassName)(this.dom.tr,"jsoneditor-highlight"):Object(R.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(t),this.childs&&this.childs.forEach(function(e){e.setHighlight(t)}))}},{key:"setSelected",value:function(t,e){this.selected=t,this.dom.tr&&(t?Object(R.addClassName)(this.dom.tr,"jsoneditor-selected"):Object(R.removeClassName)(this.dom.tr,"jsoneditor-selected"),e?Object(R.addClassName)(this.dom.tr,"jsoneditor-first"):Object(R.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(t),this.showMore&&this.showMore.setSelected(t),this.childs&&this.childs.forEach(function(e){e.setSelected(t)}))}},{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 e=this.dom.tree;e&&(e.style.marginLeft=24*this.getLevel()+"px");var n=this.dom.field;if(n){var i;if(this.fieldEditable?(n.contentEditable=this.editable.field,n.spellcheck=!1,n.className="jsoneditor-field"):(n.contentEditable=!1,n.className="jsoneditor-readonly"),void 0!==this.index)i=this.index;else if(void 0!==this.field)i=this.field;else{var o=this.editor.options.schema?D._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0;i=o&&o.title?o.title:this._hasChilds()?this.type:""}n.innerHTML=this._escapeHTML(i),this._updateSchema()}var r=this.dom.value;r&&("array"===this.type?(this.updateNodeName(),Object(R.addClassName)(this.dom.tr,"jsoneditor-expandable")):"object"===this.type?(this.updateNodeName(),Object(R.addClassName)(this.dom.tr,"jsoneditor-expandable")):(r.innerHTML=this._escapeHTML(this.value),Object(R.removeClassName)(this.dom.tr,"jsoneditor-expandable"))),this._updateDomField(),this._updateDomValue(),this._updateCssClassName(),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()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?D._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=D._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;var n=e.dom.field;n&&(n.innerHTML=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")).innerHTML="[...]":"object"===this.type?(e=document.createElement("div")).innerHTML="{...}":(!this.editable.value&&Object(R.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=Object(u.c)("expandTitle")):(e.className="jsoneditor-button jsoneditor-invisible",e.title=""),e}},{key:"_createDomTree",value:function(){var e=this.dom,t=document.createElement("table"),n=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(n);var i=document.createElement("tr");n.appendChild(i);var o=document.createElement("td");o.className="jsoneditor-tree",i.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var r=document.createElement("td");r.className="jsoneditor-tree",i.appendChild(r),e.field=this._createDomField(),r.appendChild(e.field),e.tdField=r;var s=document.createElement("td");s.className="jsoneditor-tree",i.appendChild(s),"object"!==this.type&&"array"!==this.type&&(s.appendChild(document.createTextNode(":")),s.className="jsoneditor-separator"),e.tdSeparator=s;var a=document.createElement("td");return a.className="jsoneditor-tree",i.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t}},{key:"onEvent",value:function(e){var t=e.type,n=e.target||e.srcElement,i=this.dom,o=this,r=this._hasChilds();if("function"==typeof this.editor.options.onEvent&&this._onEvent(e),n!==i.drag&&n!==i.menu||("mouseover"===t?this.editor.highlighter.highlight(this):"mouseout"===t&&this.editor.highlighter.unhighlight()),"click"===t&&n===i.menu){var s=o.editor.highlighter;s.highlight(o),s.lock(),Object(R.addClassName)(i.menu,"jsoneditor-selected"),this.showContextMenu(i.menu,function(){Object(R.removeClassName)(i.menu,"jsoneditor-selected"),s.unlock(),s.unhighlight()})}if("click"===t&&(n===i.expand||("view"===o.editor.options.mode||"form"===o.editor.options.mode)&&"DIV"===n.nodeName)&&r){var a=e.ctrlKey;this._onExpand(a)}"click"!==t||e.target!==o.dom.tdColor&&e.target!==o.dom.color||this._showColorPicker(),"change"===t&&n===i.checkbox&&(this.dom.value.innerHTML=!this.value,this._getDomValue(),this._updateDomDefault()),"change"===t&&n===i.select&&(this.dom.value.innerHTML=i.select.value,this._getDomValue(),this._updateDomValue());var l=i.value;if(n===l)switch(t){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var c=this._escapeHTML(this.value);l.innerHTML!==c&&(l.innerHTML=c);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&&Object(R.isUrl)(this.value)&&(e.preventDefault(),window.open(this.value,"_blank"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){o._getDomValue(),o._updateDomValue()},1)}var h=i.field;if(n===h)switch(t){case"blur":this._getDomField(!0),this._updateDomField();var d=this._escapeHTML(this.field);h.innerHTML!==d&&(h.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(){o._getDomField(),o._updateDomField()},1)}var u=i.tree;u&&n===u.parentNode&&"click"===t&&!e.hasMoved&&((void 0!==e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<Object(R.getAbsoluteLeft)(i.tdSeparator))||r?h&&(Object(R.setEndOfContentEditable)(h),h.focus()):l&&!this.enum&&(Object(R.setEndOfContentEditable)(l),l.focus()));(n!==i.tdExpand||r)&&n!==i.tdField&&n!==i.tdSeparator||"click"!==t||e.hasMoved||h&&(Object(R.setEndOfContentEditable)(h),h.focus()),"keydown"===t&&this.onKeyDown(e)}},{key:"_onEvent",value:function(e){var t=e.target;if(t===this.dom.field||t===this.dom.value){var n={field:this.getField(),path:this.getPath()};this._hasChilds()||t!==this.dom.value||(n.value=this.getValue()),this.editor.options.onEvent(n,e)}}},{key:"onKeyDown",value:function(e){var t,n,i,o,r,s,a,l,c,h,d,u,p,f=e.which||e.keyCode,m=e.target||e.srcElement,g=e.ctrlKey,v=e.shiftKey,y=e.altKey,b=!1,x="tree"===this.editor.options.mode,w=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],_=w[0],C=w[w.length-1];if(13===f){if(m===this.dom.value)this.editable.value&&!e.ctrlKey||Object(R.isUrl)(this.value)&&(window.open(this.value,"_blank"),b=!0);else if(m===this.dom.expand){if(this._hasChilds()){var E=e.ctrlKey;this._onExpand(E),m.focus(),b=!0}}}else if(68===f)g&&x&&(D.onDuplicate(w),b=!0);else if(69===f)g&&(this._onExpand(v),m.focus(),b=!0);else if(77===f&&x)g&&(this.showContextMenu(m),b=!0);else if(46===f&&x)g&&(D.onRemove(w),b=!0);else if(45===f&&x)g&&!v?(this._onInsertBefore(),b=!0):g&&v&&(this._onInsertAfter(),b=!0);else if(35===f){if(y){var j=this._lastNode();j&&j.focus(D.focusElement||this._getElementName(m)),b=!0}}else if(36===f){if(y){var S=this._firstNode();S&&S.focus(D.focusElement||this._getElementName(m)),b=!0}}else if(37===f){if(y&&!v){var k=this._previousElement(m);k&&this.focus(this._getElementName(k)),b=!0}else if(y&&v&&x){if(C.expanded){var T=C.getAppendDom();i=T?T.nextSibling:void 0}else{var O=C.getDom();i=O.nextSibling}if(i){n=D.getNodeFromTarget(i),o=i.nextSibling;var N=D.getNodeFromTarget(o);n&&n instanceof L&&1!==C.parent.childs.length&&N&&N.parent&&(r=this.editor.getDomSelection(),s=(a=_.parent).childs[C.getIndex()+1]||a.append,l=_.getIndex(),c=N.getIndex(),h=a.getInternalPath(),d=N.parent.getInternalPath(),w.forEach(function(e){N.parent.moveBefore(e,N)}),this.focus(D.focusElement||this._getElementName(m)),this.editor._onAction("moveNodes",{count:w.length,fieldNames:w.map(M),oldParentPath:a.getInternalPath(),newParentPath:_.parent.getInternalPath(),oldIndex:s.getIndex(),newIndex:_.getIndex(),oldIndexRedo:l,newIndexRedo:c,oldParentPathRedo:h,newParentPathRedo:d,oldSelection:r,newSelection:this.editor.getDomSelection()}))}}}else if(38===f)y&&!v?((t=this._previousNode())&&(this.editor.deselect(!0),t.focus(D.focusElement||this._getElementName(m))),b=!0):!y&&g&&v&&x?((t=this._previousNode())&&((p=this.editor.multiselection).start=p.start||this,p.end=t,u=this.editor._findTopLevelNodes(p.start,p.end),this.editor.select(u),t.focus("field")),b=!0):y&&v&&x&&((t=_._previousNode())&&t.parent&&(r=this.editor.getDomSelection(),s=(a=_.parent).childs[C.getIndex()+1]||a.append,l=_.getIndex(),c=t.getIndex(),h=a.getInternalPath(),d=t.parent.getInternalPath(),w.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(D.focusElement||this._getElementName(m)),this.editor._onAction("moveNodes",{count:w.length,fieldNames:w.map(M),oldParentPath:a.getInternalPath(),newParentPath:_.parent.getInternalPath(),oldIndex:s.getIndex(),newIndex:_.getIndex(),oldIndexRedo:l,newIndexRedo:c,oldParentPathRedo:h,newParentPathRedo:d,oldSelection:r,newSelection:this.editor.getDomSelection()})),b=!0);else if(39===f){if(y&&!v){var I=this._nextElement(m);I&&this.focus(this._getElementName(I)),b=!0}else if(y&&v&&x){var A=(O=_.getDom()).previousSibling;A&&(t=D.getNodeFromTarget(A))&&t.parent&&!t.isVisible()&&(r=this.editor.getDomSelection(),s=(a=_.parent).childs[C.getIndex()+1]||a.append,l=_.getIndex(),c=t.getIndex(),h=a.getInternalPath(),d=t.parent.getInternalPath(),w.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(D.focusElement||this._getElementName(m)),this.editor._onAction("moveNodes",{count:w.length,fieldNames:w.map(M),oldParentPath:a.getInternalPath(),newParentPath:_.parent.getInternalPath(),oldIndex:s.getIndex(),newIndex:_.getIndex(),oldIndexRedo:l,newIndexRedo:c,oldParentPathRedo:h,newParentPathRedo:d,oldSelection:r,newSelection:this.editor.getDomSelection()}))}}else if(40===f)if(y&&!v)(n=this._nextNode())&&(this.editor.deselect(!0),n.focus(D.focusElement||this._getElementName(m))),b=!0;else if(!y&&g&&v&&x)(n=this._nextNode())&&((p=this.editor.multiselection).start=p.start||this,p.end=n,u=this.editor._findTopLevelNodes(p.start,p.end),this.editor.select(u),n.focus("field")),b=!0;else if(y&&v&&x){(n=C.expanded?C.append?C.append._nextNode():void 0:C._nextNode())&&!n.isVisible()&&(n=n.parent.showMore),n&&n instanceof L&&(n=C);var P=n&&(n._nextNode()||n.parent.append);P&&P.parent&&(r=this.editor.getDomSelection(),s=(a=_.parent).childs[C.getIndex()+1]||a.append,l=_.getIndex(),c=P.getIndex(),h=a.getInternalPath(),d=P.parent.getInternalPath(),w.forEach(function(e){P.parent.moveBefore(e,P)}),this.focus(D.focusElement||this._getElementName(m)),this.editor._onAction("moveNodes",{count:w.length,fieldNames:w.map(M),oldParentPath:a.getInternalPath(),newParentPath:_.parent.getInternalPath(),oldParentPathRedo:h,newParentPathRedo:d,oldIndexRedo:l,newIndexRedo:c,oldIndex:s.getIndex(),newIndex:_.getIndex(),oldSelection:r,newSelection:this.editor.getDomSelection()})),b=!0}b&&(e.preventDefault(),e.stopPropagation())}},{key:"_onExpand",value:function(e){if(e){var t=this.dom.tr.parentNode,n=t.parentNode,i=n.scrollTop;n.removeChild(t)}this.expanded?this.collapse(e):this.expand(e),e&&(n.appendChild(t),n.scrollTop=i)}},{key:"_showColorPicker",value:function(){if("function"==typeof this.editor.options.onColorPicker&&this.dom.color){var t=this;t._deleteDomColor(),t.updateDom();var e=Object(b.a)(this.dom.color,this.editor.frame);this.editor.options.onColorPicker(e,this.value,function(e){"string"==typeof e&&e!==t.value&&(t._deleteDomColor(),t.value=e,t.updateDom(),t._debouncedOnChangeValue())})}}},{key:"getFieldNames",value:function(t){return"object"===this.type?this.childs.filter(function(e){return e!==t}).map(function(e){return e.field}):[]}},{key:"_onInsertBefore",value:function(e,t,n){var i=this.editor.getDomSelection(),o=new D(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:n});o.expand(!0);var r=this.getInternalPath();this.parent.insertBefore(o,this),this.editor.highlighter.unhighlight(),o.focus("field");var s=this.editor.getDomSelection();this.editor._onAction("insertBeforeNodes",{nodes:[o],paths:[o.getInternalPath()],beforePath:r,parentPath:this.parent.getInternalPath(),oldSelection:i,newSelection:s})}},{key:"_onInsertAfter",value:function(e,t,n){var i=this.editor.getDomSelection(),o=new D(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:n});o.expand(!0),this.parent.insertAfter(o,this),this.editor.highlighter.unhighlight(),o.focus("field");var r=this.editor.getDomSelection();this.editor._onAction("insertAfterNodes",{nodes:[o],paths:[o.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:i,newSelection:r})}},{key:"_onAppend",value:function(e,t,n){var i=this.editor.getDomSelection(),o=new D(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:n});o.expand(!0),this.parent.appendChild(o),this.editor.highlighter.unhighlight(),o.focus("field");var r=this.editor.getDomSelection();this.editor._onAction("appendNodes",{nodes:[o],paths:[o.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:i,newSelection:r})}},{key:"_onChangeType",value:function(e){var t=this.type;if(e!==t){var n=this.editor.getDomSelection();this.changeType(e);var i=this.editor.getDomSelection();this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:t,newType:e,oldSelection:n,newSelection:i})}}},{key:"sort",value:function(s,e){if("string"==typeof s&&(s=Object(R.parsePath)(s)),this._hasChilds()){this.hideChilds();var t=this.childs;this.childs=this.childs.concat();var a="desc"===e?-1:1;"object"===this.type?this.childs.sort(function(e,t){return a*y()(e.field,t.field)}):this.childs.sort(function(e,t){var n=e.getNestedChild(s),i=t.getNestedChild(s);if(!n)return a;if(!i)return-a;var o=n.value,r=i.value;return"string"!=typeof o&&"string"!=typeof r?r<o?a:o<r?-a:0:a*y()(o,r)}),this._updateDomIndexes(),this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:t,newChilds:this.childs}),this.showChilds()}}},{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,t=this.dom.tr?this.dom.tr.parentNode:void 0,n=(e=this.expanded?this.getAppendDom(
34
+ ):this.getDom())&&e.parentNode?e.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:t,nextTr:n}}},{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(),n=this.getValue(),i=g.a.search(n,e);this.setValue(i);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,n=this;n&&t<e.length;)n=n.findChildByProperty(e[t]),t++;return n}},{key:"findChildByProperty",value:function(t){if("object"===this.type)return this.childs.find(function(e){return e.field===t})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new L(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new I(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 e=null,t=this.getDom();if(t&&t.parentNode)for(var n=t;n=n.previousSibling,e=D.getNodeFromTarget(n),n&&e&&e instanceof L&&!e.isVisible(););return e}},{key:"_nextNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode)for(var n=t;n=n.nextSibling,e=D.getNodeFromTarget(n),n&&e&&e instanceof L&&!e.isVisible(););return e}},{key:"_firstNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode){var n=t.parentNode.firstChild;e=D.getNodeFromTarget(n)}return e}},{key:"_lastNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode){var n=t.parentNode.lastChild;for(e=D.getNodeFromTarget(n);n&&e&&!e.isVisible();)n=n.previousSibling,e=D.getNodeFromTarget(n)}return e}},{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(t){var n=this;return Object.keys(this.dom).find(function(e){return n.dom[e]===t})}},{key:"_hasChilds",value:function(){return"array"===this.type||"object"===this.type}},{key:"addTemplates",value:function(t,n){var i=this,e=i.editor.options.templates;if(null!=e){e.length&&t.push({type:"separator"});e.forEach(function(e){t.push({text:e.text,className:e.className||"jsoneditor-type-object",title:e.title,click:n?function(e,t){i._onAppend(e,t)}.bind(this,e.field,e.value):function(e,t){i._onInsertBefore(e,t)}.bind(this,e.field,e.value)})})}}},{key:"showContextMenu",value:function(e,t){var n=this,i=D.TYPE_TITLES,o=[];if(this.editable.value&&o.push({text:Object(u.c)("type"),title:Object(u.c)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:Object(u.c)("auto"),className:"jsoneditor-type-auto"+("auto"===this.type?" jsoneditor-selected":""),title:i.auto,click:function(){n._onChangeType("auto")}},{text:Object(u.c)("array"),className:"jsoneditor-type-array"+("array"===this.type?" jsoneditor-selected":""),title:i.array,click:function(){n._onChangeType("array")}},{text:Object(u.c)("object"),className:"jsoneditor-type-object"+("object"===this.type?" jsoneditor-selected":""),title:i.object,click:function(){n._onChangeType("object")}},{text:Object(u.c)("string"),className:"jsoneditor-type-string"+("string"===this.type?" jsoneditor-selected":""),title:i.string,click:function(){n._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&o.push({text:Object(u.c)("sort"),title:Object(u.c)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){n.showSortModal()}}),this.editor.options.enableTransform&&o.push({text:Object(u.c)("transform"),title:Object(u.c)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){n.showTransformModal()}}),this.parent&&o.push({text:Object(u.c)("extract"),title:Object(u.c)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){n.extract()}})),this.parent&&this.parent._hasChilds()){o.length&&o.push({type:"separator"});var r=n.parent.childs;if(n===r[r.length-1]){var s=[{text:Object(u.c)("auto"),className:"jsoneditor-type-auto",title:i.auto,click:function(){n._onAppend("","","auto")}},{text:Object(u.c)("array"),className:"jsoneditor-type-array",title:i.array,click:function(){n._onAppend("",[])}},{text:Object(u.c)("object"),className:"jsoneditor-type-object",title:i.object,click:function(){n._onAppend("",{})}},{text:Object(u.c)("string"),className:"jsoneditor-type-string",title:i.string,click:function(){n._onAppend("","","string")}}];n.addTemplates(s,!0),o.push({text:Object(u.c)("appendText"),title:Object(u.c)("appendTitle"),submenuTitle:Object(u.c)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){n._onAppend("","","auto")},submenu:s})}var a=[{text:Object(u.c)("auto"),className:"jsoneditor-type-auto",title:i.auto,click:function(){n._onInsertBefore("","","auto")}},{text:Object(u.c)("array"),className:"jsoneditor-type-array",title:i.array,click:function(){n._onInsertBefore("",[])}},{text:Object(u.c)("object"),className:"jsoneditor-type-object",title:i.object,click:function(){n._onInsertBefore("",{})}},{text:Object(u.c)("string"),className:"jsoneditor-type-string",title:i.string,click:function(){n._onInsertBefore("","","string")}}];n.addTemplates(a,!1),o.push({text:Object(u.c)("insert"),title:Object(u.c)("insertTitle"),submenuTitle:Object(u.c)("insertSub"),className:"jsoneditor-insert",click:function(){n._onInsertBefore("","","auto")},submenu:a}),this.editable.field&&(o.push({text:Object(u.c)("duplicateText"),title:Object(u.c)("duplicateField"),className:"jsoneditor-duplicate",click:function(){D.onDuplicate(n)}}),o.push({text:Object(u.c)("removeText"),title:Object(u.c)("removeField"),className:"jsoneditor-remove",click:function(){D.onRemove(n)}}))}if(this.editor.options.onCreateMenu){var l=n.getPath();o=this.editor.options.onCreateMenu(o,{type:"single",path:l,paths:[l]})}new d.a(o,{close:t}).show(e,this.editor.frame)}},{key:"showSortModal",value:function(){var i=this,e=this.editor.options.modalAnchor||_.a,t=this.getValue();Object(x.a)(e,t,function(e){var t=e.path,n=Object(R.parsePath)(t);i.sortedBy=e,i.sort(n,e.direction)},i.sortedBy)}},{key:"showTransformModal",value:function(){var t=this,e=this.editor.options.modalAnchor||_.a,n=t.getValue();Object(w.a)(e,n,function(e){t.transform(e)})}},{key:"_getType",value:function(e){return e instanceof Array?"array":e instanceof Object?"object":"string"==typeof e&&"string"!=typeof Object(R.parseString)(e)?"string":"auto"}},{key:"_escapeHTML",value:function(e){if("string"!=typeof e)return String(e);var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ {2}/g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),n=JSON.stringify(t),i=n.substring(1,n.length-1);return!0===this.editor.options.escapeUnicode&&(i=Object(R.escapeUnicodeChars)(i)),i}},{key:"_unescapeHTML",value:function(e){var t='"'+this._escapeJSON(e)+'"';return Object(R.parse)(t).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")}},{key:"_escapeJSON",value:function(e){for(var t="",n=0;n<e.length;){var i=e.charAt(n);"\n"===i?t+="\\n":"\\"===i?(t+=i,n++,""!==(i=e.charAt(n))&&-1!=='"\\/bfnrtu'.indexOf(i)||(t+="\\"),t+=i):t+='"'===i?'\\"':i,n++}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.innerHTML="object"===this.type?"{"+(e||t)+"}":"["+(e||t)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){var e;if(this.expanded&&(this.updateNodeName(),"undefined"!==this.childs))for(e in this.childs)this.childs[e].recursivelyUpdateNodeName()}}]),D}();k.prototype.DEBOUNCE_INTERVAL=150,k.prototype.MAX_SEARCH_RESULTS=999;var j=100;function S(e){return e.getInternalPath()}function M(e){return e.getField()}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}k.focusElement=void 0,k.select=function(e){setTimeout(function(){Object(R.selectContentEditable)(e)},0)},k.onDragStart=function(t,e){if(!Array.isArray(t))return k.onDragStart([t],e);if(0!==t.length){var n=t[0],i=t[t.length-1],o=n.parent,r=k.getNodeFromTarget(e.target),s=n.editor,a=Object(R.getAbsoluteTop)(r.dom.tr)-Object(R.getAbsoluteTop)(n.dom.tr);s.mousemove||(s.mousemove=Object(R.addEventListener)(window,"mousemove",function(e){k.onDrag(t,e)})),s.mouseup||(s.mouseup=Object(R.addEventListener)(window,"mouseup",function(e){k.onDragEnd(t,e)})),s.highlighter.lock(),s.drag={oldCursor:document.body.style.cursor,oldSelection:s.getDomSelection(),oldPaths:t.map(S),oldParent:o,oldNextNode:o.childs[i.getIndex()+1]||o.append,oldParentPathRedo:o.getInternalPath(),oldIndexRedo:n.getIndex(),mouseX:e.pageX,offsetY:a,level:n.getLevel()},document.body.style.cursor="move",e.preventDefault()}},k.onDrag=function(e,t){if(!Array.isArray(e))return k.onDrag([e],t);if(0!==e.length){var n,i,o,r,s,a,l,c,h,d,u,p=e[0].editor,f=t.pageY-p.drag.offsetY,m=t.pageX,g=!1,v=e[0],y=v.dom.tr,b=Object(R.getAbsoluteTop)(y),x=y.offsetHeight;if(f<b){for(n=y;n=n.previousSibling,a=k.getNodeFromTarget(n),c=n?Object(R.getAbsoluteTop)(n):0,n&&f<c;);a&&!a.parent&&(a=void 0),a||(n=(s=y.parentNode.firstChild)?s.nextSibling:void 0,(a=k.getNodeFromTarget(n))===v&&(a=void 0)),a&&a.isVisible()&&(c=(n=a.dom.tr)?Object(R.getAbsoluteTop)(n):0)+x<f&&(a=void 0),a&&(e.forEach(function(e){a.parent.moveBefore(e,a)}),g=!0)}else{var w=e[e.length-1];if(o=(r=w.expanded&&w.append?w.append.getDom():w.dom.tr)?r.nextSibling:void 0){for(h=Object(R.getAbsoluteTop)(o),i=o;l=k.getNodeFromTarget(i),i&&(d=i.nextSibling?Object(R.getAbsoluteTop)(i.nextSibling):0,u=i?d-h:0,l&&l.parent.childs.length===e.length&&l.parent.childs[e.length-1]===w&&(b+=27),i=i.nextSibling),i&&b+u<f;);if(l&&l.parent){var _=m-p.drag.mouseX,C=Math.round(_/24/2),E=p.drag.level+C,j=l.getLevel();for(n=l.dom.tr&&l.dom.tr.previousSibling;j<E&&n;){if(a=k.getNodeFromTarget(n),e.some(function(e){return e===a||a.isDescendantOf(e)}));else{if(!(a instanceof L))break;var S=a.parent.childs;if(S.length===e.length&&S[e.length-1]===w)break;j=(l=k.getNodeFromTarget(n)).getLevel()}n=n.previousSibling}l instanceof L&&!l.isVisible()&&l.parent.showMore.isVisible()&&(l=l._nextNode()),l&&l.dom.tr&&r.nextSibling!==l.dom.tr&&(e.forEach(function(e){l.parent.moveBefore(e,l)}),g=!0)}}}g&&(p.drag.mouseX=m,p.drag.level=v.getLevel()),p.startAutoScroll(f),t.preventDefault()}},k.onDragEnd=function(e,t){if(!Array.isArray(e))return k.onDrag([e],t);if(0!==e.length){var n=e[0],i=n.editor;e[0]&&e[0].dom.menu.focus();var o=i.drag.oldParent.getInternalPath(),r=n.parent.getInternalPath(),s=i.drag.oldParent===n.parent,a=i.drag.oldNextNode.getIndex(),l=n.getIndex(),c=i.drag.oldParentPathRedo,h=i.drag.oldIndexRedo,d=s&&h<l?l+e.length:l;s&&h===l||i._onAction("moveNodes",{count:e.length,fieldNames:e.map(M),oldParentPath:o,newParentPath:r,oldIndex:a,newIndex:l,oldIndexRedo:h,newIndexRedo:d,oldParentPathRedo:c,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&&(Object(R.removeEventListener)(window,"mousemove",i.mousemove),delete i.mousemove),i.mouseup&&(Object(R.removeEventListener)(window,"mouseup",i.mouseup),delete i.mouseup),i.stopAutoScroll(),t.preventDefault()}},k._findEnum=function(e){if(e.enum)return e.enum;var t=e.oneOf||e.anyOf||e.allOf;if(t){var n=t.filter(function(e){return e.enum});if(0<n.length)return n[0].enum}return null},k._findSchema=function(e,t,n){var i=e,o=i,r=e.oneOf||e.anyOf||e.allOf;r=r||[e];for(var s=0;s<r.length;s++){"$ref"in(i=r[s])&&"string"==typeof i.$ref&&(i=t[i.$ref])&&(o=k._findSchema(i,t,n));for(var a=0;a<n.length&&i;a++){var l=n.slice(a+1,n.length),c=n[a];if("string"!=typeof c||!i.patternProperties||i.properties&&c in i.properties)"string"==typeof c&&i.properties?c in i.properties?(i=i.properties[c])&&(o=k._findSchema(i,t,l)):o=null:"number"==typeof c&&i.items&&(i=i.items)&&(o=k._findSchema(i,t,l));else for(var h in i.patternProperties)c.match(h)&&(o=k._findSchema(i.patternProperties[h],t,l))}}return o===e&&0<n.length?null:o},k.onRemove=function(e){if(!Array.isArray(e))return k.onRemove([e]);if(e&&0<e.length){var t=e[0],n=t.parent,i=t.editor,o=t.getIndex();i.highlighter.unhighlight();var r=i.getDomSelection();k.blurNodes(e);var s=i.getDomSelection(),a=e.map(S);e.forEach(function(e){e.parent._remove(e)}),i._onAction("removeNodes",{nodes:e,paths:a,parentPath:n.getInternalPath(),index:o,oldSelection:r,newSelection:s})}},k.onDuplicate=function(e){if(!Array.isArray(e))return k.onDuplicate([e]);if(e&&0<e.length){var t=e[e.length-1],i=t.parent,n=t.editor;n.deselect(n.multiselection.nodes);var o=n.getDomSelection(),r=t,s=e.map(function(e){var t=e.clone();if("object"===e.parent.type){var n=e.parent.getFieldNames();t.field=Object(R.findUniqueName)(e.field,n)}return i.insertAfter(t,r),r=t});1===e.length?"object"===s[0].parent.type?(s[0].dom.field.innerHTML=e[0].field,s[0].focus("field")):s[0].focus():n.select(s);var a=n.getDomSelection();n._onAction("duplicateNodes",{paths:e.map(S),clonePaths:s.map(S),afterPath:t.getInternalPath(),parentPath:i.getInternalPath(),oldSelection:o,newSelection:a})}},k.getNodeFromTarget=function(e){for(;e;){if(e.node)return e.node;e=e.parentNode}},k.targetIsColorPicker=function(e){var t=k.getNodeFromTarget(e);if(t)for(var n=e&&e.parentNode;n;){if(n===t.dom.color)return!0;n=n.parentNode}return!1},k.blurNodes=function(e){if(Array.isArray(e)){var t=e[0],n=t.parent,i=t.getIndex();n.childs[i+e.length]?n.childs[i+e.length].focus():n.childs[i-1]?n.childs[i-1].focus():n.focus()}else k.blurNodes([e])},k.TYPE_TITLES={auto:Object(u.c)("autoType"),object:Object(u.c)("objectType"),array:Object(u.c)("arrayType"),string:Object(u.c)("stringType")};var O,L=((N.prototype=new(O=k)).getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr");if(t.className="jsoneditor-append",t.node=this,e.tr=t,"tree"===this.editor.options.mode){e.tdDrag=document.createElement("td");var n=document.createElement("td");e.tdMenu=n;var i=document.createElement("button");i.type="button",i.className="jsoneditor-button jsoneditor-contextmenu",i.title="Click to open the actions menu (Ctrl+M)",e.menu=i,n.appendChild(e.menu)}var o=document.createElement("td"),r=document.createElement("div");return r.innerHTML="("+Object(u.c)("empty")+")",r.className="jsoneditor-readonly",o.appendChild(r),e.td=o,e.text=r,this.updateDom(),t},N.prototype.getPath=function(){return null},N.prototype.getIndex=function(){return null},N.prototype.updateDom=function(e){var t=this.dom,n=t.td;n&&(n.style.paddingLeft=24*this.getLevel()+26+"px");var i=t.text;i&&(i.innerHTML="("+Object(u.c)("empty")+" "+this.parent.type+")");var o=t.tr;this.isVisible()?t.tr.firstChild||(t.tdDrag&&o.appendChild(t.tdDrag),t.tdMenu&&o.appendChild(t.tdMenu),o.appendChild(n)):t.tr.firstChild&&(t.tdDrag&&o.removeChild(t.tdDrag),t.tdMenu&&o.removeChild(t.tdMenu),o.removeChild(n))},N.prototype.isVisible=function(){return 0===this.parent.childs.length},N.prototype.showContextMenu=function(e,t){var n=this,i=O.TYPE_TITLES,o=[{text:Object(u.c)("auto"),className:"jsoneditor-type-auto",title:i.auto,click:function(){n._onAppend("","","auto")}},{text:Object(u.c)("array"),className:"jsoneditor-type-array",title:i.array,click:function(){n._onAppend("",[])}},{text:Object(u.c)("object"),className:"jsoneditor-type-object",title:i.object,click:function(){n._onAppend("",{})}},{text:Object(u.c)("string"),className:"jsoneditor-type-string",title:i.string,click:function(){n._onAppend("","","string")}}];n.addTemplates(o,!0);var r=[{text:Object(u.c)("appendText"),title:Object(u.c)("appendTitleAuto"),submenuTitle:Object(u.c)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){n._onAppend("","","auto")},submenu:o}];if(this.editor.options.onCreateMenu){var s=n.parent.getPath();r=this.editor.options.onCreateMenu(r,{type:"append",path:s,paths:[s]})}new d.a(r,{close:t}).show(e,this.editor.frame)},N.prototype.onEvent=function(e){var t=e.type,n=e.target||e.srcElement,i=this.dom;if(n===i.menu&&("mouseover"===t?this.editor.highlighter.highlight(this.parent):"mouseout"===t&&this.editor.highlighter.unhighlight()),"click"===t&&n===i.menu){var o=this.editor.highlighter;o.highlight(this.parent),o.lock(),Object(R.addClassName)(i.menu,"jsoneditor-selected"),this.showContextMenu(i.menu,function(){Object(R.removeClassName)(i.menu,"jsoneditor-selected"),o.unlock(),o.unhighlight()})}"keydown"===t&&this.onKeyDown(e)},N);function N(e){this.editor=e,this.dom={}}var I=((A.prototype=new k).getDom=function(){if(this.dom.tr)return this.dom.tr;if(this._updateEditability(),!this.dom.tr){var t=this,n=this.parent,e=document.createElement("a");e.appendChild(document.createTextNode(Object(u.c)("showMore"))),e.href="#",e.onclick=function(e){return n.visibleChilds=Math.floor(n.visibleChilds/n.getMaxVisibleChilds()+1)*n.getMaxVisibleChilds(),t.updateDom(),n.showChilds(),e.preventDefault(),!1};var i=document.createElement("a");i.appendChild(document.createTextNode(Object(u.c)("showAll"))),i.href="#",i.onclick=function(e){return n.visibleChilds=1/0,t.updateDom(),n.showChilds(),e.preventDefault(),!1};var o=document.createElement("div"),r=document.createTextNode(this._getShowMoreText());o.className="jsoneditor-show-more",o.appendChild(r),o.appendChild(e),o.appendChild(document.createTextNode(". ")),o.appendChild(i),o.appendChild(document.createTextNode(". "));var s=document.createElement("td");s.appendChild(o);var a=document.createElement("tr");"tree"===this.editor.options.mode&&(a.appendChild(document.createElement("td")),a.appendChild(document.createElement("td"))),a.appendChild(s),a.className="jsoneditor-show-more",this.dom.tr=a,this.dom.moreContents=o,this.dom.moreText=r}return this.updateDom(),this.dom.tr},A.prototype.updateDom=function(e){if(this.isVisible()){if(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],!this.dom.tr.parentNode){var t=this.parent._getNextTr();t&&t.parentNode.insertBefore(this.dom.tr,t)}this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"}else this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},A.prototype._getShowMoreText=function(){return Object(u.c)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},A.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},A.prototype.onEvent=function(e){"keydown"===e.type&&this.onKeyDown(e)},A);function A(e,t){this.editor=e,this.parent=t,this.dom={}}var P=n(6),D={start:function(e,t,n){return 0===t.indexOf(e)},contain:function(e,t,n){return-1<t.indexOf(e)}};n.d(t,"treeModeMixins",function(){return B});var F={};F.create=function(e,t){if(!e)throw new Error("No container element provided.");this.container=e,this.dom={},this.highlighter=new s,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=function(l){(l=l||{}).filter=l.filter||"start",l.trigger=l.trigger||"keydown",l.confirmKeys=l.confirmKeys||[39,35,9],l.caseSensitive=l.caseSensitive||!1;var o="",r="",s=document.createElement("div");s.style.position="relative",s.style.outline="0",s.style.border="0",s.style.margin="0",s.style.padding="0";var t,c,h=document.createElement("div");function d(e){var t,n;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())}function a(e){return void 0===t&&((t=document.createElement("span")).style.visibility="hidden",t.style.position="fixed",t.style.outline="0",t.style.margin="0",t.style.padding="0",t.style.border="0",t.style.left="0",t.style.whiteSpace="pre",t.style.fontSize=o,t.style.fontFamily=r,t.style.fontWeight="normal",document.body.appendChild(t)),t.innerHTML=String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t.getBoundingClientRect().right}h.className="autocomplete dropdown",h.style.position="absolute",h.style.visibility="hidden";var u,p,f,n,m,g={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:s,show:function(e,t,n){var i=this;this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""===o&&(o=window.getComputedStyle(e).getPropertyValue("font-size")),""===r&&(r=window.getComputedStyle(e).getPropertyValue("font-family")),h.style.marginLeft="0",h.style.marginTop=e.getBoundingClientRect().height+"px",this.options=n,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(){i.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",w),this.element.addEventListener("keydown",w,!1),this.element.removeEventListener("blur",_),this.element.addEventListener("blur",_,!1)),s.appendChild(this.elementHint),s.appendChild(h),e.parentElement.appendChild(s),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,v.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(e){var t=e.innerText;t=t.replace("\n","");var n=this.options.length,i=t.substring(this.startFrom);c=t.substring(0,this.startFrom);for(var o=0;o<n;o++){var r=this.options[o];if(!l.caseSensitive&&0===r.toLowerCase().indexOf(i.toLowerCase())||l.caseSensitive&&0===r.indexOf(i)){this.elementHint.innerText=c+i+r.substring(i.length),this.elementHint.realInnerText=c+r;break}}h.style.left=a(c)+"px",v.refresh(i,this.options),this.elementHint.style.width=a(this.elementHint.innerText)+10+"px","hidden"===h.style.visibility||(this.elementHint.style.width=a(this.elementHint.innerText)+h.clientWidth+"px")}},v=(u=h,p=[],f=0,n=-1,m={rs:g,hide:function(){u.style.visibility="hidden"},refresh:function(n,e){u.style.visibility="hidden",f=0,u.innerHTML="";var t=window.innerHeight||document.documentElement.clientHeight,i=u.parentNode.getBoundingClientRect(),o=i.top-6,r=t-i.bottom-6;p=[];var s="function"==typeof l.filter?l.filter:D[l.filter],a=s?e.filter(function(e){return s(l.caseSensitive?n:n.toLowerCase(),l.caseSensitive?e:e.toLowerCase(),l)}):[];0!==(p=a.map(function(e){var t=document.createElement("div");return t.className="item",t.onmouseover=y,t.onmouseout=b,t.onmousedown=x,t.__hint=e,t.innerHTML=e.substring(0,n.length)+"<b>"+e.substring(n.length)+"</b>",u.appendChild(t),t})).length&&(1===p.length&&(n.toLowerCase()===p[0].__hint.toLowerCase()&&!l.caseSensitive||n===p[0].__hint&&l.caseSensitive)||p.length<2||(m.highlight(0),3*r<o?(u.style.maxHeight=o+"px",u.style.top="",u.style.bottom="100%"):(u.style.top="100%",u.style.bottom="",u.style.maxHeight=r+"px"),u.style.visibility="visible"))},highlight:function(e){-1!==n&&p[n]&&(p[n].className="item"),p[e].className="item hover",n=e},move:function(e){return"hidden"===u.style.visibility?"":(f+e===-1||f+e===p.length||(f+=e,m.highlight(f)),p[f].__hint)},onmouseselection:function(){}});function y(){this.style.backgroundColor="#ddd"}function b(){this.style.backgroundColor=""}function x(){m.hide(),m.onmouseselection(this.__hint,m.rs)}var w=function(e){var t=(e=e||window.event).keyCode;if(null!=this.elementHint&&33!==t&&34!==t){if(27===t)return g.hideDropDown(),g.element.focus(),e.preventDefault(),void e.stopPropagation();var n=this.element.innerText;if(n=n.replace("\n",""),0<=l.confirmKeys.indexOf(t))return 9===t&&0===this.elementHint.innerText.length&&g.onTab(),void(0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,g.hideDropDown(),d(this.element),9===t&&(g.element.focus(),e.preventDefault(),e.stopPropagation())));if(13!==t){if(40===t){var i=n.substring(this.startFrom),o=v.move(1);return""===o&&g.onArrowDown(),this.elementHint.innerText=c+i+o.substring(i.length),this.elementHint.realInnerText=c+o,e.preventDefault(),void e.stopPropagation()}if(38===t){var r=n.substring(this.startFrom),s=v.move(-1);""===s&&g.onArrowUp(),this.elementHint.innerText=c+r+s.substring(r.length),this.elementHint.realInnerText=c+s,e.preventDefault(),e.stopPropagation()}}else if(0===this.elementHint.innerText.length)g.onEnter();else{var a="hidden"===h.style.visibility;if(v.hide(),a)return g.hideDropDown(),g.element.focus(),void g.onEnter();this.element.innerText=this.elementHint.realInnerText,g.hideDropDown(),d(this.element),e.preventDefault(),e.stopPropagation()}}}.bind(g),_=function(e){g.hideDropDown()};return v.onmouseselection=function(e,t){t.element.innerText=t.elementHint.innerText=c+e,t.hideDropDown(),window.setTimeout(function(){t.element.focus(),d(t.element)},1)},g}(t.autocomplete)),this.options.history&&"view"!==this.options.mode&&(this.history=new l(this)),this._createFrame(),this._createTable()},F.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)},F._setOptions=function(t){var n=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,n){if(r.a){var i=e.getBoundingClientRect().top,o=window.innerHeight;new r.a({parent:e,color:t,popup:o-i<300&&300<i?"top":"bottom",onDone:function(e){var t=1===e.rgba[3]?e.hex.substr(0,7):e.hex;n(t)}}).show()}else 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,onEvent:null,enableSort:!0,enableTransform:!0},t&&Object.keys(t).forEach(function(e){n.options[e]=t[e]}),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=Object(R.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),t.onSelectionChange&&this.onSelectionChange(t.onSelectionChange),Object(u.b)(this.options.languages),Object(u.a)(this.options.language)},F.set=function(e){if(e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var t={field:this.options.name,value:e},n=new k(this,t);this._setRoot(n),this.validate();this.node.expand(!1),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},F.update=function(e){if(!this.node.deepEqual(e)){var t=this.getSelection();if(this.onChangeDisabled=!0,this.node.update(e),this.onChangeDisabled=!1,this.validate(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),t&&t.start&&t.end){var n=this.node.findNodeByPath(t.start.path),i=this.node.findNodeByPath(t.end.path);n&&i?this.setSelection(t.start,t.end):this.setSelection({},{})}else this.setSelection({},{})}},F.get=function(){return this.node?this.node.getValue():void 0},F.getText=function(){return JSON.stringify(this.get())},F.setText=function(t){try{this.set(Object(R.parse)(t))}catch(e){var n=Object(R.repair)(t);this.set(Object(R.parse)(n))}},F.updateText=function(t){try{this.update(Object(R.parse)(t))}catch(e){var n=Object(R.repair)(t);this.update(Object(R.parse)(n))}},F.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},F.getName=function(){return this.options.name},F.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()},F.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},F._setRoot=function(e){this.clear(),(this.node=e).setParent(null),e.setField(this.getName(),!1),delete e.index,this.tbody.appendChild(e.getDom())},F.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},F.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},F.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},F._onAction=function(e,t){this.history&&this.history.add(e,t),this._onChange()},F._onChange=function(){if(!this.onChangeDisabled){if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath){var e=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0;e?this._updateTreePath(e.getNodePath()):this.treePath.reset()}if(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)}}},F.validate=function(){var t=this.node;if(t){var e=t.getValue(),n=[];if(this.validateSchema)this.validateSchema(e)||(n=this.validateSchema.errors.map(function(e){return Object(R.improveSchemaError)(e)}).map(function(e){return{node:t.findNode(e.dataPath),error:e}}).filter(function(e){return null!=e.node}));try{this.validationSequence++;var i=this,o=this.validationSequence;this._validateCustom(e).then(function(e){if(o===i.validationSequence){var t=[].concat(n,e||[]);i._renderValidationErrors(t)}}).catch(function(e){console.error(e)})}catch(e){console.error(e)}}},F._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?"Contains invalid properties":"Contains invalid items"}}}).concat(e).map(function(e){return e.node.setError(e.error,e.child),e.node})},F._validateCustom=function(e){try{if(this.options.onValidate){var n=this.node,t=this.options.onValidate(e);return(Object(R.isPromise)(t)?t:Promise.resolve(t)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=Object(R.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 t;try{t=e&&e.path?n.findNodeByPath(e.path):null}catch(e){}return t||console.warn("Ignoring validation error: node not found. Path:",e.path,"Error:",e),{node:t,error:e}}).filter(function(e){return e&&e.node&&e.error&&e.error.message}):null})}}catch(e){return Promise.reject(e)}return Promise.resolve(null)},F.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},F.startAutoScroll=function(e){var t=this,n=this.scrollableContent,i=Object(R.getAbsoluteTop)(n),o=n.clientHeight,r=i+o;e<i+24&&0<n.scrollTop?this.autoScrollStep=(i+24-e)/3:r-24<e&&o+n.scrollTop<n.scrollHeight?this.autoScrollStep=(r-24-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){t.autoScrollStep?n.scrollTop-=t.autoScrollStep:t.stopAutoScroll()},50)):this.stopAutoScroll()},F.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},F.setDomSelection=function(e){if(e)if("scrollTop"in e&&this.scrollableContent&&(this.scrollableContent.scrollTop=e.scrollTop),e.paths){var t=this,n=e.paths.map(function(e){return t.node.findNodeByInternalPath(e)});this.select(n)}else{var i=e.path?this.node.findNodeByInternalPath(e.path):null,o=i&&e.domName?i.dom[e.domName]:null;if(e.range&&o){var r=Object.assign({},e.range,{container:o});Object(R.setSelectionOffset)(r)}else i&&i.focus()}},F.getDomSelection=function(){var t=k.getNodeFromTarget(this.focusTarget),n=this.focusTarget,e=t?Object.keys(t.dom).find(function(e){return t.dom[e]===n}):null,i=Object(R.getSelectionOffset)();return i&&"DIV"!==i.container.nodeName&&(i=null),i&&i.container!==n&&(i=null),i&&delete i.container,{path:t?t.getInternalPath():null,domName:e,range:i,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(e){return e.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},F.scrollTo=function(e,i){var o=this.scrollableContent;if(o){var r=this;r.animateTimeout&&(clearTimeout(r.animateTimeout),delete r.animateTimeout),r.animateCallback&&(r.animateCallback(!1),delete r.animateCallback);var t=o.clientHeight,n=o.scrollHeight-t,s=Math.min(Math.max(e-t/4,0),n);!function e(){var t=o.scrollTop,n=s-t;3<Math.abs(n)?(o.scrollTop+=n/3,r.animateCallback=i,r.animateTimeout=setTimeout(e,50)):(i&&i(!0),o.scrollTop=s,delete r.animateTimeout,delete r.animateCallback)}()}else i&&i(!1)},F._createFrame=function(){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=this;function n(e){t._onEvent&&t._onEvent(e)}if(this.frame.onclick=function(e){var t=e.target;n(e),"BUTTON"===t.nodeName&&e.preventDefault()},this.frame.oninput=n,this.frame.onchange=n,this.frame.onkeydown=n,this.frame.onkeyup=n,this.frame.oncut=n,this.frame.onpaste=n,this.frame.onmousedown=n,this.frame.onmouseup=n,this.frame.onmouseover=n,this.frame.onmouseout=n,Object(R.addEventListener)(this.frame,"focus",n,!0),Object(R.addEventListener)(this.frame,"blur",n,!0),this.frame.onfocusin=n,this.frame.onfocusout=n,this.options.mainMenuBar){Object(R.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var e=document.createElement("button");e.type="button",e.className="jsoneditor-expand-all",e.title=Object(u.c)("expandAll"),e.onclick=function(){t.expandAll()},this.menu.appendChild(e);var i=document.createElement("button");if(i.type="button",i.title=Object(u.c)("collapseAll"),i.className="jsoneditor-collapse-all",i.onclick=function(){t.collapseAll()},this.menu.appendChild(i),this.options.enableSort){var o=document.createElement("button");o.type="button",o.className="jsoneditor-sort",o.title=Object(u.c)("sortTitleShort"),o.onclick=function(){t.node.showSortModal()},this.menu.appendChild(o)}if(this.options.enableTransform){var r=document.createElement("button");r.type="button",r.title=Object(u.c)("transformTitleShort"),r.className="jsoneditor-transform",r.onclick=function(){t.node.showTransformModal()},this.menu.appendChild(r)}if(this.history){var s=document.createElement("button");s.type="button",s.className="jsoneditor-undo jsoneditor-separator",s.title=Object(u.c)("undo"),s.onclick=function(){t._onUndo()},this.menu.appendChild(s),this.dom.undo=s;var a=document.createElement("button");a.type="button",a.className="jsoneditor-redo",a.title=Object(u.c)("redo"),a.onclick=function(){t._onRedo()},this.menu.appendChild(a),this.dom.redo=a,this.history.onChange=function(){s.disabled=!t.history.canUndo(),a.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var l=this;this.modeSwitcher=new P.a(this.menu,this.options.modes,this.options.mode,function(e){l.setMode(e),l.modeSwitcher.focus()})}this.options.search&&(this.searchBox=new h(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 f(this.navBar,this.frame),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},F._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},F._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},F._onEvent=function(e){if(!k.targetIsColorPicker(e.target)){var t=k.getNodeFromTarget(e.target);if("keydown"===e.type&&this._onKeyDown(e),t&&"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),t&&this.options&&this.options.navigationBar&&t&&("keydown"===e.type||"mousedown"===e.type)){var n=this;setTimeout(function(){n._updateTreePath(t.getNodePath())})}if(t&&t.selected){if("click"===e.type){if(e.target===t.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"===e.type&&k.onDragStart(this.multiselection.nodes,e)}else"mousedown"===e.type&&Object(R.hasParentNode)(e.target,this.content)&&(this.deselect(),t&&e.target===t.dom.drag?k.onDragStart(t,e):t&&(e.target===t.dom.field||e.target===t.dom.value||e.target===t.dom.select)||this._onMultiSelectStart(e));t&&t.onEvent(e)}},F._updateTreePath=function(e){if(e&&e.length){Object(R.removeClassName)(this.navBar,"nav-bar-empty");var n=[];e.forEach(function(e){var t={name:i(e),node:e,children:[]};e.childs&&e.childs.length&&e.childs.forEach(function(e){t.children.push({name:i(e),node:e})}),n.push(t)}),this.treePath.setPath(n)}else Object(R.addClassName)(this.navBar,"nav-bar-empty");function i(e){return e.parent?"array"===e.parent.type?e.index:e.field:e.type}},F._onTreePathSectionSelected=function(e){e&&e.node&&(e.node.expandTo(),e.node.focus())},F._onTreePathMenuItemSelected=function(e,t){if(e&&e.children.length){var n=e.children.find(function(e){return e.name===t});n&&n.node&&(this._updateTreePath(n.node.getNodePath()),n.node.expandTo(),n.node.focus())}},F._startDragDistance=function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},F._updateDragDistance=function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,n=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+n*n),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},F._onMultiSelectStart=function(e){var t=k.getNodeFromTarget(e.target);if("tree"===this.options.mode&&void 0===this.options.onEditable){this.multiselection={start:t||null,end:null,nodes:[]},this._startDragDistance(e);var n=this;this.mousemove||(this.mousemove=Object(R.addEventListener)(window,"mousemove",function(e){n._onMultiSelect(e)})),this.mouseup||(this.mouseup=Object(R.addEventListener)(window,"mouseup",function(e){n._onMultiSelectEnd(e)})),e.preventDefault()}},F._onMultiSelect=function(e){if(e.preventDefault(),this._updateDragDistance(e),e.hasMoved){var t=k.getNodeFromTarget(e.target);t&&(null==this.multiselection.start&&(this.multiselection.start=t),this.multiselection.end=t),this.deselect();var n=this.multiselection.start,i=this.multiselection.end||this.multiselection.start;if(n&&i){if(this.multiselection.nodes=this._findTopLevelNodes(n,i),this.multiselection.nodes&&this.multiselection.nodes.length){var o=this.multiselection.nodes[0];this.multiselection.start===o||this.multiselection.start.isDescendantOf(o)?this.multiselection.direction="down":this.multiselection.direction="up"}this.select(this.multiselection.nodes)}}},F._onMultiSelectEnd=function(){this.multiselection.nodes[0]&&this.multiselection.nodes[0].dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&(Object(R.removeEventListener)(window,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(Object(R.removeEventListener)(window,"mouseup",this.mouseup),delete this.mouseup)},F.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()},F.select=function(e){if(!Array.isArray(e))return this.select([e]);if(e){this.deselect(),this.multiselection.nodes=e.slice(0);var t=e[0];if(e.forEach(function(e){e.expandPathToNode(),e.setSelected(!0,e===t)}),this._selectionChangedHandler){var n=this.getSelection();this._selectionChangedHandler(n.start,n.end)}}},F._findTopLevelNodes=function(e,t){for(var n=e.getNodePath(),i=t.getNodePath(),o=0;o<n.length&&n[o]===i[o];)o++;var r=n[o-1],s=n[o],a=i[o];if(s&&a||(r.parent?r=(a=s=r).parent:(s=r.childs[0],a=r.childs[r.childs.length-1])),r&&s&&a){var l=r.childs.indexOf(s),c=r.childs.indexOf(a),h=Math.min(l,c),d=Math.max(l,c);return r.childs.slice(h,d+1)}return[]},F._showAutoComplete=function(t){var n=k.getNodeFromTarget(t),i="";0<=t.className.indexOf("jsoneditor-value")&&(i="value"),0<=t.className.indexOf("jsoneditor-field")&&(i="field");var o=this;setTimeout(function(){if(n&&("focus"===o.options.autocomplete.trigger||0<t.innerText.length)){var e=o.options.autocomplete.getOptions(t.innerText,n.getPath(),i,n.editor);null===e?o.autocomplete.hideDropDown():"function"==typeof e.then?e.then(function(e){null===e?o.autocomplete.hideDropDown():e.options?o.autocomplete.show(t,e.startFrom,e.options):o.autocomplete.show(t,0,e)}).catch(function(e){console.error(e)}):e.options?o.autocomplete.show(t,e.startFrom,e.options):o.autocomplete.show(t,0,e)}else o.autocomplete.hideDropDown()},50)},F._onKeyDown=function(e){var t=e.which||e.keyCode,n=e.altKey,i=e.ctrlKey,o=e.metaKey,r=e.shiftKey,s=!1;if(9===t){var a=this;setTimeout(function(){Object(R.selectContentEditable)(a.focusTarget)},0)}if(this.searchBox)if(i&&70===t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),s=!0;else if(114===t||i&&71===t){r?this.searchBox.previous(!0):this.searchBox.next(!0),s=!0}this.history&&(i&&!r&&90===t?(this._onUndo(),s=!0):i&&r&&90===t&&(this._onRedo(),s=!0)),this.options.autocomplete&&!s&&(i||n||o||1!==e.key.length&&8!==t&&46!==t||(s=!1,this._showAutoComplete(e.target))),s&&(e.preventDefault(),e.stopPropagation())},F._createTable=function(){var e;this.options.navigationBar&&Object(R.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)},F.showContextMenu=function(e,t){var n=[],i=this.multiselection.nodes.slice();if(n.push({text:Object(u.c)("duplicateText"),title:Object(u.c)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){k.onDuplicate(i)}}),n.push({text:Object(u.c)("remove"),title:Object(u.c)("removeTitle"),className:"jsoneditor-remove",click:function(){k.onRemove(i)}}),this.options.onCreateMenu){var o=i.map(function(e){return e.getPath()});n=this.options.onCreateMenu(n,{type:"multiple",path:o[0],paths:o})}new d.a(n,{close:t}).show(e,this.frame)},F.getSelection=function(){var e={start:null,end:null};if(this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length){var t=this.multiselection.nodes[0],n=this.multiselection.nodes[this.multiselection.nodes.length-1];"down"===this.multiselection.direction?(e.start=t.serialize(),e.end=n.serialize()):(e.start=n.serialize(),e.end=t.serialize())}return e},F.onSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=Object(R.debounce)(e,this.DEBOUNCE_INTERVAL))},F.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));var n=this._getNodeInstancesByRange(e,t);n.forEach(function(e){e.expandTo()}),this.select(n)},F._getNodeInstancesByRange=function(e,t){var n,i;e&&e.path&&(n=this.node.findNodeByPath(e.path),t&&t.path&&(i=this.node.findNodeByPath(t.path)));var o=[];if(n instanceof k)if(i instanceof k&&i!==n)if(n.parent===i.parent){t=n.getIndex()<i.getIndex()?(e=n,i):(e=i,n);var r=e;for(o.push(r);r=r.nextSibling(),o.push(r),r&&r!==t;);}else o=this._findTopLevelNodes(n,i);else o.push(n);return o},F.getNodesByRange=function(e,t){var n=this._getNodeInstancesByRange(e,t),i=[];return n.forEach(function(e){i.push(e.serialize())}),i};var B=[{mode:"tree",mixin:F,data:"json"},{mode:"view",mixin:F,data:"json"},{mode:"form",mixin:F,data:"json"}]},function(e,t,n){"use strict";n.r(t);var i=n(4),o=n.n(i),d=n(1),u=n(6),p=n(13),r=n(5),s=n(7),a=n(15),f=n(2),m=n(0);function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var g=function(){function i(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.onChange=e,this.calculateItemSize=t||function(){return 1},this.limit=n,this.items=[],this.index=-1}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(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 t=this.calculateItemSize,n=0;return this.items.forEach(function(e){n+=t(e)}),n}},{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()}}]),i}();n.d(t,"previewModeMixins",function(){return v});var c=a.textModeMixins[0].mixin,h={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,(this.options=t).indentation?this.indentation=Number(t.indentation):this.indentation=2,this.mode="preview";var n=this;if(this.container=e,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=Object(m.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()},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.innerHTML="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){Object(m.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var i=document.createElement("button");i.type="button",i.className="jsoneditor-format",i.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(i),i.onclick=function(){n.executeWithBusyMessage(function(){try{n.format()}catch(e){n._onError(e)}},"formatting...")};var o=document.createElement("button");if(o.type="button",o.className="jsoneditor-compact",o.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(o),o.onclick=function(){n.executeWithBusyMessage(function(){try{n.compact()}catch(e){n._onError(e)}},"compacting...")},this.options.enableSort){var r=document.createElement("button");r.type="button",r.className="jsoneditor-sort",r.title=Object(d.c)("sortTitleShort"),r.onclick=function(){n._showSortModal()},this.menu.appendChild(r)}if(this.options.enableTransform){var s=document.createElement("button");s.type="button",s.title=Object(d.c)("transformTitleShort"),s.className="jsoneditor-transform",s.onclick=function(){n._showTransformModal()},this.dom.transform=s,this.menu.appendChild(s)}var a=document.createElement("button");if(a.type="button",a.className="jsoneditor-repair",a.title="Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",this.menu.appendChild(a),!(a.onclick=function(){void 0===n.json&&n.executeWithBusyMessage(function(){try{n.repair()}catch(e){n._onError(e)}},"repairing...")})!==this.options.history){this.history=new g(function(){n.dom.undo.disabled=!n.history.canUndo(),n.dom.redo.disabled=!n.history.canRedo()},function(e){return 2*e.text.length},f.c);var l=document.createElement("button");l.type="button",l.className="jsoneditor-undo jsoneditor-separator",l.title=Object(d.c)("undo"),l.onclick=function(){var e=n.history.undo();e&&n._applyHistory(e)},this.menu.appendChild(l),this.dom.undo=l;var c=document.createElement("button");c.type="button",c.className="jsoneditor-redo",c.title=Object(d.c)("redo"),c.onclick=function(){var e=n.history.redo();e&&n._applyHistory(e)},this.menu.appendChild(c),this.dom.redo=c,this.history.onChange()}this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new u.a(this.menu,this.options.modes,this.options.mode,function(e){n.setMode(e),n.modeSwitcher.focus()}))}if(this.errorTable=new p.a({errorTableVisible:!0,onToggleVisibility:function(){n.validate()},onFocusLine:null,onChangeHeight:function(e){var t=e+(n.dom.statusBar?n.dom.statusBar.clientHeight:0)+1;n.content.style.marginBottom=-t+"px",n.content.style.paddingBottom=t+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),t.statusBar){Object(m.addClassName)(this.content,"has-status-bar");var h=document.createElement("div");(this.dom.statusBar=h).className="jsoneditor-statusbar",this.frame.appendChild(h),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",h.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",h.appendChild(this.dom.arrayInfo),h.appendChild(this.errorTable.getErrorCounter()),h.appendChild(this.errorTable.getWarningIcon()),h.appendChild(this.errorTable.getErrorIcon())}this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var e=this.getText();this.dom.previewText.nodeValue=Object(m.limitCharacters)(e,f.b),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+Object(m.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)}}};h._showSortModal=function(){var o=this;this.executeWithBusyMessage(function(){var e=o.options.modalAnchor||f.a,t=o.get();o._renderPreview(),Object(r.a)(e,t,function(e){o.executeWithBusyMessage(function(){!function(e,t){if(Array.isArray(e)){var n=Object(m.sort)(e,t.path,t.direction);o.sortedBy=t,o._setAndFireOnChange(n)}if(Object(m.isObject)(e)){var i=Object(m.sortObjectKeys)(e,t.direction);o.sortedBy=t,o._setAndFireOnChange(i)}}(t,e)},"sorting...")},o.sortedBy)},"parsing...")},h._showTransformModal=function(){var i=this;this.executeWithBusyMessage(function(){var e=i.options.modalAnchor||f.a,n=i.get();i._renderPreview(),Object(s.a)(e,n,function(t){i.executeWithBusyMessage(function(){var e=o.a.search(n,t);i._setAndFireOnChange(e)},"transforming...")})},"parsing...")},h.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.clear(),this.history=null},h.compact=function(){var e=this.get(),t=JSON.stringify(e);this._setTextAndFireOnChange(t,e)},h.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this._setTextAndFireOnChange(t,e)},h.repair=function(){var e=this.getText(),t=Object(m.repair)(e);this._setTextAndFireOnChange(t)},h.focus=function(){this.dom.transform.focus()},h.set=function(e){this.history&&this.history.clear(),this._set(e)},h.update=function(e){this._set(e)},h._set=function(e){this.text=void 0,this.json=e,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},h._setAndFireOnChange=function(e){this._set(e),this._onChange()},h.get=function(){if(void 0===this.json){var e=this.getText();this.json=Object(m.parse)(e)}return this.json},h.getText=function(){return void 0===this.text&&(this.text=JSON.stringify(this.json,null,this.indentation),!0===this.options.escapeUnicode&&(this.text=Object(m.escapeUnicodeChars)(this.text))),this.text},h.setText=function(e){this.history&&this.history.clear(),this._setText(e)},h.updateText=function(e){this.getText()!==e&&this._setText(e)},h._setText=function(e,t){if(!0===this.options.escapeUnicode?this.text=Object(m.escapeUnicodeChars)(e):this.text=e,this.json=t,this._renderPreview(),void 0===this.json){var n=this;this.executeWithBusyMessage(function(){try{n.json=n.get(),n._renderPreview(),n._pushHistory()}catch(e){}},"parsing...")}else this._pushHistory();this._debouncedValidate()},h._setTextAndFireOnChange=function(e,t){this._setText(e,t),this._onChange()},h._applyHistory=function(e){this.json=e.json,this.text=e.text,this._renderPreview(),this._debouncedValidate()},h._pushHistory=function(){if(this.history){var e={text:this.text,json:this.json};this.history.add(e)}},h.executeWithBusyMessage=function(e,t){if(this.getText().length>f.d){var n=this;Object(m.addClassName)(n.frame,"busy"),n.dom.busyContent.innerText=t,setTimeout(function(){e(),Object(m.removeClassName)(n.frame,"busy"),n.dom.busyContent.innerText=""},100)}else e()},h.validate=c.validate,h._renderErrors=c._renderErrors;var v=[{mode:"preview",mixin:h,data:"json"}]}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=20);function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i});
@@ -0,0 +1,6 @@
1
+ .jsoneditor .search input{height:auto;border:inherit;border:none;box-shadow:none}.jsoneditor table{border-collapse:collapse;width:auto}.jsoneditor td,.jsoneditor th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.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-invalid{color:#000}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 div.jsoneditor-anchor{cursor:pointer}div.jsoneditor div.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}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}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background:transparent url(/assets/jsoneditor-icons.svg)}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}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{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background:url(/assets/jsoneditor-icons.svg) -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:url(/assets/jsoneditor-icons.svg) -168px -48px}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-mode-form tr.jsoneditor-expandable td.jsoneditor-tree,div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree{cursor:pointer}div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu:focus,div.jsoneditor-tree button.jsoneditor-contextmenu:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu{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}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,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu,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 td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value,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;z-index:999}.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{from{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:url(/assets/jsoneditor-icons.svg) -168px -48px}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background:url(/assets/jsoneditor-icons.svg) -25px 0}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;box-sizing:content-box;z-index:99}.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 rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 4px 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 rgba(128,128,128,.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:url(/assets/jsoneditor-icons.svg) 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(/assets/jsoneditor-icons.svg)}.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{background-position:0 0}.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 15px!important;box-shadow:2px 2px 12px rgba(128,128,128,.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%}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px 0}.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:top;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.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 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-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:transparent url(/assets/jsoneditor-icons.svg);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:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:rgba(255,255,255,.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-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}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(/assets/jsoneditor-icons.svg);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 .autocomplete.dropdown{position:absolute;background:#fff;box-shadow:2px 2px 12px rgba(128,128,128,.3);border:1px solid #d3d3d3;z-index:100;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:#333}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ddd}.jsoneditor .autocomplete.hint{color:#aaa;top:4px;left: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:999;box-shadow:2px 2px 12px rgba(128,128,128,.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}.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:url(/assets/jsoneditor-icons.svg) -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:url(/assets/jsoneditor-icons.svg) -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-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}/*!
2
+ * Selectr 2.4.0
3
+ * https://github.com/Mobius1/Selectr
4
+ *
5
+ * Released under the MIT license
6
+ */.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 4px;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 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 #999;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 spin;-webkit-animation:.5s linear 0s normal forwards infinite running spin;animation:.5s linear 0s normal forwards infinite running spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}@keyframes spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) 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}.selectr-container.inverted .selectr-options-container{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}
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: administrate-field-jsonb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sergey Volkov
8
+ - Codica
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2019-09-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: administrate
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "<"
19
+ - !ruby/object:Gem::Version
20
+ version: 1.0.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "<"
26
+ - !ruby/object:Gem::Version
27
+ version: 1.0.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '4.2'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '7'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '4.2'
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '7'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.7'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.7'
62
+ description: JSONb field plugin for Administrate
63
+ email:
64
+ - sergvolkov.codica@gmail.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - ".gitignore"
70
+ - CODE_OF_CONDUCT.md
71
+ - Gemfile
72
+ - LICENSE.txt
73
+ - README.md
74
+ - administrate-field-jsonb.gemspec
75
+ - app/assets/javascripts/administrate-field-jsonb/application.js
76
+ - app/assets/javascripts/administrate-field-jsonb/components/editor.js
77
+ - app/assets/javascripts/administrate-field-jsonb/components/viewer.js
78
+ - app/assets/stylesheets/administrate-field-jsonb/application.css
79
+ - app/assets/stylesheets/administrate-field-jsonb/editor.css
80
+ - app/views/fields/jsonb/_form.html.erb
81
+ - app/views/fields/jsonb/_index.html.erb
82
+ - app/views/fields/jsonb/_show.html.erb
83
+ - docs/images/form.png
84
+ - docs/images/index.png
85
+ - docs/images/show.png
86
+ - lib/administrate/field/jsonb.rb
87
+ - vendor/assets/.DS_Store
88
+ - vendor/assets/images/jsoneditor-icons.svg
89
+ - vendor/assets/javascripts/jsoneditor-minimalist.min.js
90
+ - vendor/assets/stylesheets/jsoneditor.min.css
91
+ homepage: https://github.com/codica2/administrate-field-jsonb
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.6.14
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: JSONb field plugin for Administrate
115
+ test_files: []