svelte-toasts
Version:
A highly configurable notification/toast component with individual toast state management capabilities.
2 lines (1 loc) • 43.3 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 s=t=>t;function o(t,e){for(const s in e)t[s]=e[s];return t}function n(t){return t()}function r(){return Object.create(null)}function i(t){t.forEach(n)}function l(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,...s){if(null==t)return e;const o=t.subscribe(...s);return o.unsubscribe?()=>o.unsubscribe():o}function d(t){let e;return a(t,(t=>e=t))(),e}function f(t,e,s){t.$$.on_destroy.push(a(e,s))}function u(t,e,s,o){if(t){const n=g(t,e,s,o);return t[0](n)}}function g(t,e,s,n){return t[1]&&n?o(s.ctx.slice(),t[1](n(e))):s.ctx}function p(t,e,s,o,n,r,i){const l=function(t,e,s,o){if(t[2]&&o){const n=t[2](o(s));if(void 0===e.dirty)return n;if("object"==typeof n){const t=[],s=Math.max(e.dirty.length,n.length);for(let o=0;o<s;o+=1)t[o]=e.dirty[o]|n[o];return t}return e.dirty|n}return e.dirty}(e,o,n,r);if(l){const n=g(e,s,o,i);t.p(n,l)}}const h="undefined"!=typeof window;let v=h?()=>window.performance.now():()=>Date.now(),b=h?t=>requestAnimationFrame(t):e;const m=new Set;function w(t){m.forEach((e=>{e.c(t)||(m.delete(e),e.f())})),0!==m.size&&b(w)}function y(t){let e;return 0===m.size&&b(w),{promise:new Promise((s=>{m.add(e={c:t,f:s})})),abort(){m.delete(e)}}}function x(t,e){t.appendChild(e)}function k(t,e,s){t.insertBefore(e,s||null)}function $(t){t.parentNode.removeChild(t)}function z(t){return document.createElement(t)}function _(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t){return document.createTextNode(t)}function S(){return M(" ")}function B(){return M("")}function C(t,e,s,o){return t.addEventListener(e,s,o),()=>t.removeEventListener(e,s,o)}function E(t,e,s){null==s?t.removeAttribute(e):t.getAttribute(e)!==s&&t.setAttribute(e,s)}function A(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function L(t,e,s,o){t.style.setProperty(e,s,o?"important":"")}function H(t,e,s){t.classList[s?"add":"remove"](e)}const P=new Set;let j,V=0;function R(t,e,s,o,n,r,i,l=0){const c=16.666/o;let a="{\n";for(let t=0;t<=1;t+=c){const o=e+(s-e)*r(t);a+=100*t+`%{${i(o,1-o)}}\n`}const d=a+`100% {${i(s,1-s)}}\n}`,f=`__svelte_${function(t){let e=5381,s=t.length;for(;s--;)e=(e<<5)-e^t.charCodeAt(s);return e>>>0}(d)}_${l}`,u=t.ownerDocument;P.add(u);const g=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(z("style")).sheet),p=u.__svelte_rules||(u.__svelte_rules={});p[f]||(p[f]=!0,g.insertRule(`@keyframes ${f} ${d}`,g.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${f} ${o}ms linear ${n}ms 1 both`,V+=1,f}function T(t,e){const s=(t.style.animation||"").split(", "),o=s.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),n=s.length-o.length;n&&(t.style.animation=o.join(", "),V-=n,V||b((()=>{V||(P.forEach((t=>{const e=t.__svelte_stylesheet;let s=e.cssRules.length;for(;s--;)e.deleteRule(s);t.__svelte_rules={}})),P.clear())})))}function O(t,e){const s=t.getBoundingClientRect();if(e.left!==s.left||e.top!==s.top){const o=getComputedStyle(t),n="none"===o.transform?"":o.transform;t.style.transform=`${n} translate(${e.left-s.left}px, ${e.top-s.top}px)`}}function N(t){j=t}function Z(t){(function(){if(!j)throw new Error("Function called outside component initialization");return j})().$$.on_mount.push(t)}const D=[],I=[],q=[],F=[],W=Promise.resolve();let G=!1;function J(t){q.push(t)}let K=!1;const Q=new Set;function U(){if(!K){K=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];N(e),X(e.$$)}for(N(null),D.length=0;I.length;)I.pop()();for(let t=0;t<q.length;t+=1){const e=q[t];Q.has(e)||(Q.add(e),e())}q.length=0}while(D.length);for(;F.length;)F.pop()();G=!1,K=!1,Q.clear()}}function X(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(J)}}let Y;function tt(){return Y||(Y=Promise.resolve(),Y.then((()=>{Y=null}))),Y}function et(t,e,s){t.dispatchEvent(function(t,e){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,!1,!1,e),s}(`${e?"intro":"outro"}${s}`))}const st=new Set;let ot;function nt(){ot={r:0,c:[],p:ot}}function rt(){ot.r||i(ot.c),ot=ot.p}function it(t,e){t&&t.i&&(st.delete(t),t.i(e))}function lt(t,e,s,o){if(t&&t.o){if(st.has(t))return;st.add(t),ot.c.push((()=>{st.delete(t),o&&(s&&t.d(1),o())})),t.o(e)}}const ct={duration:0};function at(t,e){t.f(),function(t,e){lt(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function dt(t){t&&t.c()}function ft(t,e,s,o){const{fragment:r,on_mount:c,on_destroy:a,after_update:d}=t.$$;r&&r.m(e,s),o||J((()=>{const e=c.map(n).filter(l);a?a.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(J)}function ut(t,e){const s=t.$$;null!==s.fragment&&(i(s.on_destroy),s.fragment&&s.fragment.d(e),s.on_destroy=s.fragment=null,s.ctx=[])}function gt(t,e){-1===t.$$.dirty[0]&&(D.push(t),G||(G=!0,W.then(U)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function pt(t,s,o,n,l,c,a=[-1]){const d=j;N(t);const f=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:l,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:r(),dirty:a,skip_bound:!1};let u=!1;if(f.ctx=o?o(t,s.props||{},((e,s,...o)=>{const n=o.length?o[0]:s;return f.ctx&&l(f.ctx[e],f.ctx[e]=n)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](n),u&>(t,e)),s})):[],f.update(),u=!0,i(f.before_update),f.fragment=!!n&&n(f.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);f.fragment&&f.fragment.l(t),t.forEach($)}else f.fragment&&f.fragment.c();s.intro&&it(t.$$.fragment),ft(t,s.target,s.anchor,s.customElement),U()}N(d)}class ht{$destroy(){ut(this,1),this.$destroy=e}$on(t,e){const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(e),()=>{const t=s.indexOf(e);-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 vt=[];function bt(t,s=e){let o;const n=[];function r(e){if(c(t,e)&&(t=e,o)){const e=!vt.length;for(let e=0;e<n.length;e+=1){const s=n[e];s[1](),vt.push(s,t)}if(e){for(let t=0;t<vt.length;t+=2)vt[t][0](vt[t+1]);vt.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(i,l=e){const c=[i,l];return n.push(c),1===n.length&&(o=s(r)||e),i(t),()=>{const t=n.indexOf(c);-1!==t&&n.splice(t,1),0===n.length&&(o(),o=null)}}}}const mt=function(t=[]){const e=bt(t),{set:s,update:o,subscribe:n}=e;let r={duration:3e3,placement:"bottom-right",type:"info",theme:"dark"};function i(t){const{duration:s=3e3,placement:n="bottom-right",type:i="info",theme:l="dark",...c}={...r,...t},a=Date.now(),f={...c,uid:a,placement:n,type:i,theme:l,duration:s,remove:()=>{o((t=>t.filter((t=>t.uid!==a))))},update:t=>{delete t.uid;const s=d(e)?.findIndex((t=>t?.uid===a));s>-1&&o((e=>[...e.slice(0,s),{...e[s],...t},...e.slice(s+1)]))}};return o((t=>[...t,f])),s>0&&setTimeout((()=>{f.remove(),"function"==typeof f.onRemove&&f.onRemove()}),s),f}return{subscribe:n,add:i,success:wt("success",i),info:wt("info",i),error:wt("error",i),warning:wt("warning",i),clearAll:function(){s([])},clearLast:function(){o((t=>t.slice(0,t.length-1)))},getById:function(t){return d(e)?.find((e=>e?.uid===t))},setDefaults:function(t){r={...r,...t}}}}([]);function wt(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 yt(t){const e=t-1;return e*e*e+1}function xt(t,{delay:e=0,duration:o=400,easing:n=s}={}){const r=+getComputedStyle(t).opacity;return{delay:e,duration:o,easing:n,css:t=>"opacity: "+t*r}}function kt(t,{delay:e=0,duration:s=400,easing:o=yt,x:n=0,y:r=0,opacity:i=0}={}){const l=getComputedStyle(t),c=+l.opacity,a="none"===l.transform?"":l.transform,d=c*(1-i);return{delay:e,duration:s,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${a} translate(${(1-t)*n}px, ${(1-t)*r}px);\n\t\t\topacity: ${c-d*e}`}}function $t(t,e,s={}){const o=getComputedStyle(t),n="none"===o.transform?"":o.transform,r=e.from.width/t.clientWidth,i=e.from.height/t.clientHeight,c=(e.from.left-e.to.left)/r,a=(e.from.top-e.to.top)/i,d=Math.sqrt(c*c+a*a),{delay:f=0,duration:u=(t=>120*Math.sqrt(t)),easing:g=yt}=s;return{delay:f,duration:l(u)?u(d):u,easing:g,css:(t,e)=>`transform: ${n} translate(${e*c}px, ${e*a}px);`}}function zt(t,e,s){const o=t.slice();return o[1]=e[s],o}function _t(t,e,s){const o=t.slice();return o[14]=e[s],o}const Mt=t=>({data:4&t}),St=t=>({data:t[14]});function Bt(t){let e;const s=t[10].default,o=u(s,t,t[9],St);return{c(){o&&o.c()},m(t,s){o&&o.m(t,s),e=!0},p(t,e){o&&o.p&&516&e&&p(o,s,t,t[9],e,Mt,St)},i(t){e||(it(o,t),e=!0)},o(t){lt(o,t),e=!1},d(t){o&&o.d(t)}}}function Ct(t){let e,s,o;var n=t[14].component;function r(t){return{props:{data:t[14]}}}return n&&(e=new n(r(t))),{c(){e&&dt(e.$$.fragment),s=B()},m(t,n){e&&ft(e,t,n),k(t,s,n),o=!0},p(t,o){const i={};if(4&o&&(i.data=t[14]),n!==(n=t[14].component)){if(e){nt();const t=e;lt(t.$$.fragment,1,0,(()=>{ut(t,1)})),rt()}n?(e=new n(r(t)),dt(e.$$.fragment),it(e.$$.fragment,1),ft(e,s.parentNode,s)):e=null}else n&&e.$set(i)},i(t){o||(e&&it(e.$$.fragment,t),o=!0)},o(t){e&<(e.$$.fragment,t),o=!1},d(t){t&&$(s),e&&ut(e,t)}}}function Et(t,o){let n,r,c,a,d,f,u,g,p=e;const h=[Ct,Bt],b=[];function m(t,e){return t[14].component?0:1}return r=m(o),c=b[r]=h[r](o),{key:t,first:null,c(){n=z("li"),c.c(),a=S(),E(n,"class","svelte-1rg6zyw"),this.first=n},m(t,e){k(t,n,e),b[r].m(n,null),x(n,a),g=!0},p(t,e){let s=r;r=m(o=t),r===s?b[r].p(o,e):(nt(),lt(b[s],1,1,(()=>{b[s]=null})),rt(),c=b[r],c?c.p(o,e):(c=b[r]=h[r](o),c.c()),it(c,1),c.m(n,a))},r(){u=n.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:s,height:o}=e,n=t.getBoundingClientRect();t.style.position="absolute",t.style.width=s,t.style.height=o,O(t,n)}}(n),p(),O(n,u)},a(){p(),p=function(t,o,n,r){if(!o)return e;const i=t.getBoundingClientRect();if(o.left===i.left&&o.right===i.right&&o.top===i.top&&o.bottom===i.bottom)return e;const{delay:l=0,duration:c=300,easing:a=s,start:d=v()+l,end:f=d+c,tick:u=e,css:g}=n(t,{from:o,to:i},r);let p,h=!0,b=!1;function m(){g&&T(t,p),h=!1}return y((t=>{if(!b&&t>=d&&(b=!0),b&&t>=f&&(u(1,0),m()),!h)return!1;if(b){const e=0+1*a((t-d)/c);u(e,1-e)}return!0})),g&&(p=R(t,0,1,c,l,a,g)),l||(b=!0),u(0,1),m}(n,u,$t,{})},i(t){g||(it(c),J((()=>{f&&f.end(1),d||(d=function(t,o,n){let r,i,c=o(t,n),a=!1,d=0;function f(){r&&T(t,r)}function u(){const{delay:o=0,duration:n=300,easing:l=s,tick:u=e,css:g}=c||ct;g&&(r=R(t,0,1,n,o,l,g,d++)),u(0,1);const p=v()+o,h=p+n;i&&i.abort(),a=!0,J((()=>et(t,!0,"start"))),i=y((e=>{if(a){if(e>=h)return u(1,0),et(t,!0,"end"),f(),a=!1;if(e>=p){const t=l((e-p)/n);u(t,1-t)}}return a}))}let g=!1;return{start(){g||(T(t),l(c)?(c=c(),tt().then(u)):u())},invalidate(){g=!1},end(){a&&(f(),a=!1)}}}(n,xt,{duration:500})),d.start()})),g=!0)},o(t){lt(c),d&&d.invalidate(),f=function(t,o,n){let r,c=o(t,n),a=!0;const d=ot;function f(){const{delay:o=0,duration:n=300,easing:l=s,tick:f=e,css:u}=c||ct;u&&(r=R(t,1,0,n,o,l,u));const g=v()+o,p=g+n;J((()=>et(t,!1,"start"))),y((e=>{if(a){if(e>=p)return f(0,1),et(t,!1,"end"),--d.r||i(d.c),!1;if(e>=g){const t=l((e-g)/n);f(1-t,t)}}return a}))}return d.r+=1,l(c)?tt().then((()=>{c=c(),f()})):f(),{end(e){e&&c.tick&&c.tick(1,0),a&&(r&&T(t,r),a=!1)}}}(n,kt,{y:o[4][o[14].placement],duration:1e3}),g=!1},d(t){t&&$(n),b[r].d(),t&&f&&f.end()}}}function At(t){let e,s,o,n,r=[],i=new Map;function l(...e){return t[11](t[1],...e)}let c=t[2].filter(l).reverse();const a=t=>t[14].uid;for(let e=0;e<c.length;e+=1){let s=_t(t,c,e),o=a(s);i.set(o,r[e]=Et(o,s))}return{c(){e=z("div"),s=z("ul");for(let t=0;t<r.length;t+=1)r[t].c();o=S(),E(s,"class","svelte-1rg6zyw"),E(e,"class","toast-container "+t[1]+" svelte-1rg6zyw"),L(e,"width",t[0])},m(t,i){k(t,e,i),x(e,s);for(let t=0;t<r.length;t+=1)r[t].m(s,null);x(e,o),n=!0},p(o,d){if(t=o,540&d){c=t[2].filter(l).reverse(),nt();for(let t=0;t<r.length;t+=1)r[t].r();r=function(t,e,s,o,n,r,i,l,c,a,d,f){let u=t.length,g=r.length,p=u;const h={};for(;p--;)h[t[p].key]=p;const v=[],b=new Map,m=new Map;for(p=g;p--;){const t=f(n,r,p),l=s(t);let c=i.get(l);c?o&&c.p(t,e):(c=a(l,t),c.c()),b.set(l,v[p]=c),l in h&&m.set(l,Math.abs(p-h[l]))}const w=new Set,y=new Set;function x(t){it(t,1),t.m(l,d),i.set(t.key,t),d=t.first,g--}for(;u&&g;){const e=v[g-1],s=t[u-1],o=e.key,n=s.key;e===s?(d=e.first,u--,g--):b.has(n)?!i.has(o)||w.has(o)?x(e):y.has(n)?u--:m.get(o)>m.get(n)?(y.add(o),x(e)):(w.add(n),u--):(c(s,i),u--)}for(;u--;){const e=t[u];b.has(e.key)||c(e,i)}for(;g;)x(v[g-1]);return v}(r,d,a,1,t,c,i,s,at,Et,null,_t);for(let t=0;t<r.length;t+=1)r[t].a();rt()}(!n||1&d)&&L(e,"width",t[0])},i(t){if(!n){for(let t=0;t<c.length;t+=1)it(r[t]);n=!0}},o(t){for(let t=0;t<r.length;t+=1)lt(r[t]);n=!1},d(t){t&&$(e);for(let t=0;t<r.length;t+=1)r[t].d()}}}function Lt(t){let e,s,o=t[3],n=[];for(let e=0;e<o.length;e+=1)n[e]=At(zt(t,o,e));const r=t=>lt(n[t],1,1,(()=>{n[t]=null}));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=B()},m(t,o){for(let e=0;e<n.length;e+=1)n[e].m(t,o);k(t,e,o),s=!0},p(t,[s]){if(541&s){let i;for(o=t[3],i=0;i<o.length;i+=1){const r=zt(t,o,i);n[i]?(n[i].p(r,s),it(n[i],1)):(n[i]=At(r),n[i].c(),it(n[i],1),n[i].m(e.parentNode,e))}for(nt(),i=o.length;i<n.length;i+=1)r(i);rt()}},i(t){if(!s){for(let t=0;t<o.length;t+=1)it(n[t]);s=!0}},o(t){n=n.filter(Boolean);for(let t=0;t<n.length;t+=1)lt(n[t]);s=!1},d(t){!function(t,e){for(let s=0;s<t.length;s+=1)t[s]&&t[s].d(e)}(n,t),t&&$(e)}}}function Ht(t,e,s){let o;f(t,mt,(t=>s(2,o=t)));let{$$slots:n={},$$scope:r}=e,{theme:i="dark"}=e,{placement:l="bottom-right"}=e,{type:c="info"}=e,{showProgress:a=!1}=e,{duration:d=3e3}=e,{width:u="320px"}=e;Z((()=>{mt.setDefaults({placement:l,showProgress:a,theme:i,duration:d,type:c})}));return t.$$set=t=>{"theme"in t&&s(5,i=t.theme),"placement"in t&&s(1,l=t.placement),"type"in t&&s(6,c=t.type),"showProgress"in t&&s(7,a=t.showProgress),"duration"in t&&s(8,d=t.duration),"width"in t&&s(0,u=t.width),"$$scope"in t&&s(9,r=t.$$scope)},[u,l,o,["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},i,c,a,d,r,n,(t,e)=>e.placement===t]}const Pt=t=>({}),jt=t=>({}),Vt=t=>({}),Rt=t=>({}),Tt=t=>({}),Ot=t=>({}),Nt=t=>({}),Zt=t=>({}),Dt=t=>({}),It=t=>({});function qt(t){let e,s,o,n,r,i,l,c,a,d=t[1].title+"";const f=t[5].icon,g=u(f,t,t[4],It),h=g||function(t){let e;function s(t,e){return"success"===t[1].type?Jt:"info"===t[1].type?Gt:"error"===t[1].type?Wt:Ft}let o=s(t),n=o(t);return{c(){n.c(),e=B()},m(t,s){n.m(t,s),k(t,e,s)},p(t,r){o!==(o=s(t))&&(n.d(1),n=o(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&$(e)}}}(t),v=t[5]["close-icon"],b=u(v,t,t[4],Zt),m=b||function(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(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"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"class","bx--toast-notification__close-icon svelte-1t011t6"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}();return{c(){e=z("div"),h&&h.c(),s=S(),o=z("strong"),n=M(d),r=S(),i=z("button"),m&&m.c(),E(o,"class","st-toast-title svelte-1t011t6"),E(i,"data-notification-btn",""),E(i,"class","st-toast-close-btn svelte-1t011t6"),E(i,"type","button"),E(i,"aria-label","close"),E(e,"class","st-toast-header svelte-1t011t6")},m(d,f){k(d,e,f),h&&h.m(e,null),x(e,s),x(e,o),x(o,n),x(e,r),x(e,i),m&&m.m(i,null),l=!0,c||(a=C(i,"click",t[2]),c=!0)},p(t,e){g?g.p&&16&e&&p(g,f,t,t[4],e,Dt,It):h&&h.p&&2&e&&h.p(t,e),(!l||2&e)&&d!==(d=t[1].title+"")&&A(n,d),b&&b.p&&16&e&&p(b,v,t,t[4],e,Nt,Zt)},i(t){l||(it(h,t),it(m,t),l=!0)},o(t){lt(h,t),lt(m,t),l=!1},d(t){t&&$(e),h&&h.d(t),m&&m.d(t),c=!1,a()}}}function Ft(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"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"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function Wt(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function Gt(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(s,"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"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}function Jt(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"fill","none"),E(o,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function Kt(t){let e;const s=t[5].icon,o=u(s,t,t[4],Ot),n=o||function(t){let e;function s(t,e){return"success"===t[1].type?Yt:"info"===t[1].type?Xt:"error"===t[1].type?Ut:Qt}let o=s(t),n=o(t);return{c(){n.c(),e=B()},m(t,s){n.m(t,s),k(t,e,s)},p(t,r){o!==(o=s(t))&&(n.d(1),n=o(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&$(e)}}}(t);return{c(){n&&n.c()},m(t,s){n&&n.m(t,s),e=!0},p(t,e){o?o.p&&16&e&&p(o,s,t,t[4],e,Tt,Ot):n&&n.p&&2&e&&n.p(t,e)},i(t){e||(it(n,t),e=!0)},o(t){lt(n,t),e=!1},d(t){n&&n.d(t)}}}function Qt(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"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"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function Ut(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function Xt(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(s,"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"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}function Yt(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"fill","none"),E(o,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-1t011t6"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function te(t){let e,s,o,n;const r=t[5]["close-icon"],i=u(r,t,t[4],Rt),l=i||function(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(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"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"class","bx--toast-notification__close-icon svelte-1t011t6"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}();return{c(){e=z("button"),l&&l.c(),E(e,"data-notification-btn",""),E(e,"class","st-toast-close-btn svelte-1t011t6"),E(e,"type","button"),E(e,"aria-label","close")},m(r,i){k(r,e,i),l&&l.m(e,null),s=!0,o||(n=C(e,"click",t[2]),o=!0)},p(t,e){i&&i.p&&16&e&&p(i,r,t,t[4],e,Vt,Rt)},i(t){s||(it(l,t),s=!0)},o(t){lt(l,t),s=!1},d(t){t&&$(e),l&&l.d(t),o=!1,n()}}}function ee(t){let e,s,o,n,r,i,l,c,a,d,f,g,h,v=t[1].description+"",b=t[1].title&&qt(t),m=!t[1].title&&Kt(t),w=!t[1].title&&te(t);const y=t[5].extra,_=u(y,t,t[4],jt);return{c(){e=z("div"),b&&b.c(),s=S(),o=z("div"),m&&m.c(),n=S(),r=z("span"),i=M(v),l=S(),w&&w.c(),c=S(),a=z("div"),_&&_.c(),E(r,"class","st-toast-description svelte-1t011t6"),E(a,"class","st-toast-extra"),E(o,"class","st-toast-body svelte-1t011t6"),H(o,"st-toast-no-title",!t[1].title),E(e,"class",d="st-toast bootstrap "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1t011t6"),E(e,"role","alert"),E(e,"aria-live","assertive"),E(e,"aria-atomic","true")},m(d,u){k(d,e,u),b&&b.m(e,null),x(e,s),x(e,o),m&&m.m(o,null),x(o,n),x(o,r),x(r,i),x(o,l),w&&w.m(o,null),x(o,c),x(o,a),_&&_.m(a,null),f=!0,g||(h=C(e,"click",t[3]),g=!0)},p(t,[r]){t[1].title?b?(b.p(t,r),2&r&&it(b,1)):(b=qt(t),b.c(),it(b,1),b.m(e,s)):b&&(nt(),lt(b,1,1,(()=>{b=null})),rt()),t[1].title?m&&(nt(),lt(m,1,1,(()=>{m=null})),rt()):m?(m.p(t,r),2&r&&it(m,1)):(m=Kt(t),m.c(),it(m,1),m.m(o,n)),(!f||2&r)&&v!==(v=t[1].description+"")&&A(i,v),t[1].title?w&&(nt(),lt(w,1,1,(()=>{w=null})),rt()):w?(w.p(t,r),2&r&&it(w,1)):(w=te(t),w.c(),it(w,1),w.m(o,c)),_&&_.p&&16&r&&p(_,y,t,t[4],r,Pt,jt),2&r&&H(o,"st-toast-no-title",!t[1].title),(!f||3&r&&d!==(d="st-toast bootstrap "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-1t011t6"))&&E(e,"class",d)},i(t){f||(it(b),it(m),it(w),it(_,t),f=!0)},o(t){lt(b),lt(m),lt(w),lt(_,t),f=!1},d(t){t&&$(e),b&&b.d(),m&&m.d(),w&&w.d(),_&&_.d(t),g=!1,h()}}}function se(t,e,s){let{$$slots:o={},$$scope:n}=e,{theme:r="light"}=e,{data:i={}}=e;return t.$$set=t=>{"theme"in t&&s(0,r=t.theme),"data"in t&&s(1,i=t.data),"$$scope"in t&&s(4,n=t.$$scope)},[r,i,t=>{t.stopPropagation(),i.remove(),"function"==typeof i.onRemove&&i.onRemove()},()=>{"function"==typeof i.onClick&&i.onClick()},n,o]}function oe(t){return"[object Date]"===Object.prototype.toString.call(t)}function ne(t,e){if(t===e||t!=t)return()=>t;const s=typeof t;if(s!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const s=e.map(((e,s)=>ne(t[s],e)));return t=>s.map((e=>e(t)))}if("object"===s){if(!t||!e)throw new Error("Object cannot be null");if(oe(t)&&oe(e)){t=t.getTime();const s=(e=e.getTime())-t;return e=>new Date(t+e*s)}const s=Object.keys(e),o={};return s.forEach((s=>{o[s]=ne(t[s],e[s])})),t=>{const e={};return s.forEach((s=>{e[s]=o[s](t)})),e}}if("number"===s){const s=e-t;return e=>t+e*s}throw new Error(`Cannot interpolate ${s} values`)}const re=t=>({}),ie=t=>({}),le=t=>({}),ce=t=>({}),ae=t=>({}),de=t=>({});function fe(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"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"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-is9c7e"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function ue(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"d","M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-is9c7e"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function ge(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(s,"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"),E(e,"class","st-toast-icon svelte-is9c7e"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}function pe(t){let e,s,o;return{c(){e=_("svg"),s=_("path"),o=_("path"),E(s,"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"),E(o,"fill","none"),E(o,"d","M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"),E(o,"data-icon-path","inner-path"),E(o,"opacity","0"),E(e,"class","st-toast-icon svelte-is9c7e"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 20 20"),E(e,"aria-hidden","true")},m(t,n){k(t,e,n),x(e,s),x(e,o)},d(t){t&&$(e)}}}function he(t){let e,s,o=t[1].title+"";return{c(){e=z("h3"),s=M(o),E(e,"class","st-toast-title svelte-is9c7e")},m(t,o){k(t,e,o),x(e,s)},p(t,e){2&e&&o!==(o=t[1].title+"")&&A(s,o)},d(t){t&&$(e)}}}function ve(t){let e;return{c(){e=z("progress"),L(e,"height",t[1].duration>0?"4px":0),e.value=t[2],E(e,"class","svelte-is9c7e")},m(t,s){k(t,e,s)},p(t,s){2&s&&L(e,"height",t[1].duration>0?"4px":0),4&s&&(e.value=t[2])},d(t){t&&$(e)}}}function be(t){let e,s,o,n,r,l,c,a,d,f,g,h,v,b,m,w=t[1].description+"";const y=t[7].icon,L=u(y,t,t[6],de),H=L||function(t){let e;function s(t,e){return"success"===t[1].type?pe:"info"===t[1].type?ge:"error"===t[1].type?ue:fe}let o=s(t),n=o(t);return{c(){n.c(),e=B()},m(t,s){n.m(t,s),k(t,e,s)},p(t,r){o!==(o=s(t))&&(n.d(1),n=o(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&$(e)}}}(t);let P=t[1].title&&he(t);const j=t[7].extra,V=u(j,t,t[6],ce),R=t[7]["close-icon"],T=u(R,t,t[6],ie),O=T||function(t){let e,s;return{c(){e=_("svg"),s=_("path"),E(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"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"class","bx--toast-notification__close-icon svelte-is9c7e"),E(e,"width","20"),E(e,"height","20"),E(e,"viewBox","0 0 32 32"),E(e,"aria-hidden","true")},m(t,o){k(t,e,o),x(e,s)},d(t){t&&$(e)}}}();let N=t[1].showProgress&&ve(t);return{c(){e=z("div"),H&&H.c(),s=S(),o=z("div"),P&&P.c(),n=S(),r=z("p"),l=M(w),c=S(),a=z("div"),V&&V.c(),d=S(),f=z("button"),O&&O.c(),g=S(),N&&N.c(),E(r,"class","st-toast-description svelte-is9c7e"),E(a,"class","st-toast-extra"),E(o,"class","st-toast-details svelte-is9c7e"),E(f,"class","st-toast-close-btn svelte-is9c7e"),E(f,"type","button"),E(f,"aria-label","close"),E(e,"class",h="st-toast flat "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-is9c7e"),E(e,"role","alert"),E(e,"aria-live","assertive"),E(e,"aria-atomic","true")},m(i,u){k(i,e,u),H&&H.m(e,null),x(e,s),x(e,o),P&&P.m(o,null),x(o,n),x(o,r),x(r,l),x(o,c),x(o,a),V&&V.m(a,null),x(e,d),x(e,f),O&&O.m(f,null),x(e,g),N&&N.m(e,null),v=!0,b||(m=[C(f,"click",t[4]),C(e,"click",t[5])],b=!0)},p(t,[s]){L?L.p&&64&s&&p(L,y,t,t[6],s,ae,de):H&&H.p&&2&s&&H.p(t,s),t[1].title?P?P.p(t,s):(P=he(t),P.c(),P.m(o,n)):P&&(P.d(1),P=null),(!v||2&s)&&w!==(w=t[1].description+"")&&A(l,w),V&&V.p&&64&s&&p(V,j,t,t[6],s,le,ce),T&&T.p&&64&s&&p(T,R,t,t[6],s,re,ie),t[1].showProgress?N?N.p(t,s):(N=ve(t),N.c(),N.m(e,null)):N&&(N.d(1),N=null),(!v||3&s&&h!==(h="st-toast flat "+(t[1].theme||t[0])+" "+(t[1].type||"info")+" svelte-is9c7e"))&&E(e,"class",h)},i(t){v||(it(H,t),it(V,t),it(O,t),v=!0)},o(t){lt(H,t),lt(V,t),lt(O,t),v=!1},d(t){t&&$(e),H&&H.d(t),P&&P.d(),V&&V.d(t),O&&O.d(t),N&&N.d(),b=!1,i(m)}}}function me(t,e,n){let r,{$$slots:i={},$$scope:l}=e,{theme:c="light"}=e,{data:a={}}=e;const d=function(t,e={}){const n=bt(t);let r,i=t;function l(l,c){if(null==t)return n.set(t=l),Promise.resolve();i=l;let a=r,d=!1,{delay:f=0,duration:u=400,easing:g=s,interpolate:p=ne}=o(o({},e),c);if(0===u)return a&&(a.abort(),a=null),n.set(t=i),Promise.resolve();const h=v()+f;let b;return r=y((e=>{if(e<h)return!0;d||(b=p(t,l),"function"==typeof u&&(u=u(t,l)),d=!0),a&&(a.abort(),a=null);const s=e-h;return s>u?(n.set(t=l),!1):(n.set(t=b(g(s/u))),!0)})),r.promise}return{set:l,update:(e,s)=>l(e(i,t),s),subscribe:n.subscribe}}(1,{duration:a.duration,easing:s});f(t,d,(t=>n(2,r=t))),Z((()=>{d.set(0,{duration:a.duration})}));return t.$$set=t=>{"theme"in t&&n(0,c=t.theme),"data"in t&&n(1,a=t.data),"$$scope"in t&&n(6,l=t.$$scope)},[c,a,r,d,t=>{t.stopPropagation(),a.remove(),"function"==typeof a.onRemove&&a.onRemove()},()=>{"function"==typeof a.onClick&&a.onClick()},l,i]}t.BootstrapToast=class extends ht{constructor(t){var e;super(),document.getElementById("svelte-1t011t6-style")||((e=z("style")).id="svelte-1t011t6-style",e.textContent=".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}",x(document.head,e)),pt(this,t,se,ee,c,{theme:0,data:1})}},t.FlatToast=class extends ht{constructor(t){var e;super(),document.getElementById("svelte-is9c7e-style")||((e=z("style")).id="svelte-is9c7e-style",e.textContent=".st-toast.svelte-is9c7e.svelte-is9c7e{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-is9c7e .st-toast-icon.svelte-is9c7e{flex-shrink:0;margin-right:0.875rem;margin-top:0.875rem}.st-toast.svelte-is9c7e progress[value].svelte-is9c7e{appearance:none;display:block;width:100%;position:absolute;bottom:0;left:0;right:0;height:4px}.st-toast.dark.svelte-is9c7e.svelte-is9c7e{color:#fff;background:#393939}.st-toast.dark.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-bar{background-color:#393939}.st-toast.dark.svelte-is9c7e .st-toast-close-btn svg.svelte-is9c7e{fill:#fff}.st-toast.dark.svelte-is9c7e .st-toast-close-btn.svelte-is9c7e:focus{border:solid 1px #fff}.st-toast.dark.success.svelte-is9c7e.svelte-is9c7e{border-left:3px solid rgb(22, 163, 74)}.st-toast.dark.success.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(22, 163, 74);color:#fff}.st-toast.dark.success.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(22, 163, 74)}.st-toast.dark.info.svelte-is9c7e.svelte-is9c7e{border-left:3px solid rgb(2, 132, 199)}.st-toast.dark.info.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(2, 132, 199);color:#fff}.st-toast.dark.info.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(2, 132, 199)}.st-toast.dark.error.svelte-is9c7e.svelte-is9c7e{border-left:3px solid rgb(225, 29, 72)}.st-toast.dark.error.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(225, 29, 72);color:#fff}.st-toast.dark.error.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(225, 29, 72)}.st-toast.dark.warning.svelte-is9c7e.svelte-is9c7e{border-left:3px solid rgb(202, 138, 4)}.st-toast.dark.warning.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(202, 138, 4);color:#fff}.st-toast.dark.warning.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(202, 138, 4)}.st-toast.light.svelte-is9c7e.svelte-is9c7e{color:#161616;fill:#161616}.st-toast.light.success.svelte-is9c7e.svelte-is9c7e{border-left:3px solid rgb(22, 163, 74);background:rgba(22, 163, 74, 0.2)}.st-toast.light.success.svelte-is9c7e progress.svelte-is9c7e{background:rgba(22, 163, 74, 0.2)}.st-toast.light.success.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-bar{background-color:transparent}.st-toast.light.success.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(22, 163, 74)}.st-toast.light.success.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(22, 163, 74)}.st-toast.light.success.svelte-is9c7e .st-toast-close-btn.svelte-is9c7e:focus{border:solid 1px rgb(22, 163, 74)}.st-toast.light.success.svelte-is9c7e.svelte-is9c7e::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-is9c7e.svelte-is9c7e{border-left:3px solid rgb(2, 132, 199);background:rgba(2, 132, 199, 0.2)}.st-toast.light.info.svelte-is9c7e progress.svelte-is9c7e{background:rgba(2, 132, 199, 0.2)}.st-toast.light.info.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-bar{background-color:transparent}.st-toast.light.info.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(2, 132, 199)}.st-toast.light.info.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(2, 132, 199)}.st-toast.light.info.svelte-is9c7e .st-toast-close-btn.svelte-is9c7e:focus{border:solid 1px rgb(2, 132, 199)}.st-toast.light.info.svelte-is9c7e.svelte-is9c7e::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-is9c7e.svelte-is9c7e{border-left:3px solid rgb(225, 29, 72);background:rgba(225, 29, 72, 0.2)}.st-toast.light.error.svelte-is9c7e progress.svelte-is9c7e{background:rgba(225, 29, 72, 0.2)}.st-toast.light.error.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-bar{background-color:transparent}.st-toast.light.error.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(225, 29, 72)}.st-toast.light.error.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(225, 29, 72)}.st-toast.light.error.svelte-is9c7e .st-toast-close-btn.svelte-is9c7e:focus{border:solid 1px rgb(225, 29, 72)}.st-toast.light.error.svelte-is9c7e.svelte-is9c7e::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-is9c7e.svelte-is9c7e{border-left:3px solid rgb(202, 138, 4);background:rgba(202, 138, 4, 0.2)}.st-toast.light.warning.svelte-is9c7e progress.svelte-is9c7e{background:rgba(202, 138, 4, 0.2)}.st-toast.light.warning.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-bar{background-color:transparent}.st-toast.light.warning.svelte-is9c7e progress[value].svelte-is9c7e::-webkit-progress-value{background-color:rgb(202, 138, 4)}.st-toast.light.warning.svelte-is9c7e .st-toast-icon.svelte-is9c7e{fill:rgb(202, 138, 4)}.st-toast.light.warning.svelte-is9c7e .st-toast-close-btn.svelte-is9c7e:focus{border:solid 1px rgb(202, 138, 4)}.st-toast.light.warning.svelte-is9c7e.svelte-is9c7e::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-is9c7e.svelte-is9c7e{margin-top:0.875rem;margin-right:1rem;text-align:left;align-self:flex-start}.st-toast-details.svelte-is9c7e .st-toast-title.svelte-is9c7e{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-is9c7e .st-toast-description.svelte-is9c7e{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-is9c7e.svelte-is9c7e{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, background-color 110ms}",x(document.head,e)),pt(this,t,me,be,c,{theme:0,data:1})}},t.ToastContainer=class extends ht{constructor(t){var e;super(),document.getElementById("svelte-1rg6zyw-style")||((e=z("style")).id="svelte-1rg6zyw-style",e.textContent="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}",x(document.head,e)),pt(this,t,Ht,Lt,c,{theme:5,placement:1,type:6,showProgress:7,duration:8,width:0})}},t.toasts=mt,Object.defineProperty(t,"__esModule",{value:!0})}));