customizable-toast-notification 3.9.7 → 3.10.0

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.7
3
- * Build: 2025-10-08 00:37:32
4
- * Cache-Buster: 1759883852353
2
+ * Customizable Toast Notifications 3.10.0
3
+ * Build: 2025-11-08 18:32:14
4
+ * Cache-Buster: 1762626734797
5
5
  * Author: Priyanshu Patel
6
6
  * Email: [priyanshu.alt191@gmail.com](mailto:priyanshu.alt191@gmail.com)
7
7
  * License: Apache-2.0
@@ -14,5 +14,5 @@
14
14
  */
15
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 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});
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||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,s=0,u=e,p.n=n,i}};function d(n,r){for(s=n,u=r,t=0;!f&&l&&!o&&t<c.length;t++){var o,a=c[t],d=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]<=d&&((o=n<2&&d<a[1])?(s=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,s=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,h),s=c,u=h;(t=s<2?e:u)||!f;){a||(s?s<3?(s>1&&(p.n=-1),d(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=(f=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:f}}}(n,o,a),!0),c}var i={};function l(){}function c(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),d=f.prototype=l.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=f,u(d,"constructor",f),u(f,"constructor",c),c.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,r,function(){return this}),u(d,"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 f(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 d(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 f=null==e?void 0:e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(!f)throw new Error("Unknown color");n=Number(f[1]),r=Number(f[2]),o=Number(f[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]},d=(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(d([n,r,o],[C,S,E])<4.5){var O=l(d([n,r,o],[0,0,0])>=d([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,f("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,f=1.05/(u+.05);b[n.toLowerCase()]=c>=f?"#000000":"#ffffff"});var L=new Map,I=new Map;function A(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 P(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=A(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(A(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(q(t),r=D(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 q(e){e.style.top="auto",e.style.bottom="auto",e.style.left="auto",e.style.right="auto",e.style.transform="none"}function D(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=ne(o.toast,t),e.n=3,re(o);case 3:return e.n=4,fe(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,se();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,f,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,P(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,ae);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,fe(c);case 6:return c.timer=ne(a,t),e.n=7,re(c);case 7:e.n=10;break;case 8:return e.p=8,e.v,Y=Math.max(0,Y-1),f=document.querySelector('[id^="toast-container-"]')||document.body,p=f,e.n=9,O(t,ae);case 9:p.appendChild.call(p,e.v);case 10:return e.a(2)}},e,null,[[0,8]])}))).apply(this,arguments)}function V(){return(V=r(s().m(function e(){var t,n,r,o,a,i;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,0!==N.size){e.n=1;break}return e.a(2);case 1:if(t=null,document.querySelectorAll('[id^="toast-container-"]').forEach(e=>{var n=Array.from(e.children||[]);if(0!==n.length){var r=n.at(0);r&&(t=r.querySelector('[id^="toast-"]')||r)}}),t||(n=Array.from(N.entries())).length>0&&(r=n.at(0),o=l(r,2),a=o[1],t=a.toast||a.outer&&a.outer.querySelector('[id^="toast-"]')),t){e.n=2;break}return e.a(2);case 2:return i=t._key?t:t.querySelector('[id^="toast-"]')||t,e.n=3,ae(i);case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[0,4]])}))).apply(this,arguments)}function Z(){return(Z=r(s().m(function e(){var t,n,r;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:e.p=0,t=Array.from(N.values()).map(e=>e.toast).filter(Boolean),U.length=0,G.clear(),n=t.length-1;case 1:if(!(n>=0)){e.n=6;break}return r=t[n],e.p=2,e.n=3,ae(r);case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:n--,e.n=1;break;case 6:e.n=8;break;case 7:e.p=7,e.v;case 8:return e.a(2)}},e,null,[[2,4],[0,7]])}))).apply(this,arguments)}var ee=function(){return V.apply(this,arguments)},te=function(){return Z.apply(this,arguments)};function ne(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,ae(e);case 1:return t.a(2,t.v)}},t)})),o);return a.start(),a}function re(e){return oe.apply(this,arguments)}function oe(){return(oe=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 ae(e){return ie.apply(this,arguments)}function ie(){return(ie=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=0,null!=t&&t._key){e.n=1;break}return e.a(2);case 1:if(a=N.get(t._key)){e.n=2;break}return e.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),N.delete(t._key),Y=Math.max(0,Y-1),(i=a.outer.querySelector(".toast-count-badge"))&&i.remove(),e.n=3,le(a.outer);case 3:return e.n=4,se();case 4:e.n=6;break;case 5:e.p=5,e.v;case 6:return e.a(2)}},e,null,[[0,5]])}))).apply(this,arguments)}function se(){return ue.apply(this,arguments)}function ue(){return(ue=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,fe(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 le(e){return ce.apply(this,arguments)}function ce(){return(ce=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,d(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 fe(e){return pe.apply(this,arguments)}function pe(){return(pe=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 de={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},he={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},me=[],ye=!1;function ge(){return be.apply(this,arguments)}function be(){return(be=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:if(!ye){e.n=1;break}return e.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(ye=!0,me.forEach(e=>setTimeout(()=>ve(e),2500)),me.length=0):document.addEventListener("DOMContentLoaded",()=>{ye=!0,me.forEach(e=>setTimeout(()=>ve(e),2500)),me.length=0},{once:!0}));case 2:return e.a(2)}},e)}))).apply(this,arguments)}function ve(){return we.apply(this,arguments)}function we(){return we=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,Ee(t);case 2:return n=e.v,e.n=3,Ce(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]])})),we.apply(this,arguments)}function ke(){return xe.apply(this,arguments)}function xe(){return xe=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,ge();case 2:if(ye){e.n=3;break}return me.push(t),e.a(2);case 3:return e.n=4,ve(t);case 4:return e.a(2)}},e)})),xe.apply(this,arguments)}function Ce(e){return Se.apply(this,arguments)}function Se(){return(Se=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,P(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 Ee(e){return Oe.apply(this,arguments)}function Oe(){return(Oe=r(s().m(function e(t){var n,r,o,a,u,l,c,f,p,d;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===(f=de)||void 0===f?void 0:f[u.type])&&void 0!==c?c:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111"),u.message=u.message||(null===(l=he)||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:(d=v(u.backgroundColor),u.progressColor=d))}catch(e){}return"string"!=typeof u.message&&(u.message="No Message Provided!"),e.a(2,u)}},e)}))).apply(this,arguments)}function je(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(de=i(i({},de),e))}catch(e){}}function Te(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(he=i(i({},he),e))}catch(e){}}var Me=!1,Le=null;function Ie(e){return Ae.apply(this,arguments)}function Ae(){return(Ae=r(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!Me||!Le){e.n=4;break}return e.p=1,e.n=2,Le;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t())}},e,null,[[1,3]])}))).apply(this,arguments)}var Pe=ke;function We(){return We=r(s().m(function e(){var t,n=arguments;return s().w(function(e){for(;;)if(0===e.n)return t=n.length>0&&void 0!==n[0]?n[0]:{},e.a(2,Ie(()=>Pe(t)))},e)})),We.apply(this,arguments)}var ze=function(){var e=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return Me=!0,Le=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,ee();case 1:return e.p=1,Me=!1,Le=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,Le;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return Me=!0,Le=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,te();case 1:return e.p=1,Me=!1,Le=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,Le;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();if("undefined"!=typeof window&&"undefined"!=typeof document){var qe=!1;if(!qe){window.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return Me=!0,Le=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,ee();case 1:return e.p=1,Me=!1,Le=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,Le;case 1:return e.a(2)}},e)}))()},{passive:!0}),qe=!0}}var De=function(){var e=r(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,te();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();try{"undefined"!=typeof window&&(window.customizableToast={createToast:ke,setDefaultColors:je,setDefaultMessages:Te,noop:De,dismiss:ee})}catch(e){}e.createToast=function(){return We.apply(this,arguments)},e.dismiss=ze,e.dismissToast=ze,e.noop=Be,e.noopAll=Be,e.setDefaultColors=je,e.setDefaultMessages=Te});
18
18
  //# sourceMappingURL=index.umd.js.map