(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}}}(function(e,f){ /*! * jsTree 3.0.9 * http://jstree.com/ * * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com) * * Licensed same as jquery - under the terms of the MIT License * http://www.opensource.org/licenses/mit-license.php */ /*! * if using jslint please allow for the jQuery global and use following options: * jslint: browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true */ if(e.jstree){return}var m=0,b=false,r=false,l=false,n=[],h=e("script:last").attr("src"),d=document,g=d.createElement("LI"),k,j;g.setAttribute("role","treeitem");k=d.createElement("I");k.className="jstree-icon jstree-ocl";k.setAttribute("role","presentation");g.appendChild(k);k=d.createElement("A");k.className="jstree-anchor";k.setAttribute("href","#");k.setAttribute("tabindex","-1");j=d.createElement("I");j.className="jstree-icon jstree-themeicon";j.setAttribute("role","presentation");k.appendChild(j);g.appendChild(k);k=j=null;e.jstree={version:"3.0.9",defaults:{plugins:[]},plugins:{},path:h&&h.indexOf("/")!==-1?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g};e.jstree.create=function(v,s){var u=new e.jstree.core(++m),t=s;s=e.extend(true,{},e.jstree.defaults,s);if(t&&t.plugins){s.plugins=t.plugins}e.each(s.plugins,function(x,w){if(x!=="core"){u=u.plugin(w,s[w])}});u.init(v,s);return u};e.jstree.destroy=function(){e(".jstree:jstree").jstree("destroy");e(document).off(".jstree")};e.jstree.core=function(s){this._id=s;this._cnt=0;this._wrk=null;this._data={core:{themes:{name:false,dots:false,icons:false},selected:[],last_error:{},working:false,worker_queue:[],focused:null}}};e.jstree.reference=function(u){var s=null,t=null;if(u&&u.id){u=u.id}if(!t||!t.length){try{t=e(u)}catch(v){}}if(!t||!t.length){try{t=e("#"+u.replace(e.jstree.idregex,"\\$&"))}catch(v){}}if(t&&t.length&&(t=t.closest(".jstree")).length&&(t=t.data("jstree"))){s=t}else{e(".jstree").each(function(){var w=e(this).data("jstree");if(w&&w._model.data[u]){s=w;return false}})}return s};e.fn.jstree=function(t){var v=(typeof t==="string"),u=Array.prototype.slice.call(arguments,1),s=null;if(t===true&&!this.length){return false}this.each(function(){var w=e.jstree.reference(this),x=v&&w?w[t]:null;s=v&&x?x.apply(w,u):null;if(!w&&!v&&(t===f||e.isPlainObject(t))){e(this).data("jstree",new e.jstree.create(this,t))}if((w&&!v)||t===true){s=w||false}if(s!==null&&s!==f){return false}});return s!==null&&s!==f?s:this};e.expr[":"].jstree=e.expr.createPseudo(function(s){return function(t){return e(t).hasClass("jstree")&&e(t).data("jstree")!==f}});e.jstree.defaults.core={data:false,strings:false,check_callback:false,error:e.noop,animation:200,multiple:true,themes:{name:false,url:false,dir:false,dots:true,icons:true,stripes:false,variant:false,responsive:false},expand_selected_onload:true,worker:true,force_text:false,dblclick_toggle:true};e.jstree.core.prototype={plugin:function(u,t){var s=e.jstree.plugins[u];if(s){this._data[u]={};s.prototype=this;return new s(t,this)}return this},init:function(t,s){this._model={data:{"#":{id:"#",parent:null,parents:[],children:[],children_d:[],state:{loaded:false}}},changed:[],force_full_redraw:false,redraw_timeout:false,default_state:{loaded:true,opened:false,selected:false,disabled:false}};this.element=e(t).addClass("jstree jstree-"+this._id);this.settings=s;this._data.core.ready=false;this._data.core.loaded=false;this._data.core.rtl=(this.element.css("direction")==="rtl");this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl");this.element.attr("role","tree");if(this.settings.core.multiple){this.element.attr("aria-multiselectable",true)}if(!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(true);this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return this.nodeType===3&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove();this.element.html("");this.element.attr("aria-activedescendant","j"+this._id+"_loading");this._data.core.li_height=this.get_container_ul().children("li").first().height()||24;this.trigger("loading");this.load_node("#")},destroy:function(s){if(this._wrk){try{window.URL.revokeObjectURL(this._wrk);this._wrk=null}catch(t){}}if(!s){this.element.empty()}this.teardown()},teardown:function(){this.unbind();this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"")});this.element=null},bind:function(){var t="",s=null,u=0;this.element.on("dblclick.jstree",function(){if(document.selection&&document.selection.empty){document.selection.empty()}else{if(window.getSelection){var v=window.getSelection();try{v.removeAllRanges();v.collapse()}catch(w){}}}}).on("mousedown.jstree",e.proxy(function(v){if(v.target===this.element[0]){v.preventDefault();u=+(new Date())}},this)).on("mousedown.jstree",".jstree-ocl",function(v){v.preventDefault()}).on("click.jstree",".jstree-ocl",e.proxy(function(v){this.toggle_node(v.target)},this)).on("dblclick.jstree",".jstree-anchor",e.proxy(function(v){if(this.settings.core.dblclick_toggle){this.toggle_node(v.target)}},this)).on("click.jstree",".jstree-anchor",e.proxy(function(v){v.preventDefault();if(v.currentTarget!==document.activeElement){e(v.currentTarget).focus()}this.activate_node(v.currentTarget,v)},this)).on("keydown.jstree",".jstree-anchor",e.proxy(function(v){if(v.target.tagName==="INPUT"){return true}var w=null;if(this._data.core.rtl){if(v.which===37){v.which=39}else{if(v.which===39){v.which=37}}}switch(v.which){case 32:if(v.ctrlKey){v.type="click";e(v.currentTarget).trigger(v)}break;case 13:v.type="click";e(v.currentTarget).trigger(v);break;case 37:v.preventDefault();if(this.is_open(v.currentTarget)){this.close_node(v.currentTarget)}else{w=this.get_parent(v.currentTarget);if(w&&w.id!=="#"){this.get_node(w,true).children(".jstree-anchor").focus()}}break;case 38:v.preventDefault();w=this.get_prev_dom(v.currentTarget);if(w&&w.length){w.children(".jstree-anchor").focus()}break;case 39:v.preventDefault();if(this.is_closed(v.currentTarget)){this.open_node(v.currentTarget,function(x){this.get_node(x,true).children(".jstree-anchor").focus()})}else{if(this.is_open(v.currentTarget)){w=this.get_node(v.currentTarget,true).children(".jstree-children")[0];if(w){e(this._firstChild(w)).children(".jstree-anchor").focus()}}}break;case 40:v.preventDefault();w=this.get_next_dom(v.currentTarget);if(w&&w.length){w.children(".jstree-anchor").focus()}break;case 106:this.open_all();break;case 36:v.preventDefault();w=this._firstChild(this.get_container_ul()[0]);if(w){e(w).children(".jstree-anchor").filter(":visible").focus()}break;case 35:v.preventDefault();this.element.find(".jstree-anchor").filter(":visible").last().focus();break}},this)).on("load_node.jstree",e.proxy(function(w,v){if(v.status){if(v.node.id==="#"&&!this._data.core.loaded){this._data.core.loaded=true;if(this._firstChild(this.get_container_ul()[0])){this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id)}this.trigger("loaded")}if(!this._data.core.ready){setTimeout(e.proxy(function(){if(!this.get_container_ul().find(".jstree-loading").length){this._data.core.ready=true;if(this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var z=[],y,x;for(y=0,x=this._data.core.selected.length;y1){w.slice(y).each(e.proxy(function(B,A){if(e(A).text().toLowerCase().indexOf(t)===0){e(A).focus();v=true;return false}},this));if(v){return}w.slice(0,y).each(e.proxy(function(B,A){if(e(A).text().toLowerCase().indexOf(t)===0){e(A).focus();v=true;return false}},this));if(v){return}}if(new RegExp("^"+x+"+$").test(t)){w.slice(y+1).each(e.proxy(function(B,A){if(e(A).text().toLowerCase().charAt(0)===x){e(A).focus();v=true;return false}},this));if(v){return}w.slice(0,y+1).each(e.proxy(function(B,A){if(e(A).text().toLowerCase().charAt(0)===x){e(A).focus();v=true;return false}},this));if(v){return}}},this)).on("init.jstree",e.proxy(function(){var v=this.settings.core.themes;this._data.core.themes.dots=v.dots;this._data.core.themes.stripes=v.stripes;this._data.core.themes.icons=v.icons;this.set_theme(v.name||"default",v.url);this.set_theme_variant(v.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)).on("blur.jstree",".jstree-anchor",e.proxy(function(v){this._data.core.focused=null;e(v.currentTarget).filter(".jstree-hovered").mouseleave();this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",e.proxy(function(w){var v=this.get_node(w.currentTarget);if(v&&v.id){this._data.core.focused=v.id}this.element.find(".jstree-hovered").not(w.currentTarget).mouseleave();e(w.currentTarget).mouseenter();this.element.attr("tabindex","-1")},this)).on("focus.jstree",e.proxy(function(){if(+(new Date())-u>500&&!this._data.core.focused){u=0;this.get_node(this.element.attr("aria-activedescendant"),true).find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",e.proxy(function(v){this.hover_node(v.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",e.proxy(function(v){this.dehover_node(v.currentTarget)},this))},unbind:function(){this.element.off(".jstree");e(document).off(".jstree-"+this._id)},trigger:function(s,t){if(!t){t={}}t.instance=this;this.element.triggerHandler(s.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 s=this.settings.core.strings;if(e.isFunction(s)){return s.call(this,t)}if(s&&s[t]){return s[t]}return t},_firstChild:function(s){s=s?s.firstChild:null;while(s!==null&&s.nodeType!==1){s=s.nextSibling}return s},_nextSibling:function(s){s=s?s.nextSibling:null;while(s!==null&&s.nodeType!==1){s=s.nextSibling}return s},_previousSibling:function(s){s=s?s.previousSibling:null;while(s!==null&&s.nodeType!==1){s=s.previousSibling}return s},get_node:function(u,s){if(u&&u.id){u=u.id}var v;try{if(this._model.data[u]){u=this._model.data[u]}else{if(typeof u==="string"&&this._model.data[u.replace(/^#/,"")]){u=this._model.data[u.replace(/^#/,"")]}else{if(typeof u==="string"&&(v=e("#"+u.replace(e.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[v.closest(".jstree-node").attr("id")]){u=this._model.data[v.closest(".jstree-node").attr("id")]}else{if((v=e(u,this.element)).length&&this._model.data[v.closest(".jstree-node").attr("id")]){u=this._model.data[v.closest(".jstree-node").attr("id")]}else{if((v=e(u,this.element)).length&&v.hasClass("jstree")){u=this._model.data["#"]}else{return false}}}}}if(s){u=u.id==="#"?this.element:e("#"+u.id.replace(e.jstree.idregex,"\\$&"),this.element)}return u}catch(t){return false}},get_path:function(x,v,u){x=x.parents?x:this.get_node(x);if(!x||x.id==="#"||!x.parents){return false}var t,s,w=[];w.push(u?x.id:x.text);for(t=0,s=x.parents.length;t0)},is_loaded:function(s){s=this.get_node(s);return s&&s.state.loaded},is_loading:function(s){s=this.get_node(s);return s&&s.state&&s.state.loading},is_open:function(s){s=this.get_node(s);return s&&s.state.opened},is_closed:function(s){s=this.get_node(s);return s&&this.is_parent(s)&&!s.state.opened},is_leaf:function(s){return !this.is_parent(s)},load_node:function(w,y){var t,s,v,u,x;if(e.isArray(w)){this._load_nodes(w.slice(),y);return true}w=this.get_node(w);if(!w){if(y){y.call(this,w,false)}return false}if(w.state.loaded){w.state.loaded=false;for(t=0,s=w.children_d.length;t").html(w);x.text=this.settings.core.force_text?w.text():w.html();w=A.data();x.data=w?e.extend(true,{},w):null;x.state.opened=A.hasClass("jstree-open");x.state.selected=A.children("a").hasClass("jstree-clicked");x.state.disabled=A.children("a").hasClass("jstree-disabled");if(x.data&&x.data.jstree){for(y in x.data.jstree){if(x.data.jstree.hasOwnProperty(y)){x.state[y]=x.data.jstree[y]}}}w=A.children("a").children(".jstree-themeicon");if(w.length){x.icon=w.hasClass("jstree-themeicon-hidden")?false:w.attr("rel")}if(x.state.icon){x.icon=x.state.icon}w=A.children("ul").children("li");do{v="j"+this._id+"_"+(++this._cnt)}while(u[v]);x.id=x.li_attr.id?x.li_attr.id.toString():v;if(w.length){w.each(e.proxy(function(D,C){B=this._parse_model_from_html(e(C),x.id,s);z=this._model.data[B];x.children.push(B);if(z.children_d.length){x.children_d=x.children_d.concat(z.children_d)}},this));x.children_d=x.children_d.concat(x.children)}else{if(A.hasClass("jstree-closed")){x.state.loaded=false}}if(x.li_attr["class"]){x.li_attr["class"]=x.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")}if(x.a_attr["class"]){x.a_attr["class"]=x.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")}u[x.id]=x;if(x.state.selected){this._data.core.selected.push(x.id)}return x.id},_parse_model_from_flat_json:function(A,t,s){if(!s){s=[]}else{s=s.concat()}if(t){s.unshift(t)}var v=A.id.toString(),u=this._model.data,C=this._model.default_state,y,w,B,z,x={id:v,text:A.text||"",icon:A.icon!==f?A.icon:true,parent:t,parents:s,children:A.children||[],children_d:A.children_d||[],data:A.data,state:{},li_attr:{id:false},a_attr:{href:"#"},original:false};for(y in C){if(C.hasOwnProperty(y)){x.state[y]=C[y]}}if(A&&A.data&&A.data.jstree&&A.data.jstree.icon){x.icon=A.data.jstree.icon}if(A&&A.data){x.data=A.data;if(A.data.jstree){for(y in A.data.jstree){if(A.data.jstree.hasOwnProperty(y)){x.state[y]=A.data.jstree[y]}}}}if(A&&typeof A.state==="object"){for(y in A.state){if(A.state.hasOwnProperty(y)){x.state[y]=A.state[y]}}}if(A&&typeof A.li_attr==="object"){for(y in A.li_attr){if(A.li_attr.hasOwnProperty(y)){x.li_attr[y]=A.li_attr[y]}}}if(!x.li_attr.id){x.li_attr.id=v}if(A&&typeof A.a_attr==="object"){for(y in A.a_attr){if(A.a_attr.hasOwnProperty(y)){x.a_attr[y]=A.a_attr[y]}}}if(A&&A.children&&A.children===true){x.state.loaded=false;x.children=[];x.children_d=[]}u[x.id]=x;for(y=0,w=x.children.length;y
  • "+this.get_string("Loading ...")+"
  • ");this.element.attr("aria-activedescendant","j"+this._id+"_loading")}this.load_node("#",function(w,v){if(v){this.get_container_ul()[0].className=u;if(this._firstChild(this.get_container_ul()[0])){this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id)}this.set_state(e.extend(true,{},this._data.core.state),function(){this.trigger("refresh")})}this._data.core.state=null})},refresh_node:function(v){v=this.get_node(v);if(!v||v.id==="#"){return false}var w=[],t=[],u=this._data.core.selected.concat([]);t.push(v.id);if(v.state.opened===true){w.push(v.id)}this.get_node(v,true).find(".jstree-open").each(function(){w.push(this.id)});this._load_nodes(t,e.proxy(function(s){this.open_node(w,false,0);this.select_node(this._data.core.selected);this.trigger("refresh_node",{node:v,nodes:s})},this))},set_id:function(v,w){v=this.get_node(v);if(!v||v.id==="#"){return false}var u,t,s=this._model.data;w=w.toString();s[v.parent].children[e.inArray(v.id,s[v.parent].children)]=w;for(u=0,t=v.parents.length;ux.children.length){z=x.children.length}if(!s.id){s.id=true}if(!this.check("create_node",s,x,z)){this.settings.core.error.call(this,this._data.core.last_error);return false}if(s.id===true){delete s.id}s=this._parse_model_from_json(s,x.id,x.parents.concat());if(!s){return false}u=this.get_node(s);w=[];w.push(s);w=w.concat(u.children_d);this.trigger("model",{nodes:w,parent:x.id});x.children_d=x.children_d.concat(w);for(v=0,t=x.parents.length;v=z?v+1:v]=x.children[v]}u[z]=s.id;x.children=u;this.redraw_node(x,true);if(A){A.call(this,this.get_node(s))}this.trigger("create_node",{node:this.get_node(s),parent:x.id,position:z});return s.id},rename_node:function(v,w){var u,t,s;if(e.isArray(v)){v=v.slice();for(u=0,t=v.length;uK.children.length){v=K.children.length}if(!this.check("move_node",A,K,v,{core:true,is_multi:(L&&L._id&&L._id!==this._id),is_foreign:(!L||!L._id)})){this.settings.core.error.call(this,this._data.core.last_error);return false}if(A.parent===K.id){w=K.children.concat();J=e.inArray(A.id,w);if(J!==-1){w=e.vakata.array_remove(w,J);if(v>J){v--}}J=[];for(H=0,G=w.length;H=v?H+1:H]=w[H]}J[v]=A.id;K.children=J;this._node_changed(K.id);this.redraw(K.id==="#")}else{J=A.children_d.concat();J.push(A.id);for(H=0,G=A.parents.length;H=v?H+1:H]=K.children[H]}w[v]=A.id;K.children=w;K.children_d.push(A.id);K.children_d=K.children_d.concat(A.children_d);A.parent=K.id;J=K.parents.concat();J.unshift(K.id);D=A.parents.length;A.parents=J;J=J.concat();for(H=0,G=A.children_d.length;Hs.children.length){G=s.children.length}if(!this.check("copy_node",y,s,G,{core:true,is_multi:(z&&z._id&&z._id!==this._id),is_foreign:(!z||!z._id)})){this.settings.core.error.call(this,this._data.core.last_error);return false}t=z?z.get_json(y,{no_id:true,no_data:true,no_state:true}):y;if(!t){return false}if(t.id===true){delete t.id}t=this._parse_model_from_json(t,s.id,s.parents.concat());if(!t){return false}x=this.get_node(t);if(y&&y.state&&y.state.loaded===false){x.state.loaded=false}A=[];A.push(t);A=A.concat(x.children_d);this.trigger("model",{nodes:A,parent:s.id});for(w=0,v=s.parents.length;w=G?w+1:w]=s.children[w]}A[G]=x.id;s.children=A;s.children_d.push(x.id);s.children_d=s.children_d.concat(x.children_d);if(s.id==="#"){this._model.force_full_redraw=true}if(!this._model.force_full_redraw){this._node_changed(s.id)}if(!H){this.redraw(s.id==="#")}if(I){I.call(this,x,s,G)}this.trigger("copy_node",{node:x,original:y,parent:s.id,position:G,old_parent:D,old_position:z&&z._id&&D&&z._model.data[D]&&z._model.data[D].children?e.inArray(y.id,z._model.data[D].children):-1,is_multi:(z&&z._id&&z._id!==this._id),is_foreign:(!z||!z._id),old_instance:z,new_instance:this});return x.id},cut:function(v){if(!v){v=this._data.core.selected.concat()}if(!e.isArray(v)){v=[v]}if(!v.length){return false}var s=[],w,u,t;for(u=0,t=v.length;u") /*! oi = obj.children("i:visible"), ai = a.children("i:visible"), w1 = oi.width() * oi.length, w2 = ai.width() * ai.length, */ ,D=A,x=e("
    ",{css:{position:"absolute",top:"-200px",left:(z?"0px":"-1000px"),visibility:"hidden"}}).appendTo("body"),v=e("",{value:D,"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(){var t=E.children(".jstree-rename-input"),s=t.val();if(s===""){s=D}x.remove();E.replaceWith(B);E.remove();this.set_text(u,D);if(this.rename_node(u,e("
    ").text(s)[this.settings.core.force_text?"text":"html"]())===false){this.set_text(u,D)}},this),keydown:function(t){var s=t.which;if(s===27){this.value=D}if(s===27||s===13||s===37||s===38||s===39||s===40||s===32){t.stopImmediatePropagation()}if(s===27||s===13){t.preventDefault();this.blur()}},click:function(s){s.stopImmediatePropagation()},mousedown:function(s){s.stopImmediatePropagation()},keyup:function(s){v.width(Math.min(x.text("pW"+this.value).width(),C))},keypress:function(s){if(s.which===13){return false}}}),y={fontFamily:B.css("fontFamily")||"",fontSize:B.css("fontSize")||"",fontWeight:B.css("fontWeight")||"",fontStyle:B.css("fontStyle")||"",fontStretch:B.css("fontStretch")||"",fontVariant:B.css("fontVariant")||"",letterSpacing:B.css("letterSpacing")||"",wordSpacing:B.css("wordSpacing")||""};E.attr("class",B.attr("class")).append(B.contents().clone()).append(v);B.replaceWith(E);x.css(y);v.css(y).width(Math.min(x.text("pW"+v[0].value).width(),C))[0].select()},set_theme:function(u,s){if(!u){return false}if(s===true){var t=this.settings.core.themes.dir;if(!t){t=e.jstree.path+"/themes"}s=t+"/"+u+"/style.css"}if(s&&e.inArray(s,n)===-1){e("head").append('');n.push(s)}if(this._data.core.themes.name){this.element.removeClass("jstree-"+this._data.core.themes.name)}this._data.core.themes.name=u;this.element.addClass("jstree-"+u);this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+u+"-responsive");this.trigger("set_theme",{theme:u})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(s){if(this._data.core.themes.variant){this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)}this._data.core.themes.variant=s;if(s){this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)}},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=true;this.get_container_ul().addClass("jstree-striped")},hide_stripes:function(){this._data.core.themes.stripes=false;this.get_container_ul().removeClass("jstree-striped")},toggle_stripes:function(){if(this._data.core.themes.stripes){this.hide_stripes()}else{this.show_stripes()}},show_dots:function(){this._data.core.themes.dots=true;this.get_container_ul().removeClass("jstree-no-dots")},hide_dots:function(){this._data.core.themes.dots=false;this.get_container_ul().addClass("jstree-no-dots")},toggle_dots:function(){if(this._data.core.themes.dots){this.hide_dots()}else{this.show_dots()}},show_icons:function(){this._data.core.themes.icons=true;this.get_container_ul().removeClass("jstree-no-icons")},hide_icons:function(){this._data.core.themes.icons=false;this.get_container_ul().addClass("jstree-no-icons")},toggle_icons:function(){if(this._data.core.themes.icons){this.hide_icons()}else{this.show_icons()}},set_icon:function(w,u){var v,t,x,s;if(e.isArray(w)){w=w.slice();for(v=0,t=w.length;v250)){e.vakata.context.hide()}u=0},this)).on("touchstart.jstree",".jstree-anchor",function(v){if(!v.originalEvent||!v.originalEvent.changedTouches||!v.originalEvent.changedTouches[0]){return}p=v.pageX;o=v.pageY;q=setTimeout(function(){e(v.currentTarget).trigger("contextmenu",true)},750)});e(document).on("context_hide.vakata.jstree",e.proxy(function(){this._data.contextmenu.visible=false},this))};this.teardown=function(){if(this._data.contextmenu.visible){e.vakata.context.hide()}t.teardown.call(this)};this.show_contextmenu=function(w,D,B,z){w=this.get_node(w);if(!w||w.id==="#"){return false}var E=this.settings.contextmenu,A=this.get_node(w,true),C=A.children(".jstree-anchor"),u=false,v=false;if(E.show_at_node||D===f||B===f){u=C.offset();D=u.left;B=u.top+this._data.core.li_height}if(this.settings.contextmenu.select_node&&!this.is_selected(w)){this.activate_node(w,z)}v=E.items;if(e.isFunction(v)){v=v.call(this,w,e.proxy(function(x){this._show_contextmenu(w,D,B,x)},this))}if(e.isPlainObject(v)){this._show_contextmenu(w,D,B,v)}};this._show_contextmenu=function(z,u,B,w){var A=this.get_node(z,true),v=A.children(".jstree-anchor");e(document).one("context_show.vakata.jstree",e.proxy(function(C,y){var x="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";e(y.element).addClass(x)},this));this._data.contextmenu.visible=true;e.vakata.context.show(v,{x:u,y:B},w);this.trigger("show_contextmenu",{node:z,x:u,y:B})}};e(function(){e(document).on("touchmove.vakata.jstree",function(s){if(q&&s.originalEvent&&s.originalEvent.changedTouches&&s.originalEvent.changedTouches[0]&&(Math.abs(p-s.pageX)>50||Math.abs(o-s.pageY)>50)){clearTimeout(q)}}).on("touchend.vakata.jstree",function(s){if(q){clearTimeout(q)}})});(function(t){var u=false,s={element:false,reference:false,position_x:0,position_y:0,items:[],html:"",is_visible:false};t.vakata.context={settings:{hide_onmouseleave:0,icons:true},_trigger:function(v){t(document).triggerHandler("context_"+v+".vakata",{reference:s.reference,element:s.element,position:{x:s.position_x,y:s.position_y}})},_execute:function(v){v=s.items[v];return v&&(!v._disabled||(t.isFunction(v._disabled)&&!v._disabled({item:v,reference:s.reference,element:s.element})))&&v.action?v.action.call(null,{item:v,reference:s.reference,element:s.element,position:{x:s.position_x,y:s.position_y}}):false},_parse:function(z,x){if(!z){return false}if(!x){s.html="";s.items=[]}var y="",v=false,w;if(x){y+=""}if(!x){s.html=y;t.vakata.context._trigger("parse")}return y.length>10?y:false},_show_submenu:function(E){E=t(E);if(!E.length||!E.children("ul").length){return}var D=E.children("ul"),v=E.offset().left+E.outerWidth(),F=E.offset().top,z=D.width(),B=D.height(),A=t(window).width()+t(window).scrollLeft(),C=t(window).height()+t(window).scrollTop();if(u){E[v-(z+10+E.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left")}else{E[v+z+10>A?"addClass":"removeClass"]("vakata-context-right")}if(F+B+10>C){D.css("bottom","-1px")}D.show()},show:function(A,D,B){var z,E,I,H,J,C,v,G,F=true;if(s.element&&s.element.length){s.element.width("")}switch(F){case (!D&&!A):return false;case (!!D&&!!A):s.reference=A;s.position_x=D.x;s.position_y=D.y;break;case (!D&&!!A):s.reference=A;z=A.offset();s.position_x=z.left+A.outerHeight();s.position_y=z.top;break;case (!!D&&!A):s.position_x=D.x;s.position_y=D.y;break}if(!!A&&!B&&t(A).data("vakata_contextmenu")){B=t(A).data("vakata_contextmenu")}if(t.vakata.context._parse(B)){s.element.html(s.html)}if(s.items.length){s.element.appendTo("body");E=s.element;I=s.position_x;H=s.position_y;J=E.width();C=E.height();v=t(window).width()+t(window).scrollLeft();G=t(window).height()+t(window).scrollTop();if(u){I-=(E.outerWidth()-t(A).outerWidth());if(Iv){I=v-(J+20)}if(H+C+20>G){H=G-(C+20)}s.element.css({left:I,top:H}).show().find("a").first().focus().parent().addClass("vakata-context-hover");s.is_visible=true;t.vakata.context._trigger("show")}},hide:function(){if(s.is_visible){s.element.hide().find("ul").hide().end().find(":focus").blur().end().detach();s.is_visible=false;t.vakata.context._trigger("hide")}}};t(function(){u=t("body").css("direction")==="rtl";var v=false;s.element=t("
      ");s.element.on("mouseenter","li",function(w){w.stopImmediatePropagation();if(t.contains(this,w.relatedTarget)){return}if(v){clearTimeout(v)}s.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end();t(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover");t.vakata.context._show_submenu(this)}).on("mouseleave","li",function(w){if(t.contains(this,w.relatedTarget)){return}t(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(w){t(this).find(".vakata-context-hover").removeClass("vakata-context-hover");if(t.vakata.context.settings.hide_onmouseleave){v=setTimeout((function(x){return function(){t.vakata.context.hide()}}(this)),t.vakata.context.settings.hide_onmouseleave)}}).on("click","a",function(w){w.preventDefault();if(!t(this).blur().parent().hasClass("vakata-context-disabled")&&t.vakata.context._execute(t(this).attr("rel"))!==false){t.vakata.context.hide()}}).on("keydown","a",function(w){var x=null;switch(w.which){case 13:case 32:w.type="mouseup";w.preventDefault();t(w.currentTarget).trigger(w);break;case 37:if(s.is_visible){s.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus();w.stopImmediatePropagation();w.preventDefault()}break;case 38:if(s.is_visible){x=s.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first();if(!x.length){x=s.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()}x.addClass("vakata-context-hover").children("a").focus();w.stopImmediatePropagation();w.preventDefault()}break;case 39:if(s.is_visible){s.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus();w.stopImmediatePropagation();w.preventDefault()}break;case 40:if(s.is_visible){x=s.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first();if(!x.length){x=s.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()}x.addClass("vakata-context-hover").children("a").focus();w.stopImmediatePropagation();w.preventDefault()}break;case 27:t.vakata.context.hide();w.preventDefault();break;default:break}}).on("keydown",function(x){x.preventDefault();var w=s.element.find(".vakata-contextmenu-shortcut-"+x.which).parent();if(w.parent().not(".vakata-context-disabled")){w.click()}});t(document).on("mousedown.vakata.jstree",function(w){if(s.is_visible&&!t.contains(s.element[0],w.target)){t.vakata.context.hide()}}).on("context_show.vakata.jstree",function(x,w){s.element.find("li:has(ul)").children("a").addClass("vakata-context-parent");if(u){s.element.addClass("vakata-context-rtl").css("direction","rtl")}s.element.find("ul").hide().end()})})}(e));e.jstree.defaults.dnd={copy:true,open_timeout:500,is_draggable:true,check_while_dragging:true,always_copy:false,inside_pos:0,drag_selection:true,touch:true};e.jstree.plugins.dnd=function(s,t){this.bind=function(){t.bind.call(this);this.element.on("mousedown.jstree touchstart.jstree",".jstree-anchor",e.proxy(function(x){if(x.type==="touchstart"&&(!this.settings.dnd.touch||(this.settings.dnd.touch==="selected"&&!e(x.currentTarget).hasClass("jstree-clicked")))){return true}var w=this.get_node(x.target),v=this.is_selected(w)&&this.settings.drag_selection?this.get_selected().length:1,u=(v>1?v+" "+this.get_string("nodes"):this.get_text(x.currentTarget));if(this.settings.core.force_text){u=e("
      ").text(u).html()}if(w&&w.id&&w.id!=="#"&&(x.which===1||x.type==="touchstart")&&(this.settings.dnd.is_draggable===true||(e.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,(v>1?this.get_selected(true):[w]))))){this.element.trigger("mousedown.jstree");return e.vakata.dnd.start(x,{jstree:true,origin:this,obj:this.get_node(w,true),nodes:v>1?this.get_selected():[w.id]},'
      '+u+'
      ')}},this))}};e(function(){var v=false,u=false,t=false,s=e('
       
      ').hide();e(document).on("dnd_start.vakata.jstree",function(x,w){v=false;if(!w||!w.data||!w.data.jstree){return}s.appendTo("body")}).on("dnd_move.vakata.jstree",function(N,P){if(t){clearTimeout(t)}if(!P||!P.data||!P.data.jstree){return}if(P.event.target.id&&P.event.target.id==="jstree-marker"){return}var w=e.jstree.reference(P.event.target),z=false,O=false,x=false,K,F,M,G,L,H,E,D,C,B,I,J,A,y;if(w&&w._data&&w._data.dnd){s.attr("class","jstree-"+w.get_theme()+(w.settings.core.themes.responsive?" jstree-dnd-responsive":""));P.helper.children().attr("class","jstree-"+w.get_theme()+" jstree-"+w.get_theme()+"-"+w.get_theme_variant()+" "+(w.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[P.data.origin&&(P.data.origin.settings.dnd.always_copy||(P.data.origin.settings.dnd.copy&&(P.event.metaKey||P.event.ctrlKey)))?"show":"hide"]();if((P.event.target===w.element[0]||P.event.target===w.get_container_ul()[0])&&w.get_container_ul().children().length===0){E=true;for(D=0,C=P.data.nodes.length;DM-M/3){H=["a","i","b"]}else{H=x>M/2?["i","a","b"]:["i","b","a"]}}e.each(H,function(R,Q){switch(Q){case"b":K=O.left-6;F=O.top;G=w.get_parent(z);L=z.parent().index();break;case"i":A=w.settings.dnd.inside_pos;y=w.get_node(z.parent());K=O.left-2;F=O.top+M/2+1;G=y.id;L=A==="first"?0:(A==="last"?y.children.length:Math.min(A,y.children.length));break;case"a":K=O.left-6;F=O.top+M;G=w.get_parent(z);L=z.parent().index()+1;break}E=true;for(D=0,C=P.data.nodes.length;De.inArray(P.data.nodes[D],J.children)){I-=1}}E=E&&((w&&w.settings&&w.settings.dnd&&w.settings.dnd.check_while_dragging===false)||w.check(B,(P.data.origin&&P.data.origin!==w?P.data.origin.get_node(P.data.nodes[D]):P.data.nodes[D]),G,I,{dnd:true,ref:w.get_node(z.parent()),pos:Q,is_multi:(P.data.origin&&P.data.origin!==w),is_foreign:(!P.data.origin)}));if(!E){if(w&&w.last_error){u=w.last_error()}break}}if(Q==="i"&&z.parent().is(".jstree-closed")&&w.settings.dnd.open_timeout){t=setTimeout((function(S,T){return function(){S.open_node(T)}}(w,z)),w.settings.dnd.open_timeout)}if(E){v={ins:w,par:G,pos:Q==="i"&&A==="last"&&L===0&&!w.is_loaded(y)?"last":L};s.css({left:K+"px",top:F+"px"}).show();P.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok");u={};H=true;return false}});if(H===true){return}}}}v=false;P.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er");s.hide()}).on("dnd_scroll.vakata.jstree",function(x,w){if(!w||!w.data||!w.data.jstree){return}s.hide();v=false;w.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er")}).on("dnd_stop.vakata.jstree",function(A,z){if(t){clearTimeout(t)}if(!z||!z.data||!z.data.jstree){return}s.hide().detach();var y,x,w=[];if(v){for(y=0,x=z.data.nodes.length;y
      ").html(u).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})}t(document).on("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag);t(document).on("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop);return false},drag:function(B){if(B.type==="touchmove"&&B.originalEvent&&B.originalEvent.changedTouches&&B.originalEvent.changedTouches[0]){B.pageX=B.originalEvent.changedTouches[0].pageX;B.pageY=B.originalEvent.changedTouches[0].pageY;B.target=document.elementFromPoint(B.originalEvent.changedTouches[0].pageX-window.pageXOffset,B.originalEvent.changedTouches[0].pageY-window.pageYOffset)}if(!s.is_down){return}if(!s.is_drag){if(Math.abs(B.pageX-s.init_x)>(s.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)||Math.abs(B.pageY-s.init_y)>(s.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)){if(s.helper){s.helper.appendTo("body");s.helper_w=s.helper.outerWidth()}s.is_drag=true;t.vakata.dnd._trigger("start",B)}else{return}}var C=false,F=false,D=false,v=false,u=false,z=false,y=false,A=false,E=false,x=false;s.scroll_t=0;s.scroll_l=0;s.scroll_e=false;t(t(B.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return(/^auto|scroll$/).test(t(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var w=t(this),G=w.offset();if(this.scrollHeight>this.offsetHeight){if(G.top+w.height()-B.pageYthis.offsetWidth){if(G.left+w.width()-B.pageXv&&B.pageY-yv&&v-(B.pageY-y)z&&B.pageX-Az&&z-(B.pageX-A)D){E=D-50}if(u&&x+s.helper_w>u){x=u-(s.helper_w+2)}s.helper.css({left:x+"px",top:E+"px"})}t.vakata.dnd._trigger("move",B);return false},stop:function(u){if(u.type==="touchend"&&u.originalEvent&&u.originalEvent.changedTouches&&u.originalEvent.changedTouches[0]){u.pageX=u.originalEvent.changedTouches[0].pageX;u.pageY=u.originalEvent.changedTouches[0].pageY;u.target=document.elementFromPoint(u.originalEvent.changedTouches[0].pageX-window.pageXOffset,u.originalEvent.changedTouches[0].pageY-window.pageYOffset)}if(s.is_drag){t.vakata.dnd._trigger("stop",u)}else{if(u.type==="touchend"&&u.target===s.target){var v=setTimeout(function(){t(u.target).click()},100);t(u.target).one("click",function(){if(v){clearTimeout(v)}})}}t.vakata.dnd._clean();return false}}}(e));e.jstree.defaults.search={ajax:false,fuzzy:false,case_sensitive:false,show_only_matches:false,close_opened_onclear:true,search_leaves_only:false,search_callback:false};e.jstree.plugins.search=function(s,t){this.bind=function(){t.bind.call(this);this._data.search.str="";this._data.search.dom=e();this._data.search.res=[];this._data.search.opn=[];this._data.search.som=false;this.element.on("before_open.jstree",e.proxy(function(A,z){var v,u,y,x=this._data.search.res,w=[],B=e();if(x&&x.length){this._data.search.dom=e(this.element[0].querySelectorAll("#"+e.map(x,function(C){return"0123456789".indexOf(C[0])!==-1?"\\3"+C[0]+" "+C.substr(1).replace(e.jstree.idregex,"\\$&"):C.replace(e.jstree.idregex,"\\$&")}).join(", #")));this._data.search.dom.children(".jstree-anchor").addClass("jstree-search");if(this._data.search.som&&this._data.search.res.length){for(v=0,u=x.length;v32){D.fuzzy=false}if(D.fuzzy){u=1<<(t-1);v=(function(){var E={},F=0;for(F=0;F=G;L--){S=v[R.charAt(L-1)];if(M===0){T[L]=((T[L+1]<<1)|1)&S}else{T[L]=((T[L+1]<<1)|1)&S|(((E[L+1]|E[L])<<1)|1)|E[L+1]}if(T[L]&u){J=x(M,L-1);if(J<=I){I=J;K=L-1;N.push(K);if(K>A){G=Math.max(1,2*A-K)}else{break}}}}if(x(M+1,A)>I){break}E=T}return{isMatch:K>=0,score:J}};return w===true?{search:C}:C(w)}}(e));e.jstree.defaults.sort=function(t,s){return this.get_text(t)>this.get_text(s)?1:-1};e.jstree.plugins.sort=function(s,t){this.bind=function(){t.bind.call(this);this.element.on("model.jstree",e.proxy(function(v,u){this.sort(u.parent,true)},this)).on("rename_node.jstree create_node.jstree",e.proxy(function(v,u){this.sort(u.parent||u.node.parent,false);this.redraw_node(u.parent||u.node.parent,true)},this)).on("move_node.jstree copy_node.jstree",e.proxy(function(v,u){this.sort(u.parent,false);this.redraw_node(u.parent,true)},this))};this.sort=function(x,u){var w,v;x=this.get_node(x);if(x&&x.children&&x.children.length){x.children.sort(e.proxy(this.settings.sort,this));if(u){for(w=0,v=x.children_d.length;wu.ttl){return false}if(!!u&&u.state){u=u.state}if(!!u&&e.isFunction(this.settings.state.filter)){u=this.settings.state.filter.call(this,u)}if(!!u){this.element.one("set_state.jstree",function(x,w){w.instance.trigger("restore_state",{state:e.extend(true,{},u)})});this.set_state(u);return true}return false};this.clear_state=function(){return e.vakata.storage.del(this.settings.state.key)}};(function(s,t){s.vakata.storage={set:function(u,v){return window.localStorage.setItem(u,v)},get:function(u){return window.localStorage.getItem(u)},del:function(u){return window.localStorage.removeItem(u)}}}(e));e.jstree.defaults.types={"#":{},"default":{}};e.jstree.plugins.types=function(s,t){this.init=function(x,v){var w,u;if(v&&v.types&&v.types["default"]){for(w in v.types){if(w!=="default"&&w!=="#"&&v.types.hasOwnProperty(w)){for(u in v.types["default"]){if(v.types["default"].hasOwnProperty(u)&&v.types[w][u]===f){v.types[w][u]=v.types["default"][u]}}}}}t.init.call(this,x,v);this._model.data["#"].type="#"};this.refresh=function(v,u){t.refresh.call(this,v,u);this._model.data["#"].type="#"};this.bind=function(){this.element.on("model.jstree",e.proxy(function(z,y){var u=this._model.data,B=y.nodes,x=this.settings.types,w,v,A="default";for(w=0,v=B.length;w .jstree-ocl",e.proxy(function(v){v.stopImmediatePropagation();var u=e.Event("click",{metaKey:v.metaKey,ctrlKey:v.ctrlKey,altKey:v.altKey,shiftKey:v.shiftKey});e(v.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(u).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",e.proxy(function(u){u.stopImmediatePropagation();if(!this.is_disabled(u.currentTarget)){this.hover_node(u.currentTarget)}return false},this)).on("mouseleave.jstree",".jstree-node",e.proxy(function(u){this.dehover_node(u.currentTarget)},this))};this.teardown=function(){if(this.settings.wholerow){this.element.find(".jstree-wholerow").remove()}t.teardown.call(this)};this.redraw_node=function(x,u,y,w){x=t.redraw_node.apply(this,arguments);if(x){var v=i.cloneNode(true);if(e.inArray(x.id,this._data.core.selected)!==-1){v.className+=" jstree-wholerow-clicked"}if(this._data.core.focused&&this._data.core.focused===x.id){v.className+=" jstree-wholerow-hovered"}x.insertBefore(v,x.childNodes[0])}return x}};(function(t){if(document.registerElement&&Object&&Object.create){var s=Object.create(HTMLElement.prototype);s.createdCallback=function(){var w={core:{},plugins:[]},v;for(v in t.jstree.plugins){if(t.jstree.plugins.hasOwnProperty(v)&&this.attributes[v]){w.plugins.push(v);if(this.getAttribute(v)&&JSON.parse(this.getAttribute(v))){w[v]=JSON.parse(this.getAttribute(v))}}}for(v in t.jstree.defaults.core){if(t.jstree.defaults.core.hasOwnProperty(v)&&this.attributes[v]){w.core[v]=JSON.parse(this.getAttribute(v))||this.getAttribute(v)}}jQuery(this).jstree(w)};try{document.registerElement("vakata-jstree",{prototype:s})}catch(u){}}}(jQuery))}));