1var globalCacheForjQueryReplacement=window.jQuery;window.jQuery=window.kQuery,function e(t,n,o){function r(s,l){if(!n[s]){if(!t[s]){var a="function"==typeof require&&require;if(!l&&a)return a(s,!0);if(i)return i(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){var n=t[s][1][e];return r(n||e)}),u,u.exports,e,t,n,o)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,t,n){var o,r,i,s,l,a,d,u,h={}.hasOwnProperty;d=e("./node"),u=e("./util"),l=d.Position,o=jQuery,r=function(){function e(e){this.tree_widget=e,this.hovered_area=null,this.$ghost=null,this.hit_areas=[],this.is_dragging=!1,this.current_item=null}return e.prototype.mouseCapture=function(e){var t,n;return t=o(e.target),this.mustCaptureElement(t)?this.tree_widget.options.onIsMoveHandle&&!this.tree_widget.options.onIsMoveHandle(t)?null:((n=this.tree_widget._getNodeElement(t))&&this.tree_widget.options.onCanMove&&(this.tree_widget.options.onCanMove(n.node)||(n=null)),this.current_item=n,null!==this.current_item):null},e.prototype.mouseStart=function(e){var t;return this.refresh(),t=o(e.target).offset(),this.drag_element=new i(this.current_item.node,e.page_x-t.left,e.page_y-t.top,this.tree_widget.element),this.is_dragging=!0,this.current_item.$element.addClass("jqtree-moving"),!0},e.prototype.mouseDrag=function(e){var t;return this.drag_element.move(e.page_x,e.page_y),t=this.findHoveredArea(e.page_x,e.page_y),this.canMoveToArea(t)&&t?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hovered_area!==t&&(this.hovered_area=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeHover(),this.removeDropHint(),this.stopOpenFolderTimer()),t||null!=this.tree_widget.options.onDragMove&&this.tree_widget.options.onDragMove(this.current_item.node,e.original_event),!0},e.prototype.mustCaptureElement=function(e){return!e.is("input,select")},e.prototype.canMoveToArea=function(e){var t;return!!e&&(!this.tree_widget.options.onCanMoveTo||(t=l.getName(e.position),this.tree_widget.options.onCanMoveTo(this.current_item.node,e.node,t)))},e.prototype.mouseStop=function(e){var t;return this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas(),t=this.current_item,this.current_item&&(this.current_item.$element.removeClass("jqtree-moving"),this.current_item=null),this.is_dragging=!1,!this.hovered_area&&t&&null!=this.tree_widget.options.onDragStop&&this.tree_widget.options.onDragStop(t.node,e.original_event),!1},e.prototype.refresh=function(){if(this.removeHitAreas(),this.current_item&&(this.generateHitAreas(),this.current_item=this.tree_widget._getNodeElementForNode(this.current_item.node),this.is_dragging))return this.current_item.$element.addClass("jqtree-moving")},e.prototype.removeHitAreas=function(){return this.hit_areas=[]},e.prototype.clear=function(){return this.drag_element.remove(),this.drag_element=null},e.prototype.removeDropHint=function(){if(this.previous_ghost)return this.previous_ghost.remove()},e.prototype.removeHover=function(){return this.hovered_area=null},e.prototype.generateHitAreas=function(){var e;return e=new s(this.tree_widget.tree,this.current_item.node,this.getTreeDimensions().bottom),this.hit_areas=e.generate()},e.prototype.findHoveredArea=function(e,t){var n,o,r,i,s;if(e<(o=this.getTreeDimensions()).left||t<o.top||e>o.right||t>o.bottom)return null;for(i=0,r=this.hit_areas.length;i<r;)if(s=i+r>>1,t<(n=this.hit_areas[s]).top)r=s;else{if(!(t>n.bottom))return n;i=s+1}return null},e.prototype.mustOpenFolderTimer=function(e){var t;return(t=e.node).isFolder()&&!t.is_open&&e.position===l.INSIDE},e.prototype.updateDropHint=function(){var e;if(this.hovered_area)return this.removeDropHint(),e=this.tree_widget._getNodeElementForNode(this.hovered_area.node),this.previous_ghost=e.addDropHint(this.hovered_area.position)},e.prototype.startOpenFolderTimer=function(e){var t,n;return n=this,t=function(){return n.tree_widget._openNode(e,n.tree_widget.options.slide,(function(){return n.refresh(),n.updateDropHint()}))},this.stopOpenFolderTimer(),this.open_folder_timer=setTimeout(t,this.tree_widget.options.openFolderDelay)},e.prototype.stopOpenFolderTimer=function(){if(this.open_folder_timer)return clearTimeout(this.open_folder_timer),this.open_folder_timer=null},e.prototype.moveItem=function(e){var t,n,o,r,i,s;if(this.hovered_area&&this.hovered_area.position!==l.NONE&&this.canMoveToArea(this.hovered_area)&&(n=this.current_item.node,i=this.hovered_area.node,o=this.hovered_area.position,r=n.parent,o===l.INSIDE&&(this.hovered_area.node.is_open=!0),s=this,t=function(){return s.tree_widget.tree.moveNode(n,i,o),s.tree_widget.element.empty(),s.tree_widget._refreshElements()},!this.tree_widget._triggerEvent("tree.move",{move_info:{moved_node:n,target_node:i,position:l.getName(o),previous_parent:r,do_move:t,original_event:e.original_event}}).isDefaultPrevented()))return t()},e.prototype.getTreeDimensions=function(){var e;return{left:(e=this.tree_widget.element.offset()).left,top:e.top,right:e.left+this.tree_widget.element.width(),bottom:e.top+this.tree_widget.element.height()+16}},e}(),a=function(){function e(e){this.tree=e}return e.prototype.iterate=function(){var e,t,n;return t=!0,n=this,(e=function(r,i){var s,l,a,d,u,h,p;
1if(h=(r.is_open||!r.element)&&r.hasChildren(),r.element){if(!(s=o(r.element)).is(":visible"))return;t&&(n.handleFirstNode(r,s),t=!1),r.hasChildren()?r.is_open?n.handleOpenFolder(r,s)||(h=!1):n.handleClosedFolder(r,i,s):n.handleNode(r,i,s)}if(h){for(l=r.children.length,a=d=0,u=(p=r.children).length;d<u;a=++d)p[a],e(r.children[a],a===l-1?null:r.children[a+1]);if(r.is_open)return n.handleAfterOpenFolder(r,i,s)}})(this.tree,null)},e.prototype.handleNode=function(e,t,n){},e.prototype.handleOpenFolder=function(e,t){},e.prototype.handleClosedFolder=function(e,t,n){},e.prototype.handleAfterOpenFolder=function(e,t,n){},e.prototype.handleFirstNode=function(e,t){},e}(),s=function(e){function t(e,n,o){t.__super__.constructor.call(this,e),this.current_node=n,this.tree_bottom=o}return function(e,t){for(var n in t)h.call(t,n)&&(e[n]=t[n]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype}(t,e),t.prototype.generate=function(){return this.positions=[],this.last_top=0,this.iterate(),this.generateHitAreas(this.positions)},t.prototype.getTop=function(e){return e.offset().top},t.prototype.addPosition=function(e,t,n){var o;return o={top:n,node:e,position:t},this.positions.push(o),this.last_top=n},t.prototype.handleNode=function(e,t,n){var o;return o=this.getTop(n),e===this.current_node?this.addPosition(e,l.NONE,o):this.addPosition(e,l.INSIDE,o),t===this.current_node||e===this.current_node?this.addPosition(e,l.NONE,o):this.addPosition(e,l.AFTER,o)},t.prototype.handleOpenFolder=function(e,t){return e!==this.current_node&&(e.children[0]!==this.current_node&&this.addPosition(e,l.INSIDE,this.getTop(t)),!0)},t.prototype.handleClosedFolder=function(e,t,n){var o;return o=this.getTop(n),e===this.current_node?this.addPosition(e,l.NONE,o):(this.addPosition(e,l.INSIDE,o),t!==this.current_node?this.addPosition(e,l.AFTER,o):void 0)},t.prototype.handleFirstNode=function(e,t){if(e!==this.current_node)return this.addPosition(e,l.BEFORE,this.getTop(o(e.element)))},t.prototype.handleAfterOpenFolder=function(e,t,n){return e===this.current_node.node||t===this.current_node.node?this.addPosition(e,l.NONE,this.last_top):this.addPosition(e,l.AFTER,this.last_top)},t.prototype.generateHitAreas=function(e){var t,n,o,r,i,s;for(s=-1,t=[],n=[],o=0,r=e.length;o<r;o++)(i=e[o]).top!==s&&t.length&&(t.length&&this.generateHitAreasForGroup(n,t,s,i.top),s=i.top,t=[]),t.push(i);return this.generateHitAreasForGroup(n,t,s,this.tree_bottom),n},t.prototype.generateHitAreasForGroup=function(e,t,n,o){var r,i,s,l,a;for(a=Math.min(t.length,4),r=Math.round((o-n)/a),i=n,s=0;s<a;)l=t[s],e.push({top:i,bottom:i+r,node:l.node,position:l.position}),i+=r,s+=1;return null},t}(a),i=function(){function e(e,t,n,r){var i;this.offset_x=t,this.offset_y=n,i=u.html_escape(e.name),this.$element=o('<span class="jqtree-title jqtree-dragging">'+i+"</span>"),this.$element.css("position","absolute"),r.append(this.$element)}return e.prototype.move=function(e,t){return this.$element.offset({left:e-this.offset_x,top:t-this.offset_y})},e.prototype.remove=function(){return this.$element.remove()},e}(),t.exports={DragAndDropHandler:r,DragElement:i,HitAreasGenerator:s}},{"./node":5,"./util":12}],2:[function(e,t,n){var o,r,i,s;e("./node_element").NodeElement,s=e("./util"),i=s.html_escape,o=jQuery,r=function(){function e(e){this.tree_widget=e,this.opened_icon_element=this.createButtonElement(e.options.openedIcon),this.closed_icon_element=this.createButtonElement(e.options.closedIcon)}return e.prototype.render=function(e){return e&&e.parent?this.renderFromNode(e):this.renderFromRoot()},e.prototype.renderFromRoot=function(){var e;return(e=this.tree_widget.element).empty(),this.createDomElements(e[0],this.tree_widget.tree.children,!0,!0,1)},e.prototype.renderFromNode=function(e){var t,n;if(t=o(e.element),n=this.createLi(e,e.getLevel()),this.attachNodeData(e,n),t.after(n),t.remove(),e.children)return this.createDomElements(n,e.children,!1,!1,e.getLevel()+1)},e.prototype.createDomElements=function(e,t,n,o,r){var i,s,l,a,d;for(d=this.createUl(n),e.appendChild(d),s=0,l=t.length;s<l;s++)i=t[s],a=this.createLi(i,r),d.appendChild(a),this.attachNodeData(i,a),i.hasChildren()&&this.createDomElements(a,i.children,!1,i.is_open,r+1);return null},e.prototype.attachNodeData=function(e,t){return e.element=t,o(t).data("node",e)},e.prototype.createUl=function(e){var t,n,o;return e?(t="jqtree-tree",n="tree",this.tree_widget.options.rtl&&(t+=" jqtree-rtl")):(t="",n="group"),(o=document.createElement("ul")).className="jqtree_common "+t,o.setAttribute("role",n),o},e.prototype.createLi=function(e,t){var n,r;return n=this.tree_widget.select_node_handler&&this.tree_widget.select_node_handler.isNodeSelected(e),r=e.isFolder()?this.createFolderLi(e,t,n):this.createNodeLi(e,t,n),this.tree_widget.options.onCreateLi&&this.tree_widget.options.onCreateLi(e,o(r)),r},e.prototype.createFolderLi=function(e,t,n){var o,r,i,s,l,a;
1return o=this.getButtonClasses(e),s=this.getFolderClasses(e,n),l=e.is_open?this.opened_icon_element:this.closed_icon_element,(a=document.createElement("li")).className="jqtree_common "+s,a.setAttribute("role","presentation"),(i=document.createElement("div")).className="jqtree-element jqtree_common",i.setAttribute("role","presentation"),a.appendChild(i),(r=document.createElement("a")).className=o,r.appendChild(l.cloneNode(!1)),r.setAttribute("role","presentation"),r.setAttribute("aria-hidden","true"),this.tree_widget.options.buttonLeft&&i.appendChild(r),i.appendChild(this.createTitleSpan(e.name,t,n,e.is_open,!0)),this.tree_widget.options.buttonLeft||i.appendChild(r),a},e.prototype.createNodeLi=function(e,t,n){var o,r,i,s;return s=["jqtree_common"],n&&s.push("jqtree-selected"),o=s.join(" "),(i=document.createElement("li")).className=o,i.setAttribute("role","presentation"),(r=document.createElement("div")).className="jqtree-element jqtree_common",r.setAttribute("role","presentation"),i.appendChild(r),r.appendChild(this.createTitleSpan(e.name,t,n,e.is_open,!1)),i},e.prototype.createTitleSpan=function(e,t,n,o,r){var i,l;return i="jqtree-title jqtree_common",r&&(i+=" jqtree-title-folder"),(l=document.createElement("span")).className=i,l.setAttribute("role","treeitem"),l.setAttribute("aria-level",t),l.setAttribute("aria-selected",s.getBoolString(n)),l.setAttribute("aria-expanded",s.getBoolString(o)),n&&l.setAttribute("tabindex",0),l.innerHTML=this.escapeIfNecessary(e),l},e.prototype.getButtonClasses=function(e){var t;return t=["jqtree-toggler","jqtree_common"],e.is_open||t.push("jqtree-closed"),this.tree_widget.options.buttonLeft?t.push("jqtree-toggler-left"):t.push("jqtree-toggler-right"),t.join(" ")},e.prototype.getFolderClasses=function(e,t){var n;return n=["jqtree-folder"],e.is_open||n.push("jqtree-closed"),t&&n.push("jqtree-selected"),e.is_loading&&n.push("jqtree-loading"),n.join(" ")},e.prototype.escapeIfNecessary=function(e){return this.tree_widget.options.autoEscape?i(e):e},e.prototype.createButtonElement=function(e){var t;return"string"==typeof e?((t=document.createElement("div")).innerHTML=e,document.createTextNode(t.innerHTML)):o(e)[0]},e}(),t.exports=r},{"./node_element":6,"./util":12}],3:[function(e,t,n){var o,r,i=function(e,t){return function(){return e.apply(t,arguments)}};o=jQuery,r=function(){function e(e){this.selectNode=i(this.selectNode,this),this.tree_widget=e,e.options.keyboardSupport&&o(document).bind("keydown.jqtree",o.proxy(this.handleKeyDown,this))}return 37,38,39,40,e.prototype.deinit=function(){return o(document).unbind("keydown.jqtree")},e.prototype.moveDown=function(){var e;return!!(e=this.tree_widget.getSelectedNode())&&this.selectNode(e.getNextNode())},e.prototype.moveUp=function(){var e;return!!(e=this.tree_widget.getSelectedNode())&&this.selectNode(e.getPreviousNode())},e.prototype.moveRight=function(){var e;return!(e=this.tree_widget.getSelectedNode())||(!e.isFolder()||(e.is_open?this.selectNode(e.getNextNode()):(this.tree_widget.openNode(e),!1)))},e.prototype.moveLeft=function(){var e;return!(e=this.tree_widget.getSelectedNode())||(e.isFolder()&&e.is_open?(this.tree_widget.closeNode(e),!1):this.selectNode(e.getParent()))},e.prototype.handleKeyDown=function(e){if(!this.tree_widget.options.keyboardSupport)return!0;if(o(document.activeElement).is("textarea,input,select"))return!0;if(!this.tree_widget.getSelectedNode())return!0;switch(e.which){case 40:return this.moveDown();case 38:return this.moveUp();case 39:return this.moveRight();case 37:return this.moveLeft()}return!0},e.prototype.selectNode=function(e){return!e||(this.tree_widget.selectNode(e),this.tree_widget.scroll_handler&&!this.tree_widget.scroll_handler.isScrolledIntoView(o(e.element).find(".jqtree-element"))&&this.tree_widget.scrollToNode(e),!1)},e}(),t.exports=r},{}],4:[function(e,t,n){var o,r,i,s={}.hasOwnProperty;i=e("./simple.widget"),o=jQuery,r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)s.call(t,n)&&(e[n]=t[n]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype}(t,e),t.is_mouse_handled=!1,t.prototype._init=function(){return this.$el.bind("mousedown.mou
1sewidget",o.proxy(this._mouseDown,this)),this.$el.bind("touchstart.mousewidget",o.proxy(this._touchStart,this)),this.is_mouse_started=!1,this.mouse_delay=0,this._mouse_delay_timer=null,this._is_mouse_delay_met=!0,this.mouse_down_info=null},t.prototype._deinit=function(){var e;return this.$el.unbind("mousedown.mousewidget"),this.$el.unbind("touchstart.mousewidget"),(e=o(document)).unbind("mousemove.mousewidget"),e.unbind("mouseup.mousewidget")},t.prototype._mouseDown=function(e){var t;if(1===e.which)return(t=this._handleMouseDown(e,this._getPositionInfo(e)))&&e.preventDefault(),t},t.prototype._handleMouseDown=function(e,n){if(!t.is_mouse_handled&&(this.is_mouse_started&&this._handleMouseUp(n),this.mouse_down_info=n,this._mouseCapture(n)))return this._handleStartMouse(),this.is_mouse_handled=!0,!0},t.prototype._handleStartMouse=function(){var e;if((e=o(document)).bind("mousemove.mousewidget",o.proxy(this._mouseMove,this)),e.bind("touchmove.mousewidget",o.proxy(this._touchMove,this)),e.bind("mouseup.mousewidget",o.proxy(this._mouseUp,this)),e.bind("touchend.mousewidget",o.proxy(this._touchEnd,this)),this.mouse_delay)return this._startMouseDelayTimer()},t.prototype._startMouseDelayTimer=function(){var e;return this._mouse_delay_timer&&clearTimeout(this._mouse_delay_timer),this._mouse_delay_timer=setTimeout((e=this,function(){return e._is_mouse_delay_met=!0}),this.mouse_delay),this._is_mouse_delay_met=!1},t.prototype._mouseMove=function(e){return this._handleMouseMove(e,this._getPositionInfo(e))},t.prototype._handleMouseMove=function(e,t){return this.is_mouse_started?(this._mouseDrag(t),e.preventDefault()):!(!this.mouse_delay||this._is_mouse_delay_met)||(this.is_mouse_started=!1!==this._mouseStart(this.mouse_down_info),this.is_mouse_started?this._mouseDrag(t):this._handleMouseUp(t),!this.is_mouse_started)},t.prototype._getPositionInfo=function(e){return{page_x:e.pageX,page_y:e.pageY,target:e.target,original_event:e}},t.prototype._mouseUp=function(e){return this._handleMouseUp(this._getPositionInfo(e))},t.prototype._handleMouseUp=function(e){var t;(t=o(document)).unbind("mousemove.mousewidget"),t.unbind("touchmove.mousewidget"),t.unbind("mouseup.mousewidget"),t.unbind("touchend.mousewidget"),this.is_mouse_started&&(this.is_mouse_started=!1,this._mouseStop(e))},t.prototype._mouseCapture=function(e){return!0},t.prototype._mouseStart=function(e){return null},t.prototype._mouseDrag=function(e){return null},t.prototype._mouseStop=function(e){return null},t.prototype.setMouseDelay=function(e){return this.mouse_delay=e},t.prototype._touchStart=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseDown(e,this._getPositionInfo(t))},t.prototype._touchMove=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseMove(e,this._getPositionInfo(t))},t.prototype._touchEnd=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseUp(this._getPositionInfo(t))},t}(i),t.exports=r},{"./simple.widget":10}],5:[function(e,t,n){var o,r,i;o=jQuery,(i={getName:function(e){return i.strings[e-1]},nameToIndex:function(e){var t,n,o;for(t=n=1,o=i.strings.length;1<=o?n<=o:n>=o;t=1<=o?++n:--n)if(i.strings[t-1]===e)return t;return 0}}).BEFORE=1,i.AFTER=2,i.INSIDE=3,i.NONE=4,i.strings=["before","after","inside","none"],r=function(){function e(t,n,o){null==n&&(n=!1),null==o&&(o=e),this.name="",this.setData(t),this.children=[],this.parent=null,n&&(this.id_mapping={},this.tree=this,this.node_class=o)}return e.prototype.setData=function(e){var t,n,o,r;if(r=this,n=function(e){if(null!==e)return r.name=e},"object"!=typeof e)n(e);else for(t in e)o=e[t],"label"===t?n(o):"children"!==t&&(this[t]=o);return null},e.prototype.initFromData=function(e){var t,n,o;return o=this,n=function(e){if(o.setData(e),e.children)return t(e.children)},t=function(e){return function(t){var n,o,r,i;for(o=0,r=t.length;o<r;o++)n=t[o],(i=new e.tree.node_class("")).initFromData(n),e.addChild(i);return null}}(this),n(e),null},e.prototype.loadFromData=function(e){var t,n,o,r;for(this.removeChildren(),t=0,n=e.length;t<n;t++)r=e[t],o=new this.tree.node_class(r),this.addChild(o),"object"==typeof r&&r.children&&o.loadFromData(r.children);return null},e.prototype.addChild=function(e){return this.children.push(e),e._setParent(this)},e.prototype.addChildAtPosition=function(e,t){return this.children.splice(t,0,e),e._setParent(this)},e.prototype._setParent=function(e){return this.parent=e,this.tree=e.tree,this.tree.addNodeToIndex(this)},e.prototype.removeChild=function(e){return e.removeChildren(),this._removeChild(e)},e.prototype._removeChild=function(e){return this.children.splice(this.getChildIndex(e),1),this.tree.removeNodeFromIndex(e)},e.prototype.getChildIndex=function(e){return o.inArray(e,this.children)},e.prototype.hasChildren=function(){return 0!==this.children.length},e.prototype.isFolder=function(){return this.hasChildren()||this.load_on_demand},e.prototype.iterate=function(e){var t;return(t=function(n,o){var r,i,s,l;if(n.children){for(i=0,s=(l=n.children).length;i<s;i++)r=l[i],e(r,o)&&r.hasChildren()&&t(r,o+1);return null}})(this,0),null},e.prototype.moveNode=function(e,t,n){if(!e.isParentOf(t))return e.parent._removeChild(e),n===i.AFTER?t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1):n===i.BEFORE?t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)):n===i.INSIDE?t.addChildAtPosition(e,0):void 0},e.prototype.getData=function(e){var t;return null==e&&(e=!1),(t=function(e){var n,o,r,i,s,l,a;for(n=[],o=0,i=e.length;o<i;o++){for(r in l={},s=e[o])a=s[r],"parent"!==r&&"children"!==r&&"element"!==r&&"tree"!==r&&Object.prototype.hasOwnProperty.call(s,r)&&(l[r]=a);s.hasChildren()&&(l.children=t(s.children)),n.push(l)}return n})(e?[this]:this.children)},e.prototype.getNodeByName=function(e){return this.getNodeByCallback((function(t){return t.name===e}))},e.prototype.getNodeByCallback=function(e){var t;return t=null,this.iterate((function(n){return!e(n)||(t=n,!1)})),t},e.prototype.addAfter=function(e){var t,n;return this.parent?(n=new this.tree.node_class(e),t=this.parent.getChildIndex(this),this.parent.addChildAtPosition(n,t+1),"object"==typeof e&&e.children&&e.children.length&&n.loadFromData(e.children),n):null},e.prototype.addBefore=function(e){var t,n;return this.parent?(n=new this.tree.node_class(e),t=this.parent.getChildIndex(this),this.parent.addChildAtPosition(n,t),"object"==typeof e&&e.children&&e.children.length&&n.loadFromData(e.children),n):null},e.prototype.addParent=function(e){var t,n,o,r,i,s;
1if(this.parent){for((r=new this.tree.node_class(e))._setParent(this.tree),n=0,o=(s=(i=this.parent).children).length;n<o;n++)t=s[n],r.addChild(t);return i.children=[],i.addChild(r),r}return null},e.prototype.remove=function(){if(this.parent)return this.parent.removeChild(this),this.parent=null},e.prototype.append=function(e){var t;return t=new this.tree.node_class(e),this.addChild(t),"object"==typeof e&&e.children&&e.children.length&&t.loadFromData(e.children),t},e.prototype.prepend=function(e){var t;return t=new this.tree.node_class(e),this.addChildAtPosition(t,0),"object"==typeof e&&e.children&&e.children.length&&t.loadFromData(e.children),t},e.prototype.isParentOf=function(e){var t;for(t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1},e.prototype.getLevel=function(){var e,t;for(e=0,t=this;t.parent;)e+=1,t=t.parent;return e},e.prototype.getNodeById=function(e){return this.id_mapping[e]},e.prototype.addNodeToIndex=function(e){if(null!=e.id)return this.id_mapping[e.id]=e},e.prototype.removeNodeFromIndex=function(e){if(null!=e.id)return delete this.id_mapping[e.id]},e.prototype.removeChildren=function(){var e;return this.iterate((e=this,function(t){return e.tree.removeNodeFromIndex(t),!0})),this.children=[]},e.prototype.getPreviousSibling=function(){var e;return this.parent&&(e=this.parent.getChildIndex(this)-1)>=0?this.parent.children[e]:null},e.prototype.getNextSibling=function(){var e;return this.parent&&(e=this.parent.getChildIndex(this)+1)<this.parent.children.length?this.parent.children[e]:null},e.prototype.getNodesByProperty=function(e,t){return this.filter((function(n){return n[e]===t}))},e.prototype.filter=function(e){var t;return t=[],this.iterate((function(n){return e(n)&&t.push(n),!0})),t},e.prototype.getNextNode=function(e){return null==e&&(e=!0),e&&this.hasChildren()&&this.is_open?this.children[0]:this.parent?this.getNextSibling()||this.parent.getNextNode(!1):null},e.prototype.getPreviousNode=function(){var e;return this.parent?(e=this.getPreviousSibling())?e.hasChildren()&&e.is_open?e.getLastChild():e:this.getParent():null},e.prototype.getParent=function(){return this.parent&&this.parent.parent?this.parent:null},e.prototype.getLastChild=function(){var e;return this.hasChildren()?(e=this.children[this.children.length-1]).hasChildren()&&e.is_open?e.getLastChild():e:null},e}(),t.exports={Node:r,Position:i}},{}],6:[function(e,t,n){var o,r,i,s,l,a,d,u={}.hasOwnProperty;d=e("./node"),a=d.Position,o=jQuery,l=function(){function e(e,t){this.init(e,t)}return e.prototype.init=function(e,t){return this.node=e,this.tree_widget=t,e.element||(e.element=this.tree_widget.element),this.$element=o(e.element)},e.prototype.getUl=function(){return this.$element.children("ul:first")},e.prototype.getSpan=function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")},e.prototype.getLi=function(){return this.$element},e.prototype.addDropHint=function(e){return e===a.INSIDE?new r(this.$element):new s(this.node,this.$element,e)},e.prototype.select=function(){var e;return(e=this.getLi()).addClass("jqtree-selected"),e.attr("aria-selected","true"),this.getSpan().attr("tabindex",0)},e.prototype.deselect=function(){var e;return(e=this.getLi()).removeClass("jqtree-selected"),e.attr("aria-selected","false"),this.getSpan().attr("tabindex",-1)},e}(),i=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)u.call(t,n)&&(e[n]=t[n]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype}(t,e),t.prototype.open=function(e,t){var n,o,r;if(null==t&&(t=!0),!this.node.is_open)return this.node.is_open=!0,(n=this.getButton()).removeClass("jqtree-closed"),n.html(""),n.append(this.tree_widget.renderer.opened_icon_element.cloneNode(!1)),r=this,o=function(){return r.getLi().removeClass("jqtree-closed"),r.getSpan().attr("aria-expanded","true"),e&&e(),r.tree_widget._triggerEvent("tree.open",{node:r.node})},t?this.getUl().slideDown("fast",o):(this.getUl().show(),o())},t.prototype.close=function(e){var t,n,o;if(null==e&&(e=!0),this.node.is_open)return this.node.is_open=!1,(t=this.getButton()).addClass("jqtree-closed"),t.html(""),t.append(this.tree_widget.renderer.closed_icon_element.cloneNode(!1)),o=this,n=function(){return o.getLi().addClass("jqtree-closed"),o.getSpan().attr("aria-expanded","fal
1se"),o.tree_widget._triggerEvent("tree.close",{node:o.node})},e?this.getUl().slideUp("fast",n):(this.getUl().hide(),n())},t.prototype.getButton=function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")},t.prototype.addDropHint=function(e){return this.node.is_open||e!==a.INSIDE?new s(this.node,this.$element,e):new r(this.$element)},t}(l),r=function(){function e(e){var t,n;t=e.children(".jqtree-element"),n=e.width()-4,this.$hint=o('<span class="jqtree-border"></span>'),t.append(this.$hint),this.$hint.css({width:n,height:t.outerHeight()-4})}return e.prototype.remove=function(){return this.$hint.remove()},e}(),s=function(){function e(e,t,n){this.$element=t,this.node=e,this.$ghost=o('<li class="jqtree_common jqtree-ghost"><span class="jqtree_common jqtree-circle"></span><span class="jqtree_common jqtree-line"></span></li>'),n===a.AFTER?this.moveAfter():n===a.BEFORE?this.moveBefore():n===a.INSIDE&&(e.isFolder()&&e.is_open?this.moveInsideOpenFolder():this.moveInside())}return e.prototype.remove=function(){return this.$ghost.remove()},e.prototype.moveAfter=function(){return this.$element.after(this.$ghost)},e.prototype.moveBefore=function(){return this.$element.before(this.$ghost)},e.prototype.moveInsideOpenFolder=function(){return o(this.node.children[0].element).before(this.$ghost)},e.prototype.moveInside=function(){return this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")},e}(),t.exports={BorderDropHint:r,FolderElement:i,GhostDropHint:s,NodeElement:l}},{"./node":5}],7:[function(e,t,n){var o,r,i,s;(s=e("./util")).indexOf,i=s.isInt,o=jQuery,r=function(){function e(e){this.tree_widget=e}return e.prototype.saveState=function(){var e;return e=JSON.stringify(this.getState()),this.tree_widget.options.onSetStateFromStorage?this.tree_widget.options.onSetStateFromStorage(e):this.supportsLocalStorage()?localStorage.setItem(this.getCookieName(),e):o.cookie?(o.cookie.raw=!0,o.cookie(this.getCookieName(),e,{path:"/"})):void 0},e.prototype.getStateFromStorage=function(){var e;return(e=this._loadFromStorage())?this._parseState(e):null},e.prototype._parseState=function(e){var t;return(t=o.parseJSON(e))&&t.selected_node&&i(t.selected_node)&&(t.selected_node=[t.selected_node]),t},e.prototype._loadFromStorage=function(){return this.tree_widget.options.onGetStateFromStorage?this.tree_widget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getCookieName()):o.cookie?(o.cookie.raw=!0,o.cookie(this.getCookieName())):null},e.prototype.getState=function(){var e,t,n;return n=this,e=function(){var e;return e=[],n.tree_widget.tree.iterate((function(t){return t.is_open&&t.id&&t.hasChildren()&&e.push(t.id),!0})),e},t=function(e){return function(){var t;return function(){var e,n,o,r;for(r=[],e=0,n=(o=this.tree_widget.getSelectedNodes()).length;e<n;e++)t=o[e],r.push(t.id);return r}.call(e)}}(this),{open_nodes:e(),selected_node:t()}},e.prototype.setInitialState=function(e){var t;return!!e&&(t=this._openInitialNodes(e.open_nodes),this._selectInitialNodes(e.selected_node),t)},e.prototype._openInitialNodes=function(e){var t,n,o,r,i;for(o=!1,t=0,n=e.length;t<n;t++)i=e[t],(r=this.tree_widget.getNodeById(i))&&(r.load_on_demand?o=!0:r.is_open=!0);return o},e.prototype._selectInitialNodes=function(e){var t,n,o,r,i;for(i=0,t=0,n=e.length;t<n;t++)r=e[t],(o=this.tree_widget.getNodeById(r))&&(i+=1,this.tree_widget.select_node_handler.addToSelection(o));return 0!==i},e.prototype.setInitialStateOnDemand=function(e,t){return e?this._setInitialStateOnDemand(e.open_nodes,e.selected_node,t):t()},e.prototype._setInitialStateOnDemand=function(e,t,n){var o,r,i,s;return r=0,s=this,i=function(){var i,l,a,d,u;for(a=[],i=0,l=e.length;i<l;i++)u=e[i],(d=s.tree_widget.getNodeById(u))?d.is_loading||(d.load_on_demand?o(d):s.tree_widget._openNode(d,!1)):a.push(u);if(e=a,s._selectInitialNodes(t)&&s.tree_widget._refreshElements(),0===r)return n()},o=function(e){return function(t){return r+=1,e.tree_widget._openNode(t,!1,(function(){return r-=1,i()}))}}(this),i()},e.prototype.getCookieName=function(){return"string"==typeof this.tree_widget.options.saveState?this.tree_widget.options.saveState:"tree"},e.prototype.supportsLocalStorage=function(){var e;return e=function(){var e,t;if("undefined"==typeof localStorage||null===localStorage)return!1;try{t="_storage_test",sessionStorage.setItem(t,!0),sessionStorage.removeItem(t)}catch(e){return e,!1}return!0},null==this._supportsLocalStorage&&(this._supportsLocalStorage=e()),this._supportsLocalStorage},e.prototype.getNodeIdToBeSelected=function(){var e;return(e=this.getStateFromStorage())&&e.selected_node?e.selected_node[0]:null},e}(),t.exports=r},{"./util":12}],8:[function(e,t,n){var o,r;
1o=jQuery,r=function(){function e(e){this.tree_widget=e,this.previous_top=-1,this.is_initialized=!1,this._initScrollParent()}return e.prototype._initScrollParent=function(){var e,t,n,r;return r=this,t=function(){var e,t,n,i,s,l;if(e=["overflow","overflow-y"],n=function(t){var n,r,i,s;for(r=0,i=e.length;r<i;r++)if(n=e[r],"auto"===(s=o.css(t,n))||"scroll"===s)return!0;return!1},n(r.tree_widget.$el[0]))return r.tree_widget.$el;for(i=0,s=(l=r.tree_widget.$el.parents()).length;i<s;i++)if(n(t=l[i]))return o(t);return null},n=function(e){return function(){return e.scroll_parent_top=0,e.$scroll_parent=null}}(this),"fixed"===this.tree_widget.$el.css("position")&&n(),(e=t())&&e.length&&"HTML"!==e[0].tagName?(this.$scroll_parent=e,this.scroll_parent_top=this.$scroll_parent.offset().top):n(),this.is_initialized=!0},e.prototype._ensureInit=function(){if(!this.is_initialized)return this._initScrollParent()},e.prototype.checkScrolling=function(){var e;if(this._ensureInit(),(e=this.tree_widget.dnd_handler.hovered_area)&&e.top!==this.previous_top)return this.previous_top=e.top,this.$scroll_parent?this._handleScrollingWithScrollParent(e):this._handleScrollingWithDocument(e)},e.prototype._handleScrollingWithScrollParent=function(e){return this.scroll_parent_top+this.$scroll_parent[0].offsetHeight-e.bottom<20?(this.$scroll_parent[0].scrollTop+=20,this.tree_widget.refreshHitAreas(),this.previous_top=-1):e.top-this.scroll_parent_top<20?(this.$scroll_parent[0].scrollTop-=20,this.tree_widget.refreshHitAreas(),this.previous_top=-1):void 0},e.prototype._handleScrollingWithDocument=function(e){return e.top-o(document).scrollTop()<20?o(document).scrollTop(o(document).scrollTop()-20):o(window).height()-(e.bottom-o(document).scrollTop())<20?o(document).scrollTop(o(document).scrollTop()+20):void 0},e.prototype.scrollTo=function(e){var t;return this._ensureInit(),this.$scroll_parent?this.$scroll_parent[0].scrollTop=e:(t=this.tree_widget.$el.offset().top,o(document).scrollTop(e+t))},e.prototype.isScrolledIntoView=function(e){var t,n,r,i,s;return this._ensureInit(),t=o(e),this.$scroll_parent?(s=0,i=this.$scroll_parent.height(),n=(r=t.offset().top-this.scroll_parent_top)+t.height()):(i=(s=o(window).scrollTop())+o(window).height(),n=(r=t.offset().top)+t.height()),n<=i&&r>=s},e}(),t.exports=r},{}],9:[function(e,t,n){var o;jQuery,o=function(){function e(e){this.tree_widget=e,this.clear()}return e.prototype.getSelectedNode=function(){var e;return!!(e=this.getSelectedNodes()).length&&e[0]},e.prototype.getSelectedNodes=function(){var e,t,n;if(this.selected_single_node)return[this.selected_single_node];for(e in n=[],this.selected_nodes)(t=this.tree_widget.getNodeById(e))&&n.push(t);return n},e.prototype.getSelectedNodesUnder=function(e){var t,n,o;if(this.selected_single_node)return e.isParentOf(this.selected_single_node)?[this.selected_single_node]:[];for(t in o=[],this.selected_nodes)(n=this.tree_widget.getNodeById(t))&&e.isParentOf(n)&&o.push(n);return o},e.prototype.isNodeSelected=function(e){return e.id?this.selected_nodes[e.id]:!!this.selected_single_node&&this.selected_single_node.element===e.element},e.prototype.clear=function(){return this.selected_nodes={},this.selected_single_node=null},e.prototype.removeFromSelection=function(e,t){if(null==t&&(t=!1),e.id){if(delete this.selected_nodes[e.id],t)return e.iterate((n=this,function(t){return delete n.selected_nodes[e.id],!0}))}else if(this.selected_single_node&&e.element===this.selected_single_node.element)return this.selected_single_node=null;var n},e.prototype.addToSelection=function(e){return e.id?this.selected_nodes[e.id]=!0:this.selected_single_node=e},e}(),t.exports=o},{}],10:[function(e,t,n){var o,r,i=[].slice;o=jQuery,r=function(){function e(e,t){this.$el=o(e),this.options=o.extend({},this.defaults,t)}return e.prototype.defaults={},e.prototype.destroy=function(){return this._deinit()},e.prototype._init=function(){return null},e.prototype._deinit=function(){return null},e.register=function(t,n){var r,s,l,a,d;return a=function(){return"simple_widget_"+n},d=function(t,n){var r;return(r=o.data(t,n))&&r instanceof e?r:null},s=function(e,n){var r,i,s,l,u;for(r=a(),s=0,l=e.length;s<l;s++)i=e[s],d(i,r)||(u=new t(i,n),o.data(i,r)||o.data(i,r,u),u._init());return e},l=function(e){var t,n,r,i,s,l;for(t=a(),s=[],r=0,i=e.length;r<i;r++)n=e[r],(l=d(n,t))&&l.destroy(),s.push(o.removeData(n,t));return s},r=function(t,n,r){var i,s,l,d,u,h;
1for(d=null,s=0,l=t.length;s<l;s++)i=t[s],(u=o.data(i,a()))&&u instanceof e&&(h=u[n])&&"function"==typeof h&&(d=h.apply(u,r));return d},o.fn[n]=function(){var e,n,o,a;return o=arguments[0],n=2<=arguments.length?i.call(arguments,1):[],e=this,void 0===o||"object"==typeof o?s(e,o):"string"==typeof o&&"_"!==o[0]?"destroy"===(a=o)?l(e):"get_widget_class"===a?t:r(e,a,n):void 0}},e}(),t.exports=r},{}],11:[function(e,t,n){var o,r,i,s,l,a,d,u,h,p,c,_,f,g,m,v,y,N,w,S,D,C,F,I={}.hasOwnProperty;w=e("./version"),S=e("./drag_and_drop_handler"),l=e("./elements_renderer"),p=e("./key_handler"),c=e("./mouse.widget"),m=e("./save_state_handler"),v=e("./scroll_handler"),y=e("./select_node_handler"),N=e("./simple.widget"),D=e("./node"),_=D.Node,g=D.Position,F=e("./util"),C=e("./node_element"),r=C.BorderDropHint,a=C.FolderElement,d=C.GhostDropHint,f=C.NodeElement,i=S.DragAndDropHandler,s=S.DragElement,u=S.HitAreasGenerator,o=jQuery,h=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)I.call(t,n)&&(e[n]=t[n]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype}(t,e),t.prototype.BorderDropHint=r,t.prototype.DragElement=s,t.prototype.DragAndDropHandler=i,t.prototype.ElementsRenderer=l,t.prototype.GhostDropHint=d,t.prototype.HitAreasGenerator=u,t.prototype.Node=_,t.prototype.SaveStateHandler=m,t.prototype.ScrollHandler=v,t.prototype.SelectNodeHandler=y,t.prototype.defaults={autoOpen:!1,saveState:!1,dragAndDrop:!1,selectable:!0,useContextMenu:!0,onCanSelectNode:null,onSetStateFromStorage:null,onGetStateFromStorage:null,onCreateLi:null,onIsMoveHandle:null,onCanMove:null,onCanMoveTo:null,onLoadFailed:null,autoEscape:!0,dataUrl:null,closedIcon:null,openedIcon:"▼",slide:!0,nodeClass:_,dataFilter:null,keyboardSupport:!0,openFolderDelay:500,rtl:null,onDragMove:null,onDragStop:null,buttonLeft:!0,onLoading:null},t.prototype.toggle=function(e,t){return null==t&&(t=null),null===t&&(t=this.options.slide),e.is_open?this.closeNode(e,t):this.openNode(e,t),this.element},t.prototype.getTree=function(){return this.tree},t.prototype.selectNode=function(e){return this._selectNode(e,!1),this.element},t.prototype._selectNode=function(e,t){var n,o,r,i;if(null==t&&(t=!1),this.select_node_handler){var s;if(s=this,n=function(){return s.options.onCanSelectNode?s.options.selectable&&s.options.onCanSelectNode(e):s.options.selectable},r=function(t){return function(){var n;if((n=e.parent)&&n.parent&&!n.is_open)return t.openNode(n,!1)}}(this),i=function(e){return function(){if(e.options.saveState)return e.save_state_handler.saveState()}}(this),!e)return this._deselectCurrentNode(),void i();if(n())return this.select_node_handler.isNodeSelected(e)?t&&(this._deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e})):(o=this.getSelectedNode(),this._deselectCurrentNode(),this.addToSelection(e),this._triggerEvent("tree.select",{node:e,deselected_node:o}),r()),i()}},t.prototype.getSelectedNode=function(){return this.select_node_handler?this.select_node_handler.getSelectedNode():null},t.prototype.toJson=function(){return JSON.stringify(this.tree.getData())},t.prototype.loadData=function(e,t){return this._loadData(e,t),this.element},t.prototype.loadDataFromUrl=function(e,t,n){return"string"===o.type(e)?this._loadDataFromUrl(e,t,n):this._loadDataFromUrl(null,e,t),this.element},t.prototype.reload=function(e){return this._loadDataFromUrl(null,null,e),this.element},t.prototype._loadDataFromUrl=function(e,t,n){var r,i,s,l,a,d,u,h,p;r=null,p=this,i=function(){return(r=t?o(t.element):p.element).addClass("jqtree-loading"),p._notifyLoading(!0,t,r)},h=function(e){return function(){if(r)return r.removeClass("jqtree-loading"),e._notifyLoading(!1,t,r)}}(this),u=function(){return"string"===o.type(e)?{url:e}:(e.method||(e.method="get"),e)},s=function(e){return function(r){if(h(),e._loadData(r,t),n&&o.isFunction(n))return n()}}(this),a=function(e){return function(t){var n;return n=o.isArray(t)||"object"==typeof t?t:null!=n?o.parseJSON(t):[],e.options.dataFilter&&(n=e.options.dataFilter(n)),s(n)}}(this),l=function(e){return function(t){if(h(),e.options.onLoadFailed)return e.options.onLoadFailed(t)}}(this),d=function(){return e=u(),o.ajax(o.extend({}
1,e,{method:null!=e.method?e.method.toUpperCase():"GET",cache:!1,dataType:"json",success:a,error:l}))},e||(e=this._getDataUrlInfo(t)),i(),e?o.isArray(e)?s(e):d():h()},t.prototype._loadData=function(e,t){var n,o,r;if(null==t&&(t=null),r=this,n=function(){var e,n,o,i;if(r.select_node_handler)for(e=0,n=(i=r.select_node_handler.getSelectedNodesUnder(t)).length;e<n;e++)o=i[e],r.select_node_handler.removeFromSelection(o);return null},o=function(n){return function(){return t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,n._refreshElements(t)}}(this),e)return this._triggerEvent("tree.load_data",{tree_data:e}),t?(n(),o()):this._initTree(e),this.isDragging()?this.dnd_handler.refresh():void 0},t.prototype.getNodeById=function(e){return this.tree.getNodeById(e)},t.prototype.getNodeByName=function(e){return this.tree.getNodeByName(e)},t.prototype.getNodesByProperty=function(e,t){return this.tree.getNodesByProperty(e,t)},t.prototype.getNodeByHtmlElement=function(e){return this._getNode(o(e))},t.prototype.getNodeByCallback=function(e){return this.tree.getNodeByCallback(e)},t.prototype.openNode=function(e,t){return null==t&&(t=null),null===t&&(t=this.options.slide),this._openNode(e,t),this.element},t.prototype._openNode=function(e,t,n){var o,r,i;if(null==t&&(t=!0),i=this,o=function(e,t,n){return new a(e,i).open(n,t)},e.isFolder()){if(e.load_on_demand)return this._loadFolderOnDemand(e,t,n);for(r=e.parent;r;)r.parent&&o(r,!1,null),r=r.parent;return o(e,t,n),this._saveState()}},t.prototype._loadFolderOnDemand=function(e,t,n){return null==t&&(t=!0),e.is_loading=!0,this._loadDataFromUrl(null,e,(o=this,function(){return o._openNode(e,t,n)}));var o},t.prototype.closeNode=function(e,t){return null==t&&(t=null),null===t&&(t=this.options.slide),e.isFolder()&&(new a(e,this).close(t),this._saveState()),this.element},t.prototype.isDragging=function(){return!!this.dnd_handler&&this.dnd_handler.is_dragging},t.prototype.refreshHitAreas=function(){return this.dnd_handler.refresh(),this.element},t.prototype.addNodeAfter=function(e,t){var n;return n=t.addAfter(e),this._refreshElements(t.parent),n},t.prototype.addNodeBefore=function(e,t){var n;return n=t.addBefore(e),this._refreshElements(t.parent),n},t.prototype.addParentNode=function(e,t){var n;return n=t.addParent(e),this._refreshElements(n.parent),n},t.prototype.removeNode=function(e){var t;return(t=e.parent)&&(this.select_node_handler.removeFromSelection(e,!0),e.remove(),this._refreshElements(t)),this.element},t.prototype.appendNode=function(e,t){var n;return n=(t=t||this.tree).append(e),this._refreshElements(t),n},t.prototype.prependNode=function(e,t){var n;return t||(t=this.tree),n=t.prepend(e),this._refreshElements(t),n},t.prototype.updateNode=function(e,t){var n;return(n=t.id&&t.id!==e.id)&&this.tree.removeNodeFromIndex(e),e.setData(t),n&&this.tree.addNodeToIndex(e),"object"==typeof t&&t.children&&t.children.length&&(e.removeChildren(),e.loadFromData(t.children)),this.renderer.renderFromNode(e),this._selectCurrentNode(),this.element},t.prototype.moveNode=function(e,t,n){var o;return o=g.nameToIndex(n),this.tree.moveNode(e,t,o),this._refreshElements(),this.element},t.prototype.getStateFromStorage=function(){return this.save_state_handler.getStateFromStorage()},t.prototype.addToSelection=function(e){return e&&(this.select_node_handler.addToSelection(e),this._getNodeElementForNode(e).select(),this._saveState()),this.element},t.prototype.getSelectedNodes=function(){return this.select_node_handler.getSelectedNodes()},t.prototype.isNodeSelected=function(e){return this.select_node_handler.isNodeSelected(e)},t.prototype.removeFromSelection=function(e){return this.select_node_handler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this._saveState(),this.element},t.prototype.scrollToNode=function(e){var t;return t=o(e.element).offset().top-this.$el.offset().top,this.scroll_handler.scrollTo(t),this.element},t.prototype.getState=function(){return this.save_state_handler.getState()},t.prototype.setState=function(e){return this.save_state_handler.setInitialState(e),this._refreshElements(),this.element},t.prototype.setOption=function(e,t){return this.options[e]=t,this.element},t.prototype.moveDown=function(){return this.key_handler&&this.key_handler.moveDown(),this.element},t.prototype.moveUp=function(){return this.key_handler&&this.key_handler.moveUp(),this.element},t.prototype.getVersion=function(){return w},t.prototype._init=function(){if(t.__super__._init.call(this),this.element=this.$el,this.mouse_delay=300,this.is_initialized=!1,this.options.rtl=this._getRtlOption(),this.options.closedIcon||(this.options.closedIcon=this._getDefaultClosedIcon()),this.renderer=new l(this),null!=m?this.save_state_handler=new m(this):this.options.saveState=!1,null!=y&&(this.select_node_handler=new y(this)),null!=i?this.dnd_handler=new i(this):this.options.dragAndDrop=!1,null!=v&&(this.scroll_handler=new v(this)),null!=p&&null!=y&&(this.key_handler=new p(this)),this._initData(),this.element.click(o.proxy(this._click,this)),this.element.dblclick(o.proxy(this._dblclick,this)),this.options.useContextMenu)return this.element.bind("contextmenu",o.proxy(this._contextmenu,this))},t.prototype._deinit=function(){return this.element.empty(),this.element.unbind(),this.key_handler&&this.key_handler.deinit(),this.tree=null,t.__super__._deinit.call(this)},t.prototype._initData=function(){return this.options.data?this._loadData(this.options.data):this._loadDataFromUrl(this._getDataUrlInfo())},t.prototype._getDataUrlInfo=function(e){var t,n,r;return t=this.options.dataUrl||this.element.data("url"),r=this,n=function(){var n,o,i;return i={url:t},e&&e.id?(n={node:e.id},i.data=n):(o=r._getNodeIdToBeSelected())&&(n={selected_node:o},i.data=n),i}
1,o.isFunction(t)?t(e):"string"===o.type(t)?n():t},t.prototype._getNodeIdToBeSelected=function(){return this.options.saveState?this.save_state_handler.getNodeIdToBeSelected():null},t.prototype._initTree=function(e){var t,n,o;return o=this,t=function(){if(!o.is_initialized)return o.is_initialized=!0,o._triggerEvent("tree.init")},this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.select_node_handler&&this.select_node_handler.clear(),this.tree.loadFromData(e),n=this._setInitialState(),this._refreshElements(),n?this._setInitialStateOnDemand(t):t()},t.prototype._setInitialState=function(){var e,t,n,o,r,i;return i=this,r=function(){var e;return i.options.saveState&&i.save_state_handler&&(e=i.save_state_handler.getStateFromStorage())?[!0,i.save_state_handler.setInitialState(e)]:[!1,!1]},e=function(e){return function(){var t,n;return!1!==e.options.autoOpen&&(t=e._getAutoOpenMaxLevel(),n=!1,e.tree.iterate((function(e,o){return e.load_on_demand?(n=!0,!1):!!e.hasChildren()&&(e.is_open=!0,o!==t)})),n)}}(this),t=(o=r())[0],n=o[1],t||(n=e()),n},t.prototype._setInitialStateOnDemand=function(e){var t,n,o;if(o=this,n=function(){var t;return!(!o.options.saveState||!o.save_state_handler||!(t=o.save_state_handler.getStateFromStorage())||(o.save_state_handler.setInitialStateOnDemand(t,e),0))},t=function(t){return function(){var n,o,r,i;return r=t._getAutoOpenMaxLevel(),o=0,n=function(e){return o+=1,t._openNode(e,!1,(function(){return o-=1,i()}))},(i=function(){if(t.tree.iterate((function(e,o){return e.load_on_demand?(e.is_loading||n(e),!1):(t._openNode(e,!1),o!==r)})),0===o)return e()})()}}(this),!n())return t()},t.prototype._getAutoOpenMaxLevel=function(){return!0===this.options.autoOpen?-1:parseInt(this.options.autoOpen)},t.prototype._refreshElements=function(e){return null==e&&(e=null),this.renderer.render(e),this._triggerEvent("tree.refresh")},t.prototype._click=function(e){var t,n;if(t=this._getClickTarget(e.target)){if("button"===t.type)return this.toggle(t.node,this.options.slide),e.preventDefault(),e.stopPropagation();if("label"===t.type&&(n=t.node,!this._triggerEvent("tree.click",{node:n,click_event:e}).isDefaultPrevented()))return this._selectNode(n,!0)}},t.prototype._dblclick=function(e){var t;if((t=this._getClickTarget(e.target))&&"label"===t.type)return this._triggerEvent("tree.dblclick",{node:t.node,click_event:e})},t.prototype._getClickTarget=function(e){var t,n,r,i;if((t=(r=o(e)).closest(".jqtree-toggler")).length){if(i=this._getNode(t))return{type:"button",node:i}}else if((n=r.closest(".jqtree-element")).length&&(i=this._getNode(n)))return{type:"label",node:i}
1;return null},t.prototype._getNode=function(e){var t;return 0===(t=e.closest("li.jqtree_common")).length?null:t.data("node")},t.prototype._getNodeElementForNode=function(e){return e.isFolder()?new a(e,this):new f(e,this)},t.prototype._getNodeElement=function(e){var t;return(t=this._getNode(e))?this._getNodeElementForNode(t):null},t.prototype._contextmenu=function(e){var t,n;if((t=o(e.target).closest("ul.jqtree-tree .jqtree-element")).length&&(n=this._getNode(t)))return e.preventDefault(),e.stopPropagation(),this._triggerEvent("tree.contextmenu",{node:n,click_event:e}),!1},t.prototype._saveState=function(){if(this.options.saveState)return this.save_state_handler.saveState()},t.prototype._mouseCapture=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseCapture(e)},t.prototype._mouseStart=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseStart(e)},t.prototype._mouseDrag=function(e){var t;return!!this.options.dragAndDrop&&(t=this.dnd_handler.mouseDrag(e),this.scroll_handler&&this.scroll_handler.checkScrolling(),t)},t.prototype._mouseStop=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseStop(e)},t.prototype._triggerEvent=function(e,t){var n;return n=o.Event(e),o.extend(n,t),this.element.trigger(n),n},t.prototype.testGenerateHitAreas=function(e){return this.dnd_handler.current_item=this._getNodeElementForNode(e),this.dnd_handler.generateHitAreas(),this.dnd_handler.hit_areas},t.prototype._selectCurrentNode=function(){var e,t;if((e=this.getSelectedNode())&&(t=this._getNodeElementForNode(e)))return t.select()},t.prototype._deselectCurrentNode=function(){var e;if(e=this.getSelectedNode())return this.removeFromSelection(e)},t.prototype._getDefaultClosedIcon=function(){return this.options.rtl?"◀":"►"},t.prototype._getRtlOption=function(){var e;return null!==this.options.rtl?this.options.rtl:null!=(e=this.element.data("rtl"))&&!1!==e},t.prototype._notifyLoading=function(e,t,n){if(this.options.onLoading)return this.options.onLoading(e,t,n)},t}(c),h.getModule=function(e){return{node:D,util:F,drag_and_drop_handler:S}[e]},N.register(h,"tree")},{"./drag_and_drop_handler":1,"./elements_renderer":2,"./key_handler":3,"./mouse.widget":4,"./node":5,"./node_element":6,"./save_state_handler":7,"./scroll_handler":8,"./select_node_handler":9,"./simple.widget":10,"./util":12,"./version":13}],12:[function(e,t,n){var o,r,i,s,l;o=function(e,t){var n,o,r;for(n=o=0,r=e.length;o<r;n=++o)if(e[n]===t)return n;return-1},s=function(e,t){return e.indexOf?e.indexOf(t):o(e,t)},l=function(e){return"number"==typeof e&&e%1==0},i=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},r=function(e){return e?"true":"false"},t.exports={_indexOf:o,getBoolString:r,html_escape:i,indexOf:s,isInt:l}},{}],13:[function(e,t,n){t.exports="1.3.4"},{}]},{},[11]),function(e){Koowa.Tree=Koowa.Class.extend({initialize:function(t,n){this.setOptions(n),this.element=e(t),this.options.onBeforeInitialize&&this.options.onBeforeInitialize.call(this),e(window).on("load",e.proxy((function(){"relative"!=this.element.css("position")&&this.element.css("position","relative")}),this)),this.attachHandlers(),this.options.data&&this.options.data.length&&(this.options.data=this.parseData(this.options.data)),this.element.addClass("jqtree--one-level"),this.tree=e.proxy(this.element.tree,this.element),this.tree(this.options),this.options.onAfterInitialize&&this.options.onAfterInitialize.call(this)},getDefaults:function(){var t=this;return{selected:null,data:[],autoOpen:0,useContextMenu:!1,keyboardSupport:!1,toggler:[{folder:"k-icon-folder-closed"},{folder:"k-icon-folder-opened"}],onCreateLi:function(n,o){if(o.find(".jqtree-element").attr("title",n.name),n.isFolder()){var r=t.options.toggler[n.is_open?1:0],i=e("<span />",{class:"jqtree_common jqtree-icon "+r.folder,on:{click:function(e){e.preventDefault(),e.stopPropagation(),t.element.tree("toggle",n)}}});o.find(".jqtree-title").before(i)}else{var s=o.find(".jqtree-title");s.before('<i class="jqtree-whitespace"></i>'),s.before('<span class="jqtree_common jqtree-icon '+t.options.toggler[0].folder+'"></span> ')}for(var l=n.getLevel(),a=o.find(".jqtree-title").parent(),d=1;d<l;++d)a.prepend('<i class="jqtree-whitespace"></i>');l>1&&t.element.removeClass("jqtree--one-level")}}},setOptions:function(t){return this.options=e.extend(!0,{},this.getDefaults(),t),this},selectNode:function(e,t){if(e){var n=[-1],o=t.tree("getState");n.push.apply(n,e.path.split("/").map((function(e){return parseInt(e,10)}))),o.selected_node=e.id,o.open_nodes.push.apply(o.open_nodes,n),t.tree("setState",o)}},parseData:function(e){return this._parseData(e)},_parseData:function(t){var n=[],o={};return e.each(t,(function(e,t){o[t.id]=t,0!=t.parent&&o.hasOwnProperty(t.parent)?(o[t.parent].hasOwnProperty("children")||(o[t.parent].children=[]),o[t.parent].children.push(t)):n.push(t)})),n},unserialize:function(e){var t,n={};for(t in e=e.replace(/^\?/,"").split(/&/))e.hasOwnProperty(t)&&(t=e[t].split("="),n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]));return n},_attachHandlers:function(){var t=this.options,n=this,o=t.toggler;this.element.bind({"tree.select":function(t){e(this).find(".k-is-active").removeClass("k-is-active"),t.node&&e(this).find(".jqtree-selected").addClass("k-is-active")},"tree.open":function(t){var n=t.node,r=o[1],i=o[0],s=e(n.element).children(".jqtree-element").find(".jqtree-icon");s.removeClass(i.folder).addClass(r.folder),s.closest("span").find("."+i.folder).removeClass(i.folder).addClass(r.folder)}
1,"tree.close":function(t){var n=t.node,r=o[0],i=o[1],s=e(n.element).children(".jqtree-element").find(".jqtree-icon");s.removeClass(i.folder).addClass(r.folder),s.closest("span").find("."+i.folder).removeClass(i.folder).addClass(r.folder)},"tree.init":function(){if(t.selected){var o=e(this).tree("getNodeById",t.selected);e(this).tree("selectNode",o),n.selectNode(o,e(this))}},"tree.refresh":function(){e(this).find(".jqtree-selected").addClass("k-is-active")}})},attachHandlers:function(){this._attachHandlers()},scrollIntoView:function(t,n,o){var r=e(t.element),i=n.height(),s=n.width(),l=r[0].offsetTop,a=r.height(),d=r.width(),u=Math.min(l,l-i+a),h={};if(u>n.scrollTop()?h.scrollTop=u:l<n.scrollTop()&&(h.scrollTop=l),s<d){var p=r.find(".jqtree-title").filter(":first").find(".icon-whitespace").last(),c=p.length?p[0].offsetLeft:0;h.scrollLeft=c}(h.scrollTop||h.scrollLeft)&&(clearTimeout(this._scroll_into_view),this._scroll_into_view=setTimeout(function(){n.animate(h,o||900)}.bind(this),o||900))}})}(window.kQuery),window.jQuery=globalCacheForjQueryReplacement,globalCacheForjQueryReplacement=void 0;
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.