(t)
| 32 | },7907:function(e,t,i){"use strict";i.d(t,{Iu:function(){return h},cC:function(){return c},m0:function(){return l}});i(4987);var o={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",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)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' después de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregará",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el menú de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + Mayús + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:"Haga clic para expandir/contraer este campo (Ctrl + E). \n Ctrl+Clic para expandir/contraer incluyendo todos los niños.",formatTitle:"Formatee los datos JSON, con la sangría y los avances de línea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+Mayús+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notación JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de búsqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar más",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dirección:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la última acción (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de sí mismo.",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Tipo de campo "objeto". Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz". Una matriz contiene una colección ordenada de valores.',stringType:'Tipo de campo "cadena". El tipo de campo no se determina a partir del valor, pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Codigo",modeCodeTitle:"Cambiar al resaltador de código",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Arbol",modeTreeTitle:"Cambiar al editor de árbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de árbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no validas",containsInvalidItems:"Contiene items no validos"},"zh-CN":{array:"数组",auto:"自动",appendText:"追加",appendTitle:"在此字段后追加一个类型为“auto”的新字段 (Ctrl+Shift+Ins)",appendSubmenuTitle:"选择要追加的字段类型",appendTitleAuto:"追加类型为“auto”的新字段 (Ctrl+Shift+Ins)",ascending:"升序",ascendingTitle:"升序排列${type}的子节点",actionsMenu:"点击打开动作菜单(Ctrl+M)",cannotParseFieldError:"无法将字段解析为JSON",cannotParseValueError:"无法将值解析为JSON",collapseAll:"缩进所有字段",compactTitle:"压缩JSON数据,删除所有空格 (Ctrl+Shift+I)",descending:"降序",descendingTitle:"降序排列${type}的子节点",drag:"拖拽移动该节点(Alt+Shift+Arrows)",duplicateKey:"重复键",duplicateText:"复制",duplicateTitle:"复制选中字段(Ctrl+D)",duplicateField:"复制该字段(Ctrl+D)",duplicateFieldError:"重复的字段名称",empty:"清空",expandAll:"展开所有字段",expandTitle:"点击 展开/收缩 该字段(Ctrl+E). \nCtrl+Click 展开/收缩 包含所有子节点.",formatTitle:"使用适当的缩进和换行符格式化JSON数据 (Ctrl+I)",insert:"插入",insertTitle:"在此字段前插入类型为“auto”的新字段 (Ctrl+Ins)",insertSub:"选择要插入的字段类型",object:"对象",ok:"Ok",redo:"重做 (Ctrl+Shift+Z)",removeText:"移除",removeTitle:"移除选中字段 (Ctrl+Del)",removeField:"移除该字段 (Ctrl+Del)",repairTitle:"修复JSON:修复引号和转义符,删除注释和JSONP表示法,将JavaScript对象转换为JSON。",selectNode:"选择一个节点...",showAll:"展示全部",showMore:"展示更多",showMoreStatus:"显示${totalChilds}的${visibleChilds}项目.",sort:"排序",sortTitle:"排序${type}的子节点",sortTitleShort:"内容排序",sortFieldLabel:"字段:",sortDirectionLabel:"方向:",sortFieldTitle:"选择用于对数组或对象排序的嵌套字段",sortAscending:"升序排序",sortAscendingTitle:"按照该字段升序排序",sortDescending:"降序排序",sortDescendingTitle:"按照该字段降序排序",string:"字符串",transform:"变换",transformTitle:"筛选,排序,或者转换${type}的子节点",transformTitleShort:"筛选,排序,或者转换内容",extract:"提取",extractTitle:"提取这个 ${type}",transformQueryTitle:"输入JMESPath查询",transformWizardLabel:"向导",transformWizardFilter:"筛选",transformWizardSortBy:"排序",transformWizardSelectFields:"选择字段",transformQueryLabel:"查询",transformPreviewLabel:"预览",type:"类型",typeTitle:"更改字段类型",openUrl:"Ctrl+Click 或者 Ctrl+Enter 在新窗口打开链接",undo:"撤销上次动作 (Ctrl+Z)",validationCannotMove:"无法将字段移入其子节点",autoType:'字段类型 "auto". 字段类型由值自动确定 可以为 string,number,boolean,或者 null.',objectType:'字段类型 "object". 对象包含一组无序的键/值对.',arrayType:'字段类型 "array". 数组包含值的有序集合.',stringType:'字段类型 "string". 字段类型由值自动确定,但始终作为字符串返回.',modeCodeText:"代码",modeCodeTitle:"切换至代码高亮",modeFormText:"表单",modeFormTitle:"切换至表单编辑",modeTextText:"文本",modeTextTitle:"切换至文本编辑",modeTreeText:"树",modeTreeTitle:"切换至树编辑",modeViewText:"视图",modeViewTitle:"切换至树视图",modePreviewText:"预览",modePreviewTitle:"切换至预览模式",examples:"例子",default:"缺省",containsInvalidProperties:"包含无效的属性",containsInvalidItems:"包含无效项目"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de ações (Ctrl+M)",cannotParseFieldError:"Não é possível analisar o campo no JSON",cannotParseValueError:"Não é possível analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espaços em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:"Clique para expandir/encolher este campo (Ctrl+E). \nCtrl+Click para expandir/encolher incluindo todos os filhos.",formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova comentários e notação JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um nódulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direção:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conteúdos",transformQueryTitle:"Insira uma expressão JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Expressão",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer último ação (Ctrl+Z)",validationCannotMove:"Não pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo é determinao automaticamente a partir do seu valor e pode ser texto, número, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto contém uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma coleção de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao é determinado através do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Contém propriedades inválidas",containsInvalidItems:"Contém itens inválidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alanın altına 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alanın tipini seç",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'ın alt tiplerini artan düzende sırala",actionsMenu:"Aksiyon menüsünü açmak için tıklayın (Ctrl+M)",collapseAll:"Tüm alanları kapat",descending:"Azalan",descendingTitle:"${type}'ın alt tiplerini azalan düzende sırala",drag:"Bu alanı taşımak için sürükleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"Aşağıya kopyala",duplicateTitle:"Seçili alanlardan bir daha oluştur (Ctrl+D)",duplicateField:"Bu alandan bir daha oluştur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayrıştırılamıyor",cannotParseValueError:"JSON'a değer ayrıştırılamıyor",empty:"boş",expandAll:"Tüm alanları aç",expandTitle:"Bu alanı açmak/kapatmak için tıkla (Ctrl+E). \nAlt alanlarda dahil tüm alanları açmak için Ctrl+Click ",insert:"Ekle",insertTitle:"Bu alanın üstüne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alanın tipini seç",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kaldır",removeTitle:"Seçilen alanları kaldır (Ctrl+Del)",removeField:"Bu alanı kaldır (Ctrl+Del)",selectNode:"Bir nesne seç...",showAll:"tümünü göster",showMore:"daha fazla göster",showMoreStatus:"${totalChilds} alanın ${visibleChilds} alt alanları gösteriliyor",sort:"Sırala",sortTitle:"${type}'ın alt alanlarını sırala",sortTitleShort:"İçerikleri sırala",sortFieldLabel:"Alan:",sortDirectionLabel:"Yön:",sortFieldTitle:"Diziyi veya nesneyi sıralamak için iç içe geçmiş alanı seçin",sortAscending:"Artan",sortAscendingTitle:"Seçili alanı artan düzende sırala",sortDescending:"Azalan",sortDescendingTitle:"Seçili alanı azalan düzende sırala",string:"Karakter Dizisi",transform:"Dönüştür",transformTitle:"${type}'ın alt alanlarını filtrele, sırala veya dönüştür",transformTitleShort:"İçerikleri filterele, sırala veya dönüştür",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"Sırala",transformWizardSelectFields:"Alanları seç",transformQueryLabel:"Sorgu",transformPreviewLabel:"Önizleme",type:"Tip",typeTitle:"Bu alanın tipini değiştir",openUrl:"URL'i yeni bir pencerede açmak için Ctrl+Click veya Ctrl+Enter",undo:"Son değişikliği geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak taşınamıyor",autoType:'Alan tipi "otomatik". Alan türü otomatik olarak değerden belirlenirve bir dize, sayı, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, sıralanmamış bir anahtar / değer çifti kümesi içerir.',arrayType:'Alan tipi "dizi". Bir dizi, düzenli değerler koleksiyonu içerir.',stringType:'Alan tipi "karakter dizisi". Alan türü değerden belirlenmez,ancak her zaman karakter dizisi olarak döndürülür.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulayıcıya geç",modeFormText:"Form",modeFormTitle:"Form düzenleyiciye geç",modeTextText:"Metin",modeTextTitle:"Düz metin düzenleyiciye geç",modeTreeText:"Ağaç",modeTreeTitle:"Ağaç düzenleyiciye geç",modeViewText:"Görünüm",modeViewTitle:"Ağaç görünümüne geç",examples:"Örnekler",default:"Varsayılan",containsInvalidProperties:"Geçersiz özellikler içeriyor",containsInvalidItems:"Geçersiz öğeler içeriyor"},ja:{array:"配列",auto:"オート",appendText:"追加",appendTitle:'次のフィールドに"オート"のフィールドを追加 (Ctrl+Shift+Ins)',appendSubmenuTitle:"追加するフィールドの型を選択してください",appendTitleAuto:'"オート"のフィールドを追加 (Ctrl+Shift+Ins)',ascending:"昇順",ascendingTitle:"${type}の子要素を昇順に並べ替え",actionsMenu:"クリックしてアクションメニューを開く (Ctrl+M)",collapseAll:"すべてを折りたたむ",descending:"降順",descendingTitle:"${type}の子要素を降順に並べ替え",drag:"ドラッグして選択中のフィールドを移動 (Alt+Shift+Arrows)",duplicateKey:"複製キー",duplicateText:"複製",duplicateTitle:"選択中のフィールドを複製 (Ctrl+D)",duplicateField:"選択中のフィールドを複製 (Ctrl+D)",duplicateFieldError:"フィールド名が重複しています",cannotParseFieldError:"JSONのフィールドを解析できません",cannotParseValueError:"JSONの値を解析できません",empty:"空",expandAll:"すべてを展開",expandTitle:"クリックしてフィールドを展開/折りたたむ (Ctrl+E). \nCtrl+Click ですべての子要素を展開/折りたたむ",insert:"挿入",insertTitle:"選択中のフィールドの前に新しいフィールドを挿入 (Ctrl+Ins)",insertSub:"挿入するフィールドの型を選択",object:"オブジェクト",ok:"実行",redo:"やり直す (Ctrl+Shift+Z)",removeText:"削除",removeTitle:"選択中のフィールドを削除 (Ctrl+Del)",removeField:"選択中のフィールドを削除 (Ctrl+Del)",selectNode:"ノードを選択...",showAll:"すべてを表示",showMore:"もっと見る",showMoreStatus:"${totalChilds}個のアイテムのうち ${visibleChilds}個を表示しています。",sort:"並べ替え",sortTitle:"${type}の子要素を並べ替え",sortTitleShort:"並べ替え",sortFieldLabel:"フィールド:",sortDirectionLabel:"順序:",sortFieldTitle:"配列またはオブジェクトを並び替えるためのフィールドを選択",sortAscending:"昇順",sortAscendingTitle:"選択中のフィールドを昇順に並び替え",sortDescending:"降順",sortDescendingTitle:"選択中のフィールドを降順に並び替え",string:"文字列",transform:"変換",transformTitle:"${type}の子要素をフィルター・並び替え・変換する",transformTitleShort:"内容をフィルター・並び替え・変換する",extract:"抽出",extractTitle:"${type}を抽出",transformQueryTitle:"JMESPathクエリを入力",transformWizardLabel:"ウィザード",transformWizardFilter:"フィルター",transformWizardSortBy:"並び替え",transformWizardSelectFields:"フィールドを選択",transformQueryLabel:"クエリ",transformPreviewLabel:"プレビュー",type:"型",typeTitle:"選択中のフィールドの型を変更",openUrl:"Ctrl+Click または Ctrl+Enter で 新規ウィンドウでURLを開く",undo:"元に戻す (Ctrl+Z)",validationCannotMove:"子要素に移動できません ",autoType:"オート: フィールドの型は値から自動的に決定されます。 (文字列・数値・ブール・null)",objectType:"オブジェクト: オブジェクトは順序が決まっていないキーと値のペア組み合わせです。",arrayType:"配列: 配列は順序が決まっている値の集合体です。",stringType:"文字列: フィールド型は値から決定されませんが、常に文字列として返されます。",modeCodeText:"コードモード",modeCodeTitle:"ハイライトモードに切り替え",modeFormText:"フォームモード",modeFormTitle:"フォームモードに切り替え",modeTextText:"テキストモード",modeTextTitle:"テキストモードに切り替え",modeTreeText:"ツリーモード",modeTreeTitle:"ツリーモードに切り替え",modeViewText:"ビューモード",modeViewTitle:"ビューモードに切り替え",modePreviewText:"プレビュー",modePreviewTitle:"プレビューに切り替え",examples:"例",default:"デフォルト",containsInvalidProperties:"無効なプロパティが含まれています",containsInvalidItems:"無効なアイテムが含まれています"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' après ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"Sélectionner le type du champ à ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"Déplacer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la clé",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs sélectionnés (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible à parser en JSON",cannotParseValueError:"Valeur impossible à parser en JSON",empty:"vide",expandAll:"Étendre",expandTitle:"Étendre/regrouper ce champ (Ctrl+E). \nCtrl+Click pour étendre/regrouper avec tous les champs.",insert:"Insérer",insertTitle:"Insérer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"Sélectionner le type de champ à insérer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs sélectionnés (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"Résultat suivant (Enter)",searchPreviousResultTitle:"Résultat précédent (Shift + Enter)",selectNode:"Sélectionner un nœud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} éléments affichés de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"Sélectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs sélectionnés par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs sélectionnés par ordre descendant",string:"Chaîne",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requête JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"Sélectionner les champs",transformQueryLabel:"Requête",transformPreviewLabel:"Prévisualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fenêtre",undo:"Annuler la dernière action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement déterminé en fonction de la valeur et peut être de type "chaîne", "nombre", "booléen" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonné de paires clé/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonnée de valeurs.',stringType:'Champ de type "chaîne". Ce type de champ n\'est pas déterminé en fonction de la valeur, mais retourne systématiquement une chaîne de caractères.',modeEditorTitle:"Changer mode d'édition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer éditeur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer éditeur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Prévisualisation",modePreviewTitle:"Activer mode prévisualiser",examples:"Exemples",default:"Défaut",containsInvalidProperties:"Contient des propriétés non valides",containsInvalidItems:"Contient des éléments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anhängen",appendTitle:"Fügen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"Wählen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzufügen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum Öffnen des Aktionsmenüs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schlüssel",duplicateText:"Duplikat",duplicateTitle:"Ausgewählte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:"Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E). \nStrg+Klicken Sie, um dieses Feld einschließlich aller Elemente zu erweitern/zu kollabieren.",formatTitle:"JSON-Daten mit korrekter Einrückung und Zeilenvorschüben formatieren (Strg+\\)",insert:"einfügen",insertTitle:"Fügen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"Wählen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgewählte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anführungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"Nächstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"Wählen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"Wählen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgewählte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgewählte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder auswählen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie ein.",typeTitle:"Ändern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu öffnen",undo:"Letzte Aktion rückgängig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enthält eine ungeordnete Menge von Schlüssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enthält eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zurückgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor für einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardmäßig",containsInvalidProperties:"Enthält ungültige Eigenschaften",containsInvalidItems:"Enthält ungültige Elemente"},ru:{array:"Массив",auto:"Авто",appendText:"Добавить",appendTitle:"Добавить новое поле с типом 'авто' после этого поля (Ctrl+Shift+Ins)",appendSubmenuTitle:"Выбрать тип поля для добавления",appendTitleAuto:"Добавить новое поле с типом 'авто' (Ctrl+Shift+Ins)",ascending:"По возрастанию",ascendingTitle:"Сортировать ${type} по возрастанию",actionsMenu:"Нажмите для открытия меню действий (Ctrl+M)",cannotParseFieldError:"Невозможно преобразовать поле в JSON",cannotParseValueError:"Невозможно преобразовать значение в JSON",collapseAll:"Свернуть все",compactTitle:"Минификация JSON (Ctrl+Shift+I)",descending:"По убыванию",descendingTitle:"Сортировать ${type} по убыванию",drag:"Потяните для перемещения этого поля (Alt+Shift+Arrows)",duplicateKey:"повторяющийся ключ",duplicateText:"Дублировать",duplicateTitle:"Дублирование полей (Ctrl+D)",duplicateField:"Дублировать поле (Ctrl+D)",duplicateFieldError:"Дублирование названия поля",empty:"пустой",expandAll:"Развернуть все",expandTitle:"Нажмите для раскрытия/скрытия поля (Ctrl+E)\nили Ctrl+Click для раскрытия/скрытия всех потомков.",formatTitle:"Форматирование JSON (Ctrl+I)",insert:"Вставить",insertTitle:"Вставить новое поле с типом 'авто' перед этим полем (Ctrl+Ins)",insertSub:"Выбрать тип поля для вставки",object:"Объект",ok:"ОК",redo:"Повторить (Ctrl+Shift+Z)",removeText:"Удалить",removeTitle:"Удалить выбранные поля (Ctrl+Del)",removeField:"Удалить поле (Ctrl+Del)",repairTitle:"Восстановите JSON: исправьте кавычки и escape-символы, удалите комментарии и нотацию JSONP, модифицируйте объекты JavaScript в JSON.",searchTitle:"Поиск",searchNextResultTitle:"Следующий результат (Enter)",searchPreviousResultTitle:"Предыдущий результат (Shift + Enter)",selectNode:"Выбор узла...",showAll:"показать все",showMore:"больше",showMoreStatus:"${visibleChilds} из ${totalChilds}",sort:"Сортировка",sortTitle:"Сортировка потомков типа ${type}",sortTitleShort:"Сортировка содержимого",sortFieldLabel:"Поле:",sortDirectionLabel:"Направление:",sortFieldTitle:"Выберите поле для сортировки массива или объекта",sortAscending:"По возрастанию",sortAscendingTitle:"Сортировка выбранного поря по возрастанию",sortDescending:"По убыванию",sortDescendingTitle:"Сортировка выбранного поря по убыванию",string:"Строка",transform:"Модификация",transformTitle:"Фильтрация, сортировка или модификация данных типа ${type}",transformTitleShort:"Фильтрация, сортировка или модификация данных",extract:"Извлечение",extractTitle:"Извлечь тип ${type}",transformQueryTitle:"Введите JMESpath запрос",transformWizardLabel:"Мастер",transformWizardFilter:"Фильтр",transformWizardSortBy:"Сортировка",transformWizardSelectFields:"Поля",transformQueryLabel:"Запрос",transformPreviewLabel:"Просмотр",type:"Тип",typeTitle:"Изменить тип этого поля",openUrl:"Ctrl+Click или Ctrl+Enter для открытия url в новом окне",undo:"Отменить (Ctrl+Z)",validationCannotMove:"Поле не может быть перемещено в потомка",autoType:"Тип поля автоматически определяется по значению и может быть строкой, числом, логическим значением или null.",objectType:"Объект содержит неупорядоченный набор пар ключ/значение.",arrayType:"Массив содержит упорядоченный набор значений.",stringType:"Тип поля не определяется из значения, но всегда возвращается как строка.",modeEditorTitle:"Переключение режима редактора",modeCodeText:"Код",modeCodeTitle:"Переключить в режим редактора кода",modeFormText:"Форма",modeFormTitle:"Переключить в режим формы",modeTextText:"Текст",modeTextTitle:"Переключить в режим редактора текста",modeTreeText:"Дерево",modeTreeTitle:"Переключить в режим редактора дерева",modeViewText:"Просмотр дерева",modeViewTitle:"Переключить в режим просмотра дерева",modePreviewText:"Просмотр",modePreviewTitle:"Переключить в режим просмотра",examples:"Примеры",default:"По умолчанию",containsInvalidProperties:"Содержит недопустимые свойства",containsInvalidItems:"Содержит недопустимые элементы"},ko:{array:"배열",auto:"자동",appendText:"추가",appendTitle:'선택한 요소 아래에 "자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',appendSubmenuTitle:"추가할 요소의 유형을 선택해주세요.",appendTitleAuto:'"자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',ascending:"오름차순",ascendingTitle:"선택한 ${type}의 하위 요소를 오름차순 정렬합니다.",actionsMenu:"메뉴 열기 (Ctrl + M)",cannotParseFieldError:"JSON의 요소를 해석할 수 없습니다.",cannotParseValueError:"JSON의 값을 해석할 수 없습니다.",collapseAll:"모두 접기",compactTitle:"모든 공백을 제거하여 JSON 데이터를 작게 만듭니다. (Ctrl + Shift + I)",descending:"내림차순",descendingTitle:"선택한 ${type}의 하위 요소를 내림차순으로 정렬",drag:"드래그하여 요소를 이동합니다. (Alt + Shift + Arrows)",duplicateKey:"복제키",duplicateText:"복제",duplicateTitle:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateField:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateFieldError:"요소 이름이 중복되었습니다.",empty:"비어있음",expandAll:"모두 열기",expandTitle:"클릭하여 요소를 열거나 닫습니다. (Ctrl + E) \nCtrl + Click으로 모든 하위 요소를 열거나 닫습니다.",formatTitle:"적절한 들여쓰기 및 줄바꿈으로 JSON 데이터를 정형화합니다. (Ctrl + I)",insert:"삽입",insertTitle:"선택한 요소 위에 새요소를 삽입합니다. (Ctrl + Ins)",insertSub:"삽입할 요소의 유형을 선택해주세요.",object:"객체",ok:"확인",redo:"다시 실행 (Ctrl + Shift + Z)",removeText:"삭제",removeTitle:"선택한 요소를 삭제합니다. (Ctrl + Del)",removeField:"선택한 요소를 삭제합니다. (Ctrl + Del)",repairTitle:"JSON 교정: JSON 내의 주석과 JSONP 표기법을 지우고 따옴표와 이스케이프 문자를 수정합니다.",searchTitle:"요소 또는 값 찾기",searchNextResultTitle:"다음으로 찾기 (Enter)",searchPreviousResultTitle:"이전으로 찾기 (Shift + Enter)",selectNode:"요소를 선택해주세요...",showAll:"모두보기",showMore:"더보기",showMoreStatus:"${totalChilds} 개의 항목 중 ${visibleChilds} 개를 표시합니다.",sort:"정렬",sortTitle:"선택한 ${type}의 하위 요소를 정렬합니다.",sortTitleShort:"정렬",sortFieldLabel:"요소:",sortDirectionLabel:"순서:",sortFieldTitle:"배열이나 객체를 정렬하는 요소를 선택해주세요.",sortAscending:"오름차순",sortAscendingTitle:"선택한 요소를 오름차순으로 정렬합니다.",sortDescending:"내림차순",sortDescendingTitle:"선택한 요소를 내림차순으로 정렬합니다.",string:"문자",transform:"변환",transformTitle:"선택한 ${type}의 하위 요소를 필터하거나 정렬 또는 변환합니다.",transformTitleShort:"내용을 필터하거나 정렬 또는 변환합니다.",extract:"추출",extractTitle:"선택한 ${type}의 값을 최상위에 위치시킵니다.",transformQueryTitle:"JMESPath 쿼리를 입력해주세요.",transformWizardLabel:"마법사",transformWizardFilter:"필터",transformWizardSortBy:"정렬",transformWizardSelectFields:"요소를 선택해주세요.",transformQueryLabel:"쿼리",transformPreviewLabel:"미리보기",type:"유형",typeTitle:"선택한 요소의 유형을 변경합니다.",openUrl:"Ctrl + Click 또는 Ctrl + Enter로 새 창에서 URL 열기",undo:"실행 취소 (Ctrl + Z)",validationCannotMove:"하위 요소로 이동할 수 없습니다.",autoType:"자동: 요소의 형식이 값의 유형으로 결정됩니다. 문자, 숫자, 부울, 또는 null만 허용됩니다.",objectType:"객체: 순서대로 나열되지 않은 이름/값 쌍으로 이루어진 집합입니다.",arrayType:"배열: 순서대로 나열된 값의 집합입니다.",stringType:"문자: 요소의 유형이 값에서 결정되지 않지만 항상 문자로 반환됩니다.",modeEditorTitle:"편집기 유형 변경",modeCodeText:"코드",modeCodeTitle:"형식 교정을 도와주는 기능이 포함된 문자 편집기",modeFormText:"입력 양식",modeFormTitle:"정해진 요소에 값을 입력하는 편집기",modeTextText:"문자",modeTextTitle:"단순 문자 편집기",modeTreeText:"트리",modeTreeTitle:"트리 구조로 표시되는 편집기",modeViewText:"보기",modeViewTitle:"읽기전용 트리 구조로 JSON을 표시",modePreviewText:"미리보기",modePreviewTitle:"읽기전용 문자로 JSON을 표시",examples:"예제",default:"기본값",containsInvalidProperties:"잘못된 속성이 포함되어 있습니다.",containsInvalidItems:"잘못된 항목이 포함되어 있습니다"}},n=Object.keys(o),s="en",r="undefined"!=typeof navigator?navigator.language||navigator.userLanguage:void 0,a=n.find(function(e){return e===r})||s;function l(t){var e;t&&((e=n.find(function(e){return e===t}))?a=e:console.error("Language not found"))}function c(e){if(e)for(var t in e)!function(t){n.find(function(e){return e===t})||n.push(t),o[t]=Object.assign({},o[s],o[t],e[t])}(t)}function h(e,t,i){var n=o[i=i||a][e]||o[s][e]||e;if(t)for(var r in t)n=n.replace("${"+r+"}",t[r]);return n}},6056:function(e,t,i){"use strict";i.d(t,{J:function(){return o},r:function(){return r}});var t=i(5156),n=i.n(t),s=i(9791);function r(e,t){var i,n=t.sort,r=t.filter,t=t.projection,o="";return r?(i="@"!==r.field?["0"].concat((0,s.parsePath)("."+r.field)):["0"],i="string"==typeof(0,s.get)(e,i)?r.value:(0,s.parseString)(r.value),o+="[? "+r.field+" "+r.relation+" `"+JSON.stringify(i)+"`]"):o+=Array.isArray(e)?"[*]":"@",n&&("desc"===n.direction?o+=" | reverse(sort_by(@, &"+n.field+"))":o+=" | sort_by(@, &"+n.field+")"),t&&("]"!==o[o.length-1]&&(o+=" | [*]"),1===t.fields.length?o+="."+t.fields[0]:1<t.fields.length&&(o+=".{"+t.fields.map(function(e){var t=e.split(".");return t[t.length-1]+": "+e}).join(", ")+"}")),o}function o(e,t){return n().search(e,t)}},4987:function(){function e(e){void 0===e||"remove"in e||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){void 0!==this.parentNode&&this.parentNode.removeChild(this)}})}"undefined"!=typeof Element&&(void 0!==window.Element&&e(window.Element.prototype),void 0!==window.CharacterData&&e(window.CharacterData.prototype),void 0!==window.DocumentType&&e(window.DocumentType.prototype)),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){for(var t=0;t<this.length;t++){var i=this[t];if(e.call(this,i,t,this))return t}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){e=this.findIndex(e);return this[e]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(e,t,i){"use strict";i.r(t),i.d(t,{previewModeMixins:function(){return m}});var t=i(3860),n=i.n(t),s=i(4188),r=i(6436),o=i(2474);function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(){function n(e,t,i){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.onChange=e,this.calculateItemSize=t||function(){return 1},this.limit=i,this.items=[],this.index=-1}var e,t,i;return e=n,(t=[{key:"add",value:function(e){for(;this._calculateHistorySize()>this.limit&&1<this.items.length;)this.items.shift(),this.index--;this.items=this.items.slice(0,this.index+1),this.items.push(e),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var t=this.calculateItemSize,i=0;return this.items.forEach(function(e){i+=t(e)}),i}},{key:"undo",value:function(){if(this.canUndo())return this.index--,this.onChange(),this.items[this.index]}},{key:"redo",value:function(){if(this.canRedo())return this.index++,this.onChange(),this.items[this.index]}},{key:"canUndo",value:function(){return 0<this.index}},{key:"canRedo",value:function(){return this.index<this.items.length-1}},{key:"clear",value:function(){this.items=[],this.index=-1,this.onChange()}}])&&a(e.prototype,t),i&&a(e,i),Object.defineProperty(e,"prototype",{writable:!1}),n}(),c=i(7907),h=i(6056),d=i(6617),u=i(6210),g=i(2558),t=i(8458),p=i(9791),i=t.textModeMixins[0].mixin,t={create:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=(void 0===t.statusBar&&(t.statusBar=!0),t.mainMenuBar=!1!==t.mainMenuBar,t.enableSort=!1!==t.enableSort,t.enableTransform=!1!==t.enableTransform,t.createQuery=t.createQuery||h.r,t.executeQuery=t.executeQuery||h.J,"number"==typeof(this.options=t).indentation?this.indentation=Number(t.indentation):this.indentation=2,(0,c.cC)(this.options.languages),(0,c.m0)(this.options.language),this.mode="preview",this),e=(this.container=e,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,p.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(e){e.preventDefault()},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null});this.frameFocusTracker=new o.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.dom.busy=document.createElement("div"),this.dom.busy.className="jsoneditor-busy",this.dom.busyContent=document.createElement("span"),this.dom.busyContent.textContent="busy...",this.dom.busy.appendChild(this.dom.busyContent),this.content.appendChild(this.dom.busy),this.dom.previewContent=document.createElement("pre"),this.dom.previewContent.className="jsoneditor-preview",this.dom.previewText=document.createTextNode(""),this.dom.previewContent.appendChild(this.dom.previewText),this.content.appendChild(this.dom.previewContent),this.options.mainMenuBar&&((0,p.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,c.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){i.executeWithBusyMessage(function(){try{i.format()}catch(e){i._onError(e)}},"formatting...")},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,c.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){i.executeWithBusyMessage(function(){try{i.compact()}catch(e){i._onError(e)}},"compacting...")},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,c.Iu)("sortTitleShort"),e.onclick=function(){i._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,c.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){i._showTransformModal()},this.dom.transform=e,this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,c.Iu)("repairTitle"),this.menu.appendChild(e),!(e.onclick=function(){void 0===i.json&&i.executeWithBusyMessage(function(){try{i.repair()}catch(e){i._onError(e)}},"repairing...")})!==this.options.history&&(this.history=new l(function(){i.dom.undo.disabled=!i.history.canUndo(),i.dom.redo.disabled=!i.history.canRedo()},function(e){return 2*e.text.length},s.oW),(e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,c.Iu)("undo"),e.onclick=function(){var e=i.history.undo();e&&i._applyHistory(e)},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,c.Iu)("redo"),e.onclick=function(){var e=i.history.redo();e&&i._applyHistory(e)},this.menu.appendChild(e),this.dom.redo=e,this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new d.x(this.menu,this.options.modes,this.options.mode,function(e){try{i.setMode(e),i.modeSwitcher.focus()}catch(e){i._onError(e)}}))),this.errorTable=new r.Q({errorTableVisible:!0,onToggleVisibility:function(){i.validate()},onFocusLine:null,onChangeHeight:function(e){e=e+(i.dom.statusBar?i.dom.statusBar.clientHeight:0)+1;i.content.style.marginBottom=-e+"px",i.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),t.statusBar&&((0,p.addClassName)(this.content,"has-status-bar"),e=document.createElement("div"),(this.dom.statusBar=e).className="jsoneditor-statusbar",this.frame.appendChild(e),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",e.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",e.appendChild(this.dom.arrayInfo),e.appendChild(this.errorTable.getErrorCounter()),e.appendChild(this.errorTable.getWarningIcon()),e.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var e=this.getText();this.dom.previewText.nodeValue=(0,p.limitCharacters)(e,s.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,p.formatSize)(e.length)),this.dom.arrayInfo&&(Array.isArray(this.json)?this.dom.arrayInfo.innerText="Array: "+this.json.length+" items":this.dom.arrayInfo.innerText="")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},m=(t._showSortModal=function(){var o=this;this.executeWithBusyMessage(function(){var e=o.options.modalAnchor||s.qD,r=o.get();o._renderPreview(),(0,u.showSortModal)(e,r,function(n){o.executeWithBusyMessage(function(){var e,t,i;e=r,t=n,Array.isArray(e)&&(i=(0,p.sort)(e,t.path,t.direction),o.sortedBy=t,o._setAndFireOnChange(i)),(0,p.isObject)(e)&&(i=(0,p.sortObjectKeys)(e,t.direction),o.sortedBy=t,o._setAndFireOnChange(i))},"sorting...")},o.sortedBy)},"parsing...")},t._showTransformModal=function(){var o=this;this.executeWithBusyMessage(function(){var e=o.options,t=e.createQuery,i=e.executeQuery,n=e.modalAnchor,e=e.queryDescription,r=o.get();o._renderPreview(),(0,g.showTransformModal)({container:n||s.qD,json:r,queryDescription:e,createQuery:t,executeQuery:i,onTransform:function(t){o.executeWithBusyMessage(function(){var e=i(r,t);o._setAndFireOnChange(e)},"transforming...")}})},"parsing...")},t.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this._debouncedValidate=null,this.history&&(this.history.clear(),this.history=null),this.frameFocusTracker.destroy()},t.compact=function(){var e=this.get(),t=JSON.stringify(e);this._setTextAndFireOnChange(t,e)},t.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this._setTextAndFireOnChange(t,e)},t.repair=function(){var e=this.getText();try{var t=n()(e);this._setTextAndFireOnChange(t)}catch(e){}},t.focus=function(){this.dom.transform.focus()},t.set=function(e){this.history&&this.history.clear(),this._set(e)},t.update=function(e){this._set(e)},t._set=function(e){this.text=void 0,this.json=e,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},t._setAndFireOnChange=function(e){this._set(e),this._onChange()},t.get=function(){var e;return void 0===this.json&&(e=this.getText(),this.json=(0,p.parse)(e)),this.json},t.getText=function(){return void 0===this.text&&(this.text=JSON.stringify(this.json,null,this.indentation),!0===this.options.escapeUnicode&&(this.text=(0,p.escapeUnicodeChars)(this.text))),this.text},t.setText=function(e){this.history&&this.history.clear(),this._setText(e)},t.updateText=function(e){this.getText()!==e&&this._setText(e)},t._setText=function(e,t){var i;!0===this.options.escapeUnicode?this.text=(0,p.escapeUnicodeChars)(e):this.text=e,this.json=t,this._renderPreview(),void 0===this.json?(i=this).executeWithBusyMessage(function(){try{i.json=i.get(),i._renderPreview(),i._pushHistory()}catch(e){}},"parsing..."):this._pushHistory(),this._debouncedValidate()},t._setTextAndFireOnChange=function(e,t){this._setText(e,t),this._onChange()},t._applyHistory=function(e){this.json=e.json,this.text=e.text,this._renderPreview(),this._debouncedValidate()},t._pushHistory=function(){var e;this.history&&(e={text:this.text,json:this.json},this.history.add(e))},t.executeWithBusyMessage=function(e,t){var i;this.getText().length>s.EX?((0,p.addClassName)((i=this).frame,"busy"),i.dom.busyContent.innerText=t,setTimeout(function(){e(),(0,p.removeClassName)(i.frame,"busy"),i.dom.busyContent.innerText=""},100)):e()},t.validate=i.validate,t._renderErrors=i._renderErrors,[{mode:"preview",mixin:t,data:"json"}])},6210:function(e,t,i){"use strict";i.r(t),i.d(t,{showSortModal:function(){return s}});var t=i(483),n=i.n(t),r=i(7907),o=i(9791);function s(e,t,s,i){var a=Array.isArray(t)?(0,o.getChildPaths)(t):[""],l=i&&i.path&&(0,o.contains)(a,i.path)?i.path:a[0],c=i&&i.direction||"asc",t='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,r.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,r.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,r.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,r.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,r.Iu)("sortAscending")+'" title="'+(0,r.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,r.Iu)("sortDescending")+'" title="'+(0,r.Iu)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/> </div> </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,r.Iu)("ok")+'" /></td></tr></tbody></table></form></div>';n()({parent:e,content:t,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(t){var e=t.modalElem().querySelector("form"),i=t.modalElem().querySelector("#ok"),n=t.modalElem().querySelector("#field"),r=t.modalElem().querySelector("#direction");function o(e){r.value=e,r.className="jsoneditor-button-group jsoneditor-button-group-value-"+r.value}a.forEach(function(e){var t,i=document.createElement("option");i.text=""===(t=e)?"@":"."===t[0]?t.slice(1):t,i.value=e,n.appendChild(i)}),n.value=l||a[0],o(c||"asc"),r.onclick=function(e){o(e.target.getAttribute("data-value"))},i.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.close(),s({path:n.value,direction:r.value})},e&&(e.onsubmit=i.onclick)}).afterClose(function(e){e.destroy()}).show()}},2558:function(e,t,i){"use strict";i.r(t),i.d(t,{showTransformModal:function(){return s}});var t=i(483),n=i.n(t),t=i(3879),S=i.n(t),r=i(7907);function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t,i,n){if("boolean"==typeof e||e instanceof Boolean||null===e||"number"==typeof e||e instanceof Number||"string"==typeof e||e instanceof String||e instanceof Date)return JSON.stringify(e);if(Array.isArray(e)){for(var r=e,o=t,s=i,a=n,l=o?s+o:void 0,c=o?"[\n":"[",h=0;h<r.length;h++){var d=r[h];if(o&&(c+=l),c+=void 0!==d&&"function"!=typeof d?k(d,o,l,a):"null",h<r.length-1&&(c+=o?",\n":","),c.length>a)return c+"..."}return c+=o?"\n"+s+"]":"]"}if(e&&"object"===A(e)){var u,g=e,p=t,s=i,m=n,f=p?s+p:void 0,C=!0,I=p?"{\n":"{";if("function"==typeof g.toJSON)return k(g.toJSON(),p,s,m);for(u in g)if(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(g,u)){var v=g[u];if(C?C=!1:I+=p?",\n":",",(I=(I+=p?f+'"'+u+'": ':'"'+u+'":')+k(v,p,f,m)).length>m)return I+"..."}return I+=p?"\n"+s+"}":"}"}}function E(e,t){for(var i="";0<t--;)i+=e;return i}var R=i(9791),T=i(4188),o='Enter a <a href="http://jmespath.org" target="_blank">JMESPath</a> query to filter, sort, or transform the JSON data.<br/>To learn JMESPath, go to <a href="http://jmespath.org/tutorial.html" target="_blank">the interactive tutorial</a>.';function s(e){var t=e.container,A=e.json,i=e.queryDescription,i=void 0===i?o:i,b=e.createQuery,y=e.executeQuery,w=e.onTransform,x=A,e='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,r.Iu)("transform")+"</div><p>"+i+'</p><div class="jsoneditor-jmespath-label">'+(0,r.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,r.Iu)("transformWizardFilter")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" > <select id="filterField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" > <select id="filterRelation"> <option value="==">==</option> <option value="!=">!=</option> <option value="<"><</option> <option value="<="><=</option> <option value=">">></option> <option value=">=">>=</option> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" > <input type="text" class="value" placeholder="value..." id="filterValue" /> </div> </td> </tr> <tr> <th>'+(0,r.Iu)("transformWizardSortBy")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-sort-field"> <select id="sortField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" > <select id="sortOrder"> <option value="asc">Ascending</option> <option value="desc">Descending</option> </select> </div> </td> </tr> <tr id="selectFieldsPart"> <th>'+(0,r.Iu)("transformWizardSelectFields")+'</th> <td class="jsoneditor-jmespath-filter"> <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select> </td> </tr> </tbody> </table></div><div class="jsoneditor-jmespath-label">'+(0,r.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,r.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,r.Iu)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="preview" class="jsoneditor-transform-preview" readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,r.Iu)("ok")+'" autofocus /></div></div>';n()({parent:t,content:e,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(t){var e=t.modalElem(),i=e.querySelector("#wizard"),o=e.querySelector("#ok"),r=e.querySelector("#filterField"),s=e.querySelector("#filterRelation"),a=e.querySelector("#filterValue"),l=e.querySelector("#sortField"),c=e.querySelector("#sortOrder"),h=e.querySelector("#selectFields"),d=e.querySelector("#query"),u=e.querySelector("#preview");Array.isArray(x)||(i.style.fontStyle="italic",i.textContent="(wizard not available for objects, only for arrays)");(0,R.getChildPaths)(A).forEach(function(e){var e=f(e),t=document.createElement("option"),t=(t.text=e,t.value=e,r.appendChild(t),document.createElement("option"));t.text=e,t.value=e,l.appendChild(t)});var i=(0,R.getChildPaths)(A,!0).filter(function(e){return""!==e}),i=(0<i.length?i.forEach(function(e){var e=f(e),t=document.createElement("option");t.text=e,t.value=e,h.appendChild(t)}):(i=e.querySelector("#selectFieldsPart"))&&(i.style.display="none"),new(S())(r,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."})),n=new(S())(s,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),g=new(S())(l,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),p=new(S())(c,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),m=new(S())(h,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function f(e){return""===e?"@":"."===e[0]?e.slice(1):e}i.on("selectr.change",v),n.on("selectr.change",v),a.oninput=v,g.on("selectr.change",v),p.on("selectr.change",v),m.on("selectr.change",v),e.querySelector(".pico-modal-contents").onclick=function(e){"A"!==e.target.nodeName&&e.preventDefault()};var C=(0,R.debounce)(function(){try{var e=y(x,d.value);u.className="jsoneditor-transform-preview",u.value=(t=e,i=2,n=T.WF,"number"==typeof i?10<i?r=E(" ",10):1<=i&&(r=E(" ",i)):"string"==typeof i&&""!==i&&(r=i),(i=k(t,r,"",n)).length>n?(t=i,("number"==typeof(r=n)?t.slice(0,r):t)+"..."):i),o.disabled=!1}catch(e){u.className="jsoneditor-transform-preview jsoneditor-error",u.value=e.toString(),o.disabled=!0}var t,i,n,r},300);function I(t,e){try{d.value=b(t,e),o.disabled=!1,C()}catch(e){t='Error: an error happened when executing "createQuery": '+(e.message||e.toString());d.value="",o.disabled=!0,u.className="jsoneditor-transform-preview jsoneditor-error",u.value=t}}function v(){var e={};if(r.value&&s.value&&a.value&&(e.filter={field:r.value,relation:s.value,value:a.value}),l.value&&c.value&&(e.sort={field:l.value,direction:c.value}),h.value){for(var t,i=[],n=0;n<h.options.length;n++)h.options[n].selected&&(t=h.options[n].value,i.push(t));e.projection={fields:i}}I(A,e)}d.oninput=C,o.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.close(),w(d.value)},I(A,{}),setTimeout(function(){d.select(),d.focus(),d.selectionStart=3,d.selectionEnd=3})}).afterClose(function(e){e.destroy()}).show()}},8458:function(e,t,i){"use strict";i.r(t),i.d(t,{textModeMixins:function(){return b}});var t=i(3860),n=i.n(t),t=i(8170),l=i.n(t),a=i(4188),c=i(6436),h=i(2474),d=i(7907),u=i(6056),g=i(6617),r=i(6210),p=i(2558),m=i(9125),f=i(7026),C=i(9791);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function i(e,t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.schema=e,this.schemaRefs=t||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}var e,t,n;return e=i,(t=[{key:"_buildSuggestions",value:function(){for(var e in this._handleSchemaEntry("",this.schema,this.suggestions),this.schemaRefs)this.suggestionsRefs[e]={},this._handleSchemaEntry("",this.schemaRefs[e],this.suggestionsRefs[e])}},{key:"_handleRef",value:function(e,t,i){i[e]=i[e]||{},i[e].refs=i[e].refs||[],i[e].refs=(0,C.uniqueMergeArrays)(i[e].refs,[t])}},{key:"_handleSchemaEntry",value:function(e,t,i){if(t)if(t.$ref)this._handleRef(e,t.$ref,i);else{var n=this._checkOfConditon(t);if(n)this._handleOfCondition(e,t[n],i);else switch(t.type){case"object":this._handleObject(e,t,i);break;case"string":case"number":case"integer":this._handlePrimitive(e,t,i);break;case"boolean":this._handleBoolean(e,t,i);break;case"array":this._handleArray(e,t,i)}}else console.error("SchemaTextCompleter: schema node is missing for path",e)}},{key:"_handleObject",value:function(t,i,n){var e,r=this;(0,C.isObject)(i.properties)&&(e=Object.keys(i.properties),n[t]=n[t]||{},n[t].props=n[t].props||[],n[t].props=(0,C.uniqueMergeArrays)(n[t].props,e),e.forEach(function(e){(0,C.asyncExec)(function(){r._handleSchemaEntry("".concat(t,"/").concat(e),i.properties[e],n)})}))}},{key:"_handlePrimitive",value:function(e,t,i){i[e]=i[e]||{},(0,C.isArray)(t.examples)&&(i[e].examples=i[e].examples||[],i[e].examples=(0,C.uniqueMergeArrays)(i[e].examples,t.examples)),(0,C.isArray)(t.enum)&&(i[e].enum=i[e].enum||[],i[e].enum=(0,C.uniqueMergeArrays)(i[e].enum,t.enum))}},{key:"_handleBoolean",value:function(e,t,i){i[e]||(i[e]={bool:[!0,!1]})}},{key:"_handleArray",value:function(e,t,i){var n=this;t.items&&(0,C.asyncExec)(function(){n._handleSchemaEntry("".concat(e,"/\\d+"),t.items,i)})}},{key:"_handleOfCondition",value:function(t,e,i){var n=this;e&&e.length&&e.forEach(function(e){(0,C.asyncExec)(function(){n._handleSchemaEntry(t,e,i)})})}},{key:"_checkOfConditon",value:function(e){if(e)return e.oneOf?"oneOf":e.anyOf?"anyOf":e.allOf?"allOf":void 0}},{key:"getCompletions",value:function(e,t,n,i,s){var c=this;try{var r=f.parse(t.getValue()).pointers||{},o=function(n){function e(t){var e,i={props:"property",enum:"enum",bool:"boolean",examples:"examples"};n&&null!=(e=n[t])&&e.length&&(r=r.concat(n[t].map(function(e){return{caption:e+"",meta:"schema [".concat(i[t],"]"),score:o++,value:e+""}})))}var r=[],o=0;e("props"),e("enum"),e("bool"),e("examples"),r.length&&s(null,r)};Object.keys(r).forEach(function(i){(0,C.asyncExec)(function(){function l(i,e,n){var t,r=Object.keys(e).reduce(function(e,t){return new RegExp("^".concat(n).concat(t)).test(i)&&(!e||e.length<t.length)?t:e});if("string"==typeof r){if(null!=(t=e[r])&&null!=(t=t.refs)&&t.length){var o,s={};for(o in e[r].refs){var a=e[r].refs[o];c.suggestionsRefs[a]&&(null!=(a=l(i,c.suggestionsRefs[a],"".concat(n).concat(r)))&&a.enum&&(s.enum=(0,C.uniqueMergeArrays)(s.enum,a.enum)),null!=a&&a.examples&&(s.examples=(0,C.uniqueMergeArrays)(s.examples,a.examples)),null!=a&&a.bool&&(s.bool=(0,C.uniqueMergeArrays)(s.bool,a.bool)),null!=a&&a.props&&(s.props=(0,C.uniqueMergeArrays)(s.props,a.props)))}return s}if(new RegExp("^".concat(n).concat(r,"$")).test(i))return console.log("SchemaTextCompleter: Text suggestion match",{path:i,schemaPath:"".concat(n).concat(r),suggestions:e[r]}),e[r]}}var e,t;(null==(t=r[i].key)?void 0:t.line)===n.row&&n.column>=r[i].key.column&&n.column<=r[i].keyEnd.column&&(e=i.slice(0,i.lastIndexOf("/"))),(e=(null==(t=r[i].value)?void 0:t.line)===n.row&&(null==(t=r[i].value)?void 0:t.line)===(null==(t=r[i].valueEnd)?void 0:t.line)&&n.column>=r[i].value.column&&n.column<=r[i].valueEnd.column?i:e)&&(t=l(e,c.suggestions,""),o(t))})})}catch(e){}}}])&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}();function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t={},v="ace/theme/jsoneditor";function A(){try{this.format()}catch(e){}}t.create=function(e){var t,i,n,r=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=(void 0===o.statusBar&&(o.statusBar=!0),o.mainMenuBar=!1!==o.mainMenuBar,o.enableSort=!1!==o.enableSort,o.enableTransform=!1!==o.enableTransform,o.createQuery=o.createQuery||u.r,o.executeQuery=o.executeQuery||u.J,"number"==typeof(this.options=o).indentation?this.indentation=Number(o.indentation):this.indentation=2,(0,d.cC)(this.options.languages),(0,d.m0)(this.options.language),o.ace||l()),a=(this.mode="code"===o.mode?"code":"text","code"===this.mode&&void 0===s&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=o.theme||v,this.theme===v&&s&&(0,m.O)(),o.onTextSelectionChange&&this.onTextSelectionChange(o.onTextSelectionChange),this),e=(this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0, |
| 33 | this._debouncedValidate=(0,C.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){a._onKeyDown(e)},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),e=(this.frameFocusTracker=new h.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,C.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,d.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){try{a.format(),a._onChange()}catch(e){a._onError(e)}},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,d.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){try{a.compact(),a._onChange()}catch(e){a._onError(e)}},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,d.Iu)("sortTitleShort"),e.onclick=function(){a._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,d.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){a._showTransformModal()},this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,d.Iu)("repairTitle"),this.menu.appendChild(e),e.onclick=function(){try{a.repair(),a._onChange()}catch(e){a._onError(e)}},"code"===this.mode&&((e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,d.Iu)("undo"),e.onclick=function(){r.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,d.Iu)("redo"),e.onclick=function(){r.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(e),this.dom.redo=e),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new g.x(this.menu,this.options.modes,this.options.mode,function(e){try{a.setMode(e),a.modeSwitcher.focus()}catch(e){a._onError(e)}})),"code"===this.mode&&((t=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),t.href="https://ace.c9.io/",t.target="_blank",t.className="jsoneditor-poweredBy",t.onclick=function(){window.open(t.href,t.target,"noreferrer")},this.menu.appendChild(t))),this.options.onEditable&&I("function"===this.options.onEditable)&&!this.options.onEditable({}));this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"===this.mode?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),n=(s=s.edit(this.editorDom)).getSession(),s.$blockScrolling=1/0,s.setTheme(this.theme),s.setOptions({readOnly:e}),s.setShowPrintMargin(!1),s.setFontSize("14px"),n.setMode("ace/mode/json"),n.setTabSize(this.indentation),n.setUseSoftTabs(!0),n.setUseWrapMode(!0),i=n.setAnnotations,n.setAnnotations=function(e){i.call(this,e&&e.length?e:a.annotations)},s.commands.bindKey("Ctrl-L",null),s.commands.bindKey("Command-L",null),s.commands.bindKey("Ctrl-\\",null),s.commands.bindKey("Command-\\",null),s.commands.bindKey("Ctrl-Shift-\\",null),s.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=s).on("change",this._onChange.bind(this)),s.on("changeSelection",this._onSelect.bind(this))):((n=document.createElement("textarea")).className="jsoneditor-text",n.spellcheck=!1,this.content.appendChild(n),this.textarea=n,this.textarea.readOnly=e,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),n.onselect=this._onSelect.bind(this),n.onmousedown=this._onMouseDown.bind(this),n.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),this.errorTable=new c.Q({errorTableVisible:"text"===this.mode,onToggleVisibility:function(){a._validateAndCatch()},onFocusLine:function(e){a.isFocused=!0,isNaN(e)||a.setTextSelection({row:e,column:1},{row:e,column:1e3})},onChangeHeight:function(e){e=e+(a.dom.statusBar?a.dom.statusBar.clientHeight:0)+1;a.content.style.marginBottom=-e+"px",a.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),o.statusBar&&((0,C.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},s=document.createElement("div"),(this.dom.statusBar=s).className="jsoneditor-statusbar",this.frame.appendChild(s),(e=document.createElement("span")).className="jsoneditor-curserinfo-label",e.innerText="Ln:",(n=document.createElement("span")).className="jsoneditor-curserinfo-val",n.innerText="1",s.appendChild(e),s.appendChild(n),(o=document.createElement("span")).className="jsoneditor-curserinfo-label",o.innerText="Col:",(e=document.createElement("span")).className="jsoneditor-curserinfo-val",e.innerText="1",s.appendChild(o),s.appendChild(e),this.curserInfoElements.colVal=e,this.curserInfoElements.lnVal=n,(o=document.createElement("span")).className="jsoneditor-curserinfo-label",o.innerText="characters selected",o.style.display="none",(e=document.createElement("span")).className="jsoneditor-curserinfo-count",e.innerText="0",e.style.display="none",this.curserInfoElements.countLabel=o,this.curserInfoElements.countVal=e,s.appendChild(e),s.appendChild(o),s.appendChild(this.errorTable.getErrorCounter()),s.appendChild(this.errorTable.getWarningIcon()),s.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},t._onSchemaChange=function(e,t){this.aceEditor&&(this.options.allowSchemaSuggestions&&e?(this.aceEditor.setOption("enableBasicAutocompletion",[new s(e,t)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},t._onChange=function(){var e=this;if(!this.onChangeDisabled){if(setTimeout(function(){e._updateHistoryButtons&&e._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},t._updateHistoryButtons=function(){var e;this.aceEditor&&this.dom.undo&&this.dom.redo&&((e=this.aceEditor.getSession().getUndoManager())&&e.hasUndo&&e.hasRedo&&(this.dom.undo.disabled=!e.hasUndo(),this.dom.redo.disabled=!e.hasRedo()))},t._showSortModal=function(){try{var i=this,e=this.options.modalAnchor||a.qD,n=this.get();(0,r.showSortModal)(e,n,function(e){var t;Array.isArray(n)&&(t=(0,C.sort)(n,e.path,e.direction),i.sortedBy=e,i.update(t)),(0,C.isObject)(n)&&(t=(0,C.sortObjectKeys)(n,e.direction),i.sortedBy=e,i.update(t))},i.sortedBy)}catch(e){this._onError(e)}},t._showTransformModal=function(){var t=this;try{var e=this.options,i=e.modalAnchor,n=e.createQuery,r=e.executeQuery,o=e.queryDescription,s=this.get();(0,p.showTransformModal)({container:i||a.qD,json:s,queryDescription:o,createQuery:n,executeQuery:r,onTransform:function(e){e=r(s,e);t.update(e)}})}catch(e){this._onError(e)}},t._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},t._onKeyDown=function(e){var t=!1;73===(e.which||e.keyCode)&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),this._onChange(),t=!0),t&&(e.preventDefault(),e.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},t._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},t._onBlur=function(){var e=this;setTimeout(function(){e.isFocused||(e._updateCursorInfo(),e._emitSelectionChange()),e.isFocused=!1})},t._updateCursorInfo=function(){var e,t,i,n,r,o=this;function s(){o.curserInfoElements.countVal.innerText!==r&&(o.curserInfoElements.countVal.innerText=r,o.curserInfoElements.countVal.style.display=r?"inline":"none",o.curserInfoElements.countLabel.style.display=r?"inline":"none"),o.curserInfoElements.lnVal.innerText=i,o.curserInfoElements.colVal.innerText=n}this.textarea?setTimeout(function(){var e=(0,C.getInputSelection)(o.textarea);e.startIndex!==e.endIndex&&(r=e.endIndex-e.startIndex),n=(r&&o.cursorInfo&&o.cursorInfo.line===e.end.row&&o.cursorInfo.column===e.end.column?(i=e.start.row,e.start):(i=e.end.row,e.end)).column,o.cursorInfo={line:i,column:n,count:r},o.options.statusBar&&s()},0):this.aceEditor&&this.curserInfoElements&&(e=this.aceEditor.getCursorPosition(),t=this.aceEditor.getSelectedText(),i=e.row+1,n=e.column+1,r=t.length,o.cursorInfo={line:i,column:n,count:r},this.options.statusBar&&s())},t._emitSelectionChange=function(){var e;this._selectionChangedHandler&&(e=this.getTextSelection(),this._selectionChangedHandler(e.start,e.end,e.text))},t._refreshAnnotations=function(){var e,t=this.aceEditor&&this.aceEditor.getSession();t&&(e=t.getAnnotations().filter(function(e){return"error"===e.type}),t.setAnnotations(e))},t.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null,this.frameFocusTracker.destroy()},t.compact=function(){var e=this.get(),e=JSON.stringify(e);this.updateText(e)},t.format=function(){var e=this.get(),e=JSON.stringify(e,null,this.indentation);this.updateText(e)},t.repair=function(){var e=this.getText();try{var t=n()(e);this.updateText(t)}catch(e){}},t.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},t.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},t.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},t.update=function(e){this.updateText(JSON.stringify(e,null,this.indentation))},t.get=function(){var e=this.getText();return(0,C.parse)(e)},t.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},t._setText=function(e,t){var i,n=this,e=!0===this.options.escapeUnicode?(0,C.escapeUnicodeChars)(e):e;this.textarea&&(this.textarea.value=e),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(e,-1),this.onChangeDisabled=!1,t&&(i=this,setTimeout(function(){i.aceEditor&&i.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){n._updateHistoryButtons&&n._updateHistoryButtons()})),this._debouncedValidate()},t.setText=function(e){this._setText(e,!0)},t.updateText=function(e){this.getText()!==e&&this._setText(e,!1)},t.validate=function(){var t,i=this,n=[],r=[];try{var o=this.get(),s=(this.validateSchema&&!this.validateSchema(o)&&(n=this.validateSchema.errors.map(function(e){return e.type="validation",(0,C.improveSchemaError)(e)})),this.validationSequence=(this.validationSequence||0)+1,this),a=this.validationSequence;return function(e,t){if(!t)return Promise.resolve([]);try{var i=t(e);return((0,C.isPromise)(i)?i:Promise.resolve(i)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=(0,C.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t}).map(function(e){return{dataPath:(0,C.stringifyPath)(e.path),message:e.message,type:"customValidation"}}):[]})}catch(e){return Promise.reject(e)}}(o,this.options.onValidate).then(function(e){return a===s.validationSequence&&(e=n.concat(r).concat(e),s._renderErrors(e),"function"==typeof i.options.onValidationError&&(0,C.isValidationErrorChanged)(e,i.lastSchemaErrors)&&i.options.onValidationError.call(i,e),i.lastSchemaErrors=e),i.lastSchemaErrors})}catch(e){return this.getText()&&((o=/\w*line\s*(\d+)\w*/g.exec(e.message))&&(t=+o[1]),r=[{type:"error",message:e.message.replace(/\n/g,"<br>"),line:t}]),this._renderErrors(r),"function"==typeof this.options.onValidationError&&(0,C.isValidationErrorChanged)(r,this.lastSchemaErrors)&&this.options.onValidationError.call(this,r),this.lastSchemaErrors=r,Promise.resolve(this.lastSchemaErrors)}},t._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},t._renderErrors=function(n){var e=this.getText(),t=[],e=(n.reduce(function(e,t){return"string"==typeof t.dataPath&&-1===e.indexOf(t.dataPath)&&e.push(t.dataPath),e},t),(0,C.getPositionForPath)(e,t));this.aceEditor&&(this.annotations=e.map(function(t){var e=n.filter(function(e){return e.dataPath===t.path}),i=e.map(function(e){return e.message}).join("\n");return i?{row:t.line,column:t.column,text:"Schema validation error"+(1!==e.length?"s":"")+": \n"+i,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(n,e),this.aceEditor&&this.aceEditor.resize(!1)},t.getTextSelection=function(){var e,t,i,n={};return this.textarea?(i=(0,C.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===i.end.row&&this.cursorInfo.column===i.end.column?(n.start=i.end,n.end=i.start):n=i,{start:n.start,end:n.end,text:this.textarea.value.substring(i.startIndex,i.endIndex)}):this.aceEditor?(i=this.aceEditor.getSelection(),e=this.aceEditor.getSelectedText(),t=i.getRange(),(i=i.getSelectionLead()).row===t.end.row&&i.column===t.end.column?n=t:(n.start=t.end,n.end=t.start),{start:{row:n.start.row+1,column:n.start.column+1},end:{row:n.end.row+1,column:n.end.column+1},text:e}):void 0},t.onTextSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,C.debounce)(e,this.DEBOUNCE_INTERVAL))},t.setTextSelection=function(e,t){var i,n,r;e&&t&&(this.textarea?(i=(0,C.getIndexForPosition)(this.textarea,e.row,e.column),r=(0,C.getIndexForPosition)(this.textarea,t.row,t.column),-1<i&&-1<r&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(i,r)):this.textarea.createTextRange&&((n=this.textarea.createTextRange()).collapse(!0),n.moveEnd("character",r),n.moveStart("character",i),n.select()),r=(this.textarea.value.match(/\n/g)||[]).length+1,i=this.textarea.scrollHeight/r,n=e.row*i,this.textarea.scrollTop=n>this.textarea.clientHeight?n-this.textarea.clientHeight/2:0)):this.aceEditor&&(r={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}},this.aceEditor.selection.setRange(r),this.aceEditor.scrollToLine(e.row-1,!0)))};var b=[{mode:"text",mixin:t,data:"text",load:A},{mode:"code",mixin:t,data:"text",load:A}]},8038:function(G,e,t){"use strict";t.r(e),t.d(e,{treeModeMixins:function(){return H}});var w={start:function(e,t,i){return 0===t.indexOf(e)},contain:function(e,t,i){return-1<t.indexOf(e)}};var s=t(897),a=t(2474);function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var x=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.locked=!1}var t,i,n;return t=e,(i=[{key:"highlight",value:function(e){this.locked||(this.node!==e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var e;this.locked||(e=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&r(t.prototype,i),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),l=t(7907),n=t(6056),c=t(6617),e=t(233),o=t.n(e),h=t(2602),k=t(9791);var d=t(6210),u=t(2558),g=t(4188);function S(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){var i,n,r,o,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return n=!(i=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return i=e.done,e},e:function(e){n=!0,r=e},f:function(){try{i||null==s.return||s.return()}finally{if(n)throw r}}};if(Array.isArray(e)||(s=p(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){var i;if(e)return"string"==typeof e?m(e,t):"Map"===(i="Object"===(i=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(e,t):void 0}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var _=function(){function S(e,t){if(!(this instanceof S))throw new TypeError("Cannot call a class as a function");this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),"value"in t&&this.setValue(t.value,t.type),"internalValue"in t&&this.setInternalValue(t.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,k.debounce)(this._onChangeValue.bind(this),S.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,k.debounce)(this._onChangeField.bind(this),S.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var e,t,i;return e=S,(t=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:C}},{key:"_updateEditability",value:function(){var e,t;this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"!==this.editor.options.mode&&"form"!==this.editor.options.mode||"function"!=typeof this.editor.options.onEditable||(e=this.getValue.bind(this),"boolean"==typeof(t=this.editor.options.onEditable({field:this.field,get value(){return e()},path:this.getPath()}))?(this.editable.field=t,this.editable.value=t):"object"===T(t)&&null!==t?("boolean"==typeof t.field&&(this.editable.field=t.field),"boolean"==typeof t.value&&(this.editable.value=t.value)):(console.error("Invalid return value for function onEditable.","Actual value:",t,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var e=this,t=[];e;){var i=e.getName();void 0!==i&&t.unshift(i),e=e.parent}return t}},{key:"getInternalPath",value:function(){for(var e=this,t=[];e;)e.parent&&t.unshift(e.getIndex()),e=e.parent;return t}},{key:"getName",value:function(){return this.parent?"array"!==this.parent.type?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(e){if(e){if(0===e.length)return this;if(e.length&&this.childs&&this.childs.length)for(var t=0;t<this.childs.length;++t)if(""+e[0]==""+this.childs[t].getName())return this.childs[t].findNodeByPath(e.slice(1))}}},{key:"findNodeByInternalPath",value:function(e){if(e){for(var t=this,i=0;i<e.length&&t;i++)var n=e[i],t=t.childs[n];return t}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(e){for(var i=(0,k.parsePath)(e),n=this;n&&0<i.length;)!function(){var t=i.shift();if("number"==typeof t){if("array"!==n.type)throw new Error("Cannot get child node at index "+t+": node is no array");n=n.childs[t]}else{if("object"!==n.type)throw new Error("Cannot get child node "+t+": node is no object");n=n.childs.filter(function(e){return e.field===t})[0]}}();return n}},{key:"findParents",value:function(){for(var e=[],t=this.parent;t;)e.unshift(t),t=t.parent;return e}},{key:"setError",value:function(e,t){this.error=e,this.errorChild=t,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var i=this,n=this.fieldError||this.valueError||this.error,e=this.dom.tdError;if(n&&this.dom&&this.dom.tr){(0,k.addClassName)(this.dom.tr,"jsoneditor-validation-error"),e||(e=document.createElement("td"),this.dom.tdError=e,this.dom.tdValue.parentNode.appendChild(e));var r=document.createElement("button"),t=(r.type="button",r.className="jsoneditor-button jsoneditor-schema-error",function(){i.dom.popupAnchor&&i.dom.popupAnchor.destroy()}),o=function(){delete i.dom.popupAnchor},s=function(e){var t=i.editor.frame,e=(i.dom.popupAnchor=(0,h.w)(r,i.editor.getPopupAnchor(),o,e),r.getBoundingClientRect()),t=120<t.getBoundingClientRect().width-e.x?"jsoneditor-above":"jsoneditor-left",e=document.createElement("div");e.className="jsoneditor-popover "+t,e.appendChild(document.createTextNode(n.message)),i.dom.popupAnchor.appendChild(e)},a=(r.onmouseover=function(){i.dom.popupAnchor||s(!0)},r.onfocus=function(){t(),s(!1)},r.onblur=function(){t()},this.errorChild);for(a&&(r.onclick=function(){a.findParents().forEach(function(e){e.expand(!1)}),a.scrollTo(function(){a.focus()})});e.firstChild;)e.removeChild(e.firstChild);e.appendChild(r)}else this.dom.tr&&(0,k.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),e&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var e;return this.parent?-1!==(e=this.parent.childs.indexOf(this))?e:null:-1}},{key:"setParent",value:function(e){this.parent=e}},{key:"setField",value:function(e,t){this.field=e,this.previousField=e,this.fieldEditable=!0===t}},{key:"getField",value:function(){return void 0===this.field&&this._getDomField(),this.field}},{key:"setValue",value:function(e,t){var i,n,r,o,s,a,l=this.childs;if(this.type=this._getType(e),t&&t!==this.type){if("string"!==t||"auto"!==this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"===this.type){for(this.childs||(this.childs=[]),i=0;i<e.length;i++)void 0===(s=e[i])||s instanceof Function||(i<this.childs.length?((r=this.childs[i]).fieldEditable=!1,r.index=i,r.setValue(s)):(r=new S(this.editor,{value:s}),o=i<this.getMaxVisibleChilds(),this.appendChild(r,o,!1)));for(n=this.childs.length;n>=e.length;n--)this.removeChild(this.childs[n],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),n=this.childs.length-1;0<=n;n--)v(e,this.childs[n].field)||this.removeChild(this.childs[n],!1);for(var c in i=0,e)v(e,c)&&(void 0===(s=e[c])||s instanceof Function||((a=this.findChildByProperty(c))?(a.setField(c,!0),a.setValue(s)):(a=new S(this.editor,{field:c,value:s}),c=i<this.getMaxVisibleChilds(),this.appendChild(a,c,!1))),i++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=e;Array.isArray(l)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(e){var t,i,n,r,o,s=this.childs;if(this.type=e.type,"array"===e.type){for(this.childs||(this.childs=[]),r=0;r<e.childs.length;r++)void 0===(t=e.childs[r])||t instanceof Function||(r<this.childs.length?((i=this.childs[r]).fieldEditable=!1,i.index=r,i.setInternalValue(t)):(i=new S(this.editor,{internalValue:t}),n=r<this.getMaxVisibleChilds(),this.appendChild(i,n,!1)));for(o=this.childs.length;o>=e.childs.length;o--)this.removeChild(this.childs[o],!1)}else if("object"===e.type){for(this.childs||(this.childs=[]),r=0;r<e.childs.length;r++)void 0===(t=e.childs[r])||t instanceof Function||(r<this.childs.length?(delete(i=this.childs[r]).index,i.setField(t.field,!0),i.setInternalValue(t.value)):(i=new S(this.editor,{field:t.field,internalValue:t.value}),n=r<this.getMaxVisibleChilds(),this.appendChild(i,n,!1)));for(o=this.childs.length;o>=e.childs.length;o--)this.removeChild(this.childs[o],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=e.value;Array.isArray(s)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var e;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(e=this._detachFromDom(),this.clearDom(),this._attachToDom(e)):this.clearDom()}},{key:"getValue",value:function(){var t,i;return"array"===this.type?(t=[],this.childs.forEach(function(e){t.push(e.getValue())}),t):"object"===this.type?(i={},this.childs.forEach(function(e){i[e.getField()]=e.getValue()}),i):(void 0===this.value&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return"array"===this.type?{type:this.type,childs:this.childs.map(function(e){return e.getInternalValue()})}:"object"===this.type?{type:this.type,childs:this.childs.map(function(e){return{field:e.getField(),value:e.getInternalValue()}})}:(void 0===this.value&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var e=this.parent?this.parent.getNodePath():[];return e.push(this),e}},{key:"clone",value:function(){var t,i;return(t=new S(this.editor)).type=this.type,t.field=this.field,t.fieldInnerText=this.fieldInnerText,t.fieldEditable=this.fieldEditable,t.previousField=this.previousField,t.value=this.value,t.valueInnerText=this.valueInnerText,t.previousValue=this.previousValue,t.expanded=this.expanded,t.visibleChilds=this.visibleChilds,this.childs?(i=[],this.childs.forEach(function(e){e=e.clone();e.setParent(t),i.push(e)}),t.childs=i):t.childs=void 0,t}},{key:"expand",value:function(t){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==t&&this.childs.forEach(function(e){e.expand(t)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(t){this.childs&&(this.hideChilds(),!1!==t&&this.childs.forEach(function(e){e.collapse(t)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var e=this.childs;if(e&&this.expanded){var e=this.dom.tr,t=e?e.parentNode:void 0;if(t){for(var i=this.getAppendDom(),n=(i.parentNode||((r=e.nextSibling)?t.insertBefore(i,r):t.appendChild(i)),Math.min(this.childs.length,this.visibleChilds)),r=this._getNextTr(),o=0;o<n;o++){var s=this.childs[o];s.getDom().parentNode||t.insertBefore(s.getDom(),r),s.showChilds()}e=this.getShowMoreDom();r=this._getNextTr(),e.parentNode||t.insertBefore(e,r),this.showMore.updateDom()}}}},{key:"_getNextTr",value:function(){return this.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void 0}},{key:"hide",value:function(e){var t=this.dom.tr,i=t?t.parentNode:void 0;i&&i.removeChild(t),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(e)}},{key:"hideChilds",value:function(e){var t;this.childs&&this.expanded&&((t=this.getAppendDom()).parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()}),(t=this.getShowMoreDom()).parentNode&&t.parentNode.removeChild(t),e&&!e.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var e,t;this.dom.field&&this.editor&&this.editor.options&&"function"==typeof this.editor.options.onClassName&&this.dom.tree&&((0,k.removeAllClassNames)(this.dom.tree),e=this.getValue.bind(this),t=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return e()}})||"",(0,k.addClassName)(this.dom.tree,"jsoneditor-values "+t))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var e=0;e<this.childs.length;e++)this.childs[e].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var e=this.parent;e;)e.expanded||e.expand(),e=e.parent}},{key:"appendChild",value:function(e,t,i){var n,r;this._hasChilds()&&(e.setParent(this),e.fieldEditable="object"===this.type,"array"===this.type&&(e.index=this.childs.length),"object"===this.type&&void 0===e.field&&e.setField(""),this.childs.push(e),this.expanded&&!1!==t&&(t=e.getDom(),r=(n=this._getNextTr())?n.parentNode:void 0,n&&r&&r.insertBefore(t,n),e.showChilds(),this.visibleChilds++),!1!==i&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})))}},{key:"moveBefore",value:function(e,t,i){var n,r,o;this._hasChilds()&&((n=this.dom.tr?this.dom.tr.parentNode:void 0)&&((r=document.createElement("tr")).style.height=n.clientHeight+"px",n.appendChild(r)),e.parent&&e.parent.removeChild(e),t instanceof L||!t?this.childs.length+1>this.visibleChilds?(o=this.childs[this.visibleChilds-1],this.insertBefore(e,o,i)):this.appendChild(e,!0,i):this.insertBefore(e,t,i),n&&r&&n.removeChild(r))}},{key:"insertBefore",value:function(e,t,i){if(this._hasChilds()){if(this.visibleChilds++,"object"===this.type&&void 0===e.field&&e.setField(""),t===this.append)e.setParent(this),e.fieldEditable="object"===this.type,this.childs.push(e);else{var n=this.childs.indexOf(t);if(-1===n)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"===this.type,this.childs.splice(n,0,e)}var r;this.expanded&&(n=e.getDom(),r=(t=t.getDom())?t.parentNode:void 0,t&&r&&r.insertBefore(n,t),e.showChilds(),this.showChilds()),!1!==i&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(e,t){this._hasChilds()&&(t=this.childs.indexOf(t),(t=this.childs[t+1])?this.insertBefore(e,t):this.appendChild(e))}},{key:"search",value:function(t,i){Array.isArray(i)||(i=[]);var e=t?t.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,void 0!==this.field&&i.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(e)&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(e){e.search(t,i)}):void 0!==this.value&&i.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(e)&&(this.searchValue=!0,i.push({node:this,elem:"value"})),this._updateDomValue()),i}},{key:"scrollTo",value:function(e){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)}},{key:"expandPathToNode",value:function(){for(var e=this;e&&e.parent;){for(var t="array"===e.parent.type?e.index:e.parent.childs.indexOf(e);e.parent.visibleChilds<t+1;)e.parent.visibleChilds+=this.getMaxVisibleChilds();e.parent.expand(!1),e=e.parent}}},{key:"focus",value:function(e){if(S.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":(t.drag||t.menu).focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),(0,k.selectContentEditable)(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),(0,k.selectContentEditable)(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),(0,k.selectContentEditable)(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),(0,k.selectContentEditable)(t.value)):(this._hasChilds()?t.expand:t.menu).focus();break;default:t.select?t.select.focus():t.value&&!this._hasChilds()?(t.value.focus(),(0,k.selectContentEditable)(t.value)):t.field&&this.fieldEditable?(t.field.focus(),(0,k.selectContentEditable)(t.field)):(this._hasChilds()?t.expand:t.menu).focus()}}}},{key:"containsNode",value:function(e){if(this===e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;i<n;i++)if(t[i].containsNode(e))return!0;return!1}},{key:"removeChild",value:function(e,t){if(this.childs){var i=this.childs.indexOf(e);if(-1!==i)return i<this.visibleChilds&&this.expanded&&this.visibleChilds--,e.hide(),delete e.searchField,delete e.searchValue,(e=this.childs.splice(i,1)[0]).parent=null,!1!==t&&this.updateDom({updateIndexes:!0}),e}}},{key:"_remove",value:function(e){this.removeChild(e)}},{key:"changeType",value:function(e){var t,i=this.type;i!==e&&("string"!==e&&"auto"!==e||"string"!==i&&"auto"!==i?(t=this._detachFromDom(),this.clearDom(),"object"===(this.type=e)?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0===e.field&&(e.field="")}),"string"!==i&&"auto"!==i||(this.expanded=!0)):"array"===e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),"string"!==i&&"auto"!==i||(this.expanded=!0)):this.expanded=!1,this._attachToDom(t)):this.type=e,"auto"!==e&&"string"!==e||(this.value="string"===e?String(this.value):(0,k.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(e){var t;if("array"===this.type){if(!Array.isArray(e))return!1;if(this.childs.length!==e.length)return!1;for(t=0;t<this.childs.length;t++)if(!this.childs[t].deepEqual(e[t]))return!1}else if("object"===this.type){if("object"!==T(e)||!e)return!1;var i=Object.keys(e);if(this.childs.length!==i.length)return!1;for(t=0;t<i.length;t++){var n=this.childs[t];if(n.field!==i[t]||!n.deepEqual(e[n.field]))return!1}}else if(this.value!==e)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&"array"!==this.type&&"object"!==this.type&&(this.valueInnerText=(0,k.getInnerText)(this.dom.value),""===this.valueInnerText&&""!==this.dom.value.innerHTML&&(this.dom.value.textContent="")),void 0!==this.valueInnerText)try{var e,t;(t="string"===this.type?this._unescapeHTML(this.valueInnerText):(e=this._unescapeHTML(this.valueInnerText),(0,k.parseString)(e)))!==this.value&&(this.value=t,this._debouncedOnChangeValue())}catch(e){this._setValueError((0,l.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(e){this.valueError={message:e},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(e){this.fieldError={message:e},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var e,t=this.editor.getDomSelection(),i=(t.range&&(i=(0,k.textDiff)(String(this.value),String(this.previousValue)),t.range.startOffset=i.start,t.range.endOffset=i.end),this.editor.getDomSelection());i.range&&(e=(0,k.textDiff)(String(this.previousValue),String(this.value)),i.range.startOffset=e.start,i.range.endOffset=e.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:t,newSelection:i}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var e=this.editor.getDomSelection(),t=this.previousField||"",i=(e.range&&(i=(0,k.textDiff)(this.field,t),e.range.startOffset=i.start,e.range.endOffset=i.end),this.editor.getDomSelection());i.range&&(t=(0,k.textDiff)(t,this.field),i.range.startOffset=t.start,i.range.endOffset=t.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:e,newSelection:i}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var e=this.dom.value;if(e){var t=["jsoneditor-value"],i=this.value,n="auto"===this.type?(0,k.getType)(i):this.type,r="string"===n&&(0,k.isUrl)(i);if(t.push("jsoneditor-"+n),r&&t.push("jsoneditor-url"),""===String(this.value)&&"array"!==this.type&&"object"!==this.type&&t.push("jsoneditor-empty"),this.searchValueActive&&t.push("jsoneditor-highlight-active"),this.searchValue&&t.push("jsoneditor-highlight"),e.className=t.join(" "),"array"===n||"object"===n?(t=this.childs?this.childs.length:0,e.title=this.type+" containing "+t+" items"):r&&this.editable.value?e.title=(0,l.Iu)("openUrl"):e.title="","boolean"===n&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value?(this.dom.select||(this.dom.select=document.createElement("select"),this.id=this.field+"_"+(new Date).getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,(t=document.createElement("option")).value="",t.textContent="--",this.dom.select.appendChild(t),this._updateEnumOptions(),this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)),this.dom.select.value=-1!==this.enum.indexOf(this.value)?this.value:"",!this.schema||v(this.schema,"oneOf")||v(this.schema,"anyOf")||v(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")):this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML,this.dom.tdValue.appendChild(this.dom.value)),this.editor.options.colorPicker&&"string"==typeof i&&(0,k.isValidColor)(i)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,k.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?(0,k.removeClassName):(0,k.addClassName))(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=i):this._deleteDomColor(),this._showTimestampTag()){this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date));r=null;if(r="function"==typeof this.editor.options.timestampFormat?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):r){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(r))}else this.dom.date.textContent=new Date(i).toISOString();this.dom.date.title=new Date(i).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,k.stripFormatting)(e),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var e=0;e<this.enum.length;e++){var t=document.createElement("option");t.value=this.enum[e],t.textContent=this.enum[e],this.dom.select.appendChild(t)}}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,k.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var e,t=this.dom.field;t&&((e=(0,k.makeFieldTooltip)(this.schema,this.editor.options.language))&&(t.title=e),(""===String(this.field)&&this.parent&&"array"!==this.parent.type?(0,k.addClassName):(0,k.removeClassName))(t,"jsoneditor-empty"),(this.searchFieldActive?(0,k.addClassName):(0,k.removeClassName))(t,"jsoneditor-highlight-active"),(this.searchField?(0,k.addClassName):(0,k.removeClassName))(t,"jsoneditor-highlight"),(0,k.stripFormatting)(t))}},{key:"_getDomField",value:function(e){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,k.getInnerText)(this.dom.field),""===this.fieldInnerText&&""!==this.dom.field.innerHTML&&(this.dom.field.textContent="")),void 0!==this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText),i=this.parent.getFieldNames(this);-1!==i.indexOf(t)?e?(t=(0,k.findUniqueName)(t,i))!==this.field&&(this.field=t,this._debouncedOnChangeField()):this._setFieldError((0,l.Iu)("duplicateFieldError")):t!==this.field&&(this.field=t,this._debouncedOnChangeField())}catch(e){this._setFieldError((0,l.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var e;this.schema&&void 0!==this.schema.default&&!this._hasChilds()&&(e=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(e.title=(0,l.Iu)("default"),(0,k.addClassName)(e,"jsoneditor-is-default"),k.removeClassName):(e.removeAttribute("title"),(0,k.removeClassName)(e,"jsoneditor-is-default"),k.addClassName))(e,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var e,t;return"number"==typeof this.value&&("function"==typeof(e=this.editor.options.timestampTag)?"boolean"==typeof(t=e({field:this.field,value:this.value,path:this.getPath()}))?t:(0,k.isTimestamp)(this.field,this.value):!0===e&&(0,k.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var e,t,i=this.dom;return i.tr||(this._updateEditability(),i.tr=document.createElement("tr"),"tree"===(i.tr.node=this).editor.options.mode&&(t=document.createElement("td"),this.editable.field&&this.parent&&((e=document.createElement("button")).type="button",(i.drag=e).className="jsoneditor-button jsoneditor-dragarea",e.title=(0,l.Iu)("drag"),t.appendChild(e)),i.tr.appendChild(t),e=document.createElement("td"),(t=document.createElement("button")).type="button",(i.menu=t).className="jsoneditor-button jsoneditor-contextmenu-button",t.title=(0,l.Iu)("actionsMenu"),e.appendChild(i.menu),i.tr.appendChild(e)),t=document.createElement("td"),i.tr.appendChild(t),i.tree=this._createDomTree(),t.appendChild(i.tree),this.updateDom({updateIndexes:!0})),i.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(t){this.dom.tr&&((t?(0,k.addClassName):(0,k.removeClassName))(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(t),this.childs&&this.childs.forEach(function(e){e.setHighlight(t)}))}},{key:"setSelected",value:function(t,e){this.selected=t,this.dom.tr&&((t?(0,k.addClassName):(0,k.removeClassName))(this.dom.tr,"jsoneditor-selected"),(e?(0,k.addClassName):(0,k.removeClassName))(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(t),this.showMore&&this.showMore.setSelected(t),this.childs&&this.childs.forEach(function(e){e.setSelected(t)}))}},{key:"updateValue",value:function(e){this.value=e,this.previousValue=e,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(e){this.field=e,this.previousField=e,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(t){var e,i=this.dom.tree,i=(i&&(i.style.marginLeft=24*this.getLevel()+"px"),this.dom.field),i=(i&&(this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="jsoneditor-field"):(i.contentEditable=!1,i.className="jsoneditor-readonly"),e=void 0!==this.index?this.index:void 0!==this.field?this.field:(e=this.editor.options.schema?S._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&e.title?e.title:this._hasChilds()?this.type:"",e=this._escapeHTML(e),document.activeElement!==i&&e!==this._unescapeHTML((0,k.getInnerText)(i))&&(i.innerHTML=e),this._updateSchema(),this._updateEnumOptions()),this.dom.value),i=(i&&("array"===this.type||"object"===this.type?this.updateNodeName():(e=this._escapeHTML(this.value),document.activeElement!==i&&e!==this._unescapeHTML((0,k.getInnerText)(i))&&(i.innerHTML=e))),this.dom.tr);i&&("array"===this.type||"object"===this.type?((0,k.addClassName)(i,"jsoneditor-expandable"),this.expanded?((0,k.addClassName)(i,"jsoneditor-expanded"),(0,k.removeClassName)(i,"jsoneditor-collapsed")):((0,k.addClassName)(i,"jsoneditor-collapsed"),(0,k.removeClassName)(i,"jsoneditor-expanded"))):((0,k.removeClassName)(i,"jsoneditor-expandable"),(0,k.removeClassName)(i,"jsoneditor-expanded"),(0,k.removeClassName)(i,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),t&&!0===t.updateIndexes&&this._updateDomIndexes(),t&&!0===t.recurse&&this.childs&&this.childs.forEach(function(e){e.updateDom(t)}),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?S._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=S._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var e=this.dom.value,t=this.childs;e&&t&&("array"===this.type?t.forEach(function(e,t){e.index=t;e=e.dom.field;e&&(e.textContent=t)}):"object"===this.type&&t.forEach(function(e){void 0!==e.index&&(delete e.index,void 0===e.field&&(e.field=""))}))}},{key:"_createDomValue",value:function(){var e;return"array"===this.type?(e=document.createElement("div")).textContent="[...]":"object"===this.type?(e=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,k.isUrl)(this.value)?(e=document.createElement("a")).href=this.value:((e=document.createElement("div")).contentEditable=this.editable.value,e.spellcheck=!1),e.innerHTML=this._escapeHTML(this.value)),e}},{key:"_createDomExpandButton",value:function(){var e=document.createElement("button");return e.type="button",this._hasChilds()?(e.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",e.title=(0,l.Iu)("expandTitle")):(e.className="jsoneditor-button jsoneditor-invisible",e.title=""),e}},{key:"_createDomTree",value:function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody"),n=(t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(i),document.createElement("tr")),i=(i.appendChild(n),document.createElement("td")),i=(i.className="jsoneditor-tree",n.appendChild(i),e.expand=this._createDomExpandButton(),i.appendChild(e.expand),e.tdExpand=i,document.createElement("td")),i=(i.className="jsoneditor-tree",n.appendChild(i),e.field=this._createDomField(),i.appendChild(e.field),e.tdField=i,document.createElement("td")),i=(i.className="jsoneditor-tree",n.appendChild(i),"object"!==this.type&&"array"!==this.type&&(i.appendChild(document.createTextNode(":")),i.className="jsoneditor-separator"),e.tdSeparator=i,document.createElement("td"));return i.className="jsoneditor-tree",n.appendChild(i),e.value=this._createDomValue(),i.appendChild(e.value),e.tdValue=i,t}},{key:"onEvent",value:function(e){var t,i=e.type,n=e.target||e.srcElement,r=this.dom,o=this,s=this._hasChilds(),a=(n!==r.drag&&n!==r.menu||("mouseover"===i?this.editor.highlighter.highlight(this):"mouseout"===i&&this.editor.highlighter.unhighlight()),"click"===i&&n===r.menu&&((t=o.editor.highlighter).highlight(o),t.lock(),(0,k.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,function(){(0,k.removeClassName)(r.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()})),"click"===i&&n===r.expand&&s&&(d=e.ctrlKey,this._onExpand(d)),"click"!==i||e.target!==o.dom.tdColor&&e.target!==o.dom.color||!this.editable.value||this._showColorPicker(),"change"===i&&n===r.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),"change"===i&&n===r.select&&(this.dom.value.innerHTML=this._escapeHTML(r.select.value),this._getDomValue(),this._updateDomValue()),r.value);if(n===a)switch(i){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var l=this._escapeHTML(this.value);l!==this._unescapeHTML((0,k.getInnerText)(a))&&(a.innerHTML=l);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":e.ctrlKey&&this.editable.value&&(0,k.isUrl)(this.value)&&(e.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){o._getDomValue(),o._updateDomValue()},1)}var c=r.field;if(n===c)switch(i){case"blur":this._getDomField(!0),this._updateDomField();var h=this._escapeHTML(this.field);h!==this._unescapeHTML((0,k.getInnerText)(c))&&(c.innerHTML=h);break;case"input":this._getDomField(),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"keyup":this._getDomField(),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){o._getDomField(),o._updateDomField()},1)}var d=r.tree;d&&n===d.parentNode&&"click"===i&&!e.hasMoved&&((void 0!==e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<(0,k.getAbsoluteLeft)(r.tdSeparator))||s?c&&((0,k.setEndOfContentEditable)(c),c.focus()):a&&!this.enum&&((0,k.setEndOfContentEditable)(a),a.focus())),(n!==r.tdExpand||s)&&n!==r.tdField&&n!==r.tdSeparator||"click"!==i||e.hasMoved||c&&((0,k.setEndOfContentEditable)(c),c.focus()),"keydown"===i&&this.onKeyDown(e),"function"==typeof this.editor.options.onEvent&&this._onEvent(e)}},{key:"_onEvent",value:function(e){var t=e.target,i=t===this.dom.field,t=t===this.dom.value||t===this.dom.checkbox||t===this.dom.select;(i||t)&&(i={field:this.getField(),path:this.getPath()},t&&!this._hasChilds()&&(i.value=this.getValue()),this.editor.options.onEvent(i,e))}},{key:"onKeyDown",value:function(e){var t,i,n,r,o,s,a,l,c,h,d,u,g,p,m=e.which||e.keyCode,f=e.target||e.srcElement,C=e.ctrlKey,I=e.shiftKey,v=e.altKey,A=!1,b="tree"===this.editor.options.mode,y=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],w=y[0],x=y[y.length-1];13===m?f===this.dom.value?this.editable.value&&!e.ctrlKey||(0,k.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),A=!0):f===this.dom.expand&&this._hasChilds()&&(g=e.ctrlKey,this._onExpand(g),f.focus(),A=!0):68===m?C&&b&&(S.onDuplicate(y),A=!0):69===m?C&&(this._onExpand(I),f.focus(),A=!0):77===m&&b?C&&(this.showContextMenu(f),A=!0):46===m&&b?C&&(S.onRemove(y),A=!0):45===m&&b?C&&!I?(this._onInsertBefore(),A=!0):C&&I&&(this._onInsertAfter(),A=!0):35===m?v&&((g=this._lastNode())&&g.focus(S.focusElement||this._getElementName(f)),A=!0):36===m?v&&((g=this._firstNode())&&g.focus(S.focusElement||this._getElementName(f)),A=!0):37===m?v&&!I?((g=this._previousElement(f))&&this.focus(this._getElementName(g)),A=!0):v&&I&&b&&(g=x.expanded?(g=x.getAppendDom())?g.nextSibling:void 0:x.getDom().nextSibling)&&(d=S.getNodeFromTarget(g),g=g.nextSibling,u=S.getNodeFromTarget(g),d&&d instanceof L&&1!==x.parent.childs.length&&u&&u.parent&&(i=this.editor.getDomSelection(),n=(r=w.parent).childs[x.getIndex()+1]||r.append,o=w.getIndex(),s=u.getIndex(),a=r.getInternalPath(),l=u.parent.getInternalPath(),y.forEach(function(e){u.parent.moveBefore(e,u)}),this.focus(S.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{count:y.length,fieldNames:y.map($),oldParentPath:r.getInternalPath(),newParentPath:w.parent.getInternalPath(),oldIndex:n.getIndex(),newIndex:w.getIndex(),oldIndexRedo:o,newIndexRedo:s,oldParentPathRedo:a,newParentPathRedo:l,oldSelection:i,newSelection:this.editor.getDomSelection()}))):38===m?v&&!I?((t=this._previousNode())&&(this.editor.deselect(!0),t.focus(S.focusElement||this._getElementName(f))),A=!0):!v&&C&&I&&b?((t=this._previousNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=t,c=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(c),t.focus("field")),A=!0):v&&I&&b&&((t=w._previousNode())&&t.parent&&(i=this.editor.getDomSelection(),n=(r=w.parent).childs[x.getIndex()+1]||r.append,o=w.getIndex(),s=t.getIndex(),a=r.getInternalPath(),l=t.parent.getInternalPath(),y.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(S.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{count:y.length,fieldNames:y.map($),oldParentPath:r.getInternalPath(),newParentPath:w.parent.getInternalPath(),oldIndex:n.getIndex(),newIndex:w.getIndex(),oldIndexRedo:o,newIndexRedo:s,oldParentPathRedo:a,newParentPathRedo:l,oldSelection:i,newSelection:this.editor.getDomSelection()})),A=!0):39===m?v&&!I?((g=this._nextElement(f))&&this.focus(this._getElementName(g)),A=!0):v&&I&&b&&((g=w.getDom().previousSibling)&&(t=S.getNodeFromTarget(g))&&t.parent&&!t.isVisible()&&(i=this.editor.getDomSelection(),n=(r=w.parent).childs[x.getIndex()+1]||r.append,o=w.getIndex(),s=t.getIndex(),a=r.getInternalPath(),l=t.parent.getInternalPath(),y.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(S.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{count:y.length,fieldNames:y.map($),oldParentPath:r.getInternalPath(),newParentPath:w.parent.getInternalPath(),oldIndex:n.getIndex(),newIndex:w.getIndex(),oldIndexRedo:o,newIndexRedo:s,oldParentPathRedo:a,newParentPathRedo:l,oldSelection:i,newSelection:this.editor.getDomSelection()}))):40===m&&(v&&!I?((d=this._nextNode())&&(this.editor.deselect(!0),d.focus(S.focusElement||this._getElementName(f))),A=!0):!v&&C&&I&&b?((d=this._nextNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=d,c=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(c),d.focus("field")),A=!0):v&&I&&b&&((p=(d=(d=(d=x.expanded?x.append?x.append._nextNode():void 0:x._nextNode())&&!d.isVisible()?d.parent.showMore:d)&&d instanceof L?x:d)&&(d._nextNode()||d.parent.append))&&p.parent&&(i=this.editor.getDomSelection(),n=(r=w.parent).childs[x.getIndex()+1]||r.append,o=w.getIndex(),s=p.getIndex(),a=r.getInternalPath(),l=p.parent.getInternalPath(),y.forEach(function(e){p.parent.moveBefore(e,p)}),this.focus(S.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{count:y.length,fieldNames:y.map($),oldParentPath:r.getInternalPath(),newParentPath:w.parent.getInternalPath(),oldParentPathRedo:a,newParentPathRedo:l,oldIndexRedo:o,newIndexRedo:s,oldIndex:n.getIndex(),newIndex:w.getIndex(),oldSelection:i,newSelection:this.editor.getDomSelection()})),A=!0)),A&&(e.preventDefault(),e.stopPropagation())}},{key:"_onExpand",value:function(e){var t,i,n;e&&(n=(i=(t=this.dom.tr.parentNode).parentNode).scrollTop,i.removeChild(t)),this.expanded?this.collapse(e):this.expand(e),e&&(i.appendChild(t),i.scrollTop=n),"function"==typeof this.editor.options.onExpand&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:e})}},{key:"_showColorPicker",value:function(){var t,e;"function"==typeof this.editor.options.onColorPicker&&this.dom.color&&((t=this)._deleteDomColor(),t.updateDom(),e=(0,h.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(e,this.value,function(e){"string"==typeof e&&e!==t.value&&(t._deleteDomColor(),t.value=e,t.updateDom(),t._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(t){return"object"===this.type?this.childs.filter(function(e){return e!==t}).map(function(e){return e.field}):[]}},{key:"_onInsertBefore",value:function(e,t,i){var n=this.editor.getDomSelection(),e=new S(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:i}),t=(e.expand(!0),this.getInternalPath()),i=(this.parent.insertBefore(e,this),this.editor.highlighter.unhighlight(),e.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertBeforeNodes",{nodes:[e],paths:[e.getInternalPath()],beforePath:t,parentPath:this.parent.getInternalPath(),oldSelection:n,newSelection:i})}},{key:"_onInsertAfter",value:function(e,t,i){var n=this.editor.getDomSelection(),e=new S(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:i}),t=(e.expand(!0),this.parent.insertAfter(e,this),this.editor.highlighter.unhighlight(),e.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertAfterNodes",{nodes:[e],paths:[e.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:n,newSelection:t})}},{key:"_onAppend",value:function(e,t,i){var n=this.editor.getDomSelection(),e=new S(this.editor,{field:void 0!==e?e:"",value:void 0!==t?t:"",type:i}),t=(e.expand(!0),this.parent.appendChild(e),this.editor.highlighter.unhighlight(),e.focus("field"),this.editor.getDomSelection());this.editor._onAction("appendNodes",{nodes:[e],paths:[e.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:n,newSelection:t})}},{key:"_onChangeType",value:function(e){var t,i,n=this.type;e!==n&&(t=this.editor.getDomSelection(),this.changeType(e),i=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:n,newType:e,oldSelection:t,newSelection:i}))}},{key:"sort",value:function(i,e){var t,n,r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];"string"==typeof i&&(i=(0,k.parsePath)(i)),this._hasChilds()&&(this.hideChilds(),t=this.childs,this.childs=this.childs.concat(),n="desc"===e?-1:1,"object"===this.type?this.childs.sort(function(e,t){return n*o()(e.field,t.field)}):this.childs.sort(function(e,t){var e=e.getNestedChild(i),t=t.getNestedChild(i);return e?t?(e=e.value,t=t.value,"string"!=typeof e&&"string"!=typeof t?t<e?n:e<t?-n:0:n*o()(e,t)):-n:n}),this._updateDomIndexes(),this.showChilds(),!0===r&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:t,newChilds:this.childs}))}},{key:"update",value:function(e){var t=this.getInternalValue();this.setValue(e),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var e=this.dom.tr?this.dom.tr.parentNode:void 0,t=this.expanded?this.getAppendDom():this.getDom(),t=t&&t.parentNode?t.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:e,nextTr:t}}},{key:"_attachToDom",value:function(e){e.table&&(e.nextTr?e.table.insertBefore(this.getDom(),e.nextTr):e.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(e){if(this._hasChilds()){this.hideChilds();try{var t=this.getInternalValue(),i=this.getValue(),n=this.editor.options.executeQuery(i,e),r=(this.setValue(n),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:r}),this.showChilds()}catch(e){this.showChilds(),this.editor._onError(e)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var e=this.editor.node.getInternalValue(),t=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:e,newValue:t})}catch(e){this.editor._onError(e)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(e){for(var t=0,i=this;i&&t<e.length;)i=i.findChildByProperty(e[t]),t++;return i}},{key:"findChildByProperty",value:function(t){if("object"===this.type)return this.childs.find(function(e){return e.field===t})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new L(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new A(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var e=this.parent.childs.indexOf(this);return this.parent.childs[e+1]||this.parent.append}},{key:"_previousNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode)for(var i=t;i=i.previousSibling,e=S.getNodeFromTarget(i),i&&e&&e instanceof L&&!e.isVisible(););return e}},{key:"_nextNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode)for(var i=t;i=i.nextSibling,e=S.getNodeFromTarget(i),i&&e&&e instanceof L&&!e.isVisible(););return e}},{key:"_firstNode",value:function(){var e=null,t=this.getDom();return t&&t.parentNode&&(t=t.parentNode.firstChild,e=S.getNodeFromTarget(t)),e}},{key:"_lastNode",value:function(){var e=null,t=this.getDom();if(t&&t.parentNode)for(var i=t.parentNode.lastChild,e=S.getNodeFromTarget(i);i&&e&&!e.isVisible();)i=i.previousSibling,e=S.getNodeFromTarget(i);return e}},{key:"_previousElement",value:function(e){var t=this.dom;switch(e){case t.value:if(this.fieldEditable)return t.field;case t.field:if(this._hasChilds())return t.expand;case t.expand:return t.menu;case t.menu:if(t.drag)return t.drag;default:return null}}},{key:"_nextElement",value:function(e){var t=this.dom;switch(e){case t.drag:return t.menu;case t.menu:if(this._hasChilds())return t.expand;case t.expand:if(this.fieldEditable)return t.field;case t.field:if(!this._hasChilds())return t.value;default:return null}}},{key:"_getElementName",value:function(t){var i=this;return Object.keys(this.dom).find(function(e){return i.dom[e]===t})}},{key:"_hasChilds",value:function(){return"array"===this.type||"object"===this.type}},{key:"addTemplates",value:function(t,i){var n=this,e=n.editor.options.templates;null!=e&&(e.length&&t.push({type:"separator"}),e.forEach(function(e){t.push({text:e.text,className:e.className||"jsoneditor-type-object",title:e.title,click:(i?function(e,t){n._onAppend(e,t)}:function(e,t){n._onInsertBefore(e,t)}).bind(this,e.field,e.value)})}))}},{key:"showContextMenu",value:function(e,t){var i,n=this,r=[];this.editable.value&&r.push({text:(0,l.Iu)("type"),title:(0,l.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,l.Iu)("auto"),className:"jsoneditor-type-auto"+("auto"===this.type?" jsoneditor-selected":""),title:(0,l.Iu)("autoType"),click:function(){n._onChangeType("auto")}},{text:(0,l.Iu)("array"), |
| 34 | className:"jsoneditor-type-array"+("array"===this.type?" jsoneditor-selected":""),title:(0,l.Iu)("arrayType"),click:function(){n._onChangeType("array")}},{text:(0,l.Iu)("object"),className:"jsoneditor-type-object"+("object"===this.type?" jsoneditor-selected":""),title:(0,l.Iu)("objectType"),click:function(){n._onChangeType("object")}},{text:(0,l.Iu)("string"),className:"jsoneditor-type-string"+("string"===this.type?" jsoneditor-selected":""),title:(0,l.Iu)("stringType"),click:function(){n._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&r.push({text:(0,l.Iu)("sort"),title:(0,l.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){n.showSortModal()}}),this.editor.options.enableTransform&&r.push({text:(0,l.Iu)("transform"),title:(0,l.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){n.showTransformModal()}}),this.parent&&r.push({text:(0,l.Iu)("extract"),title:(0,l.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){n.extract()}})),this.parent&&this.parent._hasChilds()&&(r.length&&r.push({type:"separator"}),i=n.parent.childs,n===i[i.length-1]&&(i=[{text:(0,l.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,l.Iu)("autoType"),click:function(){n._onAppend("","","auto")}},{text:(0,l.Iu)("array"),className:"jsoneditor-type-array",title:(0,l.Iu)("arrayType"),click:function(){n._onAppend("",[])}},{text:(0,l.Iu)("object"),className:"jsoneditor-type-object",title:(0,l.Iu)("objectType"),click:function(){n._onAppend("",{})}},{text:(0,l.Iu)("string"),className:"jsoneditor-type-string",title:(0,l.Iu)("stringType"),click:function(){n._onAppend("","","string")}}],n.addTemplates(i,!0),r.push({text:(0,l.Iu)("appendText"),title:(0,l.Iu)("appendTitle"),submenuTitle:(0,l.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){n._onAppend("","","auto")},submenu:i})),i=[{text:(0,l.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,l.Iu)("autoType"),click:function(){n._onInsertBefore("","","auto")}},{text:(0,l.Iu)("array"),className:"jsoneditor-type-array",title:(0,l.Iu)("arrayType"),click:function(){n._onInsertBefore("",[])}},{text:(0,l.Iu)("object"),className:"jsoneditor-type-object",title:(0,l.Iu)("objectType"),click:function(){n._onInsertBefore("",{})}},{text:(0,l.Iu)("string"),className:"jsoneditor-type-string",title:(0,l.Iu)("stringType"),click:function(){n._onInsertBefore("","","string")}}],n.addTemplates(i,!1),r.push({text:(0,l.Iu)("insert"),title:(0,l.Iu)("insertTitle"),submenuTitle:(0,l.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){n._onInsertBefore("","","auto")},submenu:i}),this.editable.field&&(r.push({text:(0,l.Iu)("duplicateText"),title:(0,l.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){S.onDuplicate(n)}}),r.push({text:(0,l.Iu)("removeText"),title:(0,l.Iu)("removeField"),className:"jsoneditor-remove",click:function(){S.onRemove(n)}}))),this.editor.options.onCreateMenu&&(i=n.getPath(),r=this.editor.options.onCreateMenu(r,{type:"single",path:i,paths:[i]})),new s.x(r,{close:t}).show(e,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var i=this,e=this.editor.options.modalAnchor||g.qD,t=this.getValue();(0,d.showSortModal)(e,t,function(e){var t=e.path,t=(0,k.parsePath)(t);i.sortedBy=e,i.sort(t,e.direction)},i.sortedBy)}},{key:"showTransformModal",value:function(){var t=this,e=this.editor.options,i=e.modalAnchor,n=e.createQuery,r=e.executeQuery,e=e.queryDescription,o=this.getValue();(0,u.showTransformModal)({container:i||g.qD,json:o,queryDescription:e,createQuery:n,executeQuery:r,onTransform:function(e){t.transform(e)}})}},{key:"_getType",value:function(e){return e instanceof Array?"array":e instanceof Object?"object":"string"==typeof e&&"string"!=typeof(0,k.parseString)(e)?"string":"auto"}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?String(e):(e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/^ /," ").replace(/ $/," "),e=(e=JSON.stringify(e)).substring(1,e.length-1),!0===this.editor.options.escapeUnicode?(0,k.escapeUnicodeChars)(e):e)}},{key:"_unescapeHTML",value:function(e){e='"'+this._escapeJSON(e)+'"';return(0,k.parse)(e).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(e){for(var t="",i=0;i<e.length;){var n=e.charAt(i);"\n"===n?t+="\\n":"\\"===n?(t+=n,i++,""!==(n=e.charAt(i))&&-1!=='"\\/bfnrtu'.indexOf(n)||(t+="\\"),t+=n):t+='"'===n?'\\"':n,i++}return t}},{key:"updateNodeName",value:function(){var e=this.childs?this.childs.length:0;if("object"===this.type||"array"===this.type){if(this.editor.options.onNodeName)try{var t=this.getValue.bind(this),i=this.editor.options.onNodeName({path:this.getPath(),size:e,type:this.type,get value(){return t()}})}catch(e){console.error("Error in onNodeName callback: ",e)}this.dom.value.textContent="object"===this.type?"{"+(i||e)+"}":"["+(i||e)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),"undefined"!==this.childs))for(var e in this.childs)this.childs[e].recursivelyUpdateNodeName()}}])&&f(e.prototype,t),i&&f(e,i),Object.defineProperty(e,"prototype",{writable:!1}),S}(),C=(_.prototype.DEBOUNCE_INTERVAL=150,_.prototype.MAX_SEARCH_RESULTS=999,100);function I(e){return e.getInternalPath()}function $(e){return e.getField()}function v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}_.focusElement=void 0,_.select=function(e){setTimeout(function(){(0,k.selectContentEditable)(e)},0)},_.onDragStart=function(t,e){if(!Array.isArray(t))return _.onDragStart([t],e);var i,n,r,o,s;0!==t.length&&(i=t[0],n=t[t.length-1],r=i.parent,s=_.getNodeFromTarget(e.target),o=i.editor,s=(0,k.getAbsoluteTop)(s.dom.tr)-(0,k.getAbsoluteTop)(i.dom.tr),o.mousemove||(o.mousemove=(0,k.addEventListener)(e.view,"mousemove",function(e){_.onDrag(t,e)})),o.mouseup||(o.mouseup=(0,k.addEventListener)(e.view,"mouseup",function(e){_.onDragEnd(t,e)})),o.highlighter.lock(),o.drag={oldCursor:document.body.style.cursor,oldSelection:o.getDomSelection(),oldPaths:t.map(I),oldParent:r,oldNextNode:r.childs[n.getIndex()+1]||r.append,oldParentPathRedo:r.getInternalPath(),oldIndexRedo:i.getIndex(),mouseX:e.pageX,offsetY:s,level:i.getLevel()},document.body.style.cursor="move",e.preventDefault())},_.onDrag=function(e,t){if(!Array.isArray(e))return _.onDrag([e],t);if(0!==e.length){var i,n,r,o,s,a=e[0].editor,l=t.pageY-a.drag.offsetY,c=t.pageX,h=!1,d=e[0],u=d.dom.tr,g=(0,k.getAbsoluteTop)(u),p=u.offsetHeight;if(l<g){for(I=u;I=I.previousSibling,v=_.getNodeFromTarget(I),r=I?(0,k.getAbsoluteTop)(I):0,I&&l<r;);(v=v&&!v.parent?void 0:v)||(I=(u=u.parentNode.firstChild)?u.nextSibling:void 0,(v=_.getNodeFromTarget(I))===d&&(v=void 0)),!(v=v&&v.isVisible()&&(r=(I=v.dom.tr)?(0,k.getAbsoluteTop)(I):0)+p<l?void 0:v)||!1!==a.options.limitDragging&&v.parent!==e[0].parent||(e.forEach(function(e){v.parent.moveBefore(e,v)}),h=!0)}else{var m=e[e.length-1];if(p=(u=m.expanded&&m.append?m.append.getDom():m.dom.tr)?u.nextSibling:void 0){for(o=(0,k.getAbsoluteTop)(p),i=p;n=_.getNodeFromTarget(i),i&&(s=i.nextSibling?(0,k.getAbsoluteTop)(i.nextSibling):0,s=i?s-o:0,n&&n.parent.childs.length===e.length&&n.parent.childs[e.length-1]===m&&(g+=27),i=i.nextSibling),i&&g+s<l;);if(n&&n.parent){for(var p=c-a.drag.mouseX,p=Math.round(p/24/2),f=a.drag.level+p,C=n.getLevel(),I=n.dom.tr&&n.dom.tr.previousSibling;C<f&&I;){var v=_.getNodeFromTarget(I),A=e.some(function(e){return e===v||v.isDescendantOf(e)});if(!A){if(!(v instanceof L))break;A=v.parent.childs;if(A.length===e.length&&A[e.length-1]===m)break;C=(n=_.getNodeFromTarget(I)).getLevel()}I=I.previousSibling}(n=n instanceof L&&!n.isVisible()&&n.parent.showMore.isVisible()?n._nextNode():n)&&(!1===a.options.limitDragging||n.parent===e[0].parent)&&n.dom.tr&&n.dom.tr!==u.nextSibling&&(e.forEach(function(e){n.parent.moveBefore(e,n)}),h=!0)}}}h&&(a.drag.mouseX=c,a.drag.level=d.getLevel()),a.startAutoScroll(l),t.preventDefault()}},_.onDragEnd=function(e,t){if(!Array.isArray(e))return _.onDrag([e],t);var i,n,r,o,s,a,l,c,h;0!==e.length&&(a=e[0],i=a.editor,a&&a.dom.menu&&a.dom.menu.focus(),n=i.drag.oldParent.getInternalPath(),r=a.parent.getInternalPath(),o=i.drag.oldParent===a.parent,s=i.drag.oldNextNode.getIndex(),a=a.getIndex(),l=i.drag.oldParentPathRedo,c=i.drag.oldIndexRedo,h=o&&c<a?a+e.length:a,o&&c===a||i._onAction("moveNodes",{count:e.length,fieldNames:e.map($),oldParentPath:n,newParentPath:r,oldIndex:s,newIndex:a,oldIndexRedo:c,newIndexRedo:h,oldParentPathRedo:l,newParentPathRedo:null,oldSelection:i.drag.oldSelection,newSelection:i.getDomSelection()}),document.body.style.cursor=i.drag.oldCursor,i.highlighter.unlock(),e.forEach(function(e){e.updateDom(),t.target!==e.dom.drag&&t.target!==e.dom.menu&&i.highlighter.unhighlight()}),delete i.drag,i.mousemove&&((0,k.removeEventListener)(t.view,"mousemove",i.mousemove),delete i.mousemove),i.mouseup&&((0,k.removeEventListener)(t.view,"mouseup",i.mouseup),delete i.mouseup),i.stopAutoScroll(),t.preventDefault())},_._findEnum=function(e){if(e.enum)return e.enum;e=e.oneOf||e.anyOf||e.allOf;if(e){e=e.filter(function(e){return e.enum});if(0<e.length)return e[0].enum}return null},_._findSchema=function(e,t,i){for(var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:e,r=i.slice(1,i.length),o=i[0],s=[n],a=0,l=[n.oneOf,n.anyOf,n.allOf];a<l.length;a++){var c=l[a];Array.isArray(c)&&(s=s.concat(c))}var h,d=R(s);try{for(d.s();!(h=d.n()).done;){if("$ref"in(n=h.value)&&"string"==typeof n.$ref){var u,g=n.$ref;if(g in t)n=t[g];else{if(!g.startsWith("#/")){if(1===(null==(u=g.match(/#\//g))?void 0:u.length)){var p,m,f,C=E(g.split("#/"),2),I=C[0],v=C[1];if(I in t)return p=t[I],m={$ref:"#/".concat(v)},(f=[]).push(o),0<r.length&&f.push.apply(f,S(r)),_._findSchema(p,t,f,m)}throw Error("Unable to resolve reference ".concat(g))}var A,b=g.substring(2).split("/"),n=e,y=R(b);try{for(y.s();!(A=y.n()).done;){var w=A.value;if(!(w in n))throw Error("Unable to resolve reference ".concat(g));n=n[w]}}catch(e){y.e(e)}finally{y.f()}}}if(void 0===o)return n;if("string"==typeof o){if("object"===T(n.properties)&&null!==n.properties&&o in n.properties)return n=n.properties[o],_._findSchema(e,t,r,n);if("object"===T(n.patternProperties)&&null!==n.patternProperties)for(var x in n.patternProperties)if(o.match(x))return n=n.patternProperties[x],_._findSchema(e,t,r,n);if("object"===T(n.additionalProperties))return n=n.additionalProperties,_._findSchema(e,t,r,n)}else if("number"==typeof o&&"object"===T(n.items)&&null!==n.items)return n=n.items,_._findSchema(e,t,r,n)}}catch(e){d.e(e)}finally{d.f()}return null},_.onRemove=function(e){if(!Array.isArray(e))return _.onRemove([e]);var t,i,n,r,o,s;e&&0<e.length&&(t=(n=e[0]).parent,i=n.editor,n=n.getIndex(),i.highlighter.unhighlight(),r=i.getDomSelection(),_.blurNodes(e),o=i.getDomSelection(),s=e.map(I),e.forEach(function(e){e.parent._remove(e)}),i._onAction("removeNodes",{nodes:e,paths:s,parentPath:t.getInternalPath(),index:n,oldSelection:r,newSelection:o}))},_.onDuplicate=function(e){if(!Array.isArray(e))return _.onDuplicate([e]);var t,n,i,r,o,s,a;e&&0<e.length&&(t=e[e.length-1],n=t.parent,(i=t.editor).deselect(i.multiselection.nodes),r=i.getDomSelection(),o=t,s=e.map(function(e){var t,i=e.clone();return"object"===e.parent.type&&(t=e.parent.getFieldNames(),i.field=(0,k.findUniqueName)(e.field,t)),n.insertAfter(i,o),o=i}),1===e.length?"object"===s[0].parent.type?(s[0].dom.field.innerHTML=e[0]._escapeHTML(e[0].field),s[0].focus("field")):s[0].focus():i.select(s),a=i.getDomSelection(),i._onAction("duplicateNodes",{paths:e.map(I),clonePaths:s.map(I),afterPath:t.getInternalPath(),parentPath:n.getInternalPath(),oldSelection:r,newSelection:a}))},_.getNodeFromTarget=function(e){for(;e;){if(e.node)return e.node;e=e.parentNode}},_.targetIsColorPicker=function(e){var t=_.getNodeFromTarget(e);if(t)for(var i=e&&e.parentNode;i;){if(i===t.dom.color)return!0;i=i.parentNode}return!1},_.blurNodes=function(e){var t,i;Array.isArray(e)?(t=(i=e[0]).parent,i=i.getIndex(),(t.childs[i+e.length]?t.childs[i+e.length]:t.childs[i-1]||t).focus()):_.blurNodes([e])};(i.prototype=new _).getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr"),i=(t.className="jsoneditor-append",t.node=this,e.tr=t,"tree"===this.editor.options.mode&&(e.tdDrag=document.createElement("td"),n=document.createElement("td"),e.tdMenu=n,(i=document.createElement("button")).type="button",i.className="jsoneditor-button jsoneditor-contextmenu-button",i.title="Click to open the actions menu (Ctrl+M)",e.menu=i,n.appendChild(e.menu)),document.createElement("td")),n=document.createElement("div");return n.appendChild(document.createTextNode("("+(0,l.Iu)("empty")+")")),n.className="jsoneditor-readonly",i.appendChild(n),e.td=i,e.text=n,this.updateDom(),t},i.prototype.getPath=function(){return null},i.prototype.getIndex=function(){return null},i.prototype.updateDom=function(e){var t=this.dom,i=t.td,n=(i&&(i.style.paddingLeft=24*this.getLevel()+26+"px"),t.text),n=(n&&(n.firstChild.nodeValue="("+(0,l.Iu)("empty")+" "+this.parent.type+")"),t.tr);this.isVisible()?t.tr.firstChild||(t.tdDrag&&n.appendChild(t.tdDrag),t.tdMenu&&n.appendChild(t.tdMenu),n.appendChild(i)):t.tr.firstChild&&(t.tdDrag&&n.removeChild(t.tdDrag),t.tdMenu&&n.removeChild(t.tdMenu),n.removeChild(i))},i.prototype.isVisible=function(){return 0===this.parent.childs.length},i.prototype.showContextMenu=function(e,t){var i,n=this,r=[{text:(0,l.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,l.Iu)("autoType"),click:function(){n._onAppend("","","auto")}},{text:(0,l.Iu)("array"),className:"jsoneditor-type-array",title:(0,l.Iu)("arrayType"),click:function(){n._onAppend("",[])}},{text:(0,l.Iu)("object"),className:"jsoneditor-type-object",title:(0,l.Iu)("objectType"),click:function(){n._onAppend("",{})}},{text:(0,l.Iu)("string"),className:"jsoneditor-type-string",title:(0,l.Iu)("stringType"),click:function(){n._onAppend("","","string")}}],r=(n.addTemplates(r,!0),[{text:(0,l.Iu)("appendText"),title:(0,l.Iu)("appendTitleAuto"),submenuTitle:(0,l.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){n._onAppend("","","auto")},submenu:r}]);this.editor.options.onCreateMenu&&(i=n.parent.getPath(),r=this.editor.options.onCreateMenu(r,{type:"append",path:i,paths:[i]})),new s.x(r,{close:t}).show(e,this.editor.getPopupAnchor())},i.prototype.onEvent=function(e){var t,i=e.type,n=e.target||e.srcElement,r=this.dom;n===r.menu&&("mouseover"===i?this.editor.highlighter.highlight(this.parent):"mouseout"===i&&this.editor.highlighter.unhighlight()),"click"===i&&n===r.menu&&((t=this.editor.highlighter).highlight(this.parent),t.lock(),(0,k.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,function(){(0,k.removeClassName)(r.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()})),"keydown"===i&&this.onKeyDown(e)};var L=i;function i(e){this.editor=e,this.dom={}}(b.prototype=new _).getDom=function(){var t,i,e,n,r,o;return this.dom.tr||(this._updateEditability(),this.dom.tr||(i=(t=this).parent,(r=document.createElement("a")).appendChild(document.createTextNode((0,l.Iu)("showMore"))),r.href="#",r.onclick=function(e){return i.visibleChilds=Math.floor(i.visibleChilds/i.getMaxVisibleChilds()+1)*i.getMaxVisibleChilds(),t.updateDom(),i.showChilds(),e.preventDefault(),!1},(o=document.createElement("a")).appendChild(document.createTextNode((0,l.Iu)("showAll"))),o.href="#",o.onclick=function(e){return i.visibleChilds=1/0,t.updateDom(),i.showChilds(),e.preventDefault(),!1},e=document.createElement("div"),n=document.createTextNode(this._getShowMoreText()),e.className="jsoneditor-show-more",e.appendChild(n),e.appendChild(r),e.appendChild(document.createTextNode(". ")),e.appendChild(o),e.appendChild(document.createTextNode(". ")),(r=document.createElement("td")).appendChild(e),o=document.createElement("tr"),"tree"===this.editor.options.mode&&(o.appendChild(document.createElement("td")),o.appendChild(document.createElement("td"))),o.appendChild(r),o.className="jsoneditor-show-more",this.dom.tr=o,this.dom.moreContents=e,this.dom.moreText=n),this.updateDom()),this.dom.tr},b.prototype.updateDom=function(e){var t;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(t=this.parent._getNextTr())&&t.parentNode.insertBefore(this.dom.tr,t),this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"):this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},b.prototype._getShowMoreText=function(){return(0,l.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},b.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},b.prototype.onEvent=function(e){"keydown"===e.type&&this.onKeyDown(e)};var A=b;function b(e,t){this.editor=e,this.parent=t,this.dom={}}function y(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var P=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function o(e){return t.node.findNodeByInternalPath(e)}this.editor=t,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(e){o(e.parentPath).childs[e.index].updateField(e.oldValue)},redo:function(e){o(e.parentPath).childs[e.index].updateField(e.newValue)}},editValue:{undo:function(e){o(e.path).updateValue(e.oldValue)},redo:function(e){o(e.path).updateValue(e.newValue)}},changeType:{undo:function(e){o(e.path).changeType(e.oldType)},redo:function(e){o(e.path).changeType(e.newType)}},appendNodes:{undo:function(e){var t=o(e.parentPath);e.paths.map(o).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=o(e.parentPath);e.nodes.forEach(function(e){t.appendChild(e)})}},insertBeforeNodes:{undo:function(e){var t=o(e.parentPath);e.paths.map(o).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=o(e.parentPath),i=o(e.beforePath);e.nodes.forEach(function(e){t.insertBefore(e,i)})}},insertAfterNodes:{undo:function(e){var t=o(e.parentPath);e.paths.map(o).forEach(function(e){t.removeChild(e)})},redo:function(e){var t=o(e.parentPath),i=o(e.afterPath);e.nodes.forEach(function(e){t.insertAfter(e,i),i=e})}},removeNodes:{undo:function(e){var t=o(e.parentPath),i=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,i)})},redo:function(e){var t=o(e.parentPath);e.paths.map(o).forEach(function(e){t.removeChild(e)})}},duplicateNodes:{undo:function(e){var t=o(e.parentPath);e.clonePaths.map(o).forEach(function(e){t.removeChild(e)})},redo:function(e){var n=o(e.parentPath),r=o(e.afterPath);e.paths.map(o).forEach(function(e){var t,i=e.clone();"object"===n.type&&(t=n.getFieldNames(),i.field=(0,k.findUniqueName)(e.field,t)),n.insertAfter(i,r),r=i})}},moveNodes:{undo:function(i){var n=o(i.oldParentPath),e=o(i.newParentPath),r=n.childs[i.oldIndex]||n.append;e.childs.slice(i.newIndex,i.newIndex+i.count).forEach(function(e,t){e.field=i.fieldNames[t],n.moveBefore(e,r)}),null===i.newParentPathRedo&&(i.newParentPathRedo=e.getInternalPath())},redo:function(i){var e=o(i.oldParentPathRedo),n=o(i.newParentPathRedo),r=n.childs[i.newIndexRedo]||n.append;e.childs.slice(i.oldIndexRedo,i.oldIndexRedo+i.count).forEach(function(e,t){e.field=i.fieldNames[t],n.moveBefore(e,r)})}},sort:{undo:function(e){var t=o(e.path);t.hideChilds(),t.childs=e.oldChilds,t.updateDom({updateIndexes:!0}),t.showChilds()},redo:function(e){var t=o(e.path);t.hideChilds(),t.childs=e.newChilds,t.updateDom({updateIndexes:!0}),t.showChilds()}},transform:{undo:function(e){o(e.path).setInternalValue(e.oldValue)},redo:function(e){o(e.path).setInternalValue(e.newValue)}}}}var t,i,n;return t=e,(i=[{key:"onChange",value:function(){}},{key:"add",value:function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.undo){if(t.undo(e.params),e.params.oldSelection)try{this.editor.setDomSelection(e.params.oldSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.redo){if(t.redo(e.params),e.params.newSelection)try{this.editor.setDomSelection(e.params.newSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&y(t.prototype,i),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function B(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var F=function(){function r(e,t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");var i=this,e=(this.editor=e,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=t,document.createElement("div")),t=((this.dom.wrapper=e).className="jsoneditor-search",t.appendChild(e),document.createElement("div")),t=((this.dom.results=t).className="jsoneditor-results",e.appendChild(t),document.createElement("div")),e=((this.dom.input=t).className="jsoneditor-frame",t.title=(0,l.Iu)("searchTitle"),e.appendChild(t),document.createElement("button")),n=(e.type="button",e.className="jsoneditor-refresh",t.appendChild(e),document.createElement("input")),e=(n.type="text",(this.dom.search=n).oninput=function(e){i._onDelayedSearch(e)},n.onchange=function(e){i._onSearch()},n.onkeydown=function(e){i._onKeyDown(e)},n.onkeyup=function(e){i._onKeyUp(e)},e.onclick=function(e){n.select()},t.appendChild(n),document.createElement("button")),e=(e.type="button",e.title=(0,l.Iu)("searchNextResultTitle"),e.className="jsoneditor-next",e.onclick=function(){i.next()},t.appendChild(e),document.createElement("button"));e.type="button",e.title=(0,l.Iu)("searchPreviousResultTitle"),e.className="jsoneditor-previous",e.onclick=function(){i.previous()},t.appendChild(e)}var e,t,i;return e=r,(t=[{key:"next",value:function(e){var t;this.results&&((t=null!==this.resultIndex?this.resultIndex+1:0)>this.results.length-1&&(t=0),this._setActiveResult(t,e))}},{key:"previous",value:function(e){var t,i;this.results&&(t=this.results.length-1,i=null!==this.resultIndex?this.resultIndex-1:t,this._setActiveResult(i=i<0?t:i,e))}},{key:"_setActiveResult",value:function(e,t){var i,n,r;this.activeResult&&(i=this.activeResult.node,"field"===this.activeResult.elem?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()),this.results&&this.results[e]?(this.resultIndex=e,n=this.results[this.resultIndex].node,"field"===(r=this.results[this.resultIndex].elem)?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo(function(){t&&n.focus(r)})):(this.resultIndex=void 0,this.activeResult=void 0)}},{key:"_clearDelay",value:function(){void 0!==this.timeout&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)}},{key:"_onSearch",value:function(e){this._clearDelay();var t=this.dom.search.value,t=0<t.length?t:void 0;if(t!==this.lastText||e){this.lastText=t,this.results=this.editor.search(t);var e=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,i=0;if(this.activeResult)for(var n=0;n<this.results.length;n++)if(this.results[n].node===this.activeResult.node){i=n;break}this._setActiveResult(i,!1),void 0!==t?(t=this.results.length,this.dom.results.textContent=0===t?"no results":1===t?"1 result":e<t?e+"+ results":t+" results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(e){var t=e.which;27===t?(this.dom.search.value="",this._onSearch(),e.preventDefault(),e.stopPropagation()):13===t&&(e.ctrlKey?this._onSearch(!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())}},{key:"_onKeyUp",value:function(e){var t=e.keyCode;27!==t&&13!==t&&this._onDelayedSearch(e)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return""===this.dom.search.value}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&B(e.prototype,t),i&&B(e,i),Object.defineProperty(e,"prototype",{writable:!1}),r}();function W(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var M=function(){function i(e,t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");e&&(this.root=t,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,e.appendChild(this.path),this.reset())}var e,t,n;return e=i,(t=[{key:"reset",value:function(){this.path.textContent=(0,l.Iu)("selectNode")}},{key:"setPath",value:function(r){var o=this;this.path.textContent="",r&&r.length&&r.forEach(function(i,n){var e,t=document.createElement("span");t.className="jsoneditor-treepath-element",t.innerText=i.name,t.onclick=function(e){this.selectionCallback&&this.selectionCallback(e)}.bind(o,i),o.path.appendChild(t),i.children.length&&((e=document.createElement("span")).className="jsoneditor-treepath-seperator",e.textContent="►",e.onclick=function(){o.contentMenuClicked=!0;var t=[];i.children.forEach(function(e){t.push({text:e.name,className:"jsoneditor-type-modes"+(r[n+1]+1&&r[n+1].name===e.name?" jsoneditor-selected":""),click:function(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}.bind(o,i,e.name)})}),new s.x(t,{limitHeight:!0}).show(e,o.root,!0)},o.path.appendChild(e)),n===r.length-1&&(t=(e||t).getBoundingClientRect().right,o.path.offsetWidth<t&&(o.path.scrollLeft=t),o.path.scrollLeft&&((t=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",t.title="show all path",t.textContent="...",t.onclick=function(e){(o.contentMenuClicked=!1,k.addClassName)(o.path,"show-all"),o.path.style.width=o.path.parentNode.getBoundingClientRect().width-10+"px",o.path.onblur=function(){o.contentMenuClicked?(o.contentMenuClicked=!1,o.path.focus()):((0,k.removeClassName)(o.path,"show-all"),o.path.onblur=void 0,o.path.style.width="",o.setPath(e))}}.bind(o,r),o.path.insertBefore(t,o.path.firstChild)))})}},{key:"onSectionSelected",value:function(e){"function"==typeof e&&(this.selectionCallback=e)}},{key:"onContextMenuItemSelected",value:function(e){"function"==typeof e&&(this.contextMenuCallback=e)}}])&&W(e.prototype,t),n&&W(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(),e=t(8037),N=t.n(e),t={},H=(t.create=function(e,t){if(!e)throw new Error("No container element provided.");function o(e){var t,i;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(i=window.getSelection()).removeAllRanges(),i.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())}function s(e){return void 0===i&&((i=document.createElement("span")).style.visibility="hidden",i.style.position="fixed",i.style.outline="0",i.style.margin="0",i.style.padding="0",i.style.border="0",i.style.left="0",i.style.whiteSpace="pre",i.style.fontSize=r,i.style.fontFamily=u,i.style.fontWeight="normal",document.body.appendChild(i)),i.textContent=e,i.getBoundingClientRect().right}function a(){this.style.backgroundColor="#ddd"}function l(){this.style.backgroundColor=""}function c(){I.hide(),I.onmouseselection(this.__hint,I.rs)}var h,i,d,r,u,g,p,m,f,C,n,I,v,A,b,y;this.container=e,this.dom={},this.highlighter=new x,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.lastSchemaErrors=void 0,this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=((h=(h=t.autocomplete)||{}).filter=h.filter||"start",h.trigger=h.trigger||"keydown",h.confirmKeys=h.confirmKeys||[39,35,9],h.caseSensitive=h.caseSensitive||!1,u=r="",(g=document.createElement("div")).style.position="relative",g.style.outline="0",g.style.border="0",g.style.margin="0",g.style.padding="0",(p=document.createElement("div")).className="autocomplete dropdown",p.style.position="absolute",p.style.visibility="hidden",m=p,f=[],n=-1,A=I={rs:v={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:C=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:g,show:function(e,t,i){var n=this;this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""===r&&(r=window.getComputedStyle(e).getPropertyValue("font-size")),""===u&&(u=window.getComputedStyle(e).getPropertyValue("font-family")),p.style.marginLeft="0",p.style.marginTop=e.getBoundingClientRect().height+"px",this.options=i.map(String),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(){n.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",b),this.element.addEventListener("keydown",b,!1),this.element.removeEventListener("blur",y),this.element.addEventListener("blur",y,!1)),g.appendChild(this.elementHint),g.appendChild(p),e.parentElement.appendChild(g),this.repaint(e)},setText:function(e){this.element.innerText=e},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,A.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(e){var e=(e=e.innerText).replace("\n",""),t=this.options.length,i=e.substring(this.startFrom);d=e.substring(0,this.startFrom);for(var n=0;n<t;n++){var r=this.options[n];if(!h.caseSensitive&&0===r.toLowerCase().indexOf(i.toLowerCase())||h.caseSensitive&&0===r.indexOf(i)){this.elementHint.innerText=d+i+r.substring(i.length),this.elementHint.realInnerText=d+r;break}}p.style.left=s(d)+"px",A.refresh(i,this.options),this.elementHint.style.width=s(this.elementHint.innerText)+10+"px","hidden"!==p.style.visibility&&(this.elementHint.style.width=s(this.elementHint.innerText)+p.clientWidth+"px")}},hide:function(){m.style.visibility="hidden"},refresh:function(n,e){m.style.visibility="hidden",C=0,m.textContent="";var t=window.innerHeight||document.documentElement.clientHeight,i=m.parentNode.getBoundingClientRect(),r=i.top-6,t=t-i.bottom-6,o=(f=[],"function"==typeof h.filter?h.filter:w[h.filter]),i=o?e.filter(function(e){return o(h.caseSensitive?n:n.toLowerCase(),h.caseSensitive?e:e.toLowerCase(),h)}):[];0===(f=i.map(function(e){var t=document.createElement("div"),i=(t.className="item",t.onmouseover=a,t.onmouseout=l,t.onmousedown=c,t.__hint=e,t.textContent="",t.appendChild(document.createTextNode(e.substring(0,n.length))),document.createElement("b"));return i.appendChild(document.createTextNode(e.substring(n.length))),t.appendChild(i),m.appendChild(t),t})).length||1===f.length&&(n.toLowerCase()===f[0].__hint.toLowerCase()&&!h.caseSensitive||n===f[0].__hint&&h.caseSensitive)||f.length<2||(I.highlight(0),3*t<r?(m.style.maxHeight=r+"px",m.style.top="",m.style.bottom="100%"):(m.style.top="100%",m.style.bottom="",m.style.maxHeight=t+"px"),m.style.visibility="visible")},highlight:function(e){-1!==n&&f[n]&&(f[n].className="item"),f[e].className="item hover",n=e},move:function(e){return"hidden"===m.style.visibility?"":(C+e!==-1&&C+e!==f.length&&(C+=e,I.highlight(C)),f[C].__hint)},onmouseselection:function(){}},b=function(e){var t=(e=e||window.event).keyCode;if(null!=this.elementHint&&33!==t&&34!==t)if(27===t)v.hideDropDown(),v.element.focus(),e.preventDefault(),e.stopPropagation();else{var i,n=(n=this.element.innerText).replace("\n","");if(0<=h.confirmKeys.indexOf(t))9===t&&0===this.elementHint.innerText.length&&v.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,v.hideDropDown(),o(this.element),9===t&&(v.element.focus(),e.preventDefault(),e.stopPropagation()));else if(13===t)if(0===this.elementHint.innerText.length)v.onEnter();else{var r="hidden"===p.style.visibility;if(A.hide(),r)return v.hideDropDown(),v.element.focus(),void v.onEnter();this.element.innerText=this.elementHint.realInnerText,v.hideDropDown(),o(this.element),e.preventDefault(),e.stopPropagation()}else 40===t?(r=n.substring(this.startFrom),""===(i=A.move(1))&&v.onArrowDown(),this.elementHint.innerText=d+r+i.substring(r.length),this.elementHint.realInnerText=d+i,e.preventDefault(),e.stopPropagation()):38===t&&(r=n.substring(this.startFrom),""===(i=A.move(-1))&&v.onArrowUp(),this.elementHint.innerText=d+r+i.substring(r.length),this.elementHint.realInnerText=d+i,e.preventDefault(),e.stopPropagation())}}.bind(v),y=function(e){v.hideDropDown()},A.onmouseselection=function(e,t){t.element.innerText=t.elementHint.innerText=d+e,t.hideDropDown(),window.setTimeout(function(){t.element.focus(),o(t.element)},1)},v)),this.options.history&&"view"!==this.options.mode&&(this.history=new P(this)),this._createFrame(),this._createTable()},t.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),this.frameFocusTracker.destroy()},t._setOptions=function(t){var i=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,limitDragging:!1,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,i){var n;N()?(n=e.getBoundingClientRect().top,n=(0,k.getWindow)(e).innerHeight-n<300&&300<n,new(N())({parent:e,color:t,popup:n?"top":"bottom",onDone:function(e){e=1===e.rgba[3]?e.hex.substr(0,7):e.hex;i(e)}}).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,timestampFormat:null,createQuery:n.r,executeQuery:n.J,onEvent:null,enableSort:!0,enableTransform:!0},t&&(Object.keys(t).forEach(function(e){i.options[e]=t[e]}),null==t.limitDragging&&null!=t.schema&&(this.options.limitDragging=!0)),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,k.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),t.onSelectionChange&&this.onSelectionChange(t.onSelectionChange),(0,l.cC)(this.options.languages),(0,l.m0)(this.options.language)},t.set=function(e){e instanceof Function||void 0===e?this.clear():(this.content.removeChild(this.table),e={field:this.options.name,value:e},e=new _(this,e),this._setRoot(e),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},t.update=function(e){var t,i;this.node.deepEqual(e)||(t=this.getSelection(),this.onChangeDisabled=!0,this.node.update(e),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),t&&t.start&&t.end&&(e=this.node.findNodeByPath(t.start.path),i=this.node.findNodeByPath(t.end.path),e&&i)?this.setSelection(t.start,t.end):this.setSelection({},{}))},t.get=function(){if(this.node)return this.node.getValue()},t.getText=function(){return JSON.stringify(this.get())},t.setText=function(t){try{this.set((0,k.parse)(t))}catch(e){t=(0,k.tryJsonRepair)(t);this.set((0,k.parse)(t))}},t.updateText=function(t){try{this.update((0,k.parse)(t))}catch(e){t=(0,k.tryJsonRepair)(t);this.update((0,k.parse)(t))}},t.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},t.getName=function(){return this.options.name},t.focus=function(){var e=this.scrollableContent.querySelector("[contenteditable=true]");e?e.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(e=this.frame.querySelector("button"))&&e.focus()},t.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},t._setRoot=function(e){this.clear(),(this.node=e).setParent(null),e.setField(this.getName(),!1),delete e.index,this.tbody.appendChild(e.getDom())},t.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},t.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},t.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},t.expand=function(e){var t;!e||(t=this.node?this.node.findNodeByPath(e.path):null)&&(e.isExpand?t.expand(e.recursive):t.collapse(e.recursive))},t._onAction=function(e,t){this.history&&this.history.add(e,t),this._onChange()},t._onChange=function(){if(!this.onChangeDisabled){var e;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((e=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(e.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(e){console.error("Error in onNodeName callback: ",e)}}},t.validate=function(){var t=this,i=this.node;if(i){var e=i.getValue(),n=[];this.validateSchema&&!this.validateSchema(e)&&(n=this.validateSchema.errors.map(function(e){return(0,k.improveSchemaError)(e)}).map(function(e){return{node:i.findNode(e.dataPath),error:e,type:"validation"}}).filter(function(e){return null!=e.node}));try{this.validationSequence++;var r=this,o=this.validationSequence;return this._validateCustom(e).then(function(e){return o===r.validationSequence&&(e=[].concat(n,e||[]),r._renderValidationErrors(e),"function"==typeof t.options.onValidationError&&(0,k.isValidationErrorChanged)(e,t.lastSchemaErrors)&&t.options.onValidationError.call(t,e),t.lastSchemaErrors=e),t.lastSchemaErrors})}catch(e){return Promise.reject(e)}}},t._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},t._renderValidationErrors=function(e){this.errorNodes&&this.errorNodes.forEach(function(e){e.setError(null)});var t=e.reduce(function(e,t){return t.node.findParents().filter(function(t){return!e.some(function(e){return e[0]===t})}).map(function(e){return[e,t.node]}).concat(e)},[]);this.errorNodes=t.map(function(e){return{node:e[0],child:e[1],error:{message:"object"===e[0].type?(0,l.Iu)("containsInvalidProperties"):(0,l.Iu)("containsInvalidItems")}}}).concat(e).map(function(e){return e.node.setError(e.error,e.child),e.node})},t._validateCustom=function(e){try{var i,t;if(this.options.onValidate)return i=this.node,t=this.options.onValidate(e),((0,k.isPromise)(t)?t:Promise.resolve(t)).then(function(e){return Array.isArray(e)?e.filter(function(e){var t=(0,k.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t}).map(function(e){var t;try{t=e&&e.path?i.findNodeByPath(e.path):null}catch(e){}return t||console.warn("Ignoring validation error: node not found. Path:",e.path,"Error:",e),{node:t,error:e,type:"customValidation"}}).filter(function(e){return e&&e.node&&e.error&&e.error.message}):null})}catch(e){return Promise.reject(e)}return Promise.resolve(null)},t.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},t.startAutoScroll=function(e){var t=this,i=this.scrollableContent,n=(0,k.getAbsoluteTop)(i),r=i.clientHeight,o=n+r;e<n+24&&0<i.scrollTop?this.autoScrollStep=(n+24-e)/3:o-24<e&&r+i.scrollTop<i.scrollHeight?this.autoScrollStep=(o-24-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){t.autoScrollStep?i.scrollTop-=t.autoScrollStep:t.stopAutoScroll()},50)):this.stopAutoScroll()},t.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},t.setDomSelection=function(e){var t,i,n;e&&("scrollTop"in e&&this.scrollableContent&&(this.scrollableContent.scrollTop=e.scrollTop),e.paths?(t=this,i=e.paths.map(function(e){return t.node.findNodeByInternalPath(e)}),this.select(i)):(n=(i=e.path?this.node.findNodeByInternalPath(e.path):null)&&e.domName?i.dom[e.domName]:null,e.range&&n?(e=Object.assign({},e.range,{container:n}),(0,k.setSelectionOffset)(e)):i&&i.focus()))},t.getDomSelection=function(){var t=_.getNodeFromTarget(this.focusTarget),i=this.focusTarget,e=t?Object.keys(t.dom).find(function(e){return t.dom[e]===i}):null,n=(0,k.getSelectionOffset)();return(n=(n=n&&"DIV"!==n.container.nodeName?null:n)&&n.container!==i?null:n)&&delete n.container,{path:t?t.getInternalPath():null,domName:e,range:n,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(e){return e.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},t.scrollTo=function(e,i){var n,t,r,o,s=this.scrollableContent;s?((n=this).animateTimeout&&(clearTimeout(n.animateTimeout),delete n.animateTimeout),n.animateCallback&&(n.animateCallback(!1),delete n.animateCallback),t=s.clientHeight,r=s.scrollHeight-t,o=Math.min(Math.max(e-t/4,0),r),function e(){var t=s.scrollTop,t=o-t;3<Math.abs(t)?(s.scrollTop+=t/3,n.animateCallback=i,n.animateTimeout=setTimeout(e,50)):(i&&i(!0),s.scrollTop=o,delete n.animateTimeout,delete n.animateCallback)}()):i&&i(!1)},t._createFrame=function(){var e=this,t=(this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame),this.contentOuter=document.createElement("div"),this.contentOuter.className="jsoneditor-outer",this);function i(e){t._onEvent&&t._onEvent(e)}var n,r,o,s={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new a.R(s),this.frame.onclick=function(e){var t=e.target;i(e),"BUTTON"===t.nodeName&&e.preventDefault()},this.frame.oninput=i,this.frame.onchange=i,this.frame.onkeydown=i,this.frame.onkeyup=i,this.frame.oncut=i,this.frame.onpaste=i,this.frame.onmousedown=i,this.frame.onmouseup=i,this.frame.onmouseover=i,this.frame.onmouseout=i,(0,k.addEventListener)(this.frame,"focus",i,!0),(0,k.addEventListener)(this.frame,"blur",i,!0),this.frame.onfocusin=i,this.frame.onfocusout=i,this.options.mainMenuBar&&((0,k.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(s=document.createElement("button")).type="button",s.className="jsoneditor-expand-all",s.title=(0,l.Iu)("expandAll"),s.onclick=function(){t.expandAll(),"function"==typeof e.options.onExpand&&e.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(s),(s=document.createElement("button")).type="button",s.title=(0,l.Iu)("collapseAll"),s.className="jsoneditor-collapse-all",s.onclick=function(){t.collapseAll(),"function"==typeof e.options.onExpand&&e.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(s),this.options.enableSort&&((s=document.createElement("button")).type="button",s.className="jsoneditor-sort",s.title=(0,l.Iu)("sortTitleShort"),s.onclick=function(){t.node.showSortModal()},this.menu.appendChild(s)),this.options.enableTransform&&((s=document.createElement("button")).type="button",s.title=(0,l.Iu)("transformTitleShort"),s.className="jsoneditor-transform",s.onclick=function(){t.node.showTransformModal()},this.menu.appendChild(s)),this.history&&((n=document.createElement("button")).type="button",n.className="jsoneditor-undo jsoneditor-separator",n.title=(0,l.Iu)("undo"),n.onclick=function(){t._onUndo()},this.menu.appendChild(n),this.dom.undo=n,(r=document.createElement("button")).type="button",r.className="jsoneditor-redo",r.title=(0,l.Iu)("redo"),r.onclick=function(){t._onRedo()},this.menu.appendChild(r),this.dom.redo=r,this.history.onChange=function(){n.disabled=!t.history.canUndo(),r.disabled=!t.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((o=this).modeSwitcher=new c.x(this.menu,this.options.modes,this.options.mode,function(e){try{o.setMode(e),o.modeSwitcher.focus()}catch(e){o._onError(e)}})),this.options.search&&(this.searchBox=new F(this,this.menu))),this.options.navigationBar&&(this.navBar=document.createElement("div"),this.navBar.className="jsoneditor-navigation-bar nav-bar-empty",this.frame.appendChild(this.navBar),this.treePath=new M(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},t._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},t._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},t._onEvent=function(e){if(!_.targetIsColorPicker(e.target)){var t,i=_.getNodeFromTarget(e.target);if("keydown"===e.type&&this._onKeyDown(e),i&&"focus"===e.type&&(this.focusTarget=e.target,this.options.autocomplete&&"focus"===this.options.autocomplete.trigger&&this._showAutoComplete(e.target)),"mousedown"===e.type&&this._startDragDistance(e),"mousemove"!==e.type&&"mouseup"!==e.type&&"click"!==e.type||this._updateDragDistance(e),i&&this.options&&this.options.navigationBar&&i&&("keydown"===e.type||"mousedown"===e.type)&&(t=this,setTimeout(function(){t._updateTreePath(i.getNodePath())})),i&&i.selected){if("click"===e.type){if(e.target===i.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"===e.type&&_.onDragStart(this.multiselection.nodes,e)}else"mousedown"===e.type&&(0,k.hasParentNode)(e.target,this.content)&&(this.deselect(),i&&e.target===i.dom.drag?_.onDragStart(i,e):i&&(e.target===i.dom.field||e.target===i.dom.value||e.target===i.dom.select)||this._onMultiSelectStart(e));i&&i.onEvent(e)}},t._updateTreePath=function(e){var i;function n(e){return e.parent?"array"===e.parent.type?e.index:e.field:e.field||e.type}e&&e.length?((0,k.removeClassName)(this.navBar,"nav-bar-empty"),i=[],e.forEach(function(e){var t={name:n(e),node:e,children:[]};e.childs&&e.childs.length&&e.childs.forEach(function(e){t.children.push({name:n(e),node:e})}),i.push(t)}),this.treePath.setPath(i)):(0,k.addClassName)(this.navBar,"nav-bar-empty")},t._onTreePathSectionSelected=function(e){e&&e.node&&(e.node.expandTo(),e.node.focus())},t._onTreePathMenuItemSelected=function(e,t){e&&e.children.length&&((e=e.children.find(function(e){return e.name===t}))&&e.node&&(this._updateTreePath(e.node.getNodePath()),e.node.expandTo(),e.node.focus()))},t._startDragDistance=function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},t._updateDragDistance=function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,i=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+i*i),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},t._onMultiSelectStart=function(e){var t,i=_.getNodeFromTarget(e.target);"tree"===this.options.mode&&void 0===this.options.onEditable&&(this.multiselection={start:i||null,end:null,nodes:[]},this._startDragDistance(e),(t=this).mousemove||(this.mousemove=(0,k.addEventListener)(e.view,"mousemove",function(e){t._onMultiSelect(e)})),this.mouseup||(this.mouseup=(0,k.addEventListener)(e.view,"mouseup",function(e){t._onMultiSelectEnd(e)})),e.preventDefault())},t._onMultiSelect=function(e){var t;e.preventDefault(),this._updateDragDistance(e),e.hasMoved&&((e=_.getNodeFromTarget(e.target))&&(null==this.multiselection.start&&(this.multiselection.start=e),this.multiselection.end=e),this.deselect(),e=this.multiselection.start,t=this.multiselection.end||this.multiselection.start,e&&t&&(this.multiselection.nodes=this._findTopLevelNodes(e,t),this.multiselection.nodes&&this.multiselection.nodes.length&&(e=this.multiselection.nodes[0],this.multiselection.start===e||this.multiselection.start.isDescendantOf(e)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes)))},t._onMultiSelectEnd=function(e){var t=this.multiselection.nodes[0];t&&t.dom.menu&&t.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,k.removeEventListener)(e.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,k.removeEventListener)(e.view,"mouseup",this.mouseup),delete this.mouseup)},t.deselect=function(e){var t=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(e){e.setSelected(!1)}),this.multiselection.nodes=[],e&&(this.multiselection.start=null,this.multiselection.end=null),t&&this._selectionChangedHandler&&this._selectionChangedHandler()},t.select=function(e){if(!Array.isArray(e))return this.select([e]);var t;e&&(this.deselect(),this.multiselection.nodes=e.slice(0),t=e[0],e.forEach(function(e){e.expandPathToNode(),e.setSelected(!0,e===t)}),this._selectionChangedHandler&&(e=this.getSelection(),this._selectionChangedHandler(e.start,e.end)))},t._findTopLevelNodes=function(e,t){for(var i=e.getNodePath(),n=t.getNodePath(),r=0;r<i.length&&i[r]===n[r];)r++;var o,e=i[r-1],t=i[r],s=n[r];return t&&s||(e.parent?e=(s=t=e).parent:(t=e.childs[0],s=e.childs[e.childs.length-1])),e&&t&&s?(t=e.childs.indexOf(t),s=e.childs.indexOf(s),o=Math.min(t,s),t=Math.max(t,s),e.childs.slice(o,t+1)):[]},t._showAutoComplete=function(t){var i,n=_.getNodeFromTarget(t),r="";0<=t.className.indexOf("jsoneditor-value")&&(r="value"),""!==(r=0<=t.className.indexOf("jsoneditor-field")?"field":r)&&(i=this,setTimeout(function(){var e;!n||!("focus"===i.options.autocomplete.trigger||0<t.innerText.length)||null===(e=i.options.autocomplete.getOptions(t.innerText,n.getPath(),r,n.editor))?i.autocomplete.hideDropDown():"function"==typeof e.then?e.then(function(e){null===e?i.autocomplete.hideDropDown():e.options?i.autocomplete.show(t,e.startFrom,e.options):i.autocomplete.show(t,0,e)}).catch(function(e){console.error(e)}):e.options?i.autocomplete.show(t,e.startFrom,e.options):i.autocomplete.show(t,0,e)},50))},t._onKeyDown=function(e){var t,i=e.which||e.keyCode,n=e.altKey,r=e.ctrlKey,o=e.metaKey,s=e.shiftKey,a=!1,l=this.focusTarget;9===i&&(t=this,setTimeout(function(){t.focusTarget!==l&&(0,k.selectContentEditable)(t.focusTarget)},0)),this.searchBox&&(r&&70===i?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),a=!0):(114===i||r&&71===i)&&(s?this.searchBox.previous(!0):this.searchBox.next(!0),a=!0)),this.history&&(r&&!s&&90===i?(this._onUndo(),a=!0):r&&s&&90===i&&(this._onRedo(),a=!0)),!this.options.autocomplete||a||r||n||o||1!==e.key.length&&8!==i&&46!==i||(a=!1,this._showAutoComplete(e.target)),a&&(e.preventDefault(),e.stopPropagation())},t._createTable=function(){var e;this.options.navigationBar&&(0,k.addClassName)(this.contentOuter,"has-nav-bar"),this.scrollableContent=document.createElement("div"),this.scrollableContent.className="jsoneditor-tree",this.contentOuter.appendChild(this.scrollableContent),this.content=document.createElement("div"),this.content.className="jsoneditor-tree-inner",this.scrollableContent.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&((e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e)),(e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e),e=document.createElement("col"),this.colgroupContent.appendChild(e),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},t.showContextMenu=function(e,t){var i,n=[],r=this.multiselection.nodes.slice();n.push({text:(0,l.Iu)("duplicateText"),title:(0,l.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){_.onDuplicate(r)}}),n.push({text:(0,l.Iu)("remove"),title:(0,l.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){_.onRemove(r)}}),this.options.onCreateMenu&&(i=r.map(function(e){return e.getPath()}),n=this.options.onCreateMenu(n,{type:"multiple",path:i[0],paths:i})),new s.x(n,{close:t}).show(e,this.getPopupAnchor())},t.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},t.getSelection=function(){var e,t,i={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(e=this.multiselection.nodes[0],t=this.multiselection.nodes[this.multiselection.nodes.length-1],"down"===this.multiselection.direction?(i.start=e.serialize(),i.end=t.serialize()):(i.start=t.serialize(),i.end=e.serialize())),i},t.onSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,k.debounce)(e,this.DEBOUNCE_INTERVAL))},t.setSelection=function(e,t){e&&e.dom&&e.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(e));e=this._getNodeInstancesByRange(e,t);e.forEach(function(e){e.expandTo()}),this.select(e)},t._getNodeInstancesByRange=function(e,t){e&&e.path&&(i=this.node.findNodeByPath(e.path),t&&t.path&&(n=this.node.findNodeByPath(t.path)));var i,n,r=[];if(i instanceof _)if(n instanceof _&&n!==i)if(i.parent===n.parent){t=i.getIndex()<n.getIndex()?(e=i,n):(e=n,i);var o=e;for(r.push(o);o=o.nextSibling(),r.push(o),o&&o!==t;);}else r=this._findTopLevelNodes(i,n);else r.push(i);return r},t.getNodesByRange=function(e,t){var e=this._getNodeInstancesByRange(e,t),i=[];return e.forEach(function(e){i.push(e.serialize())}),i},[{mode:"tree",mixin:t,data:"json"},{mode:"view",mixin:t,data:"json"},{mode:"form",mixin:t,data:"json"}])},2744:function(e,t,i){t.tryRequireAjv=function(){try{return i(8903)}catch(e){}}},9125:function(e,t,i){t.O=function(){try{i(4864)}catch(e){console.error(e)}}},9791:function(G,e,t){"use strict";t.r(e),t.d(e,{addClassName:function(){return M},addEventListener:function(){return X},asyncExec:function(){return Ae},clear:function(){return C},compileJSONPointer:function(){return $},contains:function(){return Ce},debounce:function(){return ie},escapeUnicodeChars:function(){return p},extend:function(){return f},findUniqueName:function(){return ce},formatSize:function(){return me},get:function(){return B},getAbsoluteLeft:function(){return P},getAbsoluteTop:function(){return F},getChildPaths:function(){return he},getColorCSS:function(){return L},getIndexForPosition:function(){return oe},getInnerText:function(){return k},getInputSelection:function(){return re},getInternetExplorerVersion:function(){return z},getPositionForPath:function(){return se},getSelection:function(){return x},getSelectionOffset:function(){return D},getType:function(){return I},getWindow:function(){return y},hasParentNode:function(){return j},improveSchemaError:function(){return Q},insideRect:function(){return te},isArray:function(){return b},isChildOf:function(){return J},isFirefox:function(){return T},isObject:function(){return W},isPromise:function(){return q},isTimestamp:function(){return pe},isUrl:function(){return A},isValidColor:function(){return ae},isValidValidationError:function(){return ee},isValidationErrorChanged:function(){return Ie},limitCharacters:function(){return fe},makeFieldTooltip:function(){return le},parse:function(){return u},parsePath:function(){return _},parseString:function(){return ge},removeAllClassNames:function(){return H},removeClassName:function(){return V},removeEventListener:function(){return Y},removeReturnsAndSurroundingWhitespace:function(){return E},selectContentEditable:function(){return O},setEndOfContentEditable:function(){return Z},setSelection:function(){return S},setSelectionOffset:function(){return K},sort:function(){return de},sortObjectKeys:function(){return ue},stringifyPath:function(){return U},stripFormatting:function(){return w},textDiff:function(){return ne},tryJsonRepair:function(){return g},uniqueMergeArrays:function(){return ve},validate:function(){return m}});t(4987);var e=t(233),r=t.n(e),e=t(3860),i=t.n(e),n=t(6589),o=t(7026),s=t(7907);function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var i;if(e)return"string"==typeof e?l(e,t):"Map"===(i="Object"===(i=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?l(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h=1e4,d=9466848e5;function u(t){try{return JSON.parse(t)}catch(e){throw m(t),e}}function g(t){try{return i()(t)}catch(e){return t}}function p(e){return e.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})}function m(e){(void 0!==n?n:JSON).parse(e)}function f(e,t){for(var i in t)N(t,i)&&(e[i]=t[i]);return e}function C(e){for(var t in e)N(e,t)&&delete e[t];return e}function I(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp?"regexp":b(e)?"array":"object"}var v=/^https?:\/\/\S+$/;function A(e){return("string"==typeof e||e instanceof String)&&v.test(e)}function b(e){return"[object Array]"===Object.prototype.toString.call(e)}function y(e){return e.ownerDocument.defaultView}function P(e){return e.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function F(e){return e.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function M(e,t){var i=e.className.split(" ");-1===i.indexOf(t)&&(i.push(t),e.className=i.join(" "))}function H(e){e.className=""}function V(e,t){var i=e.className.split(" "),t=i.indexOf(t);-1!==t&&(i.splice(t,1),e.className=i.join(" "))}function w(e){for(var t=e.childNodes,i=0,n=t.length;i<n;i++){var r=t[i],o=(r.style&&r.removeAttribute("style"),r.attributes);if(o)for(var s=o.length-1;0<=s;s--){var a=o[s];!0===a.specified&&r.removeAttribute(a.name)}w(r)}}function Z(e){var t;document.createRange&&((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function O(e){var t;e&&"DIV"===e.nodeName&&window.getSelection&&document.createRange&&((t=document.createRange()).selectNodeContents(e),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function x(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null}function S(e){var t;e&&window.getSelection&&((t=window.getSelection()).removeAllRanges(),t.addRange(e))}function D(){var e=x();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer===e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null}function K(e){var t;document.createRange&&window.getSelection&&window.getSelection()&&(t=document.createRange(),e.container.firstChild||e.container.appendChild(document.createTextNode("")),t.setStart(e.container.firstChild,e.startOffset),t.setEnd(e.container.firstChild,e.endOffset),S(t))}function k(e,t){var i;if(void 0===t&&(t={_text:"",flush:function(){var e=this._text;return this._text="",e},set:function(e){this._text=e}}),e.nodeValue)return""!==(i=E(e.nodeValue))?t.flush()+i:"";if(e.hasChildNodes()){for(var n=e.childNodes,r="",o=0,s=n.length;o<s;o++){var a,l=n[o];"DIV"===l.nodeName||"P"===l.nodeName?((a=(a=n[o-1])?a.nodeName:void 0)&&"DIV"!==a&&"P"!==a&&"BR"!==a&&(""!==r&&(r+="\n"),t.flush()),r+=k(l,t),t.set("\n")):"BR"===l.nodeName?(r+=t.flush(),t.set("\n")):r+=k(l,t)}return r}return""}function E(e){return e.replace(/(\b|^)\s*(\b|$)/g,function(e){return/\n/.exec(e)?"":e})}function j(e,t){for(var i=e?e.parentNode:void 0;i;){if(i===t)return!0;i=i.parentNode}return!1}function z(){var e;return-1===R&&(e=-1,"undefined"!=typeof navigator&&"Microsoft Internet Explorer"===navigator.appName&&(null!=/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)&&(e=parseFloat(RegExp.$1))),R=e),R}var R=-1;function T(){return"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Firefox")}function X(e,t,i,n){return e.addEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&T()&&(t="DOMMouseScroll"),e.addEventListener(t,i,n),i |
| 35 | ):e.attachEvent?(e.attachEvent("on"+t,n=function(){return i.call(e,window.event)}),n):void 0}function Y(e,t,i,n){e.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&T()&&(t="DOMMouseScroll"),e.removeEventListener(t,i,n)):e.detachEvent&&e.detachEvent("on"+t,i)}function J(e,t){for(var i=e.parentNode;i;){if(i===t)return!0;i=i.parentNode}return!1}function _(i){var e=[],n=0;function t(e){for(var t="";void 0!==i[n]&&i[n]!==e;)t+=i[n],n++;if(i[n]!==e)throw new Error("Invalid JSON path: unexpected end, character "+e+" expected");return t}for(;void 0!==i[n];)if("."===i[n])n++,e.push(function(){for(var e="";void 0!==i[n]&&/[\w$]/.test(i[n]);)e+=i[n],n++;if(""===e)throw new Error("Invalid JSON path: property name expected at index "+n);return e}());else{if("["!==i[n])throw new Error('Invalid JSON path: unexpected character "'+i[n]+'" at index '+n);if("'"===i[++n]||'"'===i[n]){var r=i[n];if(n++,e.push(t(r)),i[n]!==r)throw new Error("Invalid JSON path: closing quote ' expected at index "+n);n++}else{r=t("]").trim();if(0===r.length)throw new Error("Invalid JSON path: array value expected at index "+n);r="*"===r?r:JSON.parse(r),e.push(r)}if("]"!==i[n])throw new Error("Invalid JSON path: closing bracket ] expected at index "+n);n++}return e}function U(e){return e.map(function(e){return"number"==typeof e?"["+e+"]":"string"==typeof e&&e.match(/^[A-Za-z0-9_$]+$/)?"."+e:'["'+e+'"]'}).join("")}function Q(e){var t,i;return"enum"===e.keyword&&Array.isArray(e.schema)&&(i=e.schema)&&(5<(i=i.map(function(e){return JSON.stringify(e)})).length&&(t=["("+(i.length-5)+" more...)"],(i=i.slice(0,5)).push(t)),e.message="should be equal to one of: "+i.join(", ")),"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}function q(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function ee(e){return"object"===c(e)&&Array.isArray(e.path)&&"string"==typeof e.message}function te(e,t,i){i=void 0!==i?i:0;return t.left-i>=e.left&&t.right+i<=e.right&&t.top-i>=e.top&&t.bottom+i<=e.bottom}function ie(n,r,o){var s;return function(){var e=this,t=arguments,i=o&&!s;clearTimeout(s),s=setTimeout(function(){s=null,o||n.apply(e,t)},r),i&&n.apply(e,t)}}function ne(e,t){for(var i=t.length,n=0,r=e.length,o=t.length;t.charAt(n)===e.charAt(n)&&n<i;)n++;for(;t.charAt(o-1)===e.charAt(r-1)&&n<o&&0<r;)o--,r--;return{start:n,end:o}}function re(t){var e,i,n,r,o=0,s=0;return"number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd?(o=t.selectionStart,s=t.selectionEnd):(r=document.selection.createRange())&&r.parentElement()===t&&(n=t.value.length,e=t.value.replace(/\r\n/g,"\n"),(i=t.createTextRange()).moveToBookmark(r.getBookmark()),(r=t.createTextRange()).collapse(!1),-1<i.compareEndPoints("StartToEnd",r)?o=s=n:(o=-i.moveStart("character",-n),o+=e.slice(0,o).split("\n").length-1,-1<i.compareEndPoints("EndToEnd",r)?s=n:(s=-i.moveEnd("character",-n),s+=e.slice(0,s).split("\n").length-1))),{startIndex:o,endIndex:s,start:a(o),end:a(s)};function a(e){e=t.value.substring(0,e);return{row:(e.match(/\n/g)||[]).length+1,column:e.length-e.lastIndexOf("\n")}}}function oe(e,t,i){var e=e.value||"";return 0<t&&0<i?(e=e.split("\n",t),t=Math.min(e.length,t),i=Math.min(e[t-1].length,i-1),i=1===t?i:i+1,e.slice(0,t-1).join("\n").length+i):-1}function se(e,t){var i,n=[];if(t&&t.length){try{i=o.parse(e)}catch(e){return n}t.forEach(function(e){var t=$(_(e)),t=i.pointers[t];t&&n.push({path:e,line:t.key?t.key.line:t.value?t.value.line:0,column:t.key?t.key.column:t.value?t.value.column:0})})}return n}function $(e){return e.map(function(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function L(e){var t=document.createElement("div");return t.style.color=e,t.style.color.split(/\s+/).join("").toLowerCase()||null}function ae(e){return!!L(e)}function le(i,e){var n;return i?(n="",i.title&&(n+=i.title),i.description&&(0<n.length&&(n+="\n"),n+=i.description),i.default&&(0<n.length&&(n+="\n\n"),n=(n+=(0,s.Iu)("default",void 0,e)+"\n")+JSON.stringify(i.default,null,2)),Array.isArray(i.examples)&&0<i.examples.length&&(0<n.length&&(n+="\n\n"),n+=(0,s.Iu)("examples",void 0,e)+"\n",i.examples.forEach(function(e,t){n+=JSON.stringify(e,null,2),t!==i.examples.length-1&&(n+="\n")})),n):""}function B(e,t){for(var i=e,n=0;n<t.length&&null!=i;n++)i=i[t[n]];return i}function ce(e,t){for(var i=e.replace(/ \(copy( \d+)?\)$/,""),n=i,r=1;-1!==t.indexOf(n);){n=i+" ("+("copy"+(1<r?" "+r:""))+")";r++}return n}function he(e,t){var i={};if(Array.isArray(e))for(var n=Math.min(e.length,h),r=0;r<n;r++)!function t(i,n,r,o){(Array.isArray(i)||W(i))&&!o||(n[r||""]=!0),W(i)&&Object.keys(i).forEach(function(e){t(i[e],n,r+"."+e,o)})}(e[r],i,"",t);else i[""]=!0;return Object.keys(i).sort()}function de(e,t,i){var n=t&&"."!==t?_(t):[],r="desc"===i?-1:1,t=e.slice();return t.sort(function(e,t){e=B(e,n),t=B(t,n);return r*(t<e?1:e<t?-1:0)}),t}function ue(t,e){var i="desc"===e?-1:1,e=Object.keys(t).sort(function(e,t){return i*r()(e,t)}),n={};return e.forEach(function(e){n[e]=t[e]}),n}function ge(e){var t,i;return""===e?"":"null"===(t=e.toLowerCase())?null:"true"===t||"false"!==t&&(t=Number(e),i=parseFloat(e),isNaN(t)||isNaN(i)?e:t)}function pe(e,t){return"number"==typeof t&&d<t&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf())}function me(e){return e<900?e.toFixed()+" B":(e=e/1e3)<900?e.toFixed(1)+" KB":(e=e/1e3)<900?e.toFixed(1)+" MB":(e=e/1e3)<900?e.toFixed(1)+" GB":(e/1e3).toFixed(1)+" TB"}function fe(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function W(e){return"object"===c(e)&&null!==e&&!Array.isArray(e)}function Ce(e,t){return-1!==e.indexOf(t)}function Ie(i,e){if(e||i){if(e&&!i||!e&&i)return!0;if(e.length!==i.length)return!0;for(var t=0;t<i.length;++t){var n=function(t){if(!("error"===i[t].type?e.find(function(e){return e.line===i[t].line}):e.find(function(e){return e.dataPath===i[t].dataPath&&e.schemaPath===i[t].schemaPath})))return{v:!0}}(t);if("object"===c(n))return n.v}}return!1}function ve(e,t){e=null!=e&&e.length?e:[],t=null!=t&&t.length?t:[];return a(new Set(e.concat(t)))}function Ae(e){setTimeout(e)}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},8037:function(e,t,i){var n;if(window.Picker)n=window.Picker;else try{n=i(4049)}catch(e){}e.exports=n},6225:function(i,e,f){function l(e,i){var t,n;return i=a(e,i),(e=o.modules[i])||("function"==typeof(e=o.payloads[i])&&(t={id:i,uri:"",exports:n={},packaged:!0},n=e(function(e,t){return s(i,e,t)},n,t)||t.exports,o.modules[i]=n,delete o.payloads[i]),e=o.modules[i]=n||e),e}var t,n,r,o,s,c,a;i=f.nmd(i),(r=function(){return this}())||"undefined"==typeof window||(r=window),(o=function(e,t,i){"string"!=typeof e?o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(i=t),o.modules[e]||(o.payloads[e]=i,o.modules[e]=null))}).modules={},o.payloads={},s=function(e,t,i){if("string"==typeof t){var n=l(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],o=0,s=t.length;o<s;++o){var a=l(e,t[o]);if(null==a&&c.original)return;r.push(a)}return i&&i.apply(null,r)||!0}},c=function(e,t){var i=s("",e,t);return null==i&&c.original?c.original.apply(this,arguments):i},a=function(e,t){var i;if(-1!==t.indexOf("!"))return i=t.split("!"),a(e,i[0])+"!"+a(e,i[1]);if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},n=r,(t="ace")&&(r[t]||(r[t]={}),n=r[t]),n.define&&n.define.packaged||(o.original=n.define,n.define=o,n.define.packaged=!0),n.require&&n.require.packaged||(c.original=n.require,n.require=c,n.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,t,i){function n(e,t,i){Object.defineProperty(e,t,{value:i,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||n(String.prototype,"startsWith",function(e,t){return this.lastIndexOf(e,t=t||0)===t}),String.prototype.endsWith||n(String.prototype,"endsWith",function(e,t){(void 0===t||t>this.length)&&(t=this.length),t-=e.length;e=this.indexOf(e,t);return-1!==e&&e===t}),String.prototype.repeat||n(String.prototype,"repeat",function(e){for(var t="",i=this;0<e;)1&e&&(t+=i),(e>>=1)&&(i+=i);return t}),String.prototype.includes||n(String.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];null!=n&&Object.keys(n).forEach(function(e){t[e]=n[e]})}return t}),Object.values||(Object.values=function(t){return Object.keys(t).map(function(e){return t[e]})}),Array.prototype.find||n(Array.prototype,"find",function(e){for(var t=this.length,i=arguments[1],n=0;n<t;n++){var r=this[n];if(e.call(i,r,n,this))return r}}),Array.prototype.findIndex||n(Array.prototype,"findIndex",function(e){for(var t=this.length,i=arguments[1],n=0;n<t;n++){var r=this[n];if(e.call(i,r,n,this))return n}}),Array.prototype.includes||n(Array.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Array.prototype.fill||n(Array.prototype,"fill",function(e){for(var t=this.length>>>0,i=arguments[1]>>0,n=i<0?Math.max(t+i,0):Math.min(i,t),i=arguments[2],i=void 0===i?t:i>>0,r=i<0?Math.max(t+i,0):Math.min(i,t);n<r;)this[n]=e,n++;return this}),Array.of||n(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,i){"use strict";e("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";0<t;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,i={};for(t in e)i[t]=e[t];return i},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t))for(var i=[],n=0;n<t.length;n++)i[n]=e(t[n]);else{if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n])}return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t,i=Object.create(null);for(t in e)i[t]=e[t];return i},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){function t(){n=null,e()}function i(e){return i.cancel(),n=setTimeout(t,e||0),i}var n=null;return(i.schedule=i).call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(n),n=null,i},i.isPending=function(){return n},i},t.delayedCall=function(e,t){function i(){r=null,e()}function n(e){null==r&&(r=setTimeout(i,e||t))}var r=null;return n.delay=function(e){r&&clearTimeout(r),r=setTimeout(i,e||t)},(n.schedule=n).call=function(){this.cancel(),e()},n.cancel=function(){r&&clearTimeout(r),r=null},n.isPending=function(){return r},n}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,i,t){"use strict";i.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},i.implement=function(e,t){i.mixin(e,t)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),o=n.userAgent||"",n=n.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==n||0<=n.indexOf("MSAppHost")?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=0<=o.indexOf("AdobeAIR"),t.isAndroid=0<=o.indexOf("Android"),t.isChromeOS=0<=o.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,o,t){"use strict";var s,i,e=e("./useragent"),a=(o.buildDom=function e(t,i,n){if("string"==typeof t&&t)return c=document.createTextNode(t),i&&i.appendChild(c),c;if(!Array.isArray(t))return t&&t.appendChild&&i&&i.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],o=0;o<t.length;o++){var s=e(t[o],i,n);s&&r.push(s)}return r}for(var a=document.createElement(t[0]),l=t[1],c=1,o=c=l&&"object"==typeof l&&!Array.isArray(l)?2:c;o<t.length;o++)e(t[o],a,n);return 2==c&&Object.keys(l).forEach(function(e){var t=l[e];"class"===e?a.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?a[e]=t:"ref"===e?n&&(n[t]=a):"style"===e?"string"==typeof t&&(a.style.cssText=t):null!=t&&a.setAttribute(e,t)}),i&&i.appendChild(a),a},o.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},o.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},o.removeChildren=function(e){e.innerHTML=""},o.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},o.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},o.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},o.addCssClass=function(e,t){o.hasCssClass(e,t)||(e.className+=" "+t)},o.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},o.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var r=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(t),e.className=i.join(" "),n},o.setCssClass=function(e,t,i){i?o.addCssClass(e,t):o.removeCssClass(e,t)},o.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},o.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()},[]);function l(){var e=a;a=null,e&&e.forEach(function(e){n(e[0],e[1])})}function n(e,t,i){if("undefined"!=typeof document){if(a)if(i)l();else if(!1===i)return a.push([e,t]);if(!s){var n=i,i=(n=i&&i.getRootNode&&(n=i.getRootNode())&&n!=i?n:document).ownerDocument||n;if(t&&o.hasCssString(t,n))return null;t&&(e+="\n/*# sourceURL=ace/css/"+t+" */");var r=o.createElement("style");r.appendChild(i.createTextNode(e)),t&&(r.id=t),(n=n==i?o.getDocumentHead(i):n).insertBefore(r,n.firstChild)}}}o.useStrictCSP=function(e){0==(s=e)?l():a=a||[]},o.importCssString=n,o.importCssStylsheet=function(e,t){o.buildDom(["link",{rel:"stylesheet",href:e}],o.getDocumentHead(t))},o.scrollbarWidth=function(e){var t=o.createElement("ace_inner"),i=(t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block",o.createElement("ace_outer")),n=i.style,e=(n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",i.appendChild(t),e.documentElement),r=(e.appendChild(i),t.offsetWidth),n=(n.overflow="scroll",t.offsetWidth);return r==n&&(n=i.clientWidth),e.removeChild(i),r-n},o.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},o.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},o.HAS_CSS_ANIMATION=!1,o.HAS_CSS_TRANSFORMS=!1,o.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,e.isChromeOS&&(o.HI_DPI=!1),"undefined"!=typeof document&&(i=document.createElement("div"),o.HI_DPI&&void 0!==i.style.transform&&(o.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===i.style.animationName||(o.HAS_CSS_ANIMATION=!0),i=null),o.HAS_CSS_TRANSFORMS?o.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:o.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){ |
| 36 | /* |
| 37 | * based on code from: |
no test coverage detected