PHP Classes

File: public/public/assets/backend/js/sweetalert2/dist/sweetalert2.min.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   LaraCMS   public/public/assets/backend/js/sweetalert2/dist/sweetalert2.min.js   Download  
File: public/public/assets/backend/js/sweetalert2/dist/sweetalert2.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: LaraCMS
Content management system based on Laravel
Author: By
Last change:
Date: 1 year ago
Size: 32,994 bytes
 

Contents

Class file image Download
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()})(this,function(){"use strict";function e(e){var t=function e(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return this instanceof e?void Object.getPrototypeOf(e).apply(this,n):new(Function.prototype.bind.apply(e,[null].concat(n)))};return t.prototype=s(Object.create(e.prototype),{constructor:t}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}function t(){var e=Ae.innerParams.get(this),t=Ae.domCache.get(this);e.showConfirmButton||(V(t.confirmButton),!e.showCancelButton&&V(t.actions)),O([t.popup,t.actions],k.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1}function n(e){e.inputValidator||Object.keys(Ee).forEach(function(t){e.input===t&&(e.inputValidator=e.expectRejections?Ee[t]:Oe.adaptInputValidator(Ee[t]))}),e.target&&("string"!=typeof e.target||document.querySelector(e.target))&&("string"==typeof e.target||e.target.appendChild)||(g("Target parameter is not valid, defaulting to \"body\""),e.target="body");var t,n=N(),o="string"==typeof e.target?document.querySelector(e.target):e.target;t=n&&o&&n.parentNode!==o.parentNode?oe(e):n||oe(e),e.width&&(t.style.width="number"==typeof e.width?e.width+"px":e.width),e.padding&&(t.style.padding="number"==typeof e.padding?e.padding+"px":e.padding),e.background&&(t.style.background=e.background);for(var a=window.getComputedStyle(t).getPropertyValue("background-color"),r=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),s=0;s<r.length;s++)r[s].style.backgroundColor=a;var i=M(),l=W(),d=U().querySelector("#"+k.content),u=J(),c=Q(),p=Y(),m=G(),f=X();if(e.titleText?l.innerText=e.titleText:e.title&&(l.innerHTML=e.title.split("\n").join("<br />")),"string"==typeof e.backdrop?M().style.background=e.backdrop:!e.backdrop&&L([document.documentElement,document.body],k["no-backdrop"]),e.html?ie(e.html,d):e.text?(d.textContent=e.text,T(d)):V(d),e.position in k?L(i,k[e.position]):(g("The \"position\" parameter is not valid, defaulting to \"center\""),L(i,k.center)),e.grow&&"string"==typeof e.grow){var b="grow-"+e.grow;b in k&&L(i,k[b])}"function"==typeof e.animation&&(e.animation=e.animation.call()),e.showCloseButton?(m.setAttribute("aria-label",e.closeButtonAriaLabel),T(m)):V(m),t.className=k.popup,e.toast?(L([document.documentElement,document.body],k["toast-shown"]),L(t,k.toast)):L(t,k.modal),e.customClass&&L(t,e.customClass);var y=z(),v=parseInt(null===e.currentProgressStep?Oe.getQueueStep():e.currentProgressStep,10);e.progressSteps&&e.progressSteps.length?(T(y),q(y),v>=e.progressSteps.length&&g("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(function(t,n){var o=document.createElement("li");if(L(o,k.progresscircle),o.innerHTML=t,n===v&&L(o,k.activeprogressstep),y.appendChild(o),n!==e.progressSteps.length-1){var i=document.createElement("li");L(i,k.progressline),e.progressStepsDistance&&(i.style.width=e.progressStepsDistance),y.appendChild(i)}})):V(y);for(var w=H(),C=0;C<w.length;C++)V(w[C]);if(e.type){var x=!1;for(var A in B)if(e.type===A){x=!0;break}if(!x)return h("Unknown alert type: "+e.type),!1;var E=t.querySelector("."+k.icon+"."+B[e.type]);T(E),e.animation&&L(E,"swal2-animate-"+e.type+"-icon")}var S=K();if(e.imageUrl?(S.setAttribute("src",e.imageUrl),S.setAttribute("alt",e.imageAlt),T(S),e.imageWidth?S.setAttribute("width",e.imageWidth):S.removeAttribute("width"),e.imageHeight?S.setAttribute("height",e.imageHeight):S.removeAttribute("height"),S.className=k.image,e.imageClass&&L(S,e.imageClass)):V(S),e.showCancelButton?p.style.display="inline-block":V(p),e.showConfirmButton?j(c,"display"):V(c),e.showConfirmButton||e.showCancelButton?T(u):V(u),c.innerHTML=e.confirmButtonText,p.innerHTML=e.cancelButtonText,c.setAttribute("aria-label",e.confirmButtonAriaLabel),p.setAttribute("aria-label",e.cancelButtonAriaLabel),c.className=k.confirm,L(c,e.confirmButtonClass),p.className=k.cancel,L(p,e.cancelButtonClass),e.buttonsStyling){L([c,p],k.styled),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor),e.cancelButtonColor&&(p.style.backgroundColor=e.cancelButtonColor);var P=window.getComputedStyle(c).getPropertyValue("background-color");c.style.borderLeftColor=P,c.style.borderRightColor=P}else O([c,p],k.styled),c.style.backgroundColor=c.style.borderLeftColor=c.style.borderRightColor="",p.style.backgroundColor=p.style.borderLeftColor=p.style.borderRightColor="";ie(e.footer,f),!0===e.animation?O(t,k.noanimation):L(t,k.noanimation),e.showLoaderOnConfirm&&!e.preConfirm&&g("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request")}function o(){if("undefined"!=typeof window){"undefined"==typeof Promise&&h("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)");for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if("undefined"==typeof t[0])return h("SweetAlert2 expects at least 1 attribute!"),!1;Le=this;var o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0}});var i=this._main(this.params);Ae.promise.set(this,i)}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n,o=0;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l=function e(t,n,o){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,o)}if("value"in i)return i.value;var r=i.get;return void 0===r?void 0:r.call(o)},d=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},c=function(){function e(e,t){var n=[],o=!0,i=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!(t&&n.length===t));o=!0);}catch(e){i=!0,a=e}finally{try{!o&&s["return"]&&s["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p="SweetAlert2:",m=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t},f=function(e){var t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(function(e,n){t.push([n,e])}):Object.keys(e).forEach(function(n){t.push([n,e[n]])}),t},g=function(e){console.warn(p+" "+e)},h=function(e){console.error(p+" "+e)},b=[],y=function(e){-1!==b.indexOf(e)||(b.push(e),g(e))},v=function(e){return"function"==typeof e?e():e},w=function(e){return"object"===("undefined"==typeof e?"undefined":a(e))&&"function"==typeof e.then},C=Object.freeze({cancel:"cancel",backdrop:"overlay",close:"close",esc:"esc",timer:"timer"}),x=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},k=x(["container","shown","iosfix","popup","modal","no-backdrop","toast","toast-shown","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","icon-text","image","input","has-input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen"]),B=x(["success","warning","info","question","error"]),A={previousActiveElement:null,previousBodyPadding:null},E=function(e,t){return!!e.classList&&e.classList.contains(t)},S=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},P=function(e,t,n){e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(function(t){e.forEach?e.forEach(function(e){n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},L=function(e,t){P(e,t,!0)},O=function(e,t){P(e,t,!1)},_=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(E(e.childNodes[n],t))return e.childNodes[n]},T=function(e){e.style.opacity="",e.style.display=e.id===k.content?"block":"flex"},V=function(e){e.style.opacity="",e.style.display="none"},q=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},D=function(e){return e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},j=function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},R=function(){if(A.previousActiveElement&&A.previousActiveElement.focus){var e=window.scrollX,t=window.scrollY;A.previousActiveElement.focus(),"undefined"!=typeof e&&"undefined"!=typeof t&&window.scrollTo(e,t)}},M=function(){return document.body.querySelector("."+k.container)},I=function(e){var t=M();return t?t.querySelector("."+e):null},N=function(){return I(k.popup)},H=function(){var e=N();return e.querySelectorAll("."+k.icon)},W=function(){return I(k.title)},U=function(){return I(k.content)},K=function(){return I(k.image)},z=function(){return I(k.progresssteps)},F=function(){return I(k.validationerror)},Q=function(){return I(k.confirm)},Y=function(){return I(k.cancel)},J=function(){return I(k.actions)},X=function(){return I(k.footer)},G=function(){return I(k.close)},Z=function(){var e=Array.prototype.slice.call(N().querySelectorAll("[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])")).sort(function(e,t){return(e=parseInt(e.getAttribute("tabindex")),t=parseInt(t.getAttribute("tabindex")),e>t)?1:e<t?-1:0}),t=Array.prototype.slice.call(N().querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex=\"0\"], [contenteditable], audio[controls], video[controls]"));return m(e.concat(t))},$=function(){return!document.body.classList.contains(k["toast-shown"])},ee=function(){return document.body.classList.contains(k["toast-shown"])},te=function(){return"undefined"==typeof window||"undefined"==typeof document},ne=("\n <div aria-labelledby=\""+k.title+"\" aria-describedby=\""+k.content+"\" class=\""+k.popup+"\" tabindex=\"-1\">\n <div class=\""+k.header+"\">\n <ul class=\""+k.progresssteps+"\"></ul>\n <div class=\""+k.icon+" "+B.error+"\">\n <span class=\"swal2-x-mark\"><span class=\"swal2-x-mark-line-left\"></span><span class=\"swal2-x-mark-line-right\"></span></span>\n </div>\n <div class=\""+k.icon+" "+B.question+"\">\n <span class=\""+k["icon-text"]+"\">?</span>\n </div>\n <div class=\""+k.icon+" "+B.warning+"\">\n <span class=\""+k["icon-text"]+"\">!</span>\n </div>\n <div class=\""+k.icon+" "+B.info+"\">\n <span class=\""+k["icon-text"]+"\">i</span>\n </div>\n <div class=\""+k.icon+" "+B.success+"\">\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n </div>\n <img class=\""+k.image+"\" />\n <h2 class=\""+k.title+"\" id=\""+k.title+"\"></h2>\n <button type=\"button\" class=\""+k.close+"\">\xD7</button>\n </div>\n <div class=\""+k.content+"\">\n <div id=\""+k.content+"\"></div>\n <input class=\""+k.input+"\" />\n <input type=\"file\" class=\""+k.file+"\" />\n <div class=\""+k.range+"\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\""+k.select+"\"></select>\n <div class=\""+k.radio+"\"></div>\n <label for=\""+k.checkbox+"\" class=\""+k.checkbox+"\">\n <input type=\"checkbox\" />\n </label>\n <textarea class=\""+k.textarea+"\"></textarea>\n <div class=\""+k.validationerror+"\" id=\""+k.validationerror+"\"></div>\n </div>\n <div class=\""+k.actions+"\">\n <button type=\"button\" class=\""+k.confirm+"\">OK</button>\n <button type=\"button\" class=\""+k.cancel+"\">Cancel</button>\n </div>\n <div class=\""+k.footer+"\">\n </div>\n </div>\n").replace(/(^|\n)\s*/g,""),oe=function(e){var t=M();if(t&&(t.parentNode.removeChild(t),O([document.documentElement,document.body],[k["no-backdrop"],k["has-input"],k["toast-shown"]])),te())return void h("SweetAlert2 requires document to initialize");var n=document.createElement("div");n.className=k.container,n.innerHTML=ne;var o="string"==typeof e.target?document.querySelector(e.target):e.target;o.appendChild(n);var i=N(),a=U(),r=_(a,k.input),s=_(a,k.file),l=a.querySelector("."+k.range+" input"),d=a.querySelector("."+k.range+" output"),u=_(a,k.select),c=a.querySelector("."+k.checkbox+" input"),p=_(a,k.textarea);i.setAttribute("role",e.toast?"alert":"dialog"),i.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||i.setAttribute("aria-modal","true");var m=function(){Oe.isVisible()&&Oe.resetValidationError()};return r.oninput=m,s.onchange=m,u.onchange=m,c.onchange=m,p.oninput=m,l.oninput=function(){m(),d.value=l.value},l.onchange=function(){m(),l.nextSibling.value=l.value},i},ie=function(e,t){if(!e)return V(t);if("object"===("undefined"==typeof e?"undefined":a(e))){if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));}else if(e)t.innerHTML=e;else;T(t)},ae=function(){if(te())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&"undefined"!=typeof e.style[n])return t[n];return!1}(),re=function(){var e="ontouchstart"in window||navigator.msMaxTouchPoints;if(e)return 0;var t=document.createElement("div");t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var n=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),n},se=function(){null!==A.previousBodyPadding||document.body.scrollHeight>window.innerHeight&&(A.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=re()+"px")},le=function(){null!==A.previousBodyPadding&&(document.body.style.paddingRight=A.previousBodyPadding,A.previousBodyPadding=null)},de=function(){var e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;if(e&&!E(document.body,k.iosfix)){var t=document.body.scrollTop;document.body.style.top=-1*t+"px",L(document.body,k.iosfix)}},ue=function(){if(E(document.body,k.iosfix)){var e=parseInt(document.body.style.top,10);O(document.body,k.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},ce={},pe=function(e,t){var n=M(),o=N();if(o){null!==e&&"function"==typeof e&&e(o),O(o,k.show),L(o,k.hide),clearTimeout(o.timeout),ee()||(R(),window.onkeydown=ce.previousWindowKeyDown,ce.windowOnkeydownOverridden=!1);var i=function(){n.parentNode&&n.parentNode.removeChild(n),O([document.documentElement,document.body],[k.shown,k["no-backdrop"],k["has-input"],k["toast-shown"]]),$()&&(le(),ue()),null!==t&&"function"==typeof t&&setTimeout(function(){t()})};ae&&!E(o,k.noanimation)?o.addEventListener(ae,function e(){o.removeEventListener(ae,e),E(o,k.hide)&&i()}):i()}},me={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",target:"body",backdrop:!0,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},fe=["useRejections","expectRejections"],ge=function(e){return me.hasOwnProperty(e)||"extraParams"===e},he=function(e){return-1!==fe.indexOf(e)},be=function(e){for(var t in e)ge(t)||g("Unknown parameter \""+t+"\""),he(t)&&y("The parameter \""+t+"\" is deprecated and will be removed in the next major release.")},ye={},ve=[],we=function(e,t){return t&&t<ve.length?ve.splice(t,0,e):ve.push(e)},Ce=function(e){"undefined"!=typeof ve[e]&&ve.splice(e,1)},xe=function(){var e=N();e||Oe(""),e=N();var t=J(),n=Q(),o=Y();T(t),T(n),L([e,t],k.loading),n.disabled=!0,o.disabled=!0,e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ke=Object.freeze({isValidParameter:ge,isDeprecatedParameter:he,argsToParams:function(e){var t={};switch(a(e[0])){case"string":["title","html","type"].forEach(function(n,o){void 0!==e[o]&&(t[n]=e[o])});break;case"object":s(t,e[0]);break;default:return h("Unexpected type of argument! Expected \"string\" or \"object\", got "+a(e[0])),!1;}return t},adaptInputValidator:function(e){return function(t,n){return e.call(this,t,n).then(function(){},function(e){return e})}},close:pe,closePopup:pe,closeModal:pe,closeToast:pe,isVisible:function(){return!!N()},clickConfirm:function(){return Q().click()},clickCancel:function(){return Y().click()},getPopup:N,getTitle:W,getContent:U,getImage:K,getButtonsWrapper:function(){return y("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"),I(k.actions)},getActions:J,getConfirmButton:Q,getCancelButton:Y,getFooter:X,isLoading:function(){return N().hasAttribute("data-loading")},mixin:function(t){var n=this;return e(function(e){function n(){return i(this,n),u(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return d(n,e),r(n,[{key:"_main",value:function(e){return l(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_main",this).call(this,s({},t,e))}}]),n}(n))},queue:function(e){var t=this;ve=e;var n=function(){ve=[],document.body.removeAttribute("data-swal2-queue-step")},o=[];return new Promise(function(e){(function a(r,i){r<ve.length?(document.body.setAttribute("data-swal2-queue-step",r),t(ve[r]).then(function(t){"undefined"==typeof t.value?(n(),e({dismiss:t.dismiss})):(o.push(t.value),a(r+1,i))})):(n(),e({value:o}))})(0)})},getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")},insertQueueStep:we,deleteQueueStep:Ce,showLoading:xe,enableLoading:xe,fire:function(){for(var e=this,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return new(Function.prototype.bind.apply(e,[null].concat(n)))}});if("undefined"!=typeof window&&"function"!=typeof window.WeakMap){var Be=0;window.Symbol=function(e){return"__"+e+"_"+Math.floor(1e9*Math.random())+"_"+ ++Be+"__"},Symbol.iterator=Symbol("Symbol.iterator"),window.WeakMap=function(e,t,n){function o(){t(this,e,{value:Symbol("WeakMap")})}return o.prototype={delete:function(t){delete t[this[e]]},get:function(t){return t[this[e]]},has:function(t){return n.call(t,this[e])},set:function(n,o){t(n,this[e],{configurable:!0,value:o})}},o}(Symbol("WeakMap"),Object.defineProperty,{}.hasOwnProperty)}var Ae={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ee={email:function(e){return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.reject("Invalid email address")},url:function(e){return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(e)?Promise.resolve():Promise.reject("Invalid URL")}},Se=function(e,t,n){var o=M(),i=N();null!==t&&"function"==typeof t&&t(i),e?(L(i,k.show),L(o,k.fade),O(i,k.hide)):O(i,k.fade),T(i),o.style.overflowY="hidden",ae&&!E(i,k.noanimation)?i.addEventListener(ae,function e(){i.removeEventListener(ae,e),o.style.overflowY="auto"}):o.style.overflowY="auto",L([document.documentElement,document.body,o],k.shown),$()&&(se(),de()),A.previousActiveElement=document.activeElement,null!==n&&"function"==typeof n&&setTimeout(function(){n(i)})},Pe=Object.freeze({hideLoading:t,disableLoading:t,getInput:function(e){var t=Ae.innerParams.get(this),n=Ae.domCache.get(this);return(e=e||t.input,!e)?null:"select"===e||"textarea"===e||"file"===e?_(n.content,k[e]):"checkbox"===e?n.popup.querySelector("."+k.checkbox+" input"):"radio"===e?n.popup.querySelector("."+k.radio+" input:checked")||n.popup.querySelector("."+k.radio+" input:first-child"):"range"===e?n.popup.querySelector("."+k.range+" input"):_(n.content,k.input)},enableButtons:function(){var e=Ae.domCache.get(this);e.confirmButton.disabled=!1,e.cancelButton.disabled=!1},disableButtons:function(){var e=Ae.domCache.get(this);e.confirmButton.disabled=!0,e.cancelButton.disabled=!0},enableConfirmButton:function(){var e=Ae.domCache.get(this);e.confirmButton.disabled=!1},disableConfirmButton:function(){var e=Ae.domCache.get(this);e.confirmButton.disabled=!0},enableInput:function(){var e=this.getInput();if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode,n=t.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=!1;else e.disabled=!1},disableInput:function(){var e=this.getInput();if(!e)return!1;if(e&&"radio"===e.type)for(var t=e.parentNode.parentNode,n=t.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=!0;else e.disabled=!0},showValidationError:function(e){var t=Ae.domCache.get(this);t.validationError.innerHTML=e;var n=window.getComputedStyle(t.popup);t.validationError.style.marginLeft="-"+n.getPropertyValue("padding-left"),t.validationError.style.marginRight="-"+n.getPropertyValue("padding-right"),T(t.validationError);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",k.validationerror),S(o),L(o,k.inputerror))},resetValidationError:function(){var e=Ae.domCache.get(this);e.validationError&&V(e.validationError);var t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedBy"),O(t,k.inputerror))},_main:function(e){var t=this;be(e);var o=s({},me,e);n(o),Object.freeze(o),Ae.innerParams.set(this,o);var r={popup:N(),container:M(),content:U(),actions:J(),confirmButton:Q(),cancelButton:Y(),closeButton:G(),validationError:F(),progressSteps:z()};Ae.domCache.set(this,r);var l=this.constructor;return new Promise(function(e,n){var s=function(t){l.closePopup(o.onClose,o.onAfterClose),o.useRejections?e(t):e({value:t})},d=function(t){l.closePopup(o.onClose,o.onAfterClose),o.useRejections?n(t):e({dismiss:t})},u=function(e){l.closePopup(o.onClose,o.onAfterClose),n(e)};o.timer&&(r.popup.timeout=setTimeout(function(){return d("timer")},o.timer));var p=function(){var e=t.getInput();if(!e)return null;switch(o.input){case"checkbox":return e.checked?1:0;case"radio":return e.checked?e.value:null;case"file":return e.files.length?e.files[0]:null;default:return o.inputAutoTrim?e.value.trim():e.value;}};o.input&&setTimeout(function(){var e=t.getInput();e&&S(e)},0);for(var m=function(e){if(o.showLoaderOnConfirm&&l.showLoading(),o.preConfirm){t.resetValidationError();var n=Promise.resolve().then(function(){return o.preConfirm(e,o.extraParams)});o.expectRejections?n.then(function(t){return s(t||e)},function(e){t.hideLoading(),e&&t.showValidationError(e)}):n.then(function(n){D(r.validationError)||!1===n?t.hideLoading():s(n||e)},function(e){return u(e)})}else s(e)},g=function(n){var i=n||window.event,e=i.target||i.srcElement,a=r.confirmButton,s=r.cancelButton,c=a&&(a===e||a.contains(e)),f=s&&(s===e||s.contains(e));switch(i.type){case"click":if(!(c&&l.isVisible()))f&&l.isVisible()&&(t.disableButtons(),d(l.DismissReason.cancel));else if(t.disableButtons(),o.input){var g=p();if(o.inputValidator){t.disableInput();var h=Promise.resolve().then(function(){return o.inputValidator(g,o.extraParams)});o.expectRejections?h.then(function(){t.enableButtons(),t.enableInput(),m(g)},function(e){t.enableButtons(),t.enableInput(),e&&t.showValidationError(e)}):h.then(function(e){t.enableButtons(),t.enableInput(),e?t.showValidationError(e):m(g)},function(e){return u(e)})}else m(g)}else m(!0);break;default:}},b=r.popup.querySelectorAll("button"),y=0;y<b.length;y++)b[y].onclick=g,b[y].onmouseover=g,b[y].onmouseout=g,b[y].onmousedown=g;if(r.closeButton.onclick=function(){d(l.DismissReason.close)},o.toast)r.popup.onclick=function(){o.showConfirmButton||o.showCancelButton||o.showCloseButton||o.input||(l.closePopup(o.onClose,o.onAfterClose),d(l.DismissReason.close))};else{var i=!1;r.popup.onmousedown=function(){r.container.onmouseup=function(t){r.container.onmouseup=void 0,t.target===r.container&&(i=!0)}},r.container.onmousedown=function(){r.popup.onmouseup=function(t){r.popup.onmouseup=void 0,(t.target===r.popup||r.popup.contains(t.target))&&(i=!0)}},r.container.onclick=function(t){return i?void(i=!1):void(t.target!==r.container||v(o.allowOutsideClick)&&d(l.DismissReason.backdrop))}}o.reverseButtons?r.confirmButton.parentNode.insertBefore(r.cancelButton,r.confirmButton):r.confirmButton.parentNode.insertBefore(r.confirmButton,r.cancelButton);var C=function(e,t){for(var n=Z(o.focusCancel),i=0;i<n.length;i++){e+=t,e===n.length?e=0:-1===e&&(e=n.length-1);var a=n[e];if(D(a))return a.focus()}};o.toast&&ce.windowOnkeydownOverridden&&(window.onkeydown=ce.previousWindowKeyDown,ce.windowOnkeydownOverridden=!1),o.toast||ce.windowOnkeydownOverridden||(ce.previousWindowKeyDown=window.onkeydown,ce.windowOnkeydownOverridden=!0,window.onkeydown=function(n){var i=n||window.event;if("Enter"===i.key&&!i.isComposing){if(i.target===t.getInput()){if(-1!==["textarea","file"].indexOf(o.input))return;l.clickConfirm(),i.preventDefault()}}else if("Tab"===i.key){for(var e=i.target||i.srcElement,a=Z(o.focusCancel),s=-1,u=0;u<a.length;u++)if(e===a[u]){s=u;break}i.shiftKey?C(s,-1):C(s,1),i.stopPropagation(),i.preventDefault()}else-1===["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"].indexOf(i.key)?("Escape"===i.key||"Esc"===i.key)&&!0===v(o.allowEscapeKey)&&d(l.DismissReason.esc):document.activeElement===r.confirmButton&&D(r.cancelButton)?r.cancelButton.focus():document.activeElement===r.cancelButton&&D(r.confirmButton)&&r.confirmButton.focus()}),t.enableButtons(),t.hideLoading(),t.resetValidationError(),o.input&&L(document.body,k["has-input"]);for(var x=["input","file","range","select","radio","checkbox","textarea"],B=void 0,A=0;A<x.length;A++){var E=k[x[A]],P=_(r.content,E);if(B=t.getInput(x[A]),B){for(var O in B.attributes)if(B.attributes.hasOwnProperty(O)){var q=B.attributes[O].name;"type"!==q&&"value"!==q&&B.removeAttribute(q)}for(var j in o.inputAttributes)B.setAttribute(j,o.inputAttributes[j])}P.className=E,o.inputClass&&L(P,o.inputClass),V(P)}var R;switch(o.input){case"text":case"email":case"password":case"number":case"tel":case"url":B=_(r.content,k.input),B.value=o.inputValue,B.placeholder=o.inputPlaceholder,B.type=o.input,T(B);break;case"file":B=_(r.content,k.file),B.placeholder=o.inputPlaceholder,B.type=o.input,T(B);break;case"range":var M=_(r.content,k.range),I=M.querySelector("input"),N=M.querySelector("output");I.value=o.inputValue,I.type=o.input,N.value=o.inputValue,T(M);break;case"select":var H=_(r.content,k.select);if(H.innerHTML="",o.inputPlaceholder){var W=document.createElement("option");W.innerHTML=o.inputPlaceholder,W.value="",W.disabled=!0,W.selected=!0,H.appendChild(W)}R=function(e){e.forEach(function(e){var t=c(e,2),n=t[0],i=t[1],a=document.createElement("option");a.value=n,a.innerHTML=i,o.inputValue.toString()===n.toString()&&(a.selected=!0),H.appendChild(a)}),T(H),H.focus()};break;case"radio":var U=_(r.content,k.radio);U.innerHTML="",R=function(e){e.forEach(function(e){var t=c(e,2),n=t[0],i=t[1],a=document.createElement("input"),r=document.createElement("label");a.type="radio",a.name=k.radio,a.value=n,o.inputValue.toString()===n.toString()&&(a.checked=!0),r.innerHTML=i,r.insertBefore(a,r.firstChild),U.appendChild(r)}),T(U);var t=U.querySelectorAll("input");t.length&&t[0].focus()};break;case"checkbox":var K=_(r.content,k.checkbox),z=t.getInput("checkbox");z.type="checkbox",z.value=1,z.id=k.checkbox,z.checked=!!o.inputValue;var F=K.getElementsByTagName("span");F.length&&K.removeChild(F[0]),F=document.createElement("span"),F.innerHTML=o.inputPlaceholder,K.appendChild(F),T(K);break;case"textarea":var Q=_(r.content,k.textarea);Q.value=o.inputValue,Q.placeholder=o.inputPlaceholder,T(Q);break;case null:break;default:h("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \""+o.input+"\"");}if("select"===o.input||"radio"===o.input){var Y=function(e){return R(f(e))};w(o.inputOptions)?(l.showLoading(),o.inputOptions.then(function(e){t.hideLoading(),Y(e)})):"object"===a(o.inputOptions)?Y(o.inputOptions):h("Unexpected type of inputOptions! Expected object, Map or Promise, got "+a(o.inputOptions))}else-1!==["text","email","number","tel","textarea"].indexOf(o.input)&&w(o.inputValue)&&(l.showLoading(),V(B),o.inputValue.then(function(e){B.value="number"===o.input?parseFloat(e)||0:e+"",T(B),t.hideLoading()}).catch(function(e){h("Error in inputValue promise: "+e),B.value="",T(B),t.hideLoading()}));Se(o.animation,o.onBeforeOpen,o.onOpen),o.toast||(v(o.allowEnterKey)?o.focusCancel&&D(r.cancelButton)?r.cancelButton.focus():o.focusConfirm&&D(r.confirmButton)?r.confirmButton.focus():C(-1,1):document.activeElement&&document.activeElement.blur()),r.container.scrollTop=0})}}),Le=void 0;o.prototype.then=function(e,t){var n=Ae.promise.get(this);return n.then(e,t)},o.prototype.catch=function(e){var t=Ae.promise.get(this);return t.catch(e)},o.prototype.finally=function(e){var t=Ae.promise.get(this);return t.finally(e)},s(o.prototype,Pe),s(o,ke),Object.keys(Pe).forEach(function(e){o[e]=function(){if(Le){var t;return(t=Le)[e].apply(t,arguments)}}}),o.DismissReason=C,o.noop=function(){},o.version="7.19.3";var Oe=e(function(e){var t=function(t){function n(){return i(this,n),u(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return d(n,t),r(n,[{key:"_main",value:function(e){return l(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_main",this).call(this,s({},ye,e))}}],[{key:"setDefaults",value:function(t){if(y("\"setDefaults\" & \"resetDefaults\" methods are deprecated in favor of \"mixin\" method and will be removed in the next major release. For new projects, use \"mixin\". For past projects already using \"setDefaults\", support will be provided through an additional package."),!t||"object"!==("undefined"==typeof t?"undefined":a(t)))throw new TypeError("SweetAlert2: The argument for setDefaults() is required and has to be a object");be(t),Object.keys(t).forEach(function(n){e.isValidParameter(n)&&(ye[n]=t[n])})}},{key:"resetDefaults",value:function(){y("\"setDefaults\" & \"resetDefaults\" methods are deprecated in favor of \"mixin\" method and will be removed in the next major release. For new projects, use \"mixin\". For past projects already using \"setDefaults\", support will be provided through an additional package."),ye={}}}]),n}(e);return"undefined"!=typeof window&&"object"===a(window._swalDefaults)&&t.setDefaults(window._swalDefaults),t}(o));return Oe.default=Oe,Oe}),"undefined"!=typeof window&&window.Sweetalert2&&(window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2);