From 9daad4e811fbc9d2b210b683796c2e48fae4520f Mon Sep 17 00:00:00 2001 From: jos Date: Sat, 31 May 2014 21:10:53 +0200 Subject: [PATCH] Released version 3.0.0 --- HISTORY.md | 1 + bower.json | 2 +- jsoneditor.js | 383 ++++++++++++++++++++++++---------------------- jsoneditor.map | 2 +- jsoneditor.min.js | 8 +- package.json | 2 +- 6 files changed, 210 insertions(+), 188 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 49a8291..ee2554c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,7 @@ https://github.com/josdejong/jsoneditor - Large code reorganization. - Editor must be loaded as `new JSONEditor(...)` instead of `new jsoneditor.JSONEditor(...)`. +- Css is not automatically loaded anymore when using AMD. - Web application has been moved to another project. diff --git a/bower.json b/bower.json index d269760..c0a4de7 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jsoneditor", - "version": "3.0.0-SNAPSHOT", + "version": "3.0.0", "description": "A web-based tool to view, edit and format JSON", "tags": [ "json", diff --git a/jsoneditor.js b/jsoneditor.js index 12c3769..526aa6b 100644 --- a/jsoneditor.js +++ b/jsoneditor.js @@ -23,8 +23,8 @@ * Copyright (c) 2011-2014 Jos de Jong, http://jsoneditoronline.org * * @author Jos de Jong, - * @version 3.0.0-SNAPSHOT - * @date 2014-05-30 + * @version 3.0.0 + * @date 2014-05-31 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -234,32 +234,17 @@ return /******/ (function(modules) { // webpackBootstrap var config = JSONEditor.modes[mode]; if (config) { try { - if (config.data == 'text') { - // text - name = this.getName(); - data = this.getText(); + var asText = (config.data == 'text'); + name = this.getName(); + data = this[asText ? 'getText' : 'get'](); // get text or json - this._delete(); - util.clear(this); - util.extend(this, config.mixin); - this.create(container, options); + this._delete(); + util.clear(this); + util.extend(this, config.mixin); + this.create(container, options); - this.setName(name); - this.setText(data); - } - else { - // json - name = this.getName(); - data = this.get(); - - this._delete(); - util.clear(this); - util.extend(this, config.mixin); - this.create(container, options); - - this.setName(name); - this.set(data); - } + this.setName(name); + this[asText ? 'setText' : 'set'](data); // set text or json if (typeof config.load === 'function') { try { @@ -300,30 +285,62 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Register a plugin with one ore multiple modes for the JSON Editor - * TODO: describe the mode format - * @param {Object} modes An object with the mode names as keys, and an object - * defining the mode as value + * Register a plugin with one ore multiple modes for the JSON Editor. + * + * A mode is described as an object with properties: + * + * - `mode: String` The name of the mode. + * - `mixin: Object` An object containing the mixin functions which + * will be added to the JSONEditor. Must contain functions + * create, get, getText, set, and setText. May have + * additional functions. + * When the JSONEditor switches to a mixin, all mixin + * functions are added to the JSONEditor, and then + * the function `create(container, options)` is executed. + * - `data: 'text' | 'json'` The type of data that will be used to load the mixin. + * - `[load: function]` An optional function called after the mixin + * has been loaded. + * + * @param {Object | Array} mode A mode object or an array with multiple mode objects. */ - JSONEditor.register = function (modes) { - for (var mode in modes) { - if (modes.hasOwnProperty(mode)) { - if (mode in JSONEditor.modes) { - throw new Error('Mode "' + mode + '" already registered'); - } + JSONEditor.registerMode = function (mode) { + var i, prop; - // TODO: validate the new mode mixin, - // must have functions: create, get, getText, set, setText - // may not have functions: setMode, register - - JSONEditor.modes[mode] = modes[mode]; + if (util.isArray(mode)) { + // multiple modes + for (i = 0; i < mode.length; i++) { + JSONEditor.registerMode(mode[i]); } } + else { + // validate the new mode + if (!('mode' in mode)) throw new Error('Property "mode" missing'); + if (!('mixin' in mode)) throw new Error('Property "mixin" missing'); + if (!('data' in mode)) throw new Error('Property "data" missing'); + var name = mode.mode; + if (name in JSONEditor.modes) { + throw new Error('Mode "' + name + '" already registered'); + } + + // validate the mixin + if (typeof mode.mixin.create !== 'function') { + throw new Error('Required function "create" missing on mixin'); + } + var reserved = ['setMode', 'registerMode', 'modes']; + for (i = 0; i < reserved.length; i++) { + prop = reserved[i]; + if (prop in mode.mixin) { + throw new Error('Reserved property "' + prop + '" not allowed in mixin'); + } + } + + JSONEditor.modes[name] = mode; + } }; // register tree and text modes - JSONEditor.register(treemode); - JSONEditor.register(textmode); + JSONEditor.registerMode(treemode); + JSONEditor.registerMode(textmode); return JSONEditor; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -332,7 +349,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 1 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modebox, util) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modeswitcher, util) { // create a mixin with the functions for tree mode var treemode = {}; @@ -351,10 +368,9 @@ return /******/ (function(modules) { // webpackBootstrap * {function} change Callback method, triggered * on change of contents * {String} name Field name for the root node. - * @param {Object | undefined} json JSON object * @private */ - treemode.create = function (container, options, json) { + treemode.create = function (container, options) { if (!container) { throw new Error('No container element provided.'); } @@ -371,8 +387,6 @@ return /******/ (function(modules) { // webpackBootstrap this._createFrame(); this._createTable(); - - this.set(json || {}); }; /** @@ -874,7 +888,7 @@ return /******/ (function(modules) { // webpackBootstrap // create mode box if (this.options && this.options.modes && this.options.modes.length) { - var modeBox = modebox.create(this, this.options.modes, this.options.mode); + var modeBox = modeswitcher.create(this, this.options.modes, this.options.mode); this.menu.appendChild(modeBox); this.dom.modeBox = modeBox; } @@ -1037,20 +1051,23 @@ return /******/ (function(modules) { // webpackBootstrap }; // define modes - return { - tree: { + return [ + { + mode: 'tree', mixin: treemode, data: 'json' }, - view: { + { + mode: 'view', mixin: treemode, data: 'json' }, - form: { + { + mode: 'form', mixin: treemode, data: 'json' } - }; + ]; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -1058,7 +1075,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 2 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modebox, util) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modeswitcher, util) { // create a mixin with the functions for text mode var textmode = {}; @@ -1074,10 +1091,9 @@ return /******/ (function(modules) { // webpackBootstrap * spaces. 2 by default. * {function} change Callback method * triggered on change - * @param {JSON | String} [json] initial contents of the formatter * @private */ - textmode.create = function (container, options, json) { + textmode.create = function (container, options) { // read options options = options || {}; this.options = options; @@ -1148,7 +1164,7 @@ return /******/ (function(modules) { // webpackBootstrap // create mode box if (this.options && this.options.modes && this.options.modes.length) { - var modeBox = modebox.create(this, this.options.modes, this.options.mode); + var modeBox = modeswitcher.create(this, this.options.modes, this.options.mode); this.menu.appendChild(modeBox); this.dom.modeBox = modeBox; } @@ -1218,14 +1234,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - - // load initial json object or string - if (typeof(json) == 'string') { - this.setText(json); - } - else { - this.set(json); - } }; /** @@ -1342,18 +1350,20 @@ return /******/ (function(modules) { // webpackBootstrap }; // define modes - return { - text: { + return [ + { + mode: 'text', mixin: textmode, data: 'text', load: textmode.format }, - code: { + { + mode: 'code', mixin: textmode, data: 'text', load: textmode.format } - }; + ]; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -1461,7 +1471,7 @@ return /******/ (function(modules) { // webpackBootstrap if ((object instanceof RegExp) || (typeof object === 'regexp')) { return 'regexp'; } - if (Array.isArray(object)) { + if (util.isArray(object)) { return 'array'; } @@ -1479,6 +1489,15 @@ return /******/ (function(modules) { // webpackBootstrap isUrlRegex.test(text); }; + /** + * Tes whether given object is an Array + * @param {*} obj + * @returns {boolean} returns true when obj is an array + */ + util.isArray = function (obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; + }; + /** * Retrieve the absolute left value of a DOM element * @param {Element} elem A dom element, for example a div @@ -1843,113 +1862,6 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 4 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) { - - /** - * Create a mode box to be used in the editor menu's - * @param {JSONEditor} editor - * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view' - * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view' - * @returns {HTMLElement} box - */ - function createModeBox(editor, modes, current) { - /** - * Switch the mode of the editor - * @param {String} mode - */ - function switchMode(mode) { - // switch mode - editor.setMode(mode); - - // restore focus on mode box - var modeBox = editor.dom && editor.dom.modeBox; - if (modeBox) { - modeBox.focus(); - } - } - - // available modes - var availableModes = { - code: { - 'text': 'Code', - 'title': 'Switch to code highlighter', - 'click': function () { - switchMode('code') - } - }, - form: { - 'text': 'Form', - 'title': 'Switch to form editor', - 'click': function () { - switchMode('form'); - } - }, - text: { - 'text': 'Text', - 'title': 'Switch to plain text editor', - 'click': function () { - switchMode('text'); - } - }, - tree: { - 'text': 'Tree', - 'title': 'Switch to tree editor', - 'click': function () { - switchMode('tree'); - } - }, - view: { - 'text': 'View', - 'title': 'Switch to tree view', - 'click': function () { - switchMode('view'); - } - } - }; - - // list the selected modes - var items = []; - for (var i = 0; i < modes.length; i++) { - var mode = modes[i]; - var item = availableModes[mode]; - if (!item) { - throw new Error('Unknown mode "' + mode + '"'); - } - - item.className = 'type-modes' + ((current == mode) ? ' selected' : ''); - items.push(item); - } - - // retrieve the title of current mode - var currentMode = availableModes[current]; - if (!currentMode) { - throw new Error('Unknown mode "' + current + '"'); - } - var currentTitle = currentMode.text; - - // create the html element - var box = document.createElement('button'); - box.className = 'modes separator'; - box.innerHTML = currentTitle + ' ▾'; - box.title = 'Switch editor mode'; - box.onclick = function () { - var menu = new ContextMenu(items); - menu.show(box); - }; - - return box; - } - - return { - create: createModeBox - } - }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - - -/***/ }, -/* 5 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { @@ -2041,7 +1953,7 @@ return /******/ (function(modules) { // webpackBootstrap }.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, -/* 6 */ +/* 5 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (util) { @@ -2270,7 +2182,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { @@ -2569,7 +2481,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(10), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu, appendNodeFactory, util) { @@ -5440,6 +5352,115 @@ return /******/ (function(modules) { // webpackBootstrap return Node; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) { + + /** + * Create a select box to be used in the editor menu's, which allows to switch mode + * @param {Object} editor + * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view' + * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view' + * @returns {HTMLElement} box + */ + function createModeSwitcher(editor, modes, current) { + // TODO: decouple mode switcher from editor + + /** + * Switch the mode of the editor + * @param {String} mode + */ + function switchMode(mode) { + // switch mode + editor.setMode(mode); + + // restore focus on mode box + var modeBox = editor.dom && editor.dom.modeBox; + if (modeBox) { + modeBox.focus(); + } + } + + // available modes + var availableModes = { + code: { + 'text': 'Code', + 'title': 'Switch to code highlighter', + 'click': function () { + switchMode('code') + } + }, + form: { + 'text': 'Form', + 'title': 'Switch to form editor', + 'click': function () { + switchMode('form'); + } + }, + text: { + 'text': 'Text', + 'title': 'Switch to plain text editor', + 'click': function () { + switchMode('text'); + } + }, + tree: { + 'text': 'Tree', + 'title': 'Switch to tree editor', + 'click': function () { + switchMode('tree'); + } + }, + view: { + 'text': 'View', + 'title': 'Switch to tree view', + 'click': function () { + switchMode('view'); + } + } + }; + + // list the selected modes + var items = []; + for (var i = 0; i < modes.length; i++) { + var mode = modes[i]; + var item = availableModes[mode]; + if (!item) { + throw new Error('Unknown mode "' + mode + '"'); + } + + item.className = 'type-modes' + ((current == mode) ? ' selected' : ''); + items.push(item); + } + + // retrieve the title of current mode + var currentMode = availableModes[current]; + if (!currentMode) { + throw new Error('Unknown mode "' + current + '"'); + } + var currentTitle = currentMode.text; + + // create the html element + var box = document.createElement('button'); + box.className = 'modes separator'; + box.innerHTML = currentTitle + ' ▾'; + box.title = 'Switch editor mode'; + box.onclick = function () { + var menu = new ContextMenu(items); + menu.show(box); + }; + + return box; + } + + return { + create: createModeSwitcher + } + }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + + /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { diff --git a/jsoneditor.map b/jsoneditor.map index 1797954..0382ff7 100644 --- a/jsoneditor.map +++ b/jsoneditor.map @@ -1 +1 @@ -{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","treemode","textmode","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","clear","mixin","create","load","err","_onError","onError","log","error","register","hasOwnProperty","apply","undefined","Highlighter","History","SearchBox","Node","modebox","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","prop","edit","form","focusNode","domFocus","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","getSelectionOffset","scrollTo","callback","editor","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","tree","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","code","jsonString","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","Array","isArray","isUrlRegex","isUrl","test","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","i","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","ContextMenu","createModeBox","current","switchMode","availableModes","click","items","item","currentMode","currentTitle","box","innerHTML","show","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","obj","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","appendNodeFactory","expanded","Object","setField","fieldEditable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","submenu","submenuTitle","close","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,OAAOH,GACmB,gBAAZC,SACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,KACpBK,KAAM,WACT,MAAgB,UAAUC,GAMhB,QAASC,GAAoBC,GAE5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAA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gB"} \ No newline at end of file +{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","treemode","textmode","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","asText","clear","mixin","create","load","err","_onError","onError","log","error","registerMode","i","prop","isArray","reserved","apply","undefined","Highlighter","History","SearchBox","Node","modeswitcher","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","hasOwnProperty","edit","form","focusNode","domFocus","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","getSelectionOffset","scrollTo","callback","editor","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","jsonString","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","isUrlRegex","isUrl","test","obj","Object","toString","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","innerHTML","ContextMenu","appendNodeFactory","expanded","setField","fieldEditable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","tree","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","items","submenu","click","submenuTitle","close","show","Array","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createModeSwitcher","current","switchMode","availableModes","code","item","currentMode","currentTitle","box","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,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kC,GAAOlC,EAAMkC,KACb5B,EAASN,EAAMM,QAAUN,EAAMmW,WAC/Blb,EAAMnE,KAAKmE,IAGXqG,EAAOrG,EAAIqG,IAWf,IAVIhB,GAAUgB,IACA,aAARY,EACFpL,KAAKsI,OAAOlE,YAAYsP,UAAU1T,KAAKwU,QAExB,YAARpJ,GACPpL,KAAKsI,OAAOlE,YAAYyP,eAKhB,SAARzI,GAAmB5B,GAAUrF,EAAIqG,KAAM,CACzC,GAAIpG,GAAcpE,KAAKsI,OAAOlE,WAC9BA,GAAYsP,UAAU1T,KAAKwU,QAC3BpQ,EAAY2P,OACZhT,EAAK2O,aAAavL,EAAIqG,KAAM,YAC5BxK,KAAKuf,gBAAgBpb,EAAIqG,KAAM,WAC7BzJ,EAAKiP,gBAAgB7L,EAAIqG,KAAM,YAC/BpG,EAAY4P,SACZ5P,EAAYyP,gBAIJ,WAARzI,GACFpL,KAAK0f,UAAUxW,IAIZ6Q,EAIT,MAAO5B,IACPvU,MAAM,KAAMjD,KAAkEkD,SAAlCjD,IAAgDf,EAAOD,QAAUgB"} \ No newline at end of file diff --git a/jsoneditor.min.js b/jsoneditor.min.js index 68b38dd..8ab0789 100644 --- a/jsoneditor.min.js +++ b/jsoneditor.min.js @@ -23,9 +23,9 @@ * Copyright (c) 2011-2014 Jos de Jong, http://jsoneditoronline.org * * @author Jos de Jong, - * @version 3.0.0-SNAPSHOT - * @date 2014-05-30 + * @version 3.0.0 + * @date 2014-05-31 */ -!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()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var n,o;n=[i(1),i(2),i(3)],o=function(e,t,i){function n(e,t,o){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,o)}return n.modes={},n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=i.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,o,s=this.container,r=i.extend({},this.options);r.mode=e;var a=n.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{if("text"==a.data?(o=this.getName(),t=this.getText(),this._delete(),i.clear(this),i.extend(this,a.mixin),this.create(s,r),this.setName(o),this.setText(t)):(o=this.getName(),t=this.get(),this._delete(),i.clear(this),i.extend(this,a.mixin),this.create(s,r),this.setName(o),this.set(t)),"function"==typeof a.load)try{a.load.call(this)}catch(d){}}catch(d){this._onError(d)}},n.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},n.register=function(e){for(var t in e)if(e.hasOwnProperty(t)){if(t in n.modes)throw new Error('Mode "'+t+'" already registered');n.modes[t]=e[t]}},n.register(e),n.register(t),n}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(5),i(6),i(7),i(8),i(4),i(3)],o=function(e,t,i,n,o,s){var r={};r.create=function(i,n,o){if(!i)throw new Error("No container element provided.");this.container=i,this.dom={},this.highlighter=new e,this.selection=void 0,this._setOptions(n),this.options.history&&!this.mode.view&&(this.history=new t(this)),this._createFrame(),this._createTable(),this.set(o||{})},r._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},r._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void 0},e)for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.mode={edit:"view"!=this.options.mode&&"form"!=this.options.mode,view:"view"==this.options.mode,form:"form"==this.options.mode}};var a=void 0,d=null;return r.set=function(e,t){if(t&&(s.log('Warning: second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=t),e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var i={field:this.options.name,value:e},o=new n(this,i);this._setRoot(o);var r=!1;this.node.expand(r),this.content.appendChild(this.table)}this.history&&this.history.clear()},r.get=function(){return a&&a.blur(),this.node?this.node.getValue():void 0},r.getText=function(){return JSON.stringify(this.get())},r.setText=function(e){this.set(s.parse(e))},r.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},r.getName=function(){return this.options.name},r.clear=function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},r._setRoot=function(e){this.clear(),this.node=e,this.tbody.appendChild(e.getDom())},r.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},r.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},r.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},r._onAction=function(e,t){if(this.history&&this.history.add(e,t),this.options.change)try{this.options.change()}catch(i){s.log("Error in change callback: ",i)}},r.startAutoScroll=function(e){var t=this,i=this.content,n=s.getAbsoluteTop(i),o=i.clientHeight,r=n+o,a=24,d=50;this.autoScrollStep=n+a>e&&i.scrollTop>0?(n+a-e)/3:e>r-a&&o+i.scrollTop3?(i.scrollTop+=o/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},r._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var n=document.createElement("button");n.className="expand-all",n.title="Expand all fields",n.onclick=function(){t.expandAll()},this.menu.appendChild(n);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var d=document.createElement("button");d.className="redo",d.title="Redo (Ctrl+Shift+Z)",d.onclick=function(){t._onRedo()},this.menu.appendChild(d),this.dom.redo=d,this.history.onChange=function(){a.disabled=!t.history.canUndo(),d.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var h=o.create(this,this.options.modes,this.options.mode);this.menu.appendChild(h),this.dom.modeBox=h}this.options.search&&(this.searchBox=new i(this,this.menu))},r._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(d=t);var i=n.getNodeFromTarget(t);i&&i.onEvent(e)},r._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(d)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||i&&71==t){var r=!0;n?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),o=!0):i&&n&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},r._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},{tree:{mixin:r,data:"json"},view:{mixin:r,data:"json"},form:{mixin:r,data:"json"}}}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(4),i(3)],o=function(e,t){var i={};return i.create=function(i,n,o){n=n||{},this.options=n,this.indentation=n.indentation?Number(n.indentation):2,this.mode="code"==n.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var s=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var r=document.createElement("button");r.className="format",r.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(r),r.onclick=function(){try{s.format()}catch(e){s._onError(e)}};var a=document.createElement("button");if(a.className="compact",a.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(a),a.onclick=function(){try{s.compact()}catch(e){s._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var d=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(d),this.dom.modeBox=d}if(this.content=document.createElement("div"),this.content.className="outer",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 h=ace.edit(this.editorDom);h.setTheme("ace/theme/jsoneditor"),h.setShowPrintMargin(!1),h.setFontSize(13),h.getSession().setMode("ace/mode/json"),h.getSession().setTabSize(2),h.getSession().setUseSoftTabs(!0),h.getSession().setUseWrapMode(!0),this.editor=h;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),n.change&&h.on("change",function(){n.change()})}else{var c=document.createElement("textarea");c.className="text",c.spellcheck=!1,this.content.appendChild(c),this.textarea=c,n.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){n.change()}:this.textarea.onchange=function(){n.change()})}"string"==typeof o?this.setText(o):this.set(o)},i._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.get=function(){return t.parse(this.getText())},i.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},{text:{mixin:i,data:"text",load:i.format},code:{mixin:i,data:"text",load:i.format}}}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n;n=function(){var e={};e.parse=function(t){try{return JSON.parse(t)}catch(i){throw e.validate(t),i}},e.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},e.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},e.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},e.type=function(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"==typeof e?"regexp":Array.isArray(e)?"array":"object"};var t=/^https?:\/\/\S+$/;e.isUrl=function(e){return("string"==typeof e||e instanceof String)&&t.test(e)},e.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},e.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},e.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},e.removeClassName=function(e,t){var i=e.className.split(" "),n=i.indexOf(t);-1!=n&&(i.splice(n,1),e.className=i.join(" "))},e.stripFormatting=function(t){for(var i=t.childNodes,n=0,o=i.length;o>n;n++){var s=i[n];s.style&&s.removeAttribute("style");var r=s.attributes;if(r)for(var a=r.length-1;a>=0;a--){var d=r[a];1==d.specified&&s.removeAttribute(d.name)}e.stripFormatting(s)}},e.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},e.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},e.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},e.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},e.getSelectionOffset=function(){var t=e.getSelection();return t&&"startOffset"in t&&"endOffset"in t&&t.startContainer&&t.startContainer==t.endContainer?{startOffset:t.startOffset,endOffset:t.endOffset,container:t.startContainer.parentNode}:null},e.setSelectionOffset=function(t){if(document.createRange&&window.getSelection){var i=window.getSelection();if(i){var n=document.createRange();n.setStart(t.container.firstChild,t.startOffset),n.setEnd(t.container.firstChild,t.endOffset),e.setSelection(n)}}},e.getInnerText=function(t,i){var n=void 0==i;if(n&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),t.nodeValue)return i.flush()+t.nodeValue;if(t.hasChildNodes()){for(var o=t.childNodes,s="",r=0,a=o.length;a>r;r++){var d=o[r];if("DIV"==d.nodeName||"P"==d.nodeName){var h=o[r-1],l=h?h.nodeName:void 0;l&&"DIV"!=l&&"P"!=l&&"BR"!=l&&(s+="\n",i.flush()),s+=e.getInnerText(d,i),i.set("\n")}else"BR"==d.nodeName?(s+=i.flush(),i.set("\n")):s+=e.getInnerText(d,i)}return s}return"P"==t.nodeName&&-1!=e.getInternetExplorerVersion()?i.flush():""},e.getInternetExplorerVersion=function(){if(-1==i){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}i=e}return i},e.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var i=-1;return e.addEventListener=function(t,i,n,o){if(t.addEventListener)return void 0===o&&(o=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.addEventListener(i,n,o),n;if(t.attachEvent){var s=function(){return n.call(t,window.event)};return t.attachEvent("on"+i,s),s}},e.removeEventListener=function(t,i,n,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.removeEventListener(i,n,o)):t.detachEvent&&t.detachEvent("on"+i,n)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(9)],o=function(e){function t(t,i,n){function o(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){o("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){o("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){o("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){o("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){o("view")}}},r=[],a=0;a=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,n=this.activeResult.elem;"field"==n?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,n=i.length>0?i:void 0;if(n!=this.lastText||t)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void 0),void 0!=n){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=o+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(9),i(10),i(3)],o=function(e,t,i){function n(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}n.prototype.setParent=function(e){this.parent=e},n.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},n.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},n.prototype.setValue=function(e,t){var i,o,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);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){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(o=new n(this.editor,{value:i}),this.appendChild(o));this.value=""}else if("object"==this.type){this.childs=[];for(var d in e)e.hasOwnProperty(d)&&(i=e[d],void 0===i||i instanceof Function||(o=new n(this.editor,{field:d,value:i}),this.appendChild(o)));this.value=""}else this.childs=void 0,this.value=e},n.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},n.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},n.prototype.clone=function(){var e=new n(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},n.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},n.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},n.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var n=this.getAppend(),o=t.nextSibling;o?i.insertBefore(n,o):i.appendChild(n),this.childs.forEach(function(e){i.insertBefore(e.getDom(),n),e.showChilds()})}}},n.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},n.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},n.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof o?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var n=this.childs[t]||this.append;this.moveBefore(e,n)},n.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),o=t.getDom(),s=o?o.parentNode:void 0;o&&s&&s.insertBefore(n,o),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){var t,i=[],n=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var o=String(this.field).toLowerCase();t=o.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=n){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},n.focusElement=void 0,n.prototype.focus=function(e){if(n.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(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},n.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e); -if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var o=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==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,n&&(o?n.insertBefore(this.getDom(),o):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},n.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var n=this._unescapeHTML(this.valueInnerText);t=this._stringCast(n)}if(t!==this.value){var o=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},n.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,n="auto"==this.type?i.type(t):this.type,o="string"==n&&i.isUrl(t),s="";s=o&&!this.editor.mode.edit?"":"string"==n?"green":"number"==n?"red":"boolean"==n?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),o?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==n||"object"==n){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==n&&i.isUrl(t)?this.editor.mode.edit&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var n=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(o){if(this.field=void 0,1!=e)throw o}},n.prototype.clearDom=function(){this.dom={}},n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,this.editor.mode.edit){var t=document.createElement("td");if(this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),o=document.createElement("button");e.menu=o,o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},n.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},n.prototype._onDrag=function(e){var t,s,r,a,d,h,l,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,C=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,l=n.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);l&&!l.parent&&(l=void 0),l||(h=t.parentNode.firstChild,s=h?h.nextSibling:void 0,l=n.getNodeFromTarget(s),l==this&&(l=void 0)),l&&(s=l.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(l=void 0)),l&&(l.parent.moveBefore(this,l),C=!0)}else if(d=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=d?d.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=n.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var b=x-this.drag.mouseX,N=Math.round(b/24/2),E=this.drag.level+N,_=c.getLevel();for(s=c.dom.tr.previousSibling;E>_&&s;){if(l=n.getNodeFromTarget(s),l==this||l._isChildOf(this));else{if(!(l instanceof o))break;var w=l.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=n.getNodeFromTarget(s),_=c.getLevel()}s=s.previousSibling}d.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),C=!0)}}C&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},n.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},n.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){return document.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){1==this.fieldEditable?(i.contentEditable=this.editor.mode.edit,i.spellcheck=!1,i.className="field"):i.className="readonly";var n;n=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}var o=this.dom.value;if(o){var s=this.childs?this.childs.length:0;o.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editor.mode.edit&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=!this.editor.mode.view,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},n.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var o=document.createElement("td");o.className="tree",n.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var s=document.createElement("td");s.className="tree",n.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",n.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){var t,n=e.type,o=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((o==s.drag||o==s.menu)&&("mouseover"==n?this.editor.highlighter.highlight(this):"mouseout"==n&&this.editor.highlighter.unhighlight()),"mousedown"==n&&o==s.drag&&this._onDragStart(e),"click"==n&&o==s.menu){var d=r.editor.highlighter;d.highlight(r),d.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),d.unlock(),d.unhighlight()})}if("click"==n&&o==s.expand&&a){var h=e.ctrlKey;this._onExpand(h)}var l=s.value;if(o==l)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(l.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":e.ctrlKey&&this.editor.mode.edit&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(o==c)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(o==u.parentNode)switch(n){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXn[i]?t:e[i]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},n.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',n=i.parse(t);return n.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},n.prototype._escapeJSON=function(e){for(var t="",i=0,n=e.length;n>i;){var o=e.charAt(i);"\n"==o?t+="\\n":"\\"==o?(t+=o,i++,o=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(o)&&(t+="\\"),t+=o):t+='"'==o?'\\"':o,i++}return t};var o=t(n);return n}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(3)],o=function(e){function t(e,t){function i(e,t,o){o.forEach(function(o){if("separator"==o.type){var s=document.createElement("div");s.className="separator",a=document.createElement("li"),a.appendChild(s),e.appendChild(a)}else{var r={},a=document.createElement("li");e.appendChild(a);var d=document.createElement("button");if(d.className=o.className,r.button=d,o.title&&(d.title=o.title),o.click&&(d.onclick=function(){n.hide(),o.click()}),a.appendChild(d),o.submenu){var h=document.createElement("div");h.className="icon",d.appendChild(h),d.appendChild(document.createTextNode(o.text));var l;if(o.click){d.className+=" default";var c=document.createElement("button");r.buttonExpand=c,c.className="expand",c.innerHTML='
',a.appendChild(c),o.submenuTitle&&(c.title=o.submenuTitle),l=c}else{var u=document.createElement("div");u.className="expand",d.appendChild(u),l=d}l.onclick=function(){n._onExpandItem(r),l.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,o.submenu)}else d.innerHTML='
'+o.text;t.push(r)}})}this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",o.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),o.list=r,o.items=[];var a=document.createElement("button");o.focusButton=a;var d=document.createElement("li");d.style.overflow="hidden",d.style.height="0",d.appendChild(a),r.appendChild(d),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var n=window.innerHeight,o=window.pageYOffset||document.scrollTop||0,s=n+o,r=i.offsetHeight,a=this.maxHeight,d=e.getAbsoluteLeft(i),h=e.getAbsoluteTop(i);s>h+r+a?(this.dom.menu.style.left=d+"px",this.dom.menu.style.top=h+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=d+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=n-h+"px"),document.body.appendChild(this.dom.menu);var l=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||l._isChildOf(t,c)||(l.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){l._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){l.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var n=this.eventListeners[i];n&&e.removeEventListener(document,i,n),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,n=t==this.expandedItem,o=this.expandedItem;if(o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout(function(){i.expandedItem!=o&&(o.ul.style.display="",e.removeClassName(o.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!n){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,n,o,s,r=t.target,a=t.which,d=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),d=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),n=i.indexOf(r),0==n&&(i[i.length-1].focus(),d=!0)):(i=this._getVisibleButtons(),n=i.indexOf(r),n==i.length-1&&(i[0].focus(),d=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&o.focus()),d=!0):38==a?(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&"expand"==o.className&&(o=i[n-2]),o||(o=i[i.length-1]),o&&o.focus(),d=!0):39==a?(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&s.focus(),d=!0):40==a&&(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&(s=i[n+2]),s||(s=i[0]),s&&(s.focus(),d=!0),d=!0),d&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9),i(3)],o=function(e,t){function i(i){function n(e){this.editor=e,this.dom={}}return n.prototype=new i,n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editor.mode.edit){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var o=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",o.appendChild(s),e.td=o,e.text=s,this.updateDom(),t},n.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},n.prototype.isVisible=function(){return 0==this.parent.childs.length},n.prototype.showContextMenu=function(t,n){var o=this,s=i.TYPE_TITLES,r=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:s.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:s.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:s.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:s.string,click:function(){o._onAppend("","","string")}}]}],a=new e(r,{close:n});a.show(t)},n.prototype.onEvent=function(e){var i=e.type,n=e.target||e.srcElement,o=this.dom,s=o.menu;if(n==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&n==o.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),t.addClassName(o.menu,"selected"),this.showContextMenu(o.menu,function(){t.removeClassName(o.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(e)},n}return i}.apply(null,n),!(void 0!==o&&(e.exports=o))}])}); +!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()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var n,o;n=[i(1),i(2),i(3)],o=function(e,t,i){function n(e,t,o){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,o)}return n.modes={},n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=i.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,o,s=this.container,r=i.extend({},this.options);r.mode=e;var a=n.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{var d="text"==a.data;if(o=this.getName(),t=this[d?"getText":"get"](),this._delete(),i.clear(this),i.extend(this,a.mixin),this.create(s,r),this.setName(o),this[d?"setText":"set"](t),"function"==typeof a.load)try{a.load.call(this)}catch(h){}}catch(h){this._onError(h)}},n.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},n.registerMode=function(e){var t,o;if(i.isArray(e))for(t=0;te&&i.scrollTop>0?(n+a-e)/3:e>r-a&&o+i.scrollTop3?(i.scrollTop+=o/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},r._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var n=document.createElement("button");n.className="expand-all",n.title="Expand all fields",n.onclick=function(){t.expandAll()},this.menu.appendChild(n);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var d=document.createElement("button");d.className="redo",d.title="Redo (Ctrl+Shift+Z)",d.onclick=function(){t._onRedo()},this.menu.appendChild(d),this.dom.redo=d,this.history.onChange=function(){a.disabled=!t.history.canUndo(),d.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var h=o.create(this,this.options.modes,this.options.mode);this.menu.appendChild(h),this.dom.modeBox=h}this.options.search&&(this.searchBox=new i(this,this.menu))},r._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(d=t);var i=n.getNodeFromTarget(t);i&&i.onEvent(e)},r._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(d)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||i&&71==t){var r=!0;n?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),o=!0):i&&n&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},r._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},[{mode:"tree",mixin:r,data:"json"},{mode:"view",mixin:r,data:"json"},{mode:"form",mixin:r,data:"json"}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(8),i(3)],o=function(e,t){var i={};return i.create=function(i,n){n=n||{},this.options=n,this.indentation=n.indentation?Number(n.indentation):2,this.mode="code"==n.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var o=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var s=document.createElement("button");s.className="format",s.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(s),s.onclick=function(){try{o.format()}catch(e){o._onError(e)}};var r=document.createElement("button");if(r.className="compact",r.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(r),r.onclick=function(){try{o.compact()}catch(e){o._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var a=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(a),this.dom.modeBox=a}if(this.content=document.createElement("div"),this.content.className="outer",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=ace.edit(this.editorDom);d.setTheme("ace/theme/jsoneditor"),d.setShowPrintMargin(!1),d.setFontSize(13),d.getSession().setMode("ace/mode/json"),d.getSession().setTabSize(2),d.getSession().setUseSoftTabs(!0),d.getSession().setUseWrapMode(!0),this.editor=d;var h=document.createElement("a");h.appendChild(document.createTextNode("powered by ace")),h.href="http://ace.ajax.org",h.target="_blank",h.className="poweredBy",h.onclick=function(){window.open(h.href,h.target)},this.menu.appendChild(h),n.change&&d.on("change",function(){n.change()})}else{var l=document.createElement("textarea");l.className="text",l.spellcheck=!1,this.content.appendChild(l),this.textarea=l,n.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){n.change()}:this.textarea.onchange=function(){n.change()})}},i._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.get=function(){return t.parse(this.getText())},i.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},[{mode:"text",mixin:i,data:"text",load:i.format},{mode:"code",mixin:i,data:"text",load:i.format}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n;n=function(){var e={};e.parse=function(t){try{return JSON.parse(t)}catch(i){throw e.validate(t),i}},e.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},e.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},e.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},e.type=function(t){return null===t?"null":void 0===t?"undefined":t instanceof Number||"number"==typeof t?"number":t instanceof String||"string"==typeof t?"string":t instanceof Boolean||"boolean"==typeof t?"boolean":t instanceof RegExp||"regexp"==typeof t?"regexp":e.isArray(t)?"array":"object"};var t=/^https?:\/\/\S+$/;e.isUrl=function(e){return("string"==typeof e||e instanceof String)&&t.test(e)},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},e.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},e.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},e.removeClassName=function(e,t){var i=e.className.split(" "),n=i.indexOf(t);-1!=n&&(i.splice(n,1),e.className=i.join(" "))},e.stripFormatting=function(t){for(var i=t.childNodes,n=0,o=i.length;o>n;n++){var s=i[n];s.style&&s.removeAttribute("style");var r=s.attributes;if(r)for(var a=r.length-1;a>=0;a--){var d=r[a];1==d.specified&&s.removeAttribute(d.name)}e.stripFormatting(s)}},e.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},e.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},e.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},e.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},e.getSelectionOffset=function(){var t=e.getSelection();return t&&"startOffset"in t&&"endOffset"in t&&t.startContainer&&t.startContainer==t.endContainer?{startOffset:t.startOffset,endOffset:t.endOffset,container:t.startContainer.parentNode}:null},e.setSelectionOffset=function(t){if(document.createRange&&window.getSelection){var i=window.getSelection();if(i){var n=document.createRange();n.setStart(t.container.firstChild,t.startOffset),n.setEnd(t.container.firstChild,t.endOffset),e.setSelection(n)}}},e.getInnerText=function(t,i){var n=void 0==i;if(n&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),t.nodeValue)return i.flush()+t.nodeValue;if(t.hasChildNodes()){for(var o=t.childNodes,s="",r=0,a=o.length;a>r;r++){var d=o[r];if("DIV"==d.nodeName||"P"==d.nodeName){var h=o[r-1],l=h?h.nodeName:void 0;l&&"DIV"!=l&&"P"!=l&&"BR"!=l&&(s+="\n",i.flush()),s+=e.getInnerText(d,i),i.set("\n")}else"BR"==d.nodeName?(s+=i.flush(),i.set("\n")):s+=e.getInnerText(d,i)}return s}return"P"==t.nodeName&&-1!=e.getInternetExplorerVersion()?i.flush():""},e.getInternetExplorerVersion=function(){if(-1==i){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}i=e}return i},e.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var i=-1;return e.addEventListener=function(t,i,n,o){if(t.addEventListener)return void 0===o&&(o=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.addEventListener(i,n,o),n;if(t.attachEvent){var s=function(){return n.call(t,window.event)};return t.attachEvent("on"+i,s),s}},e.removeEventListener=function(t,i,n,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.removeEventListener(i,n,o)):t.detachEvent&&t.detachEvent("on"+i,n)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n;n=function(){function e(){this.locked=!1}return e.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},e.prototype.unhighlight=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))}},e.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(3)],o=function(e){function t(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},appendNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.appendChild(e.node)}},insertBeforeNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertBefore(e.node,e.beforeNode)}},insertAfterNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertAfter(e.node,e.afterNode)}},removeNode:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;t.insertBefore(e.node,i)},redo:function(e){e.parent.removeChild(e.node)}},duplicateNode:{undo:function(e){e.parent.removeChild(e.clone)},redo:function(e){e.parent.insertAfter(e.clone,e.node)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},moveNode:{undo:function(e){e.startParent.moveTo(e.node,e.startIndex)},redo:function(e){e.endParent.moveTo(e.node,e.endIndex)}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}return t.prototype.onChange=function(){},t.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,n=this.activeResult.elem;"field"==n?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,n=i.length>0?i:void 0;if(n!=this.lastText||t)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void 0),void 0!=n){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=o+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(9),i(10),i(3)],o=function(e,t,i){function n(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}n.prototype.setParent=function(e){this.parent=e},n.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},n.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},n.prototype.setValue=function(e,t){var i,o,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);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){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(o=new n(this.editor,{value:i}),this.appendChild(o));this.value=""}else if("object"==this.type){this.childs=[];for(var d in e)e.hasOwnProperty(d)&&(i=e[d],void 0===i||i instanceof Function||(o=new n(this.editor,{field:d,value:i}),this.appendChild(o)));this.value=""}else this.childs=void 0,this.value=e},n.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},n.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},n.prototype.clone=function(){var e=new n(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},n.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},n.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},n.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var n=this.getAppend(),o=t.nextSibling;o?i.insertBefore(n,o):i.appendChild(n),this.childs.forEach(function(e){i.insertBefore(e.getDom(),n),e.showChilds()})}}},n.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},n.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},n.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof o?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var n=this.childs[t]||this.append;this.moveBefore(e,n)},n.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),o=t.getDom(),s=o?o.parentNode:void 0;o&&s&&s.insertBefore(n,o),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){var t,i=[],n=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var o=String(this.field).toLowerCase();t=o.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=n){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},n.focusElement=void 0,n.prototype.focus=function(e){if(n.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(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},n.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var o=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==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,n&&(o?n.insertBefore(this.getDom(),o):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},n.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var n=this._unescapeHTML(this.valueInnerText);t=this._stringCast(n)}if(t!==this.value){var o=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},n.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,n="auto"==this.type?i.type(t):this.type,o="string"==n&&i.isUrl(t),s="";s=o&&!this.editor.mode.edit?"":"string"==n?"green":"number"==n?"red":"boolean"==n?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),o?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==n||"object"==n){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==n&&i.isUrl(t)?this.editor.mode.edit&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var n=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(o){if(this.field=void 0,1!=e)throw o}},n.prototype.clearDom=function(){this.dom={}},n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,this.editor.mode.edit){var t=document.createElement("td");if(this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),o=document.createElement("button");e.menu=o,o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},n.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},n.prototype._onDrag=function(e){var t,s,r,a,d,h,l,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,C=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,l=n.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);l&&!l.parent&&(l=void 0),l||(h=t.parentNode.firstChild,s=h?h.nextSibling:void 0,l=n.getNodeFromTarget(s),l==this&&(l=void 0)),l&&(s=l.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(l=void 0)),l&&(l.parent.moveBefore(this,l),C=!0)}else if(d=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=d?d.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=n.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var b=x-this.drag.mouseX,E=Math.round(b/24/2),N=this.drag.level+E,_=c.getLevel();for(s=c.dom.tr.previousSibling;N>_&&s;){if(l=n.getNodeFromTarget(s),l==this||l._isChildOf(this));else{if(!(l instanceof o))break;var w=l.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=n.getNodeFromTarget(s),_=c.getLevel()}s=s.previousSibling}d.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),C=!0)}}C&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},n.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},n.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){return document.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){1==this.fieldEditable?(i.contentEditable=this.editor.mode.edit,i.spellcheck=!1,i.className="field"):i.className="readonly";var n;n=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}var o=this.dom.value;if(o){var s=this.childs?this.childs.length:0;o.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editor.mode.edit&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=!this.editor.mode.view,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},n.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var o=document.createElement("td");o.className="tree",n.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var s=document.createElement("td");s.className="tree",n.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",n.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){var t,n=e.type,o=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((o==s.drag||o==s.menu)&&("mouseover"==n?this.editor.highlighter.highlight(this):"mouseout"==n&&this.editor.highlighter.unhighlight()),"mousedown"==n&&o==s.drag&&this._onDragStart(e),"click"==n&&o==s.menu){var d=r.editor.highlighter;d.highlight(r),d.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),d.unlock(),d.unhighlight()})}if("click"==n&&o==s.expand&&a){var h=e.ctrlKey;this._onExpand(h)}var l=s.value;if(o==l)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(l.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":e.ctrlKey&&this.editor.mode.edit&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(o==c)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(o==u.parentNode)switch(n){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXn[i]?t:e[i]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},n.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',n=i.parse(t);return n.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},n.prototype._escapeJSON=function(e){for(var t="",i=0,n=e.length;n>i;){var o=e.charAt(i);"\n"==o?t+="\\n":"\\"==o?(t+=o,i++,o=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(o)&&(t+="\\"),t+=o):t+='"'==o?'\\"':o,i++}return t};var o=t(n);return n}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9)],o=function(e){function t(t,i,n){function o(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){o("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){o("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){o("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){o("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){o("view")}}},r=[],a=0;a',a.appendChild(c),o.submenuTitle&&(c.title=o.submenuTitle),l=c}else{var u=document.createElement("div");u.className="expand",d.appendChild(u),l=d}l.onclick=function(){n._onExpandItem(r),l.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,o.submenu)}else d.innerHTML='
'+o.text;t.push(r)}})}this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",o.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),o.list=r,o.items=[];var a=document.createElement("button");o.focusButton=a;var d=document.createElement("li");d.style.overflow="hidden",d.style.height="0",d.appendChild(a),r.appendChild(d),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var n=window.innerHeight,o=window.pageYOffset||document.scrollTop||0,s=n+o,r=i.offsetHeight,a=this.maxHeight,d=e.getAbsoluteLeft(i),h=e.getAbsoluteTop(i);s>h+r+a?(this.dom.menu.style.left=d+"px",this.dom.menu.style.top=h+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=d+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=n-h+"px"),document.body.appendChild(this.dom.menu);var l=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||l._isChildOf(t,c)||(l.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){l._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){l.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var n=this.eventListeners[i];n&&e.removeEventListener(document,i,n),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,n=t==this.expandedItem,o=this.expandedItem;if(o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout(function(){i.expandedItem!=o&&(o.ul.style.display="",e.removeClassName(o.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!n){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,n,o,s,r=t.target,a=t.which,d=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),d=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),n=i.indexOf(r),0==n&&(i[i.length-1].focus(),d=!0)):(i=this._getVisibleButtons(),n=i.indexOf(r),n==i.length-1&&(i[0].focus(),d=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&o.focus()),d=!0):38==a?(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&"expand"==o.className&&(o=i[n-2]),o||(o=i[i.length-1]),o&&o.focus(),d=!0):39==a?(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&s.focus(),d=!0):40==a&&(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&(s=i[n+2]),s||(s=i[0]),s&&(s.focus(),d=!0),d=!0),d&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9),i(3)],o=function(e,t){function i(i){function n(e){this.editor=e,this.dom={}}return n.prototype=new i,n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editor.mode.edit){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var o=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",o.appendChild(s),e.td=o,e.text=s,this.updateDom(),t},n.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},n.prototype.isVisible=function(){return 0==this.parent.childs.length},n.prototype.showContextMenu=function(t,n){var o=this,s=i.TYPE_TITLES,r=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:s.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:s.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:s.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:s.string,click:function(){o._onAppend("","","string")}}]}],a=new e(r,{close:n});a.show(t)},n.prototype.onEvent=function(e){var i=e.type,n=e.target||e.srcElement,o=this.dom,s=o.menu;if(n==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&n==o.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),t.addClassName(o.menu,"selected"),this.showContextMenu(o.menu,function(){t.removeClassName(o.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(e)},n}return i}.apply(null,n),!(void 0!==o&&(e.exports=o))}])}); //# sourceMappingURL=jsoneditor.map \ No newline at end of file diff --git a/package.json b/package.json index 74079ff..7b2a67d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsoneditor", - "version": "3.0.0-SNAPSHOT", + "version": "3.0.0", "main": "jsoneditor.js", "description": "A web-based tool to view, edit and format JSON", "tags": [