Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alex_revin/svelte-toast

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alex_revin/svelte-toast - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

dist/index.js

@@ -1,1 +0,1 @@

!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).window=t.window||{})}(this,(function(t){"use strict";function e(){}const n=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function s(){return Object.create(null)}function i(t){t.forEach(r)}function l(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,n,o){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const u="undefined"!=typeof window;let f=u?()=>window.performance.now():()=>Date.now(),d=u?t=>requestAnimationFrame(t):e;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function m(t){let e;return 0===p.size&&d(h),{promise:new Promise((n=>{p.add(e={c:t,f:n})})),abort(){p.delete(e)}}}let g=!1;function v(t,e,n,o){for(;t<e;){const r=t+(e-t>>1);n(r)<=o?t=r+1:e=r}return t}function y(t,e){g?(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;const e=t.childNodes,n=new Int32Array(e.length+1),o=new Int32Array(e.length);n[0]=-1;let r=0;for(let t=0;t<e.length;t++){const s=v(1,r+1,(t=>e[n[t]].claim_order),e[t].claim_order)-1;o[t]=n[s]+1;const i=s+1;n[i]=t,r=Math.max(i,r)}const s=[],i=[];let l=e.length-1;for(let t=n[r]+1;0!=t;t=o[t-1]){for(s.push(e[t-1]);l>=t;l--)i.push(e[l]);l--}for(;l>=0;l--)i.push(e[l]);s.reverse(),i.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<i.length;e++){for(;n<s.length&&i[e].claim_order>=s[n].claim_order;)n++;const o=n<s.length?s[n]:null;t.insertBefore(i[e],o)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild),e!==t.actual_end_child?t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling):e.parentNode!==t&&t.appendChild(e)}function $(t,e,n){g&&!n?y(t,e):(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function w(t){return document.createTextNode(t)}function x(){return w(" ")}function k(){return w("")}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}class E{constructor(t){this.e=this.n=null,this.l=t}m(t,e,n=null){this.e||(this.e=_(e.nodeName),this.t=e,this.l?this.n=this.l:this.h(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)$(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(b)}}const B=new Set;let z,M=0;function S(t,e,n,o,r,s,i,l=0){const a=16.666/o;let c="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*s(t);c+=100*t+`%{${i(o,1-o)}}\n`}const u=c+`100% {${i(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,d=t.ownerDocument;B.add(d);const p=d.__svelte_stylesheet||(d.__svelte_stylesheet=d.head.appendChild(_("style")).sheet),h=d.__svelte_rules||(d.__svelte_rules={});h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${f} ${o}ms linear ${r}ms 1 both`,M+=1,f}function A(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),M-=r,M||d((()=>{M||(B.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),B.clear())})))}function j(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}function O(t){z=t}const R=[],I=[],N=[],P=[],T=Promise.resolve();let q=!1;function D(t){N.push(t)}let F=!1;const H=new Set;function L(){if(!F){F=!0;do{for(let t=0;t<R.length;t+=1){const e=R[t];O(e),W(e.$$)}for(O(null),R.length=0;I.length;)I.pop()();for(let t=0;t<N.length;t+=1){const e=N[t];H.has(e)||(H.add(e),e())}N.length=0}while(R.length);for(;P.length;)P.pop()();q=!1,F=!1,H.clear()}}function W(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(D)}}let G;function J(){return G||(G=Promise.resolve(),G.then((()=>{G=null}))),G}function K(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Q=new Set;let U;function V(){U={r:0,c:[],p:U}}function X(){U.r||i(U.c),U=U.p}function Y(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function Z(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const tt={duration:0};function et(t,e){t.f(),function(t,e){Z(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function nt(t){t&&t.c()}function ot(t,e,n,o){const{fragment:s,on_mount:a,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,n),o||D((()=>{const e=a.map(r).filter(l);c?c.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(D)}function rt(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(R.push(t),q||(q=!0,T.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,n,o,r,l,a,c=[-1]){const u=z;O(t);const f=t.$$={fragment:null,ctx:null,props:a,update:e,not_equal:l,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:n.context||[]),callbacks:s(),dirty:c,skip_bound:!1};let d=!1;if(f.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return f.ctx&&l(f.ctx[e],f.ctx[e]=r)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](r),d&&st(t,e)),n})):[],f.update(),d=!0,i(f.before_update),f.fragment=!!r&&r(f.ctx),n.target){if(n.hydrate){g=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach(b)}else f.fragment&&f.fragment.c();n.intro&&Y(t.$$.fragment),ot(t,n.target,n.anchor,n.customElement),g=!1,L()}O(u)}class lt{$destroy(){rt(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.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)}}function at(t){const e=t-1;return e*e*e+1}function ct(t,{delay:e=0,duration:o=400,easing:r=n}={}){const s=+getComputedStyle(t).opacity;return{delay:e,duration:o,easing:r,css:t=>"opacity: "+t*s}}function ut(t,{delay:e=0,duration:n=400,easing:o=at,x:r=0,y:s=0,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,c="none"===l.transform?"":l.transform,u=a*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${a-u*e}`}}function ft(t,e,n={}){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform,s=e.from.width/t.clientWidth,i=e.from.height/t.clientHeight,a=(e.from.left-e.to.left)/s,c=(e.from.top-e.to.top)/i,u=Math.sqrt(a*a+c*c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=at}=n;return{delay:f,duration:l(d)?d(u):d,easing:p,css:(t,e)=>`transform: ${r} translate(${e*a}px, ${e*c}px);`}}const dt=[];function pt(t,n=e){let o;const r=[];function s(e){if(a(t,e)&&(t=e,o)){const e=!dt.length;for(let e=0;e<r.length;e+=1){const n=r[e];n[1](),dt.push(n,t)}if(e){for(let t=0;t<dt.length;t+=2)dt[t][0](dt[t+1]);dt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,l=e){const a=[i,l];return r.push(a),1===r.length&&(o=n(s)||e),i(t),()=>{const t=r.indexOf(a);-1!==t&&r.splice(t,1),0===r.length&&(o(),o=null)}}}}const ht=(()=>{const{subscribe:t,update:e}=pt([]);let n=0,o={};return{subscribe:t,push:(t,r={},s={})=>{let i,l;"string"==typeof t?i=t:l=t;const a={msg:i,component:l,props:s,id:++n,...o,...r,theme:{...o.theme,...r.theme}};return e((t=>a.reversed?[...t,a]:[a,...t])),n},pop:t=>{e((e=>t?e.filter((e=>e.id!==t)):e.splice(1)))},set:(t,n)=>{e((e=>{const o=e.findIndex((e=>e.id===t));return o>-1&&(e[o]={...e[o],...n}),e}))},_opts:(t={})=>(o={...o,...t,theme:{...o.theme,...t.theme}},o)}})();function mt(t){return"[object Date]"===Object.prototype.toString.call(t)}function gt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>gt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(mt(t)&&mt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=gt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function vt(t){let n,o,r=t[0].msg+"";return{c(){n=new E,o=k(),n.a=o},m(t,e){n.m(r,t,e),$(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&b(o),t&&n.d()}}}function yt(t){let e,n,r;const s=[(t[0].props,{toastId:t[0].id})];var i=t[0].component;function l(t){let e={};for(let t=0;t<s.length;t+=1)e=o(e,s[t]);return{props:e}}return i&&(e=new i(l())),{c(){e&&nt(e.$$.fragment),n=k()},m(t,o){e&&ot(e,t,o),$(t,n,o),r=!0},p(t,o){const r=1&o?function(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const i=t[s],l=e[s];if(l){for(const t in i)t in l||(o[t]=1);for(const t in l)r[t]||(n[t]=l[t],r[t]=1);t[s]=l}else for(const t in i)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(s,[(t[0].props,a={toastId:t[0].id},"object"==typeof a&&null!==a?a:{})]):{};var a;if(i!==(i=t[0].component)){if(e){V();const t=e;Z(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}i?(e=new i(l()),nt(e.$$.fragment),Y(e.$$.fragment,1),ot(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&Y(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&b(n),e&&rt(e,t)}}}function $t(t){let n,o,r;return{c(){n=_("div"),n.textContent="✕",C(n,"class","_toastBtn svelte-1r0vvz1"),C(n,"role","button"),C(n,"tabindex","-1")},m(e,s){var i,l,a,c;$(e,n,s),o||(i=n,l="click",a=t[4],i.addEventListener(l,a,c),r=()=>i.removeEventListener(l,a,c),o=!0)},p:e,d(t){t&&b(n),o=!1,r()}}}function bt(t){let e,n,o,r,s,i,l,a;const c=[yt,vt],u=[];function f(t,e){return t[0].component?0:1}o=f(t),r=u[o]=c[o](t);let d=t[0].dismissable&&$t(t);return{c(){e=_("div"),n=_("div"),r.c(),s=x(),d&&d.c(),i=x(),l=_("progress"),C(n,"class","_toastMsg svelte-1r0vvz1"),C(l,"class","_toastBar svelte-1r0vvz1"),l.value=t[1],C(e,"class","_toastItem svelte-1r0vvz1")},m(t,r){$(t,e,r),y(e,n),u[o].m(n,null),y(e,s),d&&d.m(e,null),y(e,i),y(e,l),a=!0},p(t,[s]){let p=o;o=f(t),o===p?u[o].p(t,s):(V(),Z(u[p],1,1,(()=>{u[p]=null})),X(),r=u[o],r?r.p(t,s):(r=u[o]=c[o](t),r.c()),Y(r,1),r.m(n,null)),t[0].dismissable?d?d.p(t,s):(d=$t(t),d.c(),d.m(e,i)):d&&(d.d(1),d=null),(!a||2&s)&&(l.value=t[1])},i(t){a||(Y(r),a=!0)},o(t){Z(r),a=!1},d(t){t&&b(e),u[o].d(),d&&d.d()}}}function _t(t,e,r){let s,{item:i}=e;const l=function(t,e={}){const r=pt(t);let s,i=t;function l(l,a){if(null==t)return r.set(t=l),Promise.resolve();i=l;let c=s,u=!1,{delay:d=0,duration:p=400,easing:h=n,interpolate:g=gt}=o(o({},e),a);if(0===p)return c&&(c.abort(),c=null),r.set(t=i),Promise.resolve();const v=f()+d;let y;return s=m((e=>{if(e<v)return!0;u||(y=g(t,l),"function"==typeof p&&(p=p(t,l)),u=!0),c&&(c.abort(),c=null);const n=e-v;return n>p?(r.set(t=l),!1):(r.set(t=y(h(n/p))),!0)})),s.promise}return{set:l,update:(e,n)=>l(e(i,t),n),subscribe:r.subscribe}}(i.initial,{duration:i.duration,easing:n});c(t,l,(t=>r(1,s=t)));let a=i.initial;return t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{9&t.$$.dirty&&a!==i.progress&&(1===i.progress||0===i.progress?l.set(i.progress).then((()=>ht.pop(i.id))):l.set(i.progress),r(3,a=i.progress))},[i,s,l,a,()=>ht.pop(i.id)]}class wt extends lt{constructor(t){var e;super(),document.getElementById("svelte-1r0vvz1-style")||((e=_("style")).id="svelte-1r0vvz1-style",e.textContent="._toastItem.svelte-1r0vvz1{width:var(--toastWidth,16rem);height:var(--toastHeight,auto);min-height:var(--toastMinHeight,3.5rem);margin:var(--toastMargin,0 0 0.5rem 0);background:var(--toastBackground,rgba(66,66,66,0.9));color:var(--toastColor,#FFF);box-shadow:var(--toastBoxShadow,0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06));border-radius:var(--toastBorderRadius,0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;will-change:transform,opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-1r0vvz1{padding:var(--toastMsgPadding,0.75rem 0.5rem);flex:1 1 0%}._toastMsg.svelte-1r0vvz1 a{pointer-events:auto}._toastBtn.svelte-1r0vvz1{width:2rem;height:100%;font:1rem sans-serif;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;pointer-events:auto}._toastBar.svelte-1r0vvz1{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;position:absolute;bottom:0;width:100%;height:6px;background:transparent}._toastBar.svelte-1r0vvz1::-webkit-progress-bar{background:transparent}._toastBar.svelte-1r0vvz1::-webkit-progress-value{background:var(--toastProgressBackground,rgba(33,150,243,0.75))}._toastBar.svelte-1r0vvz1::-moz-progress-bar{background:var(--toastProgressBackground,rgba(33,150,243,0.75))}",y(document.head,e)),it(this,t,_t,bt,a,{item:0})}}function xt(t,e,n){const o=t.slice();return o[4]=e[n],o}function kt(t,o){let r,s,a,c,u,d,p,h,g=e;return s=new wt({props:{item:o[4]}}),{key:t,first:null,c(){r=_("li"),nt(s.$$.fragment),a=x(),C(r,"style",c=o[1](o[4].theme)),this.first=r},m(t,e){$(t,r,e),ot(s,r,null),y(r,a),h=!0},p(t,e){o=t;const n={};1&e&&(n.item=o[4]),s.$set(n),(!h||1&e&&c!==(c=o[1](o[4].theme)))&&C(r,"style",c)},r(){p=r.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,j(t,r)}}(r),g(),j(r,p)},a(){g(),g=function(t,o,r,s){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:a=300,easing:c=n,start:u=f()+l,end:d=u+a,tick:p=e,css:h}=r(t,{from:o,to:i},s);let g,v=!0,y=!1;function $(){h&&A(t,g),v=!1}return m((t=>{if(!y&&t>=u&&(y=!0),y&&t>=d&&(p(1,0),$()),!v)return!1;if(y){const e=0+1*c((t-u)/a);p(e,1-e)}return!0})),h&&(g=S(t,0,1,a,l,c,h)),l||(y=!0),p(0,1),$}(r,p,ft,{duration:200})},i(t){h||(Y(s.$$.fragment,t),D((()=>{d&&d.end(1),u||(u=function(t,o,r){let s,i,a=o(t,r),c=!1,u=0;function d(){s&&A(t,s)}function p(){const{delay:o=0,duration:r=300,easing:l=n,tick:p=e,css:h}=a||tt;h&&(s=S(t,0,1,r,o,l,h,u++)),p(0,1);const g=f()+o,v=g+r;i&&i.abort(),c=!0,D((()=>K(t,!0,"start"))),i=m((e=>{if(c){if(e>=v)return p(1,0),K(t,!0,"end"),d(),c=!1;if(e>=g){const t=l((e-g)/r);p(t,1-t)}}return c}))}let h=!1;return{start(){h||(A(t),l(a)?(a=a(),J().then(p)):p())},invalidate(){h=!1},end(){c&&(d(),c=!1)}}}(r,ut,o[4].intro)),u.start()})),h=!0)},o(t){Z(s.$$.fragment,t),u&&u.invalidate(),d=function(t,o,r){let s,a=o(t,r),c=!0;const u=U;function d(){const{delay:o=0,duration:r=300,easing:l=n,tick:d=e,css:p}=a||tt;p&&(s=S(t,1,0,r,o,l,p));const h=f()+o,g=h+r;D((()=>K(t,!1,"start"))),m((e=>{if(c){if(e>=g)return d(0,1),K(t,!1,"end"),--u.r||i(u.c),!1;if(e>=h){const t=l((e-h)/r);d(1-t,t)}}return c}))}return u.r+=1,l(a)?J().then((()=>{a=a(),d()})):d(),{end(e){e&&a.tick&&a.tick(1,0),c&&(s&&A(t,s),c=!1)}}}(r,ct,{}),h=!1},d(t){t&&b(r),rt(s),t&&d&&d.end()}}}function Ct(t){let e,n,o=[],r=new Map,s=t[0];const i=t=>t[4].id;for(let e=0;e<s.length;e+=1){let n=xt(t,s,e),l=i(n);r.set(l,o[e]=kt(l,n))}return{c(){e=_("ul");for(let t=0;t<o.length;t+=1)o[t].c();C(e,"class","_toastContainer svelte-1wt6bln")},m(t,r){$(t,e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,[n]){if(3&n){s=t[0],V();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,l,a,c,u,f){let d=t.length,p=s.length,h=d;const m={};for(;h--;)m[t[h].key]=h;const g=[],v=new Map,y=new Map;for(h=p;h--;){const t=f(r,s,h),l=n(t);let a=i.get(l);a?o&&a.p(t,e):(a=c(l,t),a.c()),v.set(l,g[h]=a),l in m&&y.set(l,Math.abs(h-m[l]))}const $=new Set,b=new Set;function _(t){Y(t,1),t.m(l,u),i.set(t.key,t),u=t.first,p--}for(;d&&p;){const e=g[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(u=e.first,d--,p--):v.has(r)?!i.has(o)||$.has(o)?_(e):b.has(r)?d--:y.get(o)>y.get(r)?(b.add(o),_(e)):($.add(r),d--):(a(n,i),d--)}for(;d--;){const e=t[d];v.has(e.key)||a(e,i)}for(;p;)_(g[p-1]);return g}(o,n,i,1,t,s,r,e,et,kt,null,xt);for(let t=0;t<o.length;t+=1)o[t].a();X()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Y(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)Z(o[t]);n=!1},d(t){t&&b(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Et(t,e,n){let o;c(t,ht,(t=>n(0,o=t)));let{options:r={}}=e;ht._opts({duration:4e3,dismissable:!0,initial:1,progress:0,reversed:!1,intro:{x:256},theme:{}});return t.$$set=t=>{"options"in t&&n(2,r=t.options)},t.$$.update=()=>{4&t.$$.dirty&&ht._opts(r)},[o,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),r]}t.SvelteToast=class extends lt{constructor(t){var e;super(),document.getElementById("svelte-1wt6bln-style")||((e=_("style")).id="svelte-1wt6bln-style",e.textContent="ul.svelte-1wt6bln{top:var(--toastContainerTop,1.5rem);right:var(--toastContainerRight,2rem);bottom:var(--toastContainerBottom,auto);left:var(--toastContainerLeft,auto);position:fixed;margin:0;padding:0;list-style-type:none;pointer-events:none;z-index:9999}",y(document.head,e)),it(this,t,Et,Ct,a,{options:2})}},t.toast=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
!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).window=t.window||{})}(this,(function(t){"use strict";function e(){}const n=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function s(){return Object.create(null)}function i(t){t.forEach(r)}function a(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,n,o){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const u="undefined"!=typeof window;let f=u?()=>window.performance.now():()=>Date.now(),d=u?t=>requestAnimationFrame(t):e;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function m(t){let e;return 0===p.size&&d(h),{promise:new Promise((n=>{p.add(e={c:t,f:n})})),abort(){p.delete(e)}}}let g=!1;function v(t,e,n,o){for(;t<e;){const r=t+(e-t>>1);n(r)<=o?t=r+1:e=r}return t}function y(t,e){g?(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;const e=t.childNodes,n=new Int32Array(e.length+1),o=new Int32Array(e.length);n[0]=-1;let r=0;for(let t=0;t<e.length;t++){const s=v(1,r+1,(t=>e[n[t]].claim_order),e[t].claim_order)-1;o[t]=n[s]+1;const i=s+1;n[i]=t,r=Math.max(i,r)}const s=[],i=[];let a=e.length-1;for(let t=n[r]+1;0!=t;t=o[t-1]){for(s.push(e[t-1]);a>=t;a--)i.push(e[a]);a--}for(;a>=0;a--)i.push(e[a]);s.reverse(),i.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<i.length;e++){for(;n<s.length&&i[e].claim_order>=s[n].claim_order;)n++;const o=n<s.length?s[n]:null;t.insertBefore(i[e],o)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild),e!==t.actual_end_child?t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling):e.parentNode!==t&&t.appendChild(e)}function $(t,e,n){g&&!n?y(t,e):(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function w(){return x(" ")}function k(){return x("")}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}class E{constructor(t){this.e=this.n=null,this.l=t}m(t,e,n=null){this.e||(this.e=_(e.nodeName),this.t=e,this.l?this.n=this.l:this.h(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)$(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(b)}}const B=new Set;let z,M=0;function S(t,e,n,o,r,s,i,a=0){const l=16.666/o;let c="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*s(t);c+=100*t+`%{${i(o,1-o)}}\n`}const u=c+`100% {${i(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${a}`,d=t.ownerDocument;B.add(d);const p=d.__svelte_stylesheet||(d.__svelte_stylesheet=d.head.appendChild(_("style")).sheet),h=d.__svelte_rules||(d.__svelte_rules={});h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${f} ${o}ms linear ${r}ms 1 both`,M+=1,f}function j(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),M-=r,M||d((()=>{M||(B.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),B.clear())})))}function A(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}function O(t){z=t}const T=[],R=[],I=[],N=[],P=Promise.resolve();let q=!1;function D(t){I.push(t)}let F=!1;const H=new Set;function L(){if(!F){F=!0;do{for(let t=0;t<T.length;t+=1){const e=T[t];O(e),W(e.$$)}for(O(null),T.length=0;R.length;)R.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];H.has(e)||(H.add(e),e())}I.length=0}while(T.length);for(;N.length;)N.pop()();q=!1,F=!1,H.clear()}}function W(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(D)}}let G;function J(){return G||(G=Promise.resolve(),G.then((()=>{G=null}))),G}function K(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Q=new Set;let U;function V(){U={r:0,c:[],p:U}}function X(){U.r||i(U.c),U=U.p}function Y(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function Z(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const tt={duration:0};function et(t,e){t.f(),function(t,e){Z(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function nt(t){t&&t.c()}function ot(t,e,n,o){const{fragment:s,on_mount:l,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,n),o||D((()=>{const e=l.map(r).filter(a);c?c.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(D)}function rt(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(T.push(t),q||(q=!0,P.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,n,o,r,a,l,c=[-1]){const u=z;O(t);const f=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:n.context||[]),callbacks:s(),dirty:c,skip_bound:!1};let d=!1;if(f.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return f.ctx&&a(f.ctx[e],f.ctx[e]=r)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](r),d&&st(t,e)),n})):[],f.update(),d=!0,i(f.before_update),f.fragment=!!r&&r(f.ctx),n.target){if(n.hydrate){g=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach(b)}else f.fragment&&f.fragment.c();n.intro&&Y(t.$$.fragment),ot(t,n.target,n.anchor,n.customElement),g=!1,L()}O(u)}class at{$destroy(){rt(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.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)}}function lt(t){const e=t-1;return e*e*e+1}function ct(t,{delay:e=0,duration:o=400,easing:r=n}={}){const s=+getComputedStyle(t).opacity;return{delay:e,duration:o,easing:r,css:t=>"opacity: "+t*s}}function ut(t,{delay:e=0,duration:n=400,easing:o=lt,x:r=0,y:s=0,opacity:i=0}={}){const a=getComputedStyle(t),l=+a.opacity,c="none"===a.transform?"":a.transform,u=l*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${l-u*e}`}}function ft(t,e,n={}){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform,s=e.from.width/t.clientWidth,i=e.from.height/t.clientHeight,l=(e.from.left-e.to.left)/s,c=(e.from.top-e.to.top)/i,u=Math.sqrt(l*l+c*c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=lt}=n;return{delay:f,duration:a(d)?d(u):d,easing:p,css:(t,e)=>`transform: ${r} translate(${e*l}px, ${e*c}px);`}}const dt=[];function pt(t,n=e){let o;const r=[];function s(e){if(l(t,e)&&(t=e,o)){const e=!dt.length;for(let e=0;e<r.length;e+=1){const n=r[e];n[1](),dt.push(n,t)}if(e){for(let t=0;t<dt.length;t+=2)dt[t][0](dt[t+1]);dt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,a=e){const l=[i,a];return r.push(l),1===r.length&&(o=n(s)||e),i(t),()=>{const t=r.indexOf(l);-1!==t&&r.splice(t,1),0===r.length&&(o(),o=null)}}}}const ht=(()=>{const{subscribe:t,update:e}=pt([]);let n=0,o={};return{subscribe:t,push:(t,r={},s={})=>{let i,a;"string"==typeof t?i=t:a=t;const l={msg:i,component:a,props:s,id:++n,...o,...r,theme:{...o.theme,...r.theme}};return e((t=>l.reversed?[...t,l]:[l,...t])),n},pop:t=>{e((e=>t?e.filter((e=>e.id!==t)):e.splice(1)))},set:(t,n)=>{e((e=>{const o=e.findIndex((e=>e.id===t));return o>-1&&(e[o]={...e[o],...n}),e}))},_opts:(t={})=>(o={...o,...t,theme:{...o.theme,...t.theme}},o)}})();function mt(t){return"[object Date]"===Object.prototype.toString.call(t)}function gt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>gt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(mt(t)&&mt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=gt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function vt(t){let n,o,r=t[0].msg+"";return{c(){n=new E,o=k(),n.a=o},m(t,e){n.m(r,t,e),$(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&b(o),t&&n.d()}}}function yt(t){let e,n,r;const s=[t[0].props,{toastId:t[0].id}];var i=t[0].component;function a(t){let e={};for(let t=0;t<s.length;t+=1)e=o(e,s[t]);return{props:e}}return i&&(e=new i(a())),{c(){e&&nt(e.$$.fragment),n=k()},m(t,o){e&&ot(e,t,o),$(t,n,o),r=!0},p(t,o){const r=1&o?function(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const i=t[s],a=e[s];if(a){for(const t in i)t in a||(o[t]=1);for(const t in a)r[t]||(n[t]=a[t],r[t]=1);t[s]=a}else for(const t in i)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(s,[(l=t[0].props,"object"==typeof l&&null!==l?l:{}),{toastId:t[0].id}]):{};var l;if(i!==(i=t[0].component)){if(e){V();const t=e;Z(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}i?(e=new i(a()),nt(e.$$.fragment),Y(e.$$.fragment,1),ot(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&Y(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&b(n),e&&rt(e,t)}}}function $t(t){let n,o,r;return{c(){n=_("div"),n.textContent="✕",C(n,"class","_toastBtn svelte-1r0vvz1"),C(n,"role","button"),C(n,"tabindex","-1")},m(e,s){var i,a,l,c;$(e,n,s),o||(i=n,a="click",l=t[4],i.addEventListener(a,l,c),r=()=>i.removeEventListener(a,l,c),o=!0)},p:e,d(t){t&&b(n),o=!1,r()}}}function bt(t){let e,n,o,r,s,i,a,l;const c=[yt,vt],u=[];function f(t,e){return t[0].component?0:1}o=f(t),r=u[o]=c[o](t);let d=t[0].dismissable&&$t(t);return{c(){e=_("div"),n=_("div"),r.c(),s=w(),d&&d.c(),i=w(),a=_("progress"),C(n,"class","_toastMsg svelte-1r0vvz1"),C(a,"class","_toastBar svelte-1r0vvz1"),a.value=t[1],C(e,"class","_toastItem svelte-1r0vvz1")},m(t,r){$(t,e,r),y(e,n),u[o].m(n,null),y(e,s),d&&d.m(e,null),y(e,i),y(e,a),l=!0},p(t,[s]){let p=o;o=f(t),o===p?u[o].p(t,s):(V(),Z(u[p],1,1,(()=>{u[p]=null})),X(),r=u[o],r?r.p(t,s):(r=u[o]=c[o](t),r.c()),Y(r,1),r.m(n,null)),t[0].dismissable?d?d.p(t,s):(d=$t(t),d.c(),d.m(e,i)):d&&(d.d(1),d=null),(!l||2&s)&&(a.value=t[1])},i(t){l||(Y(r),l=!0)},o(t){Z(r),l=!1},d(t){t&&b(e),u[o].d(),d&&d.d()}}}function _t(t,e,r){let s,{item:i}=e;const a=function(t,e={}){const r=pt(t);let s,i=t;function a(a,l){if(null==t)return r.set(t=a),Promise.resolve();i=a;let c=s,u=!1,{delay:d=0,duration:p=400,easing:h=n,interpolate:g=gt}=o(o({},e),l);if(0===p)return c&&(c.abort(),c=null),r.set(t=i),Promise.resolve();const v=f()+d;let y;return s=m((e=>{if(e<v)return!0;u||(y=g(t,a),"function"==typeof p&&(p=p(t,a)),u=!0),c&&(c.abort(),c=null);const n=e-v;return n>p?(r.set(t=a),!1):(r.set(t=y(h(n/p))),!0)})),s.promise}return{set:a,update:(e,n)=>a(e(i,t),n),subscribe:r.subscribe}}(i.initial,{duration:i.duration,easing:n});c(t,a,(t=>r(1,s=t)));let l=i.initial;return t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{9&t.$$.dirty&&l!==i.progress&&(1===i.progress||0===i.progress?a.set(i.progress).then((()=>ht.pop(i.id))):a.set(i.progress),r(3,l=i.progress))},[i,s,a,l,()=>ht.pop(i.id)]}class xt extends at{constructor(t){var e;super(),document.getElementById("svelte-1r0vvz1-style")||((e=_("style")).id="svelte-1r0vvz1-style",e.textContent="._toastItem.svelte-1r0vvz1{width:var(--toastWidth,16rem);height:var(--toastHeight,auto);min-height:var(--toastMinHeight,3.5rem);margin:var(--toastMargin,0 0 0.5rem 0);background:var(--toastBackground,rgba(66,66,66,0.9));color:var(--toastColor,#FFF);box-shadow:var(--toastBoxShadow,0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06));border-radius:var(--toastBorderRadius,0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;will-change:transform,opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-1r0vvz1{padding:var(--toastMsgPadding,0.75rem 0.5rem);flex:1 1 0%}._toastMsg.svelte-1r0vvz1 a{pointer-events:auto}._toastBtn.svelte-1r0vvz1{width:2rem;height:100%;font:1rem sans-serif;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;pointer-events:auto}._toastBar.svelte-1r0vvz1{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;position:absolute;bottom:0;width:100%;height:6px;background:transparent}._toastBar.svelte-1r0vvz1::-webkit-progress-bar{background:transparent}._toastBar.svelte-1r0vvz1::-webkit-progress-value{background:var(--toastProgressBackground,rgba(33,150,243,0.75))}._toastBar.svelte-1r0vvz1::-moz-progress-bar{background:var(--toastProgressBackground,rgba(33,150,243,0.75))}",y(document.head,e)),it(this,t,_t,bt,l,{item:0})}}function wt(t,e,n){const o=t.slice();return o[8]=e[n],o}function kt(t,o){let r,s,l,c,u,d,p,h,g=e;return s=new xt({props:{item:o[8]}}),{key:t,first:null,c(){r=_("li"),nt(s.$$.fragment),l=w(),C(r,"style",c=o[2](o[8].theme)),this.first=r},m(t,e){$(t,r,e),ot(s,r,null),y(r,l),h=!0},p(t,e){o=t;const n={};3&e&&(n.item=o[8]),s.$set(n),(!h||3&e&&c!==(c=o[2](o[8].theme)))&&C(r,"style",c)},r(){p=r.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,A(t,r)}}(r),g(),A(r,p)},a(){g(),g=function(t,o,r,s){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:a=0,duration:l=300,easing:c=n,start:u=f()+a,end:d=u+l,tick:p=e,css:h}=r(t,{from:o,to:i},s);let g,v=!0,y=!1;function $(){h&&j(t,g),v=!1}return m((t=>{if(!y&&t>=u&&(y=!0),y&&t>=d&&(p(1,0),$()),!v)return!1;if(y){const e=0+1*c((t-u)/l);p(e,1-e)}return!0})),h&&(g=S(t,0,1,l,a,c,h)),a||(y=!0),p(0,1),$}(r,p,ft,{duration:200})},i(t){h||(Y(s.$$.fragment,t),D((()=>{d&&d.end(1),u||(u=function(t,o,r){let s,i,l=o(t,r),c=!1,u=0;function d(){s&&j(t,s)}function p(){const{delay:o=0,duration:r=300,easing:a=n,tick:p=e,css:h}=l||tt;h&&(s=S(t,0,1,r,o,a,h,u++)),p(0,1);const g=f()+o,v=g+r;i&&i.abort(),c=!0,D((()=>K(t,!0,"start"))),i=m((e=>{if(c){if(e>=v)return p(1,0),K(t,!0,"end"),d(),c=!1;if(e>=g){const t=a((e-g)/r);p(t,1-t)}}return c}))}let h=!1;return{start(){h||(j(t),a(l)?(l=l(),J().then(p)):p())},invalidate(){h=!1},end(){c&&(d(),c=!1)}}}(r,ut,o[8].intro)),u.start()})),h=!0)},o(t){Z(s.$$.fragment,t),u&&u.invalidate(),d=function(t,o,r){let s,l=o(t,r),c=!0;const u=U;function d(){const{delay:o=0,duration:r=300,easing:a=n,tick:d=e,css:p}=l||tt;p&&(s=S(t,1,0,r,o,a,p));const h=f()+o,g=h+r;D((()=>K(t,!1,"start"))),m((e=>{if(c){if(e>=g)return d(0,1),K(t,!1,"end"),--u.r||i(u.c),!1;if(e>=h){const t=a((e-h)/r);d(1-t,t)}}return c}))}return u.r+=1,a(l)?J().then((()=>{l=l(),d()})):d(),{end(e){e&&l.tick&&l.tick(1,0),c&&(s&&j(t,s),c=!1)}}}(r,ct,{}),h=!1},d(t){t&&b(r),rt(s),t&&d&&d.end()}}}function Ct(t){let e,n,o=[],r=new Map,s=t[1].filter(t[6]);const i=t=>t[8].id;for(let e=0;e<s.length;e+=1){let n=wt(t,s,e),a=i(n);r.set(a,o[e]=kt(a,n))}return{c(){e=_("ul");for(let t=0;t<o.length;t+=1)o[t].c();C(e,"class","_toastContainer svelte-2vhy5c"),C(e,"style",t[3]())},m(t,r){$(t,e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,[n]){if(7&n){s=t[1].filter(t[6]),V();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,a,l,c,u,f){let d=t.length,p=s.length,h=d;const m={};for(;h--;)m[t[h].key]=h;const g=[],v=new Map,y=new Map;for(h=p;h--;){const t=f(r,s,h),a=n(t);let l=i.get(a);l?o&&l.p(t,e):(l=c(a,t),l.c()),v.set(a,g[h]=l),a in m&&y.set(a,Math.abs(h-m[a]))}const $=new Set,b=new Set;function _(t){Y(t,1),t.m(a,u),i.set(t.key,t),u=t.first,p--}for(;d&&p;){const e=g[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(u=e.first,d--,p--):v.has(r)?!i.has(o)||$.has(o)?_(e):b.has(r)?d--:y.get(o)>y.get(r)?(b.add(o),_(e)):($.add(r),d--):(l(n,i),d--)}for(;d--;){const e=t[d];v.has(e.key)||l(e,i)}for(;p;)_(g[p-1]);return g}(o,n,i,1,t,s,r,e,et,kt,null,wt);for(let t=0;t<o.length;t+=1)o[t].a();X()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Y(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)Z(o[t]);n=!1},d(t){t&&b(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Et(t,e,n){let o;c(t,ht,(t=>n(1,o=t)));let{options:r={}}=e,{namespace:s="default"}=e,{rootTheme:i={}}=e;ht._opts({duration:4e3,dismissable:!0,initial:1,progress:0,reversed:!1,intro:{x:256},theme:{},namespace:"default"});return t.$$set=t=>{"options"in t&&n(4,r=t.options),"namespace"in t&&n(0,s=t.namespace),"rootTheme"in t&&n(5,i=t.rootTheme)},t.$$.update=()=>{16&t.$$.dirty&&ht._opts(r)},[s,o,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),()=>Object.keys(i).reduce(((t,e)=>`${t}${e}:${i[e]};`),""),r,i,t=>t.namespace===s]}t.SvelteToast=class extends at{constructor(t){var e;super(),document.getElementById("svelte-2vhy5c-style")||((e=_("style")).id="svelte-2vhy5c-style",e.textContent="ul.svelte-2vhy5c{top:var(--toastContainerTop,1.5rem);right:var(--toastContainerRight,2rem);bottom:var(--toastContainerBottom,auto);left:var(--toastContainerLeft,auto);position:fixed;margin:0;padding:0;list-style-type:none;pointer-events:auto;z-index:9999}",y(document.head,e)),it(this,t,Et,Ct,l,{options:4,namespace:0,rootTheme:5})}},t.toast=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@alex_revin/svelte-toast",
"version": "0.4.3",
"version": "0.4.4",
"description": "Simple elegant toast notifications",

@@ -5,0 +5,0 @@ "author": "Jason Lee <jason@zerodevx.com>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc