!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){returnfunction(e){functiont(n){if(i[n])returni[n].exports;varo=i[n]={exports:{},id:n,loaded:!1};returne[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}vari={};returnt.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";functionn(e,t,i){if(!(thisinstanceofn))thrownewError('JSONEditor constructor called without "new".');varo=c.getInternetExplorerVersion();if(-1!=o&&o<9)thrownewError("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,deletet.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,deletet.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,deletet.editable),t.onChangeJSON&&("text"===t.mode||"code"===t.mode||t.modes&&(-1!==t.modes.indexOf("text")||-1!==t.modes.indexOf("code")))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),t&&Object.keys(t).forEach(function(e){-1===n.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})),arguments.length&&this._create(e,t,i)}varo;try{o=i(!function(){vare=newError('Cannot find module "ajv"');throwe.code="MODULE_NOT_FOUND",e}())}catch(e){}varr=i(1),s=i(5),a=i(6),l=i(28),c=i(12);"undefined"==typeofPromise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onSelectionChange","onTextSelectionChange","onClassName","colorPicker","onColorPicker","timestampTag","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","maxVisibleChilds"],n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};varn=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(n)},n.prototype.destroy=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){returnthis.json},n.prototype.setText=function(e){this.json=c.parse(e)},n.prototype.getText=function(){returnJSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){returnthis.options&&this.options.name},n.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){vart,i,o=this.container,r=c.extend({},this.options),s=r.mode;r.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+r.mode+'"');try{varl="text"==a.data;if(i=this.getName(),t=this[l?"getText":"get"](),this.destroy(),c.clear(this),c.extend(this,a.mixin),this.create(o,r),this.setName(i),this[l?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(e){console.error(e)}if("function"==typeofr.onModeChange&&e!==s)try{r.onModeChange(e,s)}catch(e){console.error(e)}}catch(e){this._onError(e)}}},n.prototype.getMode=function(){returnthis.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},n.prototype.setSchema=function(e,t){if(e){vari;try{i=this.options.ajv||o({allErrors:!0,verbose:!0})}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(i){if(t){for(varnint)i.removeSchema(n),t[n]&&i.addSchema(t[n],n);this.options.s
caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){vare=document.activeElement;returne==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){(e.searchBox||newc(e)).show(e.session.getTextRange(),t)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(e,t,i){varn;if(window.Picker)n=window.Picker;elsetry{n=i(!function(){vare=newError('Cannot find module "vanilla-picker/dist/vanilla-picker"');throwe.code="MODULE_NOT_FOUND",e}())}catch(e){}e.exports=n},function(e,t,i){"use strict";varn=i(5),o=i(7),r=i(8),s=i(9),a=i(10),l=i(16),c=i(17),h=i(26),d=i(12),u=i(27),p=i(22),f=i(24),m=i(15).translate,g=i(15).setLanguages,v=i(15).setLanguage,y=document.body,b={};b.create=function(e,t){if(!e)thrownewError("No container element provided.");this.container=e,this.dom={},this.highlighter=newo,this.selection=void0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=newu(t.autocomplete)),this.options.history&&"view"!==this.options.mode&&(this.history=newr(this)),this._createFrame(),this._createTable()},b.destroy=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null)},b._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,i){n?newn({parent:e,color:t,popup:"bottom",onDone:function(e){vart=e.rgba[3],n=1===t?e.hex.substr(0,7):e.hex;i(n)}}).show():console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,onEvent:null,enableSort:!0,enableTransform:!0},e)for(vartine)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=d.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),e.onSelectionChange&&this.onSelectionChange(e.onSelectionChange),g(this.options.languages),v(this.options.language)},b.set=function(e){if(einstanceofFunction||void0===e)this.clear();else{this.content.removeChild(this.table);vart={field:this.options.name,value:e},i=newc(this,t);this._setRoot(i),this.validate();this.node.expand(!1),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.
sortDescendingTitle:"Sort the selected field in descending order",string:"Texto",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer último ação (Ctrl+Z)",validationCannotMove:"Não pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo é determinao automaticamente a partir do seu valor e pode ser texto, número, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto contém uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma coleção de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao é determinado através do seu valor, mas sempre retornara um texto.'}},r="undefined"!=typeofnavigator?navigator.language||navigator.userLanguage:void0;i=n.find(function(e){returne===r}),i||(i="en"),e.exports={_locales:n,_defs:o,_lang:i,setLanguage:function(e){if(e){vart=n.find(function(t){returnt===e});t?i=t:console.error("Language not found")}},setLanguages:function(e){if(e)for(vartine){vari=n.find(function(e){returne===t});i||n.push(t),o[t]=Object.assign({},o.en,o[t],e[t])}},translate:function(e,t,n){n||(n=i);varr=o[n][e];if(t)for(eint)r=r.replace("${"+e+"}",t[e]);returnr||e}}},function(e,t,i){"use strict";functionn(e,t){e&&(this.root=t,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked,e.appendChild(this.path),this.reset())}varo=i(10),r=i(15).translate,s=i(12);n.prototype.reset=function(){this.path.innerHTML=r("selectNode")},n.prototype.setPath=function(e){functiont(e){r.contentMenuClicked=!1,s.addClassName(r.path,"show-all"),r.path.style.width=r.path.parentNode.getBoundingClientRect().width-10+"px",r.path.onblur=function(){if(r.contentMenuClicked)returnr.contentMenuClicked=!1,voidr.path.focus();s.removeClassName(r.path,"show-all"),r.path.onblur=void0,r.path.style.width="",r.setPath(e)}}functioni(e){this.selectionCallback&&this.selectionCallback(e)}functionn(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}varr=this;this.path.innerHTML="",e&&e.length&&e.forEach(function(s,a){varl,c=document.createElement("span");if(c.className="jsoneditor-treepath-element",c.innerText=s.name,c.onclick=i.bind(r,s),r.path.appendChild(c),s.children.length&&(l=document.createElement("span"),l.className="jsoneditor-treepath-seperator",l.innerHTML="►",l.onclick=function(){r.contentMenuClicked=!0;vart=[];s.children.forEach(function(i){t.push({text:i.name,className:"jsoneditor-type-modes"+(e[a+1]+1&&e[a+1].name===i.name?" jsoneditor-selected":""),click:n.bind(r,s,i.name)})}),newo(t).show(l,r.root,!0)},r.path.appendChild(l)),a===e.length-1){varh=(l||c).getBoundingClientRect().right;if(r.path.offsetWidth<h&&(r.path.scrollLeft=h),r.path.scrollLeft){vard=document.createElement("span");d.className="jsoneditor-treepath-show-all-btn",d.title="show all path",d.innerHTML="...",d.onclick=t.bind(r,e),r.path.insertBefore(d,r.path.firstChild)}}})},n.prototype.onSectionSelected=function(e){"function"==typeofe&&(this.selectionCallback=e)},n.prototype.onContextMenuItemSelected=function(e){"function"==typeofe&&(this.contextMenuCallback=e)},e.exports=n},function(e,t,i){"use strict";functionn(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&tinstanceofObject?(this.setField(t.field,t.fieldEditable),"value"int&&this.setValue(t.value,t.type),"internalValue"int&&this.setInternalValue(t.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=f.debounce(this._onChangeValue.bind(this),n.prototype.DEBOUNCE_INTERVAL),this._debounce
vari=this._lookaheadToken(0),n=newError("Unexpected token type: "+i.type+", value: "+i.value);thrown.name="ParserError",n}returnt},_loadTokens:function(e){vart=newc,i=t.tokenize(e);i.push({type:"EOF",value:"",start:e.length}),this.tokens=i},expression:function(e){vart=this._lookaheadToken(0);this._advance();for(vari=this.nud(t),n=this._lookahead(0);e<j[n];)this._advance(),i=this.led(n,i),n=this._lookahead(0);returni},_lookahead:function(e){returnthis.tokens[this.index+e].type},_lookaheadToken:function(e){returnthis.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){vart,i,n;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":varo={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))thrownewError("Quoted identifier not allowed for function names.");returno;case"Not":returni=this.expression(j.Not),{type:"NotExpression",children:[i]};case"Star":returnt={type:"Identity"},i=null,i="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(j.Star),{type:"ValueProjection",children:[t,i]};case"Filter":returnthis.led(e.type,{type:"Identity"});case"Lbrace":returnthis._parseMultiselectHash();case"Flatten":returnt={type:"Flatten",children:[{type:"Identity"}]},i=this._parseProjectionRHS(j.Flatten),{type:"Projection",children:[t,i]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(i=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},i)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),i=this._parseProjectionRHS(j.Star),{type:"Projection",children:[{type:"Identity"},i]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":returnn=this.expression(j.Expref),{type:"ExpressionReference",children:[n]};case"Lparen":for(varr=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(n={type:"Current"},this._advance()):n=this.expression(0),r.push(n);returnthis._match("Rparen"),r[0];default:this._errorToken(e)}},led:function(e,t){vari;switch(e){case"Dot":varn=j.Dot;return"Star"!==this._lookahead(0)?(i=this._parseDotRHS(n),{type:"Subexpression",children:[t,i]}):(this._advance(),i=this._parseProjectionRHS(n),{type:"ValueProjection",children:[t,i]});case"Pipe":returni=this.expression(j.Pipe),{type:"Pipe",children:[t,i]};case"Or":returni=this.expression(j.Or),{type:"OrExpression",children:[t,i]};case"And":returni=this.expression(j.And),{type:"AndExpression",children:[t,i]};case"Lparen":for(varo,r=t.name,s=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(o={type:"Current"},this._advance()):o=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),s.push(o);returnthis._match("Rparen"),{type:"Function",name:r,children:s};case"Filter":vara=this.expression(0);returnthis._match("Rbracket"),i="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(j.Filter),{type:"FilterProjection",children:[t,i,a]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(j.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":returnthis._parseComparator(t,e);case"Lbracket":varl=this._lookaheadToken(0);return"Number"===l.type||"Colon"===l.type?(i=this._parseIndexExpression(),this._projectIfSlice(t,i)):(this._match("Star"),this._match("Rbracket"),i=this._parseProjectionRHS(j.Star),{type:"Projection",children:[t,i]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){vart=this._lookaheadToken(0),i=newError("Expected "+e+", got: "+t.type);throwi.name="ParserError",i}this._advance()},_errorToken:function(e){vart=newError("Invalid token ("+e.type+'): "'+e.value+'"');throwt.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))returnthis._parseSliceExpression();vare={type:"Index",value:this._lookaheadToken(0).value};returnthis._advance(),this._match("Rbr