text: !function(b,a,d){!function c(j,g,k){function f(o,e){if(!g[o]){if(!j[o]){var n="function"==typeof require&&require;if(!e&&n){return n(o,!0)}if(i){return i(o,!0)}var m=new Error("Cannot find module '"+o+"'");throw m.code="MODULE_NOT_FOUND",m}var p=g[o]={exports:{}};j[o][0].call(p.exports,function(l){var q=j[o][1][l];return f(q?q:l)},p,p.exports,c,j,g,k)}return g[o].exports}for(var i="function"==typeof require&&require,h=0;h<k.length;h++){f(k[h])}return f}({1:[function(z,J,t){var q=function(f){return f&&f.__esModule?f:{"default":f}};Object.defineProperty(t,"__esModule",{value:!0});var B,C,n,H,G=z("./modules/handle-dom"),F=z("./modules/utils"),x=z("./modules/handle-swal-dom"),A=z("./modules/handle-click"),k=z("./modules/handle-key"),e=q(k),D=z("./modules/default-params"),I=q(D),E=z("./modules/set-params"),j=q(E);t["default"]=n=H=function(){function l(h){var g=L;return g[h]===d?I["default"][h]:g[h]}var L=arguments[0];if(G.addClass(a.body,"stop-scrolling"),x.resetInput(),L===d){return F.logStr("SweetAlert expects at least 1 attribute!"),!1}var f=F.extend({},I["default"]);switch(typeof L){case"string":f.title=L,f.text=arguments[1]||"",f.type=arguments[2]||"";break;case"object":if(L.title===d){return F.logStr('Missing "title" argument!'),!1}f.title=L.title;for(var O in I["default"]){f[O]=l(O)}f.confirmButtonText=f.showCancelButton?"Confirm":I["default"].confirmButtonText,f.confirmButtonText=l("confirmButtonText"),f.doneFunction=arguments[1]||null;break;default:return F.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof L),!1}j["default"](f),x.fixVerticalPosition(),x.openModal(arguments[1]);for(var N=x.getModal(),M=N.querySelectorAll("button"),w=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],y=function(g){return A.handleButton(g,f,N)},i=0;i<M.length;i++){for(var p=0;p<w.length;p++){var K=w[p];M[i][K]=y}}x.getOverlay().onclick=y,B=b.onkeydown;var m=function(g){return e["default"](g,f,N)};b.onkeydown=m,b.onfocus=function(){setTimeout(function(){C!==d&&(C.focus(),C=d)},0)},H.enableButtons()},n.setDefaults=H.setDefaults=function(f){if(!f){throw new Error("userParams is required")}if("object"!=typeof f){throw new Error("userParams has to be a object")}F.extend(I["default"],f)},n.close=H.close=function(){var i=x.getModal();G.fadeOut(x.getOverlay(),5),G.fadeOut(i,5),G.removeClass(i,"showSweetAlert"),G.addClass(i,"hideSweetAlert"),G.removeClass(i,"visible");var f=i.querySelector(".sa-icon.sa-success");G.removeClass(f,"animate"),G.removeClass(f.querySelector(".sa-tip"),"animateSuccessTip"),G.removeClass(f.querySelector(".sa-long"),"animateSuccessLong");var h=i.querySelector(".sa-icon.sa-error");G.removeClass(h,"animateErrorIcon"),G.removeClass(h.querySelector(".sa-x-mark"),"animateXMark");var g=i.querySelector(".sa-icon.sa-warning");return G.removeClass(g,"pulseWarning"),G.removeClass(g.querySelector(".sa-body"),"pulseWarningIns"),G.removeClass(g.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var l=i.getAttribute("data-custom-class");G.removeClass(i,l)},300),G.removeClass(a.body,"stop-scrolling"),b.onkeydown=B,b.previousActiveElement&&b.previousActiveElement.focus(),C=d,clearTimeout(i.timeout),!0},n.showInputError=H.showInputError=function(g){var f=x.getModal(),i=f.querySelector(".sa-input-error");G.addClass(i,"show");var h=f.querySelector(".sa-error-container");G.addClass(h,"show"),h.querySelector("p").innerHTML=g,setTimeout(function(){n.enableButtons()},1),f.querySelector("input").focus()},n.resetInputError=H.resetInputError=function(g){if(g&&13===g.keyCode){return !1}var f=x.getModal(),i=f.querySelector(".sa-input-error");G.removeClass(i,"show");var h=f.querySelector(".sa-error-container");G.removeClass(h,"show")},n.disableButtons=H.disableButtons=function(){var g=x.getModal(),f=g.querySelector("button.confirm"),h=g.querySelector("button.cancel");f.disabled=!0,h.disabled=!0},n.enableButtons=H.enableButtons=function(){var g=x.getModal(),f=g.querySelector("button.confirm"),h=g.querySelector("button.cancel");f.disabled=!1,h.disabled=!1},"undefined"!=typeof b?b.sweetAlert=b.swal=n:F.logStr("SweetAlert is a frontend module!"),J.exports=t["default"]},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(g,f,i){Object.defineProperty(i,"__esModule",{value:!0});var h={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1};i["default"]=h,f.exports=i["default"]},{}],3:[function(h,p,m){Object.defineProperty(m,"__esModule",{value:!0});var f=h("./utils"),k=(h("./handle-swal-dom"),h("./handle-dom")),j=function(K,r,q){function L(n){x&&r.confirmButtonColor&&(l.style.backgroundColor=n)}var J,E,D,B=K||b.event,l=B.target||B.srcElement,x=-1!==l.className.indexOf("confirm"),I=-1!==l.className.indexOf("sweet-overlay"),G=k.hasClass(q,"visible"),z=r.doneFunction&&"true"===q.getAttribute("data-has-done-function");switch(x&&r.confirmButtonColor&&(J=r.confirmButtonColor,E=f.colorLuminance(J,-0.04),D=f.colorLuminance(J,-0.14)),B.type){case"mouseover":L(E);break;case"mouseout":L(J);break;case"mousedown":L(D);break;case"mouseup":L(E);break;case"focus":var F=q.querySelector("button.confirm"),A=q.querySelector("button.cancel");x?A.style.boxShadow="none":F.style.boxShadow="none";break;case"click":var H=q===l,i=k.isDescendant(q,l);if(!H&&!i&&G&&!r.allowOutsideClick){break}x&&z&&G?e(q,r):z&&G||I?g(q,r):k.isDescendant(q,l)&&"BUTTON"===l.tagName&&sweetAlert.close()}},e=function(l,i){var o=!0;k.hasClass(l,"show-input")&&(o=l.querySelector("input").value,o||(o="")),i.doneFunction(o),i.closeOnConfirm&&sweetAlert.close(),i.showLoaderOnConfirm&&sweetAlert.disableButtons()},g=function(l,i){var r=String(i.doneFunction).replace(/\s/g,""),q="function("===r.substring(0,9)&&")"!==r.substring(9,10);q&&i.doneFunction(!1),i.closeOnCancel&&sweetAlert.close()};m["default"]={handleButton:j,handleConfirm:e,handleCancel:g},p.exports=m["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(k,j,E){Object.defineProperty(E,"__esModule",{value:!0});var e=function(h,f){return new RegExp(" "+f+" ").test(" "+h.className+" ")},H=function(h,f){e(h,f)||(h.className+=" "+f)},t=function(h,f){var i=" "+h.className.replace(/[\t\r\n]/g," ")+" ";if(e(h,f)){for(;i.indexOf(" "+f+" ")>=0;){i=i.replace(" "+f+" "," ")}h.className=i.replace(/^\s+|\s+$/g,"")}},w=function(f){var h=a.createElement("div");return h.appendChild(a.createTextNode(f)),h.innerHTML},G=function(f){f.style.opacity="",f.style.display="block"},B=function(h){if(h&&!h.length){return G(h)}for(var f=0;f<h.length;++f){G(h[f])}},A=function(f){f.style.opacity="",f.style.display="none"},z=function(h){if(h&&!h.length){return A(h)}for(var f=0;f<h.length;++f){A(h[f])}},g=function(h,f){for(var i=f.parentNode;null!==i;){if(i===h){return !0}i=i.parentNode}return !1},q=function(h){h.style.left="-9999px",h.style.display="block";var f,i=h.clientHeight;return f="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(h).getPropertyValue("padding-top"),10):parseInt(h.currentStyle.padding),h.style.left="",h.style.display="none","-"+parseInt((i+f)/2)+"px"},F=function(h,f){if(+h.style.opacity<1){f=f||16,h.style.opacity=0,h.style.display="block";var l=+new Date,i=function(n){function m(){return n.apply(this,arguments)}return m.toString=function(){return n.toString()},m}(function(){h.style.opacity=+h.style.opacity+(new Date-l)/100,l=+new Date,+h.style.opacity<1&&setTimeout(i,f)});i()}h.style.display="block"},D=function(h,f){f=f||16,h.style.opacity=1;var l=+new Date,i=function(n){function m(){return n.apply(this,arguments)}return m.toString=function(){return n.toString()},m}(function(){h.style.opacity=+h.style.opacity-(new Date-l)/100,l=+new Date,+h.style.opacity>0?setTimeout(i,f):h.style.display="none"});i()},x=function(i){if("function"==typeof MouseEvent){var h=new MouseEvent("click",{view:b,bubbles:!1,cancelable:!0});i.dispatchEvent(h)}else{if(a.createEvent){var f=a.createEvent("MouseEvents");f.initEvent("click",!1,!1),i.dispatchEvent(f)}else{a.createEventObject?i.fireEvent("onclick"):"function"==typeof i.onclick&&i.onclick()}}},C=function(f){"function"==typeof f.stopPropagation?(f.stopPropagation(),f.preventDefault()):b.event&&b.event.hasOwnProperty("cancelBubble")&&(b.event.cancelBubble=!0)};E.hasClass=e,E.addClass=H,E.removeClass=t,E.escapeHtml=w,E._show=G,E.show=B,E._hide=A,E.hide=z,E.isDescendant=g,E.getTopMargin=q,E.fadeIn=F,E.fadeOut=D,E.fireClick=x,E.stopEventPropagation=C},{}],5:[function(g,j,f){Object.defineProperty(f,"__esModule",{value:!0});var i=g("./handle-dom"),h=g("./handle-swal-dom"),e=function(A,n,y){var r=A||b.event,s=r.keyCode||r.which,z=y.querySelector("button.confirm"),x=y.querySelector("button.cancel"),w=y.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(s)){for(var v=r.target||r.srcElement,k=-1,q=0;q<w.length;q++){if(v===w[q]){k=q;break}}9===s?(v=-1===k?z:k===w.length-1?w[0]:w[k+1],i.stopEventPropagation(r),v.focus(),n.confirmButtonColor&&h.setFocusStyle(v,n.confirmButtonColor)):13===s?("INPUT"===v.tagName&&(v=z,z.focus()),v=-1===k?z:d):27===s&&n.allowEscapeKey===!0?(v=x,i.fireClick(v,r)):v=d}};f["default"]=e,j.exports=f["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(E,D,O){var A=function(f){return f&&f.__esModule?f:{"default":f}};Object.defineProperty(O,"__esModule",{value:!0});var x=E("./utils"),G=E("./handle-dom"),H=E("./default-params"),t=A(H),M=E("./injected-html"),L=A(M),K=".sweet-alert",B=".sweet-overlay",F=function(){var f=a.createElement("div");for(f.innerHTML=L["default"];f.firstChild;){a.body.appendChild(f.firstChild)}},q=function(g){function f(){return g.apply(this,arguments)}return f.toString=function(){return g.toString()},f}(function(){var f=a.querySelector(K);return f||(F(),f=q()),f}),j=function(){var f=q();return f?f.querySelector("input"):void 0},I=function(){return a.querySelector(B)},N=function(g,f){var h=x.hexToRgb(f);g.style.boxShadow="0 0 2px rgba("+h+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},J=function(l){var i=q();G.fadeIn(I(),10),G.show(i),G.addClass(i,"showSweetAlert"),G.removeClass(i,"hideSweetAlert"),b.previousActiveElement=a.activeElement;var f=i.querySelector("button.confirm");f.focus(),setTimeout(function(){G.addClass(i,"visible")},500);var h=i.getAttribute("data-timer");if("null"!==h&&""!==h){var g=l;i.timeout=setTimeout(function(){var m=(g||null)&&"true"===i.getAttribute("data-has-done-function");m?g(null):sweetAlert.close()},h)}},k=function(){var g=q(),f=j();G.removeClass(g,"show-input"),f.value=t["default"].inputValue,f.setAttribute("type",t["default"].inputType),f.setAttribute("placeholder",t["default"].inputPlaceholder),z()},z=function(g){if(g&&13===g.keyCode){return !1}var f=q(),i=f.querySelector(".sa-input-error");G.removeClass(i,"show");var h=f.querySelector(".sa-error-container");G.removeClass(h,"show")},e=function(){var f=q();f.style.marginTop=G.getTopMargin(q())};O.sweetAlertInitialize=F,O.getModal=q,O.getOverlay=I,O.getInput=j,O.setFocusStyle=N,O.openModal=J,O.resetInput=k,O.resetInputError=z,O.fixVerticalPosition=e},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(g,f,i){Object.defineProperty(i,"__esModule",{value:!0});var h='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n      <span class="sa-x-mark">\n        <span class="sa-line sa-left"></span>\n        <span class="sa-line sa-right"></span>\n      </span>\n    </div><div class="sa-icon sa-warning">\n      <span class="sa-body"></span>\n      <span class="sa-dot"></span>\n    </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n      <span class="sa-line sa-tip"></span>\n      <span class="sa-line sa-long"></span>\n\n      <div class="sa-placeholder"></div>\n      <div class="sa-fix"></div>\n    </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n    <p>Text</p>\n    <fieldset>\n      <input type="text" tabIndex="3" />\n      <div class="sa-input-error"></div>\n    </fieldset><div class="sa-error-container">\n      <div class="icon">!</div>\n      <p>Not valid!</p>\n    </div><div class="sa-button-container">\n      <button class="cancel" tabIndex="2">Cancel</button>\n      <div class="sa-confirm-button-container">\n        <button class="confirm" tabIndex="1">OK</button><div class="la-ball-fall">\n          <div></div>\n          <div></div>\n          <div></div>\n        </div>\n      </div>\n    </div></div>';i["default"]=h,f.exports=i["default"]},{}],8:[function(n,j,p){Object.defineProperty(p,"__esModule",{value:!0});var g=n("./utils"),m=n("./handle-swal-dom"),k=n("./handle-dom"),f=["error","warning","info","success","input","prompt"],h=function(A){var H=m.getModal(),q=H.querySelector("h2"),s=H.querySelector("p"),G=H.querySelector("button.cancel"),C=H.querySelector("button.confirm");if(q.innerHTML=A.html?A.title:k.escapeHtml(A.title).split("\n").join("<br>"),s.innerHTML=A.html?A.text:k.escapeHtml(A.text||"").split("\n").join("<br>"),A.text&&k.show(s),A.customClass){k.addClass(H,A.customClass),H.setAttribute("data-custom-class",A.customClass)}else{var B=H.getAttribute("data-custom-class");k.removeClass(H,B),H.setAttribute("data-custom-class","")}if(k.hide(H.querySelectorAll(".sa-icon")),A.type&&!g.isIE8()){var z=function(){for(var y=!1,e=0;e<f.length;e++){if(A.type===f[e]){y=!0;break}}if(!y){return logStr("Unknown alert type: "+A.type),{v:!1}}var v=["success","error","warning","info"],t=d;-1!==v.indexOf(A.type)&&(t=H.querySelector(".sa-icon.sa-"+A.type),k.show(t));var I=m.getInput();switch(A.type){case"success":k.addClass(t,"animate"),k.addClass(t.querySelector(".sa-tip"),"animateSuccessTip"),k.addClass(t.querySelector(".sa-long"),"animateSuccessLong");break;case"error":k.addClass(t,"animateErrorIcon"),k.addClass(t.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":k.addClass(t,"pulseWarning"),k.addClass(t.querySelector(".sa-body"),"pulseWarningIns"),k.addClass(t.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":I.setAttribute("type",A.inputType),I.value=A.inputValue,I.setAttribute("placeholder",A.inputPlaceholder),k.addClass(H,"show-input"),setTimeout(function(){I.focus(),I.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof z){return z.v}}if(A.imageUrl){var l=H.querySelector(".sa-icon.sa-custom");l.style.backgroundImage="url("+A.imageUrl+")",k.show(l);var r=80,F=80;if(A.imageSize){var E=A.imageSize.toString().split("x"),w=E[0],D=E[1];w&&D?(r=w,F=D):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+A.imageSize)}l.setAttribute("style",l.getAttribute("style")+"width:"+r+"px; height:"+F+"px")}H.setAttribute("data-has-cancel-button",A.showCancelButton),A.showCancelButton?G.style.display="inline-block":k.hide(G),H.setAttribute("data-has-confirm-button",A.showConfirmButton),A.showConfirmButton?C.style.display="inline-block":k.hide(C),A.cancelButtonText&&(G.innerHTML=k.escapeHtml(A.cancelButtonText)),A.confirmButtonText&&(C.innerHTML=k.escapeHtml(A.confirmButtonText)),A.confirmButtonColor&&(C.style.backgroundColor=A.confirmButtonColor,C.style.borderLeftColor=A.confirmLoadingButtonColor,C.style.borderRightColor=A.confirmLoadingButtonColor,m.setFocusStyle(C,A.confirmButtonColor)),H.setAttribute("data-allow-outside-click",A.allowOutsideClick);var x=A.doneFunction?!0:!1;H.setAttribute("data-has-done-function",x),A.animation?"string"==typeof A.animation?H.setAttribute("data-animation",A.animation):H.setAttribute("data-animation","pop"):H.setAttribute("data-animation","none"),H.setAttribute("data-timer",A.timer)};p["default"]=h,j.exports=p["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(h,p,m){Object.defineProperty(m,"__esModule",{value:!0});var f=function(l,i){for(var o in i){i.hasOwnProperty(o)&&(l[o]=i[o])}return l},k=function(l){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);return i?parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16):null},j=function(){return b.attachEvent&&!b.addEventListener},e=function(i){b.console&&b.console.log("SweetAlert: "+i)},g=function(q,l){q=String(q).replace(/[^0-9a-f]/gi,""),q.length<6&&(q=q[0]+q[0]+q[1]+q[1]+q[2]+q[2]),l=l||0;var s,r,i="#";for(r=0;3>r;r++){s=parseInt(q.substr(2*r,2),16),s=Math.round(Math.min(Math.max(0,s+s*l),255)).toString(16),i+=("00"+s).substr(s.length)}return i};m.extend=f,m.hexToRgb=k,m.isIE8=j,m.logStr=e,m.colorLuminance=g},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document);