typeof sircl=="undefined"&&console.warn("The 'sircl-bootstrap3' component should be registered after the 'sircl' component. Please review order of script files.");typeof $().modal=="undefined"&&console.warn("The 'sircl-bootstrap3' component requires the 'bootstrap' component. See https://getbootstrap.com/");$$("before",function(){try{$(this).find("[data-bs-toggle='popover'], [data-toggle='popover']").popover("destroy");$(this).find("[data-bs-toggle='tooltip'], [data-toggle='tooltip']").tooltip("destroy")}catch(n){console.warn("Error trying to dispose Bootstrap 3 popovers and tooltips in scope.",n,"sircl_bs3_init_beforeHandler")}});sircl.addRequestHandler("beforeSend",function(n){var t=this,i=$(".navbar-collapse.in");i.each(function(){$(this).removeClass("in")});t.next(n)});sircl.addRequestHandler("beforeSend",function(n){var i=this,r=n.$initialTarget.closest(".modal.beforeload-showmodal:not(.in)"),t=$(".modal.in");n.isForeground==!0&&t.length>0&&r.length>0?$.contains(t[0],n.$initialTarget[0])||t.is(n.$initialTarget)?i.next(n):(t[0]._onCloseOnce=function(){i.next(n)},t.modal("hide")):i.next(n)});sircl.addRequestHandler("beforeSend",function(n){var t=this;n._bsModalOpened=n.$initialTarget.closest(".modal.beforeload-showmodal:not(.in)");n._bsModalOpened.length>0?(n._bsModalOpened[0]._onOpenOnce=function(){t.next(n)},n._bsModalOpened.modal("show")):t.next(n)});sircl.addRequestHandler("afterSend",function(n){var t=this,i;!n.succeeded&&n._bsModalOpened.length>0?(n._bsModalOpened[0]._onCloseOnce=function(){t.next(n)},n._bsModalOpened.modal("hide")):n.status=="204"?(i=n.$initialTarget.closest(".modal.in"),i.length>0?(i[0]._onCloseOnce=function(){t.next(n)},i.modal("hide")):t.next(n)):t.next(n)});sircl.addRequestHandler("beforeRender",function(n){var i=this,t=$(".modal.in");n.isForeground==!0&&t.length>0?$.contains(t[0],n.$finalTarget[0])||t.is(n.$finalTarget)?i.next(n):(t[0]._onCloseOnce=function(){i.next(n)},t.modal("hide")):i.next(n)});sircl.addRequestHandler("afterRender",function(n){var i=this,t=n.$finalTarget.closest(".modal:not(.in)");t.length>0?(t[0]._onOpenOnce=function(){i.next(n)},t.modal("show")):i.next(n)});document.addEventListener("DOMContentLoaded",function(){$(document).on("shown.bs.modal",".modal",function(){if(this._onOpenOnce){var n=this._onOpenOnce;this._onOpenOnce=undefined;n()}});$(document).on("hidden.bs.modal",".modal",function(){if(this._onCloseOnce){var n=this._onCloseOnce;this._onCloseOnce=undefined;n()}});$(document).on("shown.bs.modal",".modal",function(){$(this).find("*[autofocus]:first").each(function(){try{this.focus()}catch(n){}try{this.select()}catch(n){}})});$(document).on("hidden.bs.modal",".modal.onclose-restore",function(){var n=$(this)[0]._originalContent;n!==undefined&&$(this).html(n)});$(document).on("shown.bs.modal",".modal",function(){var n=$(this).find("[onshowmodal-load]");n.length>0&&(n.load(n.attr("onshowmodal-load")),n.is(".noreload")&&n.removeAttr("onshowmodal-load"))})});$$(function(){var t,n;if($(this).find(".modal.onclose-restore").each(function(n,t){t._originalContent=$(t).html()}),t=$(this).find(".modal[onload-showmodalafter]"),t.length>0){var r=t[0],u=$(r).attr("onload-showmodalafter").split(":"),i=0;for(n=0;n0?n.closest("FORM").length>0?n.closest("FORM").find("INPUT[type=radio][ifchecked-expand][name='"+n.attr("name")+"']"):$("INPUT[type=radio][ifchecked-expand][name='"+n.attr("name")+"']"):n;t.each(function(){var n=sircl.ext.$select($(this),$(this).attr("ifchecked-expand"));n.hasClass("collapse")&&($(this).prop("checked")?n.collapse("show"):n.collapse("hide"))})});$(document.body).on("show.bs.collapse",".collapse[onexpand-set]",function(){var i=$(this),n=$(this).attr("onexpand-set"),t;n!=null&&n.length!=0&&(t=i.closest("FORM").length>0?i.closest("FORM").find("INPUT[name='"+n+"']"):$("INPUT[name='"+n+"']"),["true","on"].indexOf(t.val().toLowerCase())<0&&(t.val("true"),t.change()))});$(document.body).on("hide.bs.collapse",".collapse[onexpand-set]",function(){var i=$(this),n=$(this).attr("onexpand-set"),t;n!=null&&n.length!=0&&(t=i.closest("FORM").length>0?i.closest("FORM").find("INPUT[name='"+n+"']"):$("INPUT[name='"+n+"']"),["false","off"].indexOf(t.val().toLowerCase())<0&&(t.val("false"),t.change()))});$(document.body).on("show.bs.collapse",".collapse[ifexpanded-load]",function(){var n=$(this).attr("ifexpanded-load");$(this).removeAttr("ifexpanded-load");$(this).load(n)})});$$(function(){$("INPUT[type=checkbox][ifchecked-expand], INPUT[type=radio][ifchecked-expand]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("ifchecked-expand"));t.hasClass("collapse")&&(n.prop("checked")?t.collapse("show"):t.collapse("hide"))});$(".collapse.show[ifexpanded-load]").each(function(){var n=$(this).attr("ifexpanded-load");$(this).removeAttr("ifexpanded-load");$(this).load(n)})});sircl.addRequestHandler("beforeSend",function(n){var t,i;n._bsProgressToResetAfterSend=[];n._bsProgressToHideAfterSend=[];n.xhr!=null&&(t=sircl.ext.$select(n.$initialTarget,n.$initialTarget.attr("upload-progress")).filter(".progress"),t.length>0&&(t.each(function(){$(this).find(".progress-bar").css("width","0%");n._bsProgressToResetAfterSend.push(this);sircl.ext.visible(this)||(n._bsProgressToHideAfterSend.push(this),sircl.ext.visible(this,!0))}),n.xhr.upload.addEventListener("progress",function(n){n.lengthComputable&&t.each(function(){$(this).find(".progress-bar").css("width",Math.ceil(100*n.loaded/n.total)+"%")})})),i=sircl.ext.$select(n.$initialTarget,n.$initialTarget.attr("download-progress")).filter(".progress"),i.length>0&&(i.each(function(){$(this).find(".progress-bar").css("width","0%");n._bsProgressToResetAfterSend.push(this);sircl.ext.visible(this)||(n._bsProgressToHideAfterSend.push(this),sircl.ext.visible(this,!0))}),n.xhr.addEventListener("progress",function(n){n.lengthComputable&&i.each(function(){$(this).find(".progress-bar").css("width",Math.ceil(100*n.loaded/n.total)+"%")})})));this.next(n)});sircl.addRequestHandler("afterSend",function(n){n._bsProgressToHideAfterSend.forEach(function(n){sircl.ext.visible(n,!1)});n._bsProgressToResetAfterSend.forEach(function(n){$(n).find(".progress-bar").css("width","0%")});this.next(n)});sircl.addAfterHistoryHandler(function(){$(document).find("[ifroute-setactive]").each(function(){var n=new RegExp($(this).attr("ifroute-setactive"),"i");n.exec(location.pathname)!==null?$(this).addClass("active"):$(this).removeClass("active")})});