(function(){if(!(jQuery&&jQuery.jstree)){var s=false;(function(c){c.vakata={};c.vakata.css={get_css:function(a,f,d){a=a.toLowerCase();var i=d.cssRules||d.rules,j=0;do{if(i.length&&j>i.length+5)break;if(i[j].selectorText&&i[j].selectorText.toLowerCase()==a)if(f===true){d.removeRule&&d.removeRule(j);d.deleteRule&&d.deleteRule(j);return true}else return i[j]}while(i[++j]);return false},add_css:function(a,f){if(c.jstree.css.get_css(a,false,f))return false;f.insertRule?f.insertRule(a+" { }",0):f.addRule(a,
null,0);return c.vakata.css.get_css(a)},remove_css:function(a,f){return c.vakata.css.get_css(a,true,f)},add_sheet:function(a){var f=false,d=true;if(a.str){if(a.title)f=c("style[id='"+a.title+"-stylesheet']")[0];if(f)d=false;else{f=document.createElement("style");f.setAttribute("type","text/css");a.title&&f.setAttribute("id",a.title+"-stylesheet")}if(f.styleSheet)if(d){document.getElementsByTagName("head")[0].appendChild(f);f.styleSheet.cssText=a.str}else f.styleSheet.cssText=f.styleSheet.cssText+
" "+a.str;else{f.appendChild(document.createTextNode(a.str));document.getElementsByTagName("head")[0].appendChild(f)}return f.sheet||f.styleSheet}}};var b=[],h=-1,k={},e={};c.fn.jstree=function(a){var f=typeof a=="string",d=Array.prototype.slice.call(arguments,1),i=this;if(f){if(a.substring(0,1)=="_")return i;this.each(function(){var j=b[c.data(this,"jstree-instance-id")];j=j&&c.isFunction(j[a])?j[a].apply(j,d):j;if(typeof j!=="undefined"&&(a.indexOf("is_"===0)||j!==true&&j!==false)){i=j;return false}})}else this.each(function(){var j=
c.data(this,"jstree-instance-id"),g=[],m=a?c.extend({},true,a):{},l=c(this),p=false,n=[];g=g.concat(d);l.data("jstree")&&g.push(l.data("jstree"));m=g.length?c.extend.apply(null,[true,m].concat(g)):m;typeof j!=="undefined"&&b[j]&&b[j].destroy();j=parseInt(b.push({}),10)-1;c.data(this,"jstree-instance-id",j);m.plugins=c.isArray(m.plugins)?m.plugins:c.jstree.defaults.plugins.slice();m.plugins.unshift("core");m.plugins=m.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,
",").replace(/,$/,"").split(",");p=c.extend(true,{},c.jstree.defaults,m);p.plugins=m.plugins;c.each(k,function(o){if(c.inArray(o,p.plugins)===-1){p[o]=null;delete p[o]}else n.push(o)});p.plugins=n;b[j]=new c.jstree._instance(j,c(this).addClass("jstree jstree-"+j),p);c.each(b[j]._get_settings().plugins,function(o,q){b[j].data[q]={}});c.each(b[j]._get_settings().plugins,function(o,q){k[q]&&k[q].__init.apply(b[j])});setTimeout(function(){b[j].init()},0)});return i};c.jstree={defaults:{plugins:[]},_focused:function(){return b[h]||
null},_reference:function(a){if(b[a])return b[a];var f=c(a);if(!f.length&&typeof a==="string")f=c("#"+a);if(!f.length)return null;return b[f.closest(".jstree").data("jstree-instance-id")]||null},_instance:function(a,f,d){this.data={core:{}};this.get_settings=function(){return c.extend(true,{},d)};this._get_settings=function(){return d};this.get_index=function(){return a};this.get_container=function(){return f};this.get_container_ul=function(){return f.children("ul:eq(0)")};this._set_settings=function(i){d=
c.extend(true,{},d,i)}},_fn:{},plugin:function(a,f){f=c.extend({},{__init:c.noop,__destroy:c.noop,_fn:{},defaults:false},f);k[a]=f;c.jstree.defaults[a]=f.defaults;c.each(f._fn,function(d,i){i.plugin=a;i.old=c.jstree._fn[d];c.jstree._fn[d]=function(){var j,g=i,m=Array.prototype.slice.call(arguments);j=new c.Event("before.jstree");var l=false;if(!(this.data.core.locked===true&&d!=="unlock"&&d!=="is_locked")){do{if(g&&g.plugin&&c.inArray(g.plugin,this._get_settings().plugins)!==-1)break;g=g.old}while(g);
if(g){if(d.indexOf("_")===0)j=g.apply(this,m);else{j=this.get_container().triggerHandler(j,{func:d,inst:this,args:m,plugin:g.plugin});if(j===false)return;if(typeof j!=="undefined")m=j;j=g.apply(c.extend({},this,{__callback:function(p){this.get_container().triggerHandler(d+".jstree",{inst:this,args:m,rslt:p,rlbk:l})},__rollback:function(){return l=this.get_rollback()},__call_old:function(p){return g.old.apply(this,p?Array.prototype.slice.call(arguments,1):m)}}),m)}return j}}};c.jstree._fn[d].old=i.old;
c.jstree._fn[d].plugin=a})},rollback:function(a){if(a){c.isArray(a)||(a=[a]);c.each(a,function(f,d){b[d.i].set_rollback(d.h,d.d)})}}};c.jstree._fn=c.jstree._instance.prototype={};c(function(){var a=navigator.userAgent.toLowerCase(),f=(a.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],d=".jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } .jstree a > ins { height:16px; width:16px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";
if(/msie/.test(a)&&parseInt(f,10)==6){s=true;try{document.execCommand("BackgroundImageCache",false,true)}catch(i){}d+=".jstree li { height:18px; margin-left:0; margin-right:0; } .jstree li li { margin-left:18px; } .jstree-rtl li li { margin-left:0px; margin-right:18px; } li.jstree-open ul { display:block; } li.jstree-closed ul { display:none !important; } .jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } .jstree li a ins { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a ins { margin-right:0px; margin-left:3px; } "}if(/msie/.test(a)&&
parseInt(f,10)==7)d+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } ";if(!/compatible/.test(a)&&/mozilla/.test(a)&&parseFloat(f,10)<1.9)d+=".jstree ins { display:-moz-inline-box; } .jstree li { line-height:12px; } .jstree a { display:-moz-inline-box; } .jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ";c.vakata.css.add_sheet({str:d,title:"jstree"})});c.jstree.plugin("core",{__init:function(){this.data.core.locked=false;this.data.core.to_open=
this.get_settings().core.initially_open;this.data.core.to_load=this.get_settings().core.initially_load},defaults:{html_titles:false,animation:500,initially_open:[],initially_load:[],open_parents:true,notify_plugins:true,rtl:false,load_open:false,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus();this._get_settings().core.rtl&&this.get_container().addClass("jstree-rtl").css("direction","rtl");this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+
this._get_string("loading")+"</a></li></ul>");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",c.proxy(function(a){var f=c(a.target);f.is("ins")&&a.pageY-f.offset().top<this.data.core.li_height&&this.toggle_node(f)},this)).bind("mousedown.jstree",c.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(){var a;if(document.selection&&document.selection.empty)document.selection.empty();
else if(window.getSelection){a=window.getSelection();try{a.removeAllRanges();a.collapse()}catch(f){}}});this._get_settings().core.notify_plugins&&this.get_container().bind("load_node.jstree",c.proxy(function(a,f){var d=this._get_node(f.rslt.obj),i=this;if(d===-1)d=this.get_container_ul();d.length&&d.find("li").each(function(){var j=c(this);j.data("jstree")&&c.each(j.data("jstree"),function(g,m){i.data[g]&&c.isFunction(i["_"+g+"_notify"])&&i["_"+g+"_notify"].call(i,j,m)})})},this));this._get_settings().core.load_open&&
this.get_container().bind("load_node.jstree",c.proxy(function(a,f){var d=this._get_node(f.rslt.obj),i=this;if(d===-1)d=this.get_container_ul();d.length&&d.find("li.jstree-open:not(:has(ul))").each(function(){i.load_node(this,c.noop,c.noop)})},this));this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes()})},destroy:function(){var a,f=this.get_index(),d=this._get_settings(),i=this;c.each(d.plugins,function(j,g){try{k[g].__destroy.apply(i)}catch(m){}});this.__callback();if(this.is_focused())for(a in b)if(b.hasOwnProperty(a)&&
a!=f){b[a].set_focus();break}if(f===h)h=-1;this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree-instance-id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"")});c(document).unbind(".jstree-"+f).undelegate(".jstree-"+f);b[f]=null;delete b[f]},_core_notify:function(a,f){f.opened&&this.open_node(a,false,true)},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity",
"0.7");this.__callback({})},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({})},is_locked:function(){return this.data.core.locked},save_opened:function(){var a=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){this.id&&a.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,
"\\."))});this.__callback(a.data.core.to_open)},save_loaded:function(){},reload_nodes:function(a){var f=this,d=true,i=[],j=[];if(!a){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=c.map(c.makeArray(this.data.core.to_open),function(g){return"#"+g.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.")});this.data.core.to_load=c.map(c.makeArray(this.data.core.to_load),function(g){return"#"+g.toString().replace(/^#/,
"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.")});if(this.data.core.to_open.length)this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open)}if(this.data.core.to_load.length){c.each(this.data.core.to_load,function(g,m){if(m=="#")return true;c(m).length?i.push(m):j.push(m)});if(i.length){this.data.core.to_load=j;c.each(i,function(g,m){if(!f._is_loaded(m)){f.load_node(m,function(){f.reload_nodes(true)},function(){f.reload_nodes(true)});d=false}})}}this.data.core.to_open.length&&
c.each(this.data.core.to_open,function(g,m){f.open_node(m,false,true)});if(d){this.data.core.reopen&&clearTimeout(this.data.core.reopen);this.data.core.reopen=setTimeout(function(){f.__callback({},f)},50);this.data.core.refreshing=false;this.reopen()}},reopen:function(){var a=this;this.data.core.to_open.length&&c.each(this.data.core.to_open,function(f,d){a.open_node(d,false,true)});this.__callback({})},refresh:function(a){var f=this;this.save_opened();a||(a=-1);(a=this._get_node(a))||(a=-1);a!==-1&&
a.children("UL").remove();this.load_node(a,function(){f.__callback({obj:a});f.reload_nodes()})},loaded:function(){this.__callback()},set_focus:function(){if(!this.is_focused()){var a=c.jstree._focused();a&&a.unset_focus();this.get_container().addClass("jstree-focused");h=this.get_index();this.__callback()}},is_focused:function(){return h==this.get_index()},unset_focus:function(){if(this.is_focused()){this.get_container().removeClass("jstree-focused");h=-1}this.__callback()},_get_node:function(a){var f=
c(a,this.get_container());if(f.is(".jstree")||a==-1)return-1;f=f.closest("li",this.get_container());return f.length?f:false},_get_next:function(a,f){a=this._get_node(a);if(a===-1)return this.get_container().find("> ul > li:first-child");if(!a.length)return false;if(f)return a.nextAll("li").size()>0?a.nextAll("li:eq(0)"):false;return a.hasClass("jstree-open")?a.find("li:eq(0)"):a.nextAll("li").size()>0?a.nextAll("li:eq(0)"):a.parentsUntil(".jstree","li").next("li").eq(0)},_get_prev:function(a,f){a=
this._get_node(a);if(a===-1)return this.get_container().find("> ul > li:last-child");if(!a.length)return false;if(f)return a.prevAll("li").length>0?a.prevAll("li:eq(0)"):false;if(a.prev("li").length){for(a=a.prev("li").eq(0);a.hasClass("jstree-open");)a=a.children("ul:eq(0)").children("li:last");return a}else{var d=a.parentsUntil(".jstree","li:eq(0)");return d.length?d:false}},_get_parent:function(a){a=this._get_node(a);if(a==-1||!a.length)return false;a=a.parentsUntil(".jstree","li:eq(0)");return a.length?
a:-1},_get_children:function(a){a=this._get_node(a);if(a===-1)return this.get_container().children("ul:eq(0)").children("li");if(!a.length)return false;return a.children("ul:eq(0)").children("li")},get_path:function(a,f){var d=[],i=this;a=this._get_node(a);if(a===-1||!a||!a.length)return false;a.parentsUntil(".jstree","li").each(function(){d.push(f?this.id:i.get_text(this))});d.reverse();d.push(f?a.attr("id"):this.get_text(a));return d},_get_string:function(a){return this._get_settings().core.strings[a]||
a},is_open:function(a){return(a=this._get_node(a))&&a!==-1&&a.hasClass("jstree-open")},is_closed:function(a){return(a=this._get_node(a))&&a!==-1&&a.hasClass("jstree-closed")},is_leaf:function(a){return(a=this._get_node(a))&&a!==-1&&a.hasClass("jstree-leaf")},correct_state:function(a){a=this._get_node(a);if(!a||a===-1)return false;a.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:a})},open_node:function(a,f,d){a=this._get_node(a);if(!a.length)return false;
if(!a.hasClass("jstree-closed")){f&&f.call();return false}var i=d||s?0:this._get_settings().core.animation,j=this;if(this._is_loaded(a)){this._get_settings().core.open_parents&&a.parentsUntil(".jstree",".jstree-closed").each(function(){j.open_node(this,false,true)});i&&a.children("ul").css("display","none");a.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");i?a.children("ul").stop(true,true).slideDown(i,function(){this.style.display="";j.after_open(a)}):
j.after_open(a);this.__callback({obj:a});f&&f.call()}else{a.children("a").addClass("jstree-loading");this.load_node(a,function(){j.open_node(a,f,d)},f)}},after_open:function(a){this.__callback({obj:a})},close_node:function(a,f){a=this._get_node(a);var d=f||s?0:this._get_settings().core.animation,i=this;if(!a.length||!a.hasClass("jstree-open"))return false;d&&a.children("ul").attr("style","display:block !important");a.removeClass("jstree-open").addClass("jstree-closed");d?a.children("ul").stop(true,
true).slideUp(d,function(){this.style.display="";i.after_close(a)}):i.after_close(a);this.__callback({obj:a})},after_close:function(a){this.__callback({obj:a})},toggle_node:function(a){a=this._get_node(a);if(a.hasClass("jstree-closed"))return this.open_node(a);if(a.hasClass("jstree-open"))return this.close_node(a)},open_all:function(a,f,d){a=a?this._get_node(a):-1;if(!a||a===-1)a=this.get_container_ul();if(d)a=a.find("li.jstree-closed");else{d=a;a=a.is(".jstree-closed")?a.find("li.jstree-closed").andSelf():
a.find("li.jstree-closed")}var i=this;a.each(function(){var j=this;i._is_loaded(this)?i.open_node(this,false,!f):i.open_node(this,function(){i.open_all(j,f,d)},!f)});d.find("li.jstree-closed").length===0&&this.__callback({obj:d})},close_all:function(a,f){var d=this;a=a?this._get_node(a):this.get_container();if(!a||a===-1)a=this.get_container_ul();a.find("li.jstree-open").andSelf().each(function(){d.close_node(this,!f)});this.__callback({obj:a})},clean_node:function(a){a=a&&a!=-1?c(a):this.get_container_ul();
a=a.is("li")?a.find("li").andSelf():a.find("li");a.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");a.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:a})},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data}},set_rollback:function(a,f){this.get_container().empty().append(a);
this.data=f;this.__callback()},load_node:function(a){this.__callback({obj:a})},_is_loaded:function(){return true},create_node:function(a,f,d,i,j){a=this._get_node(a);f=typeof f==="undefined"?"last":f;var g=c("<li />"),m=this._get_settings().core,l;if(a!==-1&&!a.length)return false;if(!j&&!this._is_loaded(a)){this.load_node(a,function(){this.create_node(a,f,d,i,true)});return false}this.__rollback();if(typeof d==="string")d={data:d};d||(d={});d.attr&&g.attr(d.attr);d.metadata&&g.data(d.metadata);d.state&&
g.addClass("jstree-"+d.state);if(!d.data)d.data=this._get_string("new_node");if(!c.isArray(d.data)){l=d.data;d.data=[];d.data.push(l)}c.each(d.data,function(p,n){l=c("<a />");if(c.isFunction(n))n=n.call(this,d);if(typeof n=="string")l.attr("href","#")[m.html_titles?"html":"text"](n);else{if(!n.attr)n.attr={};if(!n.attr.href)n.attr.href="#";l.attr(n.attr)[m.html_titles?"html":"text"](n.title);n.language&&l.addClass(n.language)}l.prepend("<ins class='jstree-icon'>&#160;</ins>");if(n.icon)n.icon.indexOf("/")===
-1?l.children("ins").addClass(n.icon):l.children("ins").css("background","url('"+n.icon+"') center center no-repeat");g.append(l)});g.prepend("<ins class='jstree-icon'>&#160;</ins>");if(a===-1){a=this.get_container();if(f==="before")f="first";if(f==="after")f="last"}switch(f){case "before":a.before(g);l=this._get_parent(a);break;case "after":a.after(g);l=this._get_parent(a);break;case "inside":case "first":a.children("ul").length||a.append("<ul />");a.children("ul").prepend(g);l=a;break;case "last":a.children("ul").length||
a.append("<ul />");a.children("ul").append(g);l=a;break;default:a.children("ul").length||a.append("<ul />");f||(f=0);l=a.children("ul").children("li").eq(f);l.length?l.before(g):a.children("ul").append(g);l=a}if(l===-1||l.get(0)===this.get_container().get(0))l=-1;this.clean_node(l);this.__callback({obj:g,parent:l});i&&i.call(this,g);return g},get_text:function(a){a=this._get_node(a);if(!a.length)return false;var f=this._get_settings().core.html_titles;a=a.children("a:eq(0)");if(f){a=a.clone();a.children("INS").remove();
return a.html()}else{a=a.contents().filter(function(){return this.nodeType==3})[0];return a.nodeValue}},set_text:function(a,f){a=this._get_node(a);if(!a.length)return false;a=a.children("a:eq(0)");if(this._get_settings().core.html_titles){var d=a.children("INS").clone();a.html(f).prepend(d);this.__callback({obj:a,name:f});return true}else{a=a.contents().filter(function(){return this.nodeType==3})[0];this.__callback({obj:a,name:f});return a.nodeValue=f}},rename_node:function(a,f){a=this._get_node(a);
this.__rollback();a&&a.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))&&this.__callback({obj:a,name:f})},delete_node:function(a){a=this._get_node(a);if(!a.length)return false;this.__rollback();var f=this._get_parent(a),d=c([]),i=this;a.each(function(){d=d.add(i._get_prev(this))});a=a.detach();f!==-1&&f.find("> ul > li").length===0&&f.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");this.clean_node(f);this.__callback({obj:a,prev:d,parent:f});return a},prepare_move:function(a,
f,d,i,j){var g={};g.ot=c.jstree._reference(a)||this;g.o=g.ot._get_node(a);g.r=f===-1?-1:this._get_node(f);g.p=typeof d==="undefined"?"last":d;if(!(!j&&e.o&&e.o[0]===g.o[0]&&e.r[0]===g.r[0]&&e.p===g.p)){g.ot=c.jstree._reference(g.o)||this;g.rt=c.jstree._reference(g.r)||this;if(g.r===-1||!g.r){g.cr=-1;switch(g.p){case "first":case "before":case "inside":g.cp=0;break;case "after":case "last":g.cp=g.rt.get_container().find(" > ul > li").length;break;default:g.cp=g.p}}else{if(!/^(before|after)$/.test(g.p)&&
!this._is_loaded(g.r))return this.load_node(g.r,function(){this.prepare_move(a,f,d,i,true)});switch(g.p){case "before":g.cp=g.r.index();g.cr=g.rt._get_parent(g.r);break;case "after":g.cp=g.r.index()+1;g.cr=g.rt._get_parent(g.r);break;case "inside":case "first":g.cp=0;g.cr=g.r;break;case "last":g.cp=g.r.find(" > ul > li").length;g.cr=g.r;break;default:g.cp=g.p;g.cr=g.r}}g.np=g.cr==-1?g.rt.get_container():g.cr;g.op=g.ot._get_parent(g.o);g.cop=g.o.index();if(g.op===-1)g.op=g.ot?g.ot.get_container():
this.get_container();!/^(before|after)$/.test(g.p)&&g.op&&g.np&&g.op[0]===g.np[0]&&g.o.index()<g.cp&&g.cp++;g.or=g.np.find(" > ul > li:nth-child("+(g.cp+1)+")");e=g}this.__callback(e);i&&i.call(this,e)},check_move:function(){var a=e,f=true,d=a.r===-1?this.get_container():a.r;if(!a||!a.o||a.or[0]===a.o[0])return false;if(a.op&&a.np&&a.op[0]===a.np[0]&&a.cp-1===a.o.index())return false;a.o.each(function(){if(d.parentsUntil(".jstree","li").andSelf().index(this)!==-1)return f=false});return f},move_node:function(a,
f,d,i,j,g){if(!j)return this.prepare_move(a,f,d,function(l){this.move_node(l,false,false,i,true,g)});if(i)e.cy=true;if(!g&&!this.check_move())return false;this.__rollback();f=false;if(i){f=a.o.clone();f.find("*[id]").andSelf().each(function(){if(this.id)this.id="copy_"+this.id})}else f=a.o;if(a.or.length)a.or.before(f);else{a.np.children("ul").length||c("<ul />").appendTo(a.np);a.np.children("ul:eq(0)").append(f)}try{a.ot.clean_node(a.op);a.rt.clean_node(a.np);a.op.find("> ul > li").length||a.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(m){}if(i){e.cy=
true;e.oc=f}this.__callback(e);return e},_get_move:function(){return e}}})})(jQuery);(function(c){var b,h,k;c(function(){if(/msie/.test(navigator.userAgent.toLowerCase())){h=c('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1E3,left:0}).appendTo("body");k=c('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1E3,left:0}).appendTo("body");b=h.width()-k.width();h.add(k).remove()}else{h=c("<div />").css({width:100,height:100,overflow:"auto",
position:"absolute",top:-1E3,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200});b=100-h.width();h.parent().remove()}});c.jstree.plugin("ui",{__init:function(){this.data.ui.selected=c();this.data.ui.last_selected=false;this.data.ui.hovered=null;this.data.ui.to_select=this.get_settings().ui.initially_select;this.get_container().delegate("a","click.jstree",c.proxy(function(e){e.preventDefault();e.currentTarget.blur();c(e.currentTarget).hasClass("jstree-loading")||
this.select_node(e.currentTarget,true,e)},this)).delegate("a","mouseenter.jstree",c.proxy(function(e){c(e.currentTarget).hasClass("jstree-loading")||this.hover_node(e.target)},this)).delegate("a","mouseleave.jstree",c.proxy(function(e){c(e.currentTarget).hasClass("jstree-loading")||this.dehover_node(e.target)},this)).bind("reopen.jstree",c.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",c.proxy(function(){this.dehover_node();this.save_selected()},this)).bind("set_rollback.jstree",
c.proxy(function(){this.reselect()},this)).bind("close_node.jstree",c.proxy(function(e,a){var f=this._get_settings().ui,d=this._get_node(a.rslt.obj),i=d&&d.length?d.children("ul").find("a.jstree-clicked"):c(),j=this;f.selected_parent_close===false||!i.length||i.each(function(){j.deselect_node(this);f.selected_parent_close==="select_parent"&&j.select_node(d)})},this)).bind("delete_node.jstree",c.proxy(function(e,a){var f=this._get_settings().ui.select_prev_on_delete,d=this._get_node(a.rslt.obj);d=
d&&d.length?d.find("a.jstree-clicked"):[];var i=this;d.each(function(){i.deselect_node(this)});f&&d.length&&a.rslt.prev.each(function(){if(this.parentNode){i.select_node(this);return false}})},this)).bind("move_node.jstree",c.proxy(function(e,a){a.rslt.cy&&a.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:true,select_prev_on_delete:true,
disable_selecting_children:false,initially_select:[]},_fn:{_get_node:function(e,a){if(typeof e==="undefined"||e===null)return a?this.data.ui.selected:this.data.ui.last_selected;var f=c(e,this.get_container());if(f.is(".jstree")||e==-1)return-1;f=f.closest("li",this.get_container());return f.length?f:false},_ui_notify:function(e,a){a.selected&&this.select_node(e,false)},save_selected:function(){var e=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){this.id&&e.data.ui.to_select.push("#"+
this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\."))});this.__callback(this.data.ui.to_select)},reselect:function(){var e=this,a=this.data.ui.to_select;a=c.map(c.makeArray(a),function(f){return"#"+f.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.")});c.each(a,function(f,d){d&&d!=="#"&&e.select_node(d)});this.__callback()},refresh:function(){this.save_selected();return this.__call_old()},
hover_node:function(e){e=this._get_node(e);if(!e.length)return false;e.hasClass("jstree-hovered")||this.dehover_node();this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent();this._fix_scroll(e);this.__callback({obj:e})},dehover_node:function(){var e=this.data.ui.hovered;if(!e||!e.length)return false;if(this.data.ui.hovered[0]===e.children("a").removeClass("jstree-hovered").parent()[0])this.data.ui.hovered=null;this.__callback({obj:e})},select_node:function(e,a,f){e=this._get_node(e);
if(e==-1||!e||!e.length)return false;var d=this._get_settings().ui,i=d.select_multiple_modifier=="on"||d.select_multiple_modifier!==false&&f&&f[d.select_multiple_modifier+"Key"],j=d.select_range_modifier!==false&&f&&f[d.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==e[0]&&this.data.ui.last_selected.parent()[0]===e.parent()[0],g=this.is_selected(e),m=true,l=this;if(a){if(d.disable_selecting_children&&i&&(e.parentsUntil(".jstree","li").children("a.jstree-clicked").length||
e.children("ul").find("a.jstree-clicked:eq(0)").length))return false;m=false;switch(true){case j:this.data.ui.last_selected.addClass("jstree-last-selected");e=e[e.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf();if(d.select_limit==-1||e.length<d.select_limit){this.data.ui.last_selected.removeClass("jstree-last-selected");this.data.ui.selected.each(function(){this!==l.data.ui.last_selected[0]&&l.deselect_node(this)});g=false;m=true}else m=false;
break;case g&&!i:this.deselect_all();g=false;m=true;break;case !g&&!i:if(d.select_limit==-1||d.select_limit>0){this.deselect_all();m=true}break;case g&&i:this.deselect_node(e);break;case !g&&i:if(d.select_limit==-1||this.data.ui.selected.length+1<=d.select_limit)m=true}}if(m&&!g){if(!j)this.data.ui.last_selected=e;e.children("a").addClass("jstree-clicked");d.selected_parent_open&&e.parents(".jstree-closed").each(function(){l.open_node(this,false,true)});this.data.ui.selected=this.data.ui.selected.add(e);
this._fix_scroll(e.eq(0));this.__callback({obj:e,e:f})}},_fix_scroll:function(e){var a=this.get_container()[0];if(a.scrollHeight>a.offsetHeight){e=this._get_node(e);if(!(!e||e===-1||!e.length||!e.is(":visible"))){e=e.offset().top-this.get_container().offset().top;if(e<0)a.scrollTop=a.scrollTop+e-1;if(e+this.data.core.li_height+(a.scrollWidth>a.offsetWidth?b:0)>a.offsetHeight)a.scrollTop+=e-a.offsetHeight+this.data.core.li_height+1+(a.scrollWidth>a.offsetWidth?b:0)}}},deselect_node:function(e){e=this._get_node(e);
if(!e.length)return false;if(this.is_selected(e)){e.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(e);if(this.data.ui.last_selected.get(0)===e.get(0))this.data.ui.last_selected=this.data.ui.selected.eq(0);this.__callback({obj:e})}},toggle_select:function(e){e=this._get_node(e);if(!e.length)return false;this.is_selected(e)?this.deselect_node(e):this.select_node(e)},is_selected:function(e){return this.data.ui.selected.index(this._get_node(e))>=0},get_selected:function(e){return e?
c(e).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(e){e=e?c(e).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();e.children("a.jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=c([]);this.data.ui.last_selected=false;this.__callback({obj:e})}}});c.jstree.defaults.plugins.push("ui")})(jQuery);(function(c){var b=[];c.jstree._themes=false;c.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",
c.proxy(function(){var h=this._get_settings().themes;this.data.themes.dots=h.dots;this.data.themes.icons=h.icons;this.set_theme(h.theme,h.url)},this)).bind("loaded.jstree",c.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots();this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:false,dots:true,icons:true},_fn:{set_theme:function(h,k){if(!h)return false;k||(k=c.jstree._themes+h+"/style.css");if(c.inArray(k,b)==-1){c.vakata.css.add_sheet({url:k});
b.push(k)}if(this.data.themes.theme!=h){this.get_container().removeClass("jstree-"+this.data.themes.theme);this.data.themes.theme=h}this.get_container().addClass("jstree-"+h);this.data.themes.dots?this.show_dots():this.hide_dots();this.data.themes.icons?this.show_icons():this.hide_icons();this.__callback()},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=true;this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=
false;this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=true;this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=false;this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}});c(function(){c.jstree._themes===
false&&c("script").each(function(){if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)){c.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/";return false}});if(c.jstree._themes===false)c.jstree._themes="themes/"});c.jstree.defaults.plugins.push("themes")})(jQuery);(function(c){c.jstree.plugin("json_data",{__init:function(){this._get_settings().json_data.progressive_unload&&this.get_container().bind("after_close.jstree",function(b,h){h.rslt.obj.children("ul").remove()})},
defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(b,h,k){var e=this;this.load_node_json(b,function(){e.__callback({obj:e._get_node(b)});h.call(this)},k)},_is_loaded:function(b){var h=this._get_settings().json_data;b=this._get_node(b);return b==-1||!b||!h.ajax&&!h.progressive_render&&!c.isFunction(h.data)||b.is(".jstree-open, .jstree-leaf")||b.children("ul").children("li").length>0},refresh:function(b){b=this._get_node(b);
var h=this._get_settings().json_data;if(b&&b!==-1&&h.progressive_unload&&(c.isFunction(h.data)||h.ajax))c.removeData(b,"jstree-children");return this.__call_old()},load_node_json:function(b,h,k){var e=this.get_settings().json_data,a,f=function(){};a=function(){};if((b=this._get_node(b))&&b!==-1&&(e.progressive_render||e.progressive_unload)&&!b.is(".jstree-open, .jstree-leaf")&&b.children("ul").children("li").length===0&&b.data("jstree-children")){if(a=this._parse_json(b.data("jstree-children"),b)){b.append(a);
e.progressive_unload||c.removeData(b,"jstree-children")}this.clean_node(b);h&&h.call(this)}else{if(b&&b!==-1)if(b.data("jstree-is-loading"))return;else b.data("jstree-is-loading",true);switch(true){case !e.data&&!e.ajax:throw"Neither data nor ajax settings supplied.";case c.isFunction(e.data):e.data.call(this,b,c.proxy(function(d){if(d=this._parse_json(d,b)){if(b===-1||!b)this.get_container().children("ul").empty().append(d.children());else{b.append(d).children("a.jstree-loading").removeClass("jstree-loading");
c.removeData(b,"jstree-is-loading")}this.clean_node(b);h&&h.call(this)}else{if(b===-1||!b)e.correct_state&&this.get_container().children("ul").empty();else{b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");e.correct_state&&this.correct_state(b)}k&&k.call(this)}},this));break;case !!e.data&&!e.ajax||!!e.data&&!!e.ajax&&(!b||b===-1):if(!b||b==-1)if(a=this._parse_json(e.data,b)){this.get_container().children("ul").empty().append(a.children());this.clean_node()}else e.correct_state&&
this.get_container().children("ul").empty();h&&h.call(this);break;case !e.data&&!!e.ajax||!!e.data&&!!e.ajax&&b&&b!==-1:f=function(d,i,j){var g=this.get_settings().json_data.ajax.error;g&&g.call(this,d,i,j);if(b!=-1&&b.length){b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");i==="success"&&e.correct_state&&this.correct_state(b)}else i==="success"&&e.correct_state&&this.get_container().children("ul").empty();k&&k.call(this)};a=function(d,i,j){var g=this.get_settings().json_data.ajax.success;
if(g)d=g.call(this,d,i,j)||d;if(d===""||d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")===""||!c.isArray(d)&&!c.isPlainObject(d))return f.call(this,j,i,"");if(d=this._parse_json(d,b)){if(b===-1||!b)this.get_container().children("ul").empty().append(d.children());else{b.append(d).children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading")}this.clean_node(b);h&&h.call(this)}else if(b===-1||!b){if(e.correct_state){this.get_container().children("ul").empty();h&&
h.call(this)}}else{b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");if(e.correct_state){this.correct_state(b);h&&h.call(this)}}};e.ajax.context=this;e.ajax.error=f;e.ajax.success=a;if(!e.ajax.dataType)e.ajax.dataType="json";if(c.isFunction(e.ajax.url))e.ajax.url=e.ajax.url.call(this,b);if(c.isFunction(e.ajax.data))e.ajax.data=e.ajax.data.call(this,b);c.ajax(e.ajax)}}},_parse_json:function(b,h,k){var e=false,a=this._get_settings(),f=a.json_data,d=a.core.html_titles,
i;if(!b)return e;f.progressive_unload&&h&&h!==-1&&h.data("jstree-children",e);if(c.isArray(b)){e=c();if(!b.length)return false;a=0;for(f=b.length;a<f;a++){i=this._parse_json(b[a],h,true);if(i.length)e=e.add(i)}}else{if(typeof b=="string")b={data:b};if(!b.data&&b.data!=="")return e;e=c("<li />");b.attr&&e.attr(b.attr);b.metadata&&e.data(b.metadata);b.state&&e.addClass("jstree-"+b.state);if(!c.isArray(b.data)){i=b.data;b.data=[];b.data.push(i)}c.each(b.data,function(j,g){i=c("<a />");if(c.isFunction(g))g=
g.call(this,b);if(typeof g=="string")i.attr("href","#")[d?"html":"text"](g);else{if(!g.attr)g.attr={};if(!g.attr.href)g.attr.href="#";i.attr(g.attr)[d?"html":"text"](g.title);g.language&&i.addClass(g.language)}i.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!g.icon&&b.icon)g.icon=b.icon;if(g.icon)g.icon.indexOf("/")===-1?i.children("ins").addClass(g.icon):i.children("ins").css("background","url('"+g.icon+"') center center no-repeat");e.append(i)});e.prepend("<ins class='jstree-icon'>&#160;</ins>");
if(b.children)if(f.progressive_render&&b.state!=="open")e.addClass("jstree-closed").data("jstree-children",b.children);else{f.progressive_unload&&e.data("jstree-children",b.children);if(c.isArray(b.children)&&b.children.length){i=this._parse_json(b.children,h,true);if(i.length){h=c("<ul />");h.append(i);e.append(h)}}}}if(!k){k=c("<ul />");k.append(e);e=k}return e},get_json:function(b,h,k,e){var a=[],f=this._get_settings(),d=this,i,j,g,m,l,p;b=this._get_node(b);if(!b||b===-1)b=this.get_container().find("> ul > li");
h=c.isArray(h)?h:["id","class"];!e&&this.data.types&&h.push(f.types.type_attr);k=c.isArray(k)?k:[];b.each(function(){g=c(this);i={data:[]};if(h.length)i.attr={};c.each(h,function(n,o){if((j=g.attr(o))&&j.length&&j.replace(/jstree[^ ]*/ig,"").length)i.attr[o]=(" "+j).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")});if(g.hasClass("jstree-open"))i.state="open";if(g.hasClass("jstree-closed"))i.state="closed";if(g.data())i.metadata=g.data();m=g.children("a");m.each(function(){l=
c(this);if(k.length||c.inArray("languages",f.plugins)!==-1||l.children("ins").get(0).style.backgroundImage.length||l.children("ins").get(0).className&&l.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").length){p=false;c.inArray("languages",f.plugins)!==-1&&c.isArray(f.languages)&&f.languages.length&&c.each(f.languages,function(n,o){if(l.hasClass(o)){p=o;return false}});j={attr:{},title:d.get_text(l,p)};c.each(k,function(n,o){j.attr[o]=(" "+(l.attr(o)||"")).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig,
" ").replace(/^ /,"").replace(/ $/,"")});c.inArray("languages",f.plugins)!==-1&&c.isArray(f.languages)&&f.languages.length&&c.each(f.languages,function(n,o){if(l.hasClass(o)){j.language=o;return true}});if(l.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length)j.icon=l.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");if(l.children("ins").get(0).style.backgroundImage.length)j.icon=l.children("ins").get(0).style.backgroundImage.replace("url(",
"").replace(")","")}else j=d.get_text(l);if(m.length>1)i.data.push(j);else i.data=j});g=g.find("> ul > li");if(g.length)i.children=d.get_json(g,h,k,true);a.push(i)});return a}}})})(jQuery);(function(c){c.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui;if(this.data.ui&&this.data.checkbox.noui){this.select_node=this.deselect_node=this.deselect_all=c.noop;this.get_selected=this.get_checked}this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree",
c.proxy(function(b,h){this._prepare_checkboxes(h.rslt.obj)},this)).bind("loaded.jstree",c.proxy(function(){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",c.proxy(function(b){b.preventDefault();this._get_node(b.target).hasClass("jstree-checked")?this.uncheck_node(b.target):this.check_node(b.target);if(this.data.ui&&this.data.checkbox.noui){this.save_selected();this.data.cookies&&this.save_cookie("select_node")}else{b.stopImmediatePropagation();
return false}},this))},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(b){return["check_"+(b[0].id||Math.ceil(Math.random()*1E4)),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(b,h){h.checked&&this.check_node(b,false)},_prepare_checkboxes:function(b){b=!b||b==-1?this.get_container().find("> ul > li"):
this._get_node(b);if(b!==false){var h,k=this,e,a=this._get_settings().checkbox.two_state,f=this._get_settings().checkbox.real_checkboxes,d=this._get_settings().checkbox.real_checkboxes_names;b.each(function(){e=c(this);h=e.is("li")&&(e.hasClass("jstree-checked")||f&&e.children(":checked").length)?"jstree-checked":"jstree-unchecked";e.find("li").andSelf().each(function(){var i=c(this),j;i.children("a"+(k.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(a?
"jstree-unchecked":h);if(f){if(i.children(":checkbox").length)i.children(":checkbox").addClass("jstree-real-checkbox");else{j=d.call(k,i);i.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+j[0]+"' name='"+j[0]+"' value='"+j[1]+"' />")}h==="jstree-checked"&&i.children(":checkbox").attr("checked","checked")}})});if(!a)if(b.length===1&&b.is("li"))this._repair_state(b);else b.is("li")?b.each(function(){k._repair_state(this)}):b.find("> ul > li").each(function(){k._repair_state(this)})}},
change_state:function(b,h){b=this._get_node(b);var k=false,e=this._get_settings().checkbox.real_checkboxes;if(!b||b===-1)return false;h=h===false||h===true?h:b.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state)if(h){b.removeClass("jstree-checked").addClass("jstree-unchecked");e&&b.children(":checkbox").removeAttr("checked")}else{b.removeClass("jstree-unchecked").addClass("jstree-checked");e&&b.children(":checkbox").attr("checked","checked")}else{if(h){k=b.find("li").andSelf();
if(!k.filter(".jstree-checked, .jstree-undetermined").length)return false;k.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");e&&k.children(":checkbox").removeAttr("checked")}else{k=b.find("li").andSelf();if(!k.filter(".jstree-unchecked, .jstree-undetermined").length)return false;k.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");e&&k.children(":checkbox").attr("checked","checked");if(this.data.ui)this.data.ui.last_selected=b;this.data.checkbox.last_selected=
b}b.parentsUntil(".jstree","li").each(function(){var a=c(this);if(h)if(a.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){a.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");e&&a.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked");return false}else{a.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");e&&a.children(":checkbox").removeAttr("checked")}else if(a.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){a.parentsUntil(".jstree",
"li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");e&&a.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked");return false}else{a.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");e&&a.children(":checkbox").attr("checked","checked")}})}if(this.data.ui&&this.data.checkbox.noui)this.data.ui.selected=this.get_checked();this.__callback(b);return true},check_node:function(b){if(this.change_state(b,false)){b=
this._get_node(b);if(this._get_settings().checkbox.checked_parent_open){var h=this;b.parents(".jstree-closed").each(function(){h.open_node(this,false,true)})}this.__callback({obj:b})}},uncheck_node:function(b){this.change_state(b,true)&&this.__callback({obj:this._get_node(b)})},check_all:function(){var b=this;(this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li")).each(function(){b.change_state(this,false)});this.__callback()},uncheck_all:function(){var b=
this;(this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li")).each(function(){b.change_state(this,true)});this.__callback()},is_checked:function(b){b=this._get_node(b);return b.length?b.is(".jstree-checked"):false},get_checked:function(b,h){b=!b||b===-1?this.get_container():this._get_node(b);return h||this._get_settings().checkbox.two_state?b.find(".jstree-checked"):b.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},
get_unchecked:function(b,h){b=!b||b===-1?this.get_container():this._get_node(b);return h||this._get_settings().checkbox.two_state?b.find(".jstree-unchecked"):b.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(b){b=this._get_node(b);if(b.length){var h=
this._get_settings().checkbox.real_checkboxes,k=b.find("> ul > .jstree-checked").length,e=b.find("> ul > .jstree-undetermined").length,a=b.find("> ul > li").length;if(a===0)b.hasClass("jstree-undetermined")&&this.change_state(b,false);else if(k===0&&e===0)this.change_state(b,true);else if(k===a)this.change_state(b,false);else{b.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");h&&b.parentsUntil(".jstree","li").andSelf().children(":checkbox").removeAttr("checked")}}},
reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var b=this,h=this.data.ui.to_select;h=c.map(c.makeArray(h),function(k){return"#"+k.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.")});this.deselect_all();c.each(h,function(k,e){b.check_node(e)});this.__callback()}else this.__call_old()},save_loaded:function(){var b=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&
b.data.core.to_load.push("#"+this.id)})}}});c(function(){c.vakata.css.add_sheet({str:".jstree .jstree-real-checkbox { display:none; } ",title:"jstree"})})})(jQuery);(function(c){c.vakata.xslt=function(h,k,e){var a="",f;if(document.recalc){f=document.createElement("xml");a=document.createElement("xml");f.innerHTML=h;a.innerHTML=k;c("body").append(f).append(a);setTimeout(function(d,i,j){return function(){j.call(null,d.transformNode(i.XMLDocument));setTimeout(function(g,m){return function(){c(g).remove();
c(m).remove()}}(d,i),200)}}(f,a,e),100);return true}if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor!=="undefined"){f=new XSLTProcessor;a=c.isFunction(f.transformDocument)?typeof window.XMLSerializer!=="undefined":true;if(!a)return false;h=(new DOMParser).parseFromString(h,"text/xml");k=(new DOMParser).parseFromString(k,"text/xml");if(c.isFunction(f.transformDocument)){a=document.implementation.createDocument("","",null);f.transformDocument(h,
k,a,null);e.call(null,(new XMLSerializer).serializeToString(a))}else{f.importStylesheet(k);a=f.transformToFragment(h,document);e.call(null,c("<div />").append(a).html())}return true}return false};var b={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/">\t<xsl:call-template name="nodes">\t\t<xsl:with-param name="node" select="/root" />\t</xsl:call-template></xsl:template><xsl:template name="nodes">\t<xsl:param name="node" />\t<ul>\t<xsl:for-each select="$node/item">\t\t<xsl:variable name="children" select="count(./item) &gt; 0" />\t\t<li>\t\t\t<xsl:attribute name="class">\t\t\t\t<xsl:if test="position() = last()">jstree-last </xsl:if>\t\t\t\t<xsl:choose>\t\t\t\t\t<xsl:when test="@state = \'open\'">jstree-open </xsl:when>\t\t\t\t\t<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>\t\t\t\t\t<xsl:otherwise>jstree-leaf </xsl:otherwise>\t\t\t\t</xsl:choose>\t\t\t\t<xsl:value-of select="@class" />\t\t\t</xsl:attribute>\t\t\t<xsl:for-each select="@*">\t\t\t\t<xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">\t\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t\t</xsl:if>\t\t\t</xsl:for-each>\t<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>\t\t\t<xsl:for-each select="content/name">\t\t\t\t<a>\t\t\t\t<xsl:attribute name="href">\t\t\t\t\t<xsl:choose>\t\t\t\t\t<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>\t\t\t\t\t<xsl:otherwise>#</xsl:otherwise>\t\t\t\t\t</xsl:choose>\t\t\t\t</xsl:attribute>\t\t\t\t<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>\t\t\t\t<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>\t\t\t\t<xsl:for-each select="@*">\t\t\t\t\t<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">\t\t\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t\t\t</xsl:if>\t\t\t\t</xsl:for-each>\t\t\t\t\t<ins>\t\t\t\t\t\t<xsl:attribute name="class">jstree-icon \t\t\t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>\t\t\t\t\t\t</xsl:attribute>\t\t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>\t\t\t\t\t\t<xsl:text>&#xa0;</xsl:text>\t\t\t\t\t</ins>\t\t\t\t\t<xsl:copy-of select="./child::node()" />\t\t\t\t</a>\t\t\t</xsl:for-each>\t\t\t<xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>\t\t</li>\t</xsl:for-each>\t</ul></xsl:template></xsl:stylesheet>',
flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/">\t<ul>\t<xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">\t\t<xsl:call-template name="nodes">\t\t\t<xsl:with-param name="node" select="." />\t\t\t<xsl:with-param name="is_last" select="number(position() = last())" />\t\t</xsl:call-template>\t</xsl:for-each>\t</ul></xsl:template><xsl:template name="nodes">\t<xsl:param name="node" />\t<xsl:param name="is_last" />\t<xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" />\t<li>\t<xsl:attribute name="class">\t\t<xsl:if test="$is_last = true()">jstree-last </xsl:if>\t\t<xsl:choose>\t\t\t<xsl:when test="@state = \'open\'">jstree-open </xsl:when>\t\t\t<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>\t\t\t<xsl:otherwise>jstree-leaf </xsl:otherwise>\t\t</xsl:choose>\t\t<xsl:value-of select="@class" />\t</xsl:attribute>\t<xsl:for-each select="@*">\t\t<xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t</xsl:if>\t</xsl:for-each>\t<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>\t<xsl:for-each select="content/name">\t\t<a>\t\t<xsl:attribute name="href">\t\t\t<xsl:choose>\t\t\t<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>\t\t\t<xsl:otherwise>#</xsl:otherwise>\t\t\t</xsl:choose>\t\t</xsl:attribute>\t\t<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>\t\t<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>\t\t<xsl:for-each select="@*">\t\t\t<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t</xsl:if>\t\t</xsl:for-each>\t\t\t<ins>\t\t\t\t<xsl:attribute name="class">jstree-icon \t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>\t\t\t\t</xsl:attribute>\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>\t\t\t\t<xsl:text>&#xa0;</xsl:text>\t\t\t</ins>\t\t\t<xsl:copy-of select="./child::node()" />\t\t</a>\t</xsl:for-each>\t<xsl:if test="$children">\t\t<ul>\t\t<xsl:for-each select="//item[@parent_id=$node/attribute::id]">\t\t\t<xsl:call-template name="nodes">\t\t\t\t<xsl:with-param name="node" select="." />\t\t\t\t<xsl:with-param name="is_last" select="number(position() = last())" />\t\t\t</xsl:call-template>\t\t</xsl:for-each>\t\t</ul>\t</xsl:if>\t</li></xsl:template></xsl:stylesheet>'};
c.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false},_fn:{load_node:function(h,k,e){var a=this;this.load_node_xml(h,function(){a.__callback({obj:a._get_node(h)});k.call(this)},e)},_is_loaded:function(h){var k=this._get_settings().xml_data;h=this._get_node(h);return h==-1||!h||!k.ajax&&!c.isFunction(k.data)||h.is(".jstree-open, .jstree-leaf")||h.children("ul").children("li").size()>0},load_node_xml:function(h,k,e){var a=this.get_settings().xml_data,
f=function(){},d=function(){};if((h=this._get_node(h))&&h!==-1)if(h.data("jstree-is-loading"))return;else h.data("jstree-is-loading",true);switch(true){case !a.data&&!a.ajax:throw"Neither data nor ajax settings supplied.";case c.isFunction(a.data):a.data.call(this,h,c.proxy(function(i){this.parse_xml(i,c.proxy(function(j){if(j){j=j.replace(/ ?xmlns="[^"]*"/ig,"");if(j.length>10){j=c(j);if(h===-1||!h)this.get_container().children("ul").empty().append(j.children());else{h.children("a.jstree-loading").removeClass("jstree-loading");
h.append(j);c.removeData(h,"jstree-is-loading")}a.clean_node&&this.clean_node(h);k&&k.call(this)}else if(h&&h!==-1){h.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(h,"jstree-is-loading");if(a.correct_state){this.correct_state(h);k&&k.call(this)}}else if(a.correct_state){this.get_container().children("ul").empty();k&&k.call(this)}}},this))},this));break;case !!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!h||h===-1):if(!h||h==-1)this.parse_xml(a.data,c.proxy(function(i){if(i){i=
i.replace(/ ?xmlns="[^"]*"/ig,"");if(i.length>10){i=c(i);this.get_container().children("ul").empty().append(i.children());a.clean_node&&this.clean_node(h);k&&k.call(this)}}else if(a.correct_state){this.get_container().children("ul").empty();k&&k.call(this)}},this));break;case !a.data&&!!a.ajax||!!a.data&&!!a.ajax&&h&&h!==-1:f=function(i,j,g){var m=this.get_settings().xml_data.ajax.error;m&&m.call(this,i,j,g);if(h!==-1&&h.length){h.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(h,
"jstree-is-loading");j==="success"&&a.correct_state&&this.correct_state(h)}else j==="success"&&a.correct_state&&this.get_container().children("ul").empty();e&&e.call(this)};d=function(i,j,g){i=g.responseText;var m=this.get_settings().xml_data.ajax.success;if(m)i=m.call(this,i,j,g)||i;if(i===""||i&&i.toString&&i.toString().replace(/^[\s\n]+$/,"")==="")return f.call(this,g,j,"");this.parse_xml(i,c.proxy(function(l){if(l){l=l.replace(/ ?xmlns="[^"]*"/ig,"");if(l.length>10){l=c(l);if(h===-1||!h)this.get_container().children("ul").empty().append(l.children());
else{h.children("a.jstree-loading").removeClass("jstree-loading");h.append(l);c.removeData(h,"jstree-is-loading")}a.clean_node&&this.clean_node(h);k&&k.call(this)}else if(h&&h!==-1){h.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(h,"jstree-is-loading");if(a.correct_state){this.correct_state(h);k&&k.call(this)}}else if(a.correct_state){this.get_container().children("ul").empty();k&&k.call(this)}}},this))};a.ajax.context=this;a.ajax.error=f;a.ajax.success=d;if(!a.ajax.dataType)a.ajax.dataType=
"xml";if(c.isFunction(a.ajax.url))a.ajax.url=a.ajax.url.call(this,h);if(c.isFunction(a.ajax.data))a.ajax.data=a.ajax.data.call(this,h);c.ajax(a.ajax)}},parse_xml:function(h,k){var e=this._get_settings().xml_data;c.vakata.xslt(h,b[e.xsl],k)},get_xml:function(h,k,e,a,f){var d="",i=this._get_settings(),j=this,g,m,l,p,n;h||(h="flat");f||(f=0);k=this._get_node(k);if(!k||k===-1)k=this.get_container().find("> ul > li");e=c.isArray(e)?e:["id","class"];!f&&this.data.types&&c.inArray(i.types.type_attr,e)===
-1&&e.push(i.types.type_attr);a=c.isArray(a)?a:[];f||(d+="<root>");k.each(function(){d+="<item";l=c(this);c.each(e,function(o,q){var r=l.attr(q);if(!i.xml_data.get_skip_empty||typeof r!=="undefined")d+=" "+q+'="'+(" "+(r||"")).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")+'"'});if(l.hasClass("jstree-open"))d+=' state="open"';if(l.hasClass("jstree-closed"))d+=' state="closed"';if(h==="flat")d+=' parent_id="'+f+'"';d+=">";d+="<content>";p=l.children("a");p.each(function(){g=
c(this);n=false;d+="<name";c.inArray("languages",i.plugins)!==-1&&c.each(i.languages,function(o,q){if(g.hasClass(q)){d+=' lang="'+q+'"';n=q;return false}});a.length&&c.each(a,function(o,q){var r=g.attr(q);if(!i.xml_data.get_skip_empty||typeof r!=="undefined")d+=" "+q+'="'+(" "+r||"").replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")+'"'});if(g.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length)d+=' icon="'+g.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,
"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")+'"';if(g.children("ins").get(0).style.backgroundImage.length)d+=' icon="'+g.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","")+'"';d+=">";d+="<![CDATA["+j.get_text(g,n)+"]]\>";d+="</name>"});d+="</content>";m=l[0].id||true;l=l.find("> ul > li");m=l.length?j.get_xml(h,l,e,a,m):"";if(h=="nest")d+=m;d+="</item>";if(h=="flat")d+=m});f||(d+="</root>");return d}}})})(jQuery);(function(c){c.jstree.plugin("html_data",
{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return this.nodeType==3}).remove()},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(b,h,k){var e=this;this.load_node_html(b,function(){e.__callback({obj:e._get_node(b)});h.call(this)},k)},_is_loaded:function(b){b=this._get_node(b);return b==-1||!b||!this._get_settings().html_data.ajax&&
!c.isFunction(this._get_settings().html_data.data)||b.is(".jstree-open, .jstree-leaf")||b.children("ul").children("li").size()>0},load_node_html:function(b,h,k){var e,a=this.get_settings().html_data,f=function(){};e=function(){};if((b=this._get_node(b))&&b!==-1)if(b.data("jstree-is-loading"))return;else b.data("jstree-is-loading",true);switch(true){case c.isFunction(a.data):a.data.call(this,b,c.proxy(function(d){if(d&&d!==""&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")!==""){d=c(d);d.is("ul")||
(d=c("<ul />").append(d));if(b==-1||!b)this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");else{b.children("a.jstree-loading").removeClass("jstree-loading");b.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||
!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");c.removeData(b,"jstree-is-loading")}this.clean_node(b);h&&h.call(this)}else if(b&&b!==-1){b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");if(a.correct_state){this.correct_state(b);h&&h.call(this)}}else if(a.correct_state){this.get_container().children("ul").empty();
h&&h.call(this)}},this));break;case !a.data&&!a.ajax:if(!b||b==-1){this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node()}h&&h.call(this);break;case !!a.data&&!a.ajax||!!a.data&&!!a.ajax&&
(!b||b===-1):if(!b||b==-1){e=c(a.data);e.is("ul")||(e=c("<ul />").append(e));this.get_container().children("ul").empty().append(e.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node()}h&&h.call(this);break;case !a.data&&!!a.ajax||!!a.data&&!!a.ajax&&b&&b!==-1:b=this._get_node(b);
f=function(d,i,j){var g=this.get_settings().html_data.ajax.error;g&&g.call(this,d,i,j);if(b!=-1&&b.length){b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");i==="success"&&a.correct_state&&this.correct_state(b)}else i==="success"&&a.correct_state&&this.get_container().children("ul").empty();k&&k.call(this)};e=function(d,i,j){var g=this.get_settings().html_data.ajax.success;if(g)d=g.call(this,d,i,j)||d;if(d===""||d&&d.toString&&d.toString().replace(/^[\s\n]+$/,
"")==="")return f.call(this,j,i,"");if(d){d=c(d);d.is("ul")||(d=c("<ul />").append(d));if(b==-1||!b)this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");else{b.children("a.jstree-loading").removeClass("jstree-loading");b.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||
!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");c.removeData(b,"jstree-is-loading")}this.clean_node(b);h&&h.call(this)}else if(b&&b!==-1){b.children("a.jstree-loading").removeClass("jstree-loading");c.removeData(b,"jstree-is-loading");if(a.correct_state){this.correct_state(b);h&&h.call(this)}}else if(a.correct_state){this.get_container().children("ul").empty();
h&&h.call(this)}};a.ajax.context=this;a.ajax.error=f;a.ajax.success=e;if(!a.ajax.dataType)a.ajax.dataType="html";if(c.isFunction(a.ajax.url))a.ajax.url=a.ajax.url.call(this,b);if(c.isFunction(a.ajax.data))a.ajax.data=a.ajax.data.call(this,b);c.ajax(a.ajax)}}}});c.jstree.defaults.plugins.push("html_data")})(jQuery)}})();
