function formatPhoneNumber(n){var i=(""+n).replace(/\D/g,""),t=i.match(/^(\d{3})(\d{3})(\d{4})$/);return t?"("+t[1]+") "+t[2]+"-"+t[3]:null}(function(n){n.fn.Toggler=function(){this.filter("input").each(function(){var t=n(this).data("target");n(this).change(function(){n(t).toggle()})});this.filter(":not(input)").each(function(){var t=n(this).data("target");n(this).click(function(){n(t).toggle()})})}})(jQuery);$(document).ready(function(){$(".table tr[data-href]").on("click.bs.table",function(){window.location=$(this).data("href")});$("input[data-behavior~=datepicker]").datepicker();$("input[data-behavior~=ui-datepicker]").datepicker();$("[data-behavior~=ui-toggle]").Toggler();$(document).on("submit","form[data-behavior~=ui-disableOnSubmit]",function(){$(this).find("button[type='submit']").prop("disabled",!0);$(this).find("input[type='submit']").prop("disabled",!0)});$("[data-behavior~=ui-datatable]").DataTable();$(".datatable").DataTable({ordering:!0,searching:!0,paging:!0,serverSide:!1});$("[data-behavior~=ui-hide-show]").click(function(){var t=$(this).data("targetHide"),n=$(this).data("targetShow");$(t).hide();$(this).is(":checkbox")||$(this).is(":radio")?$(this).is(":checked")&&$(n).show():$(n).show()});$("[data-behavior~=ui-check-all]").change(function(){var n=$(this).prop("checked"),t=$(this).data("target");$(t).prop("checked",n)});$(document).on("change",":file",function(){var n=$(this),i=n.get(0).files?n.get(0).files.length:1,t=n.val().replace(/\\/g,"/").replace(/.*\//,"");n.trigger("fileselect",[i,t]);n.siblings(".custom-file-label").text(t)});$(document).find("a.btn-danger").confirmation();$(document).find("[type=submit].btn-danger").confirmation();$(document).find("a.btn-outline-danger").confirmation();$(document).find("[type=submit].btn-outline-danger").confirmation();$(document).on("page.dt",function(){setTimeout(function(){$(document).find("[type=submit].btn-outline-danger").confirmation();$(document).find("a.btn-danger").confirmation();$(document).find("[type=submit].btn-danger").confirmation();$(document).find("a.btn-outline-danger").confirmation()},500)})})