Update jstree to 3.3.9

This commit is contained in:
alexwl 2020-02-16 13:37:08 +03:00
parent 571363affc
commit 66cdcb759b
7 changed files with 151 additions and 148 deletions

View File

@ -70,11 +70,11 @@ export default Ember.Component.extend({
const node1 = this.get_node(a).data;
const node2 = this.get_node(b).data;
if(component.get("sortType") === "alphabetical") {
return node1.name > node2.name;
return node1.name.localeCompare(node2.name);
} else {
const extendedName1 = (node1.tag === "Dir" ? "0" : "1") + fileExtension(node1.name) + node1.name;
const extendedName2 = (node2.tag === "Dir" ? "0" : "1") + fileExtension(node2.name) + node2.name;
return extendedName1 > extendedName2;
return extendedName1.localeCompare(extendedName2);
}
}
});

View File

@ -42,7 +42,7 @@
"ember-truth-helpers": "^2.0.0",
"express": "^4.16.2",
"glob": "^4.5.3",
"jstree": "3.3.5",
"jstree": "3.3.9",
"loader.js": "^4.2.3",
"morgan": "^1.9.0",
"showdown": "^1.8.6"

File diff suppressed because one or more lines are too long

View File

@ -4121,8 +4121,8 @@ t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.widt
t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),r=n.options,i=n.size,o=n.originalSize,s=n.originalPosition,a=n.axis,u="number"==typeof r.grid?[r.grid,r.grid]:r.grid,c=u[0]||1,l=u[1]||1,h=Math.round((i.width-o.width)/c)*c,d=Math.round((i.height-o.height)/l)*l,p=o.width+h,f=o.height+d,g=r.maxWidth&&p>r.maxWidth,m=r.maxHeight&&f>r.maxHeight,v=r.minWidth&&r.minWidth>p,y=r.minHeight&&r.minHeight>f
r.grid=u,v&&(p+=c),y&&(f+=l),g&&(p-=c),m&&(f-=l),/^(se|s|e)$/.test(a)?(n.size.width=p,n.size.height=f):/^(ne)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.top=s.top-d):/^(sw)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.left=s.left-h):((0>=f-l||0>=p-c)&&(t=n._getPaddingPlusBorderDimensions(this)),f-l>0?(n.size.height=f,n.position.top=s.top-d):(f=l-t.height,n.size.height=f,n.position.top=s.top+o.height-f),p-c>0?(n.size.width=p,n.position.left=s.left-h):(p=c-t.width,n.size.width=p,n.position.left=s.left+o.width-p))}}),e.ui.resizable}),function(e){"use strict"
"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){"use strict"
if(!e.jstree){var n=0,r=!1,i=!1,o=!1,s=[],a=e("script:last").attr("src"),u=window.document
e.jstree={version:"3.3.5",defaults:{plugins:[]},plugins:{},path:a&&-1!==a.indexOf("/")?a.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},e.jstree.create=function(t,r){var i=new e.jstree.core(++n),o=r
if(!e.jstree){var n=0,r=!1,i=!1,o=!1,s=[],a=e("script:last").attr("src"),u=window.document,c=window.setImmediate,l=window.Promise
!c&&l&&(c=function(e,t){l.resolve(t).then(e)}),e.jstree={version:"3.3.9",defaults:{plugins:[]},plugins:{},path:a&&-1!==a.indexOf("/")?a.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},e.jstree.create=function(t,r){var i=new e.jstree.core(++n),o=r
return r=e.extend(!0,{},e.jstree.defaults,r),o&&o.plugins&&(r.plugins=o.plugins),e.each(r.plugins,function(e,t){"core"!==e&&(i=i.plugin(t,r[t]))}),e(t).data("jstree",i),i.init(t,r),i},e.jstree.destroy=function(){e(".jstree:jstree").jstree("destroy"),e(u).off(".jstree")},e.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},e.jstree.reference=function(t){var n=null,r=null
if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!r||!r.length)try{r=e(t)}catch(e){}if(!r||!r.length)try{r=e("#"+t.replace(e.jstree.idregex,"\\$&"))}catch(e){}return r&&r.length&&(r=r.closest(".jstree")).length&&(r=r.data("jstree"))?n=r:e(".jstree").each(function(){var r=e(this).data("jstree")
return r&&r._model.data[t]?(n=r,!1):void 0}),n},e.fn.jstree=function(n){var r="string"==typeof n,i=Array.prototype.slice.call(arguments,1),o=null
@ -4138,9 +4138,9 @@ var t=this.get_next_dom(e.currentTarget)
t&&t.length&&t.children(".jstree-anchor").focus()},"*":function(e){this.open_all()},home:function(t){t.preventDefault()
var n=this._firstChild(this.get_container_ul()[0])
n&&e(n).children(".jstree-anchor").filter(":visible").focus()},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},e.jstree.core.prototype={plugin:function(t,n){var r=e.jstree.plugins[t]
return r?(this._data[t]={},r.prototype=this,new r(n,this)):this},init:function(t,n){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=e(t).addClass("jstree jstree-"+this._id),this.settings=n,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(e.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,n=u.createElement("LI")
return n.setAttribute("role","treeitem"),e=u.createElement("I"),e.className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),n.appendChild(e),e=u.createElement("A"),e.className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),t=u.createElement("I"),t.className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),n.appendChild(e),e=t=null,n},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},n=[]
e.ctrlKey&&n.push("ctrl"),e.altKey&&n.push("alt"),e.shiftKey&&n.push("shift"),n.push(t[e.which]||e.which),n=n.sort().join("-").toLowerCase()
return r?(this._data[t]={},r.prototype=this,new r(n,this)):this},init:function(t,n){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=e(t).addClass("jstree jstree-"+this._id),this.settings=n,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(e.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,n=u.createElement("LI")
return n.setAttribute("role","treeitem"),e=u.createElement("I"),e.className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),n.appendChild(e),e=u.createElement("A"),e.className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),t=u.createElement("I"),t.className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),n.appendChild(e),e=t=null,n},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},n=[]
if(e.ctrlKey&&n.push("ctrl"),e.altKey&&n.push("alt"),e.shiftKey&&n.push("shift"),n.push(t[e.which]||e.which),"shift-shift"===(n=n.sort().join("-").toLowerCase())||"ctrl-ctrl"===n||"alt-alt"===n)return null
var r,i,o=this.settings.core.keyboard
for(r in o)if(o.hasOwnProperty(r)&&(i=r,"-"!==i&&"+"!==i&&(i=i.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),i=i.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),i===n))return o[r]
return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var t="",n=null,r=0
@ -4159,20 +4159,20 @@ var i=String.fromCharCode(r.which).toLowerCase(),o=this.element.find(".jstree-an
if(t+=i,t.length>1){if(o.slice(s).each(e.proxy(function(n,r){return 0===e(r).text().toLowerCase().indexOf(t)?(e(r).focus(),a=!0,!1):void 0},this)),a)return
if(o.slice(0,s).each(e.proxy(function(n,r){return 0===e(r).text().toLowerCase().indexOf(t)?(e(r).focus(),a=!0,!1):void 0},this)),a)return}if(new RegExp("^"+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(t)){if(o.slice(s+1).each(e.proxy(function(t,n){return e(n).text().toLowerCase().charAt(0)===i?(e(n).focus(),a=!0,!1):void 0},this)),a)return
if(o.slice(0,s+1).each(e.proxy(function(t,n){return e(n).text().toLowerCase().charAt(0)===i?(e(n).focus(),a=!0,!1):void 0},this)),a)return}},this)).on("init.jstree",e.proxy(function(){var e=this.settings.core.themes
this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)},this)).on("loading.jstree",e.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",e.proxy(function(t){this._data.core.focused=null,e(t.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",e.proxy(function(t){var n=this.get_node(t.currentTarget)
n&&n.id&&(this._data.core.focused=n.id),this.element.find(".jstree-hovered").not(t.currentTarget).mouseleave(),e(t.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",e.proxy(function(){if(+new Date-r>500&&!this._data.core.focused&&this.settings.core.restore_focus){r=0
this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)},this)).on("loading.jstree",e.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",e.proxy(function(t){this._data.core.focused=null,e(t.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",e.proxy(function(t){var n=this.get_node(t.currentTarget)
n&&n.id&&(this._data.core.focused=n.id),this.element.find(".jstree-hovered").not(t.currentTarget).trigger("mouseleave"),e(t.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")},this)).on("focus.jstree",e.proxy(function(){if(+new Date-r>500&&!this._data.core.focused&&this.settings.core.restore_focus){r=0
var e=this.get_node(this.element.attr("aria-activedescendant"),!0)
e&&e.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",e.proxy(function(e){this.hover_node(e.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),e(u).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),t.instance=this,this.element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(t){var n=this.settings.core.strings
return e.isFunction(n)?n.call(this,t):n&&n[t]?n[t]:t},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling
return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling
return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling
return e},get_node:function(t,n){t&&t.id&&(t=t.id)
return e},get_node:function(t,n){t&&t.id&&(t=t.id),t instanceof e&&t.length&&t[0].id&&(t=t[0].id)
var r
try{if(this._model.data[t])t=this._model.data[t]
else if("string"==typeof t&&this._model.data[t.replace(/^#/,"")])t=this._model.data[t.replace(/^#/,"")]
else if("string"==typeof t&&(r=e("#"+t.replace(e.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")]
else if((r=e(t,this.element)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")]
else{if(!(r=e(t,this.element)).length||!r.hasClass("jstree"))return!1
else if((r=this.element.find(t)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")]
else{if(!(r=this.element.find(t)).length||!r.hasClass("jstree"))return!1
t=this._model.data[e.jstree.root]}return n&&(t=t.id===e.jstree.root?this.element:e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)),t}catch(e){return!1}},get_path:function(t,n,r){if(!(t=t.parents?t:this.get_node(t))||t.id===e.jstree.root||!t.parents)return!1
var i,o,s=[]
for(s.push(r?t.id:t.text),i=0,o=t.parents.length;o>i;i++)s.push(r?t.parents[i]:this.get_text(t.parents[i]))
@ -4212,40 +4212,40 @@ return a&&-1!==a.indexOf("json")||"object"==typeof r?this._append_json_data(t,r,
var i,o,s,a=n.is("ul")?n.children():n,u=t.id,c=[],l=[],h=this._model.data,d=h[u],p=this._data.core.selected.length
for(a.each(e.proxy(function(t,n){(i=this._parse_model_from_html(e(n),u,d.parents.concat()))&&(c.push(i),l.push(i),h[i].children_d.length&&(l=l.concat(h[i].children_d)))},this)),d.children=c,d.children_d=l,o=0,s=d.parents.length;s>o;o++)h[d.parents[o]].children_d=h[d.parents[o]].children_d.concat(l)
this.trigger("model",{nodes:l,parent:u}),u!==e.jstree.root?(this._node_changed(u),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),r.call(this,!0)},_append_json_data:function(t,n,r,i){if(null!==this.element){t=this.get_node(t),t.children=[],t.children_d=[],n.d&&"string"==typeof(n=n.d)&&(n=JSON.parse(n)),e.isArray(n)||(n=[n])
var o=null,s={df:this._model.default_state,dat:n,par:t.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},a=function(e,t){e.data&&(e=e.data)
var n,r,i,o,s=e.dat,a=e.par,u=[],c=[],l=[],h=e.df,d=e.t_id,p=e.t_cnt,f=e.m,g=f[a],m=e.sel,v=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n)
var o=null,s={df:this._model.default_state,dat:n,par:t.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},a=this,u=function(e,t){e.data&&(e=e.data)
var n,r,i,o,s=e.dat,u=e.par,c=[],l=[],h=[],d=e.df,p=e.t_id,f=e.t_cnt,g=e.m,m=g[u],v=e.sel,y=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n)
var i,o,s,a,u=e.id.toString(),c={id:u,text:e.text||"",icon:e.icon===t||e.icon,parent:n,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1}
for(i in h)h.hasOwnProperty(i)&&(c.state[i]=h[i])
for(i in d)d.hasOwnProperty(i)&&(c.state[i]=d[i])
if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(c.icon=e.data.jstree.icon),(c.icon===t||null===c.icon||""===c.icon)&&(c.icon=!0),e&&e.data&&(c.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(c.state[i]=e.data.jstree[i])
if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(c.state[i]=e.state[i])
if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(c.li_attr[i]=e.li_attr[i])
if(c.li_attr.id||(c.li_attr.id=u),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(c.a_attr[i]=e.a_attr[i])
for(e&&e.children&&!0===e.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),f[c.id]=c,i=0,o=c.children.length;o>i;i++)s=v(f[c.children[i]],c.id,r),a=f[s],c.children_d.push(s),a.children_d.length&&(c.children_d=c.children_d.concat(a.children_d))
return delete e.data,delete e.children,f[c.id].original=e,c.state.selected&&l.push(c.id),c.id},y=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n)
for(e&&e.children&&!0===e.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),g[c.id]=c,i=0,o=c.children.length;o>i;i++)s=y(g[c.children[i]],c.id,r),a=g[s],c.children_d.push(s),a.children_d.length&&(c.children_d=c.children_d.concat(a.children_d))
return delete e.data,delete e.children,g[c.id].original=e,c.state.selected&&h.push(c.id),c.id},b=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n)
var i,o,s,a,u,c=!1
do{c="j"+d+"_"+ ++p}while(f[c])
do{c="j"+p+"_"+ ++f}while(g[c])
u={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===t||e.icon,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1}
for(i in h)h.hasOwnProperty(i)&&(u.state[i]=h[i])
for(i in d)d.hasOwnProperty(i)&&(u.state[i]=d[i])
if(e&&e.id&&(u.id=e.id.toString()),e&&e.text&&(u.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(u.icon=e.data.jstree.icon),(u.icon===t||null===u.icon||""===u.icon)&&(u.icon=!0),e&&e.data&&(u.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(u.state[i]=e.data.jstree[i])
if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(u.state[i]=e.state[i])
if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(u.li_attr[i]=e.li_attr[i])
if(u.li_attr.id&&!u.id&&(u.id=u.li_attr.id.toString()),u.id||(u.id=c),u.li_attr.id||(u.li_attr.id=u.id),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(u.a_attr[i]=e.a_attr[i])
if(e&&e.children&&e.children.length){for(i=0,o=e.children.length;o>i;i++)s=y(e.children[i],u.id,r),a=f[s],u.children.push(s),a.children_d.length&&(u.children_d=u.children_d.concat(a.children_d))
u.children_d=u.children_d.concat(u.children)}return e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),delete e.data,delete e.children,u.original=e,f[u.id]=u,u.state.selected&&l.push(u.id),u.id}
if(s.length&&s[0].id!==t&&s[0].parent!==t){for(r=0,i=s.length;i>r;r++)s[r].children||(s[r].children=[]),s[r].state||(s[r].state={}),f[s[r].id.toString()]=s[r]
for(r=0,i=s.length;i>r;r++)f[s[r].parent.toString()]?(f[s[r].parent.toString()].children.push(s[r].id.toString()),g.children_d.push(s[r].id.toString())):(this._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:s[r].id.toString(),parent:s[r].parent.toString()})},this.settings.core.error.call(this,this._data.core.last_error))
for(r=0,i=g.children.length;i>r;r++)n=v(f[g.children[r]],a,g.parents.concat()),c.push(n),f[n].children_d.length&&(c=c.concat(f[n].children_d))
for(r=0,i=g.parents.length;i>r;r++)f[g.parents[r]].children_d=f[g.parents[r]].children_d.concat(c)
o={cnt:p,mod:f,sel:m,par:a,dpc:c,add:l}}else{for(r=0,i=s.length;i>r;r++)(n=y(s[r],a,g.parents.concat()))&&(u.push(n),c.push(n),f[n].children_d.length&&(c=c.concat(f[n].children_d)))
for(g.children=u,g.children_d=c,r=0,i=g.parents.length;i>r;r++)f[g.parents[r]].children_d=f[g.parents[r]].children_d.concat(c)
o={cnt:p,mod:f,sel:m,par:a,dpc:c,add:l}}return"undefined"!=typeof window&&void 0!==window.document?o:void postMessage(o)},u=function(t,n){if(null!==this.element){this._cnt=t.cnt
if(e&&e.children&&e.children.length){for(i=0,o=e.children.length;o>i;i++)s=b(e.children[i],u.id,r),a=g[s],u.children.push(s),a.children_d.length&&(u.children_d=u.children_d.concat(a.children_d))
u.children_d=u.children_d.concat(u.children)}return e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),delete e.data,delete e.children,u.original=e,g[u.id]=u,u.state.selected&&h.push(u.id),u.id}
if(s.length&&s[0].id!==t&&s[0].parent!==t){for(r=0,i=s.length;i>r;r++)s[r].children||(s[r].children=[]),s[r].state||(s[r].state={}),g[s[r].id.toString()]=s[r]
for(r=0,i=s.length;i>r;r++)g[s[r].parent.toString()]?(g[s[r].parent.toString()].children.push(s[r].id.toString()),m.children_d.push(s[r].id.toString())):void 0!==a&&(a._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:s[r].id.toString(),parent:s[r].parent.toString()})},a.settings.core.error.call(a,a._data.core.last_error))
for(r=0,i=m.children.length;i>r;r++)n=y(g[m.children[r]],u,m.parents.concat()),l.push(n),g[n].children_d.length&&(l=l.concat(g[n].children_d))
for(r=0,i=m.parents.length;i>r;r++)g[m.parents[r]].children_d=g[m.parents[r]].children_d.concat(l)
o={cnt:f,mod:g,sel:v,par:u,dpc:l,add:h}}else{for(r=0,i=s.length;i>r;r++)(n=b(s[r],u,m.parents.concat()))&&(c.push(n),l.push(n),g[n].children_d.length&&(l=l.concat(g[n].children_d)))
for(m.children=c,m.children_d=l,r=0,i=m.parents.length;i>r;r++)g[m.parents[r]].children_d=g[m.parents[r]].children_d.concat(l)
o={cnt:f,mod:g,sel:v,par:u,dpc:l,add:h}}return"undefined"!=typeof window&&void 0!==window.document?o:void postMessage(o)},l=function(t,n){if(null!==this.element){this._cnt=t.cnt
var i,o=this._model.data
for(i in o)o.hasOwnProperty(i)&&o[i].state&&o[i].state.loading&&t.mod[i]&&(t.mod[i].state.loading=!0)
if(this._model.data=t.mod,n){var s,a=t.add,u=t.sel,c=this._data.core.selected.slice()
if(o=this._model.data,u.length!==c.length||e.vakata.array_unique(u.concat(c)).length!==u.length){for(i=0,s=u.length;s>i;i++)-1===e.inArray(u[i],a)&&-1===e.inArray(u[i],c)&&(o[u[i]].state.selected=!1)
for(i=0,s=c.length;s>i;i++)-1===e.inArray(c[i],u)&&(o[c[i]].state.selected=!0)}}t.add.length&&(this._data.core.selected=this._data.core.selected.concat(t.add)),this.trigger("model",{nodes:t.dpc,parent:t.par}),t.par!==e.jstree.root?(this._node_changed(t.par),this.redraw()):this.redraw(!0),t.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),r.call(this,!0)}}
if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+a.toString()],{type:"text/javascript"}))),!this._data.core.working||i?(this._data.core.working=!0,o=new window.Worker(this._wrk),o.onmessage=e.proxy(function(e){u.call(this,e.data,!0)
try{o.terminate(),o=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),s.par?o.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([t,n,r,!0])}catch(e){u.call(this,a(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else u.call(this,a(s),!1)}},_parse_model_from_html:function(n,r,i){i=i?[].concat(i):[],r&&i.unshift(r)
if(this._model.data=t.mod,n){var s,u=t.add,l=t.sel,h=this._data.core.selected.slice()
if(o=this._model.data,l.length!==h.length||e.vakata.array_unique(l.concat(h)).length!==l.length){for(i=0,s=l.length;s>i;i++)-1===e.inArray(l[i],u)&&-1===e.inArray(l[i],h)&&(o[l[i]].state.selected=!1)
for(i=0,s=h.length;s>i;i++)-1===e.inArray(h[i],l)&&(o[h[i]].state.selected=!0)}}t.add.length&&(this._data.core.selected=this._data.core.selected.concat(t.add)),this.trigger("model",{nodes:t.dpc,parent:t.par}),t.par!==e.jstree.root?(this._node_changed(t.par),this.redraw()):this.redraw(!0),t.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!n&&c?c(function(){r.call(a,!0)}):r.call(a,!0)}}
if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+u.toString()],{type:"text/javascript"}))),!this._data.core.working||i?(this._data.core.working=!0,o=new window.Worker(this._wrk),o.onmessage=e.proxy(function(e){l.call(this,e.data,!0)
try{o.terminate(),o=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),s.par?o.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([t,n,r,!0])}catch(e){l.call(this,u(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else l.call(this,u(s),!1)}},_parse_model_from_html:function(n,r,i){i=i?[].concat(i):[],r&&i.unshift(r)
var o,s,a,u,c,l=this._model.data,h={id:!1,text:!1,icon:!0,parent:r,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1}
for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(h.state[a]=this._model.default_state[a])
if(u=e.vakata.attributes(n,!0),e.each(u,function(t,n){return n=e.trim(n),!n.length||(h.li_attr[t]=n,void("id"===t&&(h.id=n.toString())))}),u=n.children("a").first(),u.length&&(u=e.vakata.attributes(u,!0),e.each(u,function(t,n){n=e.trim(n),n.length&&(h.a_attr[t]=n)})),u=n.children("a").first().length?n.children("a").first().clone():n.clone(),u.children("ins, i, ul").remove(),u=u.html(),u=e("<div />").html(u),h.text=this.settings.core.force_text?u.text():u.html(),u=n.data(),h.data=u?e.extend(!0,{},u):null,h.state.opened=n.hasClass("jstree-open"),h.state.selected=n.children("a").hasClass("jstree-clicked"),h.state.disabled=n.children("a").hasClass("jstree-disabled"),h.data&&h.data.jstree)for(a in h.data.jstree)h.data.jstree.hasOwnProperty(a)&&(h.state[a]=h.data.jstree[a])
@ -4269,9 +4269,9 @@ if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(u.st
if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(u.li_attr[i]=e.li_attr[i])
if(u.li_attr.id&&!u.id&&(u.id=u.li_attr.id.toString()),u.id||(u.id=c),u.li_attr.id||(u.li_attr.id=u.id),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(u.a_attr[i]=e.a_attr[i])
if(e&&e.children&&e.children.length){for(i=0,o=e.children.length;o>i;i++)s=this._parse_model_from_json(e.children[i],u.id,r),a=l[s],u.children.push(s),a.children_d.length&&(u.children_d=u.children_d.concat(a.children_d))
u.children_d=u.children_d.concat(u.children)}return e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),delete e.data,delete e.children,u.original=e,l[u.id]=u,u.state.selected&&this._data.core.selected.push(u.id),u.id},_redraw:function(){var t,n,r,i=this._model.force_full_redraw?this._model.data[e.jstree.root].children.concat([]):this._model.changed.concat([]),o=u.createElement("UL"),s=this._data.core.focused
u.children_d=u.children.concat(u.children_d)}return e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),delete e.data,delete e.children,u.original=e,l[u.id]=u,u.state.selected&&this._data.core.selected.push(u.id),u.id},_redraw:function(){var t,n,r,i=this._model.force_full_redraw?this._model.data[e.jstree.root].children.concat([]):this._model.changed.concat([]),o=u.createElement("UL"),s=this._data.core.focused
for(n=0,r=i.length;r>n;n++)(t=this.redraw_node(i[n],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&o.appendChild(t)
this._model.force_full_redraw&&(o.className=this.get_container_ul()[0].className,o.setAttribute("role","group"),this.element.empty().append(o)),null!==s&&(t=this.get_node(s,!0),t&&t.length&&t.children(".jstree-anchor")[0]!==u.activeElement?t.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:i})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(t){var n=this.get_node(t),r=!1,i=!1,o=!1,s=u
this._model.force_full_redraw&&(o.className=this.get_container_ul()[0].className,o.setAttribute("role","group"),this.element.empty().append(o)),null!==s&&this.settings.core.restore_focus&&(t=this.get_node(s,!0),t&&t.length&&t.children(".jstree-anchor")[0]!==u.activeElement?t.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:i})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(t){var n=this.get_node(t),r=!1,i=!1,o=!1,s=u
if(!n)return!1
if(n.id===e.jstree.root)return this.redraw(!0)
if(!(t=this.get_node(t,!0))||!t.length)return!1
@ -4389,7 +4389,8 @@ for(c=0,l=s.length;l>c;c++)if(this._model.data[s[c]].state.selected){h=!0
break}for(h&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,function(t){return-1===e.inArray(t,s)})),this.trigger("delete_node",{node:t,parent:i.id}),h&&this.trigger("changed",{action:"delete_node",node:t,selected:this._data.core.selected,parent:i.id}),c=0,l=s.length;l>c;c++)delete this._model.data[s[c]]
return-1!==e.inArray(this._data.core.focused,s)&&(this._data.core.focused=null,d=this.element[0].scrollTop,p=this.element[0].scrollLeft,i.id===e.jstree.root?this._model.data[e.jstree.root].children[0]&&this.get_node(this._model.data[e.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(i,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=d,this.element[0].scrollLeft=p),this.redraw_node(i,!0),!0},check:function(t,n,r,i,o){n=n&&n.id?n:this.get_node(n),r=r&&r.id?r:this.get_node(r)
var s=t.match(/^move_node|copy_node|create_node$/i)?r:n,a=this.settings.core.check_callback
return"move_node"!==t&&"copy_node"!==t||o&&o.is_multi||n.id!==r.id&&("move_node"!==t||e.inArray(n.id,r.children)!==i)&&-1===e.inArray(r.id,n.children_d)?(s&&s.data&&(s=s.data),s&&s.functions&&(!1===s.functions[t]||!0===s.functions[t])?(!1===s.functions[t]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})}),s.functions[t]):!(!1===a||e.isFunction(a)&&!1===a.call(this,t,n,r,i,o)||a&&!1===a[t])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1)):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(n,r,i,o,s,a,u){var c,l,h,d,p,f,g,m,v,y,b,C,A,_
if("move_node"===t||"copy_node"===t){if(!(o&&o.is_multi||"move_node"!==t||e.inArray(n.id,r.children)!==i))return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1
if(!(o&&o.is_multi||n.id!==r.id&&("move_node"!==t||e.inArray(n.id,r.children)!==i)&&-1===e.inArray(r.id,n.children_d)))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1}return s&&s.data&&(s=s.data),s&&s.functions&&(!1===s.functions[t]||!0===s.functions[t])?(!1===s.functions[t]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})}),s.functions[t]):!(!1===a||e.isFunction(a)&&!1===a.call(this,t,n,r,i,o)||a&&!1===a[t])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(n,r,i,o,s,a,u){var c,l,h,d,p,f,g,m,v,y,b,C,A,_
if(r=this.get_node(r),i=i===t?0:i,!r)return!1
if(!i.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(r))return this.load_node(r,function(){this.move_node(n,r,i,o,!0,!1,u)})
if(e.isArray(n)){if(1!==n.length){for(c=0,l=n.length;l>c;c++)(v=this.move_node(n[c],r,i,o,s,!1,u))&&(r=v,i="after")
@ -4433,9 +4434,9 @@ return!!u.length&&(r=u,o=this,i="move_node",void this.trigger("cut",{node:t}))},
var n,s,a,u=[]
for(s=0,a=t.length;a>s;s++)(n=this.get_node(t[s]))&&n.id&&n.id!==e.jstree.root&&u.push(n)
return!!u.length&&(r=u,o=this,i="copy_node",void this.trigger("copy",{node:t}))},get_buffer:function(){return{mode:i,node:r,inst:o}},can_paste:function(){return!1!==i&&!1!==r},paste:function(e,t){return!!((e=this.get_node(e))&&i&&i.match(/^(copy_node|move_node)$/)&&r)&&(this[i](r,e,t,!1,!1,!1,o)&&this.trigger("paste",{parent:e.id,node:r,mode:i}),r=!1,i=!1,void(o=!1))},clear_buffer:function(){r=!1,i=!1,o=!1,this.trigger("clear_buffer")},edit:function(t,n,r){var i,o,s,a,c,l,h,d,p,f=!1
return!!(t=this.get_node(t))&&(this.check("edit",t,this.get_parent(t))?(p=t,n="string"==typeof n?n:t.text,this.set_text(t,""),t=this._open_to(t),p.text=n,i=this._data.core.rtl,o=this.element.width(),this._data.core.focused=p.id,s=t.children(".jstree-anchor").focus(),a=e("<span>"),c=n,l=e("<div />",{css:{position:"absolute",top:"-200px",left:i?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),h=e("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:e.proxy(function(n){n.stopImmediatePropagation(),n.preventDefault()
return!!(t=this.get_node(t))&&(this.check("edit",t,this.get_parent(t))?(p=t,n="string"==typeof n?n:t.text,this.set_text(t,""),t=this._open_to(t),p.text=n,i=this._data.core.rtl,o=this.element.width(),this._data.core.focused=p.id,s=t.children(".jstree-anchor").focus(),a=e("<span>"),c=n,l=e("<div />",{css:{position:"absolute",top:"-200px",left:i?"0px":"-1000px",visibility:"hidden"}}).appendTo(u.body),h=e("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:e.proxy(function(n){n.stopImmediatePropagation(),n.preventDefault()
var i,o=a.children(".jstree-rename-input"),u=o.val(),d=this.settings.core.force_text
""===u&&(u=c),l.remove(),a.replaceWith(s),a.remove(),c=d?c:e("<div></div>").append(e.parseHTML(c)).html(),this.set_text(t,c),i=!!this.rename_node(t,d?e("<div></div>").text(u).text():e("<div></div>").append(e.parseHTML(u)).html()),i||this.set_text(t,c),this._data.core.focused=p.id,setTimeout(e.proxy(function(){var e=this.get_node(p.id,!0)
""===u&&(u=c),l.remove(),a.replaceWith(s),a.remove(),c=d?c:e("<div></div>").append(e.parseHTML(c)).html(),t=this.get_node(t),this.set_text(t,c),i=!!this.rename_node(t,d?e("<div></div>").text(u).text():e("<div></div>").append(e.parseHTML(u)).html()),i||this.set_text(t,c),this._data.core.focused=p.id,setTimeout(e.proxy(function(){var e=this.get_node(p.id,!0)
e.length&&(this._data.core.focused=p.id,e.children(".jstree-anchor").focus())},this),0),r&&r.call(this,p,i,f),h=null},this),keydown:function(e){var t=e.which
27===t&&(f=!0,this.value=c),(27===t||13===t||37===t||38===t||39===t||40===t||32===t)&&e.stopImmediatePropagation(),(27===t||13===t)&&(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){h.width(Math.min(l.text("pW"+this.value).width(),o))},keypress:function(e){return 13!==e.which&&void 0}}),d={fontFamily:s.css("fontFamily")||"",fontSize:s.css("fontSize")||"",fontWeight:s.css("fontWeight")||"",fontStyle:s.css("fontStyle")||"",fontStretch:s.css("fontStretch")||"",fontVariant:s.css("fontVariant")||"",letterSpacing:s.css("letterSpacing")||"",wordSpacing:s.css("wordSpacing")||""},a.attr("class",s.attr("class")).append(s.contents().clone()).append(h),s.replaceWith(a),l.css(d),h.css(d).width(Math.min(l.text("pW"+h[0].value).width(),o))[0].select(),void e(u).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(t){h&&t.target!==h&&e(h).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(t,n){if(!t)return!1
if(!0===n){var r=this.settings.core.themes.dir
@ -4461,8 +4462,8 @@ for(i=0,o=n.length;o>i;i++)s[n[i]]=1
for(i=0,o=r.selected.length;o>i;i++)s[r.selected[i]]?s[r.selected[i]]=2:r.changed.selected.push(r.selected[i])
for(i=0,o=n.length;o>i;i++)1===s[n[i]]&&r.changed.deselected.push(n[i])
n=r.selected.slice()}t.trigger.call(this,e,r)},this.refresh=function(e,r){return n=[],t.refresh.apply(this,arguments)}}
var c=u.createElement("I")
c.className="jstree-icon jstree-checkbox",c.setAttribute("role","presentation"),e.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},e.jstree.plugins.checkbox=function(n,r){this.bind=function(){r.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",e.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",e.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",e.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",e.proxy(function(e,t){var n,r,i=this._model.data,o=(i[t.parent],t.nodes)
var h=u.createElement("I")
h.className="jstree-icon jstree-checkbox",h.setAttribute("role","presentation"),e.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},e.jstree.plugins.checkbox=function(n,r){this.bind=function(){r.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",e.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",e.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",e.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",e.proxy(function(e,t){var n,r,i=this._model.data,o=(i[t.parent],t.nodes)
for(n=0,r=o.length;r>n;n++)i[o[n]].state.checked=i[o[n]].state.checked||i[o[n]].original&&i[o[n]].original.state&&i[o[n]].original.state.checked,i[o[n]].state.checked&&this._data.checkbox.selected.push(o[n])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",e.proxy(function(t,n){var r,i,o,s,a,u,c=this._model.data,l=c[n.parent],h=n.nodes,d=[],p=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection
if(-1!==p.indexOf("down"))if(l.state[f?"selected":"checked"]){for(i=0,o=h.length;o>i;i++)c[h[i]].state[f?"selected":"checked"]=!0
this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(h)}else for(i=0,o=h.length;o>i;i++)if(c[h[i]].state[f?"selected":"checked"]){for(s=0,a=c[h[i]].children_d.length;a>s;s++)c[c[h[i]].children_d[s]].state[f?"selected":"checked"]=!0
@ -4477,10 +4478,10 @@ if(o!==i)break
c.state[h?"selected":"checked"]=!0,d[c.id]=!0,s=this.get_node(c,!0),s&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}p=[]
for(r in d)d.hasOwnProperty(r)&&p.push(r)
this._data[h?"core":"checkbox"].selected=p},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",e.proxy(function(t,n){var r,i,o,s=this.get_node(e.jstree.root),a=this._model.data
for(r=0,i=s.children_d.length;i>r;r++)(o=a[s.children_d[r]])&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",e.proxy(function(e,t){var n,r,i,o=t.node,s=(this.get_node(o,!0),this.settings.checkbox.cascade),a=this.settings.checkbox.tie_selection,u=this._data[a?"core":"checkbox"].selected,c=o.children_d.concat(o.id)
if(-1!==s.indexOf("down")){var l=this._cascade_new_checked_state(o.id,!1)
u=u.filter(function(e){return-1===c.indexOf(e)||l.indexOf(e)>-1})}if(-1!==s.indexOf("up")&&-1===u.indexOf(o.id)){for(n=0,r=o.parents.length;r>n;n++)i=this._model.data[o.parents[n]],i.state[a?"selected":"checked"]=!1,i&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1),(i=this.get_node(o.parents[n],!0))&&i.length&&i.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked")
u=u.filter(function(e){return-1===o.parents.indexOf(e)})}this._data[a?"core":"checkbox"].selected=u},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",e.proxy(function(t,n){for(var r,i,o,s,a=this.get_node(n.parent),u=this._model.data,c=this.settings.checkbox.tie_selection;a&&a.id!==e.jstree.root&&!a.state[c?"selected":"checked"];){for(o=0,r=0,i=a.children.length;i>r;r++)o+=u[a.children[r]].state[c?"selected":"checked"]
for(r=0,i=s.children_d.length;i>r;r++)(o=a[s.children_d[r]])&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",e.proxy(function(t,n){var r,i,o,s=n.node,a=(this.get_node(s,!0),this.settings.checkbox.cascade),u=this.settings.checkbox.tie_selection,c=this._data[u?"core":"checkbox"].selected,l=s.children_d.concat(s.id)
if(-1!==a.indexOf("down")){var h=this._cascade_new_checked_state(s.id,!1)
c=e.vakata.array_filter(c,function(e){return-1===l.indexOf(e)||h.indexOf(e)>-1})}if(-1!==a.indexOf("up")&&-1===c.indexOf(s.id)){for(r=0,i=s.parents.length;i>r;r++)o=this._model.data[s.parents[r]],o.state[u?"selected":"checked"]=!1,o&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1),(o=this.get_node(s.parents[r],!0))&&o.length&&o.attr("aria-selected",!1).children(".jstree-anchor").removeClass(u?"jstree-clicked":"jstree-checked")
c=e.vakata.array_filter(c,function(e){return-1===s.parents.indexOf(e)})}this._data[u?"core":"checkbox"].selected=c},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",e.proxy(function(t,n){for(var r,i,o,s,a=this.get_node(n.parent),u=this._model.data,c=this.settings.checkbox.tie_selection;a&&a.id!==e.jstree.root&&!a.state[c?"selected":"checked"];){for(o=0,r=0,i=a.children.length;i>r;r++)o+=u[a.children[r]].state[c?"selected":"checked"]
if(!(i>0&&o===i))break
a.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(a.id),s=this.get_node(a,!0),s&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}},this)).on("move_node.jstree",e.proxy(function(t,n){var r,i,o,s,a,u=n.is_multi,c=n.old_parent,l=this.get_node(n.parent),h=this._model.data,d=this.settings.checkbox.tie_selection
if(!u)for(r=this.get_node(c);r&&r.id!==e.jstree.root&&!r.state[d?"selected":"checked"];){for(i=0,o=0,s=r.children.length;s>o;o++)i+=h[r.children[o]].state[d?"selected":"checked"]
@ -4494,9 +4495,9 @@ for(r=0,i=l.length;i>r;r++)if(u[l[r]]&&u[l[r]].parents)for(o=0,s=u[l[r]].parents
for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var n,c=d.get_node(this)
if(c)if(c.state.loaded){for(r=0,i=c.children_d.length;i>r;r++)if(n=u[c.children_d[r]],!n.state.loaded&&n.original&&n.original.state&&n.original.state.undetermined&&!0===n.original.state.undetermined)for(a[n.id]===t&&n.id!==e.jstree.root&&(a[n.id]=!0,h.push(n.id)),o=0,s=n.parents.length;s>o;o++)a[n.parents[o]]===t&&n.parents[o]!==e.jstree.root&&(a[n.parents[o]]=!0,h.push(n.parents[o]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&!0===c.original.state.undetermined)for(a[c.id]===t&&c.id!==e.jstree.root&&(a[c.id]=!0,h.push(c.id)),o=0,s=c.parents.length;s>o;o++)a[c.parents[o]]===t&&c.parents[o]!==e.jstree.root&&(a[c.parents[o]]=!0,h.push(c.parents[o]))}),r=0,i=h.length;i>r;r++)u[h[r]].state[c?"selected":"checked"]||p.push(n?u[h[r]]:h[r])
return p},this._undetermined=function(){if(null!==this.element){var e,t,n,r=this.get_undetermined(!1)
for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=r.length;t>e;e++)(n=this.get_node(r[e],!0))&&n.length&&n.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(t,n,i,o){if(t=r.redraw_node.apply(this,arguments)){var s,a,u=null,l=null
for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=r.length;t>e;e++)(n=this.get_node(r[e],!0))&&n.length&&n.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(t,n,i,o){if(t=r.redraw_node.apply(this,arguments)){var s,a,u=null,c=null
for(s=0,a=t.childNodes.length;a>s;s++)if(t.childNodes[s]&&t.childNodes[s].className&&-1!==t.childNodes[s].className.indexOf("jstree-anchor")){u=t.childNodes[s]
break}u&&(!this.settings.checkbox.tie_selection&&this._model.data[t.id].state.checked&&(u.className+=" jstree-checked"),l=c.cloneNode(!1),this._model.data[t.id].state.checkbox_disabled&&(l.className+=" jstree-checkbox-disabled"),u.insertBefore(l,u.childNodes[0]))}return i||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)),t},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(t){t=this.get_node(t)
break}u&&(!this.settings.checkbox.tie_selection&&this._model.data[t.id].state.checked&&(u.className+=" jstree-checked"),c=h.cloneNode(!1),this._model.data[t.id].state.checkbox_disabled&&(c.className+=" jstree-checkbox-disabled"),u.insertBefore(c,u.childNodes[0]))}return i||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)),t},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(t){t=this.get_node(t)
var n,r,i=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection,s=this._data[o?"core":"checkbox"].selected,a=this._model.data
if(!t||!0===t.state[o?"selected":"checked"]||-1===i.indexOf("undetermined")||-1===i.indexOf("down")&&-1===i.indexOf("up"))return!1
if(!t.state.loaded&&!0===t.original.state.undetermined)return!0
@ -4509,8 +4510,8 @@ return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(i=this.get_node(
if(!this.settings.checkbox.cascade_to_disabled&&a.state.disabled||!this.settings.checkbox.cascade_to_hidden&&a.state.hidden)i=this.get_checked_descendants(e),a.state[s?"selected":"checked"]&&i.push(a.id),u=u.concat(i)
else{if(a.children)for(n=0,r=a.children.length;r>n;n++){var l=a.children[n]
i=o._cascade_new_checked_state(l,t),u=u.concat(i),i.indexOf(l)>-1&&c.push(l)}var h=o.get_node(a,!0),d=c.length>0&&c.length<a.children.length
a.original&&a.original.state&&a.original.state.undetermined&&(a.original.state.undetermined=d),d?(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked")):t&&c.length===a.children.length?(a.state[s?"selected":"checked"]=t,u.push(a.id),h.attr("aria-selected",!0).children(".jstree-anchor").addClass(s?"jstree-clicked":"jstree-checked")):(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked"))}return u},this.get_checked_descendants=function(e){var t=this,n=t.settings.checkbox.tie_selection
return t._model.data[e].children_d.filter(function(e){return t._model.data[e].state[n?"selected":"checked"]})},this.check_node=function(t,n){if(this.settings.checkbox.tie_selection)return this.select_node(t,!1,!0,n)
a.original&&a.original.state&&a.original.state.undetermined&&(a.original.state.undetermined=d),d?(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked")):t&&c.length===a.children.length?(a.state[s?"selected":"checked"]=t,u.push(a.id),h.attr("aria-selected",!0).children(".jstree-anchor").addClass(s?"jstree-clicked":"jstree-checked")):(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked"))}return u},this.get_checked_descendants=function(t){var n=this,r=n.settings.checkbox.tie_selection,i=n._model.data[t]
return e.vakata.array_filter(i.children_d,function(e){return n._model.data[e].state[r?"selected":"checked"]})},this.check_node=function(t,n){if(this.settings.checkbox.tie_selection)return this.select_node(t,!1,!0,n)
var r,i,o
if(e.isArray(t)){for(t=t.slice(),i=0,o=t.length;o>i;i++)this.check_node(t[i],n)
return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(r=this.get_node(t,!0),void(t.state.checked||(t.state.checked=!0,this._data.checkbox.selected.push(t.id),r&&r.length&&r.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:t,selected:this._data.checkbox.selected,event:n}))))},this.uncheck_node=function(t,n){if(this.settings.checkbox.tie_selection)return this.deselect_node(t,!1,n)
@ -4523,7 +4524,7 @@ for(this._data.checkbox.selected=this._model.data[e.jstree.root].children_d.conc
this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all()
var e,t,n=this._data.checkbox.selected.concat([])
for(e=0,t=this._data.checkbox.selected.length;t>e;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!1)
this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:n})},this.is_checked=function(t){return this.settings.checkbox.tie_selection?this.is_selected(t):!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.checked},this.get_checked=function(t){return this.settings.checkbox.tie_selection?this.get_selected(t):t?e.map(this._data.checkbox.selected,e.proxy(function(e){return this.get_node(e)},this)):this._data.checkbox.selected},this.get_top_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_top_selected(t)
this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:n})},this.is_checked=function(t){return this.settings.checkbox.tie_selection?this.is_selected(t):!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.checked},this.get_checked=function(t){return this.settings.checkbox.tie_selection?this.get_selected(t):t?e.map(this._data.checkbox.selected,e.proxy(function(e){return this.get_node(e)},this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_top_selected(t)
var n,r,i,o,s=this.get_checked(!0),a={}
for(n=0,r=s.length;r>n;n++)a[s[n].id]=s[n]
for(n=0,r=s.length;r>n;n++)for(i=0,o=s[n].children_d.length;o>i;i++)a[s[n].children_d[i]]&&delete a[s[n].children_d[i]]
@ -4538,7 +4539,7 @@ return r.load_node.apply(this,arguments)},this.get_state=function(){var e=r.get_
return this.settings.checkbox.tie_selection?e:(e.checkbox=this._data.checkbox.selected.slice(),e)},this.set_state=function(t,n){var i=r.set_state.apply(this,arguments)
if(i&&t.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all()
var o=this
e.each(t.checkbox,function(e,t){o.check_node(t)})}return delete t.checkbox,this.set_state(t,n),!1}return i},this.refresh=function(e,t){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),r.refresh.apply(this,arguments)}},e.jstree.defaults.conditionalselect=function(){return!0},e.jstree.plugins.conditionalselect=function(e,t){this.activate_node=function(e,n){return this.settings.conditionalselect.call(this,this.get_node(e),n)?t.activate_node.call(this,e,n):void 0}},e.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(t,n){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference)
e.each(t.checkbox,function(e,t){o.check_node(t)})}return delete t.checkbox,this.set_state(t,n),!1}return i},this.refresh=function(e,t){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),r.refresh.apply(this,arguments)}},e.jstree.defaults.conditionalselect=function(){return!0},e.jstree.plugins.conditionalselect=function(e,t){this.activate_node=function(e,n){return this.settings.conditionalselect.call(this,this.get_node(e),n)?t.activate_node.call(this,e,n):void 0}},e.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(t,n){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference)
n.create_node(r,{},"last",function(e){try{n.edit(e)}catch(t){setTimeout(function(){n.edit(e)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference)
n.edit(r)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference)
n.is_selected(r)?n.delete_node(n.get_selected()):n.delete_node(r)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference)
@ -4554,13 +4555,13 @@ e.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(t){e
r||(n.html="",n.items=[])
var i,o="",s=!1
return r&&(o+="<ul>"),e.each(t,function(t,r){return!r||(n.items.push(r),!s&&r.separator_before&&(o+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>"),s=!1,o+="<li class='"+(r._class||"")+(!0===r._disabled||e.isFunction(r._disabled)&&r._disabled({item:r,reference:n.reference,element:n.element})?" vakata-contextmenu-disabled ":"")+"' "+(r.shortcut?" data-shortcut='"+r.shortcut+"' ":"")+">",o+="<a href='#' rel='"+(n.items.length-1)+"' "+(r.title?"title='"+r.title+"'":"")+">",e.vakata.context.settings.icons&&(o+="<i ",r.icon&&(o+=-1!==r.icon.indexOf("/")||-1!==r.icon.indexOf(".")?" style='background:url(\""+r.icon+"\") center center no-repeat' ":" class='"+r.icon+"' "),o+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),o+=(e.isFunction(r.label)?r.label({item:t,reference:n.reference,element:n.element}):r.label)+(r.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+r.shortcut+'">'+(r.shortcut_label||"")+"</span>":"")+"</a>",r.submenu&&(i=e.vakata.context._parse(r.submenu,!0))&&(o+=i),o+="</li>",void(r.separator_after&&(o+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>",s=!0)))}),o=o.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),r&&(o+="</ul>"),r||(n.html=o,e.vakata.context._trigger("parse")),o.length>10&&o},_show_submenu:function(n){if(n=e(n),n.length&&n.children("ul").length){var r=n.children("ul"),i=n.offset().left,o=i+n.outerWidth(),s=n.offset().top,a=r.width(),u=r.height(),c=e(window).width()+e(window).scrollLeft(),l=e(window).height()+e(window).scrollTop()
t?n[o-(a+10+n.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):n[o+a>c&&i>c-o?"addClass":"removeClass"]("vakata-context-right"),s+u+10>l&&r.css("bottom","-1px"),n.hasClass("vakata-context-right")?a>i&&r.css("margin-right",i-a):a>c-o&&r.css("margin-left",c-o-a),r.show()}},show:function(r,i,o){var s,a,u,c,l,h,d,p
t?n[o-(a+10+n.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):n[o+a>c&&i>c-o?"addClass":"removeClass"]("vakata-context-right"),s+u+10>l&&r.css("bottom","-1px"),n.hasClass("vakata-context-right")?a>i&&r.css("margin-right",i-a):a>c-o&&r.css("margin-left",c-o-a),r.show()}},show:function(r,i,o){var s,a,c,l,h,d,p,f
switch(n.element&&n.element.length&&n.element.width(""),!0){case!i&&!r:return!1
case!!i&&!!r:n.reference=r,n.position_x=i.x,n.position_y=i.y
break
case!i&&!!r:n.reference=r,s=r.offset(),n.position_x=s.left+r.outerHeight(),n.position_y=s.top
break
case!!i&&!r:n.position_x=i.x,n.position_y=i.y}r&&!o&&e(r).data("vakata_contextmenu")&&(o=e(r).data("vakata_contextmenu")),e.vakata.context._parse(o)&&n.element.html(n.html),n.items.length&&(n.element.appendTo("body"),a=n.element,u=n.position_x,c=n.position_y,l=a.width(),h=a.height(),d=e(window).width()+e(window).scrollLeft(),p=e(window).height()+e(window).scrollTop(),t&&(u-=a.outerWidth()-e(r).outerWidth())<e(window).scrollLeft()+20&&(u=e(window).scrollLeft()+20),u+l+20>d&&(u=d-(l+20)),c+h+20>p&&(c=p-(h+20)),n.element.css({left:u,top:c}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),n.is_visible=!0,e.vakata.context._trigger("show"))},hide:function(){n.is_visible&&(n.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),n.is_visible=!1,e.vakata.context._trigger("hide"))}},e(function(){t="rtl"===e("body").css("direction")
case!!i&&!r:n.position_x=i.x,n.position_y=i.y}r&&!o&&e(r).data("vakata_contextmenu")&&(o=e(r).data("vakata_contextmenu")),e.vakata.context._parse(o)&&n.element.html(n.html),n.items.length&&(n.element.appendTo(u.body),a=n.element,c=n.position_x,l=n.position_y,h=a.width(),d=a.height(),p=e(window).width()+e(window).scrollLeft(),f=e(window).height()+e(window).scrollTop(),t&&(c-=a.outerWidth()-e(r).outerWidth())<e(window).scrollLeft()+20&&(c=e(window).scrollLeft()+20),c+h+20>p&&(c=p-(h+20)),l+d+20>f&&(l=f-(d+20)),n.element.css({left:c,top:l}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),n.is_visible=!0,e.vakata.context._trigger("show"))},hide:function(){n.is_visible&&(n.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),n.is_visible=!1,e.vakata.context._trigger("hide"))}},e(function(){t="rtl"===e(u.body).css("direction")
var r=!1
n.element=e("<ul class='vakata-context'></ul>"),n.element.on("mouseenter","li",function(t){t.stopImmediatePropagation(),e.contains(this,t.relatedTarget)||(r&&clearTimeout(r),n.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),e(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),e.vakata.context._show_submenu(this))}).on("mouseleave","li",function(t){e.contains(this,t.relatedTarget)||e(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(t){e(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),e.vakata.context.settings.hide_onmouseleave&&(r=setTimeout(function(t){return function(){e.vakata.context.hide()}}(),e.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(t){t.preventDefault(),e(this).blur().parent().hasClass("vakata-context-disabled")||!1===e.vakata.context._execute(e(this).attr("rel"))||e.vakata.context.hide()}).on("keydown","a",function(t){var r=null
switch(t.which){case 13:case 32:t.type="click",t.preventDefault(),e(t.currentTarget).trigger(t)
@ -4576,40 +4577,40 @@ break
case 27:e.vakata.context.hide(),t.preventDefault()}}).on("keydown",function(e){e.preventDefault()
var t=n.element.find(".vakata-contextmenu-shortcut-"+e.which).parent()
t.parent().not(".vakata-context-disabled")&&t.click()}),e(u).on("mousedown.vakata.jstree",function(t){n.is_visible&&n.element[0]!==t.target&&!e.contains(n.element[0],t.target)&&e.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,r){n.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),t&&n.element.addClass("vakata-context-rtl").css("direction","rtl"),n.element.find("ul").hide().end()})})}(e),e.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1}
var l,h
var d,p
e.jstree.plugins.dnd=function(t,n){this.init=function(e,t){n.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in u.createElement("span")},this.bind=function(){n.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",e.proxy(function(t){if(this.settings.dnd.large_drag_target&&e(t.target).closest(".jstree-node")[0]!==t.currentTarget)return!0
if("touchstart"===t.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0
var n=this.get_node(t.target),r=this.is_selected(n)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,i=r>1?r+" "+this.get_string("nodes"):this.get_text(t.currentTarget)
if(this.settings.core.force_text&&(i=e.vakata.html.escape(i)),n&&n.id&&n.id!==e.jstree.root&&(1===t.which||"touchstart"===t.type||"dragstart"===t.type)&&(!0===this.settings.dnd.is_draggable||e.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,r>1?this.get_top_selected(!0):[n],t))){if(l={jstree:!0,origin:this,obj:this.get_node(n,!0),nodes:r>1?this.get_top_selected():[n.id]},h=t.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),e.vakata.dnd.start(t,l,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+i+'<ins class="jstree-copy" style="display:none;">+</ins></div>')
e.vakata.dnd._trigger("start",t,{helper:e(),element:h,data:l})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(t){return t.preventDefault(),e.vakata.dnd._trigger("move",t,{helper:e(),element:h,data:l}),!1}).on("drop.jstree",e.proxy(function(t){return t.preventDefault(),e.vakata.dnd._trigger("stop",t,{helper:e(),element:h,data:l}),!1},this))},this.redraw_node=function(e,t,r,i){if((e=n.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0)
if(this.settings.core.force_text&&(i=e.vakata.html.escape(i)),n&&n.id&&n.id!==e.jstree.root&&(1===t.which||"touchstart"===t.type||"dragstart"===t.type)&&(!0===this.settings.dnd.is_draggable||e.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,r>1?this.get_top_selected(!0):[n],t))){if(d={jstree:!0,origin:this,obj:this.get_node(n,!0),nodes:r>1?this.get_top_selected():[n.id]},p=t.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),e.vakata.dnd.start(t,d,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+i+'<ins class="jstree-copy" style="display:none;">+</ins></div>')
e.vakata.dnd._trigger("start",t,{helper:e(),element:p,data:d})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(t){return t.preventDefault(),e.vakata.dnd._trigger("move",t,{helper:e(),element:p,data:d}),!1}).on("drop.jstree",e.proxy(function(t){return t.preventDefault(),e.vakata.dnd._trigger("stop",t,{helper:e(),element:p,data:d}),!1},this))},this.redraw_node=function(e,t,r,i){if((e=n.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0)
else{var o,s,a=null
for(o=0,s=e.childNodes.length;s>o;o++)if(e.childNodes[o]&&e.childNodes[o].className&&-1!==e.childNodes[o].className.indexOf("jstree-anchor")){a=e.childNodes[o]
break}a&&a.setAttribute("draggable",!0)}return e}},e(function(){var n=!1,r=!1,i=!1,o=!1,s=e('<div id="jstree-marker">&#160;</div>').hide()
e(u).on("dnd_start.vakata.jstree",function(e,t){n=!1,i=!1,t&&t.data&&t.data.jstree&&s.appendTo("body")}).on("dnd_move.vakata.jstree",function(a,u){var c=u.event.target!==i.target
e(u).on("dragover.vakata.jstree",function(t){p&&e.vakata.dnd._trigger("move",t,{helper:e(),element:p,data:d})}).on("drop.vakata.jstree",function(t){p&&(e.vakata.dnd._trigger("stop",t,{helper:e(),element:p,data:d}),p=null,d=null)}).on("dnd_start.vakata.jstree",function(e,t){n=!1,i=!1,t&&t.data&&t.data.jstree&&s.appendTo(u.body)}).on("dnd_move.vakata.jstree",function(a,u){var c=u.event.target!==i.target
if(o&&(!u.event||"dragover"!==u.event.type||c)&&clearTimeout(o),u&&u.data&&u.data.jstree&&(!u.event.target.id||"jstree-marker"!==u.event.target.id)){i=u.event
var l,h,d,p,f,g,m,v,y,b,C,A,_,I,w,x,k=e.jstree.reference(u.event.target),j=!1,E=!1,S=!1
if(k&&k._data&&k._data.dnd)if(s.attr("class","jstree-"+k.get_theme()+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")),w=u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey)),u.helper.children().attr("class","jstree-"+k.get_theme()+" jstree-"+k.get_theme()+"-"+k.get_theme_variant()+" "+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[w?"show":"hide"](),u.event.target!==k.element[0]&&u.event.target!==k.get_container_ul()[0]||0!==k.get_container_ul().children().length){if((j=k.settings.dnd.large_drop_target?e(u.event.target).closest(".jstree-node").children(".jstree-anchor"):e(u.event.target).closest(".jstree-anchor"))&&j.length&&j.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(E=j.offset(),S=(u.event.pageY!==t?u.event.pageY:u.event.originalEvent.pageY)-E.top,d=j.outerHeight(),g=d/3>S?["b","i","a"]:S>d-d/3?["a","i","b"]:S>d/2?["i","a","b"]:["i","b","a"],e.each(g,function(t,i){switch(i){case"b":l=E.left-6,h=E.top,p=k.get_parent(j),f=j.parent().index()
var l,h,d,p,f,g,m,v,y,b,C,A,_,I,w,x,k,j=e.jstree.reference(u.event.target),E=!1,S=!1,T=!1
if(j&&j._data&&j._data.dnd)if(s.attr("class","jstree-"+j.get_theme()+(j.settings.core.themes.responsive?" jstree-dnd-responsive":"")),w=u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey)),u.helper.children().attr("class","jstree-"+j.get_theme()+" jstree-"+j.get_theme()+"-"+j.get_theme_variant()+" "+(j.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[w?"show":"hide"](),u.event.target!==j.element[0]&&u.event.target!==j.get_container_ul()[0]||0!==j.get_container_ul().children().length){if((E=j.settings.dnd.large_drop_target?e(u.event.target).closest(".jstree-node").children(".jstree-anchor"):e(u.event.target).closest(".jstree-anchor"))&&E.length&&E.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(S=E.offset(),T=(u.event.pageY!==t?u.event.pageY:u.event.originalEvent.pageY)-S.top,d=E.outerHeight(),g=d/3>T?["b","i","a"]:T>d-d/3?["a","i","b"]:T>d/2?["i","a","b"]:["i","b","a"],e.each(g,function(t,i){switch(i){case"b":l=S.left-6,h=S.top,p=j.get_parent(E),f=E.parent().index(),k="jstree-below"
break
case"i":_=k.settings.dnd.inside_pos,I=k.get_node(j.parent()),l=E.left-2,h=E.top+d/2+1,p=I.id,f="first"===_?0:"last"===_?I.children.length:Math.min(_,I.children.length)
case"i":_=j.settings.dnd.inside_pos,I=j.get_node(E.parent()),l=S.left-2,h=S.top+d/2+1,p=I.id,f="first"===_?0:"last"===_?I.children.length:Math.min(_,I.children.length),k="jstree-inside"
break
case"a":l=E.left-6,h=E.top+d,p=k.get_parent(j),f=j.parent().index()+1}for(m=!0,v=0,y=u.data.nodes.length;y>v;v++)if(b=u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey))?"copy_node":"move_node",C=f,"move_node"===b&&"a"===i&&u.data.origin&&u.data.origin===k&&p===k.get_parent(u.data.nodes[v])&&(A=k.get_node(p),C>e.inArray(u.data.nodes[v],A.children)&&(C-=1)),!(m=m&&(k&&k.settings&&k.settings.dnd&&!1===k.settings.dnd.check_while_dragging||k.check(b,u.data.origin&&u.data.origin!==k?u.data.origin.get_node(u.data.nodes[v]):u.data.nodes[v],p,C,{dnd:!0,ref:k.get_node(j.parent()),pos:i,origin:u.data.origin,is_multi:u.data.origin&&u.data.origin!==k,is_foreign:!u.data.origin})))){k&&k.last_error&&(r=k.last_error())
break}return"i"===i&&j.parent().is(".jstree-closed")&&k.settings.dnd.open_timeout&&(!u.event||"dragover"!==u.event.type||c)&&(o&&clearTimeout(o),o=setTimeout(function(e,t){return function(){e.open_node(t)}}(k,j),k.settings.dnd.open_timeout)),m?(x=k.get_node(p,!0),x.hasClass(".jstree-dnd-parent")||(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),x.addClass("jstree-dnd-parent")),n={ins:k,par:p,pos:"i"!==i||"last"!==_||0!==f||k.is_loaded(I)?f:"last"},s.css({left:l+"px",top:h+"px"}).show(),u.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),u.event.originalEvent&&u.event.originalEvent.dataTransfer&&(u.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"),r={},g=!0,!1):void 0}),!0===g))return}else{for(m=!0,v=0,y=u.data.nodes.length;y>v&&(m=m&&k.check(u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey))?"copy_node":"move_node",u.data.origin&&u.data.origin!==k?u.data.origin.get_node(u.data.nodes[v]):u.data.nodes[v],e.jstree.root,"last",{dnd:!0,ref:k.get_node(e.jstree.root),pos:"i",origin:u.data.origin,is_multi:u.data.origin&&u.data.origin!==k,is_foreign:!u.data.origin}));v++);if(m)return n={ins:k,par:e.jstree.root,pos:"last"},s.hide(),u.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(u.event.originalEvent&&u.event.originalEvent.dataTransfer&&(u.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"))}e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),n=!1,u.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),u.event.originalEvent&&u.event.originalEvent.dataTransfer&&(u.event.originalEvent.dataTransfer.dropEffect="none"),s.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(s.hide(),n=!1,i=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(t,a){if(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),o&&clearTimeout(o),a&&a.data&&a.data.jstree){s.hide().detach()
case"a":l=S.left-6,h=S.top+d,p=j.get_parent(E),f=E.parent().index()+1,k="jstree-above"}for(m=!0,v=0,y=u.data.nodes.length;y>v;v++)if(b=u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey))?"copy_node":"move_node",C=f,"move_node"===b&&"a"===i&&u.data.origin&&u.data.origin===j&&p===j.get_parent(u.data.nodes[v])&&(A=j.get_node(p),C>e.inArray(u.data.nodes[v],A.children)&&(C-=1)),!(m=m&&(j&&j.settings&&j.settings.dnd&&!1===j.settings.dnd.check_while_dragging||j.check(b,u.data.origin&&u.data.origin!==j?u.data.origin.get_node(u.data.nodes[v]):u.data.nodes[v],p,C,{dnd:!0,ref:j.get_node(E.parent()),pos:i,origin:u.data.origin,is_multi:u.data.origin&&u.data.origin!==j,is_foreign:!u.data.origin})))){j&&j.last_error&&(r=j.last_error())
break}return"i"===i&&E.parent().is(".jstree-closed")&&j.settings.dnd.open_timeout&&(!u.event||"dragover"!==u.event.type||c)&&(o&&clearTimeout(o),o=setTimeout(function(e,t){return function(){e.open_node(t)}}(j,E),j.settings.dnd.open_timeout)),m?(x=j.get_node(p,!0),x.hasClass(".jstree-dnd-parent")||(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),x.addClass("jstree-dnd-parent")),n={ins:j,par:p,pos:"i"!==i||"last"!==_||0!==f||j.is_loaded(I)?f:"last"},s.css({left:l+"px",top:h+"px"}).show(),s.removeClass("jstree-above jstree-inside jstree-below").addClass(k),u.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),u.event.originalEvent&&u.event.originalEvent.dataTransfer&&(u.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"),r={},g=!0,!1):void 0}),!0===g))return}else{for(m=!0,v=0,y=u.data.nodes.length;y>v&&(m=m&&j.check(u.data.origin&&(u.data.origin.settings.dnd.always_copy||u.data.origin.settings.dnd.copy&&(u.event.metaKey||u.event.ctrlKey))?"copy_node":"move_node",u.data.origin&&u.data.origin!==j?u.data.origin.get_node(u.data.nodes[v]):u.data.nodes[v],e.jstree.root,"last",{dnd:!0,ref:j.get_node(e.jstree.root),pos:"i",origin:u.data.origin,is_multi:u.data.origin&&u.data.origin!==j,is_foreign:!u.data.origin}));v++);if(m)return n={ins:j,par:e.jstree.root,pos:"last"},s.hide(),u.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(u.event.originalEvent&&u.event.originalEvent.dataTransfer&&(u.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"))}e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),n=!1,u.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),u.event.originalEvent&&u.event.originalEvent.dataTransfer,s.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(s.hide(),n=!1,i=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(t,a){if(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),o&&clearTimeout(o),a&&a.data&&a.data.jstree){s.hide().detach()
var u,c,l=[]
if(n){for(u=0,c=a.data.nodes.length;c>u;u++)l[u]=a.data.origin?a.data.origin.get_node(a.data.nodes[u]):a.data.nodes[u]
n.ins[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(a.event.metaKey||a.event.ctrlKey))?"copy_node":"move_node"](l,n.par,n.pos,!1,!1,!1,a.data.origin)}else u=e(a.event.target).closest(".jstree"),u.length&&r&&r.error&&"check"===r.error&&(u=u.jstree(!0))&&u.settings.core.error.call(this,r)
i=!1,n=!1}}).on("keyup.jstree keydown.jstree",function(t,a){(a=e.vakata.dnd._get())&&a.data&&a.data.jstree&&("keyup"===t.type&&27===t.which?(o&&clearTimeout(o),n=!1,r=!1,i=!1,o=!1,s.hide().detach(),e.vakata.dnd._clean()):(a.helper.find(".jstree-copy").first()[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(t.metaKey||t.ctrlKey))?"show":"hide"](),i&&(i.metaKey=t.metaKey,i.ctrlKey=t.ctrlKey,e.vakata.dnd._trigger("move",i))))})}),function(e){e.vakata.html={div:e("<div />"),escape:function(t){return e.vakata.html.div.text(t).html()},strip:function(t){return e.vakata.html.div.empty().append(e.parseHTML(t)).text()}}
var n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1}
e.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(n,r,i){i===t&&(i=e.vakata.dnd._get()),i.event=r,e(u).triggerHandler("dnd_"+n+".vakata",i)},_get:function(){return{data:n.data,element:n.element,helper:n.helper}},_clean:function(){n.helper&&n.helper.remove(),n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},e(u).off("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(u).off("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop)},_scroll:function(t){if(!n.scroll_e||!n.scroll_l&&!n.scroll_t)return n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),!1
e.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(n,r,i){i===t&&(i=e.vakata.dnd._get()),i.event=r,e(u).triggerHandler("dnd_"+n+".vakata",i)},_get:function(){return{data:n.data,element:n.element,helper:n.helper}},_clean:function(){n.helper&&n.helper.remove(),n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},p=null,e(u).off("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(u).off("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop)},_scroll:function(t){if(!n.scroll_e||!n.scroll_l&&!n.scroll_t)return n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),!1
if(!n.scroll_i)return n.scroll_i=setInterval(e.vakata.dnd._scroll,100),!1
if(!0===t)return!1
var r=n.scroll_e.scrollTop(),i=n.scroll_e.scrollLeft()
n.scroll_e.scrollTop(r+n.scroll_t*e.vakata.dnd.settings.scroll_speed),n.scroll_e.scrollLeft(i+n.scroll_l*e.vakata.dnd.settings.scroll_speed),(r!==n.scroll_e.scrollTop()||i!==n.scroll_e.scrollLeft())&&e.vakata.dnd._trigger("scroll",n.scroll_e)},start:function(t,r,i){"touchstart"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=u.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag&&e.vakata.dnd.stop({})
try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.touchAction="none",t.currentTarget.style.msTouchAction="none",t.currentTarget.style.MozUserSelect="none")}catch(e){}return n.init_x=t.pageX,n.init_y=t.pageY,n.data=r,n.is_down=!0,n.element=t.currentTarget,n.target=t.target,n.is_touch="touchstart"===t.type,!1!==i&&(n.helper=e("<div id='vakata-dnd'></div>").html(i).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),e(u).on("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(u).on("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop),!1},drag:function(t){if("touchmove"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=u.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_down){if(!n.is_drag){if(!(Math.abs(t.pageX-n.init_x)>(n.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)||Math.abs(t.pageY-n.init_y)>(n.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)))return
n.helper&&(n.helper.appendTo("body"),n.helper_w=n.helper.outerWidth()),n.is_drag=!0,e(n.target).one("click.vakata",!1),e.vakata.dnd._trigger("start",t)}var r=!1,i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,h=!1,d=!1,p=!1
n.helper&&(n.helper.appendTo(u.body),n.helper_w=n.helper.outerWidth()),n.is_drag=!0,e(n.target).one("click.vakata",!1),e.vakata.dnd._trigger("start",t)}var r=!1,i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,h=!1,d=!1,p=!1
return n.scroll_t=0,n.scroll_l=0,n.scroll_e=!1,e(e(t.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(e(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var r=e(this),i=r.offset()
return this.scrollHeight>this.offsetHeight&&(i.top+r.height()-t.pageY<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=1),t.pageY-i.top<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(i.left+r.width()-t.pageX<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=1),t.pageX-i.left<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=-1)),n.scroll_t||n.scroll_l?(n.scroll_e=e(this),!1):void 0}),n.scroll_e||(r=e(u),i=e(window),o=r.height(),s=i.height(),a=r.width(),c=i.width(),l=r.scrollTop(),h=r.scrollLeft(),o>s&&t.pageY-l<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=-1),o>s&&s-(t.pageY-l)<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=1),a>c&&t.pageX-h<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=-1),a>c&&c-(t.pageX-h)<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=1),(n.scroll_t||n.scroll_l)&&(n.scroll_e=r)),n.scroll_e&&e.vakata.dnd._scroll(!0),n.helper&&(d=parseInt(t.pageY+e.vakata.dnd.settings.helper_top,10),p=parseInt(t.pageX+e.vakata.dnd.settings.helper_left,10),o&&d+25>o&&(d=o-50),a&&p+n.helper_w>a&&(p=a-(n.helper_w+2)),n.helper.css({left:p+"px",top:d+"px"})),e.vakata.dnd._trigger("move",t),!1}},stop:function(t){if("touchend"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=u.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag)t.target!==n.target&&e(n.target).off("click.vakata"),e.vakata.dnd._trigger("stop",t)
else if("touchend"===t.type&&t.target===n.target){var r=setTimeout(function(){e(t.target).click()},100)
e(t.target).one("click",function(){r&&clearTimeout(r)})}return e.vakata.dnd._clean(),!1}}}(e),e.jstree.defaults.massload=null,e.jstree.plugins.massload=function(t,n){this.init=function(e,t){this._data.massload={},n.init.call(this,e,t)},this._load_nodes=function(t,r,i,o){var s,a,u,c=this.settings.massload,l=(JSON.stringify(t),[]),h=this._model.data
e(t.target).one("click",function(){r&&clearTimeout(r)})}return e.vakata.dnd._clean(),!1}}}(e),e.jstree.defaults.massload=null,e.jstree.plugins.massload=function(t,n){this.init=function(e,t){this._data.massload={},n.init.call(this,e,t)},this._load_nodes=function(t,r,i,o){var s,a,u,c=this.settings.massload,l=[],h=this._model.data
if(!i){for(s=0,a=t.length;a>s;s++)(!h[t[s]]||!h[t[s]].state.loaded&&!h[t[s]].state.failed||o)&&(l.push(t[s]),(u=this.get_node(t[s],!0))&&u.length&&u.addClass("jstree-loading").attr("aria-busy",!0))
if(this._data.massload={},l.length){if(e.isFunction(c))return c.call(this,l,e.proxy(function(e){var s,a
if(e)for(s in e)e.hasOwnProperty(s)&&(this._data.massload[s]=e[s])
@ -4643,9 +4644,9 @@ for(A=d,f=Math.max(1,u-d+1),g=Math.min(u+d,y)+h,m=new Array(g+2),m[g+1]=(1<<n)-1
f=Math.max(1,2*u-C)}if(s(n+1,u)>b)break
p=m}return{isMatch:C>=0,score:_}},!0===n?{search:a}:a(n)},e.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(e),e.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},e.jstree.plugins.sort=function(t,n){this.bind=function(){n.bind.call(this),this.element.on("model.jstree",e.proxy(function(e,t){this.sort(t.parent,!0)},this)).on("rename_node.jstree create_node.jstree",e.proxy(function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",e.proxy(function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)},this))},this.sort=function(t,n){var r,i
if((t=this.get_node(t))&&t.children&&t.children.length&&(t.children.sort(e.proxy(this.settings.sort,this)),n))for(r=0,i=t.children_d.length;i>r;r++)this.sort(t.children_d[r],!1)}}
var d=!1
var f=!1
e.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},e.jstree.plugins.state=function(t,n){this.bind=function(){n.bind.call(this)
var t=e.proxy(function(){this.element.on(this.settings.state.events,e.proxy(function(){d&&clearTimeout(d),d=setTimeout(e.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this)
var t=e.proxy(function(){this.element.on(this.settings.state.events,e.proxy(function(){f&&clearTimeout(f),f=setTimeout(e.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this)
this.element.on("ready.jstree",e.proxy(function(e,n){this.element.one("restore_state.jstree",t),this.restore_state()||t()},this))},this.save_state=function(){var t=this.get_state()
this.settings.state.preserve_loaded||delete t.core.loaded
var n={state:t,ttl:this.settings.state.ttl,sec:+new Date}
@ -4692,8 +4693,8 @@ var u,c,l,h,d,p,f=this._model.data,g=this.settings.unique.case_sensitive,m=this.
for(c=u=this.get_string("New node"),l=[],h=0,d=n.children.length;d>h;h++)p=f[n.children[h]].text,g||(p=p.toLowerCase()),m&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),l.push(p)
for(h=1,p=c,g||(p=p.toLowerCase()),m&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==e.inArray(p,l);)c=v.call(this,u,++h).toString(),p=c,g||(p=p.toLowerCase()),m&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))
i.text=c}return r.create_node.call(this,n,i,o,s,a)}}
var p=u.createElement("DIV")
if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML="&#160;",e.jstree.plugins.wholerow=function(t,n){this.bind=function(){n.bind.call(this),this.element.on("ready.jstree set_state.jstree",e.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",e.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")
var g=u.createElement("DIV")
if(g.setAttribute("unselectable","on"),g.setAttribute("role","presentation"),g.className="jstree-wholerow",g.innerHTML="&#160;",e.jstree.plugins.wholerow=function(t,n){this.bind=function(){n.bind.call(this),this.element.on("ready.jstree set_state.jstree",e.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",e.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")
var n,r,i=!1
for(n=0,r=t.selected.length;r>n;n++)(i=this.get_node(t.selected[n],!0))&&i.length&&i.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",e.proxy(function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",e.proxy(function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",e.proxy(function(t){if(this._data.contextmenu){t.preventDefault()
var n=e.Event("contextmenu",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,pageX:t.pageX,pageY:t.pageY})
@ -4703,12 +4704,12 @@ e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().tr
var n=e.Event("dblclick",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey})
e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",e.proxy(function(t){t.stopImmediatePropagation()
var n=e.Event("click",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey})
e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",e.proxy(function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),n.teardown.call(this)},this.redraw_node=function(t,r,i,o){if(t=n.redraw_node.apply(this,arguments)){var s=p.cloneNode(!0);-1!==e.inArray(t.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===t.id&&(s.className+=" jstree-wholerow-hovered"),t.insertBefore(s,t.childNodes[0])}return t}},u.registerElement&&Object&&Object.create){var f=Object.create(HTMLElement.prototype)
f.createdCallback=function(){var t,n={core:{},plugins:[]}
e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",e.proxy(function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),n.teardown.call(this)},this.redraw_node=function(t,r,i,o){if(t=n.redraw_node.apply(this,arguments)){var s=g.cloneNode(!0);-1!==e.inArray(t.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===t.id&&(s.className+=" jstree-wholerow-hovered"),t.insertBefore(s,t.childNodes[0])}return t}},window.customElements&&Object&&Object.create){var m=Object.create(HTMLElement.prototype)
m.createdCallback=function(){var t,n={core:{},plugins:[]}
for(t in e.jstree.plugins)e.jstree.plugins.hasOwnProperty(t)&&this.attributes[t]&&(n.plugins.push(t),this.getAttribute(t)&&JSON.parse(this.getAttribute(t))&&(n[t]=JSON.parse(this.getAttribute(t))))
for(t in e.jstree.defaults.core)e.jstree.defaults.core.hasOwnProperty(t)&&this.attributes[t]&&(n.core[t]=JSON.parse(this.getAttribute(t))||this.getAttribute(t))
e(this).jstree(n)}
try{u.registerElement("vakata-jstree",{prototype:f})}catch(e){}}}}),function(){function e(e){"use strict"
try{window.customElements.define("vakata-jstree",function(){},{prototype:m})}catch(e){}}}}),function(){function e(e){"use strict"
var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}}
if(!1===e)return JSON.parse(JSON.stringify(t))
var n={}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long