(window.webpackJsonpPMA=window.webpackJsonpPMA||[]).push([["jquery.fancytree"],{"8CCZ":function(e,t,n){var r,i,o;
/*!
 * jquery.fancytree.js
 * Tree view control with support for lazy loading and much more.
 * https://github.com/mar10/fancytree/
 *
 * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
 * Released under the MIT license
 * https://github.com/mar10/fancytree/wiki/LicenseInfo
 *
 * @version 2.36.1
 * @date 2020-07-25T09:03:47Z
 */i=[n("xeH2"),n("Bn+w")],void 0===(o="function"==typeof(r=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,n,r=null,i=new RegExp(/\.|\//),o=/[&<>"'/]/g,a=/[<>"'/]/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},l={16:!0,17:!0,18:!0},d={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},u={0:"",1:"left",2:"middle",3:"right"},h="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),f={},p="columns types".split(" "),g="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),v={},y={},b={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<h.length;t++)f[h[t]]=!0;for(t=0;t<g.length;t++)n=g[t],v[n]=!0,n!==n.toLowerCase()&&(y[n.toLowerCase()]=n);return m(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),L.prototype={_findDirectChild:function(e){var t,n,r=this.children;if(r)if("string"==typeof e){for(t=0,n=r.length;t<n;t++)if(r[t].key===e)return r[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){m(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,n=e.length;t<n;t++)this.children.push(new L(this,e[t]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(t,n){var r,i,o,a,s=this.getFirstChild(),l=this.getLastChild(),d=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),r=0,i=t.length;r<i;r++)d.push(new L(this,t[r]));if(a=d[0],null==n?this.children=this.children.concat(d):(n=this._findDirectChild(n),m((o=e.inArray(n,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[o,0].concat(d))),s&&!n){for(r=0,i=d.length;r<i;r++)d[r].render();s!==this.getFirstChild()&&s.renderStatus(),l!==this.getLastChild()&&l.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===d.length?d[0]:null),a},addClass:function(e){return this.toggleClass(e,!0)},addNode:function(e,t){switch(void 0!==t&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var n=this.children?this.children[0]:null;return this.addChildren(e,n);case"child":case"over":return this.addChildren(e)}m(!1,"Invalid mode: "+t)},addPagingNode:function(t,n){var r,i;if(n=n||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,n);for(r=this.children.length-1;r>=0;r--)"paging"===(i=this.children[r]).statusNodeType&&this.removeChild(i);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyCommand:function(e,t){return this.tree.applyCommand(e,this,t)},applyPatch:function(t){if(null===t)return this.remove(),C(this);var n,r,i={children:!0,expanded:!0,parent:!0};for(n in t)t.hasOwnProperty(n)&&(r=t[n],i[n]||e.isFunction(r)||(v[n]?this[n]=r:this.data[n]=r));return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):C(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,r,i=this.children;if(!i)return 0;if(r=i.length,!1!==e)for(t=0,n=r;t<n;t++)r+=i[t].countChildren();return r},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),x("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),x("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:A(t);var n=[];return this.visit((function(e){t(e)&&n.push(e)})),n},findFirst:function(t){t=e.isFunction(t)?t:A(t);var n=null;return this.visit((function(e){if(t(e))return n=e,!1})),n},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,n=this.tree.options,i=r.evalOption("unselectable",this,this,n,!1),o=r.evalOption("unselectableStatus",this,this,n,void 0);switch(i&&null!=o&&(e=o),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:m(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit((function(e){if(e._changeSelectStatusAttrs(t),e.radiogroup)return"skip"})),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;m(3===t.selectMode,"expected selectMode 3"),function e(n){var i,o,a,s,l,d,c,u,h=n.children;if(h&&h.length){for(d=!0,c=!1,i=0,o=h.length;i<o;i++)s=e(a=h[i]),r.evalOption("unselectableIgnore",a,a,t,!1)||(!1!==s&&(c=!0),!0!==s&&(d=!1));l=!!d||!!c&&void 0}else l=null==(u=r.evalOption("unselectableStatus",n,n,t,void 0))?!!n.selected:!!u;return n.partsel&&!n.selected&&n.lazy&&null==n.children&&(l=void 0),n._changeSelectStatusAttrs(l),l}(this),this.visitParents((function(e){var n,i,o,a,s,l=e.children,d=!0,c=!1;for(n=0,i=l.length;n<i;n++)o=l[n],r.evalOption("unselectableIgnore",o,o,t,!1)||(((a=null==(s=r.evalOption("unselectableStatus",o,o,t,void 0))?!!o.selected:!!s)||o.partsel)&&(c=!0),a||(d=!1));a=!!d||!!c&&void 0,e._changeSelectStatusAttrs(a)}))},fromDict:function(t){for(var n in t)v[n]?this[n]=t[n]:"data"===n?e.extend(this.data,t.data):e.isFunction(t[n])||b[n]||(this.data[n]=t[n]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t,n){t=t||".";var r,i=[];return e.each(this.getParentList(!1,!0),(function(e,t){r=""+(t.getIndex()+1),n&&(r=("0000000"+r).substr(-n)),i.push(r)})),i.join(t)},getKeyPath:function(e){var t=this.tree.options.keyPathSeparator;return t+this.getPath(!e,"key",t)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=0,t=n.length-1;e<t;e++)if(n[e]===this)return n[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var n=[],r=t?this:this.parent;r;)(e||r.parent)&&n.unshift(r),r=r.parent;return n},getPath:function(t,n,r){t=!1!==t,n=n||"title",r=r||"/";var i,o=[],a=e.isFunction(n);return this.visitParents((function(e){e.parent&&(i=a?n(e):e[n],o.unshift(i))}),t),o.join(r)},getPrevSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=1,t=n.length;e<t;e++)if(n[e]===this)return n[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit((function(n){if(n.selected&&(t.push(n),!0===e))return"skip"})),t},hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasClass:function(e){return(" "+(this.extraClasses||"")+" ").indexOf(" "+e+" ")>=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),x("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.tree.enableFilter,r=this.getParentList(!1,!1);if(n&&!this.match&&!this.subMatchCount)return!1;for(e=0,t=r.length;e<t;e++)if(!r[e].expanded)return!1;return!0},lazyLoad:function(t){e.error("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.")},load:function(e){var t,n,r=this,i=this.isExpanded();return m(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(n=this.tree._triggerNodeEvent("lazyLoad",this))?C(this):(m("boolean"!=typeof n,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,n),i?(this.expanded=!0,t.always((function(){r.render()}))):t.always((function(){r.renderStatus()})),t)):C(this)},makeVisible:function(t){var n,r=this,i=[],o=new e.Deferred,a=this.getParentList(!1,!1),s=a.length,l=!(t&&!0===t.noAnimation),d=!(t&&!1===t.scrollIntoView);for(n=s-1;n>=0;n--)i.push(a[n].setExpanded(!0,t));return e.when.apply(e,i).done((function(){d?r.scrollIntoView(l).done((function(){o.resolve()})):o.resolve()})),o.promise()},moveTo:function(t,n,r){void 0===n||"over"===n?n="child":"firstChild"===n&&(t.children&&t.children.length?(n="before",t=t.children[0]):n="child");var i,o=this.tree,a=this.parent,s="child"===n?t:t.parent;if(this!==t){if(this.parent?s.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),s!==a&&a.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===s)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else m((i=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(i,1);if(this.parent=s,s.hasChildren())switch(n){case"child":s.children.push(this);break;case"before":m((i=e.inArray(t,s.children))>=0,"invalid target parent"),s.children.splice(i,0,this);break;case"after":m((i=e.inArray(t,s.children))>=0,"invalid target parent"),s.children.splice(i+1,0,this);break;default:e.error("Invalid mode "+n)}else s.children=[this];r&&t.visit(r,!0),s===a?s.triggerModifyChild("move",this):s.triggerModifyChild("add",this),o!==t.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit((function(e){e.tree=t.tree}),!0)),o._callHook("treeStructureChanged",o,"moveTo"),a.isDescendantOf(s)||a.render(),s.isDescendantOf(a)||s===a||s.render()}},navigate:function(t,n){var r,i=e.ui.keyCode;switch(t){case"left":case i.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case i.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(r=this.findRelatedNode(t)){try{r.makeVisible({scrollIntoView:!1})}catch(e){}return!1===n?(r.setFocus(),C()):r.setActive()}return this.warn("Could not find related node '"+t+"'."),C()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var r,i=this.parent,o=e.inArray(this,i.children),a=this;return m(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(r=this.tree._callHook("nodeLoadChildren",this,n)).done((function(e){var n=a.children;for(t=0;t<n.length;t++)n[t].parent=i;i.children.splice.apply(i.children,[o+1,0].concat(n)),a.children=null,a.remove(),i.render()})).fail((function(){a.setExpanded()})),r},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,n){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var r=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout((function(){r.tree.debug("setTimeout: trigger expand"),r.setExpanded(!0)}),n);break;case"activate":this.tree.timer=setTimeout((function(){r.tree.debug("setTimeout: trigger activate"),r.setActive(!0)}),n);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,n){if(void 0!==n&&(r=n).tree&&void 0!==r.statusNodeType)throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var r,i=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},n),o=i.scrollParent,a=this.tree.$container,s=a.css("overflow-y");o?o.jquery||(o=e(o)):o=this.tree.tbody?a.scrollParent():"scroll"===s||"auto"===s?a:a.scrollParent(),o[0]!==document&&o[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",o[0]),o=e(window));var l,d,c,u=new e.Deferred,h=this,f=e(this.span).height(),p=i.scrollOfs.top||0,g=i.scrollOfs.bottom||0,v=o.height(),y=o.scrollTop(),b=o,x=o[0]===window,k=i.topNode||null,N=null;return this.isRootNode()||!this.isVisible()?(this.info("scrollIntoView(): node is invisible."),C()):(x?(d=e(this.span).offset().top,l=k&&k.span?e(k.span).offset().top:0,b=e("html,body")):(m(o[0]!==document&&o[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),c=o.offset().top,d=e(this.span).offset().top-c+y,l=k?e(k.span).offset().top-c+y:0,v-=Math.max(0,o.innerHeight()-o[0].clientHeight)),d<y+p?N=d-p:d+f>y+v-g&&(N=d+f-v+g,k&&(m(k.isRootNode()||k.isVisible(),"topNode must be visible"),l<N&&(N=l-p))),null===N?u.resolveWith(this):i.effects?(i.effects.complete=function(){u.resolveWith(h)},b.stop(!0).animate({scrollTop:N},i.effects)):(b[0].scrollTop=N,u.resolveWith(this)),u.promise())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,r,i=this.children;if(i){if(e=e||function(e,t){var n=e.title.toLowerCase(),r=t.title.toLowerCase();return n===r?0:n>r?1:-1},i.sort(e),t)for(n=0,r=i.length;n<r;n++)i[n].children&&i[n].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,n){var r,i,o,a,s={},l=this;if(e.each(g,(function(e,t){(l[t]||!1===l[t])&&(s[t]=l[t])})),e.isEmptyObject(this.data)||(s.data=e.extend({},this.data),e.isEmptyObject(s.data)&&delete s.data),n){if(!1===(a=n(s,l)))return!1;"skip"===a&&(t=!1)}if(t&&e.isArray(this.children))for(s.children=[],r=0,i=this.children.length;r<i;r++)(o=this.children[r]).isStatusNode()||!1!==(a=o.toDict(!0,n))&&s.children.push(a);return s},toggleClass:function(t,n){var r,i,o=t.match(/\S+/g)||[],a=0,s=!1,l=this[this.tree.statusClassPropName],d=" "+(this.extraClasses||"")+" ";for(l&&e(l).toggleClass(t,n);r=o[a++];)if(i=d.indexOf(" "+r+" ")>=0,n=void 0===n?!i:!!n)i||(d+=r+" ",s=!0);else for(;d.indexOf(" "+r+" ")>-1;)d=d.replace(" "+r+" "," ");return this.extraClasses=e.trim(d),s},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,r){var i,o=this.tree.options.modifyChild;o&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),i={node:this,tree:this.tree,operation:t,childNode:n||null},r&&e.extend(i,r),o({type:"modifyChild"},i))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,r,i=!0,o=this.children;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(o)for(n=0,r=o.length;n<r&&!1!==(i=o[n].visit(e,!0));n++);return i},visitAndLoad:function(t,n,r){var i,o,a,s=this;return!t||!0!==n||!1!==(o=t(s))&&"skip"!==o?s.children||s.lazy?(i=new e.Deferred,a=[],s.load().done((function(){for(var n=0,r=s.children.length;n<r;n++){if(!1===(o=s.children[n].visitAndLoad(t,!0,!0))){i.reject();break}"skip"!==o&&a.push(o)}e.when.apply(this,a).then((function(){i.resolve()}))})),i.promise()):C():r?o:C()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var n=this.parent;n;){if(!1===e(n))return!1;n=n.parent}return!0},visitSiblings:function(e,t){var n,r,i,o=this.parent.children;for(n=0,r=o.length;n<r;n++)if(i=o[n],(t||i!==this)&&!1===e(i))return!1;return!0},warn:function(e){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),x("warn",arguments))}},P.prototype={_makeHookContext:function(t,n,r){var i,o;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),i=t):t.tree?i={node:t,tree:o=t.tree,widget:o.widget,options:o.widget.options,originalEvent:n,typeInfo:o.types[t.type]||{}}:t.widget?i={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),r&&e.extend(i,r),i},_callHook:function(t,n,r){var i=this._makeHookContext(n),o=this[t],a=Array.prototype.slice.call(arguments,2);return e.isFunction(o)||e.error("_callHook('"+t+"') is not a function"),a.unshift(i),o.apply(this,a)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_usesExtension:function(t){return e.inArray(t,this.options.extensions)>=0},_requireExtension:function(t,n,r,i){null!=r&&(r=!!r);var o=this._local.name,a=this.options.extensions,s=e.inArray(t,a)<e.inArray(o,a),l=n&&null==this.ext[t],d=!l&&null!=r&&r!==s;return m(o&&o!==t,"invalid or same name '"+o+"' (require yourself?)"),!l&&!d||(i||(l||n?(i="'"+o+"' extension requires '"+t+"'",d&&(i+=" to be registered "+(r?"before":"after")+" itself")):i="If used together, `"+t+"` must be registered "+(r?"before":"after")+" `"+o+"`"),e.error(i),!1)},activateKey:function(e,t){var n=this.getNodeByKey(e);return n?n.setActive(!0,t):this.activeNode&&this.activeNode.setActive(!1,t),n},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyCommand:function(t,n,r){var i;switch(n=n||this.getActiveNode(),t){case"moveUp":(i=n.getPrevSibling())&&(n.moveTo(i,"before"),n.setActive());break;case"moveDown":(i=n.getNextSibling())&&(n.moveTo(i,"after"),n.setActive());break;case"indent":(i=n.getPrevSibling())&&(n.moveTo(i,"child"),i.setExpanded(),n.setActive());break;case"outdent":n.isTopLevel()||(n.moveTo(n.getParent(),"after"),n.setActive());break;case"remove":i=n.getPrevSibling()||n.getParent(),n.remove(),i&&i.setActive();break;case"addChild":n.editCreateNode("child","");break;case"addSibling":n.editCreateNode("after","");break;case"rename":n.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return n.navigate(t);default:e.error("Unhandled command: '"+t+"'")}},applyPatch:function(t){var n,r,i,o,a,s,l=t.length,d=[];for(r=0;r<l;r++)m(2===(i=t[r]).length,"patchList must be an array of length-2-arrays"),o=i[0],a=i[1],(s=null===o?this.rootNode:this.getNodeByKey(o))?(n=new e.Deferred,d.push(n),s.applyPatch(a).always(S(n,s))):this.warn("could not find node with key '"+o+"'");return e.when.apply(e,d).promise()},clear:function(e){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(e){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),x("log",arguments))},destroy:function(){this.widget.destroy()},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!e)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),x("error",arguments))},expandAll:function(e,t){var n=this.enableUpdate(!1);e=!1!==e,this.visit((function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)})),this.enableUpdate(n)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var n,r=null,i=this.getFirstChild();function o(n){if(e(n)&&(r=n),r||n===t)return!1}return e="string"==typeof e?(n=new RegExp("^"+e,"i"),function(e){return n.test(e.title)}):e,t=t||i,this.visitRows(o,{start:t,includeSelf:!1}),r||t===i||this.visitRows(o,{start:i,includeSelf:!0}),r},findRelatedNode:function(t,n,r){var i=null,o=e.ui.keyCode;switch(n){case"parent":case o.BACKSPACE:t.parent&&t.parent.parent&&(i=t.parent);break;case"first":case o.HOME:this.visit((function(e){if(e.isVisible())return i=e,!1}));break;case"last":case o.END:this.visit((function(e){e.isVisible()&&(i=e)}));break;case"left":case o.LEFT:t.expanded?t.setExpanded(!1):t.parent&&t.parent.parent&&(i=t.parent);break;case"right":case o.RIGHT:t.expanded||!t.children&&!t.lazy?t.children&&t.children.length&&(i=t.children[0]):(t.setExpanded(),i=t);break;case"up":case o.UP:this.visitRows((function(e){return i=e,!1}),{start:t,reverse:!0,includeSelf:!1});break;case"down":case o.DOWN:this.visitRows((function(e){return i=e,!1}),{start:t,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+n+"'.")}return i},generateFormElements:function(t,n,r){r=r||{};var i,o="string"==typeof t?t:"ft_"+this._id+"[]",a="string"==typeof n?n:"ft_"+this._id+"_active",s="fancytree_result_"+this._id,l=e("#"+s),d=3===this.options.selectMode&&!1!==r.stopOnParents;function c(t){l.append(e("<input>",{type:"checkbox",name:o,value:t.key,checked:!0}))}l.length?l.empty():l=e("<div>",{id:s}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&l.append(e("<input>",{type:"radio",name:a,value:this.activeNode.key,checked:!0})),r.filter?this.visit((function(e){var t=r.filter(e);if("skip"===t)return t;!1!==t&&c(e)})):!1!==t&&(i=this.getSelectedNodes(d),e.each(i,(function(e,t){c(t)})))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(e){return this.widget.option(e)},getNodeByKey:function(e,t){var n,r;return!t&&(n=document.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,r=null,e=""+e,t.visit((function(t){if(t.key===e)return r=t,!1}),!0),r)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),x("info",arguments))},isLoading:function(){var e=!1;return this.rootNode.visit((function(t){if(t._isLoading||t._requestId)return e=!0,!1}),!0),e},loadKeyPath:function(t,n){var r,i,o,a=this,s=new e.Deferred,l=this.getRootNode(),d=this.options.keyPathSeparator,c=[],u=e.extend({},n);for("function"==typeof n?r=n:n&&n.callback&&(r=n.callback),u.callback=function(e,t,n){r&&r.call(e,t,n),s.notifyWith(e,[{node:t,status:n}])},null==u.matchKey&&(u.matchKey=function(e,t){return e.key===t}),e.isArray(t)||(t=[t]),i=0;i<t.length;i++)(o=t[i]).charAt(0)===d&&(o=o.substr(1)),c.push(o.split(d));return setTimeout((function(){a._loadKeyPathImpl(s,u,l,c).done((function(){s.resolve()}))}),0),s.promise()},_loadKeyPathImpl:function(t,n,r,i){var o,a,s,l,d,c,u,h,f,p,g=this;function v(e,t){var r,i,o=e.children;if(o)for(r=0,i=o.length;r<i;r++)if(n.matchKey(o[r],t))return o[r];return null}for(u={},a=0;a<i.length;a++)for(f=i[a],h=r;f.length;){if(s=f.shift(),!(l=v(h,s))){this.warn("loadKeyPath: key not found: "+s+" (parent: "+h+")"),n.callback(this,s,"error");break}if(0===f.length){n.callback(this,l,"ok");break}if(l.lazy&&void 0===l.hasChildren()){n.callback(this,l,"loaded"),u[s=l.key]?u[s].pathSegList.push(f):u[s]={parent:l,pathSegList:[f]};break}n.callback(this,l,"loaded"),h=l}function y(e,t,r){n.callback(g,t,"loading"),t.load().done((function(){g._loadKeyPathImpl.call(g,e,n,t,r).always(S(e,g))})).fail((function(r){g.warn("loadKeyPath: error loading lazy "+t),n.callback(g,l,"error"),e.rejectWith(g)}))}for(d in o=[],u)u.hasOwnProperty(d)&&(c=u[d],p=new e.Deferred,o.push(p),y(p,c.parent,c.pathSegList));return e.when.apply(e,o).promise()},reactivate:function(e){var t,n=this.activeNode;return n?(this.activeNode=null,t=n.setActive(!0,{noFocus:!0}),e&&n.setFocus(),t):C()},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},selectAll:function(e){this.visit((function(t){t.setSelected(e)}))},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},setOption:function(e,t){return this.widget.option(e,t)},debugTime:function(e){this.options.debugLevel>=4&&window.console.time(this+" - "+e)},debugTimeEnd:function(e){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+e)},toDict:function(e,t){var n=this.rootNode.toDict(!0,t);return e?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,n,r){var i=this._makeHookContext(t,n,r),o=this.widget._trigger(e,n,i);return!1!==o&&void 0!==i.result?i.result:o},_triggerTreeEvent:function(e,t,n){var r=this._makeHookContext(this,t,n),i=this.widget._trigger(e,t,r);return!1!==i&&void 0!==r.result?r.result:i},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.hasChildren())return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var n,r,i,o=0,a=!1===(t=t||{}).includeSelf,s=!!t.includeHidden,l=!s&&this.enableFilter,d=t.start||this.rootNode.children[0];for(r=d.parent;r;){for(n=(i=r.children).indexOf(d)+o;n<i.length;n++)if(d=i[n],!l||d.match||d.subMatchCount){if(!a&&!1===e(d))return!1;if(a=!1,d.children&&d.children.length&&(s||d.expanded)&&!1===d.visit((function(t){return!l||t.match||t.subMatchCount?!1!==e(t)&&(s||!t.children||t.expanded?void 0:"skip"):"skip"}),!1))return!1}d=r,r=r.parent,o=1}return!0},_visitRowsUp:function(e,t){for(var n,r,i,o=!!t.includeHidden,a=t.start||this.rootNode.children[0];;){if((n=(i=a.parent).children)[0]===a){if(!(a=i).parent)break;n=i.children}else for(r=n.indexOf(a),a=n[r-1];(o||a.expanded)&&a.children&&a.children.length;)i=a,a=(n=a.children)[n.length-1];if((o||a.isVisible())&&!1===e(a))return!1}},warn:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),x("warn",arguments))}},e.extend(P.prototype,{nodeClick:function(e){var t,n,r=e.targetType,i=e.node;if("expander"===r){if(i.isLoading())return void i.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===r)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(n=!1,t=!0,i.folder)switch(e.options.clickFolderMode){case 2:n=!0,t=!1;break;case 3:t=!0,n=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),n&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var n,r,i,o=e.node;if(o.parent)for(r=0,i=(n=o.parent.children).length;r<i;r++)n[r]!==o&&n[r].expanded&&this._callHook("nodeSetExpanded",n[r],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var n,i,o,a=t.originalEvent,s=t.node,l=t.tree,u=t.options,h=a.which,f=a.key||String.fromCharCode(h),p=!!(a.altKey||a.ctrlKey||a.metaKey),g=!c[h]&&!d[h]&&!p,v=e(a.target),y=!0,b=!(a.ctrlKey||!u.autoActivate);if(s||(o=this.getActiveNode()||this.getFirstChild())&&(o.setFocus(),(s=t.node=this.focusNode).debug("Keydown force focus on active node")),u.quicksearch&&g&&!v.is(":input:enabled"))return(i=Date.now())-l.lastQuicksearchTime>500&&(l.lastQuicksearchTerm=""),l.lastQuicksearchTime=i,l.lastQuicksearchTerm+=f,(n=l.findNextNode(l.lastQuicksearchTerm,l.getActiveNode()))&&n.setActive(),void a.preventDefault();switch(r.eventToString(a)){case"+":case"=":l.nodeSetExpanded(t,!0);break;case"-":l.nodeSetExpanded(t,!1);break;case"space":s.isPagingNode()?l._triggerNodeEvent("clickPaging",t,a):r.evalOption("checkbox",s,s,u,!1)?l.nodeToggleSelected(t):l.nodeSetActive(t,!0);break;case"return":l.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":s.navigate(a.which,b);break;default:y=!1}y&&a.preventDefault()},nodeLoadChildren:function(t,n){var r,i,o,a=null,s=!0,l=t.tree,d=t.node,c=d.parent,u="nodeLoadChildren",h=Date.now();return e.isFunction(n)&&(n=n.call(l,{type:"source"},t),m(!e.isFunction(n),"source callback must not return another function")),e.isFunction(n.then)?a=n:n.url?(r=e.extend({},t.options.ajax,n)).debugDelay?(i=r.debugDelay,delete r.debugDelay,e.isArray(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),d.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),a=e.Deferred((function(t){setTimeout((function(){e.ajax(r).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),i)}))):a=e.ajax(r):e.isPlainObject(n)||e.isArray(n)?(a={then:function(e,t){e(n,null,null)}},s=!1):e.error("Invalid source type: "+n),d._requestId&&(d.warn("Recursive load request #"+h+" while #"+d._requestId+" is pending."),d._requestId=h),s&&(l.debugTime(u),l.nodeSetStatus(t,"loading")),o=new e.Deferred,a.then((function(r,i,a){var s,u;if("json"!==n.dataType&&"jsonp"!==n.dataType||"string"!=typeof r||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),d._requestId&&d._requestId>h)o.rejectWith(this,["$recursive_request"]);else if(null!==d.parent||null===c){if(t.options.postProcess){try{(u=l._triggerNodeEvent("postProcess",t,t.originalEvent,{response:r,error:null,dataType:n.dataType})).error&&l.warn("postProcess returned error:",u)}catch(e){u={error:e,message:""+e,details:"postProcess failed"}}if(u.error)return s=e.isPlainObject(u.error)?u.error:{message:u.error},s=l._makeHookContext(d,null,s),void o.rejectWith(this,[s]);(e.isArray(u)||e.isPlainObject(u)&&e.isArray(u.children))&&(r=u)}else r&&r.hasOwnProperty("d")&&t.options.enableAspx&&(42===t.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),r="string"==typeof r.d?e.parseJSON(r.d):r.d);o.resolveWith(this,[r])}else o.rejectWith(this,["$request_target_invalid"])}),(function(e,t,n){var r=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:n,details:e.status+": "+n});o.rejectWith(this,[r])})),o.done((function(n){var r,i,o;l.nodeSetStatus(t,"ok"),e.isPlainObject(n)?(m(d.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),m(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,r=n.children,delete i.children,e.each(p,(function(e,t){void 0!==i[t]&&(l[t]=i[t],delete i[t])})),e.extend(l.data,i)):r=n,m(e.isArray(r),"expected array of children"),d._setChildren(r),l.options.nodata&&0===r.length&&(e.isFunction(l.options.nodata)?o=l.options.nodata.call(l,{type:"nodata"},t):!0===l.options.nodata&&d.isRootNode()?o=l.options.strings.noData:"string"==typeof l.options.nodata&&d.isRootNode()&&(o=l.options.nodata),o&&d.setStatus("nodata",o)),l._triggerNodeEvent("loadChildren",d)})).fail((function(e){var n;"$recursive_request"!==e?"$request_target_invalid"!==e?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),d.warn("Load children failed ("+n.message+")",n),!1!==l._triggerNodeEvent("loadError",n,null)&&l.nodeSetStatus(t,"error",n.message,n.details)):d.warn("Lazy parent node was removed while loading: discarding response."):d.warn("Ignored response for obsolete load request #"+h+" (expected #"+d._requestId+")")})).always((function(){d._requestId=null,s&&l.debugTimeEnd(u)})),o.promise()},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,n){var r,i=t.node,o=e.extend({},t,{node:n}),a=i.children;if(1===a.length)return m(n===a[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(o),this.nodeRemoveChildren(o),m((r=e.inArray(n,a))>=0,"invalid child"),i.triggerModifyChild("remove",n),n.visit((function(e){e.parent=null}),!0),this._callHook("treeRegisterNode",this,!1,n),a.splice(r,1)},nodeRemoveChildMarkup:function(t){var n=t.node;n.ul&&(n.isRootNode()?e(n.ul).empty():(e(n.ul).remove(),n.ul=null),n.visit((function(e){e.li=e.ul=null})))},nodeRemoveChildren:function(e){var t=e.tree,n=e.node;n.children&&(this.activeNode&&this.activeNode.isDescendantOf(n)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(n)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),n.triggerModifyChild("remove",null),n.visit((function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)})),n.lazy?n.children=[]:n.children=null,n.isRootNode()||(n.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var n=t.node;n.li&&(e(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,r,i,o){var a,s,l,d,c,u,h,f=t.node,p=t.tree,g=t.options,v=g.aria,y=!1,b=f.parent,x=!b,k=f.children,N=null;if(!1!==p._enableUpdate&&(x||b.ul)){if(m(x||b.ul,"parent UL must exist"),x||(f.li&&(n||f.li.parentNode!==f.parent.ul)&&(f.li.parentNode===f.parent.ul?N=f.li.nextSibling:this.debug("Unlinking "+f+" (must be child of "+f.parent+")"),this.nodeRemoveMarkup(t)),f.li?this.nodeRenderStatus(t):(y=!0,f.li=document.createElement("li"),f.li.ftnode=f,f.key&&g.generateIds&&(f.li.id=g.idPrefix+f.key),f.span=document.createElement("span"),f.span.className="fancytree-node",v&&!f.tr&&e(f.li).attr("role","treeitem"),f.li.appendChild(f.span),this.nodeRenderTitle(t),g.createNode&&g.createNode.call(p,{type:"createNode"},t)),g.renderNode&&g.renderNode.call(p,{type:"renderNode"},t)),k){if(x||f.expanded||!0===r){for(f.ul||(f.ul=document.createElement("ul"),(!0!==i||o)&&f.expanded||(f.ul.style.display="none"),v&&e(f.ul).attr("role","group"),f.li?f.li.appendChild(f.ul):f.tree.$div.append(f.ul)),d=0,c=k.length;d<c;d++)h=e.extend({},t,{node:k[d]}),this.nodeRender(h,n,r,!1,!0);for(a=f.ul.firstChild;a;)(l=a.ftnode)&&l.parent!==f?(f.debug("_fixParent: remove missing "+l,a),u=a.nextSibling,a.parentNode.removeChild(a),a=u):a=a.nextSibling;for(a=f.ul.firstChild,d=0,c=k.length-1;d<c;d++)(s=k[d])===(l=a.ftnode)?a=a.nextSibling:f.ul.insertBefore(s.li,l.li)}}else f.ul&&(this.warn("remove child markup for "+f),this.nodeRemoveChildMarkup(t));x||y&&b.ul.insertBefore(f.li,N)}},nodeRenderTitle:function(t,n){var o,a,s,l,d,c,u,h=t.node,f=t.tree,p=t.options,g=p.aria,v=h.getLevel(),y=[];void 0!==n&&(h.title=n),h.span&&!1!==f._enableUpdate&&(d=g&&!1!==h.hasChildren()?" role='button'":"",v<p.minExpandLevel?(h.lazy||(h.expanded=!0),v>1&&y.push("<span "+d+" class='fancytree-expander fancytree-expander-fixed'></span>")):y.push("<span "+d+" class='fancytree-expander'></span>"),(o=r.evalOption("checkbox",h,h,p,!1))&&!h.isStatusNode()&&(d=g?" role='checkbox'":"",a="fancytree-checkbox",("radio"===o||h.parent&&h.parent.radiogroup)&&(a+=" fancytree-radio"),y.push("<span "+d+" class='"+a+"'></span>")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(s=r.evalOption("icon",h,h,p,!0))&&(d=g?" role='presentation'":"",u=(u=r.evalOption("iconTooltip",h,h,p,null))?" title='"+T(u)+"'":"","string"==typeof s?i.test(s)?(s="/"===s.charAt(0)?s:(p.imagePath||"")+s,y.push("<img src='"+s+"' class='fancytree-icon'"+u+" alt='' />")):y.push("<span "+d+" class='fancytree-custom-icon "+s+"'"+u+"></span>"):s.text?y.push("<span "+d+" class='fancytree-custom-icon "+(s.addClass||"")+"'"+u+">"+r.escapeHtml(s.text)+"</span>"):s.html?y.push("<span "+d+" class='fancytree-custom-icon "+(s.addClass||"")+"'"+u+">"+s.html+"</span>"):y.push("<span "+d+" class='fancytree-icon'"+u+"></span>")),l="",p.renderTitle&&(l=p.renderTitle.call(f,{type:"renderTitle"},t)||""),l||(!0===(c=r.evalOption("tooltip",h,h,p,null))&&(c=h.title),l="<span class='fancytree-title'"+(c=c?" title='"+T(c)+"'":"")+(p.titlesTabbable?" tabindex='0'":"")+">"+(p.escapeTitles?r.escapeHtml(h.title):h.title)+"</span>"),y.push(l),h.span.innerHTML=y.join(""),this.nodeRenderStatus(t),p.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),l=p.enhanceTitle.call(f,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var n,i=t.node,o=t.tree,a=t.options,s=i.hasChildren(),l=i.isLastSibling(),d=a.aria,c=a._classNames,u=[],h=i[o.statusClassPropName];h&&!1!==o._enableUpdate&&(d&&(n=e(i.tr||i.li)),u.push(c.node),o.activeNode===i&&u.push(c.active),o.focusNode===i&&u.push(c.focused),i.expanded&&u.push(c.expanded),d&&(!1===s?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(i.expanded))),i.folder&&u.push(c.folder),!1!==s&&u.push(c.hasChildren),l&&u.push(c.lastsib),i.lazy&&null==i.children&&u.push(c.lazy),i.partload&&u.push(c.partload),i.partsel&&u.push(c.partsel),r.evalOption("unselectable",i,i,a,!1)&&u.push(c.unselectable),i._isLoading&&u.push(c.loading),i._error&&u.push(c.error),i.statusNodeType&&u.push(c.statusNodePrefix+i.statusNodeType),i.selected?(u.push(c.selected),d&&n.attr("aria-selected",!0)):d&&n.attr("aria-selected",!1),i.extraClasses&&u.push(i.extraClasses),!1===s?u.push(c.combinedExpanderPrefix+"n"+(l?"l":"")):u.push(c.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(l?"l":"")),u.push(c.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=u.join(" "),i.li&&e(i.li).toggleClass(c.lastsib,l))},nodeSetActive:function(t,n,r){r=r||{};var i,o=t.node,a=t.tree,s=t.options,l=!0===r.noEvents,d=!0===r.noFocus,c=!1!==r.scrollIntoView;return o===a.activeNode==(n=!1!==n)?C(o):n&&!l&&!1===this._triggerNodeEvent("beforeActivate",o,t.originalEvent)?_(o,["rejected"]):(n?(a.activeNode&&(m(a.activeNode!==o,"node was active (inconsistency)"),i=e.extend({},t,{node:a.activeNode}),a.nodeSetActive(i,!1),m(null===a.activeNode,"deactivate was out of sync?")),s.activeVisible&&o.makeVisible({scrollIntoView:c}),a.activeNode=o,a.nodeRenderStatus(t),d||a.nodeSetFocus(t),l||a._triggerNodeEvent("activate",o,t.originalEvent)):(m(a.activeNode===o,"node was not active (inconsistency)"),a.activeNode=null,this.nodeRenderStatus(t),l||t.tree._triggerNodeEvent("deactivate",o,t.originalEvent)),C(o))},nodeSetExpanded:function(t,n,r){r=r||{};var i,o,a,s,l,d,c=t.node,u=t.tree,h=t.options,f=!0===r.noAnimation,p=!0===r.noEvents;if(n=!1!==n,c.expanded&&n||!c.expanded&&!n)return C(c);if(n&&!c.lazy&&!c.hasChildren())return C(c);if(!n&&c.getLevel()<h.minExpandLevel)return _(c,["locked"]);if(!p&&!1===this._triggerNodeEvent("beforeExpand",c,t.originalEvent))return _(c,["rejected"]);if(f||c.isVisible()||(f=r.noAnimation=!0),o=new e.Deferred,n&&!c.expanded&&h.autoCollapse){l=c.getParentList(!1,!0),d=h.autoCollapse;try{for(h.autoCollapse=!1,a=0,s=l.length;a<s;a++)this._callHook("nodeCollapseSiblings",l[a],r)}finally{h.autoCollapse=d}}return o.done((function(){var e=c.getLastChild();n&&h.autoScroll&&!f&&e&&u._enableUpdate?e.scrollIntoView(!0,{topNode:c}).always((function(){p||t.tree._triggerNodeEvent(n?"expand":"collapse",t)})):p||t.tree._triggerNodeEvent(n?"expand":"collapse",t)})),i=function(r){var i=h._classNames,o=h.toggleEffect;if(c.expanded=n,u._callHook("treeStructureChanged",t,n?"expand":"collapse"),u._callHook("nodeRender",t,!1,!1,!0),c.ul)if("none"!==c.ul.style.display==!!c.expanded)c.warn("nodeSetExpanded: UL.style.display already set");else{if(o&&!f)return e(c.li).addClass(i.animating),void(e.isFunction(e(c.ul)[o.effect])?e(c.ul)[o.effect]({duration:o.duration,always:function(){e(this).removeClass(i.animating),e(c.li).removeClass(i.animating),r()}}):(e(c.ul).stop(!0,!0),e(c.ul).parent().find(".ui-effects-placeholder").remove(),e(c.ul).toggle(o.effect,o.options,o.duration,(function(){e(this).removeClass(i.animating),e(c.li).removeClass(i.animating),r()}))));c.ul.style.display=c.expanded||!parent?"":"none"}r()},n&&c.lazy&&void 0===c.hasChildren()?c.load().done((function(){o.notifyWith&&o.notifyWith(c,["loaded"]),i((function(){o.resolveWith(c)}))})).fail((function(e){i((function(){o.rejectWith(c,["load failed ("+e+")"])}))})):i((function(){o.resolveWith(c)})),o.promise()},nodeSetFocus:function(t,n){var r,i=t.tree,o=t.node,a=i.options,s=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(n=!1!==n,i.focusNode){if(i.focusNode===o&&n)return;r=e.extend({},t,{node:i.focusNode}),i.focusNode=null,this._triggerNodeEvent("blur",r),this._callHook("nodeRenderStatus",r)}n&&(this.hasFocus()||(o.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),o.makeVisible({scrollIntoView:!1}),i.focusNode=o,a.titlesTabbable&&(s||e(o.span).find(".fancytree-title").focus()),a.aria&&e(i.$container).attr("aria-activedescendant",e(o.tr||o.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",t),document.activeElement===i.$container.get(0)||e(document.activeElement,i.$container).length>=1||e(i.$container).focus(),a.autoScroll&&o.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,n){n=n||{};var i=e.node,o=e.tree,a=e.options,s=!0===n.noEvents,l=i.parent;if(t=!1!==t,!r.evalOption("unselectable",i,i,a,!1)){if(i._lastSelectIntent=t,!!i.selected===t&&(3!==a.selectMode||!i.partsel||t))return t;if(!s&&!1===this._triggerNodeEvent("beforeSelect",i,e.originalEvent))return!!i.selected;t&&1===a.selectMode?(o.lastSelectedNode&&o.lastSelectedNode.setSelected(!1),i.selected=t):3!==a.selectMode||!l||l.radiogroup||i.radiogroup?l&&l.radiogroup?i.visitSiblings((function(e){e._changeSelectStatusAttrs(t&&e===i)}),!0):i.selected=t:(i.selected=t,i.fixSelection3AfterClick(n)),this.nodeRenderStatus(e),o.lastSelectedNode=t?i:null,s||o._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,n,r,i){var o=t.node,a=t.tree;function s(n,r){var i=o.children?o.children[0]:null;return i&&i.isStatusNode()?(e.extend(i,n),i.statusNodeType=r,a._callHook("nodeRenderTitle",i)):(o._setChildren([n]),a._callHook("treeStructureChanged",t,"setStatusNode"),o.children[0].statusNodeType=r,a.render()),o.children[0]}switch(n){case"ok":!function(){var e=o.children?o.children[0]:null;if(e&&e.isStatusNode()){try{o.ul&&(o.ul.removeChild(e.li),e.li=null)}catch(e){}1===o.children.length?o.children=[]:o.children.shift(),a._callHook("treeStructureChanged",t,"clearStatusNode")}}(),o._isLoading=!1,o._error=null,o.renderStatus();break;case"loading":o.parent||s({title:a.options.strings.loading+(r?" ("+r+")":""),checkbox:!1,tooltip:i},n),o._isLoading=!0,o._error=null,o.renderStatus();break;case"error":s({title:a.options.strings.loadError+(r?" ("+r+")":""),checkbox:!1,tooltip:i},n),o._isLoading=!1,o._error={message:r,details:i},o.renderStatus();break;case"nodata":s({title:r||a.options.strings.noData,checkbox:!1,tooltip:i},n),o._isLoading=!1,o._error=null,o.renderStatus();break;default:e.error("invalid node status "+n)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,n=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(n=!1,t.selected=!0),t._lastSelectIntent=n,this.nodeSetSelected(e,n)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null,t._callHook("treeStructureChanged",e,"clear")},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var n=t.tree,r=n.options;n.$container.attr("tabindex",r.tabindex),e.each(p,(function(e,t){void 0!==r[t]&&(n.info("Move option "+t+" to tree"),n[t]=r[t],delete r[t])})),r.checkboxAutoHide&&n.$container.addClass("fancytree-checkbox-auto-hide"),r.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),r.aria&&(n.$container.attr("role","tree"),1!==r.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,n){var i,o,a,s=t.tree,l=t.widget.element,d=e.extend({},t,{node:this.rootNode});if(s.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(o=l.data("type")||"html"){case"html":(a=l.find(">ul").not(".fancytree-container").first()).length?(a.addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(a),this.data=e.extend(this.data,E(a))):(r.warn("No `source` option was passed and container does not contain `<ul>`: assuming `source: []`."),n=[]);break;case"json":n=e.parseJSON(l.text()),l.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(n)&&(m(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,n=n.children,delete i.children,e.each(p,(function(e,t){void 0!==i[t]&&(s[t]=i[t],delete i[t])})),e.extend(s.data,i));break;default:e.error("Invalid data-type: "+o)}return s._triggerTreeEvent("preInit",null),this.nodeLoadChildren(d,n).done((function(){s._callHook("treeStructureChanged",t,"loadChildren"),s.render(),3===t.options.selectMode&&s.rootNode.fixSelection3FromEndNodes(),s.activeNode&&s.options.activeVisible&&s.activeNode.makeVisible(),s._triggerTreeEvent("init",null,{status:!0})})).fail((function(){s.render(),s._triggerTreeEvent("init",null,{status:!1})}))},treeRegisterNode:function(e,t,n){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,n,r){var i;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||r&&r.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(i=this._lastMousedownNode||this.getFirstChild())&&i.setFocus())},treeSetOption:function(t,n,r){var i=t.tree,o=!0,a=!1,s=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":a=!0,s=!0;break;case"checkboxAutoHide":i.$container.toggleClass("fancytree-checkbox-auto-hide",!!r);break;case"escapeTitles":case"tooltip":s=!0;break;case"rtl":!1===r?i.$container.removeAttr("DIR").removeClass("fancytree-rtl"):i.$container.attr("DIR","RTL").addClass("fancytree-rtl"),s=!0;break;case"source":o=!1,i._callHook("treeLoad",i,r),s=!0}i.debug("set option "+n+"="+r+" <"+typeof r+">"),o&&(this.widget._super?this.widget._super.call(this.widget,n,r):e.Widget.prototype._setOption.call(this.widget,n,r)),a&&i._callHook("treeCreate",i),s&&i.render(!0,!1)},treeStructureChanged:function(e,t){}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(e){var t=this.tree;t&&t.options.debugLevel>=3&&t.warn("$().fancytree('"+e+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new P(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,n,r,i=this.options,o=i.extensions;this.tree;for(r=0;r<o.length;r++)n=o[r],(t=e.ui.fancytree._extensions[n])||e.error("Could not apply extension '"+n+"' (it is not registered, did you forget to include it?)"),this.tree.options[n]=k({},t.options,this.tree.options[n]),m(void 0===this.tree.ext[n],"Extension name must not exist as Fancytree.ext attribute: '"+n+"'"),this.tree.ext[n]={},w(this.tree,0,t,n),t;void 0!==i.icons&&(!0===i.icon?(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.icons):e.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead")),void 0!==i.iconClass&&(i.icon?e.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.iconClass)),void 0!==i.tabbable&&(i.tabindex=i.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+i.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(e,t){return this.tree._callHook("treeSetOption",this.tree,e,t)},_destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree)},_unbind:function(){var t=this.tree._ns;this.element.off(t),this.tree.$container.off(t),e(document).off(t)},_bind:function(){var t=this,n=this.options,i=this.tree,o=i._ns;this._unbind(),i.$container.on("focusin"+o+" focusout"+o,(function(t){var n=r.getNode(t),o="focusin"===t.type;if(!o&&n&&e(t.target).is("a"))n.debug("Ignored focusout on embedded <a> element.");else{if(o){if(i._getExpiringValue("focusin"))return void i.debug("Ignored double focusin.");i._setExpiringValue("focusin",!0,50),n||(n=i._getExpiringValue("mouseDownNode"))&&i.debug("Reconstruct mouse target for focusin from recent event.")}n?i._callHook("nodeSetFocus",i._makeHookContext(n,t),o):i.tbody&&e(t.target).parents("table.fancytree-container > thead").length?i.debug("Ignore focus event outside table body.",t):i._callHook("treeSetFocus",i,o)}})).on("selectstart"+o,"span.fancytree-title",(function(e){e.preventDefault()})).on("keydown"+o,(function(e){if(n.disabled||!1===n.keyboard)return!0;var t,r=i.focusNode,o=i._makeHookContext(r||i,e),a=i.phase;try{return i.phase="userEvent","preventNav"===(t=r?i._triggerNodeEvent("keydown",r,e):i._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=i._callHook("nodeKeydown",o)),t}finally{i.phase=a}})).on("mousedown"+o,(function(e){var t=r.getEventTarget(e);i._lastMousedownNode=t?t.node:null,i._setExpiringValue("mouseDownNode",i._lastMousedownNode)})).on("click"+o+" dblclick"+o,(function(e){if(n.disabled)return!0;var i,o=r.getEventTarget(e),a=o.node,s=t.tree,l=s.phase;if(!a)return!0;i=s._makeHookContext(a,e);try{switch(s.phase="userEvent",e.type){case"click":return i.targetType=o.type,a.isPagingNode()?!0===s._triggerNodeEvent("clickPaging",i,e):!1!==s._triggerNodeEvent("click",i,e)&&s._callHook("nodeClick",i);case"dblclick":return i.targetType=o.type,!1!==s._triggerNodeEvent("dblclick",i,e)&&s._callHook("nodeDblclick",i)}}finally{s.phase=l}}))},getActiveNode:function(){return this._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(e){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(e)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),r=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.36.1",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:P,_FancytreeNodeClass:L,jquerySupports:{positionMyOfs:function(t,n,r,i){var o,a,s,l=e.map(e.trim(t).split("."),(function(e){return parseInt(e,10)})),d=e.map(Array.prototype.slice.call(arguments,1),(function(e){return parseInt(e,10)}));for(o=0;o<d.length;o++)if(a=l[o]||0,s=d[o]||0,a!==s)return a>s;return!0}(e.ui.version,1,9)},assert:function(e,t){return m(e,t)},createTree:function(t,n){var i=e(t).fancytree(n);return r.getTree(i)},debounce:function(e,t,n,r){var i;return 3===arguments.length&&"boolean"!=typeof n&&(r=n,n=!1),function(){var o=arguments;r=r||this,n&&!i&&t.apply(r,o),clearTimeout(i),i=setTimeout((function(){n||t.apply(r,o),i=null}),e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&x("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&x("error",arguments)},escapeHtml:function(e){return(""+e).replace(o,(function(e){return s[e]}))},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),r=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),i=(n[2]?+n[2]:0)+(r[2]?+r[2]:0),o=(n[4]?+n[4]:0)+(r[4]?+r[4]:0);t=e.extend({},t,{my:n[1]+" "+n[3],at:r[1]+" "+r[3]}),(i||o)&&(t.offset=i+" "+o)}return t},getEventTarget:function(t){var n,i=t&&t.target?t.target.className:"",o={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(i)?o.type="title":/\bfancytree-expander\b/.test(i)?o.type=!1===o.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)?o.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(i)?o.type="icon":/\bfancytree-node\b/.test(i)?o.type="title":t&&t.target&&((n=e(t.target)).is("ul[role=group]")?((o.node&&o.node.tree||r).debug("Ignoring click on outer UL."),o.node=null):n.closest(".fancytree-title").length?o.type="title":n.closest(".fancytree-checkbox").length?o.type="checkbox":n.closest(".fancytree-expander").length&&(o.type="expander")),o},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof L)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var n,r=t;return t instanceof P?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+r).eq(0)).length||(t=e(r).eq(0)):t instanceof Element||t instanceof HTMLDocument?t=e(t):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(n=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?n.tree:null)},evalOption:function(t,n,r,i,o){var a,s,l=n.tree,d=i[t],c=r[t];return e.isFunction(d)?(a={node:n,tree:l,widget:l.widget,options:l.widget.options,typeInfo:l.types[n.type]||{}},null==(s=d.call(l,{type:t},a))&&(s=c)):s=null==c?d:c,null==s&&(s=o),s},setSpanIcon:function(t,n,r){var i=e(t);"string"==typeof r?i.attr("class",n+" "+r):(r.text?i.text(""+r.text):r.html&&(t.innerHTML=r.html),i.attr("class",n+" "+(r.addClass||"")))},eventToString:function(e){var t=e.which,n=e.type,r=[];return e.altKey&&r.push("alt"),e.ctrlKey&&r.push("ctrl"),e.metaKey&&r.push("meta"),e.shiftKey&&r.push("shift"),"click"===n||"dblclick"===n?r.push(u[e.button]+n):"wheel"===n?r.push(n):l[t]||r.push(d[t]||String.fromCharCode(t).toLowerCase()),r.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&x("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,n,r,i){var o,a=t[n]||e.noop;t[n]=function(){var e=i||this;try{return o=e._super,e._super=a,r.apply(e,arguments)}finally{e._super=o}}},parseHtml:function(t){var n,r,i,o,a,s,l,d,c=t.find(">li"),u=[];return c.each((function(){var c,p,v=e(this),b=v.find(">span",this).first(),m=b.length?null:v.find(">a").first(),x={tooltip:null,data:{}};for(b.length?x.title=b.html():m&&m.length?(x.title=m.html(),x.data.href=m.attr("href"),x.data.target=m.attr("target"),x.tooltip=m.attr("title")):(x.title=v.html(),(a=x.title.search(/<ul/i))>=0&&(x.title=x.title.substring(0,a))),x.title=e.trim(x.title),o=0,s=h.length;o<s;o++)x[h[o]]=void 0;for(n=this.className.split(" "),i=[],o=0,s=n.length;o<s;o++)r=n[o],f[r]?x[r]=!0:i.push(r);if(x.extraClasses=i.join(" "),(l=v.attr("title"))&&(x.tooltip=l),(l=v.attr("id"))&&(x.key=l),v.attr("hideCheckbox")&&(x.checkbox=!1),(c=E(v))&&!e.isEmptyObject(c)){for(p in y)c.hasOwnProperty(p)&&(c[y[p]]=c[p],delete c[p]);for(o=0,s=g.length;o<s;o++)l=g[o],null!=(d=c[l])&&(delete c[l],x[l]=d);e.extend(x.data,c)}(t=v.find(">ul").first()).length?x.children=e.ui.fancytree.parseHtml(t):x.children=x.lazy?void 0:null,u.push(x)})),u},registerExtension:function(t){m(null!=t.name,"extensions must have a `name` property."),m(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&x("warn",arguments)}}),e.ui.fancytree}function m(t,n){t||(n=n?": "+n:"",e.error("Fancytree assertion failed"+n))}function x(e,t){var n,r,i=window.console?window.console[e]:null;if(i)try{i.apply(window.console,t)}catch(e){for(r="",n=0;n<t.length;n++)r+=t[n];i(r)}}function k(){var t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length;if("object"==typeof a||e.isFunction(a)||(a={}),s===l)throw Error("need at least two args");for(;s<l;s++)if(null!=(t=arguments[s]))for(n in t)if(t.hasOwnProperty(n)){if(r=a[n],a===(i=t[n]))continue;i&&e.isPlainObject(i)?(o=r&&e.isPlainObject(r)?r:{},a[n]=k(o,i)):void 0!==i&&(a[n]=i)}return a}function N(e,t,n,r,i){var o,a,s,l,d;return o=t[e],a=r[e],s=t.ext[i],l=function(){return o.apply(t,arguments)},d=function(e){return o.apply(t,e)},function(){var e=t._local,n=t._super,r=t._superApply;try{return t._local=s,t._super=l,t._superApply=d,a.apply(t,arguments)}finally{t._local=e,t._super=n,t._superApply=r}}}function w(t,n,r,i){for(var o in r)"function"==typeof r[o]?"function"==typeof t[o]?t[o]=N(o,t,0,r,i):"_"===o.charAt(0)?t.ext[i][o]=N(o,t,0,r,i):e.error("Could not override tree."+o+". Use prefix '_' to create tree."+i+"._"+o):"options"!==o&&(t.ext[i][o]=r[o])}function C(t,n){return void 0===t?e.Deferred((function(){this.resolve()})).promise():e.Deferred((function(){this.resolveWith(t,n)})).promise()}function _(t,n){return void 0===t?e.Deferred((function(){this.reject()})).promise():e.Deferred((function(){this.rejectWith(t,n)})).promise()}function S(e,t){return function(){e.resolveWith(t)}}function E(t){var n=e.extend({},t.data()),r=n.json;return delete n.fancytree,delete n.uiFancytree,r&&(delete n.json,n=e.extend(n,r)),n}function T(e){return(""+e).replace(a,(function(e){return s[e]}))}function A(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function L(t,n){var i,o,a,s;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},i=0,o=g.length;i<o;i++)this[a=g[i]]=n[a];for(a in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),n.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),n.data&&e.extend(this.data,n.data),n)v[a]||!this.tree.options.copyFunctionsToData&&e.isFunction(n[a])||b[a]||(this.data[a]=n[a]);null==this.key?this.tree.options.defaultKey?(this.key=""+this.tree.options.defaultKey(this),m(this.key,"defaultKey() must return a unique key")):this.key="_"+r._nextNodeKey++:this.key=""+this.key,n.active&&(m(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),n.selected&&(this.tree.lastSelectedNode=this),(s=n.children)?s.length?this._setChildren(s):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function P(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&(void 0!==this.options.lazyload&&e.error("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),void 0!==this.options.loaderror&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&e.error("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&e.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=E(this.$div),this._id=""+(this.options.treeId||e.ui.fancytree._nextId++),this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.viewport=null,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new L(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=r.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")})?r.apply(t,i):r)||(e.exports=o)},"Bn+w":function(e,t){},"Cw+9":function(e,t,n){},aPbu:function(e,t,n){var r,i,o;
/*!
 * jquery.fancytree.dnd5.js
 *
 * Drag-and-drop support (native HTML5).
 * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
 *
 * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
 *
 * Released under the MIT license
 * https://github.com/mar10/fancytree/wiki/LicenseInfo
 *
 * @version 2.36.1
 * @date 2020-07-25T09:03:47Z
 */i=[n("xeH2"),n("8CCZ")],void 0===(o="function"==typeof(r=function(e){"use strict";var t,n,r=e.ui.fancytree,i=/Mac/.test(navigator.platform),o="fancytree-drop-over",a="application/x-fancytree-node",s=null,l=null,d=null,c=null,u=null,h=null,f=null,p=null,g=null,v=null;function y(){u=null,v=null,f=null,p=null,h=null,l=null,d=null,c&&c.removeClass("fancytree-drag-source fancytree-drag-remove"),c=null,s&&s.hide(),n&&(n.remove(),n=null)}function b(e){return 0===e?"":e>0?"+"+e:""+e}function m(e,t){var n=t.tree,r=t.dataTransfer;"dragstart"===e.type?(t.effectAllowed=n.options.dnd5.effectAllowed,t.dropEffect=n.options.dnd5.dropEffectDefault):(t.effectAllowed=p,t.dropEffect=f),t.dropEffectSuggested=function(e,t,n){var r=n;return i?t.metaKey&&t.altKey||t.ctrlKey?r="link":t.metaKey?r="move":t.altKey&&(r="copy"):t.ctrlKey?r="copy":t.shiftKey?r="move":t.altKey&&(r="link"),r!==h&&e.info("evalEffectModifiers: "+t.type+" - evalEffectModifiers(): "+h+" -> "+r),h=r,r}(n,e,n.options.dnd5.dropEffectDefault),t.isMove="move"===t.dropEffect,t.files=r.files||[]}function x(e,t,n){var r=t.tree,i=t.dataTransfer;return"dragstart"!==e.type&&p!==t.effectAllowed&&r.warn("effectAllowed should only be changed in dragstart event: "+e.type+": data.effectAllowed changed from "+p+" -> "+t.effectAllowed),!1===n&&(r.info("applyDropEffectCallback: allowDrop === false"),t.effectAllowed="none",t.dropEffect="none"),t.isMove="move"===t.dropEffect,"dragstart"===e.type&&(p=t.effectAllowed,f=t.dropEffect),i.effectAllowed=p,i.dropEffect=f,f}function k(t,n){if(n.options.dnd5.scroll&&function(t,n){var r,i,o=t.options.dnd5,a=t.$scrollParent[0],s=o.scrollSensitivity,l=o.scrollSpeed,d=0;a!==document&&"HTML"!==a.tagName?(r=t.$scrollParent.offset(),i=a.scrollTop,r.top+a.offsetHeight-n.pageY<s?a.scrollHeight-t.$scrollParent.innerHeight()-i>0&&(a.scrollTop=d=i+l):i>0&&n.pageY-r.top<s&&(a.scrollTop=d=i-l)):(i=e(document).scrollTop())>0&&n.pageY-i<s?(d=i-l,e(document).scrollTop(d)):e(window).height()-(n.pageY-i)<s&&(d=i+l,e(document).scrollTop(d)),d&&t.debug("autoScroll: "+d+"px")}(n.tree,t),!n.node)return n.tree.warn("Ignored dragover for non-node"),g;var i,a,l,d,c=null,h=n.tree,f=h.options,p=f.dnd5,v=n.node,y=n.otherNode,k="center",N=e(v.span),w=N.find("span.fancytree-title");if(!1===u)return h.debug("Ignored dragover, since dragenter returned false."),!1;if("string"==typeof u&&e.error("assert failed: dragenter returned string"),a=N.offset(),d=(t.pageY-a.top)/N.height(),void 0===t.pageY&&h.warn("event.pageY is undefined: see issue #1013."),u.after&&d>.75||!u.over&&u.after&&d>.5?c="after":u.before&&d<=.25||!u.over&&u.before&&d<=.5?c="before":u.over&&(c="over"),p.preventVoidMoves&&"move"===n.dropEffect&&(v===y?(v.debug("Drop over source node prevented."),c=null):"before"===c&&y&&v===y.getNextSibling()?(v.debug("Drop after source node prevented."),c=null):"after"===c&&y&&v===y.getPrevSibling()?(v.debug("Drop before source node prevented."),c=null):"over"===c&&y&&y.parent===v&&y.isLastSibling()&&(v.debug("Drop last child over own parent prevented."),c=null)),n.hitMode=c,c&&p.dragOver&&(m(t,n),p.dragOver(v,n),x(t,n,!!c),c=n.hitMode),g=c,"after"===c||"before"===c||"over"===c){switch(i=p.dropMarkerOffsetX||0,c){case"before":k="top",i+=p.dropMarkerInsertOffsetX||0;break;case"after":k="bottom",i+=p.dropMarkerInsertOffsetX||0}l={my:"left"+b(i)+" center",at:"left "+k,of:w},f.rtl&&(l.my="right"+b(-i)+" center",l.at="right "+k),s.toggleClass("fancytree-drop-after","after"===c).toggleClass(o,"over"===c).toggleClass("fancytree-drop-before","before"===c).show().position(r.fixPositionOptions(l))}else s.hide();return e(v.span).toggleClass("fancytree-drop-target","after"===c||"before"===c||"over"===c).toggleClass("fancytree-drop-after","after"===c).toggleClass("fancytree-drop-before","before"===c).toggleClass("fancytree-drop-accept","over"===c).toggleClass("fancytree-drop-reject",!1===c),c}function N(i){var o,s=this.options.dnd5,u=r.getNode(i),h=i.dataTransfer||i.originalEvent.dataTransfer,f={tree:this,node:u,options:this.options,originalEvent:i.originalEvent,widget:this.widget,dataTransfer:h,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:void 0,isCancelled:void 0,isMove:void 0};switch(i.type){case"dragstart":if(!u)return this.info("Ignored dragstart on a non-node."),!1;l=u,!1===s.multiSource?d=[u]:!0===s.multiSource?(d=this.getSelectedNodes(),u.isSelected()||d.unshift(u)):d=s.multiSource(u,f),(c=e(e.map(d,(function(e){return e.span})))).addClass("fancytree-drag-source");var p=u.toDict();p.treeId=u.tree._id,o=JSON.stringify(p);try{h.setData(a,o),h.setData("text/html",e(u.span).html()),h.setData("text/plain",u.title)}catch(e){this.warn("Could not set data (IE only accepts 'text') - "+e)}return s.setTextTypeJson?h.setData("text",o):h.setData("text",u.title),m(i,f),!1===s.dragStart(u,f)?(y(),!1):(x(i,f),n=null,f.useDefaultImage&&(t=e(u.span).find(".fancytree-title"),d&&d.length>1&&(n=e("<span class='fancytree-childcounter'/>").text("+"+(d.length-1)).appendTo(t)),h.setDragImage&&h.setDragImage(t[0],-10,-10)),!0);case"drag":m(i,f),s.dragDrag(u,f),x(i,f),c.toggleClass("fancytree-drag-remove",f.isMove);break;case"dragend":m(i,f),y(),f.isCancelled=!g,s.dragEnd(u,f,!g)}}function w(t){var n,i,c,h,f=this.options.dnd5,p=null,b=r.getNode(t),N=t.dataTransfer||t.originalEvent.dataTransfer,w={tree:this,node:b,options:this.options,originalEvent:t.originalEvent,widget:this.widget,hitMode:u,dataTransfer:N,otherNode:l||null,otherNodeList:d||null,otherNodeData:null,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:null,isCancelled:void 0,isMove:void 0};switch(t.type){case"dragenter":if(v=null,!b){this.debug("Ignore non-node "+t.type+": "+t.target.tagName+"."+t.target.className),u=!1;break}if(e(b.span).addClass(o).removeClass("fancytree-drop-accept fancytree-drop-reject"),c=e.inArray(a,N.types)>=0,f.preventNonNodes&&!c){b.debug("Reject dropping a non-node."),u=!1;break}if(f.preventForeignNodes&&(!l||l.tree!==b.tree)){b.debug("Reject dropping a foreign node."),u=!1;break}if(f.preventSameParent&&w.otherNode&&w.otherNode.tree===b.tree&&b.parent===w.otherNode.parent){b.debug("Reject dropping as sibling (same parent)."),u=!1;break}if(f.preventRecursion&&w.otherNode&&w.otherNode.tree===b.tree&&b.isDescendantOf(w.otherNode)){b.debug("Reject dropping below own ancestor."),u=!1;break}if(f.preventLazyParents&&!b.isLoaded()){b.warn("Drop over unloaded target node prevented."),u=!1;break}s.show(),m(t,w),h=function(t){var n;return!!t&&(n=e.isPlainObject(t)?{over:!!t.over,before:!!t.before,after:!!t.after}:e.isArray(t)?{over:e.inArray("over",t)>=0,before:e.inArray("before",t)>=0,after:e.inArray("after",t)>=0}:{over:!0===t||"over"===t,before:!0===t||"before"===t,after:!0===t||"after"===t},0!==Object.keys(n).length&&n)}(f.dragEnter(b,w)),u=h,x(t,w,p=h&&(h.over||h.before||h.after));break;case"dragover":if(!b){this.debug("Ignore non-node "+t.type+": "+t.target.tagName+"."+t.target.className);break}m(t,w),p=!!(g=k(t,w)),"over"!==g&&!1!==g||b.expanded||!1===b.hasChildren()?v=null:v?!(f.autoExpandMS&&Date.now()-v>f.autoExpandMS)||b.isLoading()||f.dragExpand&&!1===f.dragExpand(b,w)||b.setExpanded():v=Date.now();break;case"dragleave":if(!b){this.debug("Ignore non-node "+t.type+": "+t.target.tagName+"."+t.target.className);break}if(!e(b.span).hasClass(o)){b.debug("Ignore dragleave (multi).");break}e(b.span).removeClass(o+" fancytree-drop-accept fancytree-drop-reject"),b.scheduleAction("cancel"),f.dragLeave(b,w),s.hide();break;case"drop":if(e.inArray(a,N.types)>=0&&(i=N.getData(a),this.info(t.type+": getData('application/x-fancytree-node'): '"+i+"'")),i||(i=N.getData("text"),this.info(t.type+": getData('text'): '"+i+"'")),i)try{void 0!==(n=JSON.parse(i)).title&&(w.otherNodeData=n)}catch(e){}this.debug(t.type+": nodeData: '"+i+"', otherNodeData: ",w.otherNodeData),e(b.span).removeClass(o+" fancytree-drop-accept fancytree-drop-reject"),w.hitMode=g,m(t,w),w.isCancelled=!g;var C=l&&l.span,_=l&&l.tree;f.dragDrop(b,w),t.preventDefault(),C&&!document.body.contains(C)&&(_===this?(this.debug("Drop handler removed source element: generating dragEnd."),f.dragEnd(l,w)):this.warn("Drop handler removed source element: dragend event may be lost.")),y()}if(p)return t.preventDefault(),!1}return e.ui.fancytree.getDragNodeList=function(){return d||[]},e.ui.fancytree.getDragNode=function(){return l},e.ui.fancytree.registerExtension({name:"dnd5",version:"2.36.1",options:{autoExpandMS:1500,dropMarkerInsertOffsetX:-16,dropMarkerOffsetX:-24,dropMarkerParent:"body",multiSource:!1,effectAllowed:"all",dropEffectDefault:"move",preventForeignNodes:!1,preventLazyParents:!0,preventNonNodes:!1,preventRecursion:!0,preventSameParent:!1,preventVoidMoves:!0,scroll:!0,scrollSensitivity:20,scrollSpeed:5,setTextTypeJson:!1,dragStart:null,dragDrag:e.noop,dragEnd:e.noop,dragEnter:null,dragOver:e.noop,dragExpand:e.noop,dragDrop:e.noop,dragLeave:e.noop},treeInit:function(t){var n,i=t.tree,o=t.options,a=o.glyph||null,l=o.dnd5;e.inArray("dnd",o.extensions)>=0&&e.error("Extensions 'dnd' and 'dnd5' are mutually exclusive."),l.dragStop&&e.error("dragStop is not used by ext-dnd5. Use dragEnd instead."),null!=l.preventRecursiveMoves&&e.error("preventRecursiveMoves was renamed to preventRecursion."),l.dragStart&&r.overrideMethod(t.options,"createNode",(function(e,t){this._super.apply(this,arguments),t.node.span?t.node.span.draggable=!0:t.node.warn("Cannot add `draggable`: no span tag")})),this._superApply(arguments),this.$container.addClass("fancytree-ext-dnd5"),n=e("<span>").appendTo(this.$container),this.$scrollParent=n.scrollParent(),n.remove(),(s=e("#fancytree-drop-marker")).length||(s=e("<div id='fancytree-drop-marker'></div>").hide().css({"z-index":1e3,"pointer-events":"none"}).prependTo(l.dropMarkerParent),a&&r.setSpanIcon(s[0],a.map._addClass,a.map.dropMarker)),s.toggleClass("fancytree-rtl",!!o.rtl),l.dragStart&&i.$container.on("dragstart drag dragend",N.bind(i)),l.dragEnter&&i.$container.on("dragenter dragover dragleave drop",w.bind(i))}}),e.ui.fancytree})?r.apply(t,i):r)||(e.exports=o)}}]);
//# sourceMappingURL=jquery.fancytree.js.map