(function () { if (!jQuery || !jQuery.jstree) { var r = !1, s = !1, t = !1; (function (b) { b.vakata = {}; b.vakata.css = { get_css: function (a, b, c) { a = a.toLowerCase(); var e = c.cssRules || c.rules, d = 0; do { if (e.length && d > e.length + 5) break; if (e[d].selectorText && e[d].selectorText.toLowerCase() == a) return !0 === b ? (c.removeRule && c.removeRule(d), c.deleteRule && c.deleteRule(d), !0) : e[d] } while (e[++d]); return !1 }, add_css: function (a, c) { if (b.jstree.css.get_css(a, !1, c)) return !1; c.insertRule ? c.insertRule(a + " { }", 0) : c.addRule(a, null, 0); return b.vakata.css.get_css(a) }, remove_css: function (a, c) { return b.vakata.css.get_css(a, !0, c) }, add_sheet: function (a) { var c = !1, e = !0; if (a.str) return a.title && (c = b("style[id='" + a.title + "-stylesheet']")[0]), c ? e = !1 : (c = document.createElement("style"), c.setAttribute("type", "text/css"), a.title && c.setAttribute("id", a.title + "-stylesheet")), c.styleSheet ? e ? (document.getElementsByTagName("head")[0].appendChild(c), c.styleSheet.cssText = a.str) : c.styleSheet.cssText = c.styleSheet.cssText + " " + a.str : (c.appendChild(document.createTextNode(a.str)), document.getElementsByTagName("head")[0].appendChild(c)), c.sheet || c.styleSheet; if (a.url) if (document.createStyleSheet) try { document.createStyleSheet(a.url) } catch (d) { } else return c = document.createElement("link"), c.rel = "stylesheet", c.type = "text/css", c.media = "all", c.href = a.url, document.getElementsByTagName("head")[0].appendChild(c), c.styleSheet } }; var a = [], c = -1, d = {}, e = {}; b.fn.jstree = function (f) { var c = "string" == typeof f, e = Array.prototype.slice.call(arguments, 1), h = this; if (c) { if ("_" == f.substring(0, 1)) return h; this.each(function () { var c = a[b.data(this, "jstree_instance_id")], c = c && b.isFunction(c[f]) ? c[f].apply(c, e) : c; if ("undefined" !== typeof c && (0 === f.indexOf("is_") || !0 !== c && !1 !== c)) return h = c, !1 }) } else this.each(function () { var c = b.data(this, "jstree_instance_id"), g = [], h = f ? b.extend({}, !0, f) : {}, n = b(this), q = !1, u = [], g = g.concat(e); n.data("jstree") && g.push(n.data("jstree")); h = g.length ? b.extend.apply(null, [!0, h].concat(g)) : h; "undefined" !== typeof c && a[c] && a[c].destroy(); c = parseInt(a.push({}), 10) - 1; b.data(this, "jstree_instance_id", c); h.plugins = b.isArray(h.plugins) ? h.plugins : b.jstree.defaults.plugins.slice(); h.plugins.unshift("core"); h.plugins = h.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g, "$1$2$4").replace(/,,+/g, ",").replace(/,$/, "").split(","); q = b.extend(!0, {}, b.jstree.defaults, h); q.plugins = h.plugins; b.each(d, function (a, f) { -1 === b.inArray(a, q.plugins) ? (q[a] = null, delete q[a]) : u.push(a) }); q.plugins = u; a[c] = new b.jstree._instance(c, b(this).addClass("jstree jstree-" + c), q); b.each(a[c]._get_settings().plugins, function (b, f) { a[c].data[f] = {} }); b.each(a[c]._get_settings().plugins, function (b, f) { d[f] && d[f].__init.apply(a[c]) }); setTimeout(function () { a[c] && a[c].init() }, 0) }); return h }; b.jstree = { defaults: { plugins: [] }, _focused: function () { return a[c] || null }, _reference: function (f) { if (a[f]) return a[f]; var c = b(f); c.length || "string" !== typeof f || (c = b("#" + f)); return c.length ? a[c.closest(".jstree").data("jstree_instance_id")] || null : null }, _instance: function (a, c, e) { this.data = { core: {} }; this.get_settings = function () { return b.extend(!0, {}, e) }; this._get_settings = function () { return e }; this.get_index = function () { return a }; this.get_container = function () { return c }; this.get_container_ul = function () { return c.children("ul:eq(0)") }; this._set_settings = function (a) { e = b.extend(!0, {}, e, a) } }, _fn: {}, plugin: function (a, c) { c = b.extend({}, { __init: b.noop, __destroy: b.noop, _fn: {}, defaults: !1 }, c); d[a] = c; b.jstree.defaults[a] = c.defaults; b.each(c._fn, function (c, e) { e.plugin = a; e.old = b.jstree._fn[c]; b.jstree._fn[c] = function () { var a, f = e, d = Array.prototype.slice.call(arguments); a = new b.Event("before.jstree"); var g = !1; if (!0 !== this.data.core.locked || "unlock" === c || "is_locked" === c) { do { if (f && f.plugin && -1 !== b.inArray(f.plugin, this._get_settings().plugins)) break; f = f.old } while (f); if (f) { if (0 === c.indexOf("_")) a = f.apply(this, d); else { a = this.get_container().triggerHandler(a, { func: c, inst: this, args: d, plugin: f.plugin }); if (!1 === a) return; "undefined" !== typeof a && (d = a); a = f.apply(b.extend({}, this, { __callback: function (a) { this.get_container().triggerHandler(c + ".jstree", { inst: this, args: d, rslt: a, rlbk: g }) }, __rollback: function () { return g = this.get_rollback() }, __call_old: function (a) { return f.old.apply(this, a ? Array.prototype.slice.call(arguments, 1) : d) } }), d) } return a } } }; b.jstree._fn[c].old = e.old; b.jstree._fn[c].plugin = a }) }, rollback: function (f) { f && (b.isArray(f) || (f = [f]), b.each(f, function (b, f) { a[f.i].set_rollback(f.h, f.d) })) } }; b.jstree._fn = b.jstree._instance.prototype = {}; b(function () { var a = navigator.userAgent.toLowerCase(), c = (a.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1], e = ".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(a) && 6 == parseInt(c, 10)) { r = !0; try { document.execCommand("BackgroundImageCache", !1, !0) } catch (d) { } e += ".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; } " } /msie/.test(a) && 7 == parseInt(c, 10) && (s = !0, e += ".jstree li a { border-width:0 !important; padding:0px 2px !important; } "); !/compatible/.test(a) && /mozilla/.test(a) && 1.9 > parseFloat(c, 10) && (t = !0, e += ".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; } "); b.vakata.css.add_sheet({ str: e, title: "jstree" }) }); b.jstree.plugin("core", { __init: function () { this.data.core.locked = !1; 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: !1, animation: 500, initially_open: [], initially_load: [], open_parents: !0, notify_plugins: !0, rtl: !1, load_open: !1, strings: { loading: "Loading ...", new_node: "New node", multiple_selection: "Multiple selection" } }, _fn: { init: function () { this.set_focus(); this._get_settings().core.rtl && this.get_container().addClass("jstree-rtl").css("direction", "rtl"); this.get_container().html(""); 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", b.proxy(function (a) { a = b(a.target); this.toggle_node(a) }, this)).bind("mousedown.jstree", b.proxy(function () { this.set_focus() }, this)).bind("dblclick.jstree", function (a) { if (document.selection && document.selection.empty) document.selection.empty(); else if (window.getSelection) { a = window.getSelection(); try { a.removeAllRanges(), a.collapse() } catch (b) { } } }); this._get_settings().core.notify_plugins && this.get_container().bind("load_node.jstree", b.proxy(function (a, c) { var e = this._get_node(c.rslt.obj), d = this; -1 === e && (e = this.get_container_ul()); e.length && e.find("li").each(function () { var a = b(this); a.data("jstree") && b.each(a.data("jstree"), function (c, f) { d.data[c] && b.isFunction(d["_" + c + "_notify"]) && d["_" + c + "_notify"].call(d, a, f) }) }) }, this)); this._get_settings().core.load_open && this.get_container().bind("load_node.jstree", b.proxy(function (a, c) { var e = this._get_node(c.rslt.obj), d = this; -1 === e && (e = this.get_container_ul()); e.length && e.find("li.jstree-open:not(:has(ul))").each(function () { d.load_node(this, b.noop, b.noop) }) }, this)); this.__callback(); this.load_node(-1, function () { this.loaded(); this.reload_nodes() }) }, destroy: function () { var f, e = this.get_index(), l = this._get_settings(), h = this; b.each(l.plugins, function (a, b) { try { d[b].__destroy.apply(h) } catch (c) { } }); this.__callback(); if (this.is_focused()) for (f in a) if (a.hasOwnProperty(f) && f != e) { a[f].set_focus(); break } e === c && (c = -1); this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").addBack().attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig, "") }); b(document).unbind(".jstree-" + e).undelegate(".jstree-" + e); a[e] = null; delete a[e] }, _core_notify: function (a, b) { b.opened && this.open_node(a, !1, !0) }, lock: function () { this.data.core.locked = !0; this.get_container().children("ul").addClass("jstree-locked").css("opacity", "0.7"); this.__callback({}) }, unlock: function () { this.data.core.locked = !1; this.get_container().children("ul").removeClass("jstree-locked").css("opacity", "1"); this.__callback({}) }, is_locked: function () { return this.data.core.locked }, save_opened: function () { var a = this; this.data.core.to_open = []; this.get_container_ul().find("li.jstree-open").each(function () { this.id && a.data.core.to_open.push("#" + this.id.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:")) }); this.__callback(a.data.core.to_open) }, save_loaded: function () { }, reload_nodes: function (a) { var c = this, e = !0, d = [], m = []; a || (this.data.core.reopen = !1, this.data.core.refreshing = !0, this.data.core.to_open = b.map(b.makeArray(this.data.core.to_open), function (a) { return "#" + a.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:") }), this.data.core.to_load = b.map(b.makeArray(this.data.core.to_load), function (a) { return "#" + a.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:") }), this.data.core.to_open.length && (this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open))); this.data.core.to_load.length && (b.each(this.data.core.to_load, function (a, c) { if ("#" == c) return !0; b(c).length ? d.push(c) : m.push(c) }), d.length && (this.data.core.to_load = m, b.each(d, function (a, b) { c._is_loaded(b) || (c.load_node(b, function () { c.reload_nodes(!0) }, function () { c.reload_nodes(!0) }), e = !1) }))); this.data.core.to_open.length && b.each(this.data.core.to_open, function (a, b) { c.open_node(b, !1, !0) }); e && (this.data.core.reopen && clearTimeout(this.data.core.reopen), this.data.core.reopen = setTimeout(function () { c.__callback({}, c) }, 50), this.data.core.refreshing = !1, this.reopen()) }, reopen: function () { var a = this; this.data.core.to_open.length && b.each(this.data.core.to_open, function (b, c) { a.open_node(c, !1, !0) }); this.__callback({}) }, refresh: function (a) { var b = this; this.save_opened(); a || (a = -1); (a = this._get_node(a)) || (a = -1); -1 !== a ? a.children("UL").remove() : this.get_container_ul().empty(); this.load_node(a, function () { b.__callback({ obj: a }); b.reload_nodes() }) }, loaded: function () { this.__callback() }, set_focus: function () { if (!this.is_focused()) { var a = b.jstree._focused(); a && a.unset_focus(); this.get_container().addClass("jstree-focused"); c = this.get_index(); this.__callback() } }, is_focused: function () { return c == this.get_index() }, unset_focus: function () { this.is_focused() && (this.get_container().removeClass("jstree-focused"), c = -1); this.__callback() }, _get_node: function (a) { var c = b(a, this.get_container()); if (c.is(".jstree") || -1 == a) return -1; c = c.closest("li", this.get_container()); return c.length ? c : !1 }, _get_next: function (a, b) { a = this._get_node(a); return -1 === a ? this.get_container().find("> ul > li:first-child") : a.length ? b ? 0 < a.nextAll("li").size() ? a.nextAll("li:eq(0)") : !1 : a.hasClass("jstree-open") ? a.find("li:eq(0)") : 0 < a.nextAll("li").size() ? a.nextAll("li:eq(0)") : a.parentsUntil(".jstree", "li").next("li").eq(0) : !1 }, _get_prev: function (a, b) { a = this._get_node(a); if (-1 === a) return this.get_container().find("> ul > li:last-child"); if (!a.length) return !1; if (b) return 0 < a.prevAll("li").length ? a.prevAll("li:eq(0)") : !1; if (a.prev("li").length) { for (a = a.prev("li").eq(0) ; a.hasClass("jstree-open") ;) a = a.children("ul:eq(0)").children("li:last"); return a } var c = a.parentsUntil(".jstree", "li:eq(0)"); return c.length ? c : !1 }, _get_parent: function (a) { a = this._get_node(a); if (-1 == a || !a.length) return !1; a = a.parentsUntil(".jstree", "li:eq(0)"); return a.length ? a : -1 }, _get_children: function (a) { a = this._get_node(a); return -1 === a ? this.get_container().children("ul:eq(0)").children("li") : a.length ? a.children("ul:eq(0)").children("li") : !1 }, get_path: function (a, b) { var c = [], e = this; a = this._get_node(a); if (-1 === a || !a || !a.length) return !1; a.parentsUntil(".jstree", "li").each(function () { c.push(b ? this.id : e.get_text(this)) }); c.reverse(); c.push(b ? a.attr("id") : this.get_text(a)); return c }, _get_string: function (a) { return this._get_settings().core.strings[a] || a }, is_open: function (a) { return (a = this._get_node(a)) && -1 !== a && a.hasClass("jstree-open") }, is_closed: function (a) { return (a = this._get_node(a)) && -1 !== a && a.hasClass("jstree-closed") }, is_leaf: function (a) { return (a = this._get_node(a)) && -1 !== a && a.hasClass("jstree-leaf") }, correct_state: function (a) { a = this._get_node(a); if (!a || -1 === a) return !1; a.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(); this.__callback({ obj: a }) }, open_node: function (a, b, c) { a = this._get_node(a); if (!a.length) return !1; if (!a.hasClass("jstree-closed")) return b && b.call(), !1; var e = c || r ? 0 : this._get_settings().core.animation, d = this; this._is_loaded(a) ? (this._get_settings().core.open_parents && a.parentsUntil(".jstree", ".jstree-closed").each(function () { d.open_node(this, !1, !0) }), e && a.children("ul").css("display", "none"), a.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"), e ? a.children("ul").stop(!0, !0).slideDown(e, function () { this.style.display = ""; d.after_open(a) }) : d.after_open(a), this.__callback({ obj: a }), b && b.call()) : (a.children("a").addClass("jstree-loading"), this.load_node(a, function () { d.open_node(a, b, c) }, b)) }, after_open: function (a) { this.__callback({ obj: a }) }, close_node: function (a, b) { a = this._get_node(a); var c = b || r ? 0 : this._get_settings().core.animation, e = this; if (!a.length || !a.hasClass("jstree-open")) return !1; c && a.children("ul").attr("style", "display:block !important"); a.removeClass("jstree-open").addClass("jstree-closed"); c ? a.children("ul").stop(!0, !0).slideUp(c, function () { this.style.display = ""; e.after_close(a) }) : e.after_close(a); this.__callback({ obj: a }) }, after_close: function (a) { this.__callback({ obj: a }) }, toggle_node: function (a) { a = this._get_node(a); if (a.hasClass("jstree-closed")) return this.open_node(a); if (a.hasClass("jstree-open")) return this.close_node(a) }, open_all: function (a, b, c) { (a = a ? this._get_node(a) : -1) && -1 !== a || (a = this.get_container_ul()); c ? a = a.find("li.jstree-closed") : (c = a, a = a.is(".jstree-closed") ? a.find("li.jstree-closed").addBack() : a.find("li.jstree-closed")); var e = this; a.each(function () { var a = this; e._is_loaded(this) ? e.open_node(this, !1, !b) : e.open_node(this, function () { e.open_all(a, b, c) }, !b) }); 0 === c.find("li.jstree-closed").length && this.__callback({ obj: c }) }, close_all: function (a, b) { var c = this; (a = a ? this._get_node(a) : this.get_container()) && -1 !== a || (a = this.get_container_ul()); a.find("li.jstree-open").addBack().each(function () { c.close_node(this, !b) }); this.__callback({ obj: a }) }, clean_node: function (a) { a = a && -1 != a ? b(a) : this.get_container_ul(); a = a.is("li") ? a.find("li").addBack() : a.find("li"); a.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"); a.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(); this.__callback({ obj: a }) }, get_rollback: function () { this.__callback(); return { i: this.get_index(), h: this.get_container().children("ul").clone(!0), d: this.data } }, set_rollback: function (a, b) { this.get_container().empty().append(a); this.data = b; this.__callback() }, load_node: function (a, b, c) { this.__callback({ obj: a }) }, _is_loaded: function (a) { return !0 }, create_node: function (a, c, e, d, m) { a = this._get_node(a); c = "undefined" === typeof c ? "last" : c; var k = b("
  • "), p = this._get_settings().core, n; if (-1 !== a && !a.length) return !1; if (!m && !this._is_loaded(a)) return this.load_node(a, function () { this.create_node(a, c, e, d, !0) }), !1; this.__rollback(); "string" === typeof e && (e = { data: e }); e || (e = {}); e.attr && k.attr(e.attr); e.metadata && k.data(e.metadata); e.state && k.addClass("jstree-" + e.state); e.data || (e.data = this._get_string("new_node")); b.isArray(e.data) || (n = e.data, e.data = [], e.data.push(n)); b.each(e.data, function (a, c) { n = b(""); b.isFunction(c) && (c = c.call(this, e)); if ("string" == typeof c) n.attr("href", "#")[p.html_titles ? "html" : "text"](c); else c.attr || (c.attr = {}), c.attr.href || (c.attr.href = "#"), n.attr(c.attr)[p.html_titles ? "html" : "text"](c.title), c.language && n.addClass(c.language); n.prepend(" "); !c.icon && e.icon && (c.icon = e.icon); c.icon && (-1 === c.icon.indexOf("/") ? n.children("ins").addClass(c.icon) : n.children("ins").css("background", "url('" + c.icon + "') center center no-repeat")); k.append(n) }); k.prepend(" "); -1 === a && (a = this.get_container(), "before" === c && (c = "first"), "after" === c && (c = "last")); switch (c) { case "before": a.before(k); n = this._get_parent(a); break; case "after": a.after(k); n = this._get_parent(a); break; case "inside": case "first": a.children("ul").length || a.append("