1//# sourceMappingURL=bootstrap-treeview.js.map 2var process=process||{env:{NODE_ENV:"development"}}; 3(function(d,k,l,f){var m={injectStyle:!0,levels:2,expandIcon:"glyphicon glyphicon-plus",collapseIcon:"glyphicon glyphicon-minus",emptyIcon:"glyphicon",nodeIcon:"",selectedIcon:"",checkedIcon:"glyphicon glyphicon-check",uncheckedIcon:"glyphicon glyphicon-unchecked",color:f,backColor:f,borderColor:f,onhoverColor:"#F5F5F5",selectedColor:"#FFFFFF",selectedBackColor:"#428bca",searchResultColor:"#D9534F",searchResultBackColor:f,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0, 4showIcon:!0,showCheckbox:!1,showTags:!1,multiSelect:!1,onNodeChecked:f,onNodeCollapsed:f,onNodeDisabled:f,onNodeEnabled:f,onNodeExpanded:f,onNodeSelected:f,onNodeUnchecked:f,onNodeUnselected:f,onSearchComplete:f,onSearchCleared:f};var h={silent:!1,ignoreChildren:!1};var n={ignoreCase:!0,exactMatch:!1,revealResults:!0};var c=function(a,b){this.$element=d(a);this.elementId=a.id;this.styleId=this.elementId+"-style";this.init(b);return{options:this.options,init:d.proxy(this.init,this),remove:d.proxy(this.remove, 5this),getNode:d.proxy(this.getNode,this),getParent:d.proxy(this.getParent,this),getSiblings:d.proxy(this.getSiblings,this),getSelected:d.proxy(this.getSelected,this),getUnselected:d.proxy(this.getUnselected,this),getExpanded:d.proxy(this.getExpanded,this),getCollapsed:d.proxy(this.getCollapsed,this),getChecked:d.proxy(this.getChecked,this),getUnchecked:d.proxy(this.getUnchecked,this),getDisabled:d.proxy(this.getDisabled,this),getEnabled:d.proxy(this.getEnabled,this),selectNode:d.proxy(this.selectNode, 6this),unselectNode:d.proxy(this.unselectNode,this),toggleNodeSelected:d.proxy(this.toggleNodeSelected,this),collapseAll:d.proxy(this.collapseAll,this),collapseNode:d.proxy(this.collapseNode,this),expandAll:d.proxy(this.expandAll,this),expandNode:d.proxy(this.expandNode,this),toggleNodeExpanded:d.proxy(this.toggleNodeExpanded,this),revealNode:d.proxy(this.revealNode,this),checkAll:d.proxy(this.checkAll,this),checkNode:d.proxy(this.checkNode,this),uncheckAll:d.proxy(this.uncheckAll,this),uncheckNode:d.proxy(this.uncheckNode, 7this),toggleNodeChecked:d.proxy(this.toggleNodeChecked,this),disableAll:d.proxy(this.disableAll,this),disableNode:d.proxy(this.disableNode,this),enableAll:d.proxy(this.enableAll,this),enableNode:d.proxy(this.enableNode,this),toggleNodeDisabled:d.proxy(this.toggleNodeDisabled,this),search:d.proxy(this.search,this),clearSearch:d.proxy(this.clearSearch,this)}};c.prototype.init=function(a){this.tree=[];this.nodes=[];a.data&&("string"===typeof a.data&&(a.data=d.parseJSON(a.data)),this.tree=d.extend(!0, 8[],a.data),delete a.data);this.options=d.extend({},m,a);this.destroy();this.subscribeEvents();this.setInitialStates({nodes:this.tree},0);this.render()};c.prototype.remove=function(){this.destroy();d.removeData(this,"treeview");d("#"+this.styleId).remove()};c.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)};c.prototype.unsubscribeEvents=function(){this.$element.off("click");this.$element.off("nodeChecked");this.$element.off("nodeCollapsed"); 9this.$element.off("nodeDisabled");this.$element.off("nodeEnabled");this.$element.off("nodeExpanded");this.$element.off("nodeSelected");this.$element.off("nodeUnchecked");this.$element.off("nodeUnselected");this.$element.off("searchComplete");this.$element.off("searchCleared")};c.prototype.subscribeEvents=function(){this.unsubscribeEvents();this.$element.on("click",d.proxy(this.clickHandler,this));if("function"===typeof this.options.onNodeChecked)this.$element.on("nodeChecked",this.options.onNodeChecked); 10if("function"===typeof this.options.onNodeCollapsed)this.$element.on("nodeCollapsed",this.options.onNodeCollapsed);if("function"===typeof this.options.onNodeDisabled)this.$element.on("nodeDisabled",this.options.onNodeDisabled);if("function"===typeof this.options.onNodeEnabled)this.$element.on("nodeEnabled",this.options.onNodeEnabled);if("function"===typeof this.options.onNodeExpanded)this.$element.on("nodeExpanded",this.options.onNodeExpanded);if("function"===typeof this.options.onNodeSelected)this.$element.on("nodeSelected", 11this.options.onNodeSelected);if("function"===typeof this.options.onNodeUnchecked)this.$element.on("node
11Unchecked",this.options.onNodeUnchecked);if("function"===typeof this.options.onNodeUnselected)this.$element.on("nodeUnselected",this.options.onNodeUnselected);if("function"===typeof this.options.onSearchComplete)this.$element.on("searchComplete",this.options.onSearchComplete);if("function"===typeof this.options.onSearchCleared)this.$element.on("searchCleared",this.options.onSearchCleared)};c.prototype.setInitialStates= 12function(a,b){if(a.nodes){b+=1;var e=this;d.each(a.nodes,function(d,c){c.nodeId=e.nodes.length;c.parentId=a.nodeId;c.hasOwnProperty("selectable")||(c.selectable=!0);c.state=c.state||{};c.state.hasOwnProperty("checked")||(c.state.checked=!1);c.state.hasOwnProperty("disabled")||(c.state.disabled=!1);c.state.hasOwnProperty("expanded")||(c.state.expanded=!c.state.disabled&&b<e.options.levels&&c.nodes&&0<c.nodes.length?!0:!1);c.state.hasOwnProperty("selected")||(c.state.selected=!1);e.nodes.push(c);c.nodes&& 13e.setInitialStates(c,b)})}};c.prototype.clickHandler=function(a){this.options.enableLinks||a.preventDefault();var b=d(a.target);(a=this.findNode(b))&&!a.state.disabled&&(b=b.attr("class")?b.attr("class").split(" "):[],-1!==b.indexOf("expand-icon")?this.toggleExpandedState(a,h):-1!==b.indexOf("check-icon")?this.toggleCheckedState(a,h):a.selectable?this.toggleSelectedState(a,h):this.toggleExpandedState(a,h),this.render())};c.prototype.findNode=function(a){a=a.closest("li.list-group-item").attr("data-nodeid"); 14(a=this.nodes[a])||console.log("Error: node does not exist");return a};c.prototype.toggleExpandedState=function(a,b){a&&this.setExpandedState(a,!a.state.expanded,b)};c.prototype.setExpandedState=function(a,b,e){b!==a.state.expanded&&(b&&a.nodes?(a.state.expanded=!0,e.silent||this.$element.trigger("nodeExpanded",d.extend(!0,{},a))):b||(a.state.expanded=!1,e.silent||this.$element.trigger("nodeCollapsed",d.extend(!0,{},a)),a.nodes&&!e.ignoreChildren&&d.each(a.nodes,d.proxy(function(a,b){this.setExpandedState(b, 15!1,e)},this))))};c.prototype.toggleSelectedState=function(a,b){a&&this.setSelectedState(a,!a.state.selected,b)};c.prototype.setSelectedState=function(a,b,e){b!==a.state.selected&&(b?(this.options.multiSelect||d.each(this.findNodes("true","g","state.selected"),d.proxy(function(a,b){this.setSelectedState(b,!1,e)},this)),a.state.selected=!0,e.silent||this.$element.trigger("nodeSelected",d.extend(!0,{},a))):(a.state.selected=!1,e.silent||this.$element.trigger("nodeUnselected",d.extend(!0,{},a))))};c.prototype.toggleCheckedState= 16function(a,b){a&&this.setCheckedState(a,!a.state.checked,b)};c.prototype.setCheckedState=function(a,b,e){b!==a.state.checked&&(b?(a.state.checked=!0,e.silent||this.$element.trigger("nodeChecked",d.extend(!0,{},a))):(a.state.checked=!1,e.silent||this.$element.trigger("nodeUnchecked",d.extend(!0,{},a))))};c.prototype.setDisabledState=function(a,b,e){b!==a.state.disabled&&(b?(a.state.disabled=!0,this.setExpandedState(a,!1,e),this.setSelectedState(a,!1,e),this.setCheckedState(a,!1,e),e.silent||this.$element.trigger("nodeDisabled", 17d.extend(!0,{},a))):(a.state.disabled=!1,e.silent||this.$element.trigger("nodeEnabled",d.extend(!0,{},a))))};c.prototype.render=function(){this.initialized||(this.$element.addClass("treeview"),this.$wrapper=d(this.template.list),this.injectStyle(),this.initialized=!0);this.$element.empty().append(this.$wrapper.empty());this.buildTree(this.tree,0)};c.prototype.buildTree=function(a,b){if(a){b+=1;var e=this;d.each(a,function(a,c){var g=d(e.template.item).addClass("node-"+e.elementId).addClass(c.state.checked? 18"node-checked":"").addClass(c.state.disabled?"node-disabled":"").addClass(c.state.selected?"node-selected":"").addClass(c.searchResult?"search-result":"").attr("data-nodeid",c.nodeId).attr("style",e.buildStyleOverride(c));for(a=0;a<b-1;a++)g.append(e.template.indent);a=[];c.nodes?(a.push("expand-icon"),c.state.expanded?a.push(e.options.collapseIcon):a.push(e.options.expandIcon)):a.push(e.options.emptyIcon);g.append(d(e.template.icon).addClass(a.join(" ")));e.options.showIcon&&(a=["node-icon"],a.push(c.icon|| 19e.options.nodeIcon),c.state.selected&&(a.pop(),a.push(c.selectedIcon||e.options.selectedIcon||c.icon||e.options.nodeIcon)),g.append(d(e.template.icon).addClass(a.join(" "))));e.options.showCheckbox&&(a=["check-icon"],c.state.checked?a.push(e.options.checkedIcon):a.push(e.options.uncheckedIcon),g.append(d(e.template.icon).addClass(a.join(" "))));e.options.enableLinks?g.append(d(e.template.link).attr("href",c.href).append(c.text)):g.append(c.text);e.options.showTags&&c.tags&&d.each(c.tags,function(a, 20b){g.append(d(e.template.badge).append(b))});e.$wrapper.append(g);if(c.nodes&&c.state.expanded&&!c.state.disabled)return e.buildTree(c.nodes,b)})}};
20c.prototype.buildStyleOverride=function(a){if(a.state.disabled)return"";var b=a.color,e=a.backColor;this.options.highlightSelected&&a.state.selected&&(this.options.selectedColor&&(b=this.options.selectedColor),this.options.selectedBackColor&&(e=this.options.selectedBackColor));this.options.highlightSearchResults&&a.searchResult&&!a.state.disabled&&(this.options.searchResultColor&& 21(b=this.options.searchResultColor),this.options.searchResultBackColor&&(e=this.options.searchResultBackColor));return"color:"+b+";background-color:"+e+";"};c.prototype.injectStyle=function(){this.options.injectStyle&&!l.getElementById(this.styleId)&&d('<style type="text/css" id="'+this.styleId+'"> '+this.buildStyle()+" </style>").appendTo("head")};c.prototype.buildStyle=function(){var a=".node-"+this.elementId+"{";this.options.color&&(a+="color:"+this.options.color+";");this.options.backColor&&(a+= 22"background-color:"+this.options.backColor+";");this.options.showBorder?this.options.borderColor&&(a+="border:1px solid "+this.options.borderColor+";"):a+="border:none;";a+="}";this.options.onhoverColor&&(a+=".node-"+this.elementId+":not(.node-disabled):hover{background-color:"+this.options.onhoverColor+";}");return this.css+a};c.prototype.template={list:'<ul class="list-group"></ul>',item:'<li class="list-group-item"></li>',indent:'<span class="indent"></span>',icon:'<span class="icon"></span>', 23link:'<a href="#" style="color:inherit;"></a>',badge:'<span class="badge"></span>'};c.prototype.css=".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}";c.prototype.getNode=function(a){return this.nodes[a]};c.prototype.getParent=function(a){a=this.identifyNode(a);return this.nodes[a.parentId]};c.prototype.getSiblings=function(a){var b=this.identifyNode(a); 24a=this.getParent(b);return(a?a.nodes:this.tree).filter(function(a){return a.nodeId!==b.nodeId})};c.prototype.getSelected=function(){return this.findNodes("true","g","state.selected")};c.prototype.getUnselected=function(){return this.findNodes("false","g","state.selected")};c.prototype.getExpanded=function(){return this.findNodes("true","g","state.expanded")};c.prototype.getCollapsed=function(){return this.findNodes("false","g","state.expanded")};c.prototype.getChecked=function(){return this.findNodes("true", 25"g","state.checked")};c.prototype.getUnchecked=function(){return this.findNodes("false","g","state.checked")};c.prototype.getDisabled=function(){return this.findNodes("true","g","state.disabled")};c.prototype.getEnabled=function(){return this.findNodes("false","g","state.disabled")};c.prototype.selectNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setSelectedState(a,!0,b)},this));this.render()};c.prototype.unselectNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a, 26b){this.setSelectedState(a,!1,b)},this));this.render()};c.prototype.toggleNodeSelected=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.toggleSelectedState(a,b)},this));this.render()};c.prototype.collapseAll=function(a){var b=this.findNodes("true","g","state.expanded");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setExpandedState(a,!1,b)},this));this.render()};c.prototype.collapseNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setExpandedState(a, 27!1,b)},this));this.render()};c.prototype.expandAll=function(a){if((a=d.extend({},h,a))&&a.levels)this.expandLevels(this.tree,a.levels,a);else{var b=this.findNodes("false","g","state.expanded");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setExpandedState(a,!0,b)},this))}this.render()};c.prototype.expandNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setExpandedState(a,!0,b);a.nodes&&b&&b.levels&&this.expandLevels(a.nodes,b.levels-1,b)},this));this.render()};c.prototype.expandLevels= 28function(a,b,e){e=d.extend({},h,e);d.each(a,d.proxy(function(a,d){this.setExpandedState(d,0<b?!0:!1,e);d.nodes&&this.expandLevels(d.nodes,b-1,e)},this))};c.prototype.revealNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){for(a=this.getParent(a);a;)this.setExpandedState(a,!0,b),a=this.getParent(a)},this));this.render()};c.prototype.toggleNodeExpanded=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.toggleExpandedState(a,b)},this));this.render()};c.prototype.checkAll= 29function(a){var b=this.findNodes("false","g","state.checked");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setCheckedState(a,!0,b)},this));this.render()};c.prototype.checkNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setCheckedState(a,!0,b)},this));this.render()};c.prototype.uncheckAll=function(a){var b=this.findNodes("true","g","state.checked");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setCheckedState(a,!1,b)},this));this.render()};c.prototype.uncheckNode= 30function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setCheckedState(a,!1,b)},this));this.render()};c.prototype.toggleNodeChecked=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.toggleCheckedState(a,b)},this));this.render()};c.prototype.disableAll=function(a){var b=this.findNodes("false","g","state.disabled");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setDisabledState(a,!0,b)},this));this.render()};c.prototype.disableNode=function(a,b){this.forEachIdentifier(a, 31b,d.proxy(function(a,b){this.setDisabledState(a,!0,b)},this));this.render()};c.prototype.enableAll=function(a){var b=this.findNodes("true","g","state.disabled");this.forEachIdentifier(b,a,d.proxy(function(a,b){this.setDisabledState(a,!1,b)},this));this.render()};c.prototype.enableNode=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setDisabledState(a,!1,b)},this));this.render()};c.prototype.toggleNodeDisabled=function(a,b){this.forEachIdentifier(a,b,d.proxy(function(a,b){this.setDisabledState(a, 32!a.state.disabled,b)},this));this.render()};c.prototype.forEachIdentifier=function(a,b,c){b=d.extend({},h,b);
32a instanceof Array||(a=[a]);d.each(a,d.proxy(function(a,d){c(this.identifyNode(d),b)},this))};c.prototype.identifyNode=function(a){return"number"===typeof a?this.nodes[a]:a};c.prototype.search=function(a,b){b=d.extend({},n,b);this.clearSearch({render:!1});var c=[];a&&0<a.length&&(b.exactMatch&&(a="^"+a+"$"),c="g",b.ignoreCase&&(c+="i"),c=this.findNodes(a,c),d.each(c,function(a,b){b.searchResult= 33!0}));b.revealResults?this.revealNode(c):this.render();this.$element.trigger("searchComplete",d.extend(!0,{},c));return c};c.prototype.clearSearch=function(a){a=d.extend({},{render:!0},a);var b=d.each(this.findNodes("true","g","searchResult"),function(a,b){b.searchResult=!1});a.render&&this.render();this.$element.trigger("searchCleared",d.extend(!0,{},b))};c.prototype.findNodes=function(a,b,c){b=b||"g";c=c||"text";var e=this;return d.grep(this.nodes,function(d){d=e.getNodeValue(d,c);if("string"=== 34typeof d)return d.match(new RegExp(a,b))})};c.prototype.getNodeValue=function(a,b){var c=b.indexOf(".");return 0<c?(a=a[b.substring(0,c)],b=b.substring(c+1,b.length),this.getNodeValue(a,b)):a.hasOwnProperty(b)?a[b].toString():f};d.fn.treeview=function(a,b){var e;this.each(function(){var f=d.data(this,"treeview");"string"===typeof a?f?d.isFunction(f[a])&&"_"!==a.charAt(0)?(b instanceof Array||(b=[b]),e=f[a].apply(f,b)):k.console&&k.console.error("No such method : "+a):k.console&&k.console.error("Not initialized, can not call method : "+ 35a):"boolean"===typeof a?e=f:d.data(this,"treeview",new c(this,d.extend(!0,{},a)))});return e||this}})(jQuery,window,document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.