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

ee54bh78i

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee54bh78i - npm Package Compare versions

Comparing version 3.0.0-alpha.7 to 3.0.0-alpha.8

154

ee54bh78i.cjs.development.js

@@ -1860,76 +1860,2 @@ 'use strict';

var styles$2 = {
entering: {
opacity: 1
},
entered: {
opacity: 1
}
};
var Fade = /*#__PURE__*/React.forwardRef(function (props, ref) {
var children = props.children,
inProp = props["in"],
_props$timeout = props.timeout,
timeout = _props$timeout === void 0 ? 0 : _props$timeout,
style = props.style,
onEnter = props.onEnter,
onEntered = props.onEntered,
onExit = props.onExit,
onExited = props.onExited,
other = _objectWithoutPropertiesLoose(props, ["children", "in", "timeout", "style", "onEnter", "onEntered", "onExit", "onExited", "direction"]);
var nodeRef = React.useRef(null);
var handleRefIntermediary = useForkRef(children.ref, ref);
var handleRef = useForkRef(nodeRef, handleRefIntermediary);
var handleEnter = function handleEnter(node, isAppearing, snackId) {
reflow(node);
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'enter'
});
node.style.webkitTransition = createTransition('opacity', transitionProps);
node.style.transition = createTransition('opacity', transitionProps);
if (onEnter) {
onEnter(node, isAppearing, snackId);
}
};
var handleExit = function handleExit(node, snackId) {
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'exit'
});
node.style.webkitTransition = createTransition('opacity', transitionProps);
node.style.transition = createTransition('opacity', transitionProps);
if (onExit) {
onExit(node, snackId);
}
};
return React.createElement(Transition, Object.assign({
appear: true,
"in": inProp,
nodeRef: nodeRef,
onEnter: handleEnter,
onEntered: onEntered,
onExit: handleExit,
onExited: onExited,
timeout: timeout
}, other), function (status, childProps) {
return React.cloneElement(children, _extends({
style: _extends({
opacity: 0,
visibility: status === 'exited' && !inProp ? 'hidden' : undefined
}, styles$2[status], {}, style, {}, children.props.style),
ref: handleRef
}, childProps));
});
});
Fade.displayName = 'Fade';
/**

@@ -1952,3 +1878,3 @@ * https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10

var styles$3 = {
var styles$2 = {
entering: {

@@ -2078,3 +2004,3 @@ opacity: 1,

visibility: state === 'exited' && !inProp ? 'hidden' : undefined
}, styles$3[state], {}, style, {}, children.props.style),
}, styles$2[state], {}, style, {}, children.props.style),
ref: handleRef

@@ -2086,77 +2012,2 @@ }, childProps));

var styles$4 = {
entering: {
transform: 'none'
},
entered: {
transform: 'none'
}
};
var Zoom = /*#__PURE__*/React.forwardRef(function (props, ref) {
var children = props.children,
inProp = props["in"],
style = props.style,
_props$timeout = props.timeout,
timeout = _props$timeout === void 0 ? 0 : _props$timeout,
onEnter = props.onEnter,
onEntered = props.onEntered,
onExit = props.onExit,
onExited = props.onExited,
other = _objectWithoutPropertiesLoose(props, ["children", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited", "direction"]);
var nodeRef = React.useRef(null);
var handleRefIntermediary = useForkRef(children.ref, ref);
var handleRef = useForkRef(nodeRef, handleRefIntermediary);
var handleEnter = function handleEnter(node, isAppearing, snackId) {
reflow(node);
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'enter'
});
node.style.webkitTransition = createTransition('transform', transitionProps);
node.style.transition = createTransition('transform', transitionProps);
if (onEnter) {
onEnter(node, isAppearing, snackId);
}
};
var handleExit = function handleExit(node, snackId) {
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'exit'
});
node.style.webkitTransition = createTransition('transform', transitionProps);
node.style.transition = createTransition('transform', transitionProps);
if (onExit) {
onExit(node, snackId);
}
};
return React.createElement(Transition, Object.assign({
appear: true,
"in": inProp,
nodeRef: nodeRef,
onEnter: handleEnter,
onEntered: onEntered,
onExit: handleExit,
onExited: onExited,
timeout: timeout
}, other), function (state, childProps) {
return React.cloneElement(children, _extends({
style: _extends({
transform: 'scale(0)',
visibility: state === 'exited' && !inProp ? 'hidden' : undefined
}, styles$4[state], {}, style, {}, children.props.style),
ref: handleRef
}, childProps));
});
});
Zoom.displayName = 'Zoom';
exports.Fade = Fade;
exports.Grow = Grow;

@@ -2166,5 +2017,4 @@ exports.Slide = Slide;

exports.SnackbarProvider = SnackbarProvider;
exports.Zoom = Zoom;
exports.useSnackbar = useSnackbar;
exports.withSnackbar = withSnackbar;
//# sourceMappingURL=ee54bh78i.cjs.development.js.map

2

ee54bh78i.cjs.production.min.js

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

"use strict";function n(n){return n&&"object"==typeof n&&"default"in n?n.default:n}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=n(e),r=require("react-dom"),i=n(require("clsx")),o=require("goober"),a=n(require("hoist-non-react-statics"));function s(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function u(n,e,t){return e&&s(n.prototype,e),t&&s(n,t),n}function c(){return(c=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}function l(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function d(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)e.indexOf(t=o[r])>=0||(i[t]=n[t]);return i}var f=t.createContext(),p=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},m=function(n){return""+p(n.vertical)+p(n.horizontal)},h=function(n){return!!n||0===n},x=function(n){function e(e){var t;t=n.call(this,e)||this;var r,i=e.appear;return t.appearStatus=null,e.in?i?(r="exited",t.appearStatus="entering"):r="entered":r=e.unmountOnExit||e.mountOnEnter?"unmounted":"exited",t.state={status:r},t.nextCallback=null,t}l(e,n),e.getDerivedStateFromProps=function(n,e){return n.in&&"unmounted"===e.status?{status:"exited"}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(n){var e=null;if(n!==this.props){var t=this.state.status;this.props.in?"entering"!==t&&"entered"!==t&&(e="entering"):"entering"!==t&&"entered"!==t||(e="exiting")}this.updateStatus(!1,e)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var n=this.props.timeout,e=n,t=n;return null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter),{exit:t,enter:e}},t.updateStatus=function(n,e){void 0===n&&(n=!1),null!==e?(this.cancelNextCallback(),"entering"===e?this.performEnter(n):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},t.performEnter=function(n){var e=this,t=this.props,r=t.enter,i=t.id,o=n,a=this.getTimeouts();n||r?(this.props.onEnter(this.node,o,i),this.safeSetState({status:"entering"},(function(){e.props.onEntering(e.node,o,i),e.onTransitionEnd(a.enter,(function(){e.safeSetState({status:"entered"},(function(){e.props.onEntered(e.node,o,i)}))}))}))):this.safeSetState({status:"entered"},(function(){e.props.onEntered(e.node,o,i)}))},t.performExit=function(){var n=this,e=this.props,t=e.exit,r=e.id,i=this.getTimeouts();t?(this.props.onExit(this.node,r),this.safeSetState({status:"exiting"},(function(){n.props.onExiting(n.node,r),n.onTransitionEnd(i.exit,(function(){n.safeSetState({status:"exited"},(function(){n.props.onExited(n.node,r)}))}))}))):this.safeSetState({status:"exited"},(function(){n.props.onExited(n.node,r)}))},t.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(n,e){e=this.setNextCallback(e),this.setState(n,e)},t.setNextCallback=function(n){var e=this,t=!0;return this.nextCallback=function(r){t&&(t=!1,e.nextCallback=null,n(r))},this.nextCallback.cancel=function(){t=!1},this.nextCallback},t.onTransitionEnd=function(n,e){this.setNextCallback(e),!this.node||null==n&&!this.props.addEndListener?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=n&&setTimeout(this.nextCallback,n))},t.render=function(){var n=this.state.status;if("unmounted"===n)return null;var e=this.props;return(0,e.children)(n,d(e,["children","id","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},u(e,[{key:"node",get:function(){var n=this.props.nodeRef.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),e}(t.Component);function E(){}function v(n,e){"function"==typeof n?n(e):n&&(n.current=e)}function g(n,t){return e.useMemo((function(){return null==n&&null==t?null:function(e){v(n,e),v(t,e)}}),[n,t])}function y(n){var e,t=n.timeout,r=n.style,i=void 0===r?{}:r;return{duration:null!==(e=i.transitionDuration)&&void 0!==e?e:"object"==typeof t?t[n.mode]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}x.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:E,onEntering:E,onEntered:E,onExit:E,onExiting:E,onExited:E};var b=function(n){n.scrollTop=n.scrollTop},k=function(n){return Math.round(n)+"ms"};function w(n,e){void 0===n&&(n=["all"]);var t=e||{},r=t.duration,i=void 0===r?300:r,o=t.easing,a=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=t.delay,u=void 0===s?0:s;return(Array.isArray(n)?n:[n]).map((function(n){var e="string"==typeof i?i:k(i),t="string"==typeof u?u:k(u);return n+" "+e+" "+a+" "+t})).join(",")}function C(n){return function(n){return n&&n.ownerDocument||document}(n).defaultView||window}function S(n,e){if(e){var t=function(n,e){var t,r=e.getBoundingClientRect(),i=C(e);if(e.fakeTransform)t=e.fakeTransform;else{var o=i.getComputedStyle(e);t=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(t&&"none"!==t&&"string"==typeof t){var u=t.split("(")[1].split(")")[0].split(",");a=parseInt(u[4],10),s=parseInt(u[5],10)}switch(n){case"left":return"translateX("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(n,e);t&&(e.style.webkitTransform=t,e.style.transform=t)}}var T=e.forwardRef((function(n,t){var r=n.children,i=n.direction,o=void 0===i?"down":i,a=n.in,s=n.style,u=n.timeout,l=void 0===u?0:u,f=n.onEnter,p=n.onEntered,m=n.onExit,h=n.onExited,E=d(n,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=e.useRef(null),k=g(r.ref,v),T=g(k,t),O=e.useCallback((function(){v.current&&S(o,v.current)}),[o]);return e.useEffect((function(){if(!a&&"down"!==o&&"right"!==o){var n=function(n,e){var t;function r(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){n.apply(r,o)};clearTimeout(t),t=setTimeout(s,e)}return void 0===e&&(e=166),r.clear=function(){clearTimeout(t)},r}((function(){v.current&&S(o,v.current)})),e=C(v.current);return e.addEventListener("resize",n),function(){n.clear(),e.removeEventListener("resize",n)}}}),[o,a]),e.useEffect((function(){a||O()}),[a,O]),e.createElement(x,Object.assign({appear:!0,nodeRef:v,onEnter:function(n,e,t){S(o,n),b(n),f&&f(n,e,t)},onEntered:p,onEntering:function(n){var e=y({timeout:l,mode:"enter",style:c({},s,{transitionTimingFunction:(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)"})});n.style.webkitTransition=w("-webkit-transform",e),n.style.transition=w("transform",e),n.style.webkitTransform="none",n.style.transform="none"},onExit:function(n,e){var t=y({timeout:l,mode:"exit",style:c({},s,{transitionTimingFunction:(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)"})});n.style.webkitTransition=w("-webkit-transform",t),n.style.transition=w("transform",t),S(o,n),m&&m(n,e)},onExited:function(n,e){n.style.webkitTransition="",n.style.transition="",h&&h(n,e)},in:a,timeout:l},E),(function(n,t){return e.cloneElement(r,c({ref:T,style:c({visibility:"exited"!==n||a?void 0:"hidden"},s,{},r.props.style)},t))}))}));T.displayName="Slide";var O=function(n){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},n))},L=function(){return t.createElement(O,null,t.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},D=function(){return t.createElement(O,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},R=function(){return t.createElement(O,null,t.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},N=function(){return t.createElement(O,null,t.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},j={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(L,null),warning:t.createElement(D,null),error:t.createElement(R,null),info:t.createElement(N,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:T,transitionDuration:{enter:225,exit:195}};function H(n){return Object.entries(n).reduce((function(n,e){var t;return c({},n,((t={})[e[0]]=o.css(e[1]),t))}),{})}var M=H({root:{height:0},entered:{height:"auto"}}),q=e.forwardRef((function(n,t){var r=n.children,o=n.in,a=n.onExited,s=n.id,u=e.useRef(null),l=e.useRef(null),d=g(t,l),f=function(){return u.current?u.current.clientHeight:0};return e.createElement(x,{id:s,in:o,unmountOnExit:!0,onEnter:function(n){n.style.height="0px"},onEntered:function(n){n.style.height="auto"},onEntering:function(n){var e=f(),t=y({timeout:175,mode:"enter"}),r=t.duration,i=t.easing;n.style.transitionDuration="string"==typeof r?r:r+"ms",n.style.height=e+"px",n.style.transitionTimingFunction=i||""},onExit:function(n){n.style.height=f()+"px"},onExited:a,onExiting:function(n){b(n);var e=y({timeout:175,mode:"exit"}),t=e.duration,r=e.easing;n.style.transitionDuration="string"==typeof t?t:t+"ms",n.style.height="0px",n.style.transitionTimingFunction=r||""},nodeRef:l,timeout:175},(function(n,t){return e.createElement("div",Object.assign({ref:d,className:i(M.root,"entered"===n&&M.entered),style:c({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:w("height")},"entered"===n&&{overflow:"visible"},{},"exited"===n&&!o&&{visibility:"hidden"})},t),e.createElement("div",{ref:u,className:"notistack-CollapseWrapper",style:{display:"flex",width:"100%"}},r))}))}));q.displayName="Collapse";var P={right:"left",left:"right",bottom:"up",top:"down"},V=function(n){return"anchorOrigin"+m(n)};function W(n){return n.reduce((function(n,e){return null==e?n:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=[].concat(r);n.apply(this,o),e.apply(this,o)}}),(function(){}))}var A="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function I(n){var t=e.useRef(n);return A((function(){t.current=n})),e.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var z,B=e.forwardRef((function(n,t){var r=n.children,o=n.className,a=n.autoHideDuration,s=n.disableWindowBlurListener,u=void 0!==s&&s,c=n.onClose,l=n.id,d=n.open,f=n.SnackbarProps,p=void 0===f?{}:f,m=e.useRef(),h=I((function(){c&&c.apply(void 0,arguments)})),x=I((function(n){c&&null!=n&&(m.current&&clearTimeout(m.current),m.current=setTimeout((function(){h(null,"timeout",l)}),n))}));e.useEffect((function(){return d&&x(a),function(){m.current&&clearTimeout(m.current)}}),[d,a,x]);var E=function(){m.current&&clearTimeout(m.current)},v=e.useCallback((function(){null!=a&&x(.5*a)}),[a,x]);return e.useEffect((function(){if(!u&&d)return window.addEventListener("focus",v),window.addEventListener("blur",E),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",E)}}),[u,v,d]),e.createElement("div",Object.assign({ref:t},p,{className:i("notistack-Snackbar",o),onMouseEnter:function(n){p.onMouseEnter&&p.onMouseEnter(n),E()},onMouseLeave:function(n){p.onMouseLeave&&p.onMouseLeave(n),v()}}),r)}));B.displayName="Snackbar";var F=H({root:(z={display:"flex",flexWrap:"wrap",flexGrow:1},z["@media (min-width:600px)"]={flexGrow:"initial",minWidth:"288px"},z)}),Z=e.forwardRef((function(n,e){var r=n.className,o=d(n,["className"]);return t.createElement("div",Object.assign({ref:e,className:i(F.root,r)},o))}));Z.displayName="SnackbarContent";var _=H({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),G=e.forwardRef((function(n,e){var r=n.message,o=n.variant,a=n.hideIconVariant,s=n.style,u=n.iconVariant[o],c=n.action;return"function"==typeof c&&(c=c(n.id)),t.createElement(Z,{ref:e,role:"alert",style:s,className:i("notistack-MuiContent",_.root,_[o],!a&&u&&_.lessPadding)},t.createElement("div",{id:"notistack-snackbar",className:_.message},a?null:u,r),c&&t.createElement("div",{className:_.action},c))}));G.displayName="MaterialDesignContent";var X,Q,U,Y,J,K=e.memo(G),$=H({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nn=function(n){var r=e.useRef(),o=e.useState(!0),a=o[0],s=o[1],u=W([n.snack.onClose,n.onClose]),l=e.useCallback((function(){r.current=setTimeout((function(){s((function(n){return!n}))}),125)}),[]);e.useEffect((function(){return function(){r.current&&clearTimeout(r.current)}}),[]);var f,p=n.snack,m=n.classes,h=n.Component,x=void 0===h?K:h,E=e.useMemo((function(){return function(n){void 0===n&&(n={});var e={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(n).filter((function(n){return!e[n]})).reduce((function(e,t){var r;return c({},e,((r={})[t]=n[t],r))}),{})}(m)}),[m]),v=p.open,g=p.SnackbarProps,y=p.TransitionComponent,b=p.TransitionProps,k=p.transitionDuration,w=p.disableWindowBlurListener,C=p.content,S=d(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),T=c({direction:(f=S.anchorOrigin,"center"!==f.horizontal?P[f.horizontal]:P[f.vertical]),timeout:k},b),O=C;"function"==typeof O&&(O=O(S.id,S.message));var L=["onEnter","onEntered","onExit","onExited"].reduce((function(e,t){var r;return c({},e,((r={})[t]=W([n.snack[t],n[t]]),r))}),{});return t.createElement(q,{id:S.id,in:a,onExited:L.onExited},t.createElement(B,{open:v,id:S.id,disableWindowBlurListener:w,autoHideDuration:S.autoHideDuration,className:i($.wrappedRoot,E.root,E[V(S.anchorOrigin)]),SnackbarProps:g,onClose:u},t.createElement(y,Object.assign({},T,{id:S.id,in:v,onExit:L.onExit,onExited:l,onEnter:L.onEnter,onEntered:W([L.onEntered,function(){n.snack.requestClose&&u(null,"instructed",n.snack.id)}])}),O||t.createElement(x,Object.assign({},S)))))},en=H({root:(X={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:w(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},X[".notistack-CollapseWrapper"]={padding:"6px 0px",transition:"padding 300ms ease 0ms"},X.maxWidth="calc(100% - 40px)",X["@media (max-width:599.95px)"]={width:"100%",maxWidth:"calc(100% - 32px)"},X),rootDense:(Q={},Q[".notistack-CollapseWrapper"]={padding:"2px 0px"},Q),top:{top:"14px",flexDirection:"column"},bottom:{bottom:"14px",flexDirection:"column-reverse"},left:(U={left:"20px"},U["@media (min-width:600px)"]={alignItems:"flex-start"},U["@media (max-width:599.95px)"]={left:"16px"},U),right:(Y={right:"20px"},Y["@media (min-width:600px)"]={alignItems:"flex-end"},Y["@media (max-width:599.95px)"]={right:"16px"},Y),center:(J={left:"50%",transform:"translateX(-50%)"},J["@media (min-width:600px)"]={alignItems:"center"},J)}),tn=e.memo((function(n){var e=n.classes,r=void 0===e?{}:e,o=n.anchorOrigin,a=n.dense,s=n.children,u=i("notistack-SnackbarContainer",en[o.vertical],en[o.horizontal],en.root,r.containerRoot,r["containerAnchorOrigin"+m(o)],a&&en.rootDense);return t.createElement("div",{className:u},s)})),rn=function(n){return"string"!=typeof n},on=function(n){function e(e){var t;return(t=n.call(this,e)||this).enqueueSnackbar=function(n,e){void 0===e&&(e={});var r=rn(n)?n:e,o=n;rn(n)&&(o=n.message);var a=r.key,s=r.preventDuplicate,u=d(r,["key","preventDuplicate"]),l=h(a),f=l?a:(new Date).getTime()+Math.random(),p=function(n,e){return function(t,r){return void 0===r&&(r=!1),r?c({},j[t],{},e[t],{},n[t]):"autoHideDuration"===t?(o=e.autoHideDuration,(a=function(n){return"number"==typeof n||null===n})(i=n.autoHideDuration)?i:a(o)?o:j.autoHideDuration):"transitionDuration"===t?function(n,e){var t=function(n,e){return e.some((function(e){return typeof n===e}))};return t(n,["string","number"])?n:t(n,["object"])?c({},j.transitionDuration,{},t(e,["object"])&&e,{},n):t(e,["string","number"])?e:t(e,["object"])?c({},j.transitionDuration,{},e):j.transitionDuration}(n.transitionDuration,e.transitionDuration):n[t]||e[t]||j[t];var i,o,a}}(u,t.props),m=c({id:f},u,{message:o,open:!0,entered:!1,requestClose:!1,persist:p("persist"),action:p("action"),content:p("content"),variant:p("variant"),anchorOrigin:p("anchorOrigin"),disableWindowBlurListener:p("disableWindowBlurListener"),autoHideDuration:p("autoHideDuration"),hideIconVariant:p("hideIconVariant"),TransitionComponent:p("TransitionComponent"),transitionDuration:p("transitionDuration"),TransitionProps:p("TransitionProps",!0),iconVariant:p("iconVariant",!0),style:p("style",!0),SnackbarProps:p("SnackbarProps",!0),className:i(t.props.className,u.className)});return m.persist&&(m.autoHideDuration=void 0),t.setState((function(n){if(void 0===s&&t.props.preventDuplicate||s){var e=function(n){return l?n.id===f:n.message===o},r=n.queue.findIndex(e)>-1,i=n.snacks.findIndex(e)>-1;if(r||i)return n}return t.handleDisplaySnack(c({},n,{queue:[].concat(n.queue,[m])}))})),f},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var e=n.queue;return e.length>0?c({},n,{snacks:[].concat(n.snacks,[e[0]]),queue:e.slice(1,e.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some((function(n){return!n.open||n.requestClose})))return n;var e=!1,r=!1;n.snacks.reduce((function(n,e){return n+(e.open&&e.persist?1:0)}),0)===t.maxSnack&&(r=!0);var i=n.snacks.map((function(n){return e||n.persist&&!r?c({},n):(e=!0,n.entered?(n.onClose&&n.onClose(null,"maxsnack",n.id),t.props.onClose&&t.props.onClose(null,"maxsnack",n.id),c({},n,{open:!1})):c({},n,{requestClose:!0}))}));return c({},n,{snacks:i})},t.handleEnteredSnack=function(n,e,r){if(!h(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState((function(n){return{snacks:n.snacks.map((function(n){return n.id===r?c({},n,{entered:!0}):c({},n)}))}}))},t.handleCloseSnack=function(n,e,r){t.props.onClose&&t.props.onClose(n,e,r);var i=void 0===r;t.setState((function(n){var e=n.queue;return{snacks:n.snacks.map((function(n){return i||n.id===r?c({},n,n.entered?{open:!1}:{requestClose:!0}):c({},n)})),queue:e.filter((function(n){return n.id!==r}))}}))},t.closeSnackbar=function(n){var e=t.state.snacks.find((function(e){return e.id===n}));h(n)&&e&&e.onClose&&e.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,e){if(!h(e))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState((function(n){var r=t.processQueue(c({},n,{snacks:n.snacks.filter((function(n){return n.id!==e}))}));return 0===r.queue.length?r:t.handleDismissOldest(r)}))},t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar,closeSnackbar:t.closeSnackbar}},t}return l(e,n),e.prototype.render=function(){var n=this,e=this.state.contextValue,i=this.props,o=i.domRoot,a=i.children,s=i.dense,u=void 0!==s&&s,l=i.Components,d=void 0===l?{}:l,p=i.classes,h=this.state.snacks.reduce((function(n,e){var t,r=m(e.anchorOrigin);return c({},n,((t={})[r]=[].concat(n[r]||[],[e]),t))}),{}),x=Object.keys(h).map((function(e){var r=h[e];return t.createElement(tn,{key:e,dense:u,anchorOrigin:r[0].anchorOrigin,classes:p},r.map((function(e){return t.createElement(nn,{key:e.id,snack:e,classes:p,Component:d[e.variant],onClose:n.handleCloseSnack,onEnter:n.props.onEnter,onExit:n.props.onExit,onExited:W([n.handleExitedSnack,n.props.onExited]),onEntered:W([n.handleEnteredSnack,n.props.onEntered])})})))}));return t.createElement(f.Provider,{value:e},a,o?r.createPortal(x,o):x)},u(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||j.maxSnack}}]),e}(e.Component),an={entering:{opacity:1},entered:{opacity:1}},sn=e.forwardRef((function(n,t){var r=n.children,i=n.in,o=n.timeout,a=void 0===o?0:o,s=n.style,u=n.onEnter,l=n.onEntered,f=n.onExit,p=n.onExited,m=d(n,["children","in","timeout","style","onEnter","onEntered","onExit","onExited","direction"]),h=e.useRef(null),E=g(r.ref,t),v=g(h,E);return e.createElement(x,Object.assign({appear:!0,in:i,nodeRef:h,onEnter:function(n,e,t){b(n);var r=y({style:s,timeout:a,mode:"enter"});n.style.webkitTransition=w("opacity",r),n.style.transition=w("opacity",r),u&&u(n,e,t)},onEntered:l,onExit:function(n,e){var t=y({style:s,timeout:a,mode:"exit"});n.style.webkitTransition=w("opacity",t),n.style.transition=w("opacity",t),f&&f(n,e)},onExited:p,timeout:a},m),(function(n,t){return e.cloneElement(r,c({style:c({opacity:0,visibility:"exited"!==n||i?void 0:"hidden"},an[n],{},s,{},r.props.style),ref:v},t))}))}));function un(n){if(!n)return 0;var e=n/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}function cn(n){return"scale("+n+", "+Math.pow(n,2)+")"}sn.displayName="Fade";var ln={entering:{opacity:1,transform:cn(1)},entered:{opacity:1,transform:"none"}},dn=e.forwardRef((function(n,t){var r=n.children,i=n.in,o=n.style,a=n.timeout,s=void 0===a?"auto":a,u=n.onEnter,l=n.onEntered,f=n.onExit,p=n.onExited,m=d(n,["children","in","style","timeout","onEnter","onEntered","onExit","onExited"]),h=e.useRef(),E=e.useRef(),v=e.useRef(null),k=g(r.ref,v),C=g(k,t);return e.useEffect((function(){return function(){h.current&&clearTimeout(h.current)}}),[]),e.createElement(x,Object.assign({appear:!0,in:i,nodeRef:v,onEnter:function(n,e,t){b(n);var r=y({style:o,timeout:s,mode:"enter"}),i=r.delay,a=r.easing,c=r.duration;"string"==typeof c&&(c=un(n.clientHeight),E.current=c),n.style.transition=[w("opacity",{duration:c,delay:i}),w("transform",{delay:i,easing:a,duration:.666*c})].join(","),u&&u(n,e,t)},onEntered:l,onExit:function(n,e){var t=y({style:o,timeout:s,mode:"exit"}),r=t.delay,i=t.easing,a=t.duration;"string"==typeof a&&(a=un(n.clientHeight),E.current=a),n.style.transition=[w("opacity",{duration:a,delay:r}),w("transform",{easing:i,duration:.666*a,delay:r||.333*a})].join(","),n.style.opacity="0",n.style.transform=cn(.75),f&&f(n,e)},onExited:p,addEndListener:function(n){"auto"===s&&(h.current=setTimeout(n,E.current||0))},timeout:"auto"===s?null:s},m),(function(n,t){return e.cloneElement(r,c({style:c({opacity:0,transform:cn(.75),visibility:"exited"!==n||i?void 0:"hidden"},ln[n],{},o,{},r.props.style),ref:C},t))}))}));dn.displayName="Grow";var fn={entering:{transform:"none"},entered:{transform:"none"}},pn=e.forwardRef((function(n,t){var r=n.children,i=n.in,o=n.style,a=n.timeout,s=void 0===a?0:a,u=n.onEnter,l=n.onEntered,f=n.onExit,p=n.onExited,m=d(n,["children","in","style","timeout","onEnter","onEntered","onExit","onExited","direction"]),h=e.useRef(null),E=g(r.ref,t),v=g(h,E);return e.createElement(x,Object.assign({appear:!0,in:i,nodeRef:h,onEnter:function(n,e,t){b(n);var r=y({style:o,timeout:s,mode:"enter"});n.style.webkitTransition=w("transform",r),n.style.transition=w("transform",r),u&&u(n,e,t)},onEntered:l,onExit:function(n,e){var t=y({style:o,timeout:s,mode:"exit"});n.style.webkitTransition=w("transform",t),n.style.transition=w("transform",t),f&&f(n,e)},onExited:p,timeout:s},m),(function(n,t){return e.cloneElement(r,c({style:c({transform:"scale(0)",visibility:"exited"!==n||i?void 0:"hidden"},fn[n],{},o,{},r.props.style),ref:v},t))}))}));pn.displayName="Zoom",exports.Fade=sn,exports.Grow=dn,exports.Slide=T,exports.SnackbarContent=Z,exports.SnackbarProvider=on,exports.Zoom=pn,exports.useSnackbar=function(){return e.useContext(f)},exports.withSnackbar=function(n){var e=t.forwardRef((function(e,r){return t.createElement(f.Consumer,null,(function(i){return t.createElement(n,c({},e,{ref:r,enqueueSnackbar:i.enqueueSnackbar,closeSnackbar:i.closeSnackbar}))}))}));return a(e,n),e};
"use strict";function n(n){return n&&"object"==typeof n&&"default"in n?n.default:n}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=n(e),r=require("react-dom"),i=n(require("clsx")),o=require("goober"),a=n(require("hoist-non-react-statics"));function s(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function u(n,e,t){return e&&s(n.prototype,e),t&&s(n,t),n}function c(){return(c=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}function l(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function d(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)e.indexOf(t=o[r])>=0||(i[t]=n[t]);return i}var f=t.createContext(),p=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},m=function(n){return""+p(n.vertical)+p(n.horizontal)},h=function(n){return!!n||0===n},x=function(n){function e(e){var t;t=n.call(this,e)||this;var r,i=e.appear;return t.appearStatus=null,e.in?i?(r="exited",t.appearStatus="entering"):r="entered":r=e.unmountOnExit||e.mountOnEnter?"unmounted":"exited",t.state={status:r},t.nextCallback=null,t}l(e,n),e.getDerivedStateFromProps=function(n,e){return n.in&&"unmounted"===e.status?{status:"exited"}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(n){var e=null;if(n!==this.props){var t=this.state.status;this.props.in?"entering"!==t&&"entered"!==t&&(e="entering"):"entering"!==t&&"entered"!==t||(e="exiting")}this.updateStatus(!1,e)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var n=this.props.timeout,e=n,t=n;return null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter),{exit:t,enter:e}},t.updateStatus=function(n,e){void 0===n&&(n=!1),null!==e?(this.cancelNextCallback(),"entering"===e?this.performEnter(n):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},t.performEnter=function(n){var e=this,t=this.props,r=t.enter,i=t.id,o=n,a=this.getTimeouts();n||r?(this.props.onEnter(this.node,o,i),this.safeSetState({status:"entering"},(function(){e.props.onEntering(e.node,o,i),e.onTransitionEnd(a.enter,(function(){e.safeSetState({status:"entered"},(function(){e.props.onEntered(e.node,o,i)}))}))}))):this.safeSetState({status:"entered"},(function(){e.props.onEntered(e.node,o,i)}))},t.performExit=function(){var n=this,e=this.props,t=e.exit,r=e.id,i=this.getTimeouts();t?(this.props.onExit(this.node,r),this.safeSetState({status:"exiting"},(function(){n.props.onExiting(n.node,r),n.onTransitionEnd(i.exit,(function(){n.safeSetState({status:"exited"},(function(){n.props.onExited(n.node,r)}))}))}))):this.safeSetState({status:"exited"},(function(){n.props.onExited(n.node,r)}))},t.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(n,e){e=this.setNextCallback(e),this.setState(n,e)},t.setNextCallback=function(n){var e=this,t=!0;return this.nextCallback=function(r){t&&(t=!1,e.nextCallback=null,n(r))},this.nextCallback.cancel=function(){t=!1},this.nextCallback},t.onTransitionEnd=function(n,e){this.setNextCallback(e),!this.node||null==n&&!this.props.addEndListener?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=n&&setTimeout(this.nextCallback,n))},t.render=function(){var n=this.state.status;if("unmounted"===n)return null;var e=this.props;return(0,e.children)(n,d(e,["children","id","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},u(e,[{key:"node",get:function(){var n=this.props.nodeRef.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),e}(t.Component);function g(){}function v(n,e){"function"==typeof n?n(e):n&&(n.current=e)}function E(n,t){return e.useMemo((function(){return null==n&&null==t?null:function(e){v(n,e),v(t,e)}}),[n,t])}function b(n){var e,t=n.timeout,r=n.style,i=void 0===r?{}:r;return{duration:null!==(e=i.transitionDuration)&&void 0!==e?e:"object"==typeof t?t[n.mode]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}x.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g};var y=function(n){n.scrollTop=n.scrollTop},k=function(n){return Math.round(n)+"ms"};function C(n,e){void 0===n&&(n=["all"]);var t=e||{},r=t.duration,i=void 0===r?300:r,o=t.easing,a=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=t.delay,u=void 0===s?0:s;return(Array.isArray(n)?n:[n]).map((function(n){var e="string"==typeof i?i:k(i),t="string"==typeof u?u:k(u);return n+" "+e+" "+a+" "+t})).join(",")}function w(n){return function(n){return n&&n.ownerDocument||document}(n).defaultView||window}function S(n,e){if(e){var t=function(n,e){var t,r=e.getBoundingClientRect(),i=w(e);if(e.fakeTransform)t=e.fakeTransform;else{var o=i.getComputedStyle(e);t=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(t&&"none"!==t&&"string"==typeof t){var u=t.split("(")[1].split(")")[0].split(",");a=parseInt(u[4],10),s=parseInt(u[5],10)}switch(n){case"left":return"translateX("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(n,e);t&&(e.style.webkitTransform=t,e.style.transform=t)}}var T=e.forwardRef((function(n,t){var r=n.children,i=n.direction,o=void 0===i?"down":i,a=n.in,s=n.style,u=n.timeout,l=void 0===u?0:u,f=n.onEnter,p=n.onEntered,m=n.onExit,h=n.onExited,g=d(n,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=e.useRef(null),k=E(r.ref,v),T=E(k,t),L=e.useCallback((function(){v.current&&S(o,v.current)}),[o]);return e.useEffect((function(){if(!a&&"down"!==o&&"right"!==o){var n=function(n,e){var t;function r(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){n.apply(r,o)};clearTimeout(t),t=setTimeout(s,e)}return void 0===e&&(e=166),r.clear=function(){clearTimeout(t)},r}((function(){v.current&&S(o,v.current)})),e=w(v.current);return e.addEventListener("resize",n),function(){n.clear(),e.removeEventListener("resize",n)}}}),[o,a]),e.useEffect((function(){a||L()}),[a,L]),e.createElement(x,Object.assign({appear:!0,nodeRef:v,onEnter:function(n,e,t){S(o,n),y(n),f&&f(n,e,t)},onEntered:p,onEntering:function(n){var e=b({timeout:l,mode:"enter",style:c({},s,{transitionTimingFunction:(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)"})});n.style.webkitTransition=C("-webkit-transform",e),n.style.transition=C("transform",e),n.style.webkitTransform="none",n.style.transform="none"},onExit:function(n,e){var t=b({timeout:l,mode:"exit",style:c({},s,{transitionTimingFunction:(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)"})});n.style.webkitTransition=C("-webkit-transform",t),n.style.transition=C("transform",t),S(o,n),m&&m(n,e)},onExited:function(n,e){n.style.webkitTransition="",n.style.transition="",h&&h(n,e)},in:a,timeout:l},g),(function(n,t){return e.cloneElement(r,c({ref:T,style:c({visibility:"exited"!==n||a?void 0:"hidden"},s,{},r.props.style)},t))}))}));T.displayName="Slide";var L=function(n){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},n))},O=function(){return t.createElement(L,null,t.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},D=function(){return t.createElement(L,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},R=function(){return t.createElement(L,null,t.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},H=function(){return t.createElement(L,null,t.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},M={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(O,null),warning:t.createElement(D,null),error:t.createElement(R,null),info:t.createElement(H,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:T,transitionDuration:{enter:225,exit:195}};function N(n){return Object.entries(n).reduce((function(n,e){var t;return c({},n,((t={})[e[0]]=o.css(e[1]),t))}),{})}var j=N({root:{height:0},entered:{height:"auto"}}),q=e.forwardRef((function(n,t){var r=n.children,o=n.in,a=n.onExited,s=n.id,u=e.useRef(null),l=e.useRef(null),d=E(t,l),f=function(){return u.current?u.current.clientHeight:0};return e.createElement(x,{id:s,in:o,unmountOnExit:!0,onEnter:function(n){n.style.height="0px"},onEntered:function(n){n.style.height="auto"},onEntering:function(n){var e=f(),t=b({timeout:175,mode:"enter"}),r=t.duration,i=t.easing;n.style.transitionDuration="string"==typeof r?r:r+"ms",n.style.height=e+"px",n.style.transitionTimingFunction=i||""},onExit:function(n){n.style.height=f()+"px"},onExited:a,onExiting:function(n){y(n);var e=b({timeout:175,mode:"exit"}),t=e.duration,r=e.easing;n.style.transitionDuration="string"==typeof t?t:t+"ms",n.style.height="0px",n.style.transitionTimingFunction=r||""},nodeRef:l,timeout:175},(function(n,t){return e.createElement("div",Object.assign({ref:d,className:i(j.root,"entered"===n&&j.entered),style:c({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:C("height")},"entered"===n&&{overflow:"visible"},{},"exited"===n&&!o&&{visibility:"hidden"})},t),e.createElement("div",{ref:u,className:"notistack-CollapseWrapper",style:{display:"flex",width:"100%"}},r))}))}));q.displayName="Collapse";var P={right:"left",left:"right",bottom:"up",top:"down"},V=function(n){return"anchorOrigin"+m(n)};function W(n){return n.reduce((function(n,e){return null==e?n:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=[].concat(r);n.apply(this,o),e.apply(this,o)}}),(function(){}))}var A="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function I(n){var t=e.useRef(n);return A((function(){t.current=n})),e.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var z,B=e.forwardRef((function(n,t){var r=n.children,o=n.className,a=n.autoHideDuration,s=n.disableWindowBlurListener,u=void 0!==s&&s,c=n.onClose,l=n.id,d=n.open,f=n.SnackbarProps,p=void 0===f?{}:f,m=e.useRef(),h=I((function(){c&&c.apply(void 0,arguments)})),x=I((function(n){c&&null!=n&&(m.current&&clearTimeout(m.current),m.current=setTimeout((function(){h(null,"timeout",l)}),n))}));e.useEffect((function(){return d&&x(a),function(){m.current&&clearTimeout(m.current)}}),[d,a,x]);var g=function(){m.current&&clearTimeout(m.current)},v=e.useCallback((function(){null!=a&&x(.5*a)}),[a,x]);return e.useEffect((function(){if(!u&&d)return window.addEventListener("focus",v),window.addEventListener("blur",g),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",g)}}),[u,v,d]),e.createElement("div",Object.assign({ref:t},p,{className:i("notistack-Snackbar",o),onMouseEnter:function(n){p.onMouseEnter&&p.onMouseEnter(n),g()},onMouseLeave:function(n){p.onMouseLeave&&p.onMouseLeave(n),v()}}),r)}));B.displayName="Snackbar";var F=N({root:(z={display:"flex",flexWrap:"wrap",flexGrow:1},z["@media (min-width:600px)"]={flexGrow:"initial",minWidth:"288px"},z)}),_=e.forwardRef((function(n,e){var r=n.className,o=d(n,["className"]);return t.createElement("div",Object.assign({ref:e,className:i(F.root,r)},o))}));_.displayName="SnackbarContent";var G=N({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),X=e.forwardRef((function(n,e){var r=n.message,o=n.variant,a=n.hideIconVariant,s=n.style,u=n.iconVariant[o],c=n.action;return"function"==typeof c&&(c=c(n.id)),t.createElement(_,{ref:e,role:"alert",style:s,className:i("notistack-MuiContent",G.root,G[o],!a&&u&&G.lessPadding)},t.createElement("div",{id:"notistack-snackbar",className:G.message},a?null:u,r),c&&t.createElement("div",{className:G.action},c))}));X.displayName="MaterialDesignContent";var Z,Q,U,Y,J,K=e.memo(X),$=N({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nn=function(n){var r=e.useRef(),o=e.useState(!0),a=o[0],s=o[1],u=W([n.snack.onClose,n.onClose]),l=e.useCallback((function(){r.current=setTimeout((function(){s((function(n){return!n}))}),125)}),[]);e.useEffect((function(){return function(){r.current&&clearTimeout(r.current)}}),[]);var f,p=n.snack,m=n.classes,h=n.Component,x=void 0===h?K:h,g=e.useMemo((function(){return function(n){void 0===n&&(n={});var e={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(n).filter((function(n){return!e[n]})).reduce((function(e,t){var r;return c({},e,((r={})[t]=n[t],r))}),{})}(m)}),[m]),v=p.open,E=p.SnackbarProps,b=p.TransitionComponent,y=p.TransitionProps,k=p.transitionDuration,C=p.disableWindowBlurListener,w=p.content,S=d(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),T=c({direction:(f=S.anchorOrigin,"center"!==f.horizontal?P[f.horizontal]:P[f.vertical]),timeout:k},y),L=w;"function"==typeof L&&(L=L(S.id,S.message));var O=["onEnter","onEntered","onExit","onExited"].reduce((function(e,t){var r;return c({},e,((r={})[t]=W([n.snack[t],n[t]]),r))}),{});return t.createElement(q,{id:S.id,in:a,onExited:O.onExited},t.createElement(B,{open:v,id:S.id,disableWindowBlurListener:C,autoHideDuration:S.autoHideDuration,className:i($.wrappedRoot,g.root,g[V(S.anchorOrigin)]),SnackbarProps:E,onClose:u},t.createElement(b,Object.assign({},T,{id:S.id,in:v,onExit:O.onExit,onExited:l,onEnter:O.onEnter,onEntered:W([O.onEntered,function(){n.snack.requestClose&&u(null,"instructed",n.snack.id)}])}),L||t.createElement(x,Object.assign({},S)))))},en=N({root:(Z={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:C(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Z[".notistack-CollapseWrapper"]={padding:"6px 0px",transition:"padding 300ms ease 0ms"},Z.maxWidth="calc(100% - 40px)",Z["@media (max-width:599.95px)"]={width:"100%",maxWidth:"calc(100% - 32px)"},Z),rootDense:(Q={},Q[".notistack-CollapseWrapper"]={padding:"2px 0px"},Q),top:{top:"14px",flexDirection:"column"},bottom:{bottom:"14px",flexDirection:"column-reverse"},left:(U={left:"20px"},U["@media (min-width:600px)"]={alignItems:"flex-start"},U["@media (max-width:599.95px)"]={left:"16px"},U),right:(Y={right:"20px"},Y["@media (min-width:600px)"]={alignItems:"flex-end"},Y["@media (max-width:599.95px)"]={right:"16px"},Y),center:(J={left:"50%",transform:"translateX(-50%)"},J["@media (min-width:600px)"]={alignItems:"center"},J)}),tn=e.memo((function(n){var e=n.classes,r=void 0===e?{}:e,o=n.anchorOrigin,a=n.dense,s=n.children,u=i("notistack-SnackbarContainer",en[o.vertical],en[o.horizontal],en.root,r.containerRoot,r["containerAnchorOrigin"+m(o)],a&&en.rootDense);return t.createElement("div",{className:u},s)})),rn=function(n){return"string"!=typeof n},on=function(n){function e(e){var t;return(t=n.call(this,e)||this).enqueueSnackbar=function(n,e){void 0===e&&(e={});var r=rn(n)?n:e,o=n;rn(n)&&(o=n.message);var a=r.key,s=r.preventDuplicate,u=d(r,["key","preventDuplicate"]),l=h(a),f=l?a:(new Date).getTime()+Math.random(),p=function(n,e){return function(t,r){return void 0===r&&(r=!1),r?c({},M[t],{},e[t],{},n[t]):"autoHideDuration"===t?(o=e.autoHideDuration,(a=function(n){return"number"==typeof n||null===n})(i=n.autoHideDuration)?i:a(o)?o:M.autoHideDuration):"transitionDuration"===t?function(n,e){var t=function(n,e){return e.some((function(e){return typeof n===e}))};return t(n,["string","number"])?n:t(n,["object"])?c({},M.transitionDuration,{},t(e,["object"])&&e,{},n):t(e,["string","number"])?e:t(e,["object"])?c({},M.transitionDuration,{},e):M.transitionDuration}(n.transitionDuration,e.transitionDuration):n[t]||e[t]||M[t];var i,o,a}}(u,t.props),m=c({id:f},u,{message:o,open:!0,entered:!1,requestClose:!1,persist:p("persist"),action:p("action"),content:p("content"),variant:p("variant"),anchorOrigin:p("anchorOrigin"),disableWindowBlurListener:p("disableWindowBlurListener"),autoHideDuration:p("autoHideDuration"),hideIconVariant:p("hideIconVariant"),TransitionComponent:p("TransitionComponent"),transitionDuration:p("transitionDuration"),TransitionProps:p("TransitionProps",!0),iconVariant:p("iconVariant",!0),style:p("style",!0),SnackbarProps:p("SnackbarProps",!0),className:i(t.props.className,u.className)});return m.persist&&(m.autoHideDuration=void 0),t.setState((function(n){if(void 0===s&&t.props.preventDuplicate||s){var e=function(n){return l?n.id===f:n.message===o},r=n.queue.findIndex(e)>-1,i=n.snacks.findIndex(e)>-1;if(r||i)return n}return t.handleDisplaySnack(c({},n,{queue:[].concat(n.queue,[m])}))})),f},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var e=n.queue;return e.length>0?c({},n,{snacks:[].concat(n.snacks,[e[0]]),queue:e.slice(1,e.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some((function(n){return!n.open||n.requestClose})))return n;var e=!1,r=!1;n.snacks.reduce((function(n,e){return n+(e.open&&e.persist?1:0)}),0)===t.maxSnack&&(r=!0);var i=n.snacks.map((function(n){return e||n.persist&&!r?c({},n):(e=!0,n.entered?(n.onClose&&n.onClose(null,"maxsnack",n.id),t.props.onClose&&t.props.onClose(null,"maxsnack",n.id),c({},n,{open:!1})):c({},n,{requestClose:!0}))}));return c({},n,{snacks:i})},t.handleEnteredSnack=function(n,e,r){if(!h(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState((function(n){return{snacks:n.snacks.map((function(n){return n.id===r?c({},n,{entered:!0}):c({},n)}))}}))},t.handleCloseSnack=function(n,e,r){t.props.onClose&&t.props.onClose(n,e,r);var i=void 0===r;t.setState((function(n){var e=n.queue;return{snacks:n.snacks.map((function(n){return i||n.id===r?c({},n,n.entered?{open:!1}:{requestClose:!0}):c({},n)})),queue:e.filter((function(n){return n.id!==r}))}}))},t.closeSnackbar=function(n){var e=t.state.snacks.find((function(e){return e.id===n}));h(n)&&e&&e.onClose&&e.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,e){if(!h(e))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState((function(n){var r=t.processQueue(c({},n,{snacks:n.snacks.filter((function(n){return n.id!==e}))}));return 0===r.queue.length?r:t.handleDismissOldest(r)}))},t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar,closeSnackbar:t.closeSnackbar}},t}return l(e,n),e.prototype.render=function(){var n=this,e=this.state.contextValue,i=this.props,o=i.domRoot,a=i.children,s=i.dense,u=void 0!==s&&s,l=i.Components,d=void 0===l?{}:l,p=i.classes,h=this.state.snacks.reduce((function(n,e){var t,r=m(e.anchorOrigin);return c({},n,((t={})[r]=[].concat(n[r]||[],[e]),t))}),{}),x=Object.keys(h).map((function(e){var r=h[e];return t.createElement(tn,{key:e,dense:u,anchorOrigin:r[0].anchorOrigin,classes:p},r.map((function(e){return t.createElement(nn,{key:e.id,snack:e,classes:p,Component:d[e.variant],onClose:n.handleCloseSnack,onEnter:n.props.onEnter,onExit:n.props.onExit,onExited:W([n.handleExitedSnack,n.props.onExited]),onEntered:W([n.handleEnteredSnack,n.props.onEntered])})})))}));return t.createElement(f.Provider,{value:e},a,o?r.createPortal(x,o):x)},u(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||M.maxSnack}}]),e}(e.Component);function an(n){if(!n)return 0;var e=n/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}function sn(n){return"scale("+n+", "+Math.pow(n,2)+")"}var un={entering:{opacity:1,transform:sn(1)},entered:{opacity:1,transform:"none"}},cn=e.forwardRef((function(n,t){var r=n.children,i=n.in,o=n.style,a=n.timeout,s=void 0===a?"auto":a,u=n.onEnter,l=n.onEntered,f=n.onExit,p=n.onExited,m=d(n,["children","in","style","timeout","onEnter","onEntered","onExit","onExited"]),h=e.useRef(),g=e.useRef(),v=e.useRef(null),k=E(r.ref,v),w=E(k,t);return e.useEffect((function(){return function(){h.current&&clearTimeout(h.current)}}),[]),e.createElement(x,Object.assign({appear:!0,in:i,nodeRef:v,onEnter:function(n,e,t){y(n);var r=b({style:o,timeout:s,mode:"enter"}),i=r.delay,a=r.easing,c=r.duration;"string"==typeof c&&(c=an(n.clientHeight),g.current=c),n.style.transition=[C("opacity",{duration:c,delay:i}),C("transform",{delay:i,easing:a,duration:.666*c})].join(","),u&&u(n,e,t)},onEntered:l,onExit:function(n,e){var t=b({style:o,timeout:s,mode:"exit"}),r=t.delay,i=t.easing,a=t.duration;"string"==typeof a&&(a=an(n.clientHeight),g.current=a),n.style.transition=[C("opacity",{duration:a,delay:r}),C("transform",{easing:i,duration:.666*a,delay:r||.333*a})].join(","),n.style.opacity="0",n.style.transform=sn(.75),f&&f(n,e)},onExited:p,addEndListener:function(n){"auto"===s&&(h.current=setTimeout(n,g.current||0))},timeout:"auto"===s?null:s},m),(function(n,t){return e.cloneElement(r,c({style:c({opacity:0,transform:sn(.75),visibility:"exited"!==n||i?void 0:"hidden"},un[n],{},o,{},r.props.style),ref:w},t))}))}));cn.displayName="Grow",exports.Grow=cn,exports.Slide=T,exports.SnackbarContent=_,exports.SnackbarProvider=on,exports.useSnackbar=function(){return e.useContext(f)},exports.withSnackbar=function(n){var e=t.forwardRef((function(e,r){return t.createElement(f.Consumer,null,(function(i){return t.createElement(n,c({},e,{ref:r,enqueueSnackbar:i.enqueueSnackbar,closeSnackbar:i.closeSnackbar}))}))}));return a(e,n),e};
//# sourceMappingURL=ee54bh78i.cjs.production.min.js.map

@@ -1855,76 +1855,2 @@ import React__default, { useMemo, forwardRef, useRef, useCallback, useEffect, createElement, cloneElement, useLayoutEffect, memo, useState, Component, useContext } from 'react';

var styles$2 = {
entering: {
opacity: 1
},
entered: {
opacity: 1
}
};
var Fade = /*#__PURE__*/forwardRef(function (props, ref) {
var children = props.children,
inProp = props["in"],
_props$timeout = props.timeout,
timeout = _props$timeout === void 0 ? 0 : _props$timeout,
style = props.style,
onEnter = props.onEnter,
onEntered = props.onEntered,
onExit = props.onExit,
onExited = props.onExited,
other = _objectWithoutPropertiesLoose(props, ["children", "in", "timeout", "style", "onEnter", "onEntered", "onExit", "onExited", "direction"]);
var nodeRef = useRef(null);
var handleRefIntermediary = useForkRef(children.ref, ref);
var handleRef = useForkRef(nodeRef, handleRefIntermediary);
var handleEnter = function handleEnter(node, isAppearing, snackId) {
reflow(node);
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'enter'
});
node.style.webkitTransition = createTransition('opacity', transitionProps);
node.style.transition = createTransition('opacity', transitionProps);
if (onEnter) {
onEnter(node, isAppearing, snackId);
}
};
var handleExit = function handleExit(node, snackId) {
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'exit'
});
node.style.webkitTransition = createTransition('opacity', transitionProps);
node.style.transition = createTransition('opacity', transitionProps);
if (onExit) {
onExit(node, snackId);
}
};
return createElement(Transition, Object.assign({
appear: true,
"in": inProp,
nodeRef: nodeRef,
onEnter: handleEnter,
onEntered: onEntered,
onExit: handleExit,
onExited: onExited,
timeout: timeout
}, other), function (status, childProps) {
return cloneElement(children, _extends({
style: _extends({
opacity: 0,
visibility: status === 'exited' && !inProp ? 'hidden' : undefined
}, styles$2[status], {}, style, {}, children.props.style),
ref: handleRef
}, childProps));
});
});
Fade.displayName = 'Fade';
/**

@@ -1947,3 +1873,3 @@ * https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10

var styles$3 = {
var styles$2 = {
entering: {

@@ -2073,3 +1999,3 @@ opacity: 1,

visibility: state === 'exited' && !inProp ? 'hidden' : undefined
}, styles$3[state], {}, style, {}, children.props.style),
}, styles$2[state], {}, style, {}, children.props.style),
ref: handleRef

@@ -2081,77 +2007,3 @@ }, childProps));

var styles$4 = {
entering: {
transform: 'none'
},
entered: {
transform: 'none'
}
};
var Zoom = /*#__PURE__*/forwardRef(function (props, ref) {
var children = props.children,
inProp = props["in"],
style = props.style,
_props$timeout = props.timeout,
timeout = _props$timeout === void 0 ? 0 : _props$timeout,
onEnter = props.onEnter,
onEntered = props.onEntered,
onExit = props.onExit,
onExited = props.onExited,
other = _objectWithoutPropertiesLoose(props, ["children", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited", "direction"]);
var nodeRef = useRef(null);
var handleRefIntermediary = useForkRef(children.ref, ref);
var handleRef = useForkRef(nodeRef, handleRefIntermediary);
var handleEnter = function handleEnter(node, isAppearing, snackId) {
reflow(node);
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'enter'
});
node.style.webkitTransition = createTransition('transform', transitionProps);
node.style.transition = createTransition('transform', transitionProps);
if (onEnter) {
onEnter(node, isAppearing, snackId);
}
};
var handleExit = function handleExit(node, snackId) {
var transitionProps = getTransitionProps({
style: style,
timeout: timeout,
mode: 'exit'
});
node.style.webkitTransition = createTransition('transform', transitionProps);
node.style.transition = createTransition('transform', transitionProps);
if (onExit) {
onExit(node, snackId);
}
};
return createElement(Transition, Object.assign({
appear: true,
"in": inProp,
nodeRef: nodeRef,
onEnter: handleEnter,
onEntered: onEntered,
onExit: handleExit,
onExited: onExited,
timeout: timeout
}, other), function (state, childProps) {
return cloneElement(children, _extends({
style: _extends({
transform: 'scale(0)',
visibility: state === 'exited' && !inProp ? 'hidden' : undefined
}, styles$4[state], {}, style, {}, children.props.style),
ref: handleRef
}, childProps));
});
});
Zoom.displayName = 'Zoom';
export { Fade, Grow, Slide, SnackbarContent, SnackbarProvider, Zoom, useSnackbar, withSnackbar };
export { Grow, Slide, SnackbarContent, SnackbarProvider, useSnackbar, withSnackbar };
//# sourceMappingURL=ee54bh78i.esm.js.map
{
"name": "ee54bh78i",
"version": "3.0.0-alpha.7",
"version": "3.0.0-alpha.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "./index.js",

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