!function(){"use strict";var e,t;t=function(t){var n,r,s;return r=$(t.currentTarget).closest("form"),s=window.location.pathname,console.debug("path -> ",s),console.debug("Call URL -> ",window.datas.sslHost),n=jQuery.Event("sslAttempt"),$(document).trigger(n),n.isDefaultPrevented()||$.ajax(window.datas.sslHost,{dataType:"json",xhrFields:{withCredentials:!0},success:function(t){if(console.debug("Success -> ",t),n=jQuery.Event("sslSuccess"),$(document).trigger(n,[t]),!n.isDefaultPrevented())return t.ajax_auth_token&&r.find('input[name="ajax_auth_token"]').attr("value",t.ajax_auth_token),e(r,s)},error:function(t){if(console.error("Error during AJAX SSL authentication",t),n=jQuery.Event("sslFailure"),$(document).trigger(n,[t]),!n.isDefaultPrevented()&&(0===t.status&&e(r,s),t.responseJSON&&"error"in t.responseJSON&&"9"===t.responseJSON.error&&e(r,s),t.responseJSON&&"html"in t.responseJSON))return $("#errormsg").html(t.responseJSON.html),$(window).trigger("load")}}),!1},window.ssl_start=t,e=function(e,t){var n;return(n=e.attr("action")).match(/^#$/)?n=t:n+=t,console.debug("form action URL -> ",n),e.attr("action",n),e.submit()},$(document).ready(function(){if(!window._ssl_js_done)return window._ssl_js_done=!0,$(".sslclick").on("click",t)})}();