(()=>{function e(e,c){for(var n=0;n<c.length;n++){var o=c[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var c=function(){function c(){!function(e,c){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c)}var n,o,t;return n=c,(o=[{key:"init",value:function(){var e=$(".has-children");e.length&&e.map((function(e,c){$(c).treeview({collapsed:!0,animated:"medium",control:"#sidetreecontrol",persist:"location"})})),$("#allTreeChecked:checkbox").on("click",(function(e){e.stopPropagation();var c=$(e.currentTarget).is(":checked");$("#checkboxes-permisstions").length&&$("#checkboxes-permisstions").find(":checkbox").prop("checked",c).each((function(){var e=$(this),c=e.find(":checkbox").length==e.find(":checked").length;e.siblings(":checkbox").prop("checked",c)}))})),$("#checkboxes-permisstions :checkbox").on("click",(function(e){e.stopPropagation();var c=$(e.currentTarget),n=c.is(":checked"),o=c.closest("li"),t=o.parents("ul");o.find(":checkbox").prop("checked",n),t.each((function(){var e=$(this),c=e.find(":checkbox").length==e.find(":checked").length;e.siblings(":checkbox").prop("checked",c)}))}))}}])&&e(n.prototype,o),t&&e(n,t),Object.defineProperty(n,"prototype",{writable:!1}),c}();$((function(){(new c).init()}))})();