'use strict';jQuery.fn.updateBlogrollPermissionsForm=function(){return this.each(function(){const permissions={};const perm_reg_expr=/^perm\[(.+?)\]\[(.+?)\]$/;const admin=(dom_element)=>{const matches=dom_element.name.match(perm_reg_expr);permissions[matches[1]].blogroll.checked=dom_element.checked;permissions[matches[1]].blogroll.disabled=dom_element.checked;};const doEventAdmin=(evt)=>{admin(evt.data.form_element);};for(let i=0;i<this.elements.length;i++){const form_element=this.elements[i];if(form_element.name==undefined){continue;}
const matches=form_element.name.match(perm_reg_expr);if(!matches){continue;}
if(permissions[matches[1]]==undefined){permissions[matches[1]]={};}
permissions[matches[1]][matches[2]]=form_element;if(matches[2]=='admin'){if(form_element.checked){admin(form_element);}
$(form_element).on('click',{form_element},doEventAdmin);}}});};$(()=>{$('#permissions-form').updateBlogrollPermissionsForm();});