From 28e2a8f103b049e8012bf50adf0a8a2538e68a66 Mon Sep 17 00:00:00 2001 From: Jeremy Dorn Date: Tue, 12 Apr 2016 23:35:24 -0700 Subject: [PATCH] Version bump to 0.7.25 --- dist/jsoneditor.js | 352 +++++++++++++++++++++++++++++------------ dist/jsoneditor.js.map | 18 ++- dist/jsoneditor.min.js | 14 +- package.json | 2 +- src/intro.js | 4 +- 5 files changed, 274 insertions(+), 116 deletions(-) diff --git a/dist/jsoneditor.js b/dist/jsoneditor.js index f18cf43c7..1d0cf7556 100644 --- a/dist/jsoneditor.js +++ b/dist/jsoneditor.js @@ -1,8 +1,8 @@ -/*! JSON Editor v0.7.24 - JSON Schema -> HTML Editor +/*! JSON Editor v0.7.25 - JSON Schema -> HTML Editor * By Jeremy Dorn - https://github.com/jdorn/json-editor/ * Released under the MIT license * - * Date: 2016-02-11 + * Date: 2016-04-12 */ /** @@ -1553,7 +1553,15 @@ JSONEditor.AbstractEditor = Class.extend({ // Template to generate the link href var href = this.jsoneditor.compileTemplate(data.href,this.template_engine); - + + // Template to generate the link's download attribute + var download = null; + if(data.download) download = data.download; + + if(download && download !== true) { + download = this.jsoneditor.compileTemplate(download, this.template_engine); + } + // Image links if(type === 'image') { holder = this.theme.getBlockLinkHolder(); @@ -1593,18 +1601,29 @@ JSONEditor.AbstractEditor = Class.extend({ } // Text links else { - holder = this.theme.getBlockLink(); + link = holder = this.theme.getBlockLink(); holder.setAttribute('target','_blank'); holder.textContent = data.rel; - - // When a watched field changes, update the url + + // When a watched field changes, update the url this.link_watchers.push(function(vars) { var url = href(vars); holder.setAttribute('href',url); holder.textContent = data.rel || url; }); } - + + if(download && link) { + if(download === true) { + link.setAttribute('download',''); + } + else { + this.link_watchers.push(function(vars) { + link.setAttribute('download',download(vars)); + }); + } + } + return holder; }, refreshWatchedFieldValues: function() { @@ -1955,6 +1974,7 @@ JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({ 'ejs', 'erlang', 'golang', + 'groovy', 'handlebars', 'haskell', 'haxe', @@ -2337,7 +2357,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ enable: function() { if(this.editjson_button) this.editjson_button.disabled = false; if(this.addproperty_button) this.addproperty_button.disabled = false; - + this._super(); if(this.editors) { for(var i in this.editors) { @@ -2350,7 +2370,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ if(this.editjson_button) this.editjson_button.disabled = true; if(this.addproperty_button) this.addproperty_button.disabled = true; this.hideEditJSON(); - + this._super(); if(this.editors) { for(var i in this.editors) { @@ -2361,7 +2381,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ }, layoutEditors: function() { var self = this, i, j; - + if(!this.row_container) return; // Sort editors by propertyOrder @@ -2374,9 +2394,9 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ return ordera - orderb; }); - + var container; - + if(this.format === 'grid') { var rows = []; $each(this.property_order, function(j,key) { @@ -2396,7 +2416,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ } } } - + // If there isn't a spot in any of the existing rows, start a new row if(found === false) { rows.push({ @@ -2407,7 +2427,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ }); found = rows.length-1; } - + rows[found].editors.push({ key: key, //editor: editor, @@ -2418,7 +2438,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ rows[found].minh = Math.min(rows[found].minh,height); rows[found].maxh = Math.max(rows[found].maxh,height); }); - + // Make almost full rows width 12 // Do this by increasing all editors' sizes proprotionately // Any left over space goes to the biggest editor @@ -2438,11 +2458,11 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ rows[i].width = 12; } } - + // layout hasn't changed if(this.layout === JSON.stringify(rows)) return false; this.layout = JSON.stringify(rows); - + // Layout the form container = document.createElement('div'); for(i=0; i= this.schema.maxProperties); - + if(this.addproperty_checkboxes) { this.addproperty_list.innerHTML = ''; } this.addproperty_checkboxes = {}; - + // Check for which editors can't be removed or added back for(i in this.cached_editors) { if(!this.cached_editors.hasOwnProperty(i)) continue; - + this.addPropertyCheckbox(i); - + if(this.isRequired(this.cached_editors[i]) && i in this.editors) { this.addproperty_checkboxes[i].disabled = true; } - + if(typeof this.schema.minProperties !== "undefined" && num_props <= this.schema.minProperties) { this.addproperty_checkboxes[i].disabled = this.addproperty_checkboxes[i].checked; if(!this.addproperty_checkboxes[i].checked) show_modal = true; @@ -3061,11 +3081,11 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ can_remove = true; } } - + if(this.canHaveAdditionalProperties()) { show_modal = true; } - + // Additional addproperty checkboxes not tied to a current editor for(i in this.schema.properties) { if(!this.schema.properties.hasOwnProperty(i)) continue; @@ -3073,7 +3093,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ show_modal = true; this.addPropertyCheckbox(i); } - + // If no editors can be added or removed, hide the modal button if(!show_modal) { this.hideAddProperty(); @@ -3102,7 +3122,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ setValue: function(value, initial) { var self = this; value = value || {}; - + if(typeof value !== "object" || Array.isArray(value)) value = {}; // First, set the values for all of the defined properties @@ -3128,7 +3148,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({ if(self.editors[i]) self.editors[i].setValue(val,initial); } }); - + this.refreshValue(); this.layoutEditors(); this.onChange(); @@ -3250,6 +3270,8 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({ this.row_cache = []; this.hide_delete_buttons = this.options.disable_array_delete || this.jsoneditor.options.disable_array_delete; + this.hide_delete_all_rows_buttons = this.hide_delete_buttons || this.options.disable_array_delete_all_rows || this.jsoneditor.options.disable_array_delete_all_rows; + this.hide_delete_last_row_buttons = this.hide_delete_buttons || this.options.disable_array_delete_last_row || this.jsoneditor.options.disable_array_delete_last_row; this.hide_move_buttons = this.options.disable_array_reorder || this.jsoneditor.options.disable_array_reorder; this.hide_add_button = this.options.disable_array_add || this.jsoneditor.options.disable_array_add; }, @@ -3576,8 +3598,8 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({ else if(this.value.length === 1) { this.remove_all_rows_button.style.display = 'none'; - // If there are minItems items in the array, hide the delete button beneath the rows - if(minItems || this.hide_delete_buttons) { + // If there are minItems items in the array, or configured to hide the delete_last_row button, hide the delete button beneath the rows + if(minItems || this.hide_delete_last_row_buttons) { this.delete_last_row_button.style.display = 'none'; } else { @@ -3586,13 +3608,18 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({ } } else { - // If there are minItems items in the array, hide the delete button beneath the rows - if(minItems || this.hide_delete_buttons) { + if(minItems || this.hide_delete_last_row_buttons) { this.delete_last_row_button.style.display = 'none'; - this.remove_all_rows_button.style.display = 'none'; } else { this.delete_last_row_button.style.display = ''; + controls_needed = true; + } + + if(minItems || this.hide_delete_all_rows_buttons) { + this.remove_all_rows_button.style.display = 'none'; + } + else { this.remove_all_rows_button.style.display = ''; controls_needed = true; } @@ -3927,7 +3954,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ var tmp = this.getElementEditor(0,true); this.item_default = tmp.getDefault(); this.width = tmp.getNumColumns() + 2; - + if(!this.options.compact) { this.title = this.theme.getHeader(this.getTitle()); this.container.appendChild(this.title); @@ -4003,7 +4030,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ compact: true, table_row: true }); - + ret.preBuild(); if(!ignore) { ret.build(); @@ -4016,7 +4043,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ ret.table_controls.style.margin = 0; ret.table_controls.style.padding = 0; } - + return ret; }, destroy: function() { @@ -4044,7 +4071,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ if(this.schema.maxItems && value.length > this.schema.maxItems) { value = value.slice(0,this.schema.maxItems); } - + var serialized = JSON.stringify(value); if(serialized === this.serialized) return; @@ -4078,15 +4105,15 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ if(numrows_changed || initial) self.refreshRowButtons(); self.onChange(); - + // TODO: sortable }, refreshRowButtons: function() { var self = this; - + // If we currently have minItems items in the array var minItems = this.schema.minItems && this.schema.minItems >= this.rows.length; - + var need_row_buttons = false; $each(this.rows,function(i,editor) { // Hide the move down button for the last row @@ -4110,12 +4137,12 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ editor.delete_button.style.display = ''; } } - + if(editor.moveup_button) { need_row_buttons = true; } }); - + // Show/hide controls column in table $each(this.rows,function(i,editor) { if(need_row_buttons) { @@ -4131,20 +4158,20 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ else { this.controls_header_cell.style.display = 'none'; } - + var controls_needed = false; - + if(!this.value.length) { this.delete_last_row_button.style.display = 'none'; this.remove_all_rows_button.style.display = 'none'; this.table.style.display = 'none'; } - else if(this.value.length === 1 || this.hide_delete_buttons) { + else if(this.value.length === 1) { this.table.style.display = ''; this.remove_all_rows_button.style.display = 'none'; - // If there are minItems items in the array, hide the delete button beneath the rows - if(minItems || this.hide_delete_buttons) { + // If there are minItems items in the array, or configured to hide the delete_last_row button, hide the delete button beneath the rows + if(minItems || this.hide_delete_last_row_buttons) { this.delete_last_row_button.style.display = 'none'; } else { @@ -4154,13 +4181,19 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ } else { this.table.style.display = ''; - // If there are minItems items in the array, hide the delete button beneath the rows - if(minItems || this.hide_delete_buttons) { + + if(minItems || this.hide_delete_last_row_buttons) { this.delete_last_row_button.style.display = 'none'; - this.remove_all_rows_button.style.display = 'none'; } else { this.delete_last_row_button.style.display = ''; + controls_needed = true; + } + + if(minItems || this.hide_delete_all_rows_buttons) { + this.remove_all_rows_button.style.display = 'none'; + } + else { this.remove_all_rows_button.style.display = ''; controls_needed = true; } @@ -4174,7 +4207,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ this.add_row_button.style.display = ''; controls_needed = true; } - + if(!controls_needed) { this.controls.style.display = 'none'; } @@ -4223,7 +4256,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ controls_holder.appendChild(self.rows[i].delete_button); } - + if(i && !this.hide_move_buttons) { self.rows[i].moveup_button = this.getButton('','moveup',this.translate('button_move_up_title')); self.rows[i].moveup_button.className += ' moveup'; @@ -4244,7 +4277,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ }); controls_holder.appendChild(self.rows[i].moveup_button); } - + if(!this.hide_move_buttons) { self.rows[i].movedown_button = this.getButton('','movedown',this.translate('button_move_down_title')); self.rows[i].movedown_button.className += ' movedown'; @@ -4309,7 +4342,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ this.add_row_button.addEventListener('click',function(e) { e.preventDefault(); e.stopPropagation(); - + self.addRow(); self.refreshValue(); self.refreshRowButtons(); @@ -4321,7 +4354,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ this.delete_last_row_button.addEventListener('click',function(e) { e.preventDefault(); e.stopPropagation(); - + var rows = self.getValue(); rows.pop(); self.setValue(rows); @@ -4333,7 +4366,7 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({ this.remove_all_rows_button.addEventListener('click',function(e) { e.preventDefault(); e.stopPropagation(); - + self.setValue([]); self.onChange(true); }); @@ -6812,7 +6845,7 @@ JSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({ addInputError: function(input,text) { if(!input.group) return; input.group.className += ' error'; - + if(!input.errmsg) { input.insertAdjacentHTML('afterend',''); input.errmsg = input.parentNode.getElementsByClassName('error')[0]; @@ -6820,7 +6853,7 @@ JSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({ else { input.errmsg.style.display = ''; } - + input.errmsg.textContent = text; }, removeInputError: function(input) { @@ -6968,6 +7001,68 @@ JSONEditor.defaults.themes.foundation5 = JSONEditor.defaults.themes.foundation.e } }); +JSONEditor.defaults.themes.foundation6 = JSONEditor.defaults.themes.foundation5.extend({ + getIndentedPanel: function() { + var el = document.createElement('div'); + el.className = 'callout secondary'; + return el; + }, + getButtonHolder: function() { + var el = document.createElement('div'); + el.className = 'button-group tiny'; + el.style.marginBottom = 0; + return el; + }, + getFormInputLabel: function(text) { + var el = this._super(text); + el.style.display = 'block'; + return el; + }, + getFormControl: function(label, input, description) { + var el = document.createElement('div'); + el.className = 'form-control'; + if(label) el.appendChild(label); + if(input.type === 'checkbox') { + label.insertBefore(input,label.firstChild); + } + else if (label) { + label.appendChild(input); + } else { + el.appendChild(input); + } + + if(description) label.appendChild(description); + return el; + }, + addInputError: function(input,text) { + if(!input.group) return; + input.group.className += ' error'; + + if(!input.errmsg) { + var errorEl = document.createElement('span'); + errorEl.className = 'form-error is-visible'; + input.group.getElementsByTagName('label')[0].appendChild(errorEl); + + input.className = input.className + ' is-invalid-input'; + + input.errmsg = errorEl; + } + else { + input.errmsg.style.display = ''; + input.className = ''; + } + + input.errmsg.textContent = text; + }, + removeInputError: function(input) { + if(!input.errmsg) return; + input.className = input.className.replace(/ is-invalid-input/g,''); + if(input.errmsg.parentNode) { + input.errmsg.parentNode.removeChild(input.errmsg); + } + }, +}); + JSONEditor.defaults.themes.html = JSONEditor.AbstractTheme.extend({ getFormInputLabel: function(text) { var el = this._super(text); @@ -7208,6 +7303,67 @@ JSONEditor.defaults.themes.jqueryui = JSONEditor.AbstractTheme.extend({ } }); +JSONEditor.defaults.themes.barebones = JSONEditor.AbstractTheme.extend({ + getFormInputLabel: function (text) { + var el = this._super(text); + return el; + }, + getFormInputDescription: function (text) { + var el = this._super(text); + return el; + }, + getIndentedPanel: function () { + var el = this._super(); + return el; + }, + getChildEditorHolder: function () { + var el = this._super(); + return el; + }, + getHeaderButtonHolder: function () { + var el = this.getButtonHolder(); + return el; + }, + getTable: function () { + var el = this._super(); + return el; + }, + addInputError: function (input, text) { + if (!input.errmsg) { + var group = this.closest(input, '.form-control'); + input.errmsg = document.createElement('div'); + input.errmsg.setAttribute('class', 'errmsg'); + group.appendChild(input.errmsg); + } + else { + input.errmsg.style.display = 'block'; + } + + input.errmsg.innerHTML = ''; + input.errmsg.appendChild(document.createTextNode(text)); + }, + removeInputError: function (input) { + input.style.borderColor = ''; + if (input.errmsg) input.errmsg.style.display = 'none'; + }, + getProgressBar: function () { + var max = 100, start = 0; + + var progressBar = document.createElement('progress'); + progressBar.setAttribute('max', max); + progressBar.setAttribute('value', start); + return progressBar; + }, + updateProgressBar: function (progressBar, progress) { + if (!progressBar) return; + progressBar.setAttribute('value', progress); + }, + updateProgressBarUnknown: function (progressBar) { + if (!progressBar) return; + progressBar.removeAttribute('value'); + } +}); + JSONEditor.AbstractIconLib = Class.extend({ mapping: { collapse: '', diff --git a/dist/jsoneditor.js.map b/dist/jsoneditor.js.map index 90cd0b349..760879a14 100644 --- a/dist/jsoneditor.js.map +++ b/dist/jsoneditor.js.map @@ -31,6 +31,7 @@ "src/themes/foundation.js", "src/themes/html.js", "src/themes/jqueryui.js", + "src/themes/jsoneditor.barebones-theme.js", "src/iconlib.js", "src/iconlibs/bootstrap2.js", "src/iconlibs/bootstrap3.js", @@ -52,22 +53,22 @@ "src/outro.js" ], "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACz2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5rBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/DA;AACA;A", + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACz2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/DA;AACA;A", "sourcesContent": [ - "/*! JSON Editor v0.7.24 - JSON Schema -> HTML Editor\n * By Jeremy Dorn - https://github.com/jdorn/json-editor/\n * Released under the MIT license\n *\n * Date: 2016-02-11\n */\n\n/**\n * See README.md for requirements and usage info\n */\n\n(function() {\n", + "/*! JSON Editor v0.7.25 - JSON Schema -> HTML Editor\n * By Jeremy Dorn - https://github.com/jdorn/json-editor/\n * Released under the MIT license\n *\n * Date: 2016-04-12\n */\n\n/**\n * See README.md for requirements and usage info\n */\n\n(function() {\n", "/*jshint loopfunc: true */\n/* Simple JavaScript Inheritance\n * By John Resig http://ejohn.org/\n * MIT Licensed.\n */\n// Inspired by base2 and Prototype\nvar Class;\n(function(){\n var initializing = false, fnTest = /xyz/.test(function(){window.postMessage(\"xyz\");}) ? /\\b_super\\b/ : /.*/;\n \n // The base Class implementation (does nothing)\n Class = function(){};\n \n // Create a new Class that inherits from this class\n Class.extend = function(prop) {\n var _super = this.prototype;\n \n // Instantiate a base class (but only create the instance,\n // don't run the init constructor)\n initializing = true;\n var prototype = new this();\n initializing = false;\n \n // Copy the properties over onto the new prototype\n for (var name in prop) {\n // Check if we're overwriting an existing function\n prototype[name] = typeof prop[name] == \"function\" &&\n typeof _super[name] == \"function\" && fnTest.test(prop[name]) ?\n (function(name, fn){\n return function() {\n var tmp = this._super;\n \n // Add a new ._super() method that is the same method\n // but on the super-class\n this._super = _super[name];\n \n // The method only need to be bound temporarily, so we\n // remove it when we're done executing\n var ret = fn.apply(this, arguments); \n this._super = tmp;\n \n return ret;\n };\n })(name, prop[name]) :\n prop[name];\n }\n \n // The dummy class constructor\n function Class() {\n // All construction is actually done in the init method\n if ( !initializing && this.init )\n this.init.apply(this, arguments);\n }\n \n // Populate our constructed prototype object\n Class.prototype = prototype;\n \n // Enforce the constructor to be what we expect\n Class.prototype.constructor = Class;\n \n // And make this class extendable\n Class.extend = arguments.callee;\n \n return Class;\n };\n \n return Class;\n})();\n", "// CustomEvent constructor polyfill\n// From MDN\n(function () {\n function CustomEvent ( event, params ) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent( 'CustomEvent' );\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n\n window.CustomEvent = CustomEvent;\n})();\n\n// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n// MIT license\n(function() {\n var lastTime = 0;\n var vendors = ['ms', 'moz', 'webkit', 'o'];\n for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];\n window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || \n window[vendors[x]+'CancelRequestAnimationFrame'];\n }\n \n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function(callback, element) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window.setTimeout(function() { callback(currTime + timeToCall); }, \n timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n \n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n}());\n\n// Array.isArray polyfill\n// From MDN\n(function() {\n\tif(!Array.isArray) {\n\t Array.isArray = function(arg) {\n\t\treturn Object.prototype.toString.call(arg) === '[object Array]';\n\t };\n\t}\n}());", "/**\n * Taken from jQuery 2.1.3\n *\n * @param obj\n * @returns {boolean}\n */\nvar $isplainobject = function( obj ) {\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n // - DOM nodes\n // - window\n if (typeof obj !== \"object\" || obj.nodeType || (obj !== null && obj === obj.window)) {\n return false;\n }\n\n if (obj.constructor && !Object.prototype.hasOwnProperty.call(obj.constructor.prototype, \"isPrototypeOf\")) {\n return false;\n }\n\n // If the function hasn't returned already, we're confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n};\n\nvar $extend = function(destination) {\n var source, i,property;\n for(i=1; i 0 && (obj.length - 1) in obj)) {\n for(i=0; i= waiting && !callback_fired) {\n callback_fired = true;\n callback();\n }\n });\n }\n // Request failed\n else {\n window.console.log(r);\n throw \"Failed to fetch ref via ajax- \"+url;\n }\n };\n r.send();\n });\n \n if(!waiting) {\n callback();\n }\n },\n expandRefs: function(schema) {\n schema = $extend({},schema);\n \n while (schema.$ref) {\n var ref = schema.$ref;\n delete schema.$ref;\n \n if(!this.refs[ref]) ref = decodeURIComponent(ref);\n \n schema = this.extendSchemas(schema,this.refs[ref]);\n }\n return schema;\n },\n expandSchema: function(schema) {\n var self = this;\n var extended = $extend({},schema);\n var i;\n\n // Version 3 `type`\n if(typeof schema.type === 'object') {\n // Array of types\n if(Array.isArray(schema.type)) {\n $each(schema.type, function(key,value) {\n // Schema\n if(typeof value === 'object') {\n schema.type[key] = self.expandSchema(value);\n }\n });\n }\n // Schema\n else {\n schema.type = self.expandSchema(schema.type);\n }\n }\n // Version 3 `disallow`\n if(typeof schema.disallow === 'object') {\n // Array of types\n if(Array.isArray(schema.disallow)) {\n $each(schema.disallow, function(key,value) {\n // Schema\n if(typeof value === 'object') {\n schema.disallow[key] = self.expandSchema(value);\n }\n });\n }\n // Schema\n else {\n schema.disallow = self.expandSchema(schema.disallow);\n }\n }\n // Version 4 `anyOf`\n if(schema.anyOf) {\n $each(schema.anyOf, function(key,value) {\n schema.anyOf[key] = self.expandSchema(value);\n });\n }\n // Version 4 `dependencies` (schema dependencies)\n if(schema.dependencies) {\n $each(schema.dependencies,function(key,value) {\n if(typeof value === \"object\" && !(Array.isArray(value))) {\n schema.dependencies[key] = self.expandSchema(value);\n }\n });\n }\n // Version 4 `not`\n if(schema.not) {\n schema.not = this.expandSchema(schema.not);\n }\n \n // allOf schemas should be merged into the parent\n if(schema.allOf) {\n for(i=0; i schema.minimum) : (value >= schema.minimum);\n\n // Use math.js is available\n if(window.math) {\n valid = window.math[schema.exclusiveMinimum?'larger':'largerEq'](\n window.math.bignumber(value),\n window.math.bignumber(schema.minimum)\n );\n }\n // Use Decimal.js if available\n else if(window.Decimal) {\n valid = (new window.Decimal(value))[schema.exclusiveMinimum?'gt':'gte'](new window.Decimal(schema.minimum));\n }\n\n if(!valid) {\n errors.push({\n path: path,\n property: 'minimum',\n message: this.translate(\n (schema.exclusiveMinimum?'error_minimum_excl':'error_minimum_incl'),\n [schema.minimum]\n )\n });\n }\n }\n }\n // String specific validation\n else if(typeof value === \"string\") {\n // `maxLength`\n if(schema.maxLength) {\n if((value+\"\").length > schema.maxLength) {\n errors.push({\n path: path,\n property: 'maxLength',\n message: this.translate('error_maxLength', [schema.maxLength])\n });\n }\n }\n\n // `minLength`\n if(schema.minLength) {\n if((value+\"\").length < schema.minLength) {\n errors.push({\n path: path,\n property: 'minLength',\n message: this.translate((schema.minLength===1?'error_notempty':'error_minLength'), [schema.minLength])\n });\n }\n }\n\n // `pattern`\n if(schema.pattern) {\n if(!(new RegExp(schema.pattern)).test(value)) {\n errors.push({\n path: path,\n property: 'pattern',\n message: this.translate('error_pattern', [schema.pattern])\n });\n }\n }\n }\n // Array specific validation\n else if(typeof value === \"object\" && value !== null && Array.isArray(value)) {\n // `items` and `additionalItems`\n if(schema.items) {\n // `items` is an array\n if(Array.isArray(schema.items)) {\n for(i=0; i schema.maxItems) {\n errors.push({\n path: path,\n property: 'maxItems',\n message: this.translate('error_maxItems', [schema.maxItems])\n });\n }\n }\n\n // `minItems`\n if(schema.minItems) {\n if(value.length < schema.minItems) {\n errors.push({\n path: path,\n property: 'minItems',\n message: this.translate('error_minItems', [schema.minItems])\n });\n }\n }\n\n // `uniqueItems`\n if(schema.uniqueItems) {\n var seen = {};\n for(i=0; i schema.maxProperties) {\n errors.push({\n path: path,\n property: 'maxProperties',\n message: this.translate('error_maxProperties', [schema.maxProperties])\n });\n }\n }\n\n // `minProperties`\n if(schema.minProperties) {\n valid = 0;\n for(i in value) {\n if(!value.hasOwnProperty(i)) continue;\n valid++;\n }\n if(valid < schema.minProperties) {\n errors.push({\n path: path,\n property: 'minProperties',\n message: this.translate('error_minProperties', [schema.minProperties])\n });\n }\n }\n\n // Version 4 `required`\n if(schema.required && Array.isArray(schema.required)) {\n for(i=0; i=0) {\n holder = this.theme.getBlockLinkHolder();\n \n link = this.theme.getBlockLink();\n link.setAttribute('target','_blank');\n \n var media = document.createElement(type);\n media.setAttribute('controls','controls');\n \n this.theme.createMediaLink(holder,link,media);\n \n // When a watched field changes, update the url \n this.link_watchers.push(function(vars) {\n var url = href(vars);\n link.setAttribute('href',url);\n link.textContent = data.rel || url;\n media.setAttribute('src',url);\n });\n }\n // Text links\n else {\n holder = this.theme.getBlockLink();\n holder.setAttribute('target','_blank');\n holder.textContent = data.rel;\n \n // When a watched field changes, update the url \n this.link_watchers.push(function(vars) {\n var url = href(vars);\n holder.setAttribute('href',url);\n holder.textContent = data.rel || url;\n });\n }\n \n return holder;\n },\n refreshWatchedFieldValues: function() {\n if(!this.watched_values) return;\n var watched = {};\n var changed = false;\n var self = this;\n \n if(this.watched) {\n var val,editor;\n for(var name in this.watched) {\n if(!this.watched.hasOwnProperty(name)) continue;\n editor = self.jsoneditor.getEditor(this.watched[name]);\n val = editor? editor.getValue() : null;\n if(self.watched_values[name] !== val) changed = true;\n watched[name] = val;\n }\n }\n \n watched.self = this.getValue();\n if(this.watched_values.self !== watched.self) changed = true;\n \n this.watched_values = watched;\n \n return changed;\n },\n getWatchedFieldValues: function() {\n return this.watched_values;\n },\n updateHeaderText: function() {\n if(this.header) {\n // If the header has children, only update the text node's value\n if(this.header.children.length) {\n for(var i=0; i -1;\n else if(this.jsoneditor.options.required_by_default) return true;\n else return false;\n }, \n getDisplayText: function(arr) {\n var disp = [];\n var used = {};\n \n // Determine how many times each attribute name is used.\n // This helps us pick the most distinct display text for the schemas.\n $each(arr,function(i,el) {\n if(el.title) {\n used[el.title] = used[el.title] || 0;\n used[el.title]++;\n }\n if(el.description) {\n used[el.description] = used[el.description] || 0;\n used[el.description]++;\n }\n if(el.format) {\n used[el.format] = used[el.format] || 0;\n used[el.format]++;\n }\n if(el.type) {\n used[el.type] = used[el.type] || 0;\n used[el.type]++;\n }\n });\n \n // Determine display text for each element of the array\n $each(arr,function(i,el) {\n var name;\n \n // If it's a simple string\n if(typeof el === \"string\") name = el;\n // Object\n else if(el.title && used[el.title]<=1) name = el.title;\n else if(el.format && used[el.format]<=1) name = el.format;\n else if(el.type && used[el.type]<=1) name = el.type;\n else if(el.description && used[el.description]<=1) name = el.descripton;\n else if(el.title) name = el.title;\n else if(el.format) name = el.format;\n else if(el.type) name = el.type;\n else if(el.description) name = el.description;\n else if(JSON.stringify(el).length < 50) name = JSON.stringify(el);\n else name = \"type\";\n \n disp.push(name);\n });\n \n // Replace identical display text with \"text 1\", \"text 2\", etc.\n var inc = {};\n $each(disp,function(i,name) {\n inc[name] = inc[name] || 0;\n inc[name]++;\n \n if(used[name] > 1) disp[i] = name + \" \" + inc[name];\n });\n \n return disp;\n },\n getOption: function(key) {\n try {\n throw \"getOption is deprecated\";\n }\n catch(e) {\n window.console.error(e);\n }\n \n return this.options[key];\n },\n showValidationErrors: function(errors) {\n\n }\n});\n", + "/**\n * All editors should extend from this class\n */\nJSONEditor.AbstractEditor = Class.extend({\n onChildEditorChange: function(editor) {\n this.onChange(true);\n },\n notify: function() {\n this.jsoneditor.notifyWatchers(this.path);\n },\n change: function() {\n if(this.parent) this.parent.onChildEditorChange(this);\n else this.jsoneditor.onChange();\n },\n onChange: function(bubble) {\n this.notify();\n if(this.watch_listener) this.watch_listener();\n if(bubble) this.change();\n },\n register: function() {\n this.jsoneditor.registerEditor(this);\n this.onChange();\n },\n unregister: function() {\n if(!this.jsoneditor) return;\n this.jsoneditor.unregisterEditor(this);\n },\n getNumColumns: function() {\n return 12;\n },\n init: function(options) {\n this.jsoneditor = options.jsoneditor;\n \n this.theme = this.jsoneditor.theme;\n this.template_engine = this.jsoneditor.template;\n this.iconlib = this.jsoneditor.iconlib;\n \n this.translate = this.jsoneditor.translate || JSONEditor.defaults.translate;\n\n this.original_schema = options.schema;\n this.schema = this.jsoneditor.expandSchema(this.original_schema);\n \n this.options = $extend({}, (this.options || {}), (options.schema.options || {}), options);\n \n if(!options.path && !this.schema.id) this.schema.id = 'root';\n this.path = options.path || 'root';\n this.formname = options.formname || this.path.replace(/\\.([^.]+)/g,'[$1]');\n if(this.jsoneditor.options.form_name_root) this.formname = this.formname.replace(/^root\\[/,this.jsoneditor.options.form_name_root+'[');\n this.key = this.path.split('.').pop();\n this.parent = options.parent;\n \n this.link_watchers = [];\n \n if(options.container) this.setContainer(options.container);\n },\n setContainer: function(container) {\n this.container = container;\n if(this.schema.id) this.container.setAttribute('data-schemaid',this.schema.id);\n if(this.schema.type && typeof this.schema.type === \"string\") this.container.setAttribute('data-schematype',this.schema.type);\n this.container.setAttribute('data-schemapath',this.path);\n },\n \n preBuild: function() {\n\n },\n build: function() {\n \n },\n postBuild: function() {\n this.setupWatchListeners();\n this.addLinks();\n this.setValue(this.getDefault(), true);\n this.updateHeaderText();\n this.register();\n this.onWatchedFieldChange();\n },\n \n setupWatchListeners: function() {\n var self = this;\n \n // Watched fields\n this.watched = {};\n if(this.schema.vars) this.schema.watch = this.schema.vars;\n this.watched_values = {};\n this.watch_listener = function() {\n if(self.refreshWatchedFieldValues()) {\n self.onWatchedFieldChange();\n }\n };\n \n this.register();\n if(this.schema.hasOwnProperty('watch')) {\n var path,path_parts,first,root,adjusted_path;\n\n for(var name in this.schema.watch) {\n if(!this.schema.watch.hasOwnProperty(name)) continue;\n path = this.schema.watch[name];\n\n if(Array.isArray(path)) {\n path_parts = [path[0]].concat(path[1].split('.'));\n }\n else {\n path_parts = path.split('.');\n if(!self.theme.closest(self.container,'[data-schemaid=\"'+path_parts[0]+'\"]')) path_parts.unshift('#');\n }\n first = path_parts.shift();\n\n if(first === '#') first = self.jsoneditor.schema.id || 'root';\n\n // Find the root node for this template variable\n root = self.theme.closest(self.container,'[data-schemaid=\"'+first+'\"]');\n if(!root) throw \"Could not find ancestor node with id \"+first;\n\n // Keep track of the root node and path for use when rendering the template\n adjusted_path = root.getAttribute('data-schemapath') + '.' + path_parts.join('.');\n \n self.jsoneditor.watch(adjusted_path,self.watch_listener);\n \n self.watched[name] = adjusted_path;\n }\n }\n \n // Dynamic header\n if(this.schema.headerTemplate) {\n this.header_template = this.jsoneditor.compileTemplate(this.schema.headerTemplate, this.template_engine);\n }\n },\n \n addLinks: function() {\n // Add links\n if(!this.no_link_holder) {\n this.link_holder = this.theme.getLinksHolder();\n this.container.appendChild(this.link_holder);\n if(this.schema.links) {\n for(var i=0; i=0) {\n holder = this.theme.getBlockLinkHolder();\n \n link = this.theme.getBlockLink();\n link.setAttribute('target','_blank');\n \n var media = document.createElement(type);\n media.setAttribute('controls','controls');\n \n this.theme.createMediaLink(holder,link,media);\n \n // When a watched field changes, update the url \n this.link_watchers.push(function(vars) {\n var url = href(vars);\n link.setAttribute('href',url);\n link.textContent = data.rel || url;\n media.setAttribute('src',url);\n });\n }\n // Text links\n else {\n link = holder = this.theme.getBlockLink();\n holder.setAttribute('target','_blank');\n holder.textContent = data.rel;\n\n // When a watched field changes, update the url\n this.link_watchers.push(function(vars) {\n var url = href(vars);\n holder.setAttribute('href',url);\n holder.textContent = data.rel || url;\n });\n }\n\n if(download && link) {\n if(download === true) {\n link.setAttribute('download','');\n }\n else {\n this.link_watchers.push(function(vars) {\n link.setAttribute('download',download(vars));\n });\n }\n }\n\n return holder;\n },\n refreshWatchedFieldValues: function() {\n if(!this.watched_values) return;\n var watched = {};\n var changed = false;\n var self = this;\n \n if(this.watched) {\n var val,editor;\n for(var name in this.watched) {\n if(!this.watched.hasOwnProperty(name)) continue;\n editor = self.jsoneditor.getEditor(this.watched[name]);\n val = editor? editor.getValue() : null;\n if(self.watched_values[name] !== val) changed = true;\n watched[name] = val;\n }\n }\n \n watched.self = this.getValue();\n if(this.watched_values.self !== watched.self) changed = true;\n \n this.watched_values = watched;\n \n return changed;\n },\n getWatchedFieldValues: function() {\n return this.watched_values;\n },\n updateHeaderText: function() {\n if(this.header) {\n // If the header has children, only update the text node's value\n if(this.header.children.length) {\n for(var i=0; i -1;\n else if(this.jsoneditor.options.required_by_default) return true;\n else return false;\n }, \n getDisplayText: function(arr) {\n var disp = [];\n var used = {};\n \n // Determine how many times each attribute name is used.\n // This helps us pick the most distinct display text for the schemas.\n $each(arr,function(i,el) {\n if(el.title) {\n used[el.title] = used[el.title] || 0;\n used[el.title]++;\n }\n if(el.description) {\n used[el.description] = used[el.description] || 0;\n used[el.description]++;\n }\n if(el.format) {\n used[el.format] = used[el.format] || 0;\n used[el.format]++;\n }\n if(el.type) {\n used[el.type] = used[el.type] || 0;\n used[el.type]++;\n }\n });\n \n // Determine display text for each element of the array\n $each(arr,function(i,el) {\n var name;\n \n // If it's a simple string\n if(typeof el === \"string\") name = el;\n // Object\n else if(el.title && used[el.title]<=1) name = el.title;\n else if(el.format && used[el.format]<=1) name = el.format;\n else if(el.type && used[el.type]<=1) name = el.type;\n else if(el.description && used[el.description]<=1) name = el.descripton;\n else if(el.title) name = el.title;\n else if(el.format) name = el.format;\n else if(el.type) name = el.type;\n else if(el.description) name = el.description;\n else if(JSON.stringify(el).length < 50) name = JSON.stringify(el);\n else name = \"type\";\n \n disp.push(name);\n });\n \n // Replace identical display text with \"text 1\", \"text 2\", etc.\n var inc = {};\n $each(disp,function(i,name) {\n inc[name] = inc[name] || 0;\n inc[name]++;\n \n if(used[name] > 1) disp[i] = name + \" \" + inc[name];\n });\n \n return disp;\n },\n getOption: function(key) {\n try {\n throw \"getOption is deprecated\";\n }\n catch(e) {\n window.console.error(e);\n }\n \n return this.options[key];\n },\n showValidationErrors: function(errors) {\n\n }\n});\n", "JSONEditor.defaults.editors[\"null\"] = JSONEditor.AbstractEditor.extend({\n getValue: function() {\n return null;\n },\n setValue: function() {\n this.onChange();\n },\n getNumColumns: function() {\n return 2;\n }\n});\n", - "JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n setValue: function(value,initial,from_template) {\n var self = this;\n \n if(this.template && !from_template) {\n return;\n }\n \n if(value === null || typeof value === 'undefined') value = \"\";\n else if(typeof value === \"object\") value = JSON.stringify(value);\n else if(typeof value !== \"string\") value = \"\"+value;\n \n if(value === this.serialized) return;\n\n // Sanitize value before setting it\n var sanitized = this.sanitize(value);\n\n if(this.input.value === sanitized) {\n return;\n }\n\n this.input.value = sanitized;\n \n // If using SCEditor, update the WYSIWYG\n if(this.sceditor_instance) {\n this.sceditor_instance.val(sanitized);\n }\n else if(this.epiceditor) {\n this.epiceditor.importFile(null,sanitized);\n }\n else if(this.ace_editor) {\n this.ace_editor.setValue(sanitized);\n }\n \n var changed = from_template || this.getValue() !== value;\n \n this.refreshValue();\n \n if(initial) this.is_dirty = false;\n else if(this.jsoneditor.options.show_errors === \"change\") this.is_dirty = true;\n \n if(this.adjust_height) this.adjust_height(this.input);\n\n // Bubble this setValue to parents if the value changed\n this.onChange(changed);\n },\n getNumColumns: function() {\n var min = Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);\n var num;\n \n if(this.input_type === 'textarea') num = 6;\n else if(['text','email'].indexOf(this.input_type) >= 0) num = 4;\n else num = 2;\n \n return Math.min(12,Math.max(min,num));\n },\n build: function() {\n var self = this, i;\n if(!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle());\n if(this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description);\n\n this.format = this.schema.format;\n if(!this.format && this.schema.media && this.schema.media.type) {\n this.format = this.schema.media.type.replace(/(^(application|text)\\/(x-)?(script\\.)?)|(-source$)/g,'');\n }\n if(!this.format && this.options.default_format) {\n this.format = this.options.default_format;\n }\n if(this.options.format) {\n this.format = this.options.format;\n }\n\n // Specific format\n if(this.format) {\n // Text Area\n if(this.format === 'textarea') {\n this.input_type = 'textarea';\n this.input = this.theme.getTextareaInput();\n }\n // Range Input\n else if(this.format === 'range') {\n this.input_type = 'range';\n var min = this.schema.minimum || 0;\n var max = this.schema.maximum || Math.max(100,min+1);\n var step = 1;\n if(this.schema.multipleOf) {\n if(min%this.schema.multipleOf) min = Math.ceil(min/this.schema.multipleOf)*this.schema.multipleOf;\n if(max%this.schema.multipleOf) max = Math.floor(max/this.schema.multipleOf)*this.schema.multipleOf;\n step = this.schema.multipleOf;\n }\n\n this.input = this.theme.getRangeInput(min,max,step);\n }\n // Source Code\n else if([\n 'actionscript',\n 'batchfile',\n 'bbcode',\n 'c',\n 'c++',\n 'cpp',\n 'coffee',\n 'csharp',\n 'css',\n 'dart',\n 'django',\n 'ejs',\n 'erlang',\n 'golang',\n 'handlebars',\n 'haskell',\n 'haxe',\n 'html',\n 'ini',\n 'jade',\n 'java',\n 'javascript',\n 'json',\n 'less',\n 'lisp',\n 'lua',\n 'makefile',\n 'markdown',\n 'matlab',\n 'mysql',\n 'objectivec',\n 'pascal',\n 'perl',\n 'pgsql',\n 'php',\n 'python',\n 'r',\n 'ruby',\n 'sass',\n 'scala',\n 'scss',\n 'smarty',\n 'sql',\n 'stylus',\n 'svg',\n 'twig',\n 'vbscript',\n 'xml',\n 'yaml'\n ].indexOf(this.format) >= 0\n ) {\n this.input_type = this.format;\n this.source_code = true;\n \n this.input = this.theme.getTextareaInput();\n }\n // HTML5 Input type\n else {\n this.input_type = this.format;\n this.input = this.theme.getFormInputField(this.input_type);\n }\n }\n // Normal text input\n else {\n this.input_type = 'text';\n this.input = this.theme.getFormInputField(this.input_type);\n }\n \n // minLength, maxLength, and pattern\n if(typeof this.schema.maxLength !== \"undefined\") this.input.setAttribute('maxlength',this.schema.maxLength);\n if(typeof this.schema.pattern !== \"undefined\") this.input.setAttribute('pattern',this.schema.pattern);\n else if(typeof this.schema.minLength !== \"undefined\") this.input.setAttribute('pattern','.{'+this.schema.minLength+',}');\n\n if(this.options.compact) {\n this.container.className += ' compact';\n }\n else {\n if(this.options.input_width) this.input.style.width = this.options.input_width;\n }\n\n if(this.schema.readOnly || this.schema.readonly || this.schema.template) {\n this.always_disabled = true;\n this.input.disabled = true;\n }\n\n this.input\n .addEventListener('change',function(e) { \n e.preventDefault();\n e.stopPropagation();\n \n // Don't allow changing if this field is a template\n if(self.schema.template) {\n this.value = self.value;\n return;\n }\n\n var val = this.value;\n \n // sanitize value\n var sanitized = self.sanitize(val);\n if(val !== sanitized) {\n this.value = sanitized;\n }\n \n self.is_dirty = true;\n\n self.refreshValue();\n self.onChange(true);\n });\n \n if(this.options.input_height) this.input.style.height = this.options.input_height;\n if(this.options.expand_height) {\n this.adjust_height = function(el) {\n if(!el) return;\n var i, ch=el.offsetHeight;\n // Input too short\n if(el.offsetHeight < el.scrollHeight) {\n i=0;\n while(el.offsetHeight < el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch++;\n el.style.height = ch+'px';\n }\n }\n else {\n i=0;\n while(el.offsetHeight >= el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch--;\n el.style.height = ch+'px';\n }\n el.style.height = (ch+1)+'px';\n }\n };\n \n this.input.addEventListener('keyup',function(e) {\n self.adjust_height(this);\n });\n this.input.addEventListener('change',function(e) {\n self.adjust_height(this);\n });\n this.adjust_height();\n }\n\n if(this.format) this.input.setAttribute('data-schemaformat',this.format);\n\n this.control = this.theme.getFormControl(this.label, this.input, this.description);\n this.container.appendChild(this.control);\n\n // Any special formatting that needs to happen after the input is added to the dom\n window.requestAnimationFrame(function() {\n // Skip in case the input is only a temporary editor,\n // otherwise, in the case of an ace_editor creation,\n // it will generate an error trying to append it to the missing parentNode\n if(self.input.parentNode) self.afterInputReady();\n if(self.adjust_height) self.adjust_height(self.input);\n });\n\n // Compile and store the template\n if(this.schema.template) {\n this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);\n this.refreshValue();\n }\n else {\n this.refreshValue();\n }\n },\n enable: function() {\n if(!this.always_disabled) {\n this.input.disabled = false;\n // TODO: WYSIWYG and Markdown editors\n }\n this._super();\n },\n disable: function() {\n this.input.disabled = true;\n // TODO: WYSIWYG and Markdown editors\n this._super();\n },\n afterInputReady: function() {\n var self = this, options;\n \n // Code editor\n if(this.source_code) { \n // WYSIWYG html and bbcode editor\n if(this.options.wysiwyg && \n ['html','bbcode'].indexOf(this.input_type) >= 0 && \n window.jQuery && window.jQuery.fn && window.jQuery.fn.sceditor\n ) {\n options = $extend({},{\n plugins: self.input_type==='html'? 'xhtml' : 'bbcode',\n emoticonsEnabled: false,\n width: '100%',\n height: 300\n },JSONEditor.plugins.sceditor,self.options.sceditor_options||{});\n \n window.jQuery(self.input).sceditor(options);\n \n self.sceditor_instance = window.jQuery(self.input).sceditor('instance');\n \n self.sceditor_instance.blur(function() {\n // Get editor's value\n var val = window.jQuery(\"
\"+self.sceditor_instance.val()+\"
\");\n // Remove sceditor spans/divs\n window.jQuery('#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf',val).remove();\n // Set the value and update\n self.input.value = val.html();\n self.value = self.input.value;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // EpicEditor for markdown (if it's loaded)\n else if (this.input_type === 'markdown' && window.EpicEditor) {\n this.epiceditor_container = document.createElement('div');\n this.input.parentNode.insertBefore(this.epiceditor_container,this.input);\n this.input.style.display = 'none';\n \n options = $extend({},JSONEditor.plugins.epiceditor,{\n container: this.epiceditor_container,\n clientSideStorage: false\n });\n \n this.epiceditor = new window.EpicEditor(options).load();\n \n this.epiceditor.importFile(null,this.getValue());\n \n this.epiceditor.on('update',function() {\n var val = self.epiceditor.exportFile();\n self.input.value = val;\n self.value = val;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // ACE editor for everything else\n else if(window.ace) {\n var mode = this.input_type;\n // aliases for c/cpp\n if(mode === 'cpp' || mode === 'c++' || mode === 'c') {\n mode = 'c_cpp';\n }\n \n this.ace_container = document.createElement('div');\n this.ace_container.style.width = '100%';\n this.ace_container.style.position = 'relative';\n this.ace_container.style.height = '400px';\n this.input.parentNode.insertBefore(this.ace_container,this.input);\n this.input.style.display = 'none';\n this.ace_editor = window.ace.edit(this.ace_container);\n \n this.ace_editor.setValue(this.getValue());\n \n // The theme\n if(JSONEditor.plugins.ace.theme) this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);\n // The mode\n mode = window.ace.require(\"ace/mode/\"+mode);\n if(mode) this.ace_editor.getSession().setMode(new mode.Mode());\n \n // Listen for changes\n this.ace_editor.on('change',function() {\n var val = self.ace_editor.getValue();\n self.input.value = val;\n self.refreshValue();\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n }\n \n self.theme.afterInputReady(self.input);\n },\n refreshValue: function() {\n this.value = this.input.value;\n if(typeof this.value !== \"string\") this.value = '';\n this.serialized = this.value;\n },\n destroy: function() {\n // If using SCEditor, destroy the editor instance\n if(this.sceditor_instance) {\n this.sceditor_instance.destroy();\n }\n else if(this.epiceditor) {\n this.epiceditor.unload();\n }\n else if(this.ace_editor) {\n this.ace_editor.destroy();\n }\n \n \n this.template = null;\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n if(this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n\n this._super();\n },\n /**\n * This is overridden in derivative editors\n */\n sanitize: function(value) {\n return value;\n },\n /**\n * Re-calculates the value if needed\n */\n onWatchedFieldChange: function() { \n var self = this, vars, j;\n \n // If this editor needs to be rendered by a macro template\n if(this.template) {\n vars = this.getWatchedFieldValues();\n this.setValue(this.template(vars),false,true);\n }\n \n this._super();\n },\n showValidationErrors: function(errors) {\n var self = this;\n \n if(this.jsoneditor.options.show_errors === \"always\") {}\n else if(!this.is_dirty && this.previous_error_setting===this.jsoneditor.options.show_errors) return;\n \n this.previous_error_setting = this.jsoneditor.options.show_errors;\n\n var messages = [];\n $each(errors,function(i,error) {\n if(error.path === self.path) {\n messages.push(error.message);\n }\n });\n\n if(messages.length) {\n this.theme.addInputError(this.input, messages.join('. ')+'.');\n }\n else {\n this.theme.removeInputError(this.input);\n }\n }\n});\n", + "JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n setValue: function(value,initial,from_template) {\n var self = this;\n \n if(this.template && !from_template) {\n return;\n }\n \n if(value === null || typeof value === 'undefined') value = \"\";\n else if(typeof value === \"object\") value = JSON.stringify(value);\n else if(typeof value !== \"string\") value = \"\"+value;\n \n if(value === this.serialized) return;\n\n // Sanitize value before setting it\n var sanitized = this.sanitize(value);\n\n if(this.input.value === sanitized) {\n return;\n }\n\n this.input.value = sanitized;\n \n // If using SCEditor, update the WYSIWYG\n if(this.sceditor_instance) {\n this.sceditor_instance.val(sanitized);\n }\n else if(this.epiceditor) {\n this.epiceditor.importFile(null,sanitized);\n }\n else if(this.ace_editor) {\n this.ace_editor.setValue(sanitized);\n }\n \n var changed = from_template || this.getValue() !== value;\n \n this.refreshValue();\n \n if(initial) this.is_dirty = false;\n else if(this.jsoneditor.options.show_errors === \"change\") this.is_dirty = true;\n \n if(this.adjust_height) this.adjust_height(this.input);\n\n // Bubble this setValue to parents if the value changed\n this.onChange(changed);\n },\n getNumColumns: function() {\n var min = Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);\n var num;\n \n if(this.input_type === 'textarea') num = 6;\n else if(['text','email'].indexOf(this.input_type) >= 0) num = 4;\n else num = 2;\n \n return Math.min(12,Math.max(min,num));\n },\n build: function() {\n var self = this, i;\n if(!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle());\n if(this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description);\n\n this.format = this.schema.format;\n if(!this.format && this.schema.media && this.schema.media.type) {\n this.format = this.schema.media.type.replace(/(^(application|text)\\/(x-)?(script\\.)?)|(-source$)/g,'');\n }\n if(!this.format && this.options.default_format) {\n this.format = this.options.default_format;\n }\n if(this.options.format) {\n this.format = this.options.format;\n }\n\n // Specific format\n if(this.format) {\n // Text Area\n if(this.format === 'textarea') {\n this.input_type = 'textarea';\n this.input = this.theme.getTextareaInput();\n }\n // Range Input\n else if(this.format === 'range') {\n this.input_type = 'range';\n var min = this.schema.minimum || 0;\n var max = this.schema.maximum || Math.max(100,min+1);\n var step = 1;\n if(this.schema.multipleOf) {\n if(min%this.schema.multipleOf) min = Math.ceil(min/this.schema.multipleOf)*this.schema.multipleOf;\n if(max%this.schema.multipleOf) max = Math.floor(max/this.schema.multipleOf)*this.schema.multipleOf;\n step = this.schema.multipleOf;\n }\n\n this.input = this.theme.getRangeInput(min,max,step);\n }\n // Source Code\n else if([\n 'actionscript',\n 'batchfile',\n 'bbcode',\n 'c',\n 'c++',\n 'cpp',\n 'coffee',\n 'csharp',\n 'css',\n 'dart',\n 'django',\n 'ejs',\n 'erlang',\n 'golang',\n 'groovy',\n 'handlebars',\n 'haskell',\n 'haxe',\n 'html',\n 'ini',\n 'jade',\n 'java',\n 'javascript',\n 'json',\n 'less',\n 'lisp',\n 'lua',\n 'makefile',\n 'markdown',\n 'matlab',\n 'mysql',\n 'objectivec',\n 'pascal',\n 'perl',\n 'pgsql',\n 'php',\n 'python',\n 'r',\n 'ruby',\n 'sass',\n 'scala',\n 'scss',\n 'smarty',\n 'sql',\n 'stylus',\n 'svg',\n 'twig',\n 'vbscript',\n 'xml',\n 'yaml'\n ].indexOf(this.format) >= 0\n ) {\n this.input_type = this.format;\n this.source_code = true;\n \n this.input = this.theme.getTextareaInput();\n }\n // HTML5 Input type\n else {\n this.input_type = this.format;\n this.input = this.theme.getFormInputField(this.input_type);\n }\n }\n // Normal text input\n else {\n this.input_type = 'text';\n this.input = this.theme.getFormInputField(this.input_type);\n }\n \n // minLength, maxLength, and pattern\n if(typeof this.schema.maxLength !== \"undefined\") this.input.setAttribute('maxlength',this.schema.maxLength);\n if(typeof this.schema.pattern !== \"undefined\") this.input.setAttribute('pattern',this.schema.pattern);\n else if(typeof this.schema.minLength !== \"undefined\") this.input.setAttribute('pattern','.{'+this.schema.minLength+',}');\n\n if(this.options.compact) {\n this.container.className += ' compact';\n }\n else {\n if(this.options.input_width) this.input.style.width = this.options.input_width;\n }\n\n if(this.schema.readOnly || this.schema.readonly || this.schema.template) {\n this.always_disabled = true;\n this.input.disabled = true;\n }\n\n this.input\n .addEventListener('change',function(e) { \n e.preventDefault();\n e.stopPropagation();\n \n // Don't allow changing if this field is a template\n if(self.schema.template) {\n this.value = self.value;\n return;\n }\n\n var val = this.value;\n \n // sanitize value\n var sanitized = self.sanitize(val);\n if(val !== sanitized) {\n this.value = sanitized;\n }\n \n self.is_dirty = true;\n\n self.refreshValue();\n self.onChange(true);\n });\n \n if(this.options.input_height) this.input.style.height = this.options.input_height;\n if(this.options.expand_height) {\n this.adjust_height = function(el) {\n if(!el) return;\n var i, ch=el.offsetHeight;\n // Input too short\n if(el.offsetHeight < el.scrollHeight) {\n i=0;\n while(el.offsetHeight < el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch++;\n el.style.height = ch+'px';\n }\n }\n else {\n i=0;\n while(el.offsetHeight >= el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch--;\n el.style.height = ch+'px';\n }\n el.style.height = (ch+1)+'px';\n }\n };\n \n this.input.addEventListener('keyup',function(e) {\n self.adjust_height(this);\n });\n this.input.addEventListener('change',function(e) {\n self.adjust_height(this);\n });\n this.adjust_height();\n }\n\n if(this.format) this.input.setAttribute('data-schemaformat',this.format);\n\n this.control = this.theme.getFormControl(this.label, this.input, this.description);\n this.container.appendChild(this.control);\n\n // Any special formatting that needs to happen after the input is added to the dom\n window.requestAnimationFrame(function() {\n // Skip in case the input is only a temporary editor,\n // otherwise, in the case of an ace_editor creation,\n // it will generate an error trying to append it to the missing parentNode\n if(self.input.parentNode) self.afterInputReady();\n if(self.adjust_height) self.adjust_height(self.input);\n });\n\n // Compile and store the template\n if(this.schema.template) {\n this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);\n this.refreshValue();\n }\n else {\n this.refreshValue();\n }\n },\n enable: function() {\n if(!this.always_disabled) {\n this.input.disabled = false;\n // TODO: WYSIWYG and Markdown editors\n }\n this._super();\n },\n disable: function() {\n this.input.disabled = true;\n // TODO: WYSIWYG and Markdown editors\n this._super();\n },\n afterInputReady: function() {\n var self = this, options;\n \n // Code editor\n if(this.source_code) { \n // WYSIWYG html and bbcode editor\n if(this.options.wysiwyg && \n ['html','bbcode'].indexOf(this.input_type) >= 0 && \n window.jQuery && window.jQuery.fn && window.jQuery.fn.sceditor\n ) {\n options = $extend({},{\n plugins: self.input_type==='html'? 'xhtml' : 'bbcode',\n emoticonsEnabled: false,\n width: '100%',\n height: 300\n },JSONEditor.plugins.sceditor,self.options.sceditor_options||{});\n \n window.jQuery(self.input).sceditor(options);\n \n self.sceditor_instance = window.jQuery(self.input).sceditor('instance');\n \n self.sceditor_instance.blur(function() {\n // Get editor's value\n var val = window.jQuery(\"
\"+self.sceditor_instance.val()+\"
\");\n // Remove sceditor spans/divs\n window.jQuery('#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf',val).remove();\n // Set the value and update\n self.input.value = val.html();\n self.value = self.input.value;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // EpicEditor for markdown (if it's loaded)\n else if (this.input_type === 'markdown' && window.EpicEditor) {\n this.epiceditor_container = document.createElement('div');\n this.input.parentNode.insertBefore(this.epiceditor_container,this.input);\n this.input.style.display = 'none';\n \n options = $extend({},JSONEditor.plugins.epiceditor,{\n container: this.epiceditor_container,\n clientSideStorage: false\n });\n \n this.epiceditor = new window.EpicEditor(options).load();\n \n this.epiceditor.importFile(null,this.getValue());\n \n this.epiceditor.on('update',function() {\n var val = self.epiceditor.exportFile();\n self.input.value = val;\n self.value = val;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // ACE editor for everything else\n else if(window.ace) {\n var mode = this.input_type;\n // aliases for c/cpp\n if(mode === 'cpp' || mode === 'c++' || mode === 'c') {\n mode = 'c_cpp';\n }\n \n this.ace_container = document.createElement('div');\n this.ace_container.style.width = '100%';\n this.ace_container.style.position = 'relative';\n this.ace_container.style.height = '400px';\n this.input.parentNode.insertBefore(this.ace_container,this.input);\n this.input.style.display = 'none';\n this.ace_editor = window.ace.edit(this.ace_container);\n \n this.ace_editor.setValue(this.getValue());\n \n // The theme\n if(JSONEditor.plugins.ace.theme) this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);\n // The mode\n mode = window.ace.require(\"ace/mode/\"+mode);\n if(mode) this.ace_editor.getSession().setMode(new mode.Mode());\n \n // Listen for changes\n this.ace_editor.on('change',function() {\n var val = self.ace_editor.getValue();\n self.input.value = val;\n self.refreshValue();\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n }\n \n self.theme.afterInputReady(self.input);\n },\n refreshValue: function() {\n this.value = this.input.value;\n if(typeof this.value !== \"string\") this.value = '';\n this.serialized = this.value;\n },\n destroy: function() {\n // If using SCEditor, destroy the editor instance\n if(this.sceditor_instance) {\n this.sceditor_instance.destroy();\n }\n else if(this.epiceditor) {\n this.epiceditor.unload();\n }\n else if(this.ace_editor) {\n this.ace_editor.destroy();\n }\n \n \n this.template = null;\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n if(this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n\n this._super();\n },\n /**\n * This is overridden in derivative editors\n */\n sanitize: function(value) {\n return value;\n },\n /**\n * Re-calculates the value if needed\n */\n onWatchedFieldChange: function() { \n var self = this, vars, j;\n \n // If this editor needs to be rendered by a macro template\n if(this.template) {\n vars = this.getWatchedFieldValues();\n this.setValue(this.template(vars),false,true);\n }\n \n this._super();\n },\n showValidationErrors: function(errors) {\n var self = this;\n \n if(this.jsoneditor.options.show_errors === \"always\") {}\n else if(!this.is_dirty && this.previous_error_setting===this.jsoneditor.options.show_errors) return;\n \n this.previous_error_setting = this.jsoneditor.options.show_errors;\n\n var messages = [];\n $each(errors,function(i,error) {\n if(error.path === self.path) {\n messages.push(error.message);\n }\n });\n\n if(messages.length) {\n this.theme.addInputError(this.input, messages.join('. ')+'.');\n }\n else {\n this.theme.removeInputError(this.input);\n }\n }\n});\n", "JSONEditor.defaults.editors.number = JSONEditor.defaults.editors.string.extend({\n sanitize: function(value) {\n return (value+\"\").replace(/[^0-9\\.\\-eE]/g,'');\n },\n getNumColumns: function() {\n return 2;\n },\n getValue: function() {\n return this.value*1;\n }\n});\n", "JSONEditor.defaults.editors.integer = JSONEditor.defaults.editors.number.extend({\n sanitize: function(value) {\n value = value + \"\";\n return value.replace(/[^0-9\\-]/g,'');\n },\n getNumColumns: function() {\n return 2;\n }\n});\n", - "JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return $extend({},this.schema[\"default\"] || {});\n },\n getChildEditors: function() {\n return this.editors;\n },\n register: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].register();\n }\n }\n },\n unregister: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].unregister();\n }\n }\n },\n getNumColumns: function() {\n return Math.max(Math.min(12,this.maxwidth),3);\n },\n enable: function() {\n if(this.editjson_button) this.editjson_button.disabled = false;\n if(this.addproperty_button) this.addproperty_button.disabled = false;\n \n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].enable();\n }\n }\n },\n disable: function() {\n if(this.editjson_button) this.editjson_button.disabled = true;\n if(this.addproperty_button) this.addproperty_button.disabled = true;\n this.hideEditJSON();\n \n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].disable();\n }\n }\n },\n layoutEditors: function() {\n var self = this, i, j;\n \n if(!this.row_container) return;\n\n // Sort editors by propertyOrder\n this.property_order = Object.keys(this.editors);\n this.property_order = this.property_order.sort(function(a,b) {\n var ordera = self.editors[a].schema.propertyOrder;\n var orderb = self.editors[b].schema.propertyOrder;\n if(typeof ordera !== \"number\") ordera = 1000;\n if(typeof orderb !== \"number\") orderb = 1000;\n\n return ordera - orderb;\n });\n \n var container;\n \n if(this.format === 'grid') {\n var rows = [];\n $each(this.property_order, function(j,key) {\n var editor = self.editors[key];\n if(editor.property_removed) return;\n var found = false;\n var width = editor.options.hidden? 0 : (editor.options.grid_columns || editor.getNumColumns());\n var height = editor.options.hidden? 0 : editor.container.offsetHeight;\n // See if the editor will fit in any of the existing rows first\n for(var i=0; i height)) {\n found = i;\n }\n }\n }\n \n // If there isn't a spot in any of the existing rows, start a new row\n if(found === false) {\n rows.push({\n width: 0,\n minh: 999999,\n maxh: 0,\n editors: []\n });\n found = rows.length-1;\n }\n \n rows[found].editors.push({\n key: key,\n //editor: editor,\n width: width,\n height: height\n });\n rows[found].width += width;\n rows[found].minh = Math.min(rows[found].minh,height);\n rows[found].maxh = Math.max(rows[found].maxh,height);\n });\n \n // Make almost full rows width 12\n // Do this by increasing all editors' sizes proprotionately\n // Any left over space goes to the biggest editor\n // Don't touch rows with a width of 6 or less\n for(i=0; i rows[i].editors[biggest].width) biggest = j;\n rows[i].editors[j].width *= 12/rows[i].width;\n rows[i].editors[j].width = Math.floor(rows[i].editors[j].width);\n new_width += rows[i].editors[j].width;\n }\n if(new_width < 12) rows[i].editors[biggest].width += 12-new_width;\n rows[i].width = 12;\n }\n }\n \n // layout hasn't changed\n if(this.layout === JSON.stringify(rows)) return false;\n this.layout = JSON.stringify(rows);\n \n // Layout the form\n container = document.createElement('div');\n for(i=0; i= this.schema.maxProperties);\n \n if(this.addproperty_checkboxes) {\n this.addproperty_list.innerHTML = '';\n }\n this.addproperty_checkboxes = {};\n \n // Check for which editors can't be removed or added back\n for(i in this.cached_editors) {\n if(!this.cached_editors.hasOwnProperty(i)) continue;\n \n this.addPropertyCheckbox(i);\n \n if(this.isRequired(this.cached_editors[i]) && i in this.editors) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n \n if(typeof this.schema.minProperties !== \"undefined\" && num_props <= this.schema.minProperties) {\n this.addproperty_checkboxes[i].disabled = this.addproperty_checkboxes[i].checked;\n if(!this.addproperty_checkboxes[i].checked) show_modal = true;\n }\n else if(!(i in this.editors)) {\n if(!can_add && !this.schema.properties.hasOwnProperty(i)) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n else {\n this.addproperty_checkboxes[i].disabled = false;\n show_modal = true;\n }\n }\n else {\n show_modal = true;\n can_remove = true;\n }\n }\n \n if(this.canHaveAdditionalProperties()) {\n show_modal = true;\n }\n \n // Additional addproperty checkboxes not tied to a current editor\n for(i in this.schema.properties) {\n if(!this.schema.properties.hasOwnProperty(i)) continue;\n if(this.cached_editors[i]) continue;\n show_modal = true;\n this.addPropertyCheckbox(i);\n }\n \n // If no editors can be added or removed, hide the modal button\n if(!show_modal) {\n this.hideAddProperty();\n this.addproperty_controls.style.display = 'none';\n }\n // If additional properties are disabled\n else if(!this.canHaveAdditionalProperties()) {\n this.addproperty_add.style.display = 'none';\n this.addproperty_input.style.display = 'none';\n }\n // If no new properties can be added\n else if(!can_add) {\n this.addproperty_add.disabled = true;\n }\n // If new properties can be added\n else {\n this.addproperty_add.disabled = false;\n }\n },\n isRequired: function(editor) {\n if(typeof editor.schema.required === \"boolean\") return editor.schema.required;\n else if(Array.isArray(this.schema.required)) return this.schema.required.indexOf(editor.key) > -1;\n else if(this.jsoneditor.options.required_by_default) return true;\n else return false;\n },\n setValue: function(value, initial) {\n var self = this;\n value = value || {};\n \n if(typeof value !== \"object\" || Array.isArray(value)) value = {};\n\n // First, set the values for all of the defined properties\n $each(this.cached_editors, function(i,editor) {\n // Value explicitly set\n if(typeof value[i] !== \"undefined\") {\n self.addObjectProperty(i);\n editor.setValue(value[i],initial);\n }\n // Otherwise, remove value unless this is the initial set or it's required\n else if(!initial && !self.isRequired(editor)) {\n self.removeObjectProperty(i);\n }\n // Otherwise, set the value to the default\n else {\n editor.setValue(editor.getDefault(),initial);\n }\n });\n\n $each(value, function(i,val) {\n if(!self.cached_editors[i]) {\n self.addObjectProperty(i);\n if(self.editors[i]) self.editors[i].setValue(val,initial);\n }\n });\n \n this.refreshValue();\n this.layoutEditors();\n this.onChange();\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show error for the table row if this is inside a table\n if(this.options.table_row) {\n if(my_errors.length) {\n this.theme.addTableRowError(this.container);\n }\n else {\n this.theme.removeTableRowError(this.container);\n }\n }\n\n // Show errors for child editors\n $each(this.editors, function(i,editor) {\n editor.showValidationErrors(other_errors);\n });\n }\n});\n", - "JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return this.schema[\"default\"] || [];\n },\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i= this.schema.items.length) {\n if(this.schema.additionalItems===true) {\n return {};\n }\n else if(this.schema.additionalItems) {\n return $extend({},this.schema.additionalItems);\n }\n }\n else {\n return $extend({},this.schema.items[i]);\n }\n }\n else if(this.schema.items) {\n return $extend({},this.schema.items);\n }\n else {\n return {};\n }\n },\n getItemInfo: function(i) {\n var schema = this.getItemSchema(i);\n \n // Check if it's cached\n this.item_info = this.item_info || {};\n var stringified = JSON.stringify(schema);\n if(typeof this.item_info[stringified] !== \"undefined\") return this.item_info[stringified];\n \n // Get the schema for this item\n schema = this.jsoneditor.expandRefs(schema);\n \n this.item_info[stringified] = {\n title: schema.title || \"item\",\n 'default': schema[\"default\"],\n width: 12,\n child_editors: schema.properties || schema.items\n };\n \n return this.item_info[stringified];\n },\n getElementEditor: function(i) {\n var item_info = this.getItemInfo(i);\n var schema = this.getItemSchema(i);\n schema = this.jsoneditor.expandRefs(schema);\n schema.title = item_info.title+' '+(i+1);\n\n var editor = this.jsoneditor.getEditorClass(schema);\n\n var holder;\n if(this.tabs_holder) {\n holder = this.theme.getTabContent();\n }\n else if(item_info.child_editors) {\n holder = this.theme.getChildEditorHolder();\n }\n else {\n holder = this.theme.getIndentedPanel();\n }\n\n this.row_holder.appendChild(holder);\n\n var ret = this.jsoneditor.createEditor(editor,{\n jsoneditor: this.jsoneditor,\n schema: schema,\n container: holder,\n path: this.path+'.'+i,\n parent: this,\n required: true\n });\n ret.preBuild();\n ret.build();\n ret.postBuild();\n\n if(!ret.title_controls) {\n ret.array_controls = this.theme.getButtonHolder();\n holder.appendChild(ret.array_controls);\n }\n \n return ret;\n },\n destroy: function() {\n this.empty(true);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n if(this.row_holder && this.row_holder.parentNode) this.row_holder.parentNode.removeChild(this.row_holder);\n if(this.controls && this.controls.parentNode) this.controls.parentNode.removeChild(this.controls);\n if(this.panel && this.panel.parentNode) this.panel.parentNode.removeChild(this.panel);\n \n this.rows = this.row_cache = this.title = this.description = this.row_holder = this.panel = this.controls = null;\n\n this._super();\n },\n empty: function(hard) {\n if(!this.rows) return;\n var self = this;\n $each(this.rows,function(i,row) {\n if(hard) {\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n self.destroyRow(row,true);\n self.row_cache[i] = null;\n }\n self.rows[i] = null;\n });\n self.rows = [];\n if(hard) self.row_cache = [];\n },\n destroyRow: function(row,hard) {\n var holder = row.container;\n if(hard) {\n row.destroy();\n if(holder.parentNode) holder.parentNode.removeChild(holder);\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n }\n else {\n if(row.tab) row.tab.style.display = 'none';\n holder.style.display = 'none';\n row.unregister();\n }\n },\n getMax: function() {\n if((Array.isArray(this.schema.items)) && this.schema.additionalItems === false) {\n return Math.min(this.schema.items.length,this.schema.maxItems || Infinity);\n }\n else {\n return this.schema.maxItems || Infinity;\n }\n },\n refreshTabs: function(refresh_headers) {\n var self = this;\n $each(this.rows, function(i,row) {\n if(!row.tab) return;\n\n if(refresh_headers) {\n row.tab_text.textContent = row.getHeaderText();\n }\n else {\n if(row.tab === self.active_tab) {\n self.theme.markTabActive(row.tab);\n row.container.style.display = '';\n }\n else {\n self.theme.markTabInactive(row.tab);\n row.container.style.display = 'none';\n }\n }\n });\n },\n setValue: function(value, initial) {\n // Update the array's value, adding/removing rows when necessary\n value = value || [];\n \n if(!(Array.isArray(value))) value = [value];\n \n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n // Make sure value has between minItems and maxItems items in it\n if(this.schema.minItems) {\n while(value.length < this.schema.minItems) {\n value.push(this.getItemInfo(value.length)[\"default\"]);\n }\n }\n if(this.getMax() && value.length > this.getMax()) {\n value = value.slice(0,this.getMax());\n }\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val,initial);\n }\n else if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].setValue(val,initial);\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow(val,initial);\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n \n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n editor.delete_button.style.display = '';\n }\n }\n\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n \n var controls_needed = false;\n \n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else if(this.value.length === 1) { \n this.remove_all_rows_button.style.display = 'none'; \n\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.getMax() && this.getMax() <= this.rows.length) || this.hide_add_button){\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n } \n \n if(!this.collapsed && controls_needed) {\n this.controls.style.display = 'inline-block';\n }\n else {\n this.controls.style.display = 'none';\n }\n }\n },\n addRow: function(value, initial) {\n var self = this;\n var i = this.rows.length;\n \n self.rows[i] = this.getElementEditor(i);\n self.row_cache[i] = self.rows[i];\n\n if(self.tabs_holder) {\n self.rows[i].tab_text = document.createElement('span');\n self.rows[i].tab_text.textContent = self.rows[i].getHeaderText();\n self.rows[i].tab = self.theme.getTab(self.rows[i].tab_text);\n self.rows[i].tab.addEventListener('click', function(e) {\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n e.preventDefault();\n e.stopPropagation();\n });\n\n self.theme.addTab(self.tabs_holder, self.rows[i].tab);\n }\n \n var controls_holder = self.rows[i].title_controls || self.rows[i].array_controls;\n \n // Buttons to delete row, move row up, and move row down\n if(!self.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton(self.getItemTitle(),'delete',this.translate('button_delete_row_title',[self.getItemTitle()]));\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n var new_active_tab = null;\n $each(value,function(j,row) {\n if(j===i) {\n // If the one we're deleting is the active tab\n if(self.rows[j].tab === self.active_tab) {\n // Make the next tab active if there is one\n // Note: the next tab is going to be the current tab after deletion\n if(self.rows[j+1]) new_active_tab = self.rows[j].tab;\n // Otherwise, make the previous tab active if there is one\n else if(j) new_active_tab = self.rows[j-1].tab;\n }\n \n return; // If this is the one we're deleting\n }\n newval.push(row);\n });\n self.setValue(newval);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n }\n \n if(i && !self.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup',this.translate('button_move_up_title'));\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i-1].tab;\n self.refreshTabs();\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n }\n \n if(!self.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown',this.translate('button_move_down_title'));\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i+1].tab;\n self.refreshTabs();\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n }\n\n if(value) self.rows[i].setValue(value, initial);\n self.refreshTabs();\n },\n addControls: function() {\n var self = this;\n \n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));\n this.title_controls.appendChild(this.toggle_button);\n var row_holder_display = self.row_holder.style.display;\n var controls_display = self.controls.style.display;\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n if(self.collapsed) {\n self.collapsed = false;\n if(self.panel) self.panel.style.display = '';\n self.row_holder.style.display = row_holder_display;\n if(self.tabs_holder) self.tabs_holder.style.display = '';\n self.controls.style.display = controls_display;\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.row_holder.style.display = 'none';\n if(self.tabs_holder) self.tabs_holder.style.display = 'none';\n self.controls.style.display = 'none';\n if(self.panel) self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n \n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n \n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add',this.translate('button_add_row_title',[this.getItemTitle()]));\n \n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = self.rows.length;\n if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].setValue(self.rows[i].getDefault());\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow();\n }\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n self.refreshValue();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton(this.translate('button_delete_last',[this.getItemTitle()]),'delete',this.translate('button_delete_last_title',[this.getItemTitle()]));\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var rows = self.getValue();\n \n var new_active_tab = null;\n if(self.rows.length > 1 && self.rows[self.rows.length-1].tab === self.active_tab) new_active_tab = self.rows[self.rows.length-2].tab;\n \n rows.pop();\n self.setValue(rows);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title'));\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n\n if(self.tabs) {\n this.add_row_button.style.width = '100%';\n this.add_row_button.style.textAlign = 'left';\n this.add_row_button.style.marginBottom = '3px';\n \n this.delete_last_row_button.style.width = '100%';\n this.delete_last_row_button.style.textAlign = 'left';\n this.delete_last_row_button.style.marginBottom = '3px';\n \n this.remove_all_rows_button.style.width = '100%';\n this.remove_all_rows_button.style.textAlign = 'left';\n this.remove_all_rows_button.style.marginBottom = '3px';\n }\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show errors for child editors\n $each(this.rows, function(i,row) {\n row.showValidationErrors(other_errors);\n });\n }\n});\n", - "JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i this.schema.maxItems) {\n value = value.slice(0,this.schema.maxItems);\n }\n \n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n var numrows_changed = false;\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val);\n }\n else {\n self.addRow(val);\n numrows_changed = true;\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n \n var need_row_buttons = false;\n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.delete_button.style.display = '';\n }\n }\n \n if(editor.moveup_button) {\n need_row_buttons = true;\n }\n });\n \n // Show/hide controls column in table\n $each(this.rows,function(i,editor) {\n if(need_row_buttons) {\n editor.controls_cell.style.display = '';\n }\n else {\n editor.controls_cell.style.display = 'none';\n }\n });\n if(need_row_buttons) {\n this.controls_header_cell.style.display = '';\n }\n else {\n this.controls_header_cell.style.display = 'none';\n }\n \n var controls_needed = false;\n \n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n this.table.style.display = 'none';\n }\n else if(this.value.length === 1 || this.hide_delete_buttons) {\n this.table.style.display = '';\n this.remove_all_rows_button.style.display = 'none';\n\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n this.table.style.display = '';\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.schema.maxItems && this.schema.maxItems <= this.rows.length) || this.hide_add_button) {\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n }\n \n if(!controls_needed) {\n this.controls.style.display = 'none';\n }\n else {\n this.controls.style.display = '';\n }\n },\n refreshValue: function() {\n var self = this;\n this.value = [];\n\n $each(this.rows,function(i,editor) {\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n this.serialized = JSON.stringify(this.value);\n },\n addRow: function(value) {\n var self = this;\n var i = this.rows.length;\n\n self.rows[i] = this.getElementEditor(i);\n\n var controls_holder = self.rows[i].table_controls;\n\n // Buttons to delete row, move row up, and move row down\n if(!this.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton('','delete',this.translate('button_delete_row_title_short'));\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n $each(value,function(j,row) {\n if(j===i) return; // If this is the one we're deleting\n newval.push(row);\n });\n self.setValue(newval);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n\n \n if(i && !this.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup',this.translate('button_move_up_title'));\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n \n if(!this.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown',this.translate('button_move_down_title'));\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n\n if(value) self.rows[i].setValue(value);\n },\n addControls: function() {\n var self = this;\n\n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));\n if(this.title_controls) {\n this.title_controls.appendChild(this.toggle_button);\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if(self.collapsed) {\n self.collapsed = false;\n self.panel.style.display = '';\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n\n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n }\n\n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add',this.translate('button_add_row_title',[this.getItemTitle()]));\n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n self.addRow();\n self.refreshValue();\n self.refreshRowButtons();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton(this.translate('button_delete_last',[this.getItemTitle()]),'delete',this.translate('button_delete_last_title',[this.getItemTitle()]));\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n var rows = self.getValue();\n rows.pop();\n self.setValue(rows);\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title'));\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n }\n});\n", + "JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return $extend({},this.schema[\"default\"] || {});\n },\n getChildEditors: function() {\n return this.editors;\n },\n register: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].register();\n }\n }\n },\n unregister: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].unregister();\n }\n }\n },\n getNumColumns: function() {\n return Math.max(Math.min(12,this.maxwidth),3);\n },\n enable: function() {\n if(this.editjson_button) this.editjson_button.disabled = false;\n if(this.addproperty_button) this.addproperty_button.disabled = false;\n\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].enable();\n }\n }\n },\n disable: function() {\n if(this.editjson_button) this.editjson_button.disabled = true;\n if(this.addproperty_button) this.addproperty_button.disabled = true;\n this.hideEditJSON();\n\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].disable();\n }\n }\n },\n layoutEditors: function() {\n var self = this, i, j;\n\n if(!this.row_container) return;\n\n // Sort editors by propertyOrder\n this.property_order = Object.keys(this.editors);\n this.property_order = this.property_order.sort(function(a,b) {\n var ordera = self.editors[a].schema.propertyOrder;\n var orderb = self.editors[b].schema.propertyOrder;\n if(typeof ordera !== \"number\") ordera = 1000;\n if(typeof orderb !== \"number\") orderb = 1000;\n\n return ordera - orderb;\n });\n\n var container;\n\n if(this.format === 'grid') {\n var rows = [];\n $each(this.property_order, function(j,key) {\n var editor = self.editors[key];\n if(editor.property_removed) return;\n var found = false;\n var width = editor.options.hidden? 0 : (editor.options.grid_columns || editor.getNumColumns());\n var height = editor.options.hidden? 0 : editor.container.offsetHeight;\n // See if the editor will fit in any of the existing rows first\n for(var i=0; i height)) {\n found = i;\n }\n }\n }\n\n // If there isn't a spot in any of the existing rows, start a new row\n if(found === false) {\n rows.push({\n width: 0,\n minh: 999999,\n maxh: 0,\n editors: []\n });\n found = rows.length-1;\n }\n\n rows[found].editors.push({\n key: key,\n //editor: editor,\n width: width,\n height: height\n });\n rows[found].width += width;\n rows[found].minh = Math.min(rows[found].minh,height);\n rows[found].maxh = Math.max(rows[found].maxh,height);\n });\n\n // Make almost full rows width 12\n // Do this by increasing all editors' sizes proprotionately\n // Any left over space goes to the biggest editor\n // Don't touch rows with a width of 6 or less\n for(i=0; i rows[i].editors[biggest].width) biggest = j;\n rows[i].editors[j].width *= 12/rows[i].width;\n rows[i].editors[j].width = Math.floor(rows[i].editors[j].width);\n new_width += rows[i].editors[j].width;\n }\n if(new_width < 12) rows[i].editors[biggest].width += 12-new_width;\n rows[i].width = 12;\n }\n }\n\n // layout hasn't changed\n if(this.layout === JSON.stringify(rows)) return false;\n this.layout = JSON.stringify(rows);\n\n // Layout the form\n container = document.createElement('div');\n for(i=0; i= this.schema.maxProperties);\n\n if(this.addproperty_checkboxes) {\n this.addproperty_list.innerHTML = '';\n }\n this.addproperty_checkboxes = {};\n\n // Check for which editors can't be removed or added back\n for(i in this.cached_editors) {\n if(!this.cached_editors.hasOwnProperty(i)) continue;\n\n this.addPropertyCheckbox(i);\n\n if(this.isRequired(this.cached_editors[i]) && i in this.editors) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n\n if(typeof this.schema.minProperties !== \"undefined\" && num_props <= this.schema.minProperties) {\n this.addproperty_checkboxes[i].disabled = this.addproperty_checkboxes[i].checked;\n if(!this.addproperty_checkboxes[i].checked) show_modal = true;\n }\n else if(!(i in this.editors)) {\n if(!can_add && !this.schema.properties.hasOwnProperty(i)) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n else {\n this.addproperty_checkboxes[i].disabled = false;\n show_modal = true;\n }\n }\n else {\n show_modal = true;\n can_remove = true;\n }\n }\n\n if(this.canHaveAdditionalProperties()) {\n show_modal = true;\n }\n\n // Additional addproperty checkboxes not tied to a current editor\n for(i in this.schema.properties) {\n if(!this.schema.properties.hasOwnProperty(i)) continue;\n if(this.cached_editors[i]) continue;\n show_modal = true;\n this.addPropertyCheckbox(i);\n }\n\n // If no editors can be added or removed, hide the modal button\n if(!show_modal) {\n this.hideAddProperty();\n this.addproperty_controls.style.display = 'none';\n }\n // If additional properties are disabled\n else if(!this.canHaveAdditionalProperties()) {\n this.addproperty_add.style.display = 'none';\n this.addproperty_input.style.display = 'none';\n }\n // If no new properties can be added\n else if(!can_add) {\n this.addproperty_add.disabled = true;\n }\n // If new properties can be added\n else {\n this.addproperty_add.disabled = false;\n }\n },\n isRequired: function(editor) {\n if(typeof editor.schema.required === \"boolean\") return editor.schema.required;\n else if(Array.isArray(this.schema.required)) return this.schema.required.indexOf(editor.key) > -1;\n else if(this.jsoneditor.options.required_by_default) return true;\n else return false;\n },\n setValue: function(value, initial) {\n var self = this;\n value = value || {};\n\n if(typeof value !== \"object\" || Array.isArray(value)) value = {};\n\n // First, set the values for all of the defined properties\n $each(this.cached_editors, function(i,editor) {\n // Value explicitly set\n if(typeof value[i] !== \"undefined\") {\n self.addObjectProperty(i);\n editor.setValue(value[i],initial);\n }\n // Otherwise, remove value unless this is the initial set or it's required\n else if(!initial && !self.isRequired(editor)) {\n self.removeObjectProperty(i);\n }\n // Otherwise, set the value to the default\n else {\n editor.setValue(editor.getDefault(),initial);\n }\n });\n\n $each(value, function(i,val) {\n if(!self.cached_editors[i]) {\n self.addObjectProperty(i);\n if(self.editors[i]) self.editors[i].setValue(val,initial);\n }\n });\n\n this.refreshValue();\n this.layoutEditors();\n this.onChange();\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show error for the table row if this is inside a table\n if(this.options.table_row) {\n if(my_errors.length) {\n this.theme.addTableRowError(this.container);\n }\n else {\n this.theme.removeTableRowError(this.container);\n }\n }\n\n // Show errors for child editors\n $each(this.editors, function(i,editor) {\n editor.showValidationErrors(other_errors);\n });\n }\n});\n", + "JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return this.schema[\"default\"] || [];\n },\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i= this.schema.items.length) {\n if(this.schema.additionalItems===true) {\n return {};\n }\n else if(this.schema.additionalItems) {\n return $extend({},this.schema.additionalItems);\n }\n }\n else {\n return $extend({},this.schema.items[i]);\n }\n }\n else if(this.schema.items) {\n return $extend({},this.schema.items);\n }\n else {\n return {};\n }\n },\n getItemInfo: function(i) {\n var schema = this.getItemSchema(i);\n \n // Check if it's cached\n this.item_info = this.item_info || {};\n var stringified = JSON.stringify(schema);\n if(typeof this.item_info[stringified] !== \"undefined\") return this.item_info[stringified];\n \n // Get the schema for this item\n schema = this.jsoneditor.expandRefs(schema);\n \n this.item_info[stringified] = {\n title: schema.title || \"item\",\n 'default': schema[\"default\"],\n width: 12,\n child_editors: schema.properties || schema.items\n };\n \n return this.item_info[stringified];\n },\n getElementEditor: function(i) {\n var item_info = this.getItemInfo(i);\n var schema = this.getItemSchema(i);\n schema = this.jsoneditor.expandRefs(schema);\n schema.title = item_info.title+' '+(i+1);\n\n var editor = this.jsoneditor.getEditorClass(schema);\n\n var holder;\n if(this.tabs_holder) {\n holder = this.theme.getTabContent();\n }\n else if(item_info.child_editors) {\n holder = this.theme.getChildEditorHolder();\n }\n else {\n holder = this.theme.getIndentedPanel();\n }\n\n this.row_holder.appendChild(holder);\n\n var ret = this.jsoneditor.createEditor(editor,{\n jsoneditor: this.jsoneditor,\n schema: schema,\n container: holder,\n path: this.path+'.'+i,\n parent: this,\n required: true\n });\n ret.preBuild();\n ret.build();\n ret.postBuild();\n\n if(!ret.title_controls) {\n ret.array_controls = this.theme.getButtonHolder();\n holder.appendChild(ret.array_controls);\n }\n \n return ret;\n },\n destroy: function() {\n this.empty(true);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n if(this.row_holder && this.row_holder.parentNode) this.row_holder.parentNode.removeChild(this.row_holder);\n if(this.controls && this.controls.parentNode) this.controls.parentNode.removeChild(this.controls);\n if(this.panel && this.panel.parentNode) this.panel.parentNode.removeChild(this.panel);\n \n this.rows = this.row_cache = this.title = this.description = this.row_holder = this.panel = this.controls = null;\n\n this._super();\n },\n empty: function(hard) {\n if(!this.rows) return;\n var self = this;\n $each(this.rows,function(i,row) {\n if(hard) {\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n self.destroyRow(row,true);\n self.row_cache[i] = null;\n }\n self.rows[i] = null;\n });\n self.rows = [];\n if(hard) self.row_cache = [];\n },\n destroyRow: function(row,hard) {\n var holder = row.container;\n if(hard) {\n row.destroy();\n if(holder.parentNode) holder.parentNode.removeChild(holder);\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n }\n else {\n if(row.tab) row.tab.style.display = 'none';\n holder.style.display = 'none';\n row.unregister();\n }\n },\n getMax: function() {\n if((Array.isArray(this.schema.items)) && this.schema.additionalItems === false) {\n return Math.min(this.schema.items.length,this.schema.maxItems || Infinity);\n }\n else {\n return this.schema.maxItems || Infinity;\n }\n },\n refreshTabs: function(refresh_headers) {\n var self = this;\n $each(this.rows, function(i,row) {\n if(!row.tab) return;\n\n if(refresh_headers) {\n row.tab_text.textContent = row.getHeaderText();\n }\n else {\n if(row.tab === self.active_tab) {\n self.theme.markTabActive(row.tab);\n row.container.style.display = '';\n }\n else {\n self.theme.markTabInactive(row.tab);\n row.container.style.display = 'none';\n }\n }\n });\n },\n setValue: function(value, initial) {\n // Update the array's value, adding/removing rows when necessary\n value = value || [];\n \n if(!(Array.isArray(value))) value = [value];\n \n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n // Make sure value has between minItems and maxItems items in it\n if(this.schema.minItems) {\n while(value.length < this.schema.minItems) {\n value.push(this.getItemInfo(value.length)[\"default\"]);\n }\n }\n if(this.getMax() && value.length > this.getMax()) {\n value = value.slice(0,this.getMax());\n }\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val,initial);\n }\n else if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].setValue(val,initial);\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow(val,initial);\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n \n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n editor.delete_button.style.display = '';\n }\n }\n\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n \n var controls_needed = false;\n \n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else if(this.value.length === 1) { \n this.remove_all_rows_button.style.display = 'none'; \n\n // If there are minItems items in the array, or configured to hide the delete_last_row button, hide the delete button beneath the rows\n if(minItems || this.hide_delete_last_row_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n if(minItems || this.hide_delete_last_row_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n\n if(minItems || this.hide_delete_all_rows_buttons) {\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.getMax() && this.getMax() <= this.rows.length) || this.hide_add_button){\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n } \n \n if(!this.collapsed && controls_needed) {\n this.controls.style.display = 'inline-block';\n }\n else {\n this.controls.style.display = 'none';\n }\n }\n },\n addRow: function(value, initial) {\n var self = this;\n var i = this.rows.length;\n \n self.rows[i] = this.getElementEditor(i);\n self.row_cache[i] = self.rows[i];\n\n if(self.tabs_holder) {\n self.rows[i].tab_text = document.createElement('span');\n self.rows[i].tab_text.textContent = self.rows[i].getHeaderText();\n self.rows[i].tab = self.theme.getTab(self.rows[i].tab_text);\n self.rows[i].tab.addEventListener('click', function(e) {\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n e.preventDefault();\n e.stopPropagation();\n });\n\n self.theme.addTab(self.tabs_holder, self.rows[i].tab);\n }\n \n var controls_holder = self.rows[i].title_controls || self.rows[i].array_controls;\n \n // Buttons to delete row, move row up, and move row down\n if(!self.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton(self.getItemTitle(),'delete',this.translate('button_delete_row_title',[self.getItemTitle()]));\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n var new_active_tab = null;\n $each(value,function(j,row) {\n if(j===i) {\n // If the one we're deleting is the active tab\n if(self.rows[j].tab === self.active_tab) {\n // Make the next tab active if there is one\n // Note: the next tab is going to be the current tab after deletion\n if(self.rows[j+1]) new_active_tab = self.rows[j].tab;\n // Otherwise, make the previous tab active if there is one\n else if(j) new_active_tab = self.rows[j-1].tab;\n }\n \n return; // If this is the one we're deleting\n }\n newval.push(row);\n });\n self.setValue(newval);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n }\n \n if(i && !self.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup',this.translate('button_move_up_title'));\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i-1].tab;\n self.refreshTabs();\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n }\n \n if(!self.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown',this.translate('button_move_down_title'));\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i+1].tab;\n self.refreshTabs();\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n }\n\n if(value) self.rows[i].setValue(value, initial);\n self.refreshTabs();\n },\n addControls: function() {\n var self = this;\n \n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));\n this.title_controls.appendChild(this.toggle_button);\n var row_holder_display = self.row_holder.style.display;\n var controls_display = self.controls.style.display;\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n if(self.collapsed) {\n self.collapsed = false;\n if(self.panel) self.panel.style.display = '';\n self.row_holder.style.display = row_holder_display;\n if(self.tabs_holder) self.tabs_holder.style.display = '';\n self.controls.style.display = controls_display;\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.row_holder.style.display = 'none';\n if(self.tabs_holder) self.tabs_holder.style.display = 'none';\n self.controls.style.display = 'none';\n if(self.panel) self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n \n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n \n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add',this.translate('button_add_row_title',[this.getItemTitle()]));\n \n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = self.rows.length;\n if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].setValue(self.rows[i].getDefault());\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow();\n }\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n self.refreshValue();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton(this.translate('button_delete_last',[this.getItemTitle()]),'delete',this.translate('button_delete_last_title',[this.getItemTitle()]));\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var rows = self.getValue();\n \n var new_active_tab = null;\n if(self.rows.length > 1 && self.rows[self.rows.length-1].tab === self.active_tab) new_active_tab = self.rows[self.rows.length-2].tab;\n \n rows.pop();\n self.setValue(rows);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title'));\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n\n if(self.tabs) {\n this.add_row_button.style.width = '100%';\n this.add_row_button.style.textAlign = 'left';\n this.add_row_button.style.marginBottom = '3px';\n \n this.delete_last_row_button.style.width = '100%';\n this.delete_last_row_button.style.textAlign = 'left';\n this.delete_last_row_button.style.marginBottom = '3px';\n \n this.remove_all_rows_button.style.width = '100%';\n this.remove_all_rows_button.style.textAlign = 'left';\n this.remove_all_rows_button.style.marginBottom = '3px';\n }\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show errors for child editors\n $each(this.rows, function(i,row) {\n row.showValidationErrors(other_errors);\n });\n }\n});\n", + "JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i this.schema.maxItems) {\n value = value.slice(0,this.schema.maxItems);\n }\n\n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n var numrows_changed = false;\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val);\n }\n else {\n self.addRow(val);\n numrows_changed = true;\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n\n var need_row_buttons = false;\n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.delete_button.style.display = '';\n }\n }\n\n if(editor.moveup_button) {\n need_row_buttons = true;\n }\n });\n\n // Show/hide controls column in table\n $each(this.rows,function(i,editor) {\n if(need_row_buttons) {\n editor.controls_cell.style.display = '';\n }\n else {\n editor.controls_cell.style.display = 'none';\n }\n });\n if(need_row_buttons) {\n this.controls_header_cell.style.display = '';\n }\n else {\n this.controls_header_cell.style.display = 'none';\n }\n\n var controls_needed = false;\n\n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n this.table.style.display = 'none';\n }\n else if(this.value.length === 1) {\n this.table.style.display = '';\n this.remove_all_rows_button.style.display = 'none';\n\n // If there are minItems items in the array, or configured to hide the delete_last_row button, hide the delete button beneath the rows\n if(minItems || this.hide_delete_last_row_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n this.table.style.display = '';\n\n if(minItems || this.hide_delete_last_row_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n\n if(minItems || this.hide_delete_all_rows_buttons) {\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.schema.maxItems && this.schema.maxItems <= this.rows.length) || this.hide_add_button) {\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n }\n\n if(!controls_needed) {\n this.controls.style.display = 'none';\n }\n else {\n this.controls.style.display = '';\n }\n },\n refreshValue: function() {\n var self = this;\n this.value = [];\n\n $each(this.rows,function(i,editor) {\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n this.serialized = JSON.stringify(this.value);\n },\n addRow: function(value) {\n var self = this;\n var i = this.rows.length;\n\n self.rows[i] = this.getElementEditor(i);\n\n var controls_holder = self.rows[i].table_controls;\n\n // Buttons to delete row, move row up, and move row down\n if(!this.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton('','delete',this.translate('button_delete_row_title_short'));\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n $each(value,function(j,row) {\n if(j===i) return; // If this is the one we're deleting\n newval.push(row);\n });\n self.setValue(newval);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n\n\n if(i && !this.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup',this.translate('button_move_up_title'));\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n\n if(!this.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown',this.translate('button_move_down_title'));\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n\n if(value) self.rows[i].setValue(value);\n },\n addControls: function() {\n var self = this;\n\n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));\n if(this.title_controls) {\n this.title_controls.appendChild(this.toggle_button);\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if(self.collapsed) {\n self.collapsed = false;\n self.panel.style.display = '';\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n\n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n }\n\n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add',this.translate('button_add_row_title',[this.getItemTitle()]));\n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n self.addRow();\n self.refreshValue();\n self.refreshRowButtons();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton(this.translate('button_delete_last',[this.getItemTitle()]),'delete',this.translate('button_delete_last_title',[this.getItemTitle()]));\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n var rows = self.getValue();\n rows.pop();\n self.setValue(rows);\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title'));\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n }\n});\n", "// Multiple Editor (for when `type` is an array)\nJSONEditor.defaults.editors.multiple = JSONEditor.AbstractEditor.extend({\n register: function() {\n if(this.editors) {\n for(var i=0; inull';\n }\n // Array or Object\n else if(typeof el === \"object\") {\n // TODO: use theme\n var ret = '';\n\n $each(el,function(i,child) {\n var html = self.getHTML(child);\n\n // Add the keys to object children\n if(!(Array.isArray(el))) {\n // TODO: use theme\n html = '
'+i+': '+html+'
';\n }\n\n // TODO: use theme\n ret += '
  • '+html+'
  • ';\n });\n\n if(Array.isArray(el)) ret = '
      '+ret+'
    ';\n else ret = \"
      \"+ret+'
    ';\n\n return ret;\n }\n // Boolean\n else if(typeof el === \"boolean\") {\n return el? 'true' : 'false';\n }\n // String\n else if(typeof el === \"string\") {\n return el.replace(/&/g,'&').replace(//g,'>');\n }\n // Number\n else {\n return el;\n }\n },\n setValue: function(val) {\n if(this.value !== val) {\n this.value = val;\n this.refreshValue();\n this.onChange();\n }\n },\n destroy: function() {\n if(this.display_area && this.display_area.parentNode) this.display_area.parentNode.removeChild(this.display_area);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.switcher && this.switcher.parentNode) this.switcher.parentNode.removeChild(this.switcher);\n\n this._super();\n }\n});\n", "JSONEditor.defaults.editors.select = JSONEditor.AbstractEditor.extend({\n setValue: function(value,initial) {\n value = this.typecast(value||'');\n\n // Sanitize value before setting it\n var sanitized = value;\n if(this.enum_values.indexOf(sanitized) < 0) {\n sanitized = this.enum_values[0];\n }\n\n if(this.value === sanitized) {\n return;\n }\n\n this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];\n if(this.select2) this.select2.select2('val',this.input.value);\n this.value = sanitized;\n this.onChange();\n },\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n getNumColumns: function() {\n if(!this.enum_options) return 3;\n var longest_text = this.getTitle().length;\n for(var i=0; i 2 || (this.enum_options.length && this.enumSource))) {\n var options = $extend({},JSONEditor.plugins.select2);\n if(this.schema.options && this.schema.options.select2_options) options = $extend(options,this.schema.options.select2_options);\n this.select2 = window.jQuery(this.input).select2(options);\n var self = this;\n this.select2.on('select2-blur',function() {\n self.input.value = self.select2.select2('val');\n self.onInputChange();\n });\n this.select2.on('change',function() {\n self.input.value = self.select2.select2('val');\n self.onInputChange();\n });\n }\n else {\n this.select2 = null;\n }\n },\n postBuild: function() {\n this._super();\n this.theme.afterInputReady(this.input);\n this.setupSelect2();\n },\n onWatchedFieldChange: function() {\n var self = this, vars, j;\n \n // If this editor uses a dynamic select box\n if(this.enumSource) {\n vars = this.getWatchedFieldValues();\n var select_options = [];\n var select_titles = [];\n \n for(var i=0; i
    \";\n return el;\n },\n applyStyles: function(el,styles) {\n el.style = el.style || {};\n for(var i in styles) {\n if(!styles.hasOwnProperty(i)) continue;\n el.style[i] = styles[i];\n }\n },\n closest: function(elem, selector) {\n while (elem && elem !== document) {\n if (matchKey) {\n if (elem[matchKey](selector)) {\n return elem;\n } else {\n elem = elem.parentNode;\n }\n }\n else {\n return false;\n }\n }\n return false;\n },\n getTab: function(span) {\n var el = document.createElement('div');\n el.appendChild(span);\n el.style = el.style || {};\n this.applyStyles(el,{\n border: '1px solid #ccc',\n borderWidth: '1px 0 1px 1px',\n textAlign: 'center',\n lineHeight: '30px',\n borderRadius: '5px',\n borderBottomRightRadius: 0,\n borderTopRightRadius: 0,\n fontWeight: 'bold',\n cursor: 'pointer'\n });\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n return this.getIndentedPanel();\n },\n markTabActive: function(tab) {\n this.applyStyles(tab,{\n opacity: 1,\n background: 'white'\n });\n },\n markTabInactive: function(tab) {\n this.applyStyles(tab,{\n opacity:0.5,\n background: ''\n });\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n },\n getBlockLink: function() {\n var link = document.createElement('a');\n link.style.display = 'block';\n return link;\n },\n getBlockLinkHolder: function() {\n var el = document.createElement('div');\n return el;\n },\n getLinksHolder: function() {\n var el = document.createElement('div');\n return el;\n },\n createMediaLink: function(holder,link,media) {\n holder.appendChild(link);\n media.style.width='100%';\n holder.appendChild(media);\n },\n createImageLink: function(holder,link,image) {\n holder.appendChild(link);\n link.appendChild(image);\n }\n});\n", "JSONEditor.defaults.themes.bootstrap2 = JSONEditor.AbstractTheme.extend({\n getRangeInput: function(min, max, step) {\n // TODO: use bootstrap slider\n return this._super(min, max, step);\n },\n getGridContainer: function() {\n var el = document.createElement('div');\n el.className = 'container-fluid';\n return el;\n },\n getGridRow: function() {\n var el = document.createElement('div');\n el.className = 'row-fluid';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'inline-block';\n el.style.fontWeight = 'bold';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'span'+size;\n },\n getSelectInput: function(options) {\n var input = this._super(options);\n input.style.width = 'auto';\n input.style.maxWidth = '98%';\n return input;\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n el.style.width = '98%';\n return el;\n },\n afterInputReady: function(input) {\n if(input.controlgroup) return;\n input.controlgroup = this.closest(input,'.control-group');\n input.controls = this.closest(input,'.controls');\n if(this.closest(input,'.compact')) {\n input.controlgroup.className = input.controlgroup.className.replace(/control-group/g,'').replace(/[ ]{2,}/g,' ');\n input.controls.className = input.controlgroup.className.replace(/controls/g,'').replace(/[ ]{2,}/g,' ');\n input.style.marginBottom = 0;\n }\n\n // TODO: use bootstrap slider\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'well well-small';\n el.style.paddingBottom = 0;\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.className = 'help-inline';\n el.textContent = text;\n return el;\n },\n getFormControl: function(label, input, description) {\n var ret = document.createElement('div');\n ret.className = 'control-group';\n\n var controls = document.createElement('div');\n controls.className = 'controls';\n\n if(label && input.getAttribute('type') === 'checkbox') {\n ret.appendChild(controls);\n label.className += ' checkbox';\n label.appendChild(input);\n controls.appendChild(label);\n controls.style.height = '30px';\n }\n else {\n if(label) {\n label.className += ' control-label';\n ret.appendChild(label);\n }\n controls.appendChild(input);\n ret.appendChild(controls);\n }\n\n if(description) controls.appendChild(description);\n\n return ret;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'btn-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += ' btn btn-default';\n return el;\n },\n getTable: function() {\n var el = document.createElement('table');\n el.className = 'table table-bordered';\n el.style.width = 'auto';\n el.style.maxWidth = 'none';\n return el;\n },\n addInputError: function(input,text) {\n if(!input.controlgroup || !input.controls) return;\n input.controlgroup.className += ' error';\n if(!input.errmsg) {\n input.errmsg = document.createElement('p');\n input.errmsg.className = 'help-block errormsg';\n input.controls.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n input.controlgroup.className = input.controlgroup.className.replace(/\\s?error/g,'');\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.className = 'tabbable tabs-left';\n el.innerHTML = \"
    \";\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('li');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'tab-pane active';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s?active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n },\n getProgressBar: function() {\n var container = document.createElement('div');\n container.className = 'progress';\n\n var bar = document.createElement('div');\n bar.className = 'bar';\n bar.style.width = '0%';\n container.appendChild(bar);\n\n return container;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n\n progressBar.firstChild.style.width = progress + \"%\";\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n\n progressBar.className = 'progress progress-striped active';\n progressBar.firstChild.style.width = '100%';\n }\n});\n", "JSONEditor.defaults.themes.bootstrap3 = JSONEditor.AbstractTheme.extend({\n getSelectInput: function(options) {\n var el = this._super(options);\n el.className += 'form-control';\n //el.style.width = 'auto';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'col-md-'+size;\n },\n afterInputReady: function(input) {\n if(input.controlgroup) return;\n input.controlgroup = this.closest(input,'.form-group');\n if(this.closest(input,'.compact')) {\n input.controlgroup.style.marginBottom = 0;\n }\n\n // TODO: use bootstrap slider\n },\n getTextareaInput: function() {\n var el = document.createElement('textarea');\n el.className = 'form-control';\n return el;\n },\n getRangeInput: function(min, max, step) {\n // TODO: use better slider\n return this._super(min, max, step);\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n if(type !== 'checkbox') {\n el.className += 'form-control';\n }\n return el;\n },\n getFormControl: function(label, input, description) {\n var group = document.createElement('div');\n\n if(label && input.type === 'checkbox') {\n group.className += ' checkbox';\n label.appendChild(input);\n label.style.fontSize = '14px';\n group.style.marginTop = '0';\n group.appendChild(label);\n input.style.position = 'relative';\n input.style.cssFloat = 'left';\n } \n else {\n group.className += ' form-group';\n if(label) {\n label.className += ' control-label';\n group.appendChild(label);\n }\n group.appendChild(input);\n }\n\n if(description) group.appendChild(description);\n\n return group;\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'well well-sm';\n el.style.paddingBottom = 0;\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.className = 'help-block';\n el.innerHTML = text;\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'btn-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += 'btn btn-default';\n return el;\n },\n getTable: function() {\n var el = document.createElement('table');\n el.className = 'table table-bordered';\n el.style.width = 'auto';\n el.style.maxWidth = 'none';\n return el;\n },\n\n addInputError: function(input,text) {\n if(!input.controlgroup) return;\n input.controlgroup.className += ' has-error';\n if(!input.errmsg) {\n input.errmsg = document.createElement('p');\n input.errmsg.className = 'help-block errormsg';\n input.controlgroup.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n input.controlgroup.className = input.controlgroup.className.replace(/\\s?has-error/g,'');\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.innerHTML = \"
    \";\n el.className = 'rows';\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('a');\n el.className = 'list-group-item';\n el.setAttribute('href','#');\n el.appendChild(text);\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s?active/g,'');\n },\n getProgressBar: function() {\n var min = 0, max = 100, start = 0;\n\n var container = document.createElement('div');\n container.className = 'progress';\n\n var bar = document.createElement('div');\n bar.className = 'progress-bar';\n bar.setAttribute('role', 'progressbar');\n bar.setAttribute('aria-valuenow', start);\n bar.setAttribute('aria-valuemin', min);\n bar.setAttribute('aria-valuenax', max);\n bar.innerHTML = start + \"%\";\n container.appendChild(bar);\n\n return container;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n\n var bar = progressBar.firstChild;\n var percentage = progress + \"%\";\n bar.setAttribute('aria-valuenow', progress);\n bar.style.width = percentage;\n bar.innerHTML = percentage;\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n\n var bar = progressBar.firstChild;\n progressBar.className = 'progress progress-striped active';\n bar.removeAttribute('aria-valuenow');\n bar.style.width = '100%';\n bar.innerHTML = '';\n }\n});\n", - "// Base Foundation theme\nJSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({\n getChildEditorHolder: function() {\n var el = document.createElement('div');\n el.style.marginBottom = '15px';\n return el;\n },\n getSelectInput: function(options) {\n var el = this._super(options);\n el.style.minWidth = 'none';\n el.style.padding = '5px';\n el.style.marginTop = '3px';\n return el;\n },\n getSwitcher: function(options) {\n var el = this._super(options);\n el.style.paddingRight = '8px';\n return el;\n },\n afterInputReady: function(input) {\n if(this.closest(input,'.compact')) {\n input.style.marginBottom = 0;\n }\n input.group = this.closest(input,'.form-control');\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'inline-block';\n return el;\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n el.style.width = '100%';\n el.style.marginBottom = type==='checkbox'? '0' : '12px';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.textContent = text;\n el.style.marginTop = '-10px';\n el.style.fontStyle = 'italic';\n return el;\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'panel';\n el.style.paddingBottom = 0;\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.display = 'inline-block';\n el.style.marginLeft = '10px';\n el.style.verticalAlign = 'middle';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'button-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += ' small button';\n return el;\n },\n addInputError: function(input,text) {\n if(!input.group) return;\n input.group.className += ' error';\n \n if(!input.errmsg) {\n input.insertAdjacentHTML('afterend','');\n input.errmsg = input.parentNode.getElementsByClassName('error')[0];\n }\n else {\n input.errmsg.style.display = '';\n }\n \n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.group.className = input.group.className.replace(/ error/g,'');\n input.errmsg.style.display = 'none';\n },\n getProgressBar: function() {\n var progressBar = document.createElement('div');\n progressBar.className = 'progress';\n\n var meter = document.createElement('span');\n meter.className = 'meter';\n meter.style.width = '0%';\n progressBar.appendChild(meter);\n return progressBar;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = progress + '%';\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = '100%';\n }\n});\n\n// Foundation 3 Specific Theme\nJSONEditor.defaults.themes.foundation3 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.className = 'row';\n el.innerHTML = \"
    \";\n return el;\n },\n setGridColumnSize: function(el,size) {\n var sizes = ['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve'];\n el.className = 'columns '+sizes[size];\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n\n// Foundation 4 Specific Theme\nJSONEditor.defaults.themes.foundation4 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns large-'+size;\n },\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n }\n});\n\n// Foundation 5 Specific Theme\nJSONEditor.defaults.themes.foundation5 = JSONEditor.defaults.themes.foundation.extend({\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns medium-'+size;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text,icon,title);\n el.className = el.className.replace(/\\s*small/g,'') + ' tiny';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.innerHTML = \"
    \";\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n", + "// Base Foundation theme\nJSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({\n getChildEditorHolder: function() {\n var el = document.createElement('div');\n el.style.marginBottom = '15px';\n return el;\n },\n getSelectInput: function(options) {\n var el = this._super(options);\n el.style.minWidth = 'none';\n el.style.padding = '5px';\n el.style.marginTop = '3px';\n return el;\n },\n getSwitcher: function(options) {\n var el = this._super(options);\n el.style.paddingRight = '8px';\n return el;\n },\n afterInputReady: function(input) {\n if(this.closest(input,'.compact')) {\n input.style.marginBottom = 0;\n }\n input.group = this.closest(input,'.form-control');\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'inline-block';\n return el;\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n el.style.width = '100%';\n el.style.marginBottom = type==='checkbox'? '0' : '12px';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.textContent = text;\n el.style.marginTop = '-10px';\n el.style.fontStyle = 'italic';\n return el;\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'panel';\n el.style.paddingBottom = 0;\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.display = 'inline-block';\n el.style.marginLeft = '10px';\n el.style.verticalAlign = 'middle';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'button-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += ' small button';\n return el;\n },\n addInputError: function(input,text) {\n if(!input.group) return;\n input.group.className += ' error';\n\n if(!input.errmsg) {\n input.insertAdjacentHTML('afterend','');\n input.errmsg = input.parentNode.getElementsByClassName('error')[0];\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.group.className = input.group.className.replace(/ error/g,'');\n input.errmsg.style.display = 'none';\n },\n getProgressBar: function() {\n var progressBar = document.createElement('div');\n progressBar.className = 'progress';\n\n var meter = document.createElement('span');\n meter.className = 'meter';\n meter.style.width = '0%';\n progressBar.appendChild(meter);\n return progressBar;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = progress + '%';\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = '100%';\n }\n});\n\n// Foundation 3 Specific Theme\nJSONEditor.defaults.themes.foundation3 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.className = 'row';\n el.innerHTML = \"
    \";\n return el;\n },\n setGridColumnSize: function(el,size) {\n var sizes = ['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve'];\n el.className = 'columns '+sizes[size];\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n\n// Foundation 4 Specific Theme\nJSONEditor.defaults.themes.foundation4 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns large-'+size;\n },\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n }\n});\n\n// Foundation 5 Specific Theme\nJSONEditor.defaults.themes.foundation5 = JSONEditor.defaults.themes.foundation.extend({\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns medium-'+size;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text,icon,title);\n el.className = el.className.replace(/\\s*small/g,'') + ' tiny';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.innerHTML = \"
    \";\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n\nJSONEditor.defaults.themes.foundation6 = JSONEditor.defaults.themes.foundation5.extend({\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'callout secondary';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'button-group tiny';\n el.style.marginBottom = 0;\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'block';\n return el;\n },\n getFormControl: function(label, input, description) {\n var el = document.createElement('div');\n el.className = 'form-control';\n if(label) el.appendChild(label);\n if(input.type === 'checkbox') {\n label.insertBefore(input,label.firstChild);\n }\n else if (label) {\n label.appendChild(input);\n } else {\n el.appendChild(input);\n }\n\n if(description) label.appendChild(description);\n return el;\n },\n addInputError: function(input,text) {\n if(!input.group) return;\n input.group.className += ' error';\n\n if(!input.errmsg) {\n var errorEl = document.createElement('span');\n errorEl.className = 'form-error is-visible';\n input.group.getElementsByTagName('label')[0].appendChild(errorEl);\n\n input.className = input.className + ' is-invalid-input';\n\n input.errmsg = errorEl;\n }\n else {\n input.errmsg.style.display = '';\n input.className = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.className = input.className.replace(/ is-invalid-input/g,'');\n if(input.errmsg.parentNode) {\n input.errmsg.parentNode.removeChild(input.errmsg);\n }\n },\n});\n", "JSONEditor.defaults.themes.html = JSONEditor.AbstractTheme.extend({\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'block';\n el.style.marginBottom = '3px';\n el.style.fontWeight = 'bold';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8em';\n el.style.margin = 0;\n el.style.display = 'inline-block';\n el.style.fontStyle = 'italic';\n return el;\n },\n getIndentedPanel: function() {\n var el = this._super();\n el.style.border = '1px solid #ddd';\n el.style.padding = '5px';\n el.style.margin = '5px';\n el.style.borderRadius = '3px';\n return el;\n },\n getChildEditorHolder: function() {\n var el = this._super();\n el.style.marginBottom = '8px';\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.display = 'inline-block';\n el.style.marginLeft = '10px';\n el.style.fontSize = '.8em';\n el.style.verticalAlign = 'middle';\n return el;\n },\n getTable: function() {\n var el = this._super();\n el.style.borderBottom = '1px solid #ccc';\n el.style.marginBottom = '5px';\n return el;\n },\n addInputError: function(input, text) {\n input.style.borderColor = 'red';\n \n if(!input.errmsg) {\n var group = this.closest(input,'.form-control');\n input.errmsg = document.createElement('div');\n input.errmsg.setAttribute('class','errmsg');\n input.errmsg.style = input.errmsg.style || {};\n input.errmsg.style.color = 'red';\n group.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = 'block';\n }\n \n input.errmsg.innerHTML = '';\n input.errmsg.appendChild(document.createTextNode(text));\n },\n removeInputError: function(input) {\n input.style.borderColor = '';\n if(input.errmsg) input.errmsg.style.display = 'none';\n },\n getProgressBar: function() {\n var max = 100, start = 0;\n\n var progressBar = document.createElement('progress');\n progressBar.setAttribute('max', max);\n progressBar.setAttribute('value', start);\n return progressBar;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n progressBar.setAttribute('value', progress);\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n progressBar.removeAttribute('value');\n }\n});\n", "JSONEditor.defaults.themes.jqueryui = JSONEditor.AbstractTheme.extend({\n getTable: function() {\n var el = this._super();\n el.setAttribute('cellpadding',5);\n el.setAttribute('cellspacing',0);\n return el;\n },\n getTableHeaderCell: function(text) {\n var el = this._super(text);\n el.className = 'ui-state-active';\n el.style.fontWeight = 'bold';\n return el;\n },\n getTableCell: function() {\n var el = this._super();\n el.className = 'ui-widget-content';\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n el.style.fontSize = '.6em';\n el.style.display = 'inline-block';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = this.getDescription(text);\n el.style.marginLeft = '10px';\n el.style.display = 'inline-block';\n return el;\n },\n getFormControl: function(label, input, description) {\n var el = this._super(label,input,description);\n if(input.type === 'checkbox') {\n el.style.lineHeight = '25px';\n \n el.style.padding = '3px 0';\n }\n else {\n el.style.padding = '4px 0 8px 0';\n }\n return el;\n },\n getDescription: function(text) {\n var el = document.createElement('span');\n el.style.fontSize = '.8em';\n el.style.fontStyle = 'italic';\n el.textContent = text;\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'ui-buttonset';\n el.style.fontSize = '.7em';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = document.createElement('label');\n el.style.fontWeight = 'bold';\n el.style.display = 'block';\n el.textContent = text;\n return el;\n },\n getButton: function(text, icon, title) {\n var button = document.createElement(\"button\");\n button.className = 'ui-button ui-widget ui-state-default ui-corner-all';\n\n // Icon only\n if(icon && !text) {\n button.className += ' ui-button-icon-only';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Icon and Text\n else if(icon) {\n button.className += ' ui-button-text-icon-primary';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Text only\n else {\n button.className += ' ui-button-text-only';\n }\n\n var el = document.createElement('span');\n el.className = 'ui-button-text';\n el.textContent = text||title||\".\";\n button.appendChild(el);\n\n button.setAttribute('title',title);\n \n return button;\n },\n setButtonText: function(button,text, icon, title) {\n button.innerHTML = '';\n button.className = 'ui-button ui-widget ui-state-default ui-corner-all';\n\n // Icon only\n if(icon && !text) {\n button.className += ' ui-button-icon-only';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Icon and Text\n else if(icon) {\n button.className += ' ui-button-text-icon-primary';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Text only\n else {\n button.className += ' ui-button-text-only';\n }\n\n var el = document.createElement('span');\n el.className = 'ui-button-text';\n el.textContent = text||title||\".\";\n button.appendChild(el);\n\n button.setAttribute('title',title);\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'ui-widget-content ui-corner-all';\n el.style.padding = '1em 1.4em';\n el.style.marginBottom = '20px';\n return el;\n },\n afterInputReady: function(input) {\n if(input.controls) return;\n input.controls = this.closest(input,'.form-control');\n },\n addInputError: function(input,text) {\n if(!input.controls) return;\n if(!input.errmsg) {\n input.errmsg = document.createElement('div');\n input.errmsg.className = 'ui-state-error';\n input.controls.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n },\n markTabActive: function(tab) {\n tab.className = tab.className.replace(/\\s*ui-widget-header/g,'')+' ui-state-active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*ui-state-active/g,'')+' ui-widget-header';\n }\n});\n", + "JSONEditor.defaults.themes.barebones = JSONEditor.AbstractTheme.extend({\n getFormInputLabel: function (text) {\n var el = this._super(text);\n return el;\n },\n getFormInputDescription: function (text) {\n var el = this._super(text);\n return el;\n },\n getIndentedPanel: function () {\n var el = this._super();\n return el;\n },\n getChildEditorHolder: function () {\n var el = this._super();\n return el;\n },\n getHeaderButtonHolder: function () {\n var el = this.getButtonHolder();\n return el;\n },\n getTable: function () {\n var el = this._super();\n return el;\n },\n addInputError: function (input, text) {\n if (!input.errmsg) {\n var group = this.closest(input, '.form-control');\n input.errmsg = document.createElement('div');\n input.errmsg.setAttribute('class', 'errmsg');\n group.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = 'block';\n }\n\n input.errmsg.innerHTML = '';\n input.errmsg.appendChild(document.createTextNode(text));\n },\n removeInputError: function (input) {\n input.style.borderColor = '';\n if (input.errmsg) input.errmsg.style.display = 'none';\n },\n getProgressBar: function () {\n var max = 100, start = 0;\n\n var progressBar = document.createElement('progress');\n progressBar.setAttribute('max', max);\n progressBar.setAttribute('value', start);\n return progressBar;\n },\n updateProgressBar: function (progressBar, progress) {\n if (!progressBar) return;\n progressBar.setAttribute('value', progress);\n },\n updateProgressBarUnknown: function (progressBar) {\n if (!progressBar) return;\n progressBar.removeAttribute('value');\n }\n});\n", "JSONEditor.AbstractIconLib = Class.extend({\n mapping: {\n collapse: '',\n expand: '',\n \"delete\": '',\n edit: '',\n add: '',\n cancel: '',\n save: '',\n moveup: '',\n movedown: ''\n },\n icon_prefix: '',\n getIconClass: function(key) {\n if(this.mapping[key]) return this.icon_prefix+this.mapping[key];\n else return null;\n },\n getIcon: function(key) {\n var iconclass = this.getIconClass(key);\n \n if(!iconclass) return null;\n \n var i = document.createElement('i');\n i.className = iconclass;\n return i;\n }\n});\n", "JSONEditor.defaults.iconlibs.bootstrap2 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'chevron-down',\n expand: 'chevron-up',\n \"delete\": 'trash',\n edit: 'pencil',\n add: 'plus',\n cancel: 'ban-circle',\n save: 'ok',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'icon-'\n});\n", "JSONEditor.defaults.iconlibs.bootstrap3 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'chevron-down',\n expand: 'chevron-right',\n \"delete\": 'remove',\n edit: 'pencil',\n add: 'plus',\n cancel: 'floppy-remove',\n save: 'floppy-saved',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'glyphicon glyphicon-'\n});\n", diff --git a/dist/jsoneditor.min.js b/dist/jsoneditor.min.js index a13ca8a6c..8d252a1dc 100644 --- a/dist/jsoneditor.min.js +++ b/dist/jsoneditor.min.js @@ -1,11 +1,11 @@ -/*! JSON Editor v0.7.24 - JSON Schema -> HTML Editor +/*! JSON Editor v0.7.25 - JSON Schema -> HTML Editor * By Jeremy Dorn - https://github.com/jdorn/json-editor/ * Released under the MIT license * - * Date: 2016-02-11 + * Date: 2016-04-12 */ -!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&a.length-1 in a){for(c=0;c=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;ba.minimum:b>=a.minimum,window.math?g=window.math[a.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(b),window.math.bignumber(a.minimum)):window.Decimal&&(g=new window.Decimal(b)[a.exclusiveMinimum?"gt":"gte"](new window.Decimal(a.minimum))),g||k.push({path:e,property:"minimum",message:this.translate(a.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[a.minimum])}))}else if("string"==typeof b)a.maxLength&&(b+"").length>a.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").lengtha.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.lengtha.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var h=document.createElement(e);h.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,h),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,h.setAttribute("src",d)})}else b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("
    "+b.sceditor_instance.val()+"
    "); -window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0)});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;ih)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;af[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.lengththis.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",f=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete",this.translate("button_delete_row_title",[c.getItemTitle()])),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup",this.translate("button_move_up_title")),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown",this.translate("button_move_down_title")),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse",this.translate("button_collapse")),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display;this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"), -this.add_row_button=this.getButton(this.getItemTitle(),"add",this.translate("button_add_row_title",[this.getItemTitle()])),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton(this.translate("button_delete_last",[this.getItemTitle()]),"delete",this.translate("button_delete_last_title",[this.getItemTitle()])),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton(this.translate("button_delete_all"),"delete",this.translate("button_delete_all_title")),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;athis.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete",this.translate("button_delete_row_title_short")),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup",this.translate("button_move_up_title")),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown",this.translate("button_move_down_title")),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse",this.translate("button_collapse")),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add",this.translate("button_add_row_title",[this.getItemTitle()])),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton(this.translate("button_delete_last",[this.getItemTitle()]),"delete",this.translate("button_delete_last_title",[this.getItemTitle()])),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton(this.translate("button_delete_all"),"delete",this.translate("button_delete_all_title")),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;anull";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="
    "+d+": "+f+"
    "),c+="
  • "+f+"
  • "}),c=Array.isArray(a)?"
      "+c+"
    ":"
      "+c+"
    "}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&").replace(//g,">"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()}),this.select2.on("change",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;e=2||this.enum_options.length&&this.enumSource)){var b=c({},f.plugins.selectize);this.schema.options&&this.schema.options.selectize_options&&(b=c(b,this.schema.options.selectize_options)),this.selectize=window.jQuery(this.input).selectize(c(b,{create:!0,onChange:function(){a.onInputChange()}}))}else this.selectize=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelectize()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;eType: "+a+", Size: "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="
    ";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="Invalid data URI"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="Type: "+b+", Size: "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="
    ";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value,this.preview.appendChild(d)}this.preview.innerHTML+="
    ";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}}),f.defaults.editors.arraySelectize=f.AbstractEditor.extend({build:function(){this.title=this.theme.getFormInputLabel(this.getTitle()),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.error_holder=document.createElement("div"),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description)),this.input=document.createElement("select"),this.input.setAttribute("multiple","multiple");var a=this.theme.getFormControl(this.title,this.input,this.description);this.container.appendChild(a),this.container.appendChild(this.error_holder),window.jQuery(this.input).selectize({delimiter:!1,createOnBlur:!0,create:!0})},postBuild:function(){var a=this;this.input.selectize.on("change",function(b){a.refreshValue(),a.onChange(!0)})},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()},empty:function(a){},setValue:function(a,b){var c=this;a=a||[],Array.isArray(a)||(a=[a]),this.input.selectize.clearOptions(),this.input.selectize.clear(!0),a.forEach(function(a){c.input.selectize.addOption({text:a,value:a})}),this.input.selectize.setValue(a),this.refreshValue(b)},refreshValue:function(a){this.value=this.input.selectize.getValue()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none"}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a){var b=document.createElement("h3");return"string"==typeof a?b.textContent=a:b.appendChild(a),b},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a){var b=this._super(a);return b.style.fontWeight="bold",b},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="
    ",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a){var b=this._super(a);return b.style.fontWeight="bold",b}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="
    ",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a){var b=this._super(a);return b.style.display="block",b.style.marginBottom="3px",b.style.fontWeight="bold",b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px", -a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a){var b=document.createElement("label");return b.style.fontWeight="bold",b.style.display="block",b.textContent=a,b},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e=0){if(a.items["enum"])return"multiselect";if(f.plugins.selectize.enable&&"string"===a.items.type)return"arraySelectize"}}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}(); \ No newline at end of file +!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&a.length-1 in a){for(c=0;c=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;ba.minimum:b>=a.minimum,window.math?g=window.math[a.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(b),window.math.bignumber(a.minimum)):window.Decimal&&(g=new window.Decimal(b)[a.exclusiveMinimum?"gt":"gte"](new window.Decimal(a.minimum))),g||k.push({path:e,property:"minimum",message:this.translate(a.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[a.minimum])}))}else if("string"==typeof b)a.maxLength&&(b+"").length>a.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").lengtha.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.lengtha.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var i=document.createElement(e);i.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,i),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,i.setAttribute("src",d)})}else c=b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return g&&c&&(g===!0?c.setAttribute("download",""):this.link_watchers.push(function(a){c.setAttribute("download",g(a))})),b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1, +width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("
    "+b.sceditor_instance.val()+"
    ");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0)});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;ih)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;af[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.lengththis.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_last_row_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):(e||this.hide_delete_last_row_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0),e||this.hide_delete_all_rows_buttons?this.remove_all_rows_button.style.display="none":(this.remove_all_rows_button.style.display="",f=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete",this.translate("button_delete_row_title",[c.getItemTitle()])),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup",this.translate("button_move_up_title")),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown",this.translate("button_move_down_title")),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse",this.translate("button_collapse")),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display; +this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add",this.translate("button_add_row_title",[this.getItemTitle()])),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton(this.translate("button_delete_last",[this.getItemTitle()]),"delete",this.translate("button_delete_last_title",[this.getItemTitle()])),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton(this.translate("button_delete_all"),"delete",this.translate("button_delete_all_title")),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;athis.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_last_row_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_last_row_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0),b||this.hide_delete_all_rows_buttons?this.remove_all_rows_button.style.display="none":(this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete",this.translate("button_delete_row_title_short")),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup",this.translate("button_move_up_title")),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown",this.translate("button_move_down_title")),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse",this.translate("button_collapse")),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add",this.translate("button_add_row_title",[this.getItemTitle()])),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton(this.translate("button_delete_last",[this.getItemTitle()]),"delete",this.translate("button_delete_last_title",[this.getItemTitle()])),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton(this.translate("button_delete_all"),"delete",this.translate("button_delete_all_title")),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;anull";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="
    "+d+": "+f+"
    "),c+="
  • "+f+"
  • "}),c=Array.isArray(a)?"
      "+c+"
    ":"
      "+c+"
    "}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&").replace(//g,">"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()}),this.select2.on("change",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;e=2||this.enum_options.length&&this.enumSource)){var b=c({},f.plugins.selectize);this.schema.options&&this.schema.options.selectize_options&&(b=c(b,this.schema.options.selectize_options)),this.selectize=window.jQuery(this.input).selectize(c(b,{create:!0,onChange:function(){a.onInputChange()}}))}else this.selectize=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelectize()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;eType: "+a+", Size: "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="
    ";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="Invalid data URI"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="Type: "+b+", Size: "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="
    ";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value,this.preview.appendChild(d)}this.preview.innerHTML+="
    ";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}}),f.defaults.editors.arraySelectize=f.AbstractEditor.extend({build:function(){this.title=this.theme.getFormInputLabel(this.getTitle()),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.error_holder=document.createElement("div"),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description)),this.input=document.createElement("select"),this.input.setAttribute("multiple","multiple");var a=this.theme.getFormControl(this.title,this.input,this.description);this.container.appendChild(a),this.container.appendChild(this.error_holder),window.jQuery(this.input).selectize({delimiter:!1,createOnBlur:!0,create:!0})},postBuild:function(){var a=this;this.input.selectize.on("change",function(b){a.refreshValue(),a.onChange(!0)})},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()},empty:function(a){},setValue:function(a,b){var c=this;a=a||[],Array.isArray(a)||(a=[a]),this.input.selectize.clearOptions(),this.input.selectize.clear(!0),a.forEach(function(a){c.input.selectize.addOption({text:a,value:a})}),this.input.selectize.setValue(a),this.refreshValue(b)},refreshValue:function(a){this.value=this.input.selectize.getValue()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none"}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a){var b=document.createElement("h3");return"string"==typeof a?b.textContent=a:b.appendChild(a),b},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a){var b=this._super(a);return b.style.fontWeight="bold",b},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="
    ",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a){var b=this._super(a);return b.style.fontWeight="bold",b}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="
    ",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation6=f.defaults.themes.foundation5.extend({getIndentedPanel:function(){var a=document.createElement("div");return a.className="callout secondary",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="button-group tiny",a.style.marginBottom=0,a},getFormInputLabel:function(a){var b=this._super(a);return b.style.display="block",b},getFormControl:function(a,b,c){var d=document.createElement("div");return d.className="form-control",a&&d.appendChild(a),"checkbox"===b.type?a.insertBefore(b,a.firstChild):a?a.appendChild(b):d.appendChild(b),c&&a.appendChild(c),d},addInputError:function(a,b){if(a.group){if(a.group.className+=" error",a.errmsg)a.errmsg.style.display="",a.className="";else{var c=document.createElement("span");c.className="form-error is-visible",a.group.getElementsByTagName("label")[0].appendChild(c),a.className=a.className+" is-invalid-input",a.errmsg=c}a.errmsg.textContent=b}},removeInputError:function(a){a.errmsg&&(a.className=a.className.replace(/ is-invalid-input/g,""),a.errmsg.parentNode&&a.errmsg.parentNode.removeChild(a.errmsg))}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a){var b=this._super(a);return b.style.display="block",b.style.marginBottom="3px",b.style.fontWeight="bold", +b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a){var b=document.createElement("label");return b.style.fontWeight="bold",b.style.display="block",b.textContent=a,b},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.defaults.themes.barebones=f.AbstractTheme.extend({getFormInputLabel:function(a){var b=this._super(a);return b},getFormInputDescription:function(a){var b=this._super(a);return b},getIndentedPanel:function(){var a=this._super();return a},getChildEditorHolder:function(){var a=this._super();return a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a},getTable:function(){var a=this._super();return a},addInputError:function(a,b){if(a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e=0){if(a.items["enum"])return"multiselect";if(f.plugins.selectize.enable&&"string"===a.items.type)return"arraySelectize"}}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}(); \ No newline at end of file diff --git a/package.json b/package.json index f4ab6f36d..b3a45a26e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "json-editor", "title": "JSONEditor", "description": "JSON Schema based editor", - "version": "0.7.24", + "version": "0.7.25", "main": "dist/jsoneditor.js", "author": { "name": "Jeremy Dorn", diff --git a/src/intro.js b/src/intro.js index 25d736f31..a3048ce65 100644 --- a/src/intro.js +++ b/src/intro.js @@ -1,8 +1,8 @@ -/*! JSON Editor v0.7.24 - JSON Schema -> HTML Editor +/*! JSON Editor v0.7.25 - JSON Schema -> HTML Editor * By Jeremy Dorn - https://github.com/jdorn/json-editor/ * Released under the MIT license * - * Date: 2016-02-11 + * Date: 2016-04-12 */ /**