customizable-toast-notification 3.9.6 → 3.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * Customizable Toast Notifications 3.9.6
3
- * Build: 2025-09-26 12:35:00
4
- * Cache-Buster: 1758890100951
2
+ * Customizable Toast Notifications 3.9.7
3
+ * Build: 2025-10-08 00:37:32
4
+ * Cache-Buster: 1759883852353
5
5
  * Author: Priyanshu Patel
6
6
  * Email: [priyanshu.alt191@gmail.com](mailto:priyanshu.alt191@gmail.com)
7
7
  * License: Apache-2.0
@@ -12,7 +12,7 @@
12
12
  * Supports flexible positioning, theming, icons, animations, and timing options
13
13
  * out of the box — with CTA support and zero dependencies.
14
14
  */
15
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).customizableToast={})}(this,function(t){"use strict";function e(t,e,n,r,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise(function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,u,"next",t)}function u(t){e(i,o,a,s,u,"throw",t)}s(void 0)})}}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(){
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).customizableToast={})}(this,function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,u,"next",e)}function u(e){n(i,o,a,s,u,"throw",e)}s(void 0)})}}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(){
16
16
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
17
- var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var i=r&&r.prototype instanceof c?r:c,l=Object.create(i.prototype);return s(l,"_invoke",function(n,r,o){var a,i,s,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,i=0,s=t,p.n=n,u}};function d(n,r){for(i=n,s=r,e=0;!f&&c&&!o&&e<l.length;e++){var o,a=l[e],d=p.p,h=a[2];n>3?(o=h===r)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,p.v=r,p.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,i=0))}if(o||n>1)return u;throw f=!0,r}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),i=l,s=h;(e=i<2?t:s)||!f;){a||(i?i<3?(i>1&&(p.n=-1),d(i,s)):p.n=s:p.v=s);try{if(c=2,a){if(i||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,i<2&&(i=0)}else 1===i&&(e=a.return)&&e.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((e=(f=p.n<0)?s:n.call(r,p))!==u)break}catch(e){a=t,i=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,o,a),!0),l}var u={};function c(){}function l(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),d=f.prototype=c.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=f,s(d,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,o,"GeneratorFunction"),s(d),s(d,o,"Generator"),s(d,r,function(){return this}),s(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:h}})()}function s(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,n,r){function a(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},s(t,e,n,r)}function u(t){return c.apply(this,arguments)}function c(){return(c=n(i().m(function t(e){return i().w(function(t){for(;;)if(0===t.n)return t.a(2,"".concat(e,"-").concat(Date.now(),"-").concat(Math.floor(1e5*Math.random())))},t)}))).apply(this,arguments)}function l(t,e){return f.apply(this,arguments)}function f(){return(f=n(i().m(function t(e,n){var r,o,a;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&n){t.n=1;break}throw new Error("tagName and prefix is required");case 1:return r=document.createElement(e),t.n=2,u(n);case 2:return r.id=t.v,t.a(2,r);case 3:return t.p=3,t.v,t.p=4,o="div",a=document.createElement(o),t.n=5,u("fallback");case 5:return a.id=t.v,a.setAttribute("data-original-tag",o),t.a(2,a);case 6:t.p=6,t.v;case 7:return t.a(2)}},t,null,[[4,6],[0,3]])}))).apply(this,arguments)}function p(t){return d.apply(this,arguments)}function d(){return(d=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,!0);case 1:if(t.p=1,null==e||null===(n=e.parentNode)||void 0===n||!n.id.includes("toast-container-")){t.n=2;break}return e.parentNode.removeChild(e),t.a(2,!0);case 2:case 5:t.n=9;break;case 3:if(t.p=3,t.v,t.p=4,!e.remove){t.n=5;break}return e.remove(),t.a(2,!0);case 6:return t.p=6,t.v,t.p=7,e.style.display="none",e.style.opacity="0",e.style.pointerEvents="none",e.style.position="absolute",e.style.left="-9999px",t.a(2,!0);case 8:return t.p=8,t.v,t.a(2,!1);case 9:return t.a(2,!0)}},t,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function h(t){return m.apply(this,arguments)}function m(){return(m=n(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,!("number"==typeof e&&e>0)){t.n=1;break}return t.a(2,e);case 1:if("string"!=typeof e){t.n=3;break}if(!e.endsWith("s")||e.endsWith("ms")){t.n=2;break}return n=1e3*parseFloat(e),t.a(2,n>0?n:500);case 2:return r=parseFloat(e),t.a(2,r>0?r:500);case 3:t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2,500)}},t,null,[[0,4]])}))).apply(this,arguments)}function y(t){try{return(null==t?void 0:t.offsetWidth)||0}catch(t){return 0}}function b(t,e){return g.apply(this,arguments)}function g(){return(g=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,"snow");case 1:if(t.p=1,"transparent"!==e){t.n=2;break}return t.a(2,"snow");case 2:return t.n=3,O(e,{underlyingColor:e||"#ffffff",threshold:n||4.5});case 3:return r=t.v,t.a(2,r);case 4:return t.p=4,t.v,t.a(2,"snow")}},t,null,[[1,4]])}))).apply(this,arguments)}function v(t){return("0"+t.toString(16)).slice(-2)}function w(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(e=document)||void 0===e?void 0:e.documentElement;if("string"!=typeof t||!t.trim())return null;var r=t.trim();if(r.startsWith("var(")&&"undefined"!=typeof window&&n){var o=r.slice(4,-1).trim(),a=getComputedStyle(n).getPropertyValue(o).trim();return a?w(a,n):null}if("undefined"!=typeof document)try{var i=document.createElement("canvas").getContext("2d");i.fillStyle="#000",i.fillStyle=r;var s=i.fillStyle,u=s.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i);if(u)return{r:+u[1],g:+u[2],b:+u[3],a:void 0!==u[4]?+u[4]:1};if(s.startsWith("#"))return k(s)}catch(t){}if(/^#[0-9a-fA-F]{3,8}$/.test(r))return k(r);return{black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1},transparent:{r:0,g:0,b:0,a:0}}[r.toLowerCase()]||null}function k(t){var e=t.replace(/^#/,"");return 3!==e.length&&4!==e.length||(e=e.split("").map(t=>t+t).join("")),6===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1}:8===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:parseInt(e.slice(6,8),16)/255}:null}function x(t,e){if(void 0===t.a||t.a>=1)return{r:t.r,g:t.g,b:t.b};e||(e={r:255,g:255,b:255});var n=t.a;return{r:Math.round(t.r*n+e.r*(1-n)),g:Math.round(t.g*n+e.g*(1-n)),b:Math.round(t.b*n+e.b*(1-n))}}function C(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function E(t){return.2126*C(t.r)+.7152*C(t.g)+.0722*C(t.b)}function T(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}function S(t){var e,n,r=function(t){return t<=.0031308?Math.round(12.92*t*255):Math.round(255*(1.055*Math.pow(t,1/2.4)-.055))}(t=Math.min(1,Math.max(0,t)));return e=r,n=r,"#"+v(r)+v(e)+v(n)}function O(t){return j.apply(this,arguments)}function j(){return j=n(i().m(function t(e){var n,r,o,a,s,u,c,l,f,p,d,h,m,y,b=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=(n=b.length>1&&void 0!==b[1]?b[1]:{}).threshold||4.5,o=w(e,n.resolveVarElement)){t.n=1;break}return t.a(2,{color:"#000000",contrast:21,meetsAA:!0,blackContrast:21,whiteContrast:1,used:"black"});case 1:if(void 0!==o.a&&o.a<1?((s=n.underlyingColor)?(u="string"==typeof s?w(s,n.resolveVarElement):s,s=u?{r:u.r,g:u.g,b:u.b}:{r:255,g:255,b:255}):s={r:255,g:255,b:255},a=x(o,s)):a={r:o.r,g:o.g,b:o.b},c=E(a),l=T(c,1),f=T(c,0),!(l>=r||f>=r)){t.n=3;break}if(!(l>=f)){t.n=2;break}return t.a(2,{color:"#ffffff",contrast:l,meetsAA:l>=r,blackContrast:f,whiteContrast:l,used:"white"});case 2:return t.a(2,{color:"#000000",contrast:f,meetsAA:f>=r,blackContrast:f,whiteContrast:l,used:"black"});case 3:return p=l>f?r*(c+.05)-.05:(c+.05)/r-.05,p=Math.min(1,Math.max(0,p)),d=S(p),h={r:parseInt(d.slice(1,3),16),g:parseInt(d.slice(3,5),16),b:parseInt(d.slice(5,7),16)},m=E(h),y=T(c,m),t.a(2,{color:d,contrast:y,meetsAA:y>=r,blackContrast:f,whiteContrast:l,used:"generated"})}},t)})),j.apply(this,arguments)}function I(t,e,n){return P.apply(this,arguments)}function P(){return(P=n(i().m(function t(e,n,r){var o;return i().w(function(t){for(;;)switch(t.n){case 0:(o=document.createElement("button")).setAttribute("aria-label","Close notification"),o.setAttribute("title","Close"),o.textContent="×",Object.assign(o.style,{background:"none",border:"none",color:n.textColor,fontSize:"18px",marginLeft:"10px",cursor:"pointer"}),o.onclick=()=>r(e),e.appendChild(o),e._cleanupCloseButton=()=>{o.onclick=null};case 1:return t.a(2)}},t)}))).apply(this,arguments)}function L(t,e){return M.apply(this,arguments)}function M(){return(M=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:r=document.createElement("div"),Object.assign(r.style,{position:"absolute",left:"0",height:n.progressHeight||"4px",background:n.progressColor||"rgba(255, 255, 255, 0.3)",width:"100%",transition:"width ".concat(n.duration||1800,"ms linear"),["top"===n.progressPosition?"top":"bottom"]:"0"}),e.appendChild(r),setTimeout(()=>{y(r),r.style.width="0%"},100);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function A(t){return B.apply(this,arguments)}function B(){return(B=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function D(t,e,n){return W.apply(this,arguments)}function W(){return(W=n(i().m(function t(e,n,r){var o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(n.animationDuration);case 1:return o=t.v,Object.assign(e.style,{background:n.backgroundColor,padding:"12px 20px",marginBottom:"10px",borderRadius:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:n.maxWidth,opacity:"0",position:"relative",transition:"opacity ".concat(n.animationDuration," ").concat(n.animationEasing,", transform ").concat(n.animationDuration," ").concat(n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),e._animationDuration=o,(a=document.createElement("span")).style.position=n.fontPosition,a.style.display="inline-block",a.style.flex="1",a.style.padding=n.fontPadding,a.style.borderRadius=n.fontBorderRadius,a.style.background=n.fontBackgroundColor,a.style.fontFamily=n.fontFamily,a.style.fontSize=n.fontSize,a.style.fontWeight=n.fontWeight,a.style.lineHeight=n.fontLineHeight,a.style.color=n.textColor,a.style.userSelect="text",a.style.wordBreak="break-word",a.style.direction=n.fontDirection,a.style.webkitLineClamp="3",a.style.webkitBoxOrient="vertical",a.style.whiteSpace=n.wrapText?"normal":"nowrap",a.style.display="block",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.lineClamp="3",a.style.boxOrient="vertical",a.style.display="-webkit-box",a.textContent=n.message,a.setAttribute("aria-label","Toast Notification Center"),a.setAttribute("title",n.message),e.appendChild(a),t.n=2,_(e,n,r);case 2:if(!n.showCloseButton){t.n=3;break}return t.n=3,I(e,n,r);case 3:if(!n.showProgressBar){t.n=4;break}return t.n=4,L(e,n);case 4:return t.n=5,A(e);case 5:return t.a(2)}},t)}))).apply(this,arguments)}function z(t,e){return R.apply(this,arguments)}function R(){return(R=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,(r=document.createElement("div")).id="emergency-".concat(Date.now()),r.innerHTML='\n <div style="\n background: #333 !important;\n color: white !important;\n padding: 10px 15px !important;\n position: fixed !important;\n top: 20px !important;\n right: 20px !important;\n z-index: 99999 !important;\n border-radius: 3px !important;\n max-width: 250px !important;\n word-wrap: break-word !important;\n font-family: Arial, sans-serif !important;\n font-size: 14px !important;\n box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;\n cursor: pointer !important;\n " onclick="this.parentNode.removeChild(this)">\n '.concat(e.message||"Emergency Toast Creation Showing!",'\n <span style="float: right; margin-left: 10px; font-weight: bold;">&times;</span>\n </div>\n '),r._animationDuration=500,r._isEmergencyToast=!0,setTimeout(()=>{try{r.parentNode&&r.parentNode.removeChild(r),n(r)}catch(t){}},e.duration||1800),t.a(2,r);case 1:return t.p=1,t.v,setTimeout(()=>{try{alert(e.message||"Toast Creation Failed!"),n(null)}catch(t){n(null)}},100),t.a(2,null)}},t,null,[[0,1]])}))).apply(this,arguments)}function _(t,e,n){return F.apply(this,arguments)}function F(){return F=n(i().m(function t(e,r,o){var a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if((a=null==r?void 0:r.cta)&&a.label){t.n=1;break}return t.a(2);case 1:s=!!a.href&&"link"===a.variant,u=document.createElement(s?"a":"button"),s?(u.href=a.href,a.target&&(u.target=a.target),u.rel=a.rel||("_blank"===a.target?"noopener noreferrer":"")):u.type="button",u.setAttribute("aria-label",a.ariaLabel||a.label),Object.assign(u.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:r.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),u.textContent=a.label,u.addEventListener("click",function(){var t=n(i().m(function t(n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,"function"!=typeof a.onClick){t.n=1;break}if(null==(r=a.onClick(n))||!r.then){t.n=1;break}return t.n=1,r;case 1:return t.p=1,!1!==a.autoClose&&o(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}()),e.appendChild(u);case 2:return t.a(2)}},t)})),F.apply(this,arguments)}function H(t,e){return N.apply(this,arguments)}function N(){return(N=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(document.querySelector('[id^="toast-container-"]')){t.n=1;break}return t.a(2,null);case 1:return t.p=2,t.n=3,l("div","toast");case 3:return r=t.v,t.n=4,D(r,e,n);case 4:case 6:return t.a(2,r);case 5:return t.p=5,t.v,t.n=6,z(e,n)}},t,null,[[2,5]])}))).apply(this,arguments)}var q=new Map,G=new Map;function Y(){return"toast-container-".concat(function(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right").toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"-").replace(/\-+/g,"-")}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right"))}function U(){return V.apply(this,arguments)}function V(){return V=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=u.length>1?u[1]:void 0,o=Y((e=u.length>0&&void 0!==u[0]?u[0]:{}).position),!G.has(o)){t.n=1;break}return t.a(2,G.get(o));case 1:return a=n(i().m(function t(){var n,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(n=q.get(o))||!n.isConnected){t.n=1;break}return t.a(2,n);case 1:if((a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){t.n=3;break}if((a=document.createElement("div")).id=o,a.setAttribute("role","status"),a.setAttribute("aria-atomic","true"),a.style.position="fixed",a.style.zIndex="9999",a.style.inset="auto 10px 10px auto",a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.flexDirection="column",a.style.overflow="hidden","function"!=typeof r){t.n=2;break}return t.n=2,r(a,e);case 2:document.body.appendChild(a),t.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof r){t.n=4;break}return t.n=4,r(a,e);case 4:if((s=document.querySelectorAll("#".concat(o))).length>1)for(u=1;u<s.length;u++)try{s[u].remove()}catch(t){}return q.set(o,a),t.a(2,a)}},t)}))(),G.set(o,a),t.p=2,t.n=3,a;case 3:return s=t.v,t.a(2,s);case 4:return t.p=4,G.delete(Y(e.position)),t.f(4);case 5:return t.a(2)}},t,null,[[2,,4,5]])})),V.apply(this,arguments)}function X(t,e){return $.apply(this,arguments)}function $(){return($=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:if(e&&n.position){t.n=1;break}throw new Error("Invalid container or position!");case 1:if(J(e),r=K(n.position),!Q(e,n,r)){t.n=2;break}return t.a(2);case 2:if(!Z(e,r)){t.n=3;break}return t.a(2);case 3:tt(e,r);case 4:return t.a(2)}},t)}))).apply(this,arguments)}function J(t){t.style.top="auto",t.style.bottom="auto",t.style.left="auto",t.style.right="auto",t.style.transform="none"}function K(t){var e=t.toLowerCase().trim();return{hasTop:e.includes("top"),hasBottom:e.includes("bottom")||e.includes("below"),hasLeft:e.includes("left"),hasRight:e.includes("right"),hasCenter:e.includes("center"),hasFullWidth:e.includes("top-full-width")||e.includes("bottom-full-width")||e.includes("fullwidth")}}function Q(t,e,n){return!!n.hasFullWidth&&(e.maxWidth="100vw",n.hasTop?(t.style.top="10px",t.style.left="10px",t.style.right="10px",!0):!!n.hasBottom&&(t.style.bottom="10px",t.style.left="10px",t.style.right="10px",!0))}function Z(t,e){return!!e.hasCenter&&(!e.hasTop||e.hasLeft||e.hasRight?!e.hasBottom||e.hasLeft||e.hasRight?!e.hasLeft||e.hasTop||e.hasBottom?!e.hasRight||e.hasTop||e.hasBottom?!(e.hasLeft||e.hasRight||e.hasTop||e.hasBottom)&&(t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",!0):(t.style.right="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.left="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0):(t.style.top="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0))}function tt(t,e){e.hasBottom?t.style.bottom="10px":e.hasTop&&(t.style.top="10px"),e.hasRight?t.style.right="10px":e.hasLeft?t.style.left="10px":(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)")}class et{constructor(t,e){this.callback=t,this.delay=e,this.remaining=e,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}var nt=new Map,rt=new Map,ot=[],at=0;function it(t){for(var e=5381,n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return e>>>0}function st(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=String(t.type||"info").trim().toLowerCase(),n=t.message||"",r=String(t.position||"bottom-right").trim().toLowerCase();return[e,it(String(n)).toString(16),r].join("|")}function ut(){return ct.apply(this,arguments)}function ct(){return ct=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},t.p=1,r=st(e),!nt.has(r)){t.n=5;break}if(o=nt.get(r)){t.n=2;break}throw new Error("Active toast with key ".concat(r," not found"));case 2:return o.count++,o.timer.clear(),o.timer=pt(o.toast,e),t.n=3,dt(o);case 3:return t.n=4,kt(o);case 4:return t.a(2);case 5:if(!rt.has(r)){t.n=7;break}if(a=rt.get(r)){t.n=6;break}throw new Error("Pending toast with key ".concat(r," not found"));case 6:return a.count++,t.a(2);case 7:s={options:e,count:1,rafId:0},rt.set(r,s),s.rafId=requestAnimationFrame(n(i().m(function t(){var e;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=rt.get(r)){t.n=1;break}return t.a(2);case 1:if(rt.delete(r),!(at>=3)){t.n=3;break}return ot.push({options:e.options,key:r,count:e.count}),t.n=2,bt();case 2:return t.a(2);case 3:return t.p=3,t.n=4,lt(e.options,r,e.count);case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[3,5]])}))),t.n=9;break;case 8:t.p=8,t.v;case 9:return t.a(2)}},t,null,[[1,8]])})),ct.apply(this,arguments)}function lt(t,e,n){return ft.apply(this,arguments)}function ft(){return(ft=n(i().m(function t(e,n,r){var o,a,s,u,c,l,f,p;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&"object"==typeof e){t.n=1;break}throw new TypeError("options must be an object");case 1:return at++,t.n=2,U(e,X);case 2:if(o=t.v){t.n=3;break}throw new Error("Failed to create toast container");case 3:return t.n=4,H(e,mt);case 4:if(a=t.v){t.n=5;break}throw new Error("Toast element creation failed");case 5:if(s=document.createElement("div"),Object.assign(s.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),u=document.createElement("div"),Object.assign(u.style,{position:"relative",overflow:"hidden",borderRadius:e.borderRadius||"8px",zIndex:"1"}),u.appendChild(a),s.appendChild(u),o.id.includes("toast-container-")&&o.appendChild(s),c=!1!==e.pauseOnHover&&(!0===e.pauseOnHover||!!e.cta),l={outer:s,toast:a,count:Math.max(1,0|r),timeout:null,pauseOnHover:c},nt.set(n,l),a._key=n,!(l.count>1)){t.n=6;break}return t.n=6,kt(l);case 6:return l.timer=pt(a,e),t.n=7,dt(l);case 7:t.n=10;break;case 8:return t.p=8,t.v,at=Math.max(0,at-1),f=document.querySelector('[id^="toast-container-"]')||document.body,p=f,t.n=9,z(e,mt);case 9:p.appendChild.call(p,t.v);case 10:return t.a(2)}},t,null,[[0,8]])}))).apply(this,arguments)}function pt(t,e){var r=(e.duration||1800)+10,o=new et(n(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,mt(t);case 1:return e.a(2,e.v)}},e)})),r);return o.start(),o}function dt(t){return ht.apply(this,arguments)}function ht(){return(ht=n(i().m(function t(e){var n,r,o,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(e.pauseOnHover&&e.outer&&e.timer){t.n=1;break}return t.a(2);case 1:n=e.outer,r=e.timer,o=()=>{r.pause()},a=()=>{r.resume()},s=t=>{t.target.matches("button, a, [tabindex]")&&r.pause()},u=t=>{n.contains(t.relatedTarget)||r.resume()},n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a),n.addEventListener("focusin",s),n.addEventListener("focusout",u),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),n.removeEventListener("focusin",s),n.removeEventListener("focusout",u)};case 2:return t.a(2)}},t)}))).apply(this,arguments)}function mt(t){return yt.apply(this,arguments)}function yt(){return(yt=n(i().m(function t(e){var n,r,o,a,s;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,null!=e&&e._key){t.n=1;break}return t.a(2);case 1:if(a=nt.get(e._key)){t.n=2;break}return t.a(2);case 2:return null===(n=a.timer)||void 0===n||n.clear(),null===(r=a.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),nt.delete(e._key),at=Math.max(0,at-1),(s=a.outer.querySelector(".toast-count-badge"))&&s.remove(),t.n=3,vt(a.outer);case 3:return t.n=4,bt();case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[0,5]])}))).apply(this,arguments)}function bt(){return gt.apply(this,arguments)}function gt(){return(gt=n(i().m(function t(){var e,n;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(at<3&&ot.length)){t.n=3;break}if(e=ot.shift(),!nt.has(e.key)){t.n=2;break}return(n=nt.get(e.key)).count+=e.count,t.n=1,kt(n);case 1:return t.a(3,0);case 2:lt(e.options,e.key,e.count),t.n=0;break;case 3:return t.a(2)}},t)}))).apply(this,arguments)}function vt(t){return wt.apply(this,arguments)}function wt(){return(wt=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(e){t.n=1;break}return t.a(2,Promise.resolve());case 1:return t.a(2,new Promise(t=>{var n=!1,r=()=>{n||(n=!0,p(e),t())},o=e.firstElementChild||e;if(!o)return Promise.resolve();var a=t=>{try{if(t.target!==o)return;o.removeEventListener("transitionend",a,!0),r()}catch(t){}};try{o.addEventListener("transitionend",a,!0)}catch(t){}setTimeout(()=>{try{o.removeEventListener("transitionend",a,!0),r()}catch(t){}},700)}))}},t)}))).apply(this,arguments)}function kt(t){return xt.apply(this,arguments)}function xt(){return(xt=n(i().m(function t(e){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:if(n=e.outer,r=e.count,n&&!(!n instanceof HTMLElement)){t.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){t.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),t.a(2);case 2:(a=n.querySelector(".toast-count-badge"))||((a=document.createElement("span")).className="toast-count-badge",a.setAttribute("aria-label","".concat(r," identical notifications")),Object.assign(a.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),n.appendChild(a)),a.textContent=r>99?"99+":String(r);try{a.style.transform="scale(1.2)",setTimeout(()=>a.style.transform="scale(1)",150)}catch(t){}case 3:return t.a(2)}},t)}))).apply(this,arguments)}var Ct={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},Et={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},Tt=[],St=!1;function Ot(){return jt.apply(this,arguments)}function jt(){return(jt=n(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:if(!St){t.n=1;break}return t.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0):document.addEventListener("DOMContentLoaded",()=>{St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0},{once:!0}));case 2:return t.a(2)}},t)}))).apply(this,arguments)}function It(){return Pt.apply(this,arguments)}function Pt(){return Pt=n(i().m(function t(){var e,n,r,o,a=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.p=1,t.n=2,Dt(e);case 2:return n=t.v,t.n=3,At(n);case 3:return t.n=4,ut(n);case 4:t.n=6;break;case 5:t.p=5,t.v,o="string"==typeof(null==e?void 0:e.message)&&null!==(null==e?void 0:e.message)?"".concat(null==e||null===(r=e.message)||void 0===r?void 0:r.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(o);case 6:return t.a(2)}},t,null,[[1,5]])})),Pt.apply(this,arguments)}function Lt(){return Mt.apply(this,arguments)}function Mt(){return Mt=n(i().m(function t(){var e,n=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(e=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){t.n=1;break}return t.a(2);case 1:return t.n=2,Ot();case 2:if(St){t.n=3;break}return Tt.push(e),t.a(2);case 3:return t.n=4,It(e);case 4:return t.a(2)}},t)})),Mt.apply(this,arguments)}function At(t){return Bt.apply(this,arguments)}function Bt(){return(Bt=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,U(e,X);case 1:return n=t.v,t.a(2,n);case 2:return t.p=2,t.v,t.a(2,document.body)}},t,null,[[0,2]])}))).apply(this,arguments)}function Dt(t){return Wt.apply(this,arguments)}function Wt(){return(Wt=n(i().m(function t(e){var n,r,o,s,u,c,l,f,p,d;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(o=null==e||null===(n=e.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),s=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(u=a(a({},{pauseOnHover:void 0,duration:1800,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationType:"fade",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:s}),"object"!=typeof e||Array.isArray(e)?{}:e)).message=null!==(r=null==e?void 0:e.message)&&void 0!==r?r:u.message,t.p=1,u.backgroundColor||(u.backgroundColor=null!==(l=null===(f=Ct)||void 0===f?void 0:f[u.type])&&void 0!==l?l:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111"),u.message=u.message||(null===(c=Et)||void 0===c?void 0:c[u.type])||"No Message Provided!",u.textColor||!u.backgroundColor){t.n=3;break}return t.n=2,b(u.backgroundColor);case 2:p=t.v,u.textColor=null==p?void 0:p.color;case 3:if(u.progressColor||!u.backgroundColor){t.n=6;break}if(!u.textColor){t.n=4;break}u.progressColor=u.textColor,t.n=6;break;case 4:return t.n=5,b(u.backgroundColor);case 5:d=t.v,u.progressColor=null==d?void 0:d.color;case 6:t.n=8;break;case 7:t.p=7,t.v;case 8:return"string"!=typeof u.message&&(u.message="No Message Provided!"),t.a(2,u)}},t,null,[[1,7]])}))).apply(this,arguments)}function zt(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Ct=a(a({},Ct),t))}catch(t){}}function Rt(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Et=a(a({},Et),t))}catch(t){}}var _t=function(){var t=n(i().m(function t(){var e;return i().w(function(t){for(;;)switch(t.n){case 0:return e=document.querySelector('[id^="toast-"]:not([id*="container"])'),t.n=1,mt(e);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();try{"undefined"!=typeof window&&(window.customizableToast={createToast:Lt,setDefaultColors:zt,setDefaultMessages:Rt,noop:_t})}catch(t){}t.createToast=Lt,t.noop=_t,t.setDefaultColors=zt,t.setDefaultMessages=Rt});
17
+ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,o){var a,s,u,l=0,c=o||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return a=t,s=0,u=e,p.n=n,i}};function f(n,r){for(s=n,u=r,t=0;!d&&l&&!o&&t<c.length;t++){var o,a=c[t],f=p.p,h=a[2];n>3?(o=h===r)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=f&&((o=n<2&&f<a[1])?(s=0,p.v=r,p.n=a[1]):f<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,s=0))}if(o||n>1)return i;throw d=!0,r}return function(o,c,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,h),s=c,u=h;(t=s<2?e:u)||!d;){a||(s?s<3?(s>1&&(p.n=-1),f(s,u)):p.n=u:p.v=u);try{if(l=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(d=p.n<0)?u:n.call(r,p))!==i)break}catch(t){a=e,s=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,o,a),!0),c}var i={};function l(){}function c(){}function d(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=d,u(f,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(f),u(f,o,"Generator"),u(f,r,function(){return this}),u(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:a,m:h}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){function a(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},u(e,t,n,r)}function l(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=Date.now().toString(36),n=Math.floor(1048575*Math.random()).toString(36);return"".concat(e,"-").concat(t,"-").concat(n)}function d(e,t){return p.apply(this,arguments)}function p(){return(p=r(s().m(function e(t,n){var r;return s().w(function(e){for(;;)switch(e.n){case 0:if(t&&n){e.n=1;break}throw new Error("tagName and prefix are required");case 1:return(r=document.createElement(t)).id=c(n),e.a(2,r)}},e)}))).apply(this,arguments)}function f(e){return h.apply(this,arguments)}function h(){return(h=r(s().m(function e(t){var n;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t){e.n=1;break}return e.a(2,!0);case 1:if(e.p=1,null==t||null===(n=t.parentNode)||void 0===n||!n.id.includes("toast-container-")){e.n=2;break}return t.parentNode.removeChild(t),e.a(2,!0);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:if(e.p=4,!t.remove){e.n=5;break}return t.remove(),e.a(2,!0);case 5:e.n=7;break;case 6:e.p=6,e.v;case 7:return e.p=7,Object.assign(t.style,{display:"none",opacity:"0",pointerEvents:"none",position:"absolute",left:"-9999px"}),e.a(2,!0);case 8:return e.p=8,e.v,e.a(2,!1)}},e,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function m(e){return y.apply(this,arguments)}function y(){return(y=r(s().m(function e(t){var n,r;return s().w(function(e){for(;;)switch(e.n){case 0:if(!("number"==typeof t&&t>0)){e.n=1;break}return e.a(2,t);case 1:if("string"!=typeof t){e.n=3;break}if(!t.endsWith("s")||t.endsWith("ms")){e.n=2;break}return n=1e3*parseFloat(t),e.a(2,n>0?n:500);case 2:return r=parseFloat(t),e.a(2,r>0?r:500);case 3:return e.a(2,500)}},e)}))).apply(this,arguments)}var g=new class{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;this.maxSize=e,this.map=new Map}get(e){if(this.map.has(e)){var t=this.map.get(e);return this.map.delete(e),this.map.set(e,t),t}}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=this.maxSize){var n=this.map.keys().next().value;this.map.delete(n)}this.map.set(e,t)}}(200),b={};function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return"snow";var n,r,o,a="".concat(e,"|").concat(t),i=g.get(a);if(i)return i;if(b[null==e?void 0:e.toLowerCase()]){var s=b[e.toLowerCase()];return g.set(a,s),s}try{var u=null==e?void 0:e.match(/^#([0-9a-f]{3,8})$/i);if(u){var c=u[1];3===c.length&&(c=c.split("").map(e=>e+e).join("")),n=parseInt(c.slice(0,2),16),r=parseInt(c.slice(2,4),16),o=parseInt(c.slice(4,6),16)}else{var d=null==e?void 0:e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(!d)throw new Error("Unknown color");n=Number(d[1]),r=Number(d[2]),o=Number(d[3])}}catch(e){n=50+Math.floor(206*Math.random()),r=50+Math.floor(206*Math.random()),o=50+Math.floor(206*Math.random())}n=Math.round(n*t+255*(1-t)),r=Math.round(r*t+255*(1-t)),o=Math.round(o*t+255*(1-t));var p=(e,t,n)=>{var r=[e,t,n].map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*r[0]+.7152*r[1]+.0722*r[2]},f=(e,t)=>{var n=p(...e),r=p(...t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},h=((e,t,n)=>{e/=255,t/=255,n/=255;var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),s=(a+i)/2;if(a===i)r=o=0;else{var u=a-i;switch(o=s>.5?u/(2-a-i):u/(a+i),a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return[360*r,o,s]})(n,r,o),m=l(h,3),y=m[0],v=m[1],w=m[2],k=((e,t,n)=>{var r,o,a;if(e/=360,0===t)r=o=a=n;else{var i=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=i(u,s,e+1/3),o=i(u,s,e),a=i(u,s,e-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*a)]})(y,v,w<.5?Math.min(w+.5,1):Math.max(w-.5,0)),x=l(k,3),C=x[0],S=x[1],E=x[2];if(f([n,r,o],[C,S,E])<4.5){var O=l(f([n,r,o],[0,0,0])>=f([n,r,o],[255,255,255])?[0,0,0]:[255,255,255],3);C=O[0],S=O[1],E=O[2]}var j=((e,t,n)=>"#".concat(e.toString(16).padStart(2,"0")).concat(t.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0")))(C,S,E);return g.set(a,j),j}function w(e,t,n){var o=null==t?void 0:t.cta;if(o){o.label||(o.label="CTA Label Missing!");var a=!!o.href&&"link"===o.variant,i=document.createElement(a?"a":"button");a?(i.href=o.href,o.target&&(i.target=o.target),i.rel=o.rel||("_blank"===o.target?"noopener noreferrer":"")):i.type="button",i.setAttribute("aria-label",o.ariaLabel||o.label),Object.assign(i.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:t.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),i.textContent=o.label;var u=function(){var t=r(s().m(function t(r){var a;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,"function"!=typeof o.onClick){t.n=1;break}if(null==(a=o.onClick(r))||!a.then){t.n=1;break}return t.n=1,a;case 1:return t.p=1,!1!==o.autoClose&&n(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}();i.addEventListener("click",u),i._cleanup=()=>i.removeEventListener("click",u),e.appendChild(i)}}function k(e,t,n){var r=document.createElement("button");r.setAttribute("aria-label","Close notification"),r.setAttribute("title","Close"),r.textContent="×",Object.assign(r.style,{background:"none",border:"none",color:t.textColor||"white",fontSize:"18px",marginLeft:"10px",cursor:"pointer"});var o=()=>n(e);r.addEventListener("click",o),e._cleanupCloseButton=()=>{r.removeEventListener("click",o)},e.appendChild(r)}function x(e,t){var n=document.createElement("div"),r=t.borderRadius||0,o=parseInt(r,10),a=o?"calc(100% - ".concat(o-10+"px",")"):"100%",i=o?"12px":"0";Object.assign(n.style,{position:"absolute",left:"".concat(i),height:t.progressHeight||"4px",background:t.progressColor||"rgba(255, 255, 255, 0.3)",width:"".concat(a),transition:"width ".concat(t.duration||1800,"ms linear"),["top"===t.progressPosition?"top":"bottom"]:"0",borderRadius:t.borderRadius||"4px"}),e.appendChild(n),setTimeout(()=>{n.offsetWidth,n.style.width="0%"},50)}function C(e){setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50)}function S(e,t,n){return E.apply(this,arguments)}function E(){return(E=r(s().m(function e(t,n,r){var o,a,i;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m(null==n?void 0:n.animationDuration);case 1:a=e.v,t.className="toast toast-".concat(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"info"),Object.assign(t.style,{background:null==n?void 0:n.backgroundColor,padding:"12px 16px",marginBottom:"10px",borderRadius:null==n?void 0:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:null==n?void 0:n.maxWidth,opacity:"0",position:"relative",cursor:"default",boxSizing:"border-box",userSelect:"text",transition:"opacity ".concat(null==n?void 0:n.animationDuration," ").concat(null==n?void 0:n.animationEasing,", transform ").concat(null==n?void 0:n.animationDuration," ").concat(null==n?void 0:n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),t.setAttribute("role","alert"),t.setAttribute("aria-live","polite"),t.tabIndex=0,t._animationDuration=a,i=document.createElement("span"),null!=n&&n.wrapText?Object.assign(i.style,{display:"block",whiteSpace:"normal"}):Object.assign(i.style,{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",whiteSpace:"nowrap"}),Object.assign(i.style,{flex:"1",padding:null==n?void 0:n.fontPadding,fontFamily:null==n?void 0:n.fontFamily,fontSize:null==n?void 0:n.fontSize,fontWeight:null==n?void 0:n.fontWeight,lineHeight:null==n?void 0:n.fontLineHeight,color:null==n?void 0:n.textColor,userSelect:"text",wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"3",WebkitBoxOrient:"vertical"}),i.textContent=null==n?void 0:n.message,i.setAttribute("message",null==n?void 0:n.message),i.setAttribute("aria-label",null==n?void 0:n.message),t.appendChild(i),null!=n&&n.cta&&0!==Object.keys(n.cta).length&&w(t,n,r),null!=n&&n.showCloseButton&&k(t,n,r),null!=n&&n.showProgressBar&&x(t,n),C(t);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function O(e,t){return j.apply(this,arguments)}function j(){return(j=r(s().m(function e(t,n){var r,o,a;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,r=document.createElement("div"),Object.assign(r.style,{background:"#333",color:"white",padding:"10px 15px",position:"fixed",top:"20px",right:"20px",zIndex:"99999",borderRadius:"3px",maxWidth:"250px",wordWrap:"break-word",boxShadow:"0 2px 10px rgba(0,0,0,0.3)",cursor:"pointer"}),(o=document.createElement("span")).textContent=(null==t?void 0:t.message)||"Emergency Toast Creation Showing!",r.appendChild(o),(a=document.createElement("span")).textContent="×",Object.assign(a.style,{float:"right",marginLeft:"10px",fontWeight:"bold"}),a.onclick=()=>{r.remove(),n(r)},r.appendChild(a),document.body.appendChild(r),setTimeout(()=>{r.remove(),n(r)},null==t?void 0:t.duration),e.a(2,r);case 1:return e.p=1,e.v,setTimeout(()=>{alert((null==t?void 0:t.message)||"Emergency Toast Creation Showing!"),n(null)},100),e.a(2,null)}},e,null,[[0,1]])}))).apply(this,arguments)}function T(e,t){return M.apply(this,arguments)}function M(){return(M=r(s().m(function e(t,n){var r;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(document.querySelector('[id^="toast-container-"]')){e.n=1;break}return e.a(2,null);case 1:return e.p=2,e.n=3,d("div","toast");case 3:return r=e.v,e.n=4,S(r,t,n);case 4:return e.a(2,r);case 5:return e.p=5,e.v,e.n=6,O(t,n);case 6:return r=e.v,e.a(2,r)}},e,null,[[2,5]])}))).apply(this,arguments)}Object.entries({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}).forEach(e=>{var t=l(e,2),n=t[0],r=l(t[1],3),o=r[0],a=r[1],i=r[2],s=e=>{var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},u=.2126*s(o)+.7152*s(a)+.0722*s(i),c=(u+.05)/.05,d=1.05/(u+.05);b[n.toLowerCase()]=c>=d?"#000000":"#ffffff"});var L=new Map,I=new Map;function P(e){return"toast-container-".concat(function(e){return String(e).toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-")}(e))}function A(e,t){return W.apply(this,arguments)}function W(){return W=r(s().m(function e(t,n){var o,a,i;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o=P(t.position),!I.has(o)){e.n=1;break}return e.a(2,I.get(o));case 1:return a=r(s().m(function e(){var r,a,i,u;return s().w(function(e){for(;;)switch(e.n){case 0:if(null==(r=L.get(o))||!r.isConnected){e.n=1;break}return e.a(2,r);case 1:if((a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){e.n=3;break}if((a=document.createElement("div")).id=o,a.setAttribute("role","status"),a.setAttribute("aria-atomic","true"),a.style.position="fixed",a.style.zIndex="9999",a.style.inset="auto 10px 10px auto",a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.flexDirection="column",a.style.overflow="hidden","function"!=typeof n){e.n=2;break}return e.n=2,n(a,t);case 2:document.body.appendChild(a),e.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof n){e.n=4;break}return e.n=4,n(a,t);case 4:if((i=document.querySelectorAll("#".concat(o))).length>1)for(u=1;u<i.length;u++)try{i[u].remove()}catch(e){}return L.set(o,a),e.a(2,a)}},e)}))(),I.set(o,a),e.p=2,e.n=3,a;case 3:return i=e.v,e.a(2,i);case 4:return e.p=4,I.delete(P(t.position)),e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])})),W.apply(this,arguments)}function z(e,t){return B.apply(this,arguments)}function B(){return(B=r(s().m(function e(t,n){var r;return s().w(function(e){for(;;)switch(e.n){case 0:if(t&&n.position){e.n=1;break}throw new Error("Invalid container or position!");case 1:if(D(t),r=q(n.position),!R(t,n,r)){e.n=2;break}return e.a(2);case 2:if(!_(t,r)){e.n=3;break}return e.a(2);case 3:F(t,r);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function D(e){e.style.top="auto",e.style.bottom="auto",e.style.left="auto",e.style.right="auto",e.style.transform="none"}function q(e){var t=e.toLowerCase().trim();return{hasTop:t.includes("top"),hasBottom:t.includes("bottom")||t.includes("below"),hasLeft:t.includes("left"),hasRight:t.includes("right"),hasCenter:t.includes("center"),hasFullWidth:t.includes("top-full-width")||t.includes("bottom-full-width")||t.includes("fullwidth")}}function R(e,t,n){return!!n.hasFullWidth&&(t.maxWidth="100vw",n.hasTop?(e.style.top="10px",e.style.left="10px",e.style.right="10px",!0):!!n.hasBottom&&(e.style.bottom="10px",e.style.left="10px",e.style.right="10px",!0))}function _(e,t){return!!t.hasCenter&&(!t.hasTop||t.hasLeft||t.hasRight?!t.hasBottom||t.hasLeft||t.hasRight?!t.hasLeft||t.hasTop||t.hasBottom?!t.hasRight||t.hasTop||t.hasBottom?!(t.hasLeft||t.hasRight||t.hasTop||t.hasBottom)&&(e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",!0):(e.style.right="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.left="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.bottom="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0):(e.style.top="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0))}function F(e,t){t.hasBottom?e.style.bottom="10px":t.hasTop&&(e.style.top="10px"),t.hasRight?e.style.right="10px":t.hasLeft?e.style.left="10px":(e.style.bottom="10px",e.style.left="50%",e.style.transform="translateX(-50%)")}class H{constructor(e,t){this.callback=e,this.delay=t,this.remaining=t,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}var N=new Map,G=new Map,U=[],Y=0;function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=String(e.type).trim().toLowerCase(),n=function(e){for(var t=5381,n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n);return t>>>0}(String(e.message||"")).toString(16),r=String(e.position).trim().toLowerCase();return"".concat(t,"|").concat(n,"|").concat(r)}function $(){return J.apply(this,arguments)}function J(){return J=r(s().m(function e(){var t,n,o,a,i,u=arguments;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=u.length>0&&void 0!==u[0]?u[0]:{},e.p=1,n=X(t),!N.has(n)){e.n=5;break}if(o=N.get(n)){e.n=2;break}throw new Error("Active toast with key ".concat(n," not found"));case 2:return o.count++,o.timer.clear(),o.timer=V(o.toast,t),e.n=3,Z(o);case 3:return e.n=4,se(o);case 4:return e.a(2);case 5:if(!G.has(n)){e.n=7;break}if(a=G.get(n)){e.n=6;break}throw new Error("Pending toast with key ".concat(n," not found"));case 6:return a.count++,e.a(2);case 7:i={options:t,count:1,rafId:0},G.set(n,i),i.rafId=requestAnimationFrame(r(s().m(function e(){var t;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=G.get(n)){e.n=1;break}return e.a(2);case 1:if(G.delete(n),!(Y>=3)){e.n=3;break}return U.push({options:t.options,key:n,count:t.count}),e.n=2,re();case 2:return e.a(2);case 3:return e.p=3,e.n=4,K(t.options,n,t.count);case 4:e.n=6;break;case 5:e.p=5,e.v;case 6:return e.a(2)}},e,null,[[3,5]])}))),e.n=9;break;case 8:e.p=8,e.v;case 9:return e.a(2)}},e,null,[[1,8]])})),J.apply(this,arguments)}function K(e,t,n){return Q.apply(this,arguments)}function Q(){return(Q=r(s().m(function e(t,n,r){var o,a,i,u,l,c,d,p;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t&&"object"==typeof t){e.n=1;break}throw new TypeError("options must be an object");case 1:return Y++,e.n=2,A(t,z);case 2:if(o=e.v){e.n=3;break}throw new Error("Failed to create toast container");case 3:return e.n=4,T(t,te);case 4:if(a=e.v){e.n=5;break}throw new Error("Toast element creation failed");case 5:if(i=document.createElement("div"),Object.assign(i.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),u=document.createElement("div"),Object.assign(u.style,{position:"relative",overflow:"hidden",zIndex:"1"}),u.appendChild(a),i.appendChild(u),o.id.includes("toast-container-")&&o.appendChild(i),l=!1!==t.pauseOnHover&&(!0===t.pauseOnHover||!!t.cta),c={outer:i,toast:a,count:Math.max(1,Math.floor(null!=r?r:0)),timeout:null,pauseOnHover:l},N.set(n,c),a._key=n,!(c.count>1)){e.n=6;break}return e.n=6,se(c);case 6:return c.timer=V(a,t),e.n=7,Z(c);case 7:e.n=10;break;case 8:return e.p=8,e.v,Y=Math.max(0,Y-1),d=document.querySelector('[id^="toast-container-"]')||document.body,p=d,e.n=9,O(t,te);case 9:p.appendChild.call(p,e.v);case 10:return e.a(2)}},e,null,[[0,8]])}))).apply(this,arguments)}function V(e,t){var n,o=Number(null!==(n=t.duration)&&void 0!==n?n:1800)+5,a=new H(r(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,te(e);case 1:return t.a(2,t.v)}},t)})),o);return a.start(),a}function Z(e){return ee.apply(this,arguments)}function ee(){return(ee=r(s().m(function e(t){var n,r,o,a,i,u;return s().w(function(e){for(;;)switch(e.n){case 0:if(t.pauseOnHover&&t.outer&&t.timer){e.n=1;break}return e.a(2);case 1:n=t.outer,r=t.timer,o=()=>r.pause(),a=()=>r.resume(),i=e=>{e.target.matches("[tabindex], div, span, button, a")&&r.pause()},u=e=>{n.contains(e.relatedTarget)||r.resume()},n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a),n.addEventListener("focusin",i),n.addEventListener("focusout",u),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),n.removeEventListener("focusin",i),n.removeEventListener("focusout",u)};case 2:return e.a(2)}},e)}))).apply(this,arguments)}function te(e){return ne.apply(this,arguments)}function ne(){return(ne=r(s().m(function e(t){var n,r,o,a,i;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=1,null!=t&&t._key){e.n=2;break}return e.a(2);case 2:if(a=N.get(t._key)){e.n=3;break}return e.a(2);case 3:return null===(n=a.timer)||void 0===n||n.clear(),null===(r=a.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),N.delete(t._key),Y=Math.max(0,Y-1),(i=a.outer.querySelector(".toast-count-badge"))&&i.remove(),e.n=4,ae(a.outer);case 4:return e.n=5,re();case 5:e.n=7;break;case 6:e.p=6,e.v;case 7:return e.a(2)}},e,null,[[1,6]])}))).apply(this,arguments)}function re(){return oe.apply(this,arguments)}function oe(){return(oe=r(s().m(function e(){var t,n;return s().w(function(e){for(;;)switch(e.n){case 0:if(!(Y<3&&U.length)){e.n=3;break}if(t=U.shift(),!N.has(t.key)){e.n=2;break}return(n=N.get(t.key)).count+=t.count,e.n=1,se(n);case 1:return e.a(3,0);case 2:K(t.options,t.key,t.count),e.n=0;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function ae(e){return ie.apply(this,arguments)}function ie(){return(ie=r(s().m(function e(t){return s().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.a(2,new Promise(e=>{var n=!1,r=()=>{n||(n=!0,f(t),e())},o=t.firstElementChild||t;if(!o)return e();var a=e=>{try{if(e.target!==o)return;o.removeEventListener("transitionend",a,!0),r()}catch(e){}};try{o.addEventListener("transitionend",a,!0)}catch(e){}setTimeout(()=>{try{o.removeEventListener("transitionend",a,!0),r()}catch(e){}},700)}))}},e)}))).apply(this,arguments)}function se(e){return ue.apply(this,arguments)}function ue(){return(ue=r(s().m(function e(t){var n,r,o,a;return s().w(function(e){for(;;)switch(e.n){case 0:if(n=t.outer,r=t.count,n&&n instanceof HTMLElement){e.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){e.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),e.a(2);case 2:(a=n.querySelector(".toast-count-badge"))||((a=document.createElement("span")).className="toast-count-badge",a.setAttribute("aria-label","".concat(r," identical notifications")),Object.assign(a.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),n.appendChild(a)),a.textContent=r>99?"99+":String(r);try{a.style.transform="scale(1.2)",setTimeout(()=>a.style.transform="scale(1)",150)}catch(e){}case 3:return e.a(2)}},e)}))).apply(this,arguments)}var le={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},ce={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},de=[],pe=!1;function fe(){return he.apply(this,arguments)}function he(){return(he=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:if(!pe){e.n=1;break}return e.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(pe=!0,de.forEach(e=>setTimeout(()=>me(e),2500)),de.length=0):document.addEventListener("DOMContentLoaded",()=>{pe=!0,de.forEach(e=>setTimeout(()=>me(e),2500)),de.length=0},{once:!0}));case 2:return e.a(2)}},e)}))).apply(this,arguments)}function me(){return ye.apply(this,arguments)}function ye(){return ye=r(s().m(function e(){var t,n,r,o=arguments;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.p=1,e.n=2,ke(t);case 2:return n=e.v,e.n=3,ve(n);case 3:return e.n=4,$(n);case 4:e.n=6;break;case 5:e.p=5,e.v,r="string"==typeof(null==t?void 0:t.message)&&null!==(null==t?void 0:t.message)?"".concat(t.message.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(r);case 6:return e.a(2)}},e,null,[[1,5]])})),ye.apply(this,arguments)}function ge(){return be.apply(this,arguments)}function be(){return be=r(s().m(function e(){var t,n=arguments;return s().w(function(e){for(;;)switch(e.n){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){e.n=1;break}return e.a(2);case 1:return e.n=2,fe();case 2:if(pe){e.n=3;break}return de.push(t),e.a(2);case 3:return e.n=4,me(t);case 4:return e.a(2)}},e)})),be.apply(this,arguments)}function ve(e){return we.apply(this,arguments)}function we(){return(we=r(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,A(t,z);case 1:return e.a(2,e.v);case 2:return e.p=2,e.v,e.a(2,document.body)}},e,null,[[0,2]])}))).apply(this,arguments)}function ke(e){return xe.apply(this,arguments)}function xe(){return(xe=r(s().m(function e(t){var n,r,o,a,u,l,c,d,p,f;return s().w(function(e){for(;;)if(0===e.n){o=null==t||null===(n=t.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),a=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(u=i(i({},{pauseOnHover:void 0,duration:2500,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationType:"fade",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:a}),"object"!=typeof t||Array.isArray(t)?{}:t)).message=null!==(r=null==t?void 0:t.message)&&void 0!==r?r:u.message;try{u.backgroundColor||(u.backgroundColor=null!==(c=null===(d=le)||void 0===d?void 0:d[u.type])&&void 0!==c?c:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111"),u.message=u.message||(null===(l=ce)||void 0===l?void 0:l[u.type])||"No Message Provided!",!u.textColor&&u.backgroundColor&&(p=v(u.backgroundColor),u.textColor=p),!u.progressColor&&u.backgroundColor&&(u.textColor?u.progressColor=u.textColor:(f=v(u.backgroundColor),u.progressColor=f))}catch(e){}return"string"!=typeof u.message&&(u.message="No Message Provided!"),e.a(2,u)}},e)}))).apply(this,arguments)}function Ce(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(le=i(i({},le),e))}catch(e){}}function Se(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(ce=i(i({},ce),e))}catch(e){}}var Ee=function(){var e=r(s().m(function e(){var t;return s().w(function(e){for(;;)switch(e.n){case 0:return t=document.querySelector('[id^="toast-"]:not([id*="container"])'),e.n=1,te(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();try{"undefined"!=typeof window&&(window.customizableToast={createToast:ge,setDefaultColors:Ce,setDefaultMessages:Se,noop:Ee})}catch(e){}e.createToast=ge,e.noop=Ee,e.setDefaultColors=Ce,e.setDefaultMessages=Se});
18
18
  //# sourceMappingURL=index.umd.js.map