You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
13 KiB
1 line
13 KiB
7 months ago
|
!function(e,t){"use strict";function n(){function n(e,t){for(var n=0;n<S.length;n++)if(e+=t,e===S.length?e=0:-1===e&&(e=S.length-1),S[e].offsetWidth||S[e].offsetHeight||S[e].getClientRects().length)return void S[e].focus()}function i(t){var a=t||e.event,o=a.keyCode||a.which,s=b(f,"visible");if(-1!==[9,13,32,27].indexOf(o)){for(var l=a.target||a.srcElement,r=-1,i=0;i<S.length;i++)if(l===S[i]){r=i;break}if(9===o){if(!s)return;a.shiftKey?n(r,-1):n(r,1),M(a)}else 13===o||32===o?-1===r&&L(k,a):27===o&&u.allowEscapeKey===!0&&L(B,a)}}if(void 0===arguments[0])return e.console.error("sweetAlert expects at least 1 attribute!"),!1;var u=s({},p);switch(typeof arguments[0]){case"string":u.title=arguments[0],u.text=arguments[1]||"",u.type=arguments[2]||"";break;case"object":u.title=arguments[0].title||p.title,u.text=arguments[0].text||p.text,u.html=arguments[0].html||p.html,u.type=arguments[0].type||p.type,u.animation=void 0!==arguments[0].animation?arguments[0].animation:p.animation,u.customClass=arguments[0].customClass||u.customClass,u.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:p.allowOutsideClick,u.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:p.allowEscapeKey,u.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:p.showConfirmButton,u.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:p.showCancelButton,u.closeOnConfirm=void 0!==arguments[0].closeOnConfirm?arguments[0].closeOnConfirm:p.closeOnConfirm,u.closeOnCancel=void 0!==arguments[0].closeOnCancel?arguments[0].closeOnCancel:p.closeOnCancel,u.timer=parseInt(arguments[0].timer)||p.timer,u.width=parseInt(arguments[0].width)||p.width,u.padding=parseInt(arguments[0].padding)||p.padding,u.background=void 0!==arguments[0].background?arguments[0].background:p.background,u.confirmButtonText=arguments[0].confirmButtonText||p.confirmButtonText,u.confirmButtonColor=arguments[0].confirmButtonColor||p.confirmButtonColor,u.confirmButtonClass=arguments[0].confirmButtonClass||u.confirmButtonClass,u.cancelButtonText=arguments[0].cancelButtonText||p.cancelButtonText,u.cancelButtonColor=arguments[0].cancelButtonColor||p.cancelButtonColor,u.cancelButtonClass=arguments[0].cancelButtonClass||u.cancelButtonClass,u.buttonsStyling=void 0!==arguments[0].buttonsStyling?arguments[0].buttonsStyling:p.buttonsStyling,u.reverseButtons=void 0!==arguments[0].reverseButtons?arguments[0].reverseButtons:p.reverseButtons,u.imageUrl=arguments[0].imageUrl||p.imageUrl,u.imageWidth=arguments[0].imageWidth||p.imageWidth,u.imageHeight=arguments[0].imageHeight||p.imageHeight,u.imageClass=arguments[0].imageClass||p.imageClass,u.callback=arguments[1]||null,e.sweetAlert.callback=e.swal.callback=function(e){"function"==typeof u.callback&&u.callback(e)};break;default:return e.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}a(u),c(),l();var f=w();u.timer&&(f.timeout=setTimeout(function(){r(),"function"==typeof u.callback&&u.callback()},u.timer));var y,C=function(t){var n=t||e.event,a=n.target||n.srcElement,s=b(a,e.swalClasses.confirm),l=b(a,e.swalClasses.cancel),i=b(f,"visible");switch(n.type){case"mouseover":case"mouseup":case"focus":u.buttonsStyling&&(s?a.style.backgroundColor=o(u.confirmButtonColor,-.1):l&&(a.style.backgroundColor=o(u.cancelButtonColor,-.1)));break;case"mouseout":case"blur":u.buttonsStyling&&(s?a.style.backgroundColor=u.confirmButtonColor:l&&(a.style.backgroundColor=u.cancelButtonColor));break;case"mousedown":u.buttonsStyling&&(s?a.style.backgroundColor=o(u.confirmButtonColor,-.2):l&&(a.style.backgroundColor=o(u.cancelButtonColor,-.2)));break;case"click":s&&u.callback&&i?(u.callback(!0),u.closeOnConfirm&&r()):u.callback&&i?(u.callback.length>0&&u.callback(!1),u.closeOnCancel&&r()):r()}},h=f.querySelectorAll("button");for(y=0;y<h.length;y++)h[y].onclick=C,h[y].onmouseover=C,h[y].onmouseout=C,h[y].onmousedown=C;m=t.onclick,t.onclick=function(t){var n=t||e.event,a=n.target||n.srcElement;a===v()&&u.allowOu
|