%PDF- %PDF-
Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/bower/jstree/ |
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/bower/jstree/jquery.jstree-min.js |
(function(){if(jQuery&&jQuery.jstree){return }var C=false,B=false,A=false;(function(G){G.vakata={};G.vakata.css={get_css:function(M,J,K){M=M.toLowerCase();var L=K.cssRules||K.rules,I=0;do{if(L.length&&I>L.length+5){return false}if(L[I].selectorText&&L[I].selectorText.toLowerCase()==M){if(J===true){if(K.removeRule){K.removeRule(I)}if(K.deleteRule){K.deleteRule(I)}return true}else{return L[I]}}}while(L[++I]);return false},add_css:function(J,I){if(G.jstree.css.get_css(J,false,I)){return false}if(I.insertRule){I.insertRule(J+" { }",0)}else{I.addRule(J,null,0)}return G.vakata.css.get_css(J)},remove_css:function(J,I){return G.vakata.css.get_css(J,true,I)},add_sheet:function(J){var I=false,L=true;if(J.str){if(J.title){I=G("style[id='"+J.title+"-stylesheet']")[0]}if(I){L=false}else{I=document.createElement("style");I.setAttribute("type","text/css");if(J.title){I.setAttribute("id",J.title+"-stylesheet")}}if(I.styleSheet){if(L){document.getElementsByTagName("head")[0].appendChild(I);I.styleSheet.cssText=J.str}else{I.styleSheet.cssText=I.styleSheet.cssText+" "+J.str}}else{I.appendChild(document.createTextNode(J.str));document.getElementsByTagName("head")[0].appendChild(I)}return I.sheet||I.styleSheet}if(J.url){if(document.createStyleSheet){try{I=document.createStyleSheet(J.url)}catch(K){}}else{I=document.createElement("link");I.rel="stylesheet";I.type="text/css";I.media="all";I.href=J.url;document.getElementsByTagName("head")[0].appendChild(I);return I.styleSheet}}}};var H=[],F=-1,E={},D={};G.fn.jstree=function(L){var I=(typeof L=="string"),J=Array.prototype.slice.call(arguments,1),K=this;if(I){if(L.substring(0,1)=="_"){return K}this.each(function(){var M=H[G.data(this,"jstree_instance_id")],N=(M&&G.isFunction(M[L]))?M[L].apply(M,J):M;if(typeof N!=="undefined"&&(L.indexOf("is_")===0||(N!==true&&N!==false))){K=N;return false}})}else{this.each(function(){var Q=G.data(this,"jstree_instance_id"),N=[],M=L?G.extend({},true,L):{},R=G(this),P=false,O=[];N=N.concat(J);if(R.data("jstree")){N.push(R.data("jstree"))}M=N.length?G.extend.apply(null,[true,M].concat(N)):M;if(typeof Q!=="undefined"&&H[Q]){H[Q].destroy()}Q=parseInt(H.push({}),10)-1;G.data(this,"jstree_instance_id",Q);M.plugins=G.isArray(M.plugins)?M.plugins:G.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=G.extend(true,{},G.jstree.defaults,M);P.plugins=M.plugins;G.each(E,function(S,T){if(G.inArray(S,P.plugins)===-1){P[S]=null;delete P[S]}else{O.push(S)}});P.plugins=O;H[Q]=new G.jstree._instance(Q,G(this).addClass("jstree jstree-"+Q),P);G.each(H[Q]._get_settings().plugins,function(S,T){H[Q].data[T]={}});G.each(H[Q]._get_settings().plugins,function(S,T){if(E[T]){E[T].__init.apply(H[Q])}});setTimeout(function(){if(H[Q]){H[Q].init()}},0)})}return K};G.jstree={defaults:{plugins:[]},_focused:function(){return H[F]||null},_reference:function(I){if(H[I]){return H[I]}var J=G(I);if(!J.length&&typeof I==="string"){J=G("#"+I)}if(!J.length){return null}return H[J.closest(".jstree").data("jstree_instance_id")]||null},_instance:function(J,I,K){this.data={core:{}};this.get_settings=function(){return G.extend(true,{},K)};this._get_settings=function(){return K};this.get_index=function(){return J};this.get_container=function(){return I};this.get_container_ul=function(){return I.children("ul:eq(0)")};this._set_settings=function(L){K=G.extend(true,{},K,L)}},_fn:{},plugin:function(I,J){J=G.extend({},{__init:G.noop,__destroy:G.noop,_fn:{},defaults:false},J);E[I]=J;G.jstree.defaults[I]=J.defaults;G.each(J._fn,function(K,L){L.plugin=I;L.old=G.jstree._fn[K];G.jstree._fn[K]=function(){var M,O=L,N=Array.prototype.slice.call(arguments),Q=new G.Event("before.jstree"),P=false;if(this.data.core.locked===true&&K!=="unlock"&&K!=="is_locked"){return }do{if(O&&O.plugin&&G.inArray(O.plugin,this._get_settings().plugins)!==-1){break}O=O.old}while(O);if(!O){return }if(K.indexOf("_")===0){M=O.apply(this,N)}else{M=this.get_container().triggerHandler(Q,{func:K,inst:this,args:N,plugin:O.plugin});if(M===false){return }if(typeof M!=="undefined"){N=M}M=O.apply(G.extend({},this,{__callback:function(R){this.get_container().triggerHandler(K+".jstree",{inst:this,args:N,rslt:R,rlbk:P})},__rollback:function(){P=this.get_rollback();return P},__call_old:function(R){return O.old.apply(this,(R?Array.prototype.slice.call(arguments,1):N))}}),N)}return M};G.jstree._fn[K].old=L.old;G.jstree._fn[K].plugin=I})},rollback:function(I){if(I){if(!G.isArray(I)){I=[I]}G.each(I,function(J,K){H[K.i].set_rollback(K.h,K.d)})}}};G.jstree._fn=G.jstree._instance.prototype={};G(function(){var K=navigator.userAgent.toLowerCase(),J=(K.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],I=".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; min-width: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(K)&&parseInt(J,10)==6){C=true;try{document.execCommand("BackgroundImageCache",false,true)}catch(L){}I+=".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(K)&&parseInt(J,10)==7){B=true;I+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } "}if(!/compatible/.test(K)&&/mozilla/.test(K)&&parseFloat(J,10)<1.9){A=true;I+=".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; } "}G.vakata.css.add_sheet({str:I,title:"jstree"})});G.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();if(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> </ins><a class='jstree-loading' href='#'><ins class='jstree-icon'> </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",G.proxy(function(J){var I=G(J.target);this.toggle_node(I)},this)).bind("mousedown.jstree",G.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(J){var K;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(window.getSelection){K=window.getSelection();try{K.removeAllRanges();K.collapse()}catch(I){}}}});if(this._get_settings().core.notify_plugins){this.get_container().bind("load_node.jstree",G.proxy(function(K,J){var L=this._get_node(J.rslt.obj),I=this;if(L===-1){L=this.get_container_ul()}if(!L.length){return }L.find("li").each(function(){var M=G(this);if(M.data("jstree")){G.each(M.data("jstree"),function(O,N){if(I.data[O]&&G.isFunction(I["_"+O+"_notify"])){I["_"+O+"_notify"].call(I,M,N)}})}})},this))}if(this._get_settings().core.load_open){this.get_container().bind("load_node.jstree",G.proxy(function(K,J){var L=this._get_node(J.rslt.obj),I=this;if(L===-1){L=this.get_container_ul()}if(!L.length){return }L.find("li.jstree-open:not(:has(ul))").each(function(){I.load_node(this,G.noop,G.noop)})},this))}this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes()})},destroy:function(){var I,L=this.get_index(),J=this._get_settings(),K=this;G.each(J.plugins,function(M,O){try{E[O].__destroy.apply(K)}catch(N){}});this.__callback();if(this.is_focused()){for(I in H){if(H.hasOwnProperty(I)&&I!=L){H[I].set_focus();break}}}if(L===F){F=-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,"")});G(document).unbind(".jstree-"+L).undelegate(".jstree-"+L);H[L]=null;delete H[L]},_core_notify:function(J,I){if(I.opened){this.open_node(J,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 I=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){I.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}});this.__callback(I.data.core.to_open)},save_loaded:function(){},reload_nodes:function(J){var M=this,I=true,L=[],K=[];if(!J){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=G.map(G.makeArray(this.data.core.to_open),function(N){return"#"+N.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});this.data.core.to_load=G.map(G.makeArray(this.data.core.to_load),function(N){return"#"+N.toString().replace(/^#/,"").replace(/\\\//g,"/").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){G.each(this.data.core.to_load,function(N,O){if(O=="#"){return true}if(G(O).length){L.push(O)}else{K.push(O)}});if(L.length){this.data.core.to_load=K;G.each(L,function(N,O){if(!M._is_loaded(O)){M.load_node(O,function(){M.reload_nodes(true)},function(){M.reload_nodes(true)});I=false}})}}if(this.data.core.to_open.length){G.each(this.data.core.to_open,function(N,O){M.open_node(O,false,true)})}if(I){if(this.data.core.reopen){clearTimeout(this.data.core.reopen)}this.data.core.reopen=setTimeout(function(){M.__callback({},M)},50);this.data.core.refreshing=false;this.reopen()}},reopen:function(){var I=this;if(this.data.core.to_open.length){G.each(this.data.core.to_open,function(J,K){I.open_node(K,false,true)})}this.__callback({})},refresh:function(I){var J=this;this.save_opened();if(!I){I=-1}I=this._get_node(I);if(!I){I=-1}if(I!==-1){I.children("UL").remove()}else{this.get_container_ul().empty()}this.load_node(I,function(){J.__callback({obj:I});J.reload_nodes()})},loaded:function(){this.__callback()},set_focus:function(){if(this.is_focused()){return }var I=G.jstree._focused();if(I){I.unset_focus()}this.get_container().addClass("jstree-focused");F=this.get_index();this.__callback()},is_focused:function(){return F==this.get_index()},unset_focus:function(){if(this.is_focused()){this.get_container().removeClass("jstree-focused");F=-1}this.__callback()},_get_node:function(I){var J=G(I,this.get_container());if(J.is(".jstree")||I==-1){return -1}J=J.closest("li",this.get_container());return J.length?J:false},_get_next:function(J,I){J=this._get_node(J);if(J===-1){return this.get_container().find("> ul > li:first-child")}if(!J.length){return false}if(I){return(J.nextAll("li").size()>0)?J.nextAll("li:eq(0)"):false}if(J.hasClass("jstree-open")){return J.find("li:eq(0)")}else{if(J.nextAll("li").size()>0){return J.nextAll("li:eq(0)")}else{return J.parentsUntil(".jstree","li").next("li").eq(0)}}},_get_prev:function(J,I){J=this._get_node(J);if(J===-1){return this.get_container().find("> ul > li:last-child")}if(!J.length){return false}if(I){return(J.prevAll("li").length>0)?J.prevAll("li:eq(0)"):false}if(J.prev("li").length){J=J.prev("li").eq(0);while(J.hasClass("jstree-open")){J=J.children("ul:eq(0)").children("li:last")}return J}else{var K=J.parentsUntil(".jstree","li:eq(0)");return K.length?K:false}},_get_parent:function(I){I=this._get_node(I);if(I==-1||!I.length){return false}var J=I.parentsUntil(".jstree","li:eq(0)");return J.length?J:-1},_get_children:function(I){I=this._get_node(I);if(I===-1){return this.get_container().children("ul:eq(0)").children("li")}if(!I.length){return false}return I.children("ul:eq(0)").children("li")},get_path:function(K,I){var J=[],L=this;K=this._get_node(K);if(K===-1||!K||!K.length){return false}K.parentsUntil(".jstree","li").each(function(){J.push(I?this.id:L.get_text(this))});J.reverse();J.push(I?K.attr("id"):this.get_text(K));return J},_get_string:function(I){return this._get_settings().core.strings[I]||I},is_open:function(I){I=this._get_node(I);return I&&I!==-1&&I.hasClass("jstree-open")},is_closed:function(I){I=this._get_node(I);return I&&I!==-1&&I.hasClass("jstree-closed")},is_leaf:function(I){I=this._get_node(I);return I&&I!==-1&&I.hasClass("jstree-leaf")},correct_state:function(I){I=this._get_node(I);if(!I||I===-1){return false}I.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:I})},open_node:function(L,M,J){L=this._get_node(L);if(!L.length){return false}if(!L.hasClass("jstree-closed")){if(M){M.call()}return false}var K=J||C?0:this._get_settings().core.animation,I=this;if(!this._is_loaded(L)){L.children("a").addClass("jstree-loading");this.load_node(L,function(){I.open_node(L,M,J)},M)}else{if(this._get_settings().core.open_parents){L.parentsUntil(".jstree",".jstree-closed").each(function(){I.open_node(this,false,true)})}if(K){L.children("ul").css("display","none")}L.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");if(K){L.children("ul").stop(true,true).slideDown(K,function(){this.style.display="";I.after_open(L)})}else{I.after_open(L)}this.__callback({obj:L});if(M){M.call()}}},after_open:function(I){this.__callback({obj:I})},close_node:function(L,J){L=this._get_node(L);var K=J||C?0:this._get_settings().core.animation,I=this;if(!L.length||!L.hasClass("jstree-open")){return false}if(K){L.children("ul").attr("style","display:block !important")}L.removeClass("jstree-open").addClass("jstree-closed");if(K){L.children("ul").stop(true,true).slideUp(K,function(){this.style.display="";I.after_close(L)})}else{I.after_close(L)}this.__callback({obj:L})},after_close:function(I){this.__callback({obj:I})},toggle_node:function(I){I=this._get_node(I);if(I.hasClass("jstree-closed")){return this.open_node(I)}if(I.hasClass("jstree-open")){return this.close_node(I)}},open_all:function(K,J,I){K=K?this._get_node(K):-1;if(!K||K===-1){K=this.get_container_ul()}if(I){K=K.find("li.jstree-closed")}else{I=K;if(K.is(".jstree-closed")){K=K.find("li.jstree-closed").andSelf()}else{K=K.find("li.jstree-closed")}}var L=this;K.each(function(){var M=this;if(!L._is_loaded(this)){L.open_node(this,function(){L.open_all(M,J,I)},!J)}else{L.open_node(this,false,!J)}});if(I.find("li.jstree-closed").length===0){this.__callback({obj:I})}},close_all:function(J,I){var K=this;J=J?this._get_node(J):this.get_container();if(!J||J===-1){J=this.get_container_ul()}J.find("li.jstree-open").andSelf().each(function(){K.close_node(this,!I)});this.__callback({obj:J})},clean_node:function(I){I=I&&I!=-1?G(I):this.get_container_ul();I=I.is("li")?I.find("li").andSelf():I.find("li");I.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");I.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:I})},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data}},set_rollback:function(I,J){this.get_container().empty().append(I);this.data=J;this.__callback()},load_node:function(K,I,J){this.__callback({obj:K})},_is_loaded:function(I){return true},create_node:function(N,I,M,P,J){N=this._get_node(N);I=typeof I==="undefined"?"last":I;var O=G("<li />"),L=this._get_settings().core,K;if(N!==-1&&!N.length){return false}if(!J&&!this._is_loaded(N)){this.load_node(N,function(){this.create_node(N,I,M,P,true)});return false}this.__rollback();if(typeof M==="string"){M={data:M}}if(!M){M={}}if(M.attr){O.attr(M.attr)}if(M.metadata){O.data(M.metadata)}if(M.state){O.addClass("jstree-"+M.state)}if(!M.data){M.data=this._get_string("new_node")}if(!G.isArray(M.data)){K=M.data;M.data=[];M.data.push(K)}G.each(M.data,function(R,Q){K=G("<a />");if(G.isFunction(Q)){Q=Q.call(this,M)}if(typeof Q=="string"){K.attr("href","#")[L.html_titles?"html":"text"](Q)}else{if(!Q.attr){Q.attr={}}if(!Q.attr.href){Q.attr.href="#"}K.attr(Q.attr)[L.html_titles?"html":"text"](Q.title);if(Q.language){K.addClass(Q.language)}}K.prepend("<ins class='jstree-icon'> </ins>");if(!Q.icon&&M.icon){Q.icon=M.icon}if(Q.icon){if(Q.icon.indexOf("/")===-1){K.children("ins").addClass(Q.icon)}else{K.children("ins").css("background","url('"+Q.icon+"') center center no-repeat")}}O.append(K)});O.prepend("<ins class='jstree-icon'> </ins>");if(N===-1){N=this.get_container();if(I==="before"){I="first"}if(I==="after"){I="last"}}switch(I){case"before":N.before(O);K=this._get_parent(N);break;case"after":N.after(O);K=this._get_parent(N);break;case"inside":case"first":if(!N.children("ul").length){N.append("<ul />")}N.children("ul").prepend(O);K=N;break;case"last":if(!N.children("ul").length){N.append("<ul />")}N.children("ul").append(O);K=N;break;default:if(!N.children("ul").length){N.append("<ul />")}if(!I){I=0}K=N.children("ul").children("li").eq(I);if(K.length){K.before(O)}else{N.children("ul").append(O)}K=N;break}if(K===-1||K.get(0)===this.get_container().get(0)){K=-1}this.clean_node(K);this.__callback({obj:O,parent:K});if(P){P.call(this,O)}return O},get_text:function(J){J=this._get_node(J);if(!J.length){return false}var I=this._get_settings().core.html_titles;J=J.children("a:eq(0)");if(I){J=J.clone();J.children("INS").remove();return J.html()}else{J=J.contents().filter(function(){return this.nodeType==3})[0];return J.nodeValue}},set_text:function(J,K){J=this._get_node(J);if(!J.length){return false}J=J.children("a:eq(0)");if(this._get_settings().core.html_titles){var I=J.children("INS").clone();J.html(K).prepend(I);this.__callback({obj:J,name:K});return true}else{J=J.contents().filter(function(){return this.nodeType==3})[0];this.__callback({obj:J,name:K});return(J.nodeValue=K)}},rename_node:function(I,J){I=this._get_node(I);this.__rollback();if(I&&I.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))){this.__callback({obj:I,name:J})}},delete_node:function(L){L=this._get_node(L);if(!L.length){return false}this.__rollback();var K=this._get_parent(L),J=G([]),I=this;L.each(function(){J=J.add(I._get_prev(this))});L=L.detach();if(K!==-1&&K.find("> ul > li").length===0){K.removeClass("jstree-open jstree-closed").addClass("jstree-leaf")}this.clean_node(K);this.__callback({obj:L,prev:J,parent:K});return L},prepare_move:function(M,K,N,I,J){var L={};L.ot=G.jstree._reference(M)||this;L.o=L.ot._get_node(M);L.r=K===-1?-1:this._get_node(K);L.p=(typeof N==="undefined"||N===false)?"last":N;if(!J&&D.o&&D.o[0]===L.o[0]&&D.r[0]===L.r[0]&&D.p===L.p){this.__callback(D);if(I){I.call(this,D)}return }L.ot=G.jstree._reference(L.o)||this;L.rt=G.jstree._reference(L.r)||this;if(L.r===-1||!L.r){L.cr=-1;switch(L.p){case"first":case"before":case"inside":L.cp=0;break;case"after":case"last":L.cp=L.rt.get_container().find(" > ul > li").length;break;default:L.cp=L.p;break}}else{if(!/^(before|after)$/.test(L.p)&&!this._is_loaded(L.r)){return this.load_node(L.r,function(){this.prepare_move(M,K,N,I,true)})}switch(L.p){case"before":L.cp=L.r.index();L.cr=L.rt._get_parent(L.r);break;case"after":L.cp=L.r.index()+1;L.cr=L.rt._get_parent(L.r);break;case"inside":case"first":L.cp=0;L.cr=L.r;break;case"last":L.cp=L.r.find(" > ul > li").length;L.cr=L.r;break;default:L.cp=L.p;L.cr=L.r;break}}L.np=L.cr==-1?L.rt.get_container():L.cr;L.op=L.ot._get_parent(L.o);L.cop=L.o.index();if(L.op===-1){L.op=L.ot?L.ot.get_container():this.get_container()}if(!/^(before|after)$/.test(L.p)&&L.op&&L.np&&L.op[0]===L.np[0]&&L.o.index()<L.cp){L.cp++}L.or=L.np.find(" > ul > li:nth-child("+(L.cp+1)+")");D=L;this.__callback(D);if(I){I.call(this,D)}},check_move:function(){var K=D,I=true,J=K.r===-1?this.get_container():K.r;if(!K||!K.o||K.or[0]===K.o[0]){return false}if(K.op&&K.np&&K.op[0]===K.np[0]&&K.cp-1===K.o.index()){return false}K.o.each(function(){if(J.parentsUntil(".jstree","li").andSelf().index(this)!==-1){I=false;return false}});return I},move_node:function(O,L,I,K,J,N){if(!J){return this.prepare_move(O,L,I,function(Q){this.move_node(Q,false,false,K,true,N)})}if(K){D.cy=true}if(!N&&!this.check_move()){return false}this.__rollback();var P=false;if(K){P=O.o.clone(true);P.find("*[id]").andSelf().each(function(){if(this.id){this.id="copy_"+this.id}})}else{P=O.o}if(O.or.length){O.or.before(P)}else{if(!O.np.children("ul").length){G("<ul />").appendTo(O.np)}O.np.children("ul:eq(0)").append(P)}try{O.ot.clean_node(O.op);O.rt.clean_node(O.np);if(!O.op.find("> ul > li").length){O.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}}catch(M){}if(K){D.cy=true;D.oc=P}this.__callback(D);return D},_get_move:function(){return D}}})})(jQuery);(function(D){var G,F,E;D(function(){if(/msie/.test(navigator.userAgent.toLowerCase())){F=D('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1000,left:0}).appendTo("body");E=D('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1000,left:0}).appendTo("body");G=F.width()-E.width();F.add(E).remove()}else{F=D("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200});G=100-F.width();F.parent().remove()}});D.jstree.plugin("ui",{__init:function(){this.data.ui.selected=D();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",D.proxy(function(H){H.preventDefault();H.currentTarget.blur();if(!D(H.currentTarget).hasClass("jstree-loading")){this.select_node(H.currentTarget,true,H)}},this)).delegate("a","mouseenter.jstree",D.proxy(function(H){if(!D(H.currentTarget).hasClass("jstree-loading")){this.hover_node(H.target)}},this)).delegate("a","mouseleave.jstree",D.proxy(function(H){if(!D(H.currentTarget).hasClass("jstree-loading")){this.dehover_node(H.target)}},this)).bind("reopen.jstree",D.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",D.proxy(function(){this.dehover_node();this.save_selected()},this)).bind("set_rollback.jstree",D.proxy(function(){this.reselect()},this)).bind("close_node.jstree",D.proxy(function(I,J){var H=this._get_settings().ui,K=this._get_node(J.rslt.obj),L=(K&&K.length)?K.children("ul").find("a.jstree-clicked"):D(),M=this;if(H.selected_parent_close===false||!L.length){return }L.each(function(){M.deselect_node(this);if(H.selected_parent_close==="select_parent"){M.select_node(K)}})},this)).bind("delete_node.jstree",D.proxy(function(I,J){var H=this._get_settings().ui.select_prev_on_delete,K=this._get_node(J.rslt.obj),L=(K&&K.length)?K.find("a.jstree-clicked"):[],M=this;L.each(function(){M.deselect_node(this)});if(H&&L.length){J.rslt.prev.each(function(){if(this.parentNode){M.select_node(this);return false}})}},this)).bind("move_node.jstree",D.proxy(function(H,I){if(I.rslt.cy){I.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(H,I){if(typeof H==="undefined"||H===null){return I?this.data.ui.selected:this.data.ui.last_selected}var J=D(H,this.get_container());if(J.is(".jstree")||H==-1){return -1}J=J.closest("li",this.get_container());return J.length?J:false},_ui_notify:function(I,H){if(H.selected){this.select_node(I,false)}},save_selected:function(){var H=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){if(this.id){H.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}});this.__callback(this.data.ui.to_select)},reselect:function(){var I=this,H=this.data.ui.to_select;H=D.map(D.makeArray(H),function(J){return"#"+J.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});D.each(H,function(J,K){if(K&&K!=="#"){I.select_node(K)}});this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode});this.__callback()},refresh:function(H){this.save_selected();return this.__call_old()},hover_node:function(H){H=this._get_node(H);if(!H.length){return false}if(!H.hasClass("jstree-hovered")){this.dehover_node()}this.data.ui.hovered=H.children("a").addClass("jstree-hovered").parent();this._fix_scroll(H);this.__callback({obj:H})},dehover_node:function(){var I=this.data.ui.hovered,H;if(!I||!I.length){return false}H=I.children("a").removeClass("jstree-hovered").parent();if(this.data.ui.hovered[0]===H[0]){this.data.ui.hovered=null}this.__callback({obj:I})},select_node:function(K,H,L){K=this._get_node(K);if(K==-1||!K||!K.length){return false}var P=this._get_settings().ui,N=(P.select_multiple_modifier=="on"||(P.select_multiple_modifier!==false&&L&&L[P.select_multiple_modifier+"Key"])),I=(P.select_range_modifier!==false&&L&&L[P.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==K[0]&&this.data.ui.last_selected.parent()[0]===K.parent()[0]),J=this.is_selected(K),M=true,O=this;if(H){if(P.disable_selecting_children&&N&&((K.parentsUntil(".jstree","li").children("a.jstree-clicked").length)||(K.children("ul").find("a.jstree-clicked:eq(0)").length))){return false}M=false;switch(!0){case (I):this.data.ui.last_selected.addClass("jstree-last-selected");K=K[K.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf();if(P.select_limit==-1||K.length<P.select_limit){this.data.ui.last_selected.removeClass("jstree-last-selected");this.data.ui.selected.each(function(){if(this!==O.data.ui.last_selected[0]){O.deselect_node(this)}});J=false;M=true}else{M=false}break;case (J&&!N):this.deselect_all();J=false;M=true;break;case (!J&&!N):if(P.select_limit==-1||P.select_limit>0){this.deselect_all();M=true}break;case (J&&N):this.deselect_node(K);break;case (!J&&N):if(P.select_limit==-1||this.data.ui.selected.length+1<=P.select_limit){M=true}break}}if(M&&!J){if(!I){this.data.ui.last_selected=K}K.children("a").addClass("jstree-clicked");if(P.selected_parent_open){K.parents(".jstree-closed").each(function(){O.open_node(this,false,true)})}this.data.ui.selected=this.data.ui.selected.add(K);this._fix_scroll(K.eq(0));this.__callback({obj:K,e:L})}},_fix_scroll:function(I){var J=this.get_container()[0],H;if(J.scrollHeight>J.offsetHeight){I=this._get_node(I);if(!I||I===-1||!I.length||!I.is(":visible")){return }H=I.offset().top-this.get_container().offset().top;if(H<0){J.scrollTop=J.scrollTop+H-1}if(H+this.data.core.li_height+(J.scrollWidth>J.offsetWidth?G:0)>J.offsetHeight){J.scrollTop=J.scrollTop+(H-J.offsetHeight+this.data.core.li_height+1+(J.scrollWidth>J.offsetWidth?G:0))}}},deselect_node:function(H){H=this._get_node(H);if(!H.length){return false}if(this.is_selected(H)){H.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(H);if(this.data.ui.last_selected.get(0)===H.get(0)){this.data.ui.last_selected=this.data.ui.selected.eq(0)}this.__callback({obj:H})}},toggle_select:function(H){H=this._get_node(H);if(!H.length){return false}if(this.is_selected(H)){this.deselect_node(H)}else{this.select_node(H)}},is_selected:function(H){return this.data.ui.selected.index(this._get_node(H))>=0},get_selected:function(H){return H?D(H).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(I){var H=I?D(I).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();H.children("a.jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=D([]);this.data.ui.last_selected=false;this.__callback({obj:H})}}});D.jstree.defaults.plugins.push("ui")})(jQuery);(function(D){D.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",D.proxy(function(G,F){if(this._get_settings().crrm.move.open_onmove){var E=this;F.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){E.open_node(this,false,true)})}},this))},defaults:{input_width_limit:200,move:{always_copy:false,open_onmove:true,default_position:"last",check_move:function(E){return true}}},_fn:{_show_input:function(E,L){E=this._get_node(E);var J=this._get_settings().core.rtl,K=this._get_settings().crrm.input_width_limit,G=E.children("ins").width(),F=E.find("> a:visible > ins").width()*E.find("> a:visible > ins").length,M=this.get_text(E),I=D("<div />",{css:{position:"absolute",top:"-200px",left:(J?"0px":"-1000px"),visibility:"hidden"}}).appendTo("body"),H=E.css("position","relative").append(D("<input />",{value:M,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:(J?"auto":(G+F+4)+"px"),right:(J?(G+F+4)+"px":"auto"),top:"0px",height:(this.data.core.li_height-2)+"px",lineHeight:(this.data.core.li_height-2)+"px",width:"150px"},blur:D.proxy(function(){var O=E.children(".jstree-rename-input"),N=O.val();if(N===""){N=M}I.remove();O.remove();this.set_text(E,M);this.rename_node(E,N);L.call(this,E,N,M);E.css("position","")},this),keyup:function(O){var N=O.keyCode||O.which;if(N==27){this.value=M;this.blur();return }else{if(N==13){this.blur();return }else{H.width(Math.min(I.text("pW"+this.value).width(),K))}}},keypress:function(O){var N=O.keyCode||O.which;if(N==13){return false}}})).children(".jstree-rename-input");this.set_text(E,"");I.css({fontFamily:H.css("fontFamily")||"",fontSize:H.css("fontSize")||"",fontWeight:H.css("fontWeight")||"",fontStyle:H.css("fontStyle")||"",fontStretch:H.css("fontStretch")||"",fontVariant:H.css("fontVariant")||"",letterSpacing:H.css("letterSpacing")||"",wordSpacing:H.css("wordSpacing")||""});H.width(Math.min(I.text("pW"+H[0].value).width(),K))[0].select()},rename:function(F){F=this._get_node(F);this.__rollback();var E=this.__callback;this._show_input(F,function(I,H,G){E.call(this,{obj:I,new_name:H,old_name:G})})},create:function(I,F,H,K,E){var G,J=this;I=this._get_node(I);if(!I){I=-1}this.__rollback();G=this.create_node(I,F,H,function(L){var M=this._get_parent(L),N=D(L).index();if(K){K.call(this,L)}if(M.length&&M.hasClass("jstree-closed")){this.open_node(M,false,true)}if(!E){this._show_input(L,function(Q,P,O){J.__callback({obj:Q,name:P,parent:M,position:N})})}else{J.__callback({obj:L,name:this.get_text(L),parent:M,position:N})}});return G},remove:function(G){G=this._get_node(G,true);var F=this._get_parent(G),E=this._get_prev(G);this.__rollback();G=this.delete_node(G);if(G!==false){this.__callback({obj:G,prev:E,parent:F})}},check_move:function(){if(!this.__call_old()){return false}var E=this._get_settings().crrm.move;if(!E.check_move.call(this,this._get_move())){return false}return true},move_node:function(K,I,E,G,F,J){var H=this._get_settings().crrm.move;if(!F){if(typeof E==="undefined"){E=H.default_position}if(E==="inside"&&!H.default_position.match(/^(before|after)$/)){E=H.default_position}return this.__call_old(true,K,I,E,G,false,J)}if(H.always_copy===true||(H.always_copy==="multitree"&&K.rt.get_index()!==K.ot.get_index())){G=true}this.__call_old(true,K,I,E,G,true,J)},cut:function(E){E=this._get_node(E,true);if(!E||!E.length){return false}this.data.crrm.cp_nodes=false;this.data.crrm.ct_nodes=E;this.__callback({obj:E})},copy:function(E){E=this._get_node(E,true);if(!E||!E.length){return false}this.data.crrm.ct_nodes=false;this.data.crrm.cp_nodes=E;this.__callback({obj:E})},paste:function(F){F=this._get_node(F);if(!F||!F.length){return false}var E=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;if(!this.data.crrm.ct_nodes&&!this.data.crrm.cp_nodes){return false}if(this.data.crrm.ct_nodes){this.move_node(this.data.crrm.ct_nodes,F);this.data.crrm.ct_nodes=false}if(this.data.crrm.cp_nodes){this.move_node(this.data.crrm.cp_nodes,F,false,true)}this.__callback({obj:F,nodes:E})}}})})(jQuery);(function(D){var E=[];D.jstree._themes=false;D.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",D.proxy(function(){var F=this._get_settings().themes;this.data.themes.dots=F.dots;this.data.themes.icons=F.icons;this.set_theme(F.theme,F.url)},this)).bind("loaded.jstree",D.proxy(function(){if(!this.data.themes.dots){this.hide_dots()}else{this.show_dots()}if(!this.data.themes.icons){this.hide_icons()}else{this.show_icons()}},this))},defaults:{theme:"default",url:false,dots:true,icons:true},_fn:{set_theme:function(G,F){if(!G){return false}if(!F){F=D.jstree._themes+G+"/style.css"}if(D.inArray(F,E)==-1){D.vakata.css.add_sheet({url:F});E.push(F)}if(this.data.themes.theme!=G){this.get_container().removeClass("jstree-"+this.data.themes.theme);this.data.themes.theme=G}this.get_container().addClass("jstree-"+G);if(!this.data.themes.dots){this.hide_dots()}else{this.show_dots()}if(!this.data.themes.icons){this.hide_icons()}else{this.show_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(){if(this.data.themes.dots){this.hide_dots()}else{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(){if(this.data.themes.icons){this.hide_icons()}else{this.show_icons()}}}});D(function(){if(D.jstree._themes===false){D("script").each(function(){if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)){D.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/";return false}})}if(D.jstree._themes===false){D.jstree._themes="themes/"}});D.jstree.defaults.plugins.push("themes")})(jQuery);(function(F){var E=[];function D(H,I){var J=F.jstree._focused(),G;if(J&&J.data&&J.data.hotkeys&&J.data.hotkeys.enabled){G=J._get_settings().hotkeys[H];if(G){return G.call(J,I)}}}F.jstree.plugin("hotkeys",{__init:function(){if(typeof F.hotkeys==="undefined"){throw"jsTree hotkeys: jQuery hotkeys plugin not included."}if(!this.data.ui){throw"jsTree hotkeys: jsTree UI plugin not included."}F.each(this._get_settings().hotkeys,function(H,G){if(G!==false&&F.inArray(H,E)==-1){F(document).bind("keydown",H,function(I){return D(H,I)});E.push(H)}});this.get_container().bind("lock.jstree",F.proxy(function(){if(this.data.hotkeys.enabled){this.data.hotkeys.enabled=false;this.data.hotkeys.revert=true}},this)).bind("unlock.jstree",F.proxy(function(){if(this.data.hotkeys.revert){this.data.hotkeys.enabled=true}},this));this.enable_hotkeys()},defaults:{up:function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(G));return false},"ctrl+up":function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(G));return false},"shift+up":function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(G));return false},down:function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(G));return false},"ctrl+down":function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(G));return false},"shift+down":function(){var G=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(G));return false},left:function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G){if(G.hasClass("jstree-open")){this.close_node(G)}else{this.hover_node(this._get_prev(G))}}return false},"ctrl+left":function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G){if(G.hasClass("jstree-open")){this.close_node(G)}else{this.hover_node(this._get_prev(G))}}return false},"shift+left":function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G){if(G.hasClass("jstree-open")){this.close_node(G)}else{this.hover_node(this._get_prev(G))}}return false},right:function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G&&G.length){if(G.hasClass("jstree-closed")){this.open_node(G)}else{this.hover_node(this._get_next(G))}}return false},"ctrl+right":function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G&&G.length){if(G.hasClass("jstree-closed")){this.open_node(G)}else{this.hover_node(this._get_next(G))}}return false},"shift+right":function(){var G=this.data.ui.hovered||this.data.ui.last_selected;if(G&&G.length){if(G.hasClass("jstree-closed")){this.open_node(G)}else{this.hover_node(this._get_next(G))}}return false},space:function(){if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").click()}return false},"ctrl+space":function(G){G.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(G)}return false},"shift+space":function(G){G.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(G)}return false},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=true},disable_hotkeys:function(){this.data.hotkeys.enabled=false}}})})(jQuery);(function(D){D.jstree.plugin("json_data",{__init:function(){var E=this._get_settings().json_data;if(E.progressive_unload){this.get_container().bind("after_close.jstree",function(G,F){F.rslt.obj.children("ul").remove()})}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(G,E,F){var H=this;this.load_node_json(G,function(){H.__callback({obj:H._get_node(G)});E.call(this)},F)},_is_loaded:function(F){var E=this._get_settings().json_data;F=this._get_node(F);return F==-1||!F||(!E.ajax&&!E.progressive_render&&!D.isFunction(E.data))||F.is(".jstree-open, .jstree-leaf")||F.children("ul").children("li").length>0},refresh:function(F){F=this._get_node(F);var E=this._get_settings().json_data;if(F&&F!==-1&&E.progressive_unload&&(D.isFunction(E.data)||!!E.ajax)){F.removeData("jstree_children")}return this.__call_old()},load_node_json:function(I,E,G){var H=this.get_settings().json_data,K,F=function(){},J=function(){};I=this._get_node(I);if(I&&I!==-1&&(H.progressive_render||H.progressive_unload)&&!I.is(".jstree-open, .jstree-leaf")&&I.children("ul").children("li").length===0&&I.data("jstree_children")){K=this._parse_json(I.data("jstree_children"),I);if(K){I.append(K);if(!H.progressive_unload){I.removeData("jstree_children")}}this.clean_node(I);if(E){E.call(this)}return }if(I&&I!==-1){if(I.data("jstree_is_loading")){return }else{I.data("jstree_is_loading",true)}}switch(!0){case (!H.data&&!H.ajax):throw"Neither data nor ajax settings supplied.";case (D.isFunction(H.data)):H.data.call(this,I,D.proxy(function(L){L=this._parse_json(L,I);if(!L){if(I===-1||!I){if(H.correct_state){this.get_container().children("ul").empty()}}else{I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(H.correct_state){this.correct_state(I)}}if(G){G.call(this)}}else{if(I===-1||!I){this.get_container().children("ul").empty().append(L.children())}else{I.append(L).children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading")}this.clean_node(I);if(E){E.call(this)}}},this));break;case (!!H.data&&!H.ajax)||(!!H.data&&!!H.ajax&&(!I||I===-1)):if(!I||I==-1){K=this._parse_json(H.data,I);if(K){this.get_container().children("ul").empty().append(K.children());this.clean_node()}else{if(H.correct_state){this.get_container().children("ul").empty()}}}if(E){E.call(this)}break;case (!H.data&&!!H.ajax)||(!!H.data&&!!H.ajax&&I&&I!==-1):F=function(M,N,O){var L=this.get_settings().json_data.ajax.error;if(L){L.call(this,M,N,O)}if(I!=-1&&I.length){I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(N==="success"&&H.correct_state){this.correct_state(I)}}else{if(N==="success"&&H.correct_state){this.get_container().children("ul").empty()}}if(G){G.call(this)}};J=function(O,M,L){var N=this.get_settings().json_data.ajax.success;if(N){O=N.call(this,O,M,L)||O}if(O===""||(O&&O.toString&&O.toString().replace(/^[\s\n]+$/,"")==="")||(!D.isArray(O)&&!D.isPlainObject(O))){return F.call(this,L,M,"")}O=this._parse_json(O,I);if(O){if(I===-1||!I){this.get_container().children("ul").empty().append(O.children())}else{I.append(O).children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading")}this.clean_node(I);if(E){E.call(this)}}else{if(I===-1||!I){if(H.correct_state){this.get_container().children("ul").empty();if(E){E.call(this)}}}else{I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(H.correct_state){this.correct_state(I);if(E){E.call(this)}}}}};H.ajax.context=this;H.ajax.error=F;H.ajax.success=J;if(!H.ajax.dataType){H.ajax.dataType="json"}if(D.isFunction(H.ajax.url)){H.ajax.url=H.ajax.url.call(this,I)}if(D.isFunction(H.ajax.data)){H.ajax.data=H.ajax.data.call(this,I)}D.ajax(H.ajax);break}},_parse_json:function(E,I,N){var K=false,F=this._get_settings(),P=F.json_data,O=F.core.html_titles,J,H,G,M,L;if(!E){return K}if(P.progressive_unload&&I&&I!==-1){I.data("jstree_children",K)}if(D.isArray(E)){K=D();if(!E.length){return false}for(H=0,G=E.length;H<G;H++){J=this._parse_json(E[H],I,true);if(J.length){K=K.add(J)}}}else{if(typeof E=="string"){E={data:E}}if(!E.data&&E.data!==""){return K}K=D("<li />");if(E.attr){K.attr(E.attr)}if(E.metadata){K.data(E.metadata)}if(E.state){K.addClass("jstree-"+E.state)}if(!D.isArray(E.data)){J=E.data;E.data=[];E.data.push(J)}D.each(E.data,function(R,Q){J=D("<a />");if(D.isFunction(Q)){Q=Q.call(this,E)}if(typeof Q=="string"){J.attr("href","#")[O?"html":"text"](Q)}else{if(!Q.attr){Q.attr={}}if(!Q.attr.href){Q.attr.href="#"}J.attr(Q.attr)[O?"html":"text"](Q.title);if(Q.language){J.addClass(Q.language)}}J.prepend("<ins class='jstree-icon'> </ins>");if(!Q.icon&&E.icon){Q.icon=E.icon}if(Q.icon){if(Q.icon.indexOf("/")===-1){J.children("ins").addClass(Q.icon)}else{J.children("ins").css("background","url('"+Q.icon+"') center center no-repeat")}}K.append(J)});K.prepend("<ins class='jstree-icon'> </ins>");if(E.children){if(P.progressive_render&&E.state!=="open"){K.addClass("jstree-closed").data("jstree_children",E.children)}else{if(P.progressive_unload){K.data("jstree_children",E.children)}if(D.isArray(E.children)&&E.children.length){J=this._parse_json(E.children,I,true);if(J.length){L=D("<ul />");L.append(J);K.append(L)}}}}}if(!N){M=D("<ul />");M.append(K);K=M}return K},get_json:function(J,G,E,N){var Q=[],P=this._get_settings(),K=this,I,H,M,L,O,F;J=this._get_node(J);if(!J||J===-1){J=this.get_container().find("> ul > li")}G=D.isArray(G)?G:["id","class"];if(!N&&this.data.types){G.push(P.types.type_attr)}E=D.isArray(E)?E:[];J.each(function(){M=D(this);I={data:[]};if(G.length){I.attr={}}D.each(G,function(S,R){H=M.attr(R);if(H&&H.length&&H.replace(/jstree[^ ]*/ig,"").length){I.attr[R]=(" "+H).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")}});if(M.hasClass("jstree-open")){I.state="open"}if(M.hasClass("jstree-closed")){I.state="closed"}if(M.data()){I.metadata=M.data()}L=M.children("a");L.each(function(){O=D(this);if(E.length||D.inArray("languages",P.plugins)!==-1||O.children("ins").get(0).style.backgroundImage.length||(O.children("ins").get(0).className&&O.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").length)){F=false;if(D.inArray("languages",P.plugins)!==-1&&D.isArray(P.languages)&&P.languages.length){D.each(P.languages,function(R,S){if(O.hasClass(S)){F=S;return false}})}H={attr:{},title:K.get_text(O,F)};D.each(E,function(R,S){H.attr[S]=(" "+(O.attr(S)||"")).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")});if(D.inArray("languages",P.plugins)!==-1&&D.isArray(P.languages)&&P.languages.length){D.each(P.languages,function(R,S){if(O.hasClass(S)){H.language=S;return true}})}if(O.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length){H.icon=O.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")}if(O.children("ins").get(0).style.backgroundImage.length){H.icon=O.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","")}}else{H=K.get_text(O)}if(L.length>1){I.data.push(H)}else{I.data=H}});M=M.find("> ul > li");if(M.length){I.children=K.get_json(M,G,E,true)}Q.push(I)});return Q}}})})(jQuery);(function(D){D.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(G){var H=this._get_settings().languages,F=false,E=".jstree-"+this.get_index()+" a";if(!D.isArray(H)||H.length===0){return false}if(D.inArray(G,H)==-1){if(!!H[G]){G=H[G]}else{return false}}if(G==this.data.languages.current_language){return true}F=D.vakata.css.get_css(E+"."+this.data.languages.current_language,false,this.data.languages.language_css);if(F!==false){F.style.display="none"}F=D.vakata.css.get_css(E+"."+G,false,this.data.languages.language_css);if(F!==false){F.style.display=""}this.data.languages.current_language=G;this.__callback(G);return true},get_lang:function(){return this.data.languages.current_language},_get_string:function(E,H){var G=this._get_settings().languages,F=this._get_settings().core.strings;if(D.isArray(G)&&G.length){H=(H&&D.inArray(H,G)!=-1)?H:this.data.languages.current_language}if(F[H]&&F[H][E]){return F[H][E]}if(F[E]){return F[E]}return E},get_text:function(G,H){G=this._get_node(G)||this.data.ui.last_selected;if(!G.size()){return false}var F=this._get_settings().languages,E=this._get_settings().core.html_titles;if(D.isArray(F)&&F.length){H=(H&&D.inArray(H,F)!=-1)?H:this.data.languages.current_language;G=G.children("a."+H)}else{G=G.children("a:eq(0)")}if(E){G=G.clone();G.children("INS").remove();return G.html()}else{G=G.contents().filter(function(){return this.nodeType==3})[0];return G.nodeValue}},set_text:function(H,J,I){H=this._get_node(H)||this.data.ui.last_selected;if(!H.size()){return false}var G=this._get_settings().languages,F=this._get_settings().core.html_titles,E;if(D.isArray(G)&&G.length){I=(I&&D.inArray(I,G)!=-1)?I:this.data.languages.current_language;H=H.children("a."+I)}else{H=H.children("a:eq(0)")}if(F){E=H.children("INS").clone();H.html(J).prepend(E);this.__callback({obj:H,name:J,lang:I});return true}else{H=H.contents().filter(function(){return this.nodeType==3})[0];this.__callback({obj:H,name:J,lang:I});return(H.nodeValue=J)}},_load_css:function(){var G=this._get_settings().languages,H="/* languages css */",E=".jstree-"+this.get_index()+" a",F;if(D.isArray(G)&&G.length){this.data.languages.current_language=G[0];for(F=0;F<G.length;F++){H+=E+"."+G[F]+" {";if(G[F]!=this.data.languages.current_language){H+=" display:none; "}H+=" } "}this.data.languages.language_css=D.vakata.css.add_sheet({str:H,title:"jstree-languages"})}},create_node:function(H,E,G,I){var F=this.__call_old(true,H,E,G,function(K){var M=this._get_settings().languages,J=K.children("a"),L;if(D.isArray(M)&&M.length){for(L=0;L<M.length;L++){if(!J.is("."+M[L])){K.append(J.eq(0).clone().removeClass(M.join(" ")).addClass(M[L]))}}J.not("."+M.join(", .")).remove()}if(I){I.call(this,K)}});return F}}})})(jQuery);(function(D){D.jstree.plugin("cookies",{__init:function(){if(typeof D.cookie==="undefined"){throw"jsTree cookie: jQuery cookie plugin not included."}var F=this._get_settings().cookies,E;if(!!F.save_loaded){E=D.cookie(F.save_loaded);if(E&&E.length){this.data.core.to_load=E.split(",")}}if(!!F.save_opened){E=D.cookie(F.save_opened);if(E&&E.length){this.data.core.to_open=E.split(",")}}if(!!F.save_selected){E=D.cookie(F.save_selected);if(E&&E.length&&this.data.ui){this.data.ui.to_select=E.split(",")}}this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",D.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",D.proxy(function(G){if(this._get_settings().cookies.auto_save){this.save_cookie((G.handleObj.namespace+G.handleObj.type).replace("jstree",""))}},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:true,cookie_options:{}},_fn:{save_cookie:function(F){if(this.data.core.refreshing){return }var E=this._get_settings().cookies;if(!F){if(E.save_loaded){this.save_loaded();D.cookie(E.save_loaded,this.data.core.to_load.join(","),E.cookie_options)}if(E.save_opened){this.save_opened();D.cookie(E.save_opened,this.data.core.to_open.join(","),E.cookie_options)}if(E.save_selected&&this.data.ui){this.save_selected();D.cookie(E.save_selected,this.data.ui.to_select.join(","),E.cookie_options)}return }switch(F){case"open_node":case"close_node":if(!!E.save_opened){this.save_opened();D.cookie(E.save_opened,this.data.core.to_open.join(","),E.cookie_options)}if(!!E.save_loaded){this.save_loaded();D.cookie(E.save_loaded,this.data.core.to_load.join(","),E.cookie_options)}break;case"select_node":case"deselect_node":if(!!E.save_selected&&this.data.ui){this.save_selected();D.cookie(E.save_selected,this.data.ui.to_select.join(","),E.cookie_options)}break}}}})})(jQuery);(function(D){D.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",D.proxy(function(G,E){var F=this._get_node(E.rslt.obj);F=F===-1?this.get_container().children("ul"):F.children("ul");this.sort(F)},this)).bind("rename_node.jstree create_node.jstree create.jstree",D.proxy(function(F,E){this.sort(E.rslt.obj.parent())},this)).bind("move_node.jstree",D.proxy(function(G,F){var E=F.rslt.np==-1?this.get_container():F.rslt.np;this.sort(E.children("ul"))},this))},defaults:function(F,E){return this.get_text(F)>this.get_text(E)?1:-1},_fn:{sort:function(G){var F=this._get_settings().sort,E=this;G.append(D.makeArray(G.children("li")).sort(D.proxy(F,E)));G.find("> li > ul").each(function(){E.sort(D(this))});this.clean_node(G)}}})})(jQuery);(function(J){var F=false,D=false,G=false,H=false,K=false,E=false,M=false,L=false,I=false;J.vakata.dnd={is_down:false,is_drag:false,helper:false,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(Q,P,N){if(J.vakata.dnd.is_drag){J.vakata.drag_stop({})}try{Q.currentTarget.unselectable="on";Q.currentTarget.onselectstart=function(){return false};if(Q.currentTarget.style){Q.currentTarget.style.MozUserSelect="none"}}catch(O){}J.vakata.dnd.init_x=Q.pageX;J.vakata.dnd.init_y=Q.pageY;J.vakata.dnd.user_data=P;J.vakata.dnd.is_down=true;J.vakata.dnd.helper=J("<div id='vakata-dragged' />").html(N);J(document).bind("mousemove",J.vakata.dnd.drag);J(document).bind("mouseup",J.vakata.dnd.drag_stop);return false},drag:function(P){if(!J.vakata.dnd.is_down){return }if(!J.vakata.dnd.is_drag){if(Math.abs(P.pageX-J.vakata.dnd.init_x)>5||Math.abs(P.pageY-J.vakata.dnd.init_y)>5){J.vakata.dnd.helper.appendTo("body");J.vakata.dnd.is_drag=true;J(document).triggerHandler("drag_start.vakata",{event:P,data:J.vakata.dnd.user_data})}else{return }}if(P.type==="mousemove"){var Q=J(document),O=Q.scrollTop(),N=Q.scrollLeft();if(P.pageY-O<20){if(E&&M==="down"){clearInterval(E);E=false}if(!E){M="up";E=setInterval(function(){J(document).scrollTop(J(document).scrollTop()-J.vakata.dnd.scroll_spd)},150)}}else{if(E&&M==="up"){clearInterval(E);E=false}}if(J(window).height()-(P.pageY-O)<20){if(E&&M==="up"){clearInterval(E);E=false}if(!E){M="down";E=setInterval(function(){J(document).scrollTop(J(document).scrollTop()+J.vakata.dnd.scroll_spd)},150)}}else{if(E&&M==="down"){clearInterval(E);E=false}}if(P.pageX-N<20){if(K&&L==="right"){clearInterval(K);K=false}if(!K){L="left";K=setInterval(function(){J(document).scrollLeft(J(document).scrollLeft()-J.vakata.dnd.scroll_spd)},150)}}else{if(K&&L==="left"){clearInterval(K);K=false}}if(J(window).width()-(P.pageX-N)<20){if(K&&L==="left"){clearInterval(K);K=false}if(!K){L="right";K=setInterval(function(){J(document).scrollLeft(J(document).scrollLeft()+J.vakata.dnd.scroll_spd)},150)}}else{if(K&&L==="right"){clearInterval(K);K=false}}}J.vakata.dnd.helper.css({left:(P.pageX+J.vakata.dnd.helper_left)+"px",top:(P.pageY+J.vakata.dnd.helper_top)+"px"});J(document).triggerHandler("drag.vakata",{event:P,data:J.vakata.dnd.user_data})},drag_stop:function(N){if(K){clearInterval(K)}if(E){clearInterval(E)}J(document).unbind("mousemove",J.vakata.dnd.drag);J(document).unbind("mouseup",J.vakata.dnd.drag_stop);J(document).triggerHandler("drag_stop.vakata",{event:N,data:J.vakata.dnd.user_data});J.vakata.dnd.helper.remove();J.vakata.dnd.init_x=0;J.vakata.dnd.init_y=0;J.vakata.dnd.user_data={};J.vakata.dnd.is_down=false;J.vakata.dnd.is_drag=false}};J(function(){var N="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";J.vakata.css.add_sheet({str:N,title:"vakata"})});J.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:false,after:false,inside:false,before:false,off:false,prepared:false,w:0,to1:false,to2:false,cof:false,cw:false,ch:false,i1:false,i2:false,mto:false};this.get_container().bind("mouseenter.jstree",J.proxy(function(Q){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){if(this.data.themes){G.attr("class","jstree-"+this.data.themes.theme);if(H){H.attr("class","jstree-"+this.data.themes.theme)}J.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}if(Q.currentTarget===Q.target&&J.vakata.dnd.user_data.obj&&J(J.vakata.dnd.user_data.obj).length&&J(J.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==Q.target){var P=J.jstree._reference(Q.target),O;if(P.data.dnd.foreign){O=P._get_settings().dnd.drag_check.call(this,{o:F,r:P.get_container(),is_root:true});if(O===true||O.inside===true||O.before===true||O.after===true){J.vakata.dnd.helper.children("ins").attr("class","jstree-ok")}}else{P.prepare_move(F,P.get_container(),"last");if(P.check_move()){J.vakata.dnd.helper.children("ins").attr("class","jstree-ok")}}}}},this)).bind("mouseup.jstree",J.proxy(function(Q){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree&&Q.currentTarget===Q.target&&J.vakata.dnd.user_data.obj&&J(J.vakata.dnd.user_data.obj).length&&J(J.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==Q.target){var P=J.jstree._reference(Q.currentTarget),O;if(P.data.dnd.foreign){O=P._get_settings().dnd.drag_check.call(this,{o:F,r:P.get_container(),is_root:true});if(O===true||O.inside===true||O.before===true||O.after===true){P._get_settings().dnd.drag_finish.call(this,{o:F,r:P.get_container(),is_root:true})}}else{P.move_node(F,P.get_container(),"last",Q[P._get_settings().dnd.copy_modifier+"Key"])}}},this)).bind("mouseleave.jstree",J.proxy(function(O){if(O.relatedTarget&&O.relatedTarget.id&&O.relatedTarget.id==="jstree-marker-line"){return false}if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1)}if(this.data.dnd.i2){clearInterval(this.data.dnd.i2)}if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1)}if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2)}if(J.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){J.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")}}},this)).bind("mousemove.jstree",J.proxy(function(P){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){var O=this.get_container()[0];if(P.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1)}this.data.dnd.i1=setInterval(J.proxy(function(){this.scrollLeft+=J.vakata.dnd.scroll_spd},O),100)}else{if(P.pageX-24<this.data.dnd.cof.left){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1)}this.data.dnd.i1=setInterval(J.proxy(function(){this.scrollLeft-=J.vakata.dnd.scroll_spd},O),100)}else{if(this.data.dnd.i1){clearInterval(this.data.dnd.i1)}}}if(P.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2)}this.data.dnd.i2=setInterval(J.proxy(function(){this.scrollTop+=J.vakata.dnd.scroll_spd},O),100)}else{if(P.pageY-24<this.data.dnd.cof.top){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2)}this.data.dnd.i2=setInterval(J.proxy(function(){this.scrollTop-=J.vakata.dnd.scroll_spd},O),100)}else{if(this.data.dnd.i2){clearInterval(this.data.dnd.i2)}}}}},this)).bind("scroll.jstree",J.proxy(function(O){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree&&G&&H){G.hide();H.hide()}},this)).delegate("a","mousedown.jstree",J.proxy(function(O){if(O.which===1){this.start_drag(O.currentTarget,O);return false}},this)).delegate("a","mouseenter.jstree",J.proxy(function(O){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){this.dnd_enter(O.currentTarget)}},this)).delegate("a","mousemove.jstree",J.proxy(function(O){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){if(!D||!D.length||D.children("a")[0]!==O.currentTarget){this.dnd_enter(O.currentTarget)}if(typeof this.data.dnd.off.top==="undefined"){this.data.dnd.off=J(O.target).offset()}this.data.dnd.w=(O.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height;if(this.data.dnd.w<0){this.data.dnd.w+=this.data.core.li_height}this.dnd_show()}},this)).delegate("a","mouseleave.jstree",J.proxy(function(O){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){if(O.relatedTarget&&O.relatedTarget.id&&O.relatedTarget.id==="jstree-marker-line"){return false}if(G){G.hide()}if(H){H.hide()}this.data.dnd.mto=setTimeout((function(P){return function(){P.dnd_leave(O)}})(this),0)}},this)).delegate("a","mouseup.jstree",J.proxy(function(O){if(J.vakata.dnd.is_drag&&J.vakata.dnd.user_data.jstree){this.dnd_finish(O)}},this));J(document).bind("drag_stop.vakata",J.proxy(function(){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1)}if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2)}if(this.data.dnd.i1){clearInterval(this.data.dnd.i1)}if(this.data.dnd.i2){clearInterval(this.data.dnd.i2)}this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;this.data.dnd.off=false;this.data.dnd.prepared=false;this.data.dnd.w=false;this.data.dnd.to1=false;this.data.dnd.to2=false;this.data.dnd.i1=false;this.data.dnd.i2=false;this.data.dnd.active=false;this.data.dnd.foreign=false;if(G){G.css({top:"-2000px"})}if(H){H.css({top:"-2000px"})}},this)).bind("drag_start.vakata",J.proxy(function(Q,O){if(O.data.jstree){var P=J(O.event.target);if(P.closest(".jstree").hasClass("jstree-"+this.get_index())){this.dnd_enter(P)}}},this));var N=this._get_settings().dnd;if(N.drag_target){J(document).delegate(N.drag_target,"mousedown.jstree-"+this.get_index(),J.proxy(function(P){F=P.target;J.vakata.dnd.drag_start(P,{jstree:true,obj:P.target},"<ins class='jstree-icon'></ins>"+J(P.target).text());if(this.data.themes){if(G){G.attr("class","jstree-"+this.data.themes.theme)}if(H){H.attr("class","jstree-"+this.data.themes.theme)}J.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}J.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var O=this.get_container();this.data.dnd.cof=O.offset();this.data.dnd.cw=parseInt(O.width(),10);this.data.dnd.ch=parseInt(O.height(),10);this.data.dnd.foreign=true;P.preventDefault()},this))}if(N.drop_target){J(document).delegate(N.drop_target,"mouseenter.jstree-"+this.get_index(),J.proxy(function(O){if(this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:F,r:J(O.target),e:O})){J.vakata.dnd.helper.children("ins").attr("class","jstree-ok")}},this)).delegate(N.drop_target,"mouseleave.jstree-"+this.get_index(),J.proxy(function(O){if(this.data.dnd.active){J.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")}},this)).delegate(N.drop_target,"mouseup.jstree-"+this.get_index(),J.proxy(function(O){if(this.data.dnd.active&&J.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){this._get_settings().dnd.drop_finish.call(this,{o:F,r:J(O.target),e:O})}},this))}},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(N){return true},drop_finish:J.noop,drag_target:".jstree-draggable",drag_finish:J.noop,drag_check:function(N){return{after:false,before:false,inside:true}}},_fn:{dnd_prepare:function(){if(!D||!D.length){return }this.data.dnd.off=D.offset();if(this._get_settings().core.rtl){this.data.dnd.off.right=this.data.dnd.off.left+D.width()}if(this.data.dnd.foreign){var N=this._get_settings().dnd.drag_check.call(this,{o:F,r:D});this.data.dnd.after=N.after;this.data.dnd.before=N.before;this.data.dnd.inside=N.inside;this.data.dnd.prepared=true;return this.dnd_show()}this.prepare_move(F,D,"before");this.data.dnd.before=this.check_move();this.prepare_move(F,D,"after");this.data.dnd.after=this.check_move();if(this._is_loaded(D)){this.prepare_move(F,D,"inside");this.data.dnd.inside=this.check_move()}else{this.data.dnd.inside=false}this.data.dnd.prepared=true;return this.dnd_show()},dnd_show:function(){if(!this.data.dnd.prepared){return }var P=["before","inside","after"],N=false,O=this._get_settings().core.rtl,Q;if(this.data.dnd.w<this.data.core.li_height/3){P=["before","inside","after"]}else{if(this.data.dnd.w<=this.data.core.li_height*2/3){P=this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]}else{P=["after","inside","before"]}}J.each(P,J.proxy(function(R,S){if(this.data.dnd[S]){J.vakata.dnd.helper.children("ins").attr("class","jstree-ok");N=S;return false}},this));if(N===false){J.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")}Q=O?(this.data.dnd.off.right-18):(this.data.dnd.off.left+10);switch(N){case"before":G.css({left:Q+"px",top:(this.data.dnd.off.top-6)+"px"}).show();if(H){H.css({left:(Q+8)+"px",top:(this.data.dnd.off.top-1)+"px"}).show()}break;case"after":G.css({left:Q+"px",top:(this.data.dnd.off.top+this.data.core.li_height-6)+"px"}).show();if(H){H.css({left:(Q+8)+"px",top:(this.data.dnd.off.top+this.data.core.li_height-1)+"px"}).show()}break;case"inside":G.css({left:Q+(O?-4:4)+"px",top:(this.data.dnd.off.top+this.data.core.li_height/2-5)+"px"}).show();if(H){H.hide()}break;default:G.hide();if(H){H.hide()}break}I=N;return N},dnd_open:function(){this.data.dnd.to2=false;this.open_node(D,J.proxy(this.dnd_prepare,this),true)},dnd_finish:function(N){if(this.data.dnd.foreign){if(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside){this._get_settings().dnd.drag_finish.call(this,{o:F,r:D,p:I})}}else{this.dnd_prepare();this.move_node(F,D,I,N[this._get_settings().dnd.copy_modifier+"Key"])}F=false;D=false;G.hide();if(H){H.hide()}},dnd_enter:function(O){if(this.data.dnd.mto){clearTimeout(this.data.dnd.mto);this.data.dnd.mto=false}var N=this._get_settings().dnd;this.data.dnd.prepared=false;D=this._get_node(O);if(N.check_timeout){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1)}this.data.dnd.to1=setTimeout(J.proxy(this.dnd_prepare,this),N.check_timeout)}else{this.dnd_prepare()}if(N.open_timeout){if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2)}if(D&&D.length&&D.hasClass("jstree-closed")){this.data.dnd.to2=setTimeout(J.proxy(this.dnd_open,this),N.open_timeout)}}else{if(D&&D.length&&D.hasClass("jstree-closed")){this.dnd_open()}}},dnd_leave:function(N){this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;J.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");G.hide();if(H){H.hide()}if(D&&D[0]===N.target.parentNode){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);this.data.dnd.to1=false}if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);this.data.dnd.to2=false}}},start_drag:function(Q,P){F=this._get_node(Q);if(this.data.ui&&this.is_selected(F)){F=this._get_node(null,true)}var O=F.length>1?this._get_string("multiple_selection"):this.get_text(F),N=this.get_container();if(!this._get_settings().core.html_titles){O=O.replace(/</ig,"<").replace(/>/ig,">")}J.vakata.dnd.drag_start(P,{jstree:true,obj:F},"<ins class='jstree-icon'></ins>"+O);if(this.data.themes){if(G){G.attr("class","jstree-"+this.data.themes.theme)}if(H){H.attr("class","jstree-"+this.data.themes.theme)}J.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}this.data.dnd.cof=N.offset();this.data.dnd.cw=parseInt(N.width(),10);this.data.dnd.ch=parseInt(N.height(),10);this.data.dnd.active=true}}});J(function(){var N="#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";J.vakata.css.add_sheet({str:N,title:"jstree"});G=J("<div />").attr({id:"jstree-marker"}).hide().html("»").bind("mouseleave mouseenter",function(O){G.hide();H.hide();O.preventDefault();O.stopImmediatePropagation();return false}).appendTo("body");H=J("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(O){if(D&&D.length){D.children("a").trigger(O);O.preventDefault();O.stopImmediatePropagation();return false}}).bind("mouseleave",function(P){var O=J(P.relatedTarget);if(O.is(".jstree")||O.closest(".jstree").length===0){if(D&&D.length){D.children("a").trigger(P);G.hide();H.hide();P.preventDefault();P.stopImmediatePropagation();return false}}}).appendTo("body");J(document).bind("drag_start.vakata",function(P,O){if(O.data.jstree){G.show();if(H){H.show()}}});J(document).bind("drag_stop.vakata",function(P,O){if(O.data.jstree){G.hide();if(H){H.hide()}}})})})(jQuery);(function(D){D.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=D.noop;this.get_selected=this.get_checked}this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",D.proxy(function(F,E){this._prepare_checkboxes(E.rslt.obj)},this)).bind("loaded.jstree",D.proxy(function(E){this._prepare_checkboxes()},this)).delegate((this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox"),"click.jstree",D.proxy(function(E){E.preventDefault();if(this._get_node(E.target).hasClass("jstree-checked")){this.uncheck_node(E.target)}else{this.check_node(E.target)}if(this.data.ui&&this.data.checkbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node")}}else{E.stopImmediatePropagation();return false}},this))},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(E){return[("check_"+(E[0].id||Math.ceil(Math.random()*10000))),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(F,E){if(E.checked){this.check_node(F,false)}},_prepare_checkboxes:function(I){I=!I||I==-1?this.get_container().find("> ul > li"):this._get_node(I);if(I===false){return }var K,J=this,E,G=this._get_settings().checkbox.two_state,H=this._get_settings().checkbox.real_checkboxes,F=this._get_settings().checkbox.real_checkboxes_names;I.each(function(){E=D(this);K=E.is("li")&&(E.hasClass("jstree-checked")||(H&&E.children(":checked").length))?"jstree-checked":"jstree-unchecked";E.find("li").andSelf().each(function(){var M=D(this),L;M.children("a"+(J.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(G?"jstree-unchecked":K);if(H){if(!M.children(":checkbox").length){L=F.call(J,M);M.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+L[0]+"' name='"+L[0]+"' value='"+L[1]+"' />")}else{M.children(":checkbox").addClass("jstree-real-checkbox")}}if(!G){if(K==="jstree-checked"||M.hasClass("jstree-checked")||M.children(":checked").length){M.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",true)}}else{if(M.hasClass("jstree-checked")||M.children(":checked").length){M.addClass("jstree-checked").children(":checkbox").prop("checked",true)}}})});if(!G){I.find(".jstree-checked").parent().parent().each(function(){J._repair_state(this)})}},change_state:function(H,G){H=this._get_node(H);var E=false,F=this._get_settings().checkbox.real_checkboxes;if(!H||H===-1){return false}G=(G===false||G===true)?G:H.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(G){H.removeClass("jstree-checked").addClass("jstree-unchecked");if(F){H.children(":checkbox").prop("checked",false)}}else{H.removeClass("jstree-unchecked").addClass("jstree-checked");if(F){H.children(":checkbox").prop("checked",true)}}}else{if(G){E=H.find("li").andSelf();if(!E.filter(".jstree-checked, .jstree-undetermined").length){return false}E.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(F){E.children(":checkbox").prop("checked",false)}}else{E=H.find("li").andSelf();if(!E.filter(".jstree-unchecked, .jstree-undetermined").length){return false}E.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(F){E.children(":checkbox").prop("checked",true)}if(this.data.ui){this.data.ui.last_selected=H}this.data.checkbox.last_selected=H}H.parentsUntil(".jstree","li").each(function(){var I=D(this);if(G){if(I.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){I.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(F){I.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}return false}else{I.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(F){I.children(":checkbox").prop("checked",false)}}}else{if(I.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){I.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(F){I.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}return false}else{I.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(F){I.children(":checkbox").prop("checked",true)}}}})}if(this.data.ui&&this.data.checkbox.noui){this.data.ui.selected=this.get_checked()}this.__callback(H);return true},check_node:function(F){if(this.change_state(F,false)){F=this._get_node(F);if(this._get_settings().checkbox.checked_parent_open){var E=this;F.parents(".jstree-closed").each(function(){E.open_node(this,false,true)})}this.__callback({obj:F})}},uncheck_node:function(E){if(this.change_state(E,true)){this.__callback({obj:this._get_node(E)})}},check_all:function(){var F=this,E=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");E.each(function(){F.change_state(this,false)});this.__callback()},uncheck_all:function(){var F=this,E=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");E.each(function(){F.change_state(this,true)});this.__callback()},is_checked:function(E){E=this._get_node(E);return E.length?E.is(".jstree-checked"):false},get_checked:function(F,E){F=!F||F===-1?this.get_container():this._get_node(F);return E||this._get_settings().checkbox.two_state?F.find(".jstree-checked"):F.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(F,E){F=!F||F===-1?this.get_container():this._get_node(F);return E||this._get_settings().checkbox.two_state?F.find(".jstree-unchecked"):F.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(H){H=this._get_node(H);if(!H.length){return }if(this._get_settings().checkbox.two_state){H.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",true);return }var G=this._get_settings().checkbox.real_checkboxes,F=H.find("> ul > .jstree-checked").length,E=H.find("> ul > .jstree-undetermined").length,I=H.find("> ul > li").length;if(I===0){if(H.hasClass("jstree-undetermined")){this.change_state(H,false)}}else{if(F===0&&E===0){this.change_state(H,true)}else{if(F===I){this.change_state(H,false)}else{H.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(G){H.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}}}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var F=this,E=this.data.ui.to_select;E=D.map(D.makeArray(E),function(G){return"#"+G.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});this.deselect_all();D.each(E,function(G,H){F.check_node(H)});this.__callback()}else{this.__call_old()}},save_loaded:function(){var E=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){E.data.core.to_load.push("#"+this.id)}})}}});D(function(){var E=".jstree .jstree-real-checkbox { display:none; } ";D.vakata.css.add_sheet({str:E,title:"jstree"})})})(jQuery);(function(F){F.vakata.xslt=function(I,J,N){var G="",M,H,L,K;if(document.recalc){M=document.createElement("xml");H=document.createElement("xml");M.innerHTML=I;H.innerHTML=J;F("body").append(M).append(H);setTimeout((function(P,O,Q){return function(){Q.call(null,P.transformNode(O.XMLDocument));setTimeout((function(S,R){return function(){F(S).remove();F(R).remove()}})(P,O),200)}})(M,H,N),100);return true}if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor==="undefined"){I=new DOMParser().parseFromString(I,"text/xml");J=new DOMParser().parseFromString(J,"text/xml")}if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor!=="undefined"){L=new XSLTProcessor();K=F.isFunction(L.transformDocument)?(typeof window.XMLSerializer!=="undefined"):true;if(!K){return false}I=new DOMParser().parseFromString(I,"text/xml");J=new DOMParser().parseFromString(J,"text/xml");if(F.isFunction(L.transformDocument)){G=document.implementation.createDocument("","",null);L.transformDocument(I,J,G,null);N.call(null,new XMLSerializer().serializeToString(G));return true}else{L.importStylesheet(J);G=L.transformToFragment(I,document);N.call(null,F("<div />").append(G).html());return true}}return false};var E={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="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) > 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text> </xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <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> <xsl:text> </xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </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="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) > 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text> </xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <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> <xsl:text> </xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'},D=function(G){return G.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};F.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false,get_include_preamble:true},_fn:{load_node:function(I,G,H){var J=this;this.load_node_xml(I,function(){J.__callback({obj:J._get_node(I)});G.call(this)},H)},_is_loaded:function(H){var G=this._get_settings().xml_data;H=this._get_node(H);return H==-1||!H||(!G.ajax&&!F.isFunction(G.data))||H.is(".jstree-open, .jstree-leaf")||H.children("ul").children("li").size()>0},load_node_xml:function(K,G,I){var J=this.get_settings().xml_data,H=function(){},L=function(){};K=this._get_node(K);if(K&&K!==-1){if(K.data("jstree_is_loading")){return }else{K.data("jstree_is_loading",true)}}switch(!0){case (!J.data&&!J.ajax):throw"Neither data nor ajax settings supplied.";case (F.isFunction(J.data)):J.data.call(this,K,F.proxy(function(M){this.parse_xml(M,F.proxy(function(N){if(N){N=N.replace(/ ?xmlns="[^"]*"/ig,"");if(N.length>10){N=F(N);if(K===-1||!K){this.get_container().children("ul").empty().append(N.children())}else{K.children("a.jstree-loading").removeClass("jstree-loading");K.append(N);K.removeData("jstree_is_loading")}if(J.clean_node){this.clean_node(K)}if(G){G.call(this)}}else{if(K&&K!==-1){K.children("a.jstree-loading").removeClass("jstree-loading");K.removeData("jstree_is_loading");if(J.correct_state){this.correct_state(K);if(G){G.call(this)}}}else{if(J.correct_state){this.get_container().children("ul").empty();if(G){G.call(this)}}}}}},this))},this));break;case (!!J.data&&!J.ajax)||(!!J.data&&!!J.ajax&&(!K||K===-1)):if(!K||K==-1){this.parse_xml(J.data,F.proxy(function(M){if(M){M=M.replace(/ ?xmlns="[^"]*"/ig,"");if(M.length>10){M=F(M);this.get_container().children("ul").empty().append(M.children());if(J.clean_node){this.clean_node(K)}if(G){G.call(this)}}}else{if(J.correct_state){this.get_container().children("ul").empty();if(G){G.call(this)}}}},this))}break;case (!J.data&&!!J.ajax)||(!!J.data&&!!J.ajax&&K&&K!==-1):H=function(N,O,P){var M=this.get_settings().xml_data.ajax.error;if(M){M.call(this,N,O,P)}if(K!==-1&&K.length){K.children("a.jstree-loading").removeClass("jstree-loading");K.removeData("jstree_is_loading");if(O==="success"&&J.correct_state){this.correct_state(K)}}else{if(O==="success"&&J.correct_state){this.get_container().children("ul").empty()}}if(I){I.call(this)}};L=function(P,N,M){P=M.responseText;var O=this.get_settings().xml_data.ajax.success;if(O){P=O.call(this,P,N,M)||P}if(P===""||(P&&P.toString&&P.toString().replace(/^[\s\n]+$/,"")==="")){return H.call(this,M,N,"")}this.parse_xml(P,F.proxy(function(Q){if(Q){Q=Q.replace(/ ?xmlns="[^"]*"/ig,"");if(Q.length>10){Q=F(Q);if(K===-1||!K){this.get_container().children("ul").empty().append(Q.children())}else{K.children("a.jstree-loading").removeClass("jstree-loading");K.append(Q);K.removeData("jstree_is_loading")}if(J.clean_node){this.clean_node(K)}if(G){G.call(this)}}else{if(K&&K!==-1){K.children("a.jstree-loading").removeClass("jstree-loading");K.removeData("jstree_is_loading");if(J.correct_state){this.correct_state(K);if(G){G.call(this)}}}else{if(J.correct_state){this.get_container().children("ul").empty();if(G){G.call(this)}}}}}},this))};J.ajax.context=this;J.ajax.error=H;J.ajax.success=L;if(!J.ajax.dataType){J.ajax.dataType="xml"}if(F.isFunction(J.ajax.url)){J.ajax.url=J.ajax.url.call(this,K)}if(F.isFunction(J.ajax.data)){J.ajax.data=J.ajax.data.call(this,K)}F.ajax(J.ajax);break}},parse_xml:function(G,I){var H=this._get_settings().xml_data;F.vakata.xslt(G,E[H.xsl],I)},get_xml:function(O,L,I,G,Q){var S="",R=this._get_settings(),M=this,K,J,P,N,H;if(!O){O="flat"}if(!Q){Q=0}L=this._get_node(L);if(!L||L===-1){L=this.get_container().find("> ul > li")}I=F.isArray(I)?I:["id","class"];if(!Q&&this.data.types&&F.inArray(R.types.type_attr,I)===-1){I.push(R.types.type_attr)}G=F.isArray(G)?G:[];if(!Q){if(R.xml_data.get_include_preamble){S+='<?xml version="1.0" encoding="UTF-8"?>'}S+="<root>"}L.each(function(){S+="<item";P=F(this);F.each(I,function(V,T){var U=P.attr(T);if(!R.xml_data.get_skip_empty||typeof U!=="undefined"){S+=" "+T+'="'+D((" "+(U||"")).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+'"'}});if(P.hasClass("jstree-open")){S+=' state="open"'}if(P.hasClass("jstree-closed")){S+=' state="closed"'}if(O==="flat"){S+=' parent_id="'+D(Q)+'"'}S+=">";S+="<content>";N=P.children("a");N.each(function(){K=F(this);H=false;S+="<name";if(F.inArray("languages",R.plugins)!==-1){F.each(R.languages,function(T,U){if(K.hasClass(U)){S+=' lang="'+D(U)+'"';H=U;return false}})}if(G.length){F.each(G,function(T,V){var U=K.attr(V);if(!R.xml_data.get_skip_empty||typeof U!=="undefined"){S+=" "+V+'="'+D((" "+U||"").replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+'"'}})}if(K.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length){S+=' icon="'+D(K.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+'"'}if(K.children("ins").get(0).style.backgroundImage.length){S+=' icon="'+D(K.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/ig,"").replace(/"/ig,""))+'"'}S+=">";S+="<![CDATA["+M.get_text(K,H)+"]]>";S+="</name>"});S+="</content>";J=P[0].id||true;P=P.find("> ul > li");if(P.length){J=M.get_xml(O,P,I,G,J)}else{J=""}if(O=="nest"){S+=J}S+="</item>";if(O=="flat"){S+=J}});if(!Q){S+="</root>"}return S}}})})(jQuery);(function(D){D.expr[":"].jstree_contains=function(F,G,E){return(F.textContent||F.innerText||"").toLowerCase().indexOf(E[3].toLowerCase())>=0};D.expr[":"].jstree_title_contains=function(F,G,E){return(F.getAttribute("title")||"").toLowerCase().indexOf(E[3].toLowerCase())>=0};D.jstree.plugin("search",{__init:function(){this.data.search.str="";this.data.search.result=D();if(this._get_settings().search.show_only_matches){this.get_container().bind("search.jstree",function(F,E){D(this).children("ul").find("li").hide().removeClass("jstree-last");E.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){D(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){D(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})}},defaults:{ajax:false,search_method:"jstree_contains",show_only_matches:false},_fn:{search:function(J,E){if(D.trim(J)===""){this.clear_search();return }var H=this.get_settings().search,G=this,F=function(){},I=function(){};this.data.search.str=J;if(!E&&H.ajax!==false&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0){this.search.supress_callback=true;F=function(){};I=function(N,L,K){var M=this.get_settings().search.ajax.success;if(M){N=M.call(this,N,L,K)||N}this.data.search.to_open=N;this._search_open()};H.ajax.context=this;H.ajax.error=F;H.ajax.success=I;if(D.isFunction(H.ajax.url)){H.ajax.url=H.ajax.url.call(this,J)}if(D.isFunction(H.ajax.data)){H.ajax.data=H.ajax.data.call(this,J)}if(!H.ajax.data){H.ajax.data={search_string:J}}if(!H.ajax.dataType||/^json/.exec(H.ajax.dataType)){H.ajax.dataType="json"}D.ajax(H.ajax);return }if(this.data.search.result.length){this.clear_search()}this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+(H.search_method)+"("+this.data.search.str+")");this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){G.open_node(this,false,true)});this.__callback({nodes:this.data.search.result,str:J})},clear_search:function(E){this.data.search.result.removeClass("jstree-search");this.__callback(this.data.search.result);this.data.search.result=D()},_search_open:function(F){var I=this,E=true,H=[],G=[];if(this.data.search.to_open.length){D.each(this.data.search.to_open,function(J,K){if(K=="#"){return true}if(D(K).length&&D(K).is(".jstree-closed")){H.push(K)}else{G.push(K)}});if(H.length){this.data.search.to_open=G;D.each(H,function(J,K){I.open_node(K,function(){I._search_open(true)})});E=false}}if(E){this.search(this.data.search.str,true)}}}})})(jQuery);(function(D){D.vakata.context={hide_on_mouseleave:false,cnt:D("<div id='vakata-contextmenu' />"),vis:false,tgt:false,par:false,func:false,data:false,rtl:false,show:function(N,M,K,I,H,E,J){D.vakata.context.rtl=!!J;var G=D.vakata.context.parse(N),F,L;if(!G){return }D.vakata.context.vis=true;D.vakata.context.tgt=M;D.vakata.context.par=E||M||null;D.vakata.context.data=H||null;D.vakata.context.cnt.html(G).css({visibility:"hidden",display:"block",left:0,top:0});if(D.vakata.context.hide_on_mouseleave){D.vakata.context.cnt.one("mouseleave",function(O){D.vakata.context.hide()})}F=D.vakata.context.cnt.height();L=D.vakata.context.cnt.width();if(K+L>D(document).width()){K=D(document).width()-(L+5);D.vakata.context.cnt.find("li > ul").addClass("right")}if(I+F>D(document).height()){I=I-(F+M[0].offsetHeight);D.vakata.context.cnt.find("li > ul").addClass("bottom")}D.vakata.context.cnt.css({left:K,top:I}).find("li:has(ul)").bind("mouseenter",function(R){var O=D(document).width(),Q=D(document).height(),P=D(this).children("ul").show();if(O!==D(document).width()){P.toggleClass("right")}if(Q!==D(document).height()){P.toggleClass("bottom")}}).bind("mouseleave",function(O){D(this).children("ul").hide()}).end().css({visibility:"visible"}).show();D(document).triggerHandler("context_show.vakata")},hide:function(){D.vakata.context.vis=false;D.vakata.context.cnt.attr("class","").css({visibility:"hidden"});D(document).triggerHandler("context_hide.vakata")},parse:function(H,G){if(!H){return false}var I="",F=false,E=true;if(!G){D.vakata.context.func={}}I+="<ul>";D.each(H,function(J,K){if(!K){return true}D.vakata.context.func[J]=K.action;if(!E&&K.separator_before){I+="<li class='vakata-separator vakata-separator-before'></li>"}E=false;I+="<li class='"+(K._class||"")+(K._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ";if(K.icon&&K.icon.indexOf("/")===-1){I+=" class='"+K.icon+"' "}if(K.icon&&K.icon.indexOf("/")!==-1){I+=" style='background:url("+K.icon+") center center no-repeat;' "}I+="> </ins><a href='#' rel='"+J+"'>";if(K.submenu){I+="<span style='float:"+(D.vakata.context.rtl?"left":"right")+";'>»</span>"}I+=K.label+"</a>";if(K.submenu){F=D.vakata.context.parse(K.submenu,true);if(F){I+=F}}I+="</li>";if(K.separator_after){I+="<li class='vakata-separator vakata-separator-after'></li>";E=true}});I=I.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,"");I+="</ul>";D(document).triggerHandler("context_parse.vakata");return I.length>10?I:false},exec:function(E){if(D.isFunction(D.vakata.context.func[E])){D.vakata.context.func[E].call(D.vakata.context.data,D.vakata.context.par);return true}else{return false}}};D(function(){var E="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ";D.vakata.css.add_sheet({str:E,title:"vakata"});D.vakata.context.cnt.delegate("a","click",function(F){F.preventDefault()}).delegate("a","mouseup",function(F){if(!D(this).parent().hasClass("jstree-contextmenu-disabled")&&D.vakata.context.exec(D(this).attr("rel"))){D.vakata.context.hide()}else{D(this).blur()}}).delegate("a","mouseover",function(){D.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body");D(document).bind("mousedown",function(F){if(D.vakata.context.vis&&!D.contains(D.vakata.context.cnt[0],F.target)){D.vakata.context.hide()}});if(typeof D.hotkeys!=="undefined"){D(document).bind("keydown","up",function(F){if(D.vakata.context.vis){var G=D.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();if(!G.length){G=D.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()}G.addClass("vakata-hover");F.stopImmediatePropagation();F.preventDefault()}}).bind("keydown","down",function(F){if(D.vakata.context.vis){var G=D.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();if(!G.length){G=D.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()}G.addClass("vakata-hover");F.stopImmediatePropagation();F.preventDefault()}}).bind("keydown","right",function(F){if(D.vakata.context.vis){D.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");F.stopImmediatePropagation();F.preventDefault()}}).bind("keydown","left",function(F){if(D.vakata.context.vis){D.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");F.stopImmediatePropagation();F.preventDefault()}}).bind("keydown","esc",function(F){D.vakata.context.hide();F.preventDefault()}).bind("keydown","space",function(F){D.vakata.context.cnt.find(".vakata-hover").last().children("a").click();F.preventDefault()})}});D.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",D.proxy(function(E){E.preventDefault();if(!D(E.currentTarget).hasClass("jstree-loading")){this.show_contextmenu(E.currentTarget,E.pageX,E.pageY)}},this)).delegate("a","click.jstree",D.proxy(function(E){if(this.data.contextmenu){D.vakata.context.hide()}},this)).bind("destroy.jstree",D.proxy(function(){if(this.data.contextmenu){D.vakata.context.hide()}},this));D(document).bind("context_hide.vakata",D.proxy(function(){this.data.contextmenu=false},this))},defaults:{select_node:false,show_at_node:true,items:{create:{separator_before:false,separator_after:true,label:"Create",action:function(E){this.create(E)}},rename:{separator_before:false,separator_after:false,label:"Rename",action:function(E){this.rename(E)}},remove:{separator_before:false,icon:false,separator_after:false,label:"Delete",action:function(E){if(this.is_selected(E)){this.remove()}else{this.remove(E)}}},ccp:{separator_before:true,icon:false,separator_after:false,label:"Edit",action:false,submenu:{cut:{separator_before:false,separator_after:false,label:"Cut",action:function(E){this.cut(E)}},copy:{separator_before:false,icon:false,separator_after:false,label:"Copy",action:function(E){this.copy(E)}},paste:{separator_before:false,icon:false,separator_after:false,label:"Paste",action:function(E){this.paste(E)}}}}}},_fn:{show_contextmenu:function(I,E,K){I=this._get_node(I);var H=this.get_settings().contextmenu,F=I.children("a:visible:eq(0)"),J=false,G=false;if(H.select_node&&this.data.ui&&!this.is_selected(I)){this.deselect_all();this.select_node(I,true)}if(H.show_at_node||typeof E==="undefined"||typeof K==="undefined"){J=F.offset();E=J.left;K=J.top+this.data.core.li_height}G=I.data("jstree")&&I.data("jstree").contextmenu?I.data("jstree").contextmenu:H.items;if(D.isFunction(G)){G=G.call(this,I)}this.data.contextmenu=true;D.vakata.context.show(G,F,E,K,this,I,this._get_settings().core.rtl);if(this.data.themes){D.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}}})})(jQuery);(function(D){D.jstree.plugin("types",{__init:function(){var E=this._get_settings().types;this.data.types.attach_to=[];this.get_container().bind("init.jstree",D.proxy(function(){var H=E.types,G=E.type_attr,F="",I=this;D.each(H,function(J,K){D.each(K,function(M,L){if(!/^(max_depth|max_children|icon|valid_children)$/.test(M)){I.data.types.attach_to.push(M)}});if(!K.icon){return true}if(K.icon.image||K.icon.position){if(J=="default"){F+=".jstree-"+I.get_index()+" a > .jstree-icon { "}else{F+=".jstree-"+I.get_index()+" li["+G+'="'+J+'"] > a > .jstree-icon { '}if(K.icon.image){F+=" background-image:url("+K.icon.image+"); "}if(K.icon.position){F+=" background-position:"+K.icon.position+"; "}else{F+=" background-position:0 0; "}F+="} "}});if(F!==""){D.vakata.css.add_sheet({str:F,title:"jstree-types"})}},this)).bind("before.jstree",D.proxy(function(I,H){var G,F,K=this._get_settings().types.use_data?this._get_node(H.args[0]):false,J=K&&K!==-1&&K.length?K.data("jstree"):false;if(J&&J.types&&J.types[H.func]===false){I.stopImmediatePropagation();return false}if(D.inArray(H.func,this.data.types.attach_to)!==-1){if(!H.args[0]||(!H.args[0].tagName&&!H.args[0].jquery)){return }G=this._get_settings().types.types;F=this._get_type(H.args[0]);if(((G[F]&&typeof G[F][H.func]!=="undefined")||(G["default"]&&typeof G["default"][H.func]!=="undefined"))&&this._check(H.func,H.args[0])===false){I.stopImmediatePropagation();return false}}},this));if(C){this.get_container().bind("load_node.jstree set_type.jstree",D.proxy(function(I,H){var G=H&&H.rslt&&H.rslt.obj&&H.rslt.obj!==-1?this._get_node(H.rslt.obj).parent():this.get_container_ul(),J=false,F=this._get_settings().types;D.each(F.types,function(K,L){if(L.icon&&(L.icon.image||L.icon.position)){J=K==="default"?G.find("li > a > .jstree-icon"):G.find("li["+F.type_attr+"='"+K+"'] > a > .jstree-icon");if(L.icon.image){J.css("backgroundImage","url("+L.icon.image+")")}J.css("backgroundPosition",L.icon.position||"0 0")}})},this))}},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:false,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(F,E){if(E.type&&this._get_settings().types.use_data){this.set_type(E.type,F)}},_get_type:function(E){E=this._get_node(E);return(!E||!E.length)?false:E.attr(this._get_settings().types.type_attr)||"default"},set_type:function(G,F){F=this._get_node(F);var E=(!F.length||!G)?false:F.attr(this._get_settings().types.type_attr,G);if(E){this.__callback({obj:F,type:G})}return E},_check:function(J,G,E){G=this._get_node(G);var K=false,L=this._get_type(G),I=0,H=this,M=this._get_settings().types,F=false;if(G===-1){if(!!M[J]){K=M[J]}else{return }}else{if(L===false){return }F=M.use_data?G.data("jstree"):false;if(F&&F.types&&typeof F.types[J]!=="undefined"){K=F.types[J]}else{if(!!M.types[L]&&typeof M.types[L][J]!=="undefined"){K=M.types[L][J]}else{if(!!M.types["default"]&&typeof M.types["default"][J]!=="undefined"){K=M.types["default"][J]}}}}if(D.isFunction(K)){K=K.call(this,G)}if(J==="max_depth"&&G!==-1&&E!==false&&M.max_depth!==-2&&K!==0){G.children("a:eq(0)").parentsUntil(".jstree","li").each(function(N){if(M.max_depth!==-1&&M.max_depth-(N+1)<=0){K=0;return false}I=(N===0)?K:H._check(J,this,false);if(I!==-1&&I-(N+1)<=0){K=0;return false}if(I>=0&&(I-(N+1)<K||K<0)){K=I-(N+1)}if(M.max_depth>=0&&(M.max_depth-(N+1)<K||K<0)){K=M.max_depth-(N+1)}})}return K},check_move:function(){if(!this.__call_old()){return false}var E=this._get_move(),I=E.rt._get_settings().types,K=E.rt._check("max_children",E.cr),J=E.rt._check("max_depth",E.cr),G=E.rt._check("valid_children",E.cr),H=0,L=1,F;if(G==="none"){return false}if(D.isArray(G)&&E.ot&&E.ot._get_type){E.o.each(function(){if(D.inArray(E.ot._get_type(this),G)===-1){L=false;return false}});if(L===false){return false}}if(I.max_children!==-2&&K!==-1){H=E.cr===-1?this.get_container().find("> ul > li").not(E.o).length:E.cr.find("> ul > li").not(E.o).length;if(H+E.o.length>K){return false}}if(I.max_depth!==-2&&J!==-1){L=0;if(J===0){return false}if(typeof E.o.d==="undefined"){F=E.o;while(F.length>0){F=F.find("> ul > li");L++}E.o.d=L}if(J-E.o.d<0){return false}}return true},create_node:function(H,I,F,O,K,N){if(!N&&(K||this._is_loaded(H))){var G=(typeof I=="string"&&I.match(/^before|after$/i)&&H!==-1)?this._get_parent(H):this._get_node(H),P=this._get_settings().types,M=this._check("max_children",G),L=this._check("max_depth",G),J=this._check("valid_children",G),E;if(typeof F==="string"){F={data:F}}if(!F){F={}}if(J==="none"){return false}if(D.isArray(J)){if(!F.attr||!F.attr[P.type_attr]){if(!F.attr){F.attr={}}F.attr[P.type_attr]=J[0]}else{if(D.inArray(F.attr[P.type_attr],J)===-1){return false}}}if(P.max_children!==-2&&M!==-1){E=G===-1?this.get_container().find("> ul > li").length:G.find("> ul > li").length;if(E+1>M){return false}}if(P.max_depth!==-2&&L!==-1&&(L-1)<0){return false}}return this.__call_old(true,H,I,F,O,K,N)}}})})(jQuery);(function(D){D.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(G,E,F){var H=this;this.load_node_html(G,function(){H.__callback({obj:H._get_node(G)});E.call(this)},F)},_is_loaded:function(E){E=this._get_node(E);return E==-1||!E||(!this._get_settings().html_data.ajax&&!D.isFunction(this._get_settings().html_data.data))||E.is(".jstree-open, .jstree-leaf")||E.children("ul").children("li").size()>0},load_node_html:function(I,E,G){var K,H=this.get_settings().html_data,F=function(){},J=function(){};I=this._get_node(I);if(I&&I!==-1){if(I.data("jstree_is_loading")){return }else{I.data("jstree_is_loading",true)}}switch(!0){case (D.isFunction(H.data)):H.data.call(this,I,D.proxy(function(L){if(L&&L!==""&&L.toString&&L.toString().replace(/^[\s\n]+$/,"")!==""){L=D(L);if(!L.is("ul")){L=D("<ul />").append(L)}if(I==-1||!I){this.get_container().children("ul").empty().append(L.children()).find("li, a").filter(function(){return !this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon")}else{I.children("a.jstree-loading").removeClass("jstree-loading");I.append(L).children("ul").find("li, a").filter(function(){return !this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");I.removeData("jstree_is_loading")}this.clean_node(I);if(E){E.call(this)}}else{if(I&&I!==-1){I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(H.correct_state){this.correct_state(I);if(E){E.call(this)}}}else{if(H.correct_state){this.get_container().children("ul").empty();if(E){E.call(this)}}}}},this));break;case (!H.data&&!H.ajax):if(!I||I==-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'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node()}if(E){E.call(this)}break;case (!!H.data&&!H.ajax)||(!!H.data&&!!H.ajax&&(!I||I===-1)):if(!I||I==-1){K=D(H.data);if(!K.is("ul")){K=D("<ul />").append(K)}this.get_container().children("ul").empty().append(K.children()).find("li, a").filter(function(){return !this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node()}if(E){E.call(this)}break;case (!H.data&&!!H.ajax)||(!!H.data&&!!H.ajax&&I&&I!==-1):I=this._get_node(I);F=function(M,N,O){var L=this.get_settings().html_data.ajax.error;if(L){L.call(this,M,N,O)}if(I!=-1&&I.length){I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(N==="success"&&H.correct_state){this.correct_state(I)}}else{if(N==="success"&&H.correct_state){this.get_container().children("ul").empty()}}if(G){G.call(this)}};J=function(O,M,L){var N=this.get_settings().html_data.ajax.success;if(N){O=N.call(this,O,M,L)||O}if(O===""||(O&&O.toString&&O.toString().replace(/^[\s\n]+$/,"")==="")){return F.call(this,L,M,"")}if(O){O=D(O);if(!O.is("ul")){O=D("<ul />").append(O)}if(I==-1||!I){this.get_container().children("ul").empty().append(O.children()).find("li, a").filter(function(){return !this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon")}else{I.children("a.jstree-loading").removeClass("jstree-loading");I.append(O).children("ul").find("li, a").filter(function(){return !this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");I.removeData("jstree_is_loading")}this.clean_node(I);if(E){E.call(this)}}else{if(I&&I!==-1){I.children("a.jstree-loading").removeClass("jstree-loading");I.removeData("jstree_is_loading");if(H.correct_state){this.correct_state(I);if(E){E.call(this)}}}else{if(H.correct_state){this.get_container().children("ul").empty();if(E){E.call(this)}}}}};H.ajax.context=this;H.ajax.error=F;H.ajax.success=J;if(!H.ajax.dataType){H.ajax.dataType="html"}if(D.isFunction(H.ajax.url)){H.ajax.url=H.ajax.url.call(this,I)}if(D.isFunction(H.ajax.data)){H.ajax.data=H.ajax.data.call(this,I)}D.ajax(H.ajax);break}}}});D.jstree.defaults.plugins.push("html_data")})(jQuery);(function(D){D.jstree.plugin("themeroller",{__init:function(){var E=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(F){if(!D(F.currentTarget).hasClass("jstree-loading")){D(this).addClass(E.item_h)}}).delegate("a","mouseleave.jstree",function(){D(this).removeClass(E.item_h)}).bind("init.jstree",D.proxy(function(G,F){F.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");this._themeroller(F.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",D.proxy(function(G,F){this._themeroller(F.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",D.proxy(function(F){this._themeroller()},this)).bind("close_node.jstree",D.proxy(function(G,F){this._themeroller(F.rslt.obj)},this)).bind("delete_node.jstree",D.proxy(function(G,F){this._themeroller(F.rslt.parent)},this)).bind("correct_state.jstree",D.proxy(function(G,F){F.rslt.obj.children("ins.jstree-icon").removeClass(E.opened+" "+E.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return this.className.toString().replace(E.item_clsd,"").replace(E.item_open,"").replace(E.item_leaf,"").indexOf("ui-icon-")===-1}).removeClass(E.item_open+" "+E.item_clsd).addClass(E.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",D.proxy(function(G,F){F.rslt.obj.children("a").addClass(E.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",D.proxy(function(G,F){this.get_container().find("a."+E.item_a).removeClass(E.item_a).end().find("a.jstree-clicked").addClass(E.item_a)},this)).bind("dehover_node.jstree",D.proxy(function(G,F){F.rslt.obj.children("a").removeClass(E.item_h)},this)).bind("hover_node.jstree",D.proxy(function(G,F){this.get_container().find("a."+E.item_h).not(F.rslt.obj).removeClass(E.item_h);F.rslt.obj.children("a").addClass(E.item_h)},this)).bind("move_node.jstree",D.proxy(function(G,F){this._themeroller(F.rslt.o);this._themeroller(F.rslt.op)},this))},__destroy:function(){var E=this._get_settings().themeroller,F=["ui-icon"];D.each(E,function(H,G){G=G.split(" ");if(G.length){F=F.concat(G)}});this.get_container().removeClass("ui-widget-content").find("."+F.join(", .")).removeClass(F.join(" "))},_fn:{_themeroller:function(F){var E=this._get_settings().themeroller;F=!F||F==-1?this.get_container_ul():this._get_node(F).parent();F.find("li.jstree-closed").children("ins.jstree-icon").removeClass(E.opened).addClass("ui-icon "+E.closed).end().children("a").addClass(E.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(E.item_clsd,"").replace(E.item_open,"").replace(E.item_leaf,"").indexOf("ui-icon-")===-1}).removeClass(E.item_leaf+" "+E.item_open).addClass(E.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(E.closed).addClass("ui-icon "+E.opened).end().children("a").addClass(E.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(E.item_clsd,"").replace(E.item_open,"").replace(E.item_leaf,"").indexOf("ui-icon-")===-1}).removeClass(E.item_leaf+" "+E.item_clsd).addClass(E.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(E.closed+" ui-icon "+E.opened).end().children("a").addClass(E.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(E.item_clsd,"").replace(E.item_open,"").replace(E.item_leaf,"").indexOf("ui-icon-")===-1}).removeClass(E.item_clsd+" "+E.item_open).addClass(E.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}});D(function(){var E=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";D.vakata.css.add_sheet({str:E,title:"jstree"})})})(jQuery);(function(D){D.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",D.proxy(function(J,H){var E=[],G=true,I,F;if(H.func=="move_node"){if(H.args[4]===true){if(H.args[0].o&&H.args[0].o.length){H.args[0].o.children("a").each(function(){E.push(D(this).text().replace(/^\s+/g,""))});G=this._check_unique(E,H.args[0].np.find("> ul > li").not(H.args[0].o),"move_node")}}}if(H.func=="create_node"){if(H.args[4]||this._is_loaded(H.args[0])){I=this._get_node(H.args[0]);if(H.args[1]&&(H.args[1]==="before"||H.args[1]==="after")){I=this._get_parent(H.args[0]);if(!I||I===-1){I=this.get_container()}}if(typeof H.args[2]==="string"){E.push(H.args[2])}else{if(!H.args[2]||!H.args[2].data){E.push(this._get_string("new_node"))}else{E.push(H.args[2].data)}}G=this._check_unique(E,I.find("> ul > li"),"create_node")}}if(H.func=="rename_node"){E.push(H.args[1]);F=this._get_node(H.args[0]);I=this._get_parent(F);if(!I||I===-1){I=this.get_container()}G=this._check_unique(E,I.find("> ul > li").not(F),"rename_node")}if(!G){J.stopPropagation();return false}},this))},defaults:{error_callback:D.noop},_fn:{_check_unique:function(F,H,G){var E=[];H.children("a").each(function(){E.push(D(this).text().replace(/^\s+/g,""))});if(!E.length||!F.length){return true}E=E.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");if((E.length+F.length)!=E.concat(F).sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",").length){this._get_settings().unique.error_callback.call(null,F,H,G);return false}return true},check_move:function(){if(!this.__call_old()){return false}var F=this._get_move(),E=[];if(F.o&&F.o.length){F.o.children("a").each(function(){E.push(D(this).text().replace(/^\s+/g,""))});return this._check_unique(E,F.np.find("> ul > li").not(F.o),"check_move")}return true}}})})(jQuery);(function(D){D.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui){throw"jsTree wholerow: jsTree UI plugin not included."}this.data.wholerow.html=false;this.data.wholerow.to=false;this.get_container().bind("init.jstree",D.proxy(function(F,E){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",D.proxy(function(F,E){this._prepare_wholerow_span(E&&E.rslt&&E.rslt.obj?E.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",D.proxy(function(F,E){if(this.data.to){clearTimeout(this.data.to)}this.data.to=setTimeout((function(G,H){return function(){G._prepare_wholerow_ul(H)}})(this,E&&E.rslt&&E.rslt.obj?E.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",D.proxy(function(F,E){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",D.proxy(function(F,E){E.rslt.obj.each(function(){var G=E.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt(((D(this).offset().top-E.inst.get_container().offset().top+E.inst.get_container()[0].scrollTop)/E.inst.data.core.li_height),10))+")");G.children("a").attr("class",E.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",D.proxy(function(G,F){this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:""));if(G.type==="hover_node"){var E=this.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt(((F.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height),10))+")");E.children("a").attr("class",F.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(E){var F=D(E.currentTarget);if(E.target.tagName==="A"||(E.target.tagName==="INS"&&F.closest("li").is(".jstree-open, .jstree-closed"))){return }F.closest("li").children("a:visible:eq(0)").click();E.stopImmediatePropagation()}).delegate("li","mouseover.jstree",D.proxy(function(E){E.stopImmediatePropagation();if(D(E.currentTarget).children(".jstree-hovered, .jstree-clicked").length){return false}this.hover_node(E.currentTarget);return false},this)).delegate("li","mouseleave.jstree",D.proxy(function(E){if(D(E.currentTarget).children("a").hasClass("jstree-hovered").length){return }this.dehover_node(E.currentTarget)},this));if(B||C){D.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})}},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove();this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(E){E=!E||E==-1?this.get_container().find("> ul > li"):this._get_node(E);if(E===false){return }E.each(function(){D(this).find("li").andSelf().each(function(){var F=D(this);if(F.children(".jstree-wholerow-span").length){return true}F.prepend("<span class='jstree-wholerow-span' style='width:"+(F.parentsUntil(".jstree","li").length*18)+"px;'> </span>")})})},_prepare_wholerow_ul:function(){var F=this.get_container().children("ul").eq(0),E=F.html();F.addClass("jstree-wholerow-real");if(this.data.wholerow.last_html!==E){this.data.wholerow.last_html=E;this.get_container().children(".jstree-wholerow").remove();this.get_container().append(F.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(F.parent()[0].scrollWidth).css("top",(F.height()+(B?5:0))*-1).find("li[id]").each(function(){this.removeAttribute("id")}).end())}}}});D(function(){var E=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";if(A){E+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "}if(B||C){E+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "}D.vakata.css.add_sheet({str:E,title:"jstree"})})})(jQuery);(function(D){var E=["getChildren","getChildrenCount","getAttr","getName","getProps"],F=function(I,G){var H=true;I=I||{};G=[].concat(G);D.each(G,function(K,J){if(!D.isFunction(I[J])){H=false;return false}});return H};D.jstree.plugin("model",{__init:function(){if(!this.data.json_data){throw"jsTree model: jsTree json_data plugin not included."}this._get_settings().json_data.data=function(I,G){var H=(I==-1)?this._get_settings().model.object:I.data("jstree_model");if(!F(H,E)){return G.call(null,false)}if(this._get_settings().model.async){H.getChildren(D.proxy(function(J){this.model_done(J,G)},this))}else{this.model_done(H.getChildren(),G)}}},defaults:{object:false,id_prefix:false,async:false},_fn:{model_done:function(I,K){var G=[],H=this._get_settings(),J=this;if(!D.isArray(I)){I=[I]}D.each(I,function(L,N){var M=N.getProps()||{};M.attr=N.getAttr()||{};if(N.getChildrenCount()){M.state="closed"}M.data=N.getName();if(!D.isArray(M.data)){M.data=[M.data]}if(J.data.types&&D.isFunction(N.getType)){M.attr[H.types.type_attr]=N.getType()}if(M.attr.id&&H.model.id_prefix){M.attr.id=H.model.id_prefix+M.attr.id}if(!M.metadata){M.metadata={}}M.metadata.jstree_model=N;G.push(M)});K.call(null,G)}}})})(jQuery)})();