mega-toasts
Version:
A highly configurable notification/toast component with individual toast state management capabilities.
2 lines (1 loc) • 44.4 kB
JavaScript
!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).SvelteToasts={})}(this,(function(t){"use strict";function e(){}const o=t=>t;function s(t,e){for(const o in e)t[o]=e[o];return t}function n(t){return t()}function r(){return Object.create(null)}function l(t){t.forEach(n)}function i(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,...o){if(null==t)return e;const s=t.subscribe(...o);return s.unsubscribe?()=>s.unsubscribe():s}function u(t){let e;return c(t,(t=>e=t))(),e}function d(t,e,o){t.$$.on_destroy.push(c(e,o))}function f(t,e,o,s){if(t){const n=g(t,e,o,s);return t[0](n)}}function g(t,e,o,n){return t[1]&&n?s(o.ctx.slice(),t[1](n(e))):o.ctx}function p(t,e,o,s){if(t[2]&&s){const n=t[2](s(o));if(void 0===e.dirty)return n;if("object"==typeof n){const t=[],o=Math.max(e.dirty.length,n.length);for(let s=0;s<o;s+=1)t[s]=e.dirty[s]|n[s];return t}return e.dirty|n}return e.dirty}function h(t,e,o,s,n,r){if(n){const l=g(e,o,s,r);t.p(l,n)}}function v(t){if(t.ctx.length>32){const e=[],o=t.ctx.length/32;for(let t=0;t<o;t++)e[t]=-1;return e}return-1}function w(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const b="undefined"!=typeof window;let m=b?()=>window.performance.now():()=>Date.now(),y=b?t=>requestAnimationFrame(t):e;const x=new Set;function q(t){x.forEach((e=>{e.c(t)||(x.delete(e),e.f())})),0!==x.size&&y(q)}function $(t){let e;return 0===x.size&&y(q),{promise:new Promise((o=>{x.add(e={c:t,f:o})})),abort(){x.delete(e)}}}function k(t,e){t.appendChild(e)}function z(t,e,o){const s=M(t);if(!s.getElementById(e)){const t=C("style");t.id=e,t.textContent=o,S(s,t)}}function M(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function _(t){const e=C("style");return S(M(t),e),e.sheet}function S(t,e){return k(t.head||t,e),e.sheet}function B(t,e,o){t.insertBefore(e,o||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function A(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function L(t){return document.createTextNode(t)}function P(){return L(" ")}function j(){return L("")}function H(t,e,o,s){return t.addEventListener(e,o,s),()=>t.removeEventListener(e,o,s)}function V(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function R(t,e){e=""+e,t.data!==e&&(t.data=e)}function N(t,e,o,s){null==o?t.style.removeProperty(e):t.style.setProperty(e,o,s?"important":"")}function O(t,e,o){t.classList[o?"add":"remove"](e)}function T(t,e){return new t(e)}const Z=new Map;let D,F=0;function I(t,e,o,s,n,r,l,i=0){const a=16.666/s;let c="{\n";for(let t=0;t<=1;t+=a){const s=e+(o-e)*r(t);c+=100*t+`%{${l(s,1-s)}}\n`}const u=c+`100% {${l(o,1-o)}}\n}`,d=`__svelte_${function(t){let e=5381,o=t.length;for(;o--;)e=(e<<5)-e^t.charCodeAt(o);return e>>>0}(u)}_${i}`,f=M(t),{stylesheet:g,rules:p}=Z.get(f)||function(t,e){const o={stylesheet:_(e),rules:{}};return Z.set(t,o),o}(f,t);p[d]||(p[d]=!0,g.insertRule(`@keyframes ${d} ${u}`,g.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${d} ${s}ms linear ${n}ms 1 both`,F+=1,d}function G(t,e){const o=(t.style.animation||"").split(", "),s=o.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),n=o.length-s.length;n&&(t.style.animation=s.join(", "),F-=n,F||y((()=>{F||(Z.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)})),Z.clear())})))}function J(t,e){const o=t.getBoundingClientRect();if(e.left!==o.left||e.top!==o.top){const s=getComputedStyle(t),n="none"===s.transform?"":s.transform;t.style.transform=`${n} translate(${e.left-o.left}px, ${e.top-o.top}px)`}}function K(t){D=t}function Q(t){(function(){if(!D)throw new Error("Function called outside component initialization");return D})().$$.on_mount.push(t)}const U=[],W=[];let X=[];const Y=[],tt=Promise.resolve();let et=!1;function ot(t){X.push(t)}const st=new Set;let nt,rt=0;function lt(){if(0!==rt)return;const t=D;do{try{for(;rt<U.length;){const t=U[rt];rt++,K(t),it(t.$$)}}catch(t){throw U.length=0,rt=0,t}for(K(null),U.length=0,rt=0;W.length;)W.pop()();for(let t=0;t<X.length;t+=1){const e=X[t];st.has(e)||(st.add(e),e())}X.length=0}while(U.length);for(;Y.length;)Y.pop()();et=!1,st.clear(),K(t)}function it(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ot)}}function at(){return nt||(nt=Promise.resolve(),nt.then((()=>{nt=null}))),nt}function ct(t,e,o){t.dispatchEvent(function(t,e,{bubbles:o=!1,cancelable:s=!1}={}){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,o,s,e),n}(`${e?"intro":"outro"}${o}`))}const ut=new Set;let dt;function ft(){dt={r:0,c:[],p:dt}}function gt(){dt.r||l(dt.c),dt=dt.p}function pt(t,e){t&&t.i&&(ut.delete(t),t.i(e))}function ht(t,e,o,s){if(t&&t.o){if(ut.has(t))return;ut.add(t),dt.c.push((()=>{ut.delete(t),s&&(o&&t.d(1),s())})),t.o(e)}else s&&s()}const vt={duration:0};function wt(t,e){t.f(),function(t,e){ht(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function bt(t){t&&t.c()}function mt(t,e,o,s){const{fragment:r,after_update:a}=t.$$;r&&r.m(e,o),s||ot((()=>{const e=t.$$.on_mount.map(n).filter(i);t.$$.on_destroy?t.$$.on_destroy.push(...e):l(e),t.$$.on_mount=[]})),a.forEach(ot)}function yt(t,e){const o=t.$$;null!==o.fragment&&(!function(t){const e=[],o=[];X.forEach((s=>-1===t.indexOf(s)?e.push(s):o.push(s))),o.forEach((t=>t())),X=e}(o.after_update),l(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function xt(t,e){-1===t.$$.dirty[0]&&(U.push(t),et||(et=!0,tt.then(lt)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function qt(t,o,s,n,i,a,c,u=[-1]){const d=D;K(t);const f=t.$$={fragment:null,ctx:[],props:a,update:e,not_equal:i,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(d?d.$$.context:[])),callbacks:r(),dirty:u,skip_bound:!1,root:o.target||d.$$.root};c&&c(f.root);let g=!1;if(f.ctx=s?s(t,o.props||{},((e,o,...s)=>{const n=s.length?s[0]:o;return f.ctx&&i(f.ctx[e],f.ctx[e]=n)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](n),g&&xt(t,e)),o})):[],f.update(),g=!0,l(f.before_update),f.fragment=!!n&&n(f.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);f.fragment&&f.fragment.l(t),t.forEach(E)}else f.fragment&&f.fragment.c();o.intro&&pt(t.$$.fragment),mt(t,o.target,o.anchor,o.customElement),lt()}K(d)}class $t{$destroy(){yt(this,1),this.$destroy=e}$on(t,o){if(!i(o))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(o),()=>{const t=s.indexOf(o);-1!==t&&s.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const kt=[];function zt(t,o=e){let s;const n=new Set;function r(e){if(a(t,e)&&(t=e,s)){const e=!kt.length;for(const e of n)e[1](),kt.push(e,t);if(e){for(let t=0;t<kt.length;t+=2)kt[t][0](kt[t+1]);kt.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(l,i=e){const a=[l,i];return n.add(a),1===n.size&&(s=o(r)||e),l(t),()=>{n.delete(a),0===n.size&&s&&(s(),s=null)}}}}const Mt=function(t=[]){const e=zt(t),{set:o,update:s,subscribe:n}=e;let r={duration:3e3,placement:"bottom-right",type:"info",theme:"dark"};function l(t){const{duration:o=3e3,placement:n="bottom-right",type:l="info",theme:i="dark",...a}={...r,...t},c=Date.now(),d={...a,uid:c,placement:n,type:l,theme:i,duration:o,remove:()=>{s((t=>t.filter((t=>t.uid!==c))))},update:t=>{delete t.uid;const o=u(e)?.findIndex((t=>t?.uid===c));o>-1&&s((e=>[...e.slice(0,o),{...e[o],...t},...e.slice(o+1)]))}};return s((t=>[...t,d])),o>0&&setTimeout((()=>{d.remove(),"function"==typeof d.onRemove&&d.onRemove()}),o),d}return{subscribe:n,add:l,success:_t("success",l),info:_t("info",l),error:_t("error",l),warning:_t("warning",l),clearAll:function(){o([])},clearLast:function(){s((t=>t.slice(0,t.length-1)))},getById:function(t){return u(e)?.find((e=>e?.uid===t))},setDefaults:function(t){r={...r,...t}}}}([]);function _t(t,e){return function(){if("object"==typeof arguments[0]){return e({...arguments[0],type:t})}if("string"==typeof arguments[0]&&"string"==typeof arguments[1]){return e({...arguments[2]||{},type:t,title:arguments[0],description:arguments[1]})}if("string"==typeof arguments[0]){return e({...arguments[1]||{},type:t,description:arguments[0]})}}}function St(t){const e=t-1;return e*e*e+1}function Bt(t,{delay:e=0,duration:s=400,easing:n=o}={}){const r=+getComputedStyle(t).opacity;return{delay:e,duration:s,easing:n,css:t=>"opacity: "+t*r}}function Et(t,{delay:e=0,duration:o=400,easing:s=St,x:n=0,y:r=0,opacity:l=0}={}){const i=getComputedStyle(t),a=+i.opacity,c="none"===i.transform?"":i.transform,u=a*(1-l),[d,f]=w(n),[g,p]=w(r);return{delay:e,duration:o,easing:s,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*g}${p});\n\t\t\topacity: ${a-u*e}`}}function Ct(t,{from:e,to:o},s={}){const n=getComputedStyle(t),r="none"===n.transform?"":n.transform,[l,a]=n.transformOrigin.split(" ").map(parseFloat),c=e.left+e.width*l/o.width-(o.left+l),u=e.top+e.height*a/o.height-(o.top+a),{delay:d=0,duration:f=(t=>120*Math.sqrt(t)),easing:g=St}=s;return{delay:d,duration:i(f)?f(Math.sqrt(c*c+u*u)):f,easing:g,css:(t,s)=>{const n=s*c,l=s*u,i=t+s*e.width/o.width,a=t+s*e.height/o.height;return`transform: ${r} translate(${n}px, ${l}px) scale(${i}, ${a});`}}}function At(t){z(t,"svelte-1rg6zyw","ul.svelte-1rg6zyw.svelte-1rg6zyw{list-style:none;margin:0;padding:0}li.svelte-1rg6zyw.svelte-1rg6zyw{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.toast-container.svelte-1rg6zyw.svelte-1rg6zyw{z-index:9999;position:fixed;padding:4px;box-sizing:border-box;color:#fff;width:max-content;max-width:100%;pointer-events:none}.toast-container.bottom-right.svelte-1rg6zyw.svelte-1rg6zyw{bottom:1em;right:1em}.toast-container.bottom-left.svelte-1rg6zyw.svelte-1rg6zyw{bottom:1em;left:1em}.toast-container.top-left.svelte-1rg6zyw.svelte-1rg6zyw{top:1em;left:1em}.toast-container.top-right.svelte-1rg6zyw.svelte-1rg6zyw{top:1em;right:1em}.toast-container.top-center.svelte-1rg6zyw.svelte-1rg6zyw{top:1em;right:50%;left:50%;transform:translate(-50%, 0)}.toast-container.bottom-center.svelte-1rg6zyw.svelte-1rg6zyw{bottom:1em;right:50%;left:50%;transform:translate(-50%, 0)}.toast-container.center-center.svelte-1rg6zyw.svelte-1rg6zyw{top:50%;right:50%;left:50%;transform:translate(-50%, -50%)}.toast-container.svelte-1rg6zyw>.svelte-1rg6zyw:not(:last-child){margin-bottom:10px}")}function Lt(t,e,o){const s=t.slice();return s[1]=e[o],s}function Pt(t,e,o){const s=t.slice();return s[14]=e[o],s}const jt=t=>({data:4&t}),Ht=t=>({data:t[14]});function Vt(t){let e;const o=t[10].default,s=f(o,t,t[9],Ht);return{c(){s&&s.c()},m(t,o){s&&s.m(t,o),e=!0},p(t,n){s&&s.p&&(!e||516&n)&&h(s,o,t,t[9],e?p(o,t[9],n,jt):v(t[9]),Ht)},i(t){e||(pt(s,t),e=!0)},o(t){ht(s,t),e=!1},d(t){s&&s.d(t)}}}function Rt(t){let e,o,s;var n=t[14].component;function r(t){return{props:{data:t[14]}}}return n&&(e=T(n,r(t))),{c(){e&&bt(e.$$.fragment),o=j()},m(t,n){e&&mt(e,t,n),B(t,o,n),s=!0},p(t,s){const l={};if(4&s&&(l.data=t[14]),4&s&&n!==(n=t[14].component)){if(e){ft();const t=e;ht(t.$$.fragment,1,0,(()=>{yt(t,1)})),gt()}n?(e=T(n,r(t)),bt(e.$$.fragment),pt(e.$$.fragment,1),mt(e,o.parentNode,o)):e=null}else n&&e.$set(l)},i(t){s||(e&&pt(e.$$.fragment,t),s=!0)},o(t){e&&ht(e.$$.fragment,t),s=!1},d(t){t&&E(o),e&&yt(e,t)}}}function Nt(t,s){let n,r,a,c,u,d,f,g,p=e;const h=[Rt,Vt],v=[];function w(t,e){return t[14].component?0:1}return r=w(s),a=v[r]=h[r](s),{key:t,first:null,c(){n=C("li"),a.c(),c=P(),V(n,"class","svelte-1rg6zyw"),this.first=n},m(t,e){B(t,n,e),v[r].m(n,null),k(n,c),g=!0},p(t,e){let o=r;r=w(s=t),r===o?v[r].p(s,e):(ft(),ht(v[o],1,1,(()=>{v[o]=null})),gt(),a=v[r],a?a.p(s,e):(a=v[r]=h[r](s),a.c()),pt(a,1),a.m(n,c))},r(){f=n.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:o,height:s}=e,n=t.getBoundingClientRect();t.style.position="absolute",t.style.width=o,t.style.height=s,J(t,n)}}(n),p(),J(n,f)},a(){p(),p=function(t,s,n,r){if(!s)return e;const l=t.getBoundingClientRect();if(s.left===l.left&&s.right===l.right&&s.top===l.top&&s.bottom===l.bottom)return e;const{delay:i=0,duration:a=300,easing:c=o,start:u=m()+i,end:d=u+a,tick:f=e,css:g}=n(t,{from:s,to:l},r);let p,h=!0,v=!1;function w(){g&&G(t,p),h=!1}return $((t=>{if(!v&&t>=u&&(v=!0),v&&t>=d&&(f(1,0),w()),!h)return!1;if(v){const e=0+1*c((t-u)/a);f(e,1-e)}return!0})),g&&(p=I(t,0,1,a,i,c,g)),i||(v=!0),f(0,1),w}(n,f,Ct,{})},i(t){g||(pt(a),ot((()=>{g&&(d&&d.end(1),u=function(t,s,n){const r={direction:"in"};let l,a,c=s(t,n,r),u=!1,d=0;function f(){l&&G(t,l)}function g(){const{delay:s=0,duration:n=300,easing:r=o,tick:i=e,css:g}=c||vt;g&&(l=I(t,0,1,n,s,r,g,d++)),i(0,1);const p=m()+s,h=p+n;a&&a.abort(),u=!0,ot((()=>ct(t,!0,"start"))),a=$((e=>{if(u){if(e>=h)return i(1,0),ct(t,!0,"end"),f(),u=!1;if(e>=p){const t=r((e-p)/n);i(t,1-t)}}return u}))}let p=!1;return{start(){p||(p=!0,G(t),i(c)?(c=c(r),at().then(g)):g())},invalidate(){p=!1},end(){u&&(f(),u=!1)}}}(n,Bt,{duration:500}),u.start())})),g=!0)},o(t){ht(a),u&&u.invalidate(),d=function(t,s,n){const r={direction:"out"};let a,c=s(t,n,r),u=!0;const d=dt;function f(){const{delay:s=0,duration:n=300,easing:r=o,tick:i=e,css:f}=c||vt;f&&(a=I(t,1,0,n,s,r,f));const g=m()+s,p=g+n;ot((()=>ct(t,!1,"start"))),$((e=>{if(u){if(e>=p)return i(0,1),ct(t,!1,"end"),--d.r||l(d.c),!1;if(e>=g){const t=r((e-g)/n);i(1-t,t)}}return u}))}return d.r+=1,i(c)?at().then((()=>{c=c(r),f()})):f(),{end(e){e&&c.tick&&c.tick(1,0),u&&(a&&G(t,a),u=!1)}}}(n,Et,{y:s[4][s[14].placement],duration:1e3}),g=!1},d(t){t&&E(n),v[r].d(),t&&d&&d.end()}}}function Ot(t){let e,o,s,n,r=[],i=new Map;function a(...e){return t[11](t[1],...e)}let c=t[2].filter(a).reverse();const u=t=>t[14].uid;for(let e=0;e<c.length;e+=1){let o=Pt(t,c,e),s=u(o);i.set(s,r[e]=Nt(s,o))}return{c(){e=C("div"),o=C("ul");for(let t=0;t<r.length;t+=1)r[t].c();s=P(),V(o,"class","svelte-1rg6zyw"),V(e,"class","toast-container "+t[1]+" svelte-1rg6zyw"),N(e,"width",t[0])},m(t,l){B(t,e,l),k(e,o);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(o,null);k(e,s),n=!0},p(s,d){if(t=s,540&d){c=t[2].filter(a).reverse(),ft();for(let t=0;t<r.length;t+=1)r[t].r();r=function(t,e,o,s,n,r,i,a,c,u,d,f){let g=t.length,p=r.length,h=g;const v={};for(;h--;)v[t[h].key]=h;const w=[],b=new Map,m=new Map,y=[];for(h=p;h--;){const t=f(n,r,h),l=o(t);let a=i.get(l);a?s&&y.push((()=>a.p(t,e))):(a=u(l,t),a.c()),b.set(l,w[h]=a),l in v&&m.set(l,Math.abs(h-v[l]))}const x=new Set,q=new Set;function $(t){pt(t,1),t.m(a,d),i.set(t.key,t),d=t.first,p--}for(;g&&p;){const e=w[p-1],o=t[g-1],s=e.key,n=o.key;e===o?(d=e.first,g--,p--):b.has(n)?!i.has(s)||x.has(s)?$(e):q.has(n)?g--:m.get(s)>m.get(n)?(q.add(s),$(e)):(x.add(n),g--):(c(o,i),g--)}for(;g--;){const e=t[g];b.has(e.key)||c(e,i)}for(;p;)$(w[p-1]);return l(y),w}(r,d,u,1,t,c,i,o,wt,Nt,null,Pt);for(let t=0;t<r.length;t+=1)r[t].a();gt()}(!n||1&d)&&N(e,"width",t[0])},i(t){if(!n){for(let t=0;t<c.length;t+=1)pt(r[t]);n=!0}},o(t){for(let t=0;t<r.length;t+=1)ht(r[t]);n=!1},d(t){t&&E(e);for(let t=0;t<r.length;t+=1)r[t].d()}}}function Tt(t){let e,o,s=t[3],n=[];for(let e=0;e<s.length;e+=1)n[e]=Ot(Lt(t,s,e));const r=t=>ht(n[t],1,1,(()=>{n[t]=null}));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=j()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);B(t,e,s),o=!0},p(t,[o]){if(541&o){let l;for(s=t[3],l=0;l<s.length;l+=1){const r=Lt(t,s,l);n[l]?(n[l].p(r,o),pt(n[l],1)):(n[l]=Ot(r),n[l].c(),pt(n[l],1),n[l].m(e.parentNode,e))}for(ft(),l=s.length;l<n.length;l+=1)r(l);gt()}},i(t){if(!o){for(let t=0;t<s.length;t+=1)pt(n[t]);o=!0}},o(t){n=n.filter(Boolean);for(let t=0;t<n.length;t+=1)ht(n[t]);o=!1},d(t){!function(t,e){for(let o=0;o<t.length;o+=1)t[o]&&t[o].d(e)}(n,t),t&&E(e)}}}function Zt(t,e,o){let s;d(t,Mt,(t=>o(2,s=t)));let{$$slots:n={},$$scope:r}=e,{theme:l="dark"}=e,{placement:i="bottom-right"}=e,{type:a="info"}=e,{showProgress:c=!1}=e,{duration:u=3e3}=e,{width:f="320px"}=e;Q((()=>{Mt.setDefaults({placement:i,showProgress:c,theme:l,duration:u,type:a})}));return t.$$set=t=>{"theme"in t&&o(5,l=t.theme),"placement"in t&&o(1,i=t.placement),"type"in t&&o(6,a=t.type),"showProgress"in t&&o(7,c=t.showProgress),"duration"in t&&o(8,u=t.duration),"width"in t&&o(0,f=t.width),"$$scope"in t&&o(9,r=t.$$scope)},[f,i,s,["bottom-right","bottom-left","top-right","top-left","top-center","bottom-center","center-center"],{"bottom-right":400,"top-right":-400,"bottom-left":400,"top-left":-400,"bottom-center":400,"top-center":-400,"center-center":-800},l,a,c,u,r,n,(t,e)=>e.placement===t]}function Dt(t){z(t,"svelte-1t011t6",".st-toast.svelte-1t011t6.svelte-1t011t6{width:100%;pointer-events:auto;cursor:pointer;z-index:10000;max-width:100%;font-size:0.875rem;pointer-events:auto;background-color:rgba(255, 255, 255, 0.85);background-clip:padding-box;border:1px solid rgba(0, 0, 0, 0.1);box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);border-radius:0.25rem}.st-toast.success.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(22, 163, 74);color:#fff}.st-toast.info.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(2, 132, 199);color:#fff}.st-toast.error.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(225, 29, 72);color:#fff}.st-toast.warning.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(202, 138, 4);color:#fff}.st-toast.dark.svelte-1t011t6.svelte-1t011t6{color:#fff;background:#393939}.st-toast.dark.svelte-1t011t6 .st-toast-close-btn svg.svelte-1t011t6{fill:#fff}.st-toast.dark.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6:focus{border:solid 1px #fff;border-radius:3px}.st-toast.dark.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6:focus:focus{border-color:#fff;outline:none}.st-toast.dark.success.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(22, 163, 74);color:#fff}.st-toast.dark.success.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:solid 1px #fff}.st-toast.dark.info.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(2, 132, 199);color:#fff}.st-toast.dark.info.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:solid 1px #fff}.st-toast.dark.error.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(225, 29, 72);color:#fff}.st-toast.dark.error.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:solid 1px #fff}.st-toast.dark.warning.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(202, 138, 4);color:#fff}.st-toast.dark.warning.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:solid 1px #fff}.st-toast.light.svelte-1t011t6.svelte-1t011t6{color:#161616}.st-toast.light.svelte-1t011t6 .st-toast-close-btn svg.svelte-1t011t6{color:#161616}.st-toast.light.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6:focus{border:solid 1px #fff;border-radius:3px}.st-toast.light.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6:focus:focus{border-color:#fff;outline:none}.st-toast.light.success.svelte-1t011t6.svelte-1t011t6{border-color:rgb(22, 163, 74);background:rgba(22, 163, 74, 0.2)}.st-toast.light.success.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(22, 163, 74);color:#fff}.st-toast.light.success.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:1px solid rgb(22, 163, 74)}.st-toast.light.info.svelte-1t011t6.svelte-1t011t6{border-color:rgb(2, 132, 199);background:rgba(2, 132, 199, 0.2)}.st-toast.light.info.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(2, 132, 199);color:#fff}.st-toast.light.info.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:1px solid rgb(2, 132, 199)}.st-toast.light.error.svelte-1t011t6.svelte-1t011t6{border-color:rgb(225, 29, 72);background:rgba(225, 29, 72, 0.2)}.st-toast.light.error.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(225, 29, 72);color:#fff}.st-toast.light.error.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:1px solid rgb(225, 29, 72)}.st-toast.light.warning.svelte-1t011t6.svelte-1t011t6{border-color:rgb(202, 138, 4);background:rgba(202, 138, 4, 0.2)}.st-toast.light.warning.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{fill:rgb(202, 138, 4);color:#fff}.st-toast.light.warning.svelte-1t011t6 .st-toast-header.svelte-1t011t6{border-bottom:1px solid rgb(202, 138, 4)}.st-toast-header.svelte-1t011t6.svelte-1t011t6{display:flex;align-items:center;align-items:center;padding:0.5rem 0.75rem;background-clip:padding-box;border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.st-toast-header.svelte-1t011t6 .st-toast-title.svelte-1t011t6{flex:1;text-align:left;margin-left:0.5rem;outline:none}.st-toast-header.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6{margin-right:-0.375rem;margin-left:0.75rem;background:transparent;border:0}.st-toast-body.svelte-1t011t6.svelte-1t011t6{position:relative;padding:0.75rem 2rem 0.75rem 2rem;word-wrap:break-word;text-align:left}.st-toast-body.st-toast-no-title.svelte-1t011t6.svelte-1t011t6{padding-left:0.75rem}.st-toast-body.st-toast-no-title.svelte-1t011t6 .st-toast-icon.svelte-1t011t6{display:inline-block;position:relative;top:-1px}.st-toast-body.st-toast-no-title.svelte-1t011t6 .st-toast-description.svelte-1t011t6{margin-left:0.5rem}.st-toast-body.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6{position:absolute;right:10px;top:13px}.st-toast-body.svelte-1t011t6 .st-toast-close-btn.svelte-1t011t6:focus{border-color:#fff}")}const Ft=t=>({}),It=t=>({}),Gt=t=>({}),Jt=t=>({}),Kt=t=>({}),Qt=t=>({}),Ut=t=>({}),Wt=t=>({}),Xt=t=>({}),Yt=t=>({});function te(t){let o,s,n,r,l,i,a,c,u,d=t[1].title+"";const g=t[5].icon,w=f(g,t,t[4],Yt),b=w||function(t){let e;function o(t,e){return"success"===t[1].type?ne:"info"===t[1].type?se:"error"===t[1].type?oe:ee}let s=o(t),n=s(t);return{c(){n.c(),e=j()},m(t,o){n.m(t,o),B(t,e,o)},p(t,r){s!==(s=o(t))&&(n.d(1),n=s(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&E(e)}}}(t),m=t[5]["close-icon"],y=f(m,t,t[4],Wt),x=y||function(t){let o,s;return{c(){o=A("svg"),s=A("path"),V(s,"d","M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"),V(o,"xmlns","http://www.w3.org/2000/svg"),V(o,"class","bx--toast-notification__close-icon svelte-1t011t6"),V(o,"width","20"),V(o,"height","20"),V(o,"viewBox","0 0 32 32"),V(o,"aria-hidden","true")},m(t,e){B(t,o,e),k(o,s)},p:e,d(t){t&&E(o)}}}();return{c(){o=C("div"),b&&b.c(),s=P(),n=C("strong"),r=L(d),l=P(),i=C("button"),x&&x.c(),V(n,"class","st-toast-title svelte-1t011t6"),V(i,"data-notification-btn",""),V(i,"class","st-toast-close-btn svelte-1t011t6"),V(i,"type","button"),V(i,"aria-label","close"),V(o,"class","st-toast-header svelte-1t011t6")},m(e,d){B(e,o,d),b&&b.m(o,null),k(o,s),k(o,n),k(n,r),k(o,l),k(o,i),x&&x.m(i,null),a=!0,c||(u=H(i,"click",t[2]),c=!0)},p(t,e){w?w.p&&(!a||16&e)&&h(w,g,t,t[4],a?p(g,t[4],e,Xt):v(t[4]),Yt):b&&b.p&&(!a||2&e)&&b.p(t,a?e:-1),(!a||2&e)&&d!==(d=t[1].title+"")&&R(r,d),y&&y.p&&(!a||16&e)&&h(y,m,t,t[4],a?p(m,t[4],e,Ut):v(t[4]),Wt)},i(t){a||(pt(b,t),pt(x,t),a=!0)},o(t){ht(b,t),ht(x,t),a=!1},d(t){t&&E(o),b&&b.d(t),x&&x.d(t),c=!1,u()}}}function ee(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1\ts1,0.4,1,1S10.6,16,10,16z"),V(s,"d","M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function oe(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function se(t){let e,o;return{c(){e=A("svg"),o=A("path"),V(o,"d","M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,7Zm4,17.12H12V21.88h2.88V15.12H13V12.88h4.13v9H20Z"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 32 32"),V(e,"aria-hidden","true")},m(t,s){B(t,e,s),k(e,o)},d(t){t&&E(e)}}}function ne(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"fill","none"),V(s,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function re(t){let e;const o=t[5].icon,s=f(o,t,t[4],Qt),n=s||function(t){let e;function o(t,e){return"success"===t[1].type?ce:"info"===t[1].type?ae:"error"===t[1].type?ie:le}let s=o(t),n=s(t);return{c(){n.c(),e=j()},m(t,o){n.m(t,o),B(t,e,o)},p(t,r){s!==(s=o(t))&&(n.d(1),n=s(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&E(e)}}}(t);return{c(){n&&n.c()},m(t,o){n&&n.m(t,o),e=!0},p(t,r){s?s.p&&(!e||16&r)&&h(s,o,t,t[4],e?p(o,t[4],r,Kt):v(t[4]),Qt):n&&n.p&&(!e||2&r)&&n.p(t,e?r:-1)},i(t){e||(pt(n,t),e=!0)},o(t){ht(n,t),e=!1},d(t){n&&n.d(t)}}}function le(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1\ts1,0.4,1,1S10.6,16,10,16z"),V(s,"d","M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function ie(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function ae(t){let e,o;return{c(){e=A("svg"),o=A("path"),V(o,"d","M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,7Zm4,17.12H12V21.88h2.88V15.12H13V12.88h4.13v9H20Z"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 32 32"),V(e,"aria-hidden","true")},m(t,s){B(t,e,s),k(e,o)},d(t){t&&E(e)}}}function ce(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"fill","none"),V(s,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1t011t6"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function ue(t){let o,s,n,r;const l=t[5]["close-icon"],i=f(l,t,t[4],Jt),a=i||function(t){let o,s;return{c(){o=A("svg"),s=A("path"),V(s,"d","M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"),V(o,"xmlns","http://www.w3.org/2000/svg"),V(o,"class","bx--toast-notification__close-icon svelte-1t011t6"),V(o,"width","20"),V(o,"height","20"),V(o,"viewBox","0 0 32 32"),V(o,"aria-hidden","true")},m(t,e){B(t,o,e),k(o,s)},p:e,d(t){t&&E(o)}}}();return{c(){o=C("button"),a&&a.c(),V(o,"data-notification-btn",""),V(o,"class","st-toast-close-btn svelte-1t011t6"),V(o,"type","button"),V(o,"aria-label","close")},m(e,l){B(e,o,l),a&&a.m(o,null),s=!0,n||(r=H(o,"click",t[2]),n=!0)},p(t,e){i&&i.p&&(!s||16&e)&&h(i,l,t,t[4],s?p(l,t[4],e,Gt):v(t[4]),Jt)},i(t){s||(pt(a,t),s=!0)},o(t){ht(a,t),s=!1},d(t){t&&E(o),a&&a.d(t),n=!1,r()}}}function de(t){let e,o,s,n,r,l,i,a,c,u,d,g,w,b=t[1].description+"",m=t[1].title&&te(t),y=!t[1].title&&re(t),x=!t[1].title&&ue(t);const q=t[5].extra,$=f(q,t,t[4],It);return{c(){e=C("div"),m&&m.c(),o=P(),s=C("div"),y&&y.c(),n=P(),r=C("span"),l=L(b),i=P(),x&&x.c(),a=P(),c=C("div"),$&&$.c(),V(r,"class","st-toast-description svelte-1t011t6"),V(c,"class","st-toast-extra"),V(s,"class","st-toast-body svelte-1t011t6"),O(s,"st-toast-no-title",!t[1].title),V(e,"class",u="st-toast bootstrap "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1t011t6"),V(e,"role","alert"),V(e,"aria-live","assertive"),V(e,"aria-atomic","true")},m(u,f){B(u,e,f),m&&m.m(e,null),k(e,o),k(e,s),y&&y.m(s,null),k(s,n),k(s,r),k(r,l),k(s,i),x&&x.m(s,null),k(s,a),k(s,c),$&&$.m(c,null),d=!0,g||(w=H(e,"click",t[3]),g=!0)},p(t,[r]){t[1].title?m?(m.p(t,r),2&r&&pt(m,1)):(m=te(t),m.c(),pt(m,1),m.m(e,o)):m&&(ft(),ht(m,1,1,(()=>{m=null})),gt()),t[1].title?y&&(ft(),ht(y,1,1,(()=>{y=null})),gt()):y?(y.p(t,r),2&r&&pt(y,1)):(y=re(t),y.c(),pt(y,1),y.m(s,n)),(!d||2&r)&&b!==(b=t[1].description+"")&&R(l,b),t[1].title?x&&(ft(),ht(x,1,1,(()=>{x=null})),gt()):x?(x.p(t,r),2&r&&pt(x,1)):(x=ue(t),x.c(),pt(x,1),x.m(s,a)),$&&$.p&&(!d||16&r)&&h($,q,t,t[4],d?p(q,t[4],r,Ft):v(t[4]),It),(!d||2&r)&&O(s,"st-toast-no-title",!t[1].title),(!d||3&r&&u!==(u="st-toast bootstrap "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1t011t6"))&&V(e,"class",u)},i(t){d||(pt(m),pt(y),pt(x),pt($,t),d=!0)},o(t){ht(m),ht(y),ht(x),ht($,t),d=!1},d(t){t&&E(e),m&&m.d(),y&&y.d(),x&&x.d(),$&&$.d(t),g=!1,w()}}}function fe(t,e,o){let{$$slots:s={},$$scope:n}=e,{theme:r="light"}=e,{data:l={}}=e;return t.$$set=t=>{"theme"in t&&o(0,r=t.theme),"data"in t&&o(1,l=t.data),"$$scope"in t&&o(4,n=t.$$scope)},[r,l,t=>{t.stopPropagation(),l.remove(),"function"==typeof l.onRemove&&l.onRemove()},()=>{"function"==typeof l.onClick&&l.onClick()},n,s]}function ge(t){return"[object Date]"===Object.prototype.toString.call(t)}function pe(t,e){if(t===e||t!=t)return()=>t;const o=typeof t;if(o!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const o=e.map(((e,o)=>pe(t[o],e)));return t=>o.map((e=>e(t)))}if("object"===o){if(!t||!e)throw new Error("Object cannot be null");if(ge(t)&&ge(e)){t=t.getTime();const o=(e=e.getTime())-t;return e=>new Date(t+e*o)}const o=Object.keys(e),s={};return o.forEach((o=>{s[o]=pe(t[o],e[o])})),t=>{const e={};return o.forEach((o=>{e[o]=s[o](t)})),e}}if("number"===o){const o=e-t;return e=>t+e*o}throw new Error(`Cannot interpolate ${o} values`)}function he(t){z(t,"svelte-1q74weu",".st-toast.svelte-1q74weu.svelte-1q74weu{display:flex;pointer-events:auto;width:320px;height:auto;padding-left:0.875rem;color:#fff;box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.2);position:relative;cursor:pointer}.st-toast.svelte-1q74weu .st-toast-icon.svelte-1q74weu{flex-shrink:0;margin-right:0.875rem;margin-top:0.875rem}.st-toast.svelte-1q74weu progress[value].svelte-1q74weu{appearance:none;display:block;width:100%;position:absolute;bottom:0;left:0;right:0;height:4px}.st-toast.dark.svelte-1q74weu.svelte-1q74weu{color:#fff;background:#393939}.st-toast.dark.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-bar{background-color:#393939}.st-toast.dark.svelte-1q74weu .st-toast-close-btn svg.svelte-1q74weu{fill:#fff}.st-toast.dark.svelte-1q74weu .st-toast-close-btn.svelte-1q74weu:focus{border:solid 1px #fff}.st-toast.dark.success.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(22, 163, 74)}.st-toast.dark.success.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(22, 163, 74);color:#fff}.st-toast.dark.success.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(22, 163, 74)}.st-toast.dark.info.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(2, 132, 199)}.st-toast.dark.info.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(2, 132, 199);color:#fff}.st-toast.dark.info.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(2, 132, 199)}.st-toast.dark.error.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(225, 29, 72)}.st-toast.dark.error.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(225, 29, 72);color:#fff}.st-toast.dark.error.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(225, 29, 72)}.st-toast.dark.warning.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(202, 138, 4)}.st-toast.dark.warning.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(202, 138, 4);color:#fff}.st-toast.dark.warning.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(202, 138, 4)}.st-toast.light.svelte-1q74weu.svelte-1q74weu{color:#161616;fill:#161616}.st-toast.light.success.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(22, 163, 74);background:rgba(22, 163, 74, 0.2)}.st-toast.light.success.svelte-1q74weu progress.svelte-1q74weu{background:rgba(22, 163, 74, 0.2)}.st-toast.light.success.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-bar{background-color:transparent}.st-toast.light.success.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(22, 163, 74)}.st-toast.light.success.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(22, 163, 74)}.st-toast.light.success.svelte-1q74weu .st-toast-close-btn.svelte-1q74weu:focus{border:solid 1px rgb(22, 163, 74)}.st-toast.light.success.svelte-1q74weu.svelte-1q74weu::before{border-color:rgb(22, 163, 74);content:'';pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;filter:opacity(0.4);border-style:solid;border-width:1px 1px 1px 0}.st-toast.light.info.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(2, 132, 199);background:rgba(2, 132, 199, 0.2)}.st-toast.light.info.svelte-1q74weu progress.svelte-1q74weu{background:rgba(2, 132, 199, 0.2)}.st-toast.light.info.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-bar{background-color:transparent}.st-toast.light.info.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(2, 132, 199)}.st-toast.light.info.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(2, 132, 199)}.st-toast.light.info.svelte-1q74weu .st-toast-close-btn.svelte-1q74weu:focus{border:solid 1px rgb(2, 132, 199)}.st-toast.light.info.svelte-1q74weu.svelte-1q74weu::before{border-color:rgb(2, 132, 199);content:'';pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;filter:opacity(0.4);border-style:solid;border-width:1px 1px 1px 0}.st-toast.light.error.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(225, 29, 72);background:rgba(225, 29, 72, 0.2)}.st-toast.light.error.svelte-1q74weu progress.svelte-1q74weu{background:rgba(225, 29, 72, 0.2)}.st-toast.light.error.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-bar{background-color:transparent}.st-toast.light.error.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(225, 29, 72)}.st-toast.light.error.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(225, 29, 72)}.st-toast.light.error.svelte-1q74weu .st-toast-close-btn.svelte-1q74weu:focus{border:solid 1px rgb(225, 29, 72)}.st-toast.light.error.svelte-1q74weu.svelte-1q74weu::before{border-color:rgb(225, 29, 72);content:'';pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;filter:opacity(0.4);border-style:solid;border-width:1px 1px 1px 0}.st-toast.light.warning.svelte-1q74weu.svelte-1q74weu{border-left:3px solid rgb(202, 138, 4);background:rgba(202, 138, 4, 0.2)}.st-toast.light.warning.svelte-1q74weu progress.svelte-1q74weu{background:rgba(202, 138, 4, 0.2)}.st-toast.light.warning.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-bar{background-color:transparent}.st-toast.light.warning.svelte-1q74weu progress[value].svelte-1q74weu::-webkit-progress-value{background-color:rgb(202, 138, 4)}.st-toast.light.warning.svelte-1q74weu .st-toast-icon.svelte-1q74weu{fill:rgb(202, 138, 4)}.st-toast.light.warning.svelte-1q74weu .st-toast-close-btn.svelte-1q74weu:focus{border:solid 1px rgb(202, 138, 4)}.st-toast.light.warning.svelte-1q74weu.svelte-1q74weu::before{border-color:rgb(202, 138, 4);content:'';pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;filter:opacity(0.4);border-style:solid;border-width:1px 1px 1px 0}.st-toast-details.svelte-1q74weu.svelte-1q74weu{margin-top:0.875rem;margin-right:1rem;text-align:left;align-self:flex-start}.st-toast-details.svelte-1q74weu .st-toast-title.svelte-1q74weu{font-size:0.875rem;font-weight:600;line-height:1.125rem;letter-spacing:0.16px;font-weight:600;word-break:break-word;margin:0;outline:none}.st-toast-details.svelte-1q74weu .st-toast-description.svelte-1q74weu{font-size:0.875rem;font-weight:400;line-height:1.125rem;letter-spacing:0.16px;margin-top:0;margin-bottom:1rem;word-break:break-word}.st-toast-close-btn.svelte-1q74weu.svelte-1q74weu{outline:2px solid transparent;outline-offset:-2px;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;cursor:pointer;margin-left:auto;padding:0;height:3rem;width:3rem;min-height:3rem;min-width:3rem;transition:outline 110ms,\n background-color 110ms}")}const ve=t=>({}),we=t=>({}),be=t=>({}),me=t=>({}),ye=t=>({}),xe=t=>({});function qe(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1\ts1,0.4,1,1S10.6,16,10,16z"),V(s,"d","M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1q74weu"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function $e(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1q74weu"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function ke(t){let e,o;return{c(){e=A("svg"),o=A("path"),V(o,"d","M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,7Zm4,17.12H12V21.88h2.88V15.12H13V12.88h4.13v9H20Z"),V(e,"class","st-toast-icon svelte-1q74weu"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 32 32"),V(e,"aria-hidden","true")},m(t,s){B(t,e,s),k(e,o)},d(t){t&&E(e)}}}function ze(t){let e,o,s;return{c(){e=A("svg"),o=A("path"),s=A("path"),V(o,"d","M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"fill","none"),V(s,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),V(s,"data-icon-path","inner-path"),V(s,"opacity","0"),V(e,"class","st-toast-icon svelte-1q74weu"),V(e,"xmlns","http://www.w3.org/2000/svg"),V(e,"width","20"),V(e,"height","20"),V(e,"viewBox","0 0 20 20"),V(e,"aria-hidden","true")},m(t,n){B(t,e,n),k(e,o),k(e,s)},d(t){t&&E(e)}}}function Me(t){let e,o,s=t[1].title+"";return{c(){e=C("h3"),o=L(s),V(e,"class","st-toast-title svelte-1q74weu")},m(t,s){B(t,e,s),k(e,o)},p(t,e){2&e&&s!==(s=t[1].title+"")&&R(o,s)},d(t){t&&E(e)}}}function _e(t){let e;return{c(){e=C("progress"),N(e,"height",t[1].duration>0?"4px":0),e.value=t[2],V(e,"class","svelte-1q74weu")},m(t,o){B(t,e,o)},p(t,o){2&o&&N(e,"height",t[1].duration>0?"4px":0),4&o&&(e.value=t[2])},d(t){t&&E(e)}}}function Se(t){let o,s,n,r,i,a,c,u,d,g,w,b,m,y,x,q=t[1].description+"";const $=t[7].icon,z=f($,t,t[6],xe),M=z||function(t){let e;function o(t,e){return"success"===t[1].type?ze:"info"===t[1].type?ke:"error"===t[1].type?$e:qe}let s=o(t),n=s(t);return{c(){n.c(),e=j()},m(t,o){n.m(t,o),B(t,e,o)},p(t,r){s!==(s=o(t))&&(n.d(1),n=s(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&E(e)}}}(t);let _=t[1].title&&Me(t);const S=t[7].extra,N=f(S,t,t[6],me),O=t[7]["close-icon"],T=f(O,t,t[6],we),Z=T||function(t){let o,s;return{c(){o=A("svg"),s=A("path"),V(s,"d","M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"),V(o,"xmlns","http://www.w3.org/2000/svg"),V(o,"class","bx--toast-notification__close-icon svelte-1q74weu"),V(o,"width","20"),V(o,"height","20"),V(o,"viewBox","0 0 32 32"),V(o,"aria-hidden","true")},m(t,e){B(t,o,e),k(o,s)},p:e,d(t){t&&E(o)}}}();let D=t[1].showProgress&&_e(t);return{c(){o=C("div"),M&&M.c(),s=P(),n=C("div"),_&&_.c(),r=P(),i=C("p"),a=L(q),c=P(),u=C("div"),N&&N.c(),d=P(),g=C("button"),Z&&Z.c(),w=P(),D&&D.c(),V(i,"class","st-toast-description svelte-1q74weu"),V(u,"class","st-toast-extra"),V(n,"class","st-toast-details svelte-1q74weu"),V(g,"class","st-toast-close-btn svelte-1q74weu"),V(g,"type","button"),V(g,"aria-label","close"),V(o,"class",b="st-toast flat "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1q74weu"),V(o,"role","alert"),V(o,"aria-live","assertive"),V(o,"aria-atomic","true")},m(e,l){B(e,o,l),M&&M.m(o,null),k(o,s),k(o,n),_&&_.m(n,null),k(n,r),k(n,i),k(i,a),k(n,c),k(n,u),N&&N.m(u,null),k(o,d),k(o,g),Z&&Z.m(g,null),k(o,w),D&&D.m(o,null),m=!0,y||(x=[H(g,"click",t[4]),H(o,"click",t[5])],y=!0)},p(t,[e]){z?z.p&&(!m||64&e)&&h(z,$,t,t[6],m?p($,t[6],e,ye):v(t[6]),xe):M&&M.p&&(!m||2&e)&&M.p(t,m?e:-1),t[1].title?_?_.p(t,e):(_=Me(t),_.c(),_.m(n,r)):_&&(_.d(1),_=null),(!m||2&e)&&q!==(q=t[1].description+"")&&R(a,q),N&&N.p&&(!m||64&e)&&h(N,S,t,t[6],m?p(S,t[6],e,be):v(t[6]),me),T&&T.p&&(!m||64&e)&&h(T,O,t,t[6],m?p(O,t[6],e,ve):v(t[6]),we),t[1].showProgress?D?D.p(t,e):(D=_e(t),D.c(),D.m(o,null)):D&&(D.d(1),D=null),(!m||3&e&&b!==(b="st-toast flat "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1q74weu"))&&V(o,"class",b)},i(t){m||(pt(M,t),pt(N,t),pt(Z,t),m=!0)},o(t){ht(M,t),ht(N,t),ht(Z,t),m=!1},d(t){t&&E(o),M&&M.d(t),_&&_.d(),N&&N.d(t),Z&&Z.d(t),D&&D.d(),y=!1,l(x)}}}function Be(t,e,n){let r,{$$slots:l={},$$scope:i}=e,{theme:a="light"}=e,{data:c={}}=e;const u=function(t,e={}){const n=zt(t);let r,l=t;function i(i,a){if(null==t)return n.set(t=i),Promise.resolve();l=i;let c=r,u=!1,{delay:d=0,duration:f=400,easing:g=o,interpolate:p=pe}=s(s({},e),a);if(0===f)return c&&(c.abort(),c=null),n.set(t=l),Promise.resolve();const h=m()+d;let v;return r=$((e=>{if(e<h)return!0;u||(v=p(t,i),"function"==typeof f&&(f=f(t,i)),u=!0),c&&(c.abort(),c=null);const o=e-h;return o>f?(n.set(t=i),!1):(n.set(t=v(g(o/f))),!0)})),r.promise}return{set:i,update:(e,o)=>i(e(l,t),o),subscribe:n.subscribe}}(1,{duration:c.duration,easing:o});d(t,u,(t=>n(2,r=t))),Q((()=>{u.set(0,{duration:c.duration})}));return t.$$set=t=>{"theme"in t&&n(0,a=t.theme),"data"in t&&n(1,c=t.data),"$$scope"in t&&n(6,i=t.$$scope)},[a,c,r,u,t=>{t.stopPropagation(),c.remove(),"function"==typeof c.onRemove&&c.onRemove()},()=>{"function"==typeof c.onClick&&c.onClick()},i,l]}t.BootstrapToast=class extends $t{constructor(t){super(),qt(this,t,fe,de,a,{theme:0,data:1},Dt)}},t.FlatToast=class extends $t{constructor(t){super(),qt(this,t,Be,Se,a,{theme:0,data:1},he)}},t.ToastContainer=class extends $t{constructor(t){super(),qt(this,t,Zt,Tt,a,{theme:5,placement:1,type:6,showProgress:7,duration:8,width:0},At)}},t.toasts=Mt,Object.defineProperty(t,"__esModule",{value:!0})}));