!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;varr=i[n]={exports:{},id:n,loaded:!1};returne[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.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".');varr=c.getInternetExplorerVersion();if(-1!=r&&r<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)}varr;try{r=i(1)}catch(e){}varo=i(51),s=i(57),a=i(59),l=i(81),c=i(65);"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","onValidate","onSelectionChange","onTextSelectionChange","colorPicker","onColorPicker","timestampTag","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","languages","language","enableSort","enableTransform"],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,r=this.container,o=c.extend({},this.options),s=o.mode;o.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+o.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(r,o),this.setName(i),this[l?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(e){console.error(e)}if("function"==typeofo.onModeChange&&e!==s)try{o.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||r({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.schemaRefs=t}this.validateSchema=i.compile(e),this.options.schema=e,this.validate()}this.refresh()}elsethis.validateSchema=null,this.options.schema=
return"function"==typeoft?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){returne}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)thrownewTypeError;for(vart="";g(e,t);)t+="?";e[t]=!0;vari=g(e,t);returndeletee[t],i}),!Object.keys){varF=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],S=x.length;for(var_in{toString:null})F=!1;Object.keys=function(e){if("object"!=typeofe&&"function"!=typeofe||null===e)thrownewTypeError("Object.keys called on a non-object");vart=[];for(variine)g(e,i)&&t.push(i);if(F)for(varn=0,r=S;n<r;n++){varo=x[n];g(e,o)&&t.push(o)}returnt}}Date.now||(Date.now=function(){return(newDate).getTime()});vark="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim||k.trim()){k="["+k+"]";varD=newRegExp("^"+k+k+"*"),$=newRegExp(k+k+"*$");String.prototype.trim=function(){returnString(this).replace(D,"").replace($,"")}}varB=function(e){if(null==e)thrownewTypeError("can't convert "+e+" to object");returnObject(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";if(t.getDocumentHead=function(e){returne||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){returndocument.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(vari=e.className.split(/\s+/g);;){varn=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(vari=e.className.split(/\s+/g),n=!0;;){varr=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}returnn&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){vari,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}elseif(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))returnnull;varr;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?(r=n.createStyleSheet(),r.cssText=e,i&&(r.owningElement.id=i)):(r=t.createElement("style"),r.appendChild(n.createTextNode(e)),i&&(r.id=i),t.getDocumentHead(n).appendChild(r))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{varn=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){returnparseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){returnparseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){vari=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";varn=t.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);varo=e.documentElement;o.appendChild(n);vars=i.offsetWidth;r.overflow="scroll";vara=i.offsetWidth;returns==a&&(a=n.clientWidth),o.removeChild(n),s-a},"undefined"==typeofdocument)returnvoid(t.importCssString=function(){});void0!==window.pageYOffset?(t.getPageScrollTop=function(){returnwindow.pageYOffset},t.getPageScrollLeft=function(){returnwindow.pageXOffset}):(t.ge
;if(t.length)returnt;b(),y()}functionm(e,t){g(e,t,v())}functiong(e,t,i){C[e]=C[e]||{},C[e][t]=i}functionv(){return{line:A,column:E,pos:F}}functiony(){thrownewSyntaxError("Unexpected token "+e[F]+" in JSON at position "+F)}functionw(){u(),y()}functionb(){if(F>=e.length)thrownewSyntaxError("Unexpected end of JSON input")}varC={},A=0,E=0,F=0;return{data:t("",!0),pointers:C}},t.stringify=function(e,t,o){functions(e,t,h){switch(c(h,"value"),typeofe){case"number":case"boolean":a(""+e);break;case"string":a(n(e));break;case"object":null===e?a("null"):"function"==typeofe.toJSON?a(n(e.toJSON())):Array.isArray(e)?function(){if(e.length){a("[");for(varn=t+1,r=0;r<e.length;r++)r&&a(","),l(n),s(i(e[r])?e[r]:null,n,h+"/"+r);l(t),a("]")}elsea("[]")}():function(){vard=Object.keys(e);if(d.length){a("{");for(varu=t+1,f=0;f<d.length;f++){varp=d[f],m=e[p];if(i(m)){f&&a(",");varg=h+"/"+r(p);l(u),c(g,"key"),a(n(p)),c(g,"keyEnd"),a(":"),o&&a(" "),s(m,u,g)}}l(t),a("}")}elsea("{}")}()}c(h,"valueEnd")}functiona(e){w+=e.length,b+=e.length,g+=e}functionl(e){if(o){for(g+="\n"+h(e,o),y++,w=0;e--;)f?(y+=f,w=u):w+=u,b+=d;b+=1}}functionc(e,t){v[e]=v[e]||{},v[e][t]={line:y,column:w,pos:b}}functionh(e,t){returnArray(e+1).join(t)}if(i(e)){vard,u,f=0;switch(typeofo){case"number":varp=o>10?10:o<0?0:Math.floor(o);o=p&&h(p," "),d=p,u=p;break;case"string":o=o.slice(0,10),d=0,u=0;for(varm=0;m<o.length;m++){switch(o[m]){case" ":u++;break;case"\t":u+=4;break;case"\r":u=0;break;case"\n":u=0,f++;break;default:thrownewError("whitespace characters not allowed in JSON")}d++}break;default:o=void0}varg="",v={},y=0,w=0,b=0;returns(e,0,""),{json:g,pointers:v}}};vara=["number","boolean","string","object"],l=/"|\\/g,c=/[\b]/g,h=/\f/g,d=/\n/g,u=/\r/g,f=/\t/g,p=/~/g,m=/\//g},function(e,t){"use strict";vari,n=["en","pt-BR"],r={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",collapseAll:"Collapse all fields",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+ClickorCtrl+Ente
this.isInverted=!0):(s.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=s.rect(this.tree)},v.prototype.getOptionByIndex=function(e){returnthis.options[e]},v.prototype.getOptionByValue=function(e){for(vart=!1,i=0,n=this.options.length;i<n;i++)if(this.options[i].value.trim()===e.toString().trim()){t=this.options[i];break}returnt},e.exports=v},function(e,t,i){"use strict";functionn(e,t,i,n){for(varo={code:{text:"Code",title:"Switch to code highlighter",click:function(){n("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){n("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){n("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){n("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){n("view")}}},s=[],a=0;a<t.length;a++){varl=t[a],c=o[l];if(!c)thrownewError('Unknown mode "'+l+'"');c.className="jsoneditor-type-modes"+(i==l?" jsoneditor-selected":""),s.push(c)}varh=o[i];if(!h)thrownewError('Unknown mode "'+i+'"');vard=h.text,u=document.createElement("button");u.type="button",u.className="jsoneditor-modes jsoneditor-separator",u.innerHTML=d+" ▾",u.title="Switch editor mode",u.onclick=function(){newr(s).show(u,e)};varf=document.createElement("div");f.className="jsoneditor-modes",f.style.position="relative",f.appendChild(u),e.appendChild(f),this.dom={container:e,box:u,frame:f}}varr=i(63);n.prototype.focus=function(){this.dom.box.focus()},n.prototype.destroy=function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null},e.exports=n},function(e,t){"use strict";functioni(e){functiont(e){vart,i;document.createRange?(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t)):document.selection&&(t=document.body.createTextRange(),t.moveToElementText(e),t.collapse(!1),t.select())}functioni(e){returnvoid0===a&&(a=document.createElement("span"),a.style.visibility="hidden",a.style.position="fixed",a.style.outline="0",a.style.margin="0",a.style.padding="0",a.style.border="0",a.style.left="0",a.style.whiteSpace="pre",a.style.fontSize=n,a.style.fontFamily=r,a.style.fontWeight="normal",document.body.appendChild(a)),a.innerHTML=String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),a.getBoundingClientRect().right}e=e||{},e.confirmKeys=e.confirmKeys||[39,35,9],e.caseSensitive=e.caseSensitive||!1;varn="",r="",o=document.createElement("div");o.style.position="relative",o.style.outline="0",o.style.border="0",o.style.margin="0",o.style.padding="0";vars=document.createElement("div");s.className="autocomplete dropdown",s.style.position="absolute",s.style.visibility="hidden";vara,l,c={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:o,show:function(e,t,i){this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""==n&&(n=window.getComputedStyle(e).getPropertyValue("font-size")),""==r&&(r=window.getComputedStyle(e).getPropertyValue("font-family"));e.getBoundingClientRect().right,e.getBoundingClientRect().left;s.style.marginLeft="0",s.style.marginTop=e.getBoundingClientRect().height+"px",this.options=i,this.element!=e&&(this.element=e,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=e.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){this.element.focus()}.bind(this),this.element.addEventListener&&(this.element.removeEventL