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

@zerodevx/svelte-toast

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zerodevx/svelte-toast - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1-rc.1

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 a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(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))}function u(t){return null==t?"":t}const f="undefined"!=typeof window;let d=f?()=>window.performance.now():()=>Date.now(),p=f?t=>requestAnimationFrame(t):e;const h=new Set;function g(t){h.forEach((e=>{e.c(t)||(h.delete(e),e.f())})),0!==h.size&&p(g)}function m(t){let e;return 0===h.size&&p(g),{promise:new Promise((n=>{h.add(e={c:t,f:n})})),abort(){h.delete(e)}}}function $(t,e){t.appendChild(e)}function y(t,e,n){const o=v(t);if(!o.getElementById(e)){const t=k("style");t.id=e,t.textContent=n,w(o,t)}}function v(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=k("style");return w(v(t),e),e.sheet}function w(t,e){return $(t.head||t,e),e.sheet}function x(t,e,n){t.insertBefore(e,n||null)}function _(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function B(t){return document.createTextNode(t)}function E(){return B(" ")}function C(){return B("")}function j(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function M(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e,n){t.classList[n?"add":"remove"](e)}class z{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){var o;this.e||(this.is_svg?this.e=(o=e.nodeName,document.createElementNS("http://www.w3.org/2000/svg",o)):this.e=k(e.nodeName),this.t=e,this.c(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)x(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(_)}}function A(t,e){return new t(e)}const O=new Map;let N,R=0;function P(t,e,n,o,r,s,i,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);l+=100*t+`%{${i(o,1-o)}}\n`}const u=l+`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=v(t),{stylesheet:p,rules:h}=O.get(d)||function(t,e){const n={stylesheet:b(e),rules:{}};return O.set(t,n),n}(d,t);h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${f} ${o}ms linear ${r}ms 1 both`,R+=1,f}function T(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(", "),R-=r,R||p((()=>{R||(O.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&_(e)})),O.clear())})))}function L(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 I(t){N=t}function D(){if(!N)throw new Error("Function called outside component initialization");return N}const H=[],q=[],F=[],W=[],K=Promise.resolve();let Z=!1;function G(t){F.push(t)}const J=new Set;let Q,U=0;function V(){const t=N;do{for(;U<H.length;){const t=H[U];U++,I(t),X(t.$$)}for(I(null),H.length=0,U=0;q.length;)q.pop()();for(let t=0;t<F.length;t+=1){const e=F[t];J.has(e)||(J.add(e),e())}F.length=0}while(H.length);for(;W.length;)W.pop()();Z=!1,J.clear(),I(t)}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(G)}}function Y(){return Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q}function tt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const et=new Set;let nt;function ot(){nt={r:0,c:[],p:nt}}function rt(){nt.r||i(nt.c),nt=nt.p}function st(t,e){t&&t.i&&(et.delete(t),t.i(e))}function it(t,e,n,o){if(t&&t.o){if(et.has(t))return;et.add(t),nt.c.push((()=>{et.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}const at={duration:0};function ct(t,e){t.f(),function(t,e){it(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function lt(t){t&&t.c()}function ut(t,e,n,o){const{fragment:s,after_update:c}=t.$$;s&&s.m(e,n),o||G((()=>{const e=t.$$.on_mount.map(r).filter(a);t.$$.on_destroy?t.$$.on_destroy.push(...e):i(e),t.$$.on_mount=[]})),c.forEach(G)}function ft(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 dt(t,e){-1===t.$$.dirty[0]&&(H.push(t),Z||(Z=!0,K.then(V)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function pt(t,n,o,r,a,c,l,u=[-1]){const f=N;I(t);const d=t.$$={fragment:null,ctx:[],props:c,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:s(),dirty:u,skip_bound:!1,root:n.target||f.$$.root};l&&l(d.root);let p=!1;if(d.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&dt(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(_)}else d.fragment&&d.fragment.c();n.intro&&st(t.$$.fragment),ut(t,n.target,n.anchor,n.customElement),V()}I(f)}class ht{$destroy(){ft(this,1),this.$destroy=e}$on(t,n){if(!a(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.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 gt(t){const e=t-1;return e*e*e+1}function mt(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 $t(t,{delay:e=0,duration:n=400,easing:o=gt,x:r=0,y:s=0,opacity:i=0}={}){const a=getComputedStyle(t),c=+a.opacity,l="none"===a.transform?"":a.transform,u=c*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${l} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${c-u*e}`}}function yt(t,{from:e,to:n},o={}){const r=getComputedStyle(t),s="none"===r.transform?"":r.transform,[i,c]=r.transformOrigin.split(" ").map(parseFloat),l=e.left+e.width*i/n.width-(n.left+i),u=e.top+e.height*c/n.height-(n.top+c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=gt}=o;return{delay:f,duration:a(d)?d(Math.sqrt(l*l+u*u)):d,easing:p,css:(t,o)=>{const r=o*l,i=o*u,a=t+o*e.width/n.width,c=t+o*e.height/n.height;return`transform: ${s} translate(${r}px, ${i}px) scale(${a}, ${c});`}}}const vt=[];function bt(t,n=e){let o;const r=new Set;function s(e){if(c(t,e)&&(t=e,o)){const e=!vt.length;for(const e of r)e[1](),vt.push(e,t);if(e){for(let t=0;t<vt.length;t+=2)vt[t][0](vt[t+1]);vt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,a=e){const c=[i,a];return r.add(c),1===r.size&&(o=n(s)||e),i(t),()=>{r.delete(c),0===r.size&&(o(),o=null)}}}}const wt={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}},xt=(()=>{const{subscribe:t,update:e}=bt([]);let n=0;const o={},r=t=>t instanceof Object;return{subscribe:t,push:(t,s={})=>{const i={target:"default",...r(t)?t:{...s,msg:t}},a=o[i.target]||{},c={...wt,...a,...i,theme:{...a.theme,...i.theme},classes:[...a.classes||[],...i.classes||[]],id:++n};return e((t=>c.reversed?[...t,c]:[c,...t])),n},pop:t=>{e((e=>{if(!e.length||0===t)return[];if(r(t))return e.filter((e=>t(e)));const n=t||Math.max(...e.map((t=>t.id)));return e.filter((t=>t.id!==n))}))},set:(t,n={})=>{const o=r(t)?{...t}:{...n,id:t};e((t=>{const e=t.findIndex((t=>t.id===o.id));return e>-1&&(t[e]={...t[e],...o}),t}))},_init:(t="default",e={})=>(o[t]=e,o)}})();function _t(t){return"[object Date]"===Object.prototype.toString.call(t)}function kt(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)=>kt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(_t(t)&&_t(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]=kt(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 Bt(t){y(t,"svelte-10l0ogd","._toastItem.svelte-10l0ogd{width:var(--toastWidth, 16rem);height:var(--toastHeight, auto);min-height:var(--toastMinHeight, 3.5rem);margin:var(--toastMargin, 0 0 0.5rem 0);padding:var(--toastPadding, 0);background:var(--toastBackground, rgba(66, 66, 66, 0.9));color:var(--toastColor, #fff);box-shadow:var(\n --toastBoxShadow,\n 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06)\n );border:var(--toastBorder, none);border-radius:var(--toastBorderRadius, 0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;overflow:hidden;will-change:transform, opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-10l0ogd{padding:var(--toastMsgPadding, 0.75rem 0.5rem);flex:1 1 0%}.pe.svelte-10l0ogd,._toastMsg.svelte-10l0ogd a{pointer-events:auto}._toastBtn.svelte-10l0ogd{width:var(--toastBtnWidth, 2rem);height:var(--toastBtnHeight, 100%);font:var(--toastBtnFont, 1rem sans-serif);display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none}._toastBtn.svelte-10l0ogd::after{content:var(--toastBtnContent, '✕')}._toastBar.svelte-10l0ogd{top:var(--toastBarTop, auto);right:var(--toastBarRight, auto);bottom:var(--toastBarBottom, 0);left:var(--toastBarLeft, 0);height:var(--toastBarHeight, 6px);width:var(--toastBarWidth, 100%);position:absolute;display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;pointer-events:none}._toastBar.svelte-10l0ogd::-webkit-progress-bar{background:transparent}._toastBar.svelte-10l0ogd::-webkit-progress-value{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}._toastBar.svelte-10l0ogd::-moz-progress-bar{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}")}function Et(t){let n,o,r=t[0].msg+"";return{c(){n=new z(!1),o=C(),n.a=o},m(t,e){n.m(r,t,e),x(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&_(o),t&&n.d()}}}function Ct(t){let e,n,r;const s=[t[2]];var i=t[0].component.src;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=A(i,a())),{c(){e&&lt(e.$$.fragment),n=C()},m(t,o){e&&ut(e,t,o),x(t,n,o),r=!0},p(t,o){const r=4&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,[(c=t[2],"object"==typeof c&&null!==c?c:{})]):{};var c;if(i!==(i=t[0].component.src)){if(e){ot();const t=e;it(t.$$.fragment,1,0,(()=>{ft(t,1)})),rt()}i?(e=A(i,a()),lt(e.$$.fragment),st(e.$$.fragment,1),ut(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&st(e.$$.fragment,t),r=!0)},o(t){e&&it(e.$$.fragment,t),r=!1},d(t){t&&_(n),e&&ft(e,t)}}}function jt(t){let n,o,r;return{c(){n=k("div"),M(n,"class","_toastBtn pe svelte-10l0ogd"),M(n,"role","button"),M(n,"tabindex","0")},m(e,s){x(e,n,s),o||(r=[j(n,"click",t[4]),j(n,"keydown",t[8])],o=!0)},p:e,d(t){t&&_(n),o=!1,i(r)}}}function Mt(t){let e,n,o,r,s,a,c,l,u,f;const d=[Ct,Et],p=[];function h(t,e){return t[0].component?0:1}o=h(t),r=p[o]=d[o](t);let g=t[0].dismissable&&jt(t);return{c(){e=k("div"),n=k("div"),r.c(),s=E(),g&&g.c(),a=E(),c=k("progress"),M(n,"role","status"),M(n,"class","_toastMsg svelte-10l0ogd"),S(n,"pe",t[0].component),M(c,"class","_toastBar svelte-10l0ogd"),c.value=t[1],M(e,"class","_toastItem svelte-10l0ogd"),S(e,"pe",t[0].pausable)},m(r,i){x(r,e,i),$(e,n),p[o].m(n,null),$(e,s),g&&g.m(e,null),$(e,a),$(e,c),l=!0,u||(f=[j(e,"mouseenter",t[9]),j(e,"mouseleave",t[6])],u=!0)},p(t,[s]){let i=o;o=h(t),o===i?p[o].p(t,s):(ot(),it(p[i],1,1,(()=>{p[i]=null})),rt(),r=p[o],r?r.p(t,s):(r=p[o]=d[o](t),r.c()),st(r,1),r.m(n,null)),(!l||1&s)&&S(n,"pe",t[0].component),t[0].dismissable?g?g.p(t,s):(g=jt(t),g.c(),g.m(e,a)):g&&(g.d(1),g=null),(!l||2&s)&&(c.value=t[1]),(!l||1&s)&&S(e,"pe",t[0].pausable)},i(t){l||(st(r),l=!0)},o(t){it(r),l=!1},d(t){t&&_(e),p[o].d(),g&&g.d(),u=!1,i(f)}}}function St(t,e,r){let s,{item:i}=e;const a=function(t,e={}){const r=bt(t);let s,i=t;function a(a,c){if(null==t)return r.set(t=a),Promise.resolve();i=a;let l=s,u=!1,{delay:f=0,duration:p=400,easing:h=n,interpolate:g=kt}=o(o({},e),c);if(0===p)return l&&(l.abort(),l=null),r.set(t=i),Promise.resolve();const $=d()+f;let y;return s=m((e=>{if(e<$)return!0;u||(y=g(t,a),"function"==typeof p&&(p=p(t,a)),u=!0),l&&(l.abort(),l=null);const n=e-$;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});l(t,a,(t=>r(1,s=t)));const c=()=>xt.pop(i.id),u=()=>{1!==s&&0!==s||c()};let f=i.initial,p=f,h=!1;const g=()=>{h||s===f||(a.set(s,{duration:0}),h=!0)},$=()=>{if(h){const t=i.duration,e=t-t*((s-p)/(f-p));a.set(f,{duration:e}).then(u),h=!1}};let y={};const v=()=>document.hidden?g():$(),b=t=>{const{hidden:e,addEventListener:n,removeEventListener:o}=document;if(void 0===e)return;const r="visibilitychange";return t?n(r,v):o(r,v),!0};var w;w=()=>b(!0)&&v(),D().$$.on_mount.push(w),function(t){D().$$.on_destroy.push(t)}((()=>{"function"==typeof i.onpop&&i.onpop(i.id),b(!1)}));return t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{if(1&t.$$.dirty&&void 0!==i.progress&&r(0,i.next=i.progress,i),131&t.$$.dirty&&f!==i.next&&(r(7,f=i.next),p=s,h=!1,a.set(f).then(u)),1&t.$$.dirty&&i.component){const{props:t={},sendIdTo:e}=i.component;r(2,y={...t,...e&&{[e]:i.id}})}},[i,s,y,a,c,g,$,f,t=>{t instanceof KeyboardEvent&&["Enter"," "].includes(t.key)&&c()},()=>{i.pausable&&g()}]}class zt extends ht{constructor(t){super(),pt(this,t,St,Mt,c,{item:0},Bt)}}function At(t){y(t,"svelte-yh90az","._toastContainer.svelte-yh90az{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:var(--toastContainerZIndex, 9999)}")}function Ot(t,e,n){const o=t.slice();return o[5]=e[n],o}function Nt(t,o){let r,s,c,l,f,p,h,g,y,v=e;return s=new zt({props:{item:o[5]}}),{key:t,first:null,c(){r=k("li"),lt(s.$$.fragment),c=E(),M(r,"class",l=u(o[5].classes.join(" "))+" svelte-yh90az"),M(r,"style",f=o[1](o[5].theme)),this.first=r},m(t,e){x(t,r,e),ut(s,r,null),$(r,c),y=!0},p(t,e){o=t;const n={};1&e&&(n.item=o[5]),s.$set(n),(!y||1&e&&l!==(l=u(o[5].classes.join(" "))+" svelte-yh90az"))&&M(r,"class",l),(!y||1&e&&f!==(f=o[1](o[5].theme)))&&M(r,"style",f)},r(){g=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,L(t,r)}}(r),v(),L(r,g)},a(){v(),v=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:c=300,easing:l=n,start:u=d()+a,end:f=u+c,tick:p=e,css:h}=r(t,{from:o,to:i},s);let g,$=!0,y=!1;function v(){h&&T(t,g),$=!1}return m((t=>{if(!y&&t>=u&&(y=!0),y&&t>=f&&(p(1,0),v()),!$)return!1;if(y){const e=0+1*l((t-u)/c);p(e,1-e)}return!0})),h&&(g=P(t,0,1,c,a,l,h)),a||(y=!0),p(0,1),v}(r,g,yt,{duration:200})},i(t){y||(st(s.$$.fragment,t),G((()=>{h&&h.end(1),p=function(t,o,r){let s,i,c=o(t,r),l=!1,u=0;function f(){s&&T(t,s)}function p(){const{delay:o=0,duration:r=300,easing:a=n,tick:p=e,css:h}=c||at;h&&(s=P(t,0,1,r,o,a,h,u++)),p(0,1);const g=d()+o,$=g+r;i&&i.abort(),l=!0,G((()=>tt(t,!0,"start"))),i=m((e=>{if(l){if(e>=$)return p(1,0),tt(t,!0,"end"),f(),l=!1;if(e>=g){const t=a((e-g)/r);p(t,1-t)}}return l}))}let h=!1;return{start(){h||(h=!0,T(t),a(c)?(c=c(),Y().then(p)):p())},invalidate(){h=!1},end(){l&&(f(),l=!1)}}}(r,$t,o[5].intro),p.start()})),y=!0)},o(t){it(s.$$.fragment,t),p&&p.invalidate(),h=function(t,o,r){let s,c=o(t,r),l=!0;const u=nt;function f(){const{delay:o=0,duration:r=300,easing:a=n,tick:f=e,css:p}=c||at;p&&(s=P(t,1,0,r,o,a,p));const h=d()+o,g=h+r;G((()=>tt(t,!1,"start"))),m((e=>{if(l){if(e>=g)return f(0,1),tt(t,!1,"end"),--u.r||i(u.c),!1;if(e>=h){const t=a((e-h)/r);f(1-t,t)}}return l}))}return u.r+=1,a(c)?Y().then((()=>{c=c(),f()})):f(),{end(e){e&&c.tick&&c.tick(1,0),l&&(s&&T(t,s),l=!1)}}}(r,mt,{}),y=!1},d(t){t&&_(r),ft(s),t&&h&&h.end()}}}function Rt(t){let e,n,o=[],r=new Map,s=t[0];const i=t=>t[5].id;for(let e=0;e<s.length;e+=1){let n=Ot(t,s,e),a=i(n);r.set(a,o[e]=Nt(a,n))}return{c(){e=k("ul");for(let t=0;t<o.length;t+=1)o[t].c();M(e,"class","_toastContainer svelte-yh90az")},m(t,r){x(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],ot();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,a,c,l,u,f){let d=t.length,p=s.length,h=d;const g={};for(;h--;)g[t[h].key]=h;const m=[],$=new Map,y=new Map;for(h=p;h--;){const t=f(r,s,h),a=n(t);let c=i.get(a);c?o&&c.p(t,e):(c=l(a,t),c.c()),$.set(a,m[h]=c),a in g&&y.set(a,Math.abs(h-g[a]))}const v=new Set,b=new Set;function w(t){st(t,1),t.m(a,u),i.set(t.key,t),u=t.first,p--}for(;d&&p;){const e=m[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(u=e.first,d--,p--):$.has(r)?!i.has(o)||v.has(o)?w(e):b.has(r)?d--:y.get(o)>y.get(r)?(b.add(o),w(e)):(v.add(r),d--):(c(n,i),d--)}for(;d--;){const e=t[d];$.has(e.key)||c(e,i)}for(;p;)w(m[p-1]);return m}(o,n,i,1,t,s,r,e,ct,Nt,null,Ot);for(let t=0;t<o.length;t+=1)o[t].a();rt()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)st(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)it(o[t]);n=!1},d(t){t&&_(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Pt(t,e,n){let o;l(t,xt,(t=>n(4,o=t)));let r,{options:s={}}=e,{target:i="default"}=e;return t.$$set=t=>{"options"in t&&n(2,s=t.options),"target"in t&&n(3,i=t.target)},t.$$.update=()=>{12&t.$$.dirty&&xt._init(i,s),24&t.$$.dirty&&n(0,r=o.filter((t=>t.target===i)))},[r,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),s,i,o]}t.SvelteToast=class extends ht{constructor(t){super(),pt(this,t,Pt,Rt,c,{options:2,target:3},At)}},t.toast=xt,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 c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(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))}function u(t){return null==t?"":t}const f="undefined"!=typeof window;let d=f?()=>window.performance.now():()=>Date.now(),p=f?t=>requestAnimationFrame(t):e;const h=new Set;function g(t){h.forEach((e=>{e.c(t)||(h.delete(e),e.f())})),0!==h.size&&p(g)}function m(t){let e;return 0===h.size&&p(g),{promise:new Promise((n=>{h.add(e={c:t,f:n})})),abort(){h.delete(e)}}}function $(t,e){t.appendChild(e)}function y(t,e,n){const o=v(t);if(!o.getElementById(e)){const t=k("style");t.id=e,t.textContent=n,w(o,t)}}function v(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=k("style");return w(v(t),e),e.sheet}function w(t,e){return $(t.head||t,e),e.sheet}function x(t,e,n){t.insertBefore(e,n||null)}function _(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function B(t){return document.createTextNode(t)}function E(){return B(" ")}function C(){return B("")}function j(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function M(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e,n){t.classList[n?"add":"remove"](e)}class z{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){var o;this.e||(this.is_svg?this.e=(o=e.nodeName,document.createElementNS("http://www.w3.org/2000/svg",o)):this.e=k(e.nodeName),this.t=e,this.c(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)x(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(_)}}function A(t,e){return new t(e)}const O=new Map;let N,R=0;function P(t,e,n,o,r,s,i,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);l+=100*t+`%{${i(o,1-o)}}\n`}const u=l+`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=v(t),{stylesheet:p,rules:h}=O.get(d)||function(t,e){const n={stylesheet:b(e),rules:{}};return O.set(t,n),n}(d,t);h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${f} ${o}ms linear ${r}ms 1 both`,R+=1,f}function T(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(", "),R-=r,R||p((()=>{R||(O.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&_(e)})),O.clear())})))}function L(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 I(t){N=t}function D(){if(!N)throw new Error("Function called outside component initialization");return N}const H=[],q=[],F=[],W=[],K=Promise.resolve();let Z=!1;function G(t){F.push(t)}const J=new Set;let Q,U=0;function V(){const t=N;do{for(;U<H.length;){const t=H[U];U++,I(t),X(t.$$)}for(I(null),H.length=0,U=0;q.length;)q.pop()();for(let t=0;t<F.length;t+=1){const e=F[t];J.has(e)||(J.add(e),e())}F.length=0}while(H.length);for(;W.length;)W.pop()();Z=!1,J.clear(),I(t)}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(G)}}function Y(){return Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q}function tt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const et=new Set;let nt;function ot(){nt={r:0,c:[],p:nt}}function rt(){nt.r||i(nt.c),nt=nt.p}function st(t,e){t&&t.i&&(et.delete(t),t.i(e))}function it(t,e,n,o){if(t&&t.o){if(et.has(t))return;et.add(t),nt.c.push((()=>{et.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}const at={duration:0};function ct(t,e){t.f(),function(t,e){it(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function lt(t){t&&t.c()}function ut(t,e,n,o){const{fragment:s,after_update:c}=t.$$;s&&s.m(e,n),o||G((()=>{const e=t.$$.on_mount.map(r).filter(a);t.$$.on_destroy?t.$$.on_destroy.push(...e):i(e),t.$$.on_mount=[]})),c.forEach(G)}function ft(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 dt(t,e){-1===t.$$.dirty[0]&&(H.push(t),Z||(Z=!0,K.then(V)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function pt(t,n,o,r,a,c,l,u=[-1]){const f=N;I(t);const d=t.$$={fragment:null,ctx:[],props:c,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:s(),dirty:u,skip_bound:!1,root:n.target||f.$$.root};l&&l(d.root);let p=!1;if(d.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&dt(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(_)}else d.fragment&&d.fragment.c();n.intro&&st(t.$$.fragment),ut(t,n.target,n.anchor,n.customElement),V()}I(f)}class ht{$destroy(){ft(this,1),this.$destroy=e}$on(t,n){if(!a(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.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 gt(t){const e=t-1;return e*e*e+1}function mt(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 $t(t,{delay:e=0,duration:n=400,easing:o=gt,x:r=0,y:s=0,opacity:i=0}={}){const a=getComputedStyle(t),c=+a.opacity,l="none"===a.transform?"":a.transform,u=c*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${l} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${c-u*e}`}}function yt(t,{from:e,to:n},o={}){const r=getComputedStyle(t),s="none"===r.transform?"":r.transform,[i,c]=r.transformOrigin.split(" ").map(parseFloat),l=e.left+e.width*i/n.width-(n.left+i),u=e.top+e.height*c/n.height-(n.top+c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=gt}=o;return{delay:f,duration:a(d)?d(Math.sqrt(l*l+u*u)):d,easing:p,css:(t,o)=>{const r=o*l,i=o*u,a=t+o*e.width/n.width,c=t+o*e.height/n.height;return`transform: ${s} translate(${r}px, ${i}px) scale(${a}, ${c});`}}}const vt=[];function bt(t,n=e){let o;const r=new Set;function s(e){if(c(t,e)&&(t=e,o)){const e=!vt.length;for(const e of r)e[1](),vt.push(e,t);if(e){for(let t=0;t<vt.length;t+=2)vt[t][0](vt[t+1]);vt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,a=e){const c=[i,a];return r.add(c),1===r.size&&(o=n(s)||e),i(t),()=>{r.delete(c),0===r.size&&(o(),o=null)}}}}const wt={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}},xt=(()=>{const{subscribe:t,update:e}=bt([]);let n=0;const o={},r=t=>t instanceof Object;return{subscribe:t,push:(t,s={})=>{const i={target:"default",...r(t)?t:{...s,msg:t}},a=o[i.target]||{},c={...wt,...a,...i,theme:{...a.theme,...i.theme},classes:[...a.classes||[],...i.classes||[]],id:++n};return e((t=>c.reversed?[...t,c]:[c,...t])),n},pop:t=>{e((e=>{if(!e.length||0===t)return[];if(r(t))return e.filter((e=>t(e)));const n=t||Math.max(...e.map((t=>t.id)));return e.filter((t=>t.id!==n))}))},set:(t,n={})=>{const o=r(t)?{...t}:{...n,id:t};e((t=>{const e=t.findIndex((t=>t.id===o.id));return e>-1&&(t[e]={...t[e],...o}),t}))},_init:(t="default",e={})=>(o[t]=e,o)}})();function _t(t){return"[object Date]"===Object.prototype.toString.call(t)}function kt(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)=>kt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(_t(t)&&_t(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]=kt(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 Bt(t){y(t,"svelte-10l0ogd","._toastItem.svelte-10l0ogd{width:var(--toastWidth, 16rem);height:var(--toastHeight, auto);min-height:var(--toastMinHeight, 3.5rem);margin:var(--toastMargin, 0 0 0.5rem 0);padding:var(--toastPadding, 0);background:var(--toastBackground, rgba(66, 66, 66, 0.9));color:var(--toastColor, #fff);box-shadow:var(\n --toastBoxShadow,\n 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06)\n );border:var(--toastBorder, none);border-radius:var(--toastBorderRadius, 0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;overflow:hidden;will-change:transform, opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-10l0ogd{padding:var(--toastMsgPadding, 0.75rem 0.5rem);flex:1 1 0%}.pe.svelte-10l0ogd,._toastMsg.svelte-10l0ogd a{pointer-events:auto}._toastBtn.svelte-10l0ogd{width:var(--toastBtnWidth, 2rem);height:var(--toastBtnHeight, 100%);font:var(--toastBtnFont, 1rem sans-serif);display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none}._toastBtn.svelte-10l0ogd::after{content:var(--toastBtnContent, '✕')}._toastBar.svelte-10l0ogd{top:var(--toastBarTop, auto);right:var(--toastBarRight, auto);bottom:var(--toastBarBottom, 0);left:var(--toastBarLeft, 0);height:var(--toastBarHeight, 6px);width:var(--toastBarWidth, 100%);position:absolute;display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;pointer-events:none}._toastBar.svelte-10l0ogd::-webkit-progress-bar{background:transparent}._toastBar.svelte-10l0ogd::-webkit-progress-value{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}._toastBar.svelte-10l0ogd::-moz-progress-bar{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}")}function Et(t){let n,o,r=t[0].msg+"";return{c(){n=new z(!1),o=C(),n.a=o},m(t,e){n.m(r,t,e),x(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&_(o),t&&n.d()}}}function Ct(t){let e,n,r;const s=[t[2]];var i=t[0].component.src;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=A(i,a())),{c(){e&&lt(e.$$.fragment),n=C()},m(t,o){e&&ut(e,t,o),x(t,n,o),r=!0},p(t,o){const r=4&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,[(c=t[2],"object"==typeof c&&null!==c?c:{})]):{};var c;if(i!==(i=t[0].component.src)){if(e){ot();const t=e;it(t.$$.fragment,1,0,(()=>{ft(t,1)})),rt()}i?(e=A(i,a()),lt(e.$$.fragment),st(e.$$.fragment,1),ut(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&st(e.$$.fragment,t),r=!0)},o(t){e&&it(e.$$.fragment,t),r=!1},d(t){t&&_(n),e&&ft(e,t)}}}function jt(t){let n,o,r;return{c(){n=k("div"),M(n,"class","_toastBtn pe svelte-10l0ogd"),M(n,"role","button"),M(n,"tabindex","0")},m(e,s){x(e,n,s),o||(r=[j(n,"click",t[4]),j(n,"keydown",t[8])],o=!0)},p:e,d(t){t&&_(n),o=!1,i(r)}}}function Mt(t){let e,n,o,r,s,a,c,l,u,f;const d=[Ct,Et],p=[];function h(t,e){return t[0].component?0:1}o=h(t),r=p[o]=d[o](t);let g=t[0].dismissable&&jt(t);return{c(){e=k("div"),n=k("div"),r.c(),s=E(),g&&g.c(),a=E(),c=k("progress"),M(n,"role","status"),M(n,"class","_toastMsg svelte-10l0ogd"),S(n,"pe",t[0].component),M(c,"class","_toastBar svelte-10l0ogd"),c.value=t[1],M(e,"class","_toastItem svelte-10l0ogd"),S(e,"pe",t[0].pausable)},m(r,i){x(r,e,i),$(e,n),p[o].m(n,null),$(e,s),g&&g.m(e,null),$(e,a),$(e,c),l=!0,u||(f=[j(e,"mouseenter",t[9]),j(e,"mouseleave",t[6])],u=!0)},p(t,[s]){let i=o;o=h(t),o===i?p[o].p(t,s):(ot(),it(p[i],1,1,(()=>{p[i]=null})),rt(),r=p[o],r?r.p(t,s):(r=p[o]=d[o](t),r.c()),st(r,1),r.m(n,null)),(!l||1&s)&&S(n,"pe",t[0].component),t[0].dismissable?g?g.p(t,s):(g=jt(t),g.c(),g.m(e,a)):g&&(g.d(1),g=null),(!l||2&s)&&(c.value=t[1]),(!l||1&s)&&S(e,"pe",t[0].pausable)},i(t){l||(st(r),l=!0)},o(t){it(r),l=!1},d(t){t&&_(e),p[o].d(),g&&g.d(),u=!1,i(f)}}}function St(t,e,r){let s,{item:i}=e;const a=function(t,e={}){const r=bt(t);let s,i=t;function a(a,c){if(null==t)return r.set(t=a),Promise.resolve();i=a;let l=s,u=!1,{delay:f=0,duration:p=400,easing:h=n,interpolate:g=kt}=o(o({},e),c);if(0===p)return l&&(l.abort(),l=null),r.set(t=i),Promise.resolve();const $=d()+f;let y;return s=m((e=>{if(e<$)return!0;u||(y=g(t,a),"function"==typeof p&&(p=p(t,a)),u=!0),l&&(l.abort(),l=null);const n=e-$;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});l(t,a,(t=>r(1,s=t)));const c=()=>xt.pop(i.id),u=()=>{1!==s&&0!==s||c()};let f=i.initial,p=f,h=!1;const g=()=>{h||s===f||(a.set(s,{duration:0}),h=!0)},$=()=>{if(h){const t=i.duration,e=t-t*((s-p)/(f-p));a.set(f,{duration:e}).then(u),h=!1}};let y={};const v=(t,e="undefined")=>typeof t===e;let b;var w;w=(t=document)=>{if(v(t.hidden))return;const e=()=>t.hidden?g():$(),n="visibilitychange";t.addEventListener(n,e),b=()=>t.removeEventListener(n,e),e()},D().$$.on_mount.push(w),function(t){D().$$.on_destroy.push(t)}((()=>{v(i.onpop,"function")&&i.onpop(i.id),b&&b()}));return t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{if(1&t.$$.dirty&&(v(i.progress)||r(0,i.next=i.progress,i)),131&t.$$.dirty&&f!==i.next&&(r(7,f=i.next),p=s,h=!1,a.set(f).then(u)),1&t.$$.dirty&&i.component){const{props:t={},sendIdTo:e}=i.component;r(2,y={...t,...e&&{[e]:i.id}})}},[i,s,y,a,c,g,$,f,t=>{t instanceof KeyboardEvent&&["Enter"," "].includes(t.key)&&c()},()=>{i.pausable&&g()}]}class zt extends ht{constructor(t){super(),pt(this,t,St,Mt,c,{item:0},Bt)}}function At(t){y(t,"svelte-yh90az","._toastContainer.svelte-yh90az{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:var(--toastContainerZIndex, 9999)}")}function Ot(t,e,n){const o=t.slice();return o[5]=e[n],o}function Nt(t,o){let r,s,c,l,f,p,h,g,y,v=e;return s=new zt({props:{item:o[5]}}),{key:t,first:null,c(){r=k("li"),lt(s.$$.fragment),c=E(),M(r,"class",l=u(o[5].classes.join(" "))+" svelte-yh90az"),M(r,"style",f=o[1](o[5].theme)),this.first=r},m(t,e){x(t,r,e),ut(s,r,null),$(r,c),y=!0},p(t,e){o=t;const n={};1&e&&(n.item=o[5]),s.$set(n),(!y||1&e&&l!==(l=u(o[5].classes.join(" "))+" svelte-yh90az"))&&M(r,"class",l),(!y||1&e&&f!==(f=o[1](o[5].theme)))&&M(r,"style",f)},r(){g=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,L(t,r)}}(r),v(),L(r,g)},a(){v(),v=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:c=300,easing:l=n,start:u=d()+a,end:f=u+c,tick:p=e,css:h}=r(t,{from:o,to:i},s);let g,$=!0,y=!1;function v(){h&&T(t,g),$=!1}return m((t=>{if(!y&&t>=u&&(y=!0),y&&t>=f&&(p(1,0),v()),!$)return!1;if(y){const e=0+1*l((t-u)/c);p(e,1-e)}return!0})),h&&(g=P(t,0,1,c,a,l,h)),a||(y=!0),p(0,1),v}(r,g,yt,{duration:200})},i(t){y||(st(s.$$.fragment,t),G((()=>{h&&h.end(1),p=function(t,o,r){let s,i,c=o(t,r),l=!1,u=0;function f(){s&&T(t,s)}function p(){const{delay:o=0,duration:r=300,easing:a=n,tick:p=e,css:h}=c||at;h&&(s=P(t,0,1,r,o,a,h,u++)),p(0,1);const g=d()+o,$=g+r;i&&i.abort(),l=!0,G((()=>tt(t,!0,"start"))),i=m((e=>{if(l){if(e>=$)return p(1,0),tt(t,!0,"end"),f(),l=!1;if(e>=g){const t=a((e-g)/r);p(t,1-t)}}return l}))}let h=!1;return{start(){h||(h=!0,T(t),a(c)?(c=c(),Y().then(p)):p())},invalidate(){h=!1},end(){l&&(f(),l=!1)}}}(r,$t,o[5].intro),p.start()})),y=!0)},o(t){it(s.$$.fragment,t),p&&p.invalidate(),h=function(t,o,r){let s,c=o(t,r),l=!0;const u=nt;function f(){const{delay:o=0,duration:r=300,easing:a=n,tick:f=e,css:p}=c||at;p&&(s=P(t,1,0,r,o,a,p));const h=d()+o,g=h+r;G((()=>tt(t,!1,"start"))),m((e=>{if(l){if(e>=g)return f(0,1),tt(t,!1,"end"),--u.r||i(u.c),!1;if(e>=h){const t=a((e-h)/r);f(1-t,t)}}return l}))}return u.r+=1,a(c)?Y().then((()=>{c=c(),f()})):f(),{end(e){e&&c.tick&&c.tick(1,0),l&&(s&&T(t,s),l=!1)}}}(r,mt,{}),y=!1},d(t){t&&_(r),ft(s),t&&h&&h.end()}}}function Rt(t){let e,n,o=[],r=new Map,s=t[0];const i=t=>t[5].id;for(let e=0;e<s.length;e+=1){let n=Ot(t,s,e),a=i(n);r.set(a,o[e]=Nt(a,n))}return{c(){e=k("ul");for(let t=0;t<o.length;t+=1)o[t].c();M(e,"class","_toastContainer svelte-yh90az")},m(t,r){x(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],ot();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,a,c,l,u,f){let d=t.length,p=s.length,h=d;const g={};for(;h--;)g[t[h].key]=h;const m=[],$=new Map,y=new Map;for(h=p;h--;){const t=f(r,s,h),a=n(t);let c=i.get(a);c?o&&c.p(t,e):(c=l(a,t),c.c()),$.set(a,m[h]=c),a in g&&y.set(a,Math.abs(h-g[a]))}const v=new Set,b=new Set;function w(t){st(t,1),t.m(a,u),i.set(t.key,t),u=t.first,p--}for(;d&&p;){const e=m[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(u=e.first,d--,p--):$.has(r)?!i.has(o)||v.has(o)?w(e):b.has(r)?d--:y.get(o)>y.get(r)?(b.add(o),w(e)):(v.add(r),d--):(c(n,i),d--)}for(;d--;){const e=t[d];$.has(e.key)||c(e,i)}for(;p;)w(m[p-1]);return m}(o,n,i,1,t,s,r,e,ct,Nt,null,Ot);for(let t=0;t<o.length;t+=1)o[t].a();rt()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)st(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)it(o[t]);n=!1},d(t){t&&_(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Pt(t,e,n){let o;l(t,xt,(t=>n(4,o=t)));let r,{options:s={}}=e,{target:i="default"}=e;return t.$$set=t=>{"options"in t&&n(2,s=t.options),"target"in t&&n(3,i=t.target)},t.$$.update=()=>{12&t.$$.dirty&&xt._init(i,s),24&t.$$.dirty&&n(0,r=o.filter((t=>t.target===i)))},[r,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),s,i,o]}t.SvelteToast=class extends ht{constructor(t){super(),pt(this,t,Pt,Rt,c,{options:2,target:3},At)}},t.toast=xt,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@zerodevx/svelte-toast",
"version": "0.8.0",
"version": "0.8.1-rc.1",
"description": "Simple elegant toast notifications",

@@ -28,10 +28,10 @@ "author": "Jason Lee <jason@zerodevx.com>",

"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"autoprefixer": "^10.4.12",
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"autoprefixer": "^10.4.13",
"camelcase": "^7.0.0",
"cypress": "^10.9.0",
"eslint": "^8.25.0",
"cypress": "^10.11.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",

@@ -42,3 +42,3 @@ "eslint-plugin-html": "^7.1.0",

"npm-run-all": "^4.1.5",
"postcss": "^8.4.17",
"postcss": "^8.4.18",
"prettier": "^2.7.1",

@@ -52,4 +52,4 @@ "prettier-plugin-svelte": "^2.8.0",

"sirv-cli": "^2.0.2",
"svelte": "^3.51.0",
"tailwindcss": "^3.1.8",
"svelte": "^3.52.0",
"tailwindcss": "^3.2.1",
"typescript": "^4.8.4"

@@ -56,0 +56,0 @@ },

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