diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b2339..4611540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.1] - 2021-09-22 +### Changed +- Update material-ui peer-dep to 5.0 + ## [2.1.5-next] - 2021-06-08 ### Fixed - Fixed an issue with the Hide component having the wrong arguments diff --git a/dist/index.js b/dist/index.js index 30d99d8..caf7b26 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11,7 +11,7 @@ object-assign (c) Sindre Sorhus @license MIT -*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=s(e),l=1;l=0||(i[n]=e[n]);return i}function d(){return(d=Object.assign||function(e){for(var t=1;t<+~=|^:(),"'`\s])/g,B="undefined"!=typeof CSS&&CSS.escape,A=function(e){return B?B(e):e.replace(E,"\\$1")},I=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,s=e in this.style;if(o&&!s&&!r)return this;var a=o&&s;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),_=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,s=r.scoped,a=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==s&&(i.id=u(x(x(i)),a),i.selectorText="."+A(i.id)),i}b(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=O(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return j(this.selectorText,this.style,n)},v(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(I),N={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new _(e,t,n)}},T={indent:1,children:!0},M=/@([\w-]+)/,q=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(M);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new se(d({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){void 0===e&&(e=T);var t=C(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),D=/@media|@supports\s+/,L={onCreateRule:function(e,t,n){return D.test(e)?new q(e,t,n):null}},U={indent:1,children:!0},$=/@keyframes\s+([\w-]+)/,G=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match($);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,s=n.generateId;for(var a in this.id=!1===i?this.name:A(s(this,o)),this.rules=new se(d({},n,{parent:this})),t)this.rules.add(a,t[a],d({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=U);var t=C(e).linebreak;if(null==e.indent&&(e.indent=U.indent),null==e.children&&(e.children=U.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),V=/@keyframes\s+/,W=/\$([\w-]+)/g,z=function(e,t){return"string"==typeof e?e.replace(W,(function(e,n){return n in t?t[n]:e})):e},F=function(e,t,n){var r=e[t],i=z(r,n);i!==r&&(e[t]=i)},J={onCreateRule:function(e,t,n){return"string"==typeof e&&V.test(e)?new G(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&F(e,"animation-name",n.keyframes),"animation"in e&&F(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return z(e,r.keyframes);default:return e}}},H=function(e){function t(){return e.apply(this,arguments)||this}return b(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return j(this.key,this.style,n)},t}(I),Y={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new H(e,t,n):null}},Q=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=C(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=p(t,["attached"]),i=C(r).linebreak,o="",s=0;s0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=be(),n=0;nn?n:t},ke=function(){function e(e){this.getPropertyValue=ye,this.setProperty=me,this.removeProperty=ve,this.setSelector=ge,this.hasInsertedRules=!1,this.cssRules=[],e&&le.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=we();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=xe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else be().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}function d(){return(d=Object.assign||function(e){for(var t=1;t<+~=|^:(),"'`\s])/g,B="undefined"!=typeof CSS&&CSS.escape,A=function(e){return B?B(e):e.replace(E,"\\$1")},I=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,s=e in this.style;if(o&&!s&&!r)return this;var a=o&&s;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),_=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,s=r.scoped,a=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==s&&(i.id=u(x(x(i)),a),i.selectorText="."+A(i.id)),i}b(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=O(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return j(this.selectorText,this.style,n)},v(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(I),N={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new _(e,t,n)}},T={indent:1,children:!0},M=/@([\w-]+)/,q=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(M);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new se(d({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){void 0===e&&(e=T);var t=C(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),L=/@media|@supports\s+/,D={onCreateRule:function(e,t,n){return L.test(e)?new q(e,t,n):null}},U={indent:1,children:!0},$=/@keyframes\s+([\w-]+)/,G=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match($);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,s=n.generateId;for(var a in this.id=!1===i?this.name:A(s(this,o)),this.rules=new se(d({},n,{parent:this})),t)this.rules.add(a,t[a],d({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=U);var t=C(e).linebreak;if(null==e.indent&&(e.indent=U.indent),null==e.children&&(e.children=U.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),V=/@keyframes\s+/,W=/\$([\w-]+)/g,z=function(e,t){return"string"==typeof e?e.replace(W,(function(e,n){return n in t?t[n]:e})):e},F=function(e,t,n){var r=e[t],i=z(r,n);i!==r&&(e[t]=i)},J={onCreateRule:function(e,t,n){return"string"==typeof e&&V.test(e)?new G(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&F(e,"animation-name",n.keyframes),"animation"in e&&F(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return z(e,r.keyframes);default:return e}}},H=function(e){function t(){return e.apply(this,arguments)||this}return b(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return j(this.key,this.style,n)},t}(I),Y={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new H(e,t,n):null}},Q=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=C(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=p(t,["attached"]),i=C(r).linebreak,o="",s=0;s0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=be(),n=0;nn?n:t},ke=function(){function e(e){this.getPropertyValue=ye,this.setProperty=me,this.removeProperty=ve,this.setSelector=ge,this.hasInsertedRules=!1,this.cssRules=[],e&&le.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=we();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=xe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else be().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n{n[e]&&(i[e]=`${t[e]} ${n[e]}`)}),i}var Be={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};var Ae=r.createContext(null);var Ie="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const _e=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Ne=Date.now(),Te="fnValues"+Ne,Me="fnStyle"+ ++Ne,qe=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[Me]=t,r},onProcessStyle:function(e,t){if(Te in t||Me in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Te]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Me];o&&(i.style=o(e)||{});var s=i[Te];if(s)for(var a in s)i.prop(a,s[a](e),r)}}},De="@global",Le=function(){function e(e,t,n){for(var r in this.type="global",this.at=De,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new se(d({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Ue=function(){function e(e,t,n){this.type="global",this.at=De,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,d({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),$e=/\s*,\s*/g;function Ge(e,t){for(var n=e.split($e),r="",i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1){var i=Wt[e];if(!Array.isArray(i))return gt+jt(i)in t&&bt+i;if(!r)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o(o+=1,o);return(e,o)=>{const a=o.options.name;if(a&&0===a.indexOf("Mui")&&!o.options.link&&!t){if(-1!==_e.indexOf(e.key))return"Mui-"+e.key;const t=`${i}${a}-${e.key}`;return o.options.theme[Ie]&&""===r?`${t}-${s()}`:t}return`${i}${n}${s()}`}}(),jss:cn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},pn=r.createContext(fn);let dn=-1e9;function hn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function yn(e,t,n={clone:!0}){const r=n.clone?d({},e):e;return hn(e)&&hn(t)&&Object.keys(t).forEach(i=>{"__proto__"!==i&&(hn(t[i])&&i in e&&hn(e[i])?r[i]=yn(e[i],t[i],n):r[i]=t[i])}),r}function mn(e){if("string"!=typeof e)throw new Error(function(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e{let i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},s=n.components[r].variants||[],a=d({},i);return Object.keys(o).forEach(e=>{a[e]=yn(a[e]||{},o[e])}),s.forEach(e=>{const t=function(e){const{variant:t}=e,n=p(e,vn);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?gn(r)?e[t]:mn(e[t]):`${gn(r)?t:mn(t)}${mn(e[t].toString())}`}),r}(e.props);a[t]=yn(a[t]||{},e.style)}),a},options:{}}}var xn={};const wn=["name","classNamePrefix","Component","defaultTheme"];function Sn({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:i},o){if(n.disableGeneration)return;let s=Be.get(n.sheetsManager,r,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Be.set(n.sheetsManager,r,t,s));const a=d({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});a.generateId=a.serverGenerateClassName||a.generateClassName;const u=n.sheetsRegistry;if(0===s.refs){let e;n.sheetsCache&&(e=Be.get(n.sheetsCache,r,t));const o=r.create(t,i);e||(e=n.jss.createStyleSheet(o,d({link:!1},a)),e.attach(),n.sheetsCache&&Be.set(n.sheetsCache,r,t,e)),u&&u.add(e),s.staticSheet=e,s.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var s=e(i);s&&(n||(n={}),n[r]=s)}}return n}(o)}if(s.dynamicStyles){const t=n.jss.createStyleSheet(s.dynamicStyles,d({link:!0},a));t.update(o),t.attach(),e.dynamicSheet=t,e.classes=Ee({baseClasses:s.staticSheet.classes,newClasses:t.classes}),u&&u.add(t)}else e.classes=s.staticSheet.classes;s.refs+=1}var Pn=function(){return Object(f.useMediaQuery)((function(e){return e.breakpoints.down("md")}),{noSsr:!0})},kn=function(e){var t=e.mdUp,n=void 0!==t&&t,r=e.mdDown,i=void 0!==r&&r,o=e.children,s=Pn();return n&&!s||i&&s?null:o};function On(){return(On=Object.assign||function(e){for(var t=1;t{const t=r.useContext(Ae)||s,i=d({},r.useContext(pn),a),l=r.useRef(),c=r.useRef();!function(e,t){const n=r.useRef([]);let i;const o=r.useMemo(()=>({}),t);n.current!==o&&(n.current=o,i=e()),r.useEffect(()=>()=>{i&&i()},[o])}(()=>{const r={name:n,state:{},stylesCreator:u,stylesOptions:i,theme:t};return Sn(r,e),c.current=!1,l.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const i=Be.get(n.sheetsManager,r,t);i.refs-=1;const o=n.sheetsRegistry;0===i.refs&&(Be.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(i.staticSheet),o&&o.remove(i.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}(r)}},[t,u]),r.useEffect(()=>{c.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(l.current,e),c.current=!0});return function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,i=!0),i&&(e.cacheClasses.value=Ee({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(l.current,e.classes,o)}}((function(e){return{root:{display:"block",width:"100%",marginLeft:"auto",marginRight:"auto"},cardContent:{paddingBottom:8,paddingRight:8},cardContentIconAppBar:{paddingLeft:16,paddingTop:16},cardContentIconAppBarMobile:{paddingLeft:16,paddingTop:24},cardContentIconNoAppBar:{paddingLeft:16,paddingTop:24},cardContentNoIconAppBar:{paddingLeft:24,paddingTop:8},cardContentNoIconNoAppBar:{paddingLeft:16,paddingTop:24},avatar:{height:40,width:40},flex:{flexGrow:1},buttons:{whiteSpace:"nowrap",alignSelf:"flex-end",paddingLeft:"90px !important"},label:{alignSelf:"center"}}}),{name:"MuiBanner"}),Rn=i.a.forwardRef((function(e,t){var n=e.open,o=e.label,s=e.icon,a=e.iconProps,u=e.appBar,l=e.showDismissButton,p=e.dismissButtonLabel,d=e.dismissButtonProps,h=e.buttonOnClick,y=e.buttonLabel,m=e.buttonComponent,v=e.buttonProps,g=e.paperProps,b=e.cardProps,x=e.onClose,w=Cn(),S=Pn(),P=Boolean(l||y),k=Object(r.useMemo)((function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:w.flex}),i.a.createElement(f.Grid,{item:!0,className:w.buttons},l&&i.a.createElement(f.Button,On({variant:"text",onClick:x},d),p),!!y&&i.a.createElement(f.Button,On({variant:"text",onClick:h,component:m},v),y)))}),[l,x,d,p,h,y,m,v]),O={};return u&&(O={component:f.Container,maxWidth:"lg"}),i.a.createElement(f.Collapse,{in:n,ref:t},i.a.createElement(f.Paper,On({elevation:0,className:w.root},g),i.a.createElement(f.Card,On({elevation:0},O,b),i.a.createElement(f.CardContent,{className:c()(w.cardContent,s&&u&&!S&&w.cardContentIconAppBar,s&&u&&S&&w.cardContentIconAppBarMobile,s&&!u&&w.cardContentIconNoAppBar,!s&&u&&w.cardContentNoIconAppBar,!s&&!u&&w.cardContentNoIconNoAppBar)},i.a.createElement(f.Grid,{container:!0,wrap:"nowrap",spacing:u?3:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-start"},s&&i.a.createElement(f.Grid,{item:!0},i.a.createElement(f.Avatar,On({className:w.avatar,sx:{bgcolor:"primary.main"}},a),s)),i.a.createElement(f.Grid,{item:!0,className:w.label},i.a.createElement(f.Typography,{variant:"body2"},o)),i.a.createElement(kn,{mdDown:!0},u&&P&&k))),!u&&P&&i.a.createElement(kn,{mdDown:!0},i.a.createElement(f.CardActions,null,k)),P&&i.a.createElement(kn,{mdUp:!0},i.a.createElement(f.CardActions,null,k)),i.a.createElement(kn,{mdDown:!0},i.a.createElement("div",null))),i.a.createElement(f.Divider,null)))}));Rn.propTypes={open:u.a.bool.isRequired,label:u.a.string.isRequired,buttonLabel:u.a.string,buttonOnClick:u.a.func,buttonComponent:u.a.any,buttonProps:u.a.object,showDismissButton:u.a.bool,dismissButtonLabel:u.a.string,dismissButtonProps:u.a.object,onClose:u.a.func,icon:u.a.element,iconProps:u.a.object,appBar:u.a.bool,paperProps:u.a.object,cardProps:u.a.object},Rn.defaultProps={open:!0,buttonOnClick:function(){},showDismissButton:!0,dismissButtonLabel:"Dismiss",dismissButtonProps:{},appBar:!1,buttonComponent:f.ButtonBase,buttonProps:{},iconProps:{},paperProps:{},cardProps:{}},Rn.displayName="MuiBanner";var jn=Rn;function En(e){return(En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bn(){return(Bn=Object.assign||function(e){for(var t=1;t{n[e]&&(i[e]=`${t[e]} ${n[e]}`)}),i}var Be={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};var Ae=r.createContext(null);var Ie="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const _e=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Ne=Date.now(),Te="fnValues"+Ne,Me="fnStyle"+ ++Ne,qe=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[Me]=t,r},onProcessStyle:function(e,t){if(Te in t||Me in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Te]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Me];o&&(i.style=o(e)||{});var s=i[Te];if(s)for(var a in s)i.prop(a,s[a](e),r)}}},Le="@global",De=function(){function e(e,t,n){for(var r in this.type="global",this.at=Le,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new se(d({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Ue=function(){function e(e,t,n){this.type="global",this.at=Le,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,d({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),$e=/\s*,\s*/g;function Ge(e,t){for(var n=e.split($e),r="",i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1){var i=Wt[e];if(!Array.isArray(i))return gt+jt(i)in t&&bt+i;if(!r)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o(o+=1,o);return(e,o)=>{const a=o.options.name;if(a&&0===a.indexOf("Mui")&&!o.options.link&&!t){if(-1!==_e.indexOf(e.key))return"Mui-"+e.key;const t=`${i}${a}-${e.key}`;return o.options.theme[Ie]&&""===r?`${t}-${s()}`:t}return`${i}${n}${s()}`}}(),jss:cn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},pn=r.createContext(fn);let dn=-1e9;function hn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function yn(e,t,n={clone:!0}){const r=n.clone?d({},e):e;return hn(e)&&hn(t)&&Object.keys(t).forEach(i=>{"__proto__"!==i&&(hn(t[i])&&i in e&&hn(e[i])?r[i]=yn(e[i],t[i],n):r[i]=t[i])}),r}function mn(e){if("string"!=typeof e)throw new Error(function(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e{let i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},s=n.components[r].variants||[],a=d({},i);return Object.keys(o).forEach(e=>{a[e]=yn(a[e]||{},o[e])}),s.forEach(e=>{const t=function(e){const{variant:t}=e,n=p(e,vn);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?gn(r)?e[t]:mn(e[t]):`${gn(r)?t:mn(t)}${mn(e[t].toString())}`}),r}(e.props);a[t]=yn(a[t]||{},e.style)}),a},options:{}}}var xn={};const wn=["name","classNamePrefix","Component","defaultTheme"];function Sn({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:i},o){if(n.disableGeneration)return;let s=Be.get(n.sheetsManager,r,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Be.set(n.sheetsManager,r,t,s));const a=d({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});a.generateId=a.serverGenerateClassName||a.generateClassName;const u=n.sheetsRegistry;if(0===s.refs){let e;n.sheetsCache&&(e=Be.get(n.sheetsCache,r,t));const o=r.create(t,i);e||(e=n.jss.createStyleSheet(o,d({link:!1},a)),e.attach(),n.sheetsCache&&Be.set(n.sheetsCache,r,t,e)),u&&u.add(e),s.staticSheet=e,s.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var s=e(i);s&&(n||(n={}),n[r]=s)}}return n}(o)}if(s.dynamicStyles){const t=n.jss.createStyleSheet(s.dynamicStyles,d({link:!0},a));t.update(o),t.attach(),e.dynamicSheet=t,e.classes=Ee({baseClasses:s.staticSheet.classes,newClasses:t.classes}),u&&u.add(t)}else e.classes=s.staticSheet.classes;s.refs+=1}var Pn=function(){return Object(f.useMediaQuery)((function(e){return e.breakpoints.down("md")}),{noSsr:!0})},kn=function(e){var t=e.mdUp,n=void 0!==t&&t,r=e.mdDown,i=void 0!==r&&r,o=e.children,s=Pn();return n&&!s||i&&s?null:o};function On(){return(On=Object.assign||function(e){for(var t=1;t{const t=r.useContext(Ae)||s,i=d({},r.useContext(pn),a),l=r.useRef(),c=r.useRef();!function(e,t){const n=r.useRef([]);let i;const o=r.useMemo(()=>({}),t);n.current!==o&&(n.current=o,i=e()),r.useEffect(()=>()=>{i&&i()},[o])}(()=>{const r={name:n,state:{},stylesCreator:u,stylesOptions:i,theme:t};return Sn(r,e),c.current=!1,l.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const i=Be.get(n.sheetsManager,r,t);i.refs-=1;const o=n.sheetsRegistry;0===i.refs&&(Be.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(i.staticSheet),o&&o.remove(i.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}(r)}},[t,u]),r.useEffect(()=>{c.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(l.current,e),c.current=!0});return function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,i=!0),i&&(e.cacheClasses.value=Ee({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(l.current,e.classes,o)}}((function(e){return{root:{display:"block",width:"100%",marginLeft:"auto",marginRight:"auto"},cardContent:{paddingBottom:8,paddingRight:8},cardContentIconAppBar:{paddingLeft:16,paddingTop:16},cardContentIconAppBarMobile:{paddingLeft:16,paddingTop:24},cardContentIconNoAppBar:{paddingLeft:16,paddingTop:24},cardContentNoIconAppBar:{paddingLeft:24,paddingTop:8},cardContentNoIconNoAppBar:{paddingLeft:16,paddingTop:24},avatar:{height:40,width:40},flex:{flexGrow:1},buttons:{whiteSpace:"nowrap",alignSelf:"flex-end",paddingLeft:"90px !important"},label:{alignSelf:"center"}}}),{name:"MuiBanner"}),Rn=i.a.forwardRef((function(e,t){var n=e.open,o=e.label,s=e.icon,a=e.iconProps,u=e.appBar,l=e.showDismissButton,p=e.dismissButtonLabel,d=e.dismissButtonProps,h=e.buttonOnClick,y=e.buttonLabel,m=e.buttonComponent,v=e.buttonProps,g=e.paperProps,b=e.cardProps,x=e.onClose,w=Cn(),S=Pn(),P=Boolean(l||y),k=Object(r.useMemo)((function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:w.flex}),i.a.createElement(f.Grid,{item:!0,className:w.buttons},l&&i.a.createElement(f.Button,On({variant:"text",onClick:x},d),p),!!y&&i.a.createElement(f.Button,On({variant:"text",onClick:h,component:m},v),y)))}),[l,x,d,p,h,y,m,v]),O={};return u&&(O={component:f.Container,maxWidth:"lg"}),i.a.createElement(f.Collapse,{in:n,ref:t},i.a.createElement(f.Paper,On({elevation:0,className:w.root},g),i.a.createElement(f.Card,On({elevation:0},O,b),i.a.createElement(f.CardContent,{className:c()(w.cardContent,s&&u&&!S&&w.cardContentIconAppBar,s&&u&&S&&w.cardContentIconAppBarMobile,s&&!u&&w.cardContentIconNoAppBar,!s&&u&&w.cardContentNoIconAppBar,!s&&!u&&w.cardContentNoIconNoAppBar)},i.a.createElement(f.Grid,{container:!0,wrap:"nowrap",spacing:u?3:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-start"},s&&i.a.createElement(f.Grid,{item:!0},i.a.createElement(f.Avatar,On({className:w.avatar,sx:{bgcolor:"primary.main"}},a),s)),i.a.createElement(f.Grid,{item:!0,className:w.label},i.a.createElement(f.Typography,{variant:"body2"},o)),i.a.createElement(kn,{mdDown:!0},u&&P&&k))),!u&&P&&i.a.createElement(kn,{mdDown:!0},i.a.createElement(f.CardActions,null,k)),P&&i.a.createElement(kn,{mdUp:!0},i.a.createElement(f.CardActions,null,k)),i.a.createElement(kn,{mdDown:!0},i.a.createElement("div",null))),i.a.createElement(f.Divider,null)))}));Rn.propTypes={open:u.a.bool.isRequired,label:u.a.string.isRequired,buttonLabel:u.a.string,buttonOnClick:u.a.func,buttonComponent:u.a.any,buttonProps:u.a.object,showDismissButton:u.a.bool,dismissButtonLabel:u.a.string,dismissButtonProps:u.a.object,onClose:u.a.func,icon:u.a.element,iconProps:u.a.object,appBar:u.a.bool,paperProps:u.a.object,cardProps:u.a.object},Rn.defaultProps={open:!0,buttonOnClick:function(){},showDismissButton:!0,dismissButtonLabel:"Dismiss",dismissButtonProps:{},appBar:!1,buttonComponent:f.ButtonBase,buttonProps:{},iconProps:{},paperProps:{},cardProps:{}},Rn.displayName="MuiBanner";var jn=Rn;function En(e){return(En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function An(e){for(var t=1;t