/* jQuery Tree Multiselect v2.6.1 | (c) Patrick Tsai | MIT Licensed */ !function n(a,o,c){function l(t,e){if(!o[t]){if(!a[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var s=o[t]={exports:{}};a[t][0].call(s.exports,function(e){return l(a[t][1][e]||e)},s,s.exports,n,a,o,c)}return o[t].exports}for(var d="function"==typeof require&&require,e=0;e span.description",function(){var e=jQuery(this).parent(),t=e.attr("data-description"),i=document.createElement("div");i.className="temp-description-popup",i.innerHTML=t,i.style.position="absolute",e.append(i)}),this.$selectionContainer.on("mouseleave","div.item > span.description",function(){jQuery(this).parent().find("div.temp-description-popup").remove()})},a.prototype.handleSectionCheckboxMarkings=function(){var s=this;this.$selectionContainer.on("click","input.section[type=checkbox]",function(){var e,t,i=jQuery(this).closest("div.section").find("div.item").map(function(e,t){var i=C.getKey(t),r=s.astItems[i];if(!r.disabled&&!r.isNotSearchHit())return i}).get();this.checked?((e=s.keysToAdd).push.apply(e,b(i)),C.array.uniq(s.keysToAdd)):((t=s.keysToRemove).push.apply(t,b(i)),C.array.uniq(s.keysToRemove));s.render()})},a.prototype.redrawSectionCheckboxes=function(e){e=e||this.$selectionContainer;var t=3,i=this;if(e.find("> div.section").each(function(){var e=i.redrawSectionCheckboxes(jQuery(this));t&=e}),t)for(var r=e.find("> div.item > input[type=checkbox]"),s=0;s div.title > input[type=checkbox]");return n.length&&((n=n[0]).indeterminate=1&t?!(n.checked=!0):2&t?n.checked=!1:!(n.checked=!1)),t},a.prototype.addCollapsibility=function(){var e="div.title",t=this.$selectionContainer.find(e),i=C.dom.createNode("span",{class:"collapse-section"});t.prepend(i);var r=this.$selectionContainer.find("div.section");this.params.startCollapsed&&r.addClass("collapsed"),this.$selectionContainer.on("click",e,function(e){"INPUT"!==e.target.nodeName&&(jQuery(this).parent().toggleClass("collapsed"),e.stopPropagation())})},a.prototype.createSearchBar=function(e){var t=new r(n,this.astItems,this.astSections,this.params.searchParams),i=C.dom.createNode("input",{class:"search",placeholder:"Search..."});e.appendChild(i),this.$selectionContainer.on("input","input.search",function(){var e=this.value;t.search(e)})},a.prototype.createSelectAllButtons=function(e){var t=C.dom.createNode("span",{class:"select-all",text:this.params.selectAllText}),i=C.dom.createNode("span",{class:"unselect-all",text:this.params.unselectAllText}),r=C.dom.createNode("div",{class:"select-all-container"});r.appendChild(t),r.appendChild(i),e.appendChild(r);var s=this;this.$selectionContainer.on("click","span.select-all",function(){var e;(e=s.keysToAdd).push.apply(e,b(s.unfilteredNodeIds())),s.render()}),this.$selectionContainer.on("click","span.unselect-all",function(){var e;(e=s.keysToRemove).push.apply(e,b(s.unfilteredNodeIds())),s.render()})},a.prototype.unfilteredNodeIds=function(){var t=this;return Object.keys(t.astItems).filter(function(e){return!t.astItems[e].node.hasAttribute(n)||"true"===t.astItems[e].node.getAttribute(n)})},a.prototype.armRemoveSelectedOnClick=function(){var i=this;this.$selectedContainer.on("click","span.remove-selected",function(){var e=this.parentNode,t=C.getKey(e);i.keysToRemove.push(t),i.render()})},a.prototype.updateSelectedAndOnChange=function(){var i=this;if(this.$selectionContainer.on("click","input.option[type=checkbox]",function(){var e=this.parentNode,t=C.getKey(e);C.assert(t||0===t),this.checked?i.keysToAdd.push(t):i.keysToRemove.push(t),i.render()}),this.params.sortable&&!this.params.freeze){var r=null,s=null;this.$selectedContainer.sortable({start:function(e,t){r=t.item.index()},stop:function(e,t){s=t.item.index(),r!==s&&(C.array.moveEl(i.selectedKeys,r,s),i.render())}})}},a.prototype.render=function(e){var t,i=this;if(C.array.uniq(this.keysToAdd),C.array.uniq(this.keysToRemove),C.array.subtract(this.keysToAdd,this.selectedKeys),C.array.intersect(this.keysToRemove,this.selectedKeys),C.isInteger(this.params.maxSelections)&&0this.params.maxSelections){var s,n=r-this.params.maxSelections,a=[];n>this.selectedKeys.length?(a.push.apply(a,b(this.selectedKeys)),n-=this.selectedKeys.length,a.push.apply(a,b(this.keysToAdd.splice(0,n)))):a.push.apply(a,b(this.selectedKeys.slice(0,n))),(s=this.keysToRemove).push.apply(s,a)}}for(var o=0;o'),r=jQuery('
');t&&r.addClass("no-border"),i.append(r);var s=jQuery('
');t||i.append(s),this.$el=e,this.$treeContainer=i,this.$selectionContainer=r,this.$selectedContainer=s}r.prototype.attach=function(){this.$el.after(this.$treeContainer)},r.prototype.remove=function(){this.$treeContainer.remove()},t.exports=r},{}],10:[function(e,t,r){"use strict";function s(e,t){for(var i=0,r=0;ri[n]){s=!0;break}}if(s)break;for(var a=!0,o=1;o