Gallery Custom Links - Version 2.0.0

Version Description

  • Update: New modernized admin.
Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 Gallery Custom Links
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.2.7 to 2.0.0

app/index.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(n){function e(e){for(var r,i,l=e[0],c=e[1],u=e[2],f=0,d=[];f<l.length;f++)i=l[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(n[r]=c[r]);for(s&&s(e);d.length;)d.shift()();return a.push.apply(a,u||[]),t()}function t(){for(var n,e=0;e<a.length;e++){for(var t=a[e],r=!0,l=1;l<t.length;l++){var c=t[l];0!==o[c]&&(r=!1)}r&&(a.splice(e--,1),n=i(i.s=t[0]))}return n}var r={},o={0:0},a=[];function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=r,i.d=function(n,e,t){i.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,e){if(1&e&&(n=i(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)i.d(t,r,function(e){return n[e]}.bind(null,r));return t},i.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(e,"a",e),e},i.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},i.p="";var l=window.wpJsonMgcl=window.wpJsonMgcl||[],c=l.push.bind(l);l.push=e,l=l.slice();for(var u=0;u<l.length;u++)e(l[u]);var s=c;a.push([79,1]),t()}({0:function(n,e){n.exports=React},19:function(n,e){n.exports=ReactDOM},79:function(n,e,t){"use strict";t.r(e);var r=t(0),o=t.n(r),a=t(19),i=t.n(a),l=t(59),c=t(1),u=t.n(c);function s(){return(s=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 f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function d(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){p(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function p(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function m(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return b(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var g=function(n){var e=n.spinner,t=void 0===e||e,a=n.busy,i=void 0!==a&&a,l=n.overlayStyle,c=m(Object(r.useState)(!0),2),u=c[0],f=c[1];Object(r.useEffect)((function(){var n;return i?f(!0):n=setTimeout((function(){f(!1),n=null}),250),function(){n&&clearTimeout(n)}}),[i]);var p=u?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"overlay "+(i?"":"overlayHidden"),style:l},Boolean(t)&&o.a.createElement("div",{className:"lds-ellipsis "+(i?"":"spinnerHidden")},o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null))),o.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,b=d(d({},n),{},{busy:void 0,spinner:void 0});return o.a.createElement("div",s({style:{position:"relative"}},b),p,n.children)};g.propTypes={busy:u.a.bool.isRequired,spinner:u.a.bool,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]).isRequired};var h=g,y=t(2),v=t(4),O={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"},w=t(3),k=t(29),E=t.n(k),j=t(30),S=t.n(j),P=t(31),C=t.n(P),z=t(8),N=t.n(z),A=t(9),I=t.n(A),T=t(10),R=t.n(T),_=t(6),F=t.n(_),M=t(5),B=t.n(M),D=t(7),L=t.n(D),U=t(11),G=t.n(U),q=t(12),H=t.n(q),$=t(32),J=t.n($),W=t(33),Z=t.n(W),K=t(13),X=t.n(K),Y=t(34),Q=t.n(Y),V=t(35),nn=t.n(V),en=t(36),tn=t.n(en),rn=t(37),on=t.n(rn),an=(t(62),t(38)),ln=t.n(an),cn=t(39),un=t.n(cn),sn=t(40),fn=t.n(sn),dn=t(41),pn=t.n(dn),mn=t(42),bn=t.n(mn),gn=t(43),hn=t.n(gn),yn=t(44),vn=t.n(yn),xn=t(45),On=t.n(xn),wn=t(46),kn=t.n(wn),En={lock:E.a,"lock-open":S.a,"file-undo":C.a,"chevron-double-left":N.a,"chevron-double-right":I.a,"chevron-left":R.a,"chevron-right":F.a,"chevron-down":B.a,"chevron-up":L.a,pause:G.a,play:H.a,replay:J.a,check:Z.a,stop:X.a,delete:Q.a,undo:nn.a,alert:tn.a,database:on.a,tools:ln.a,cog:un.a,close:fn.a,cat:pn.a,upload:bn.a,trash:hn.a,pencil:vn.a,dashboard:On.a,search:kn.a};function jn(){return(jn=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 Sn(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Pn(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ","\n"]);return Pn=function(){return n},n}var Cn=Object(y.a)((function(n){var e=n.className,t=n.icon,r=void 0===t?null:t,a=n.onClick,i=n.disabled,l=void 0!==i&&i,c=n.color,u=void 0===c?null:c,s=n.children,f=Sn(n,["className","icon","onClick","disabled","color","children"]),d=!!r,p="nui-button ".concat(e||"").concat(d?" has-icon":""," ").concat(u?"custom-color":"");return o.a.createElement("button",jn({type:"button",className:p,onClick:a,disabled:l},f),d&&o.a.createElement(w.Icon,{icon:"string"==typeof r?En[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),o.a.createElement("span",null,s))}))(Pn(),O.fontFamily,O.fontSizeText,O.blue,Object(v.a)(.1,O.blue),O.lightBlue,O.blue,O.blue,Object(v.a)(.1,O.lightBlue),O.red,O.red,Object(v.a)(.1,O.red),O.green,O.green,Object(v.a)(.1,O.green),(function(n){return zn(n.color)})),zn=function(n){if(n)return"\n &.custom-color {\n background-color: ".concat(n,";\n border: 1px solid ").concat(n,";\n\n &:hover {\n background-color: ").concat(Object(v.a)(.1,n),";\n }\n }\n ")},Nn=function(n){return o.a.createElement(Cn,n)};function An(){return(An=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 In(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Tn(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return Tn=function(){return n},n}Nn.propTypes={className:u.a.oneOf(["primary","secondary","danger","success"]),disabled:u.a.bool,icon:u.a.oneOfType([u.a.instanceOf(w.IconifyIcon),u.a.oneOf(["setting","edit","trash"])]),color:u.a.string,onClick:u.a.func.isRequired},Nn.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}};var Rn=y.a.a(Tn(),O.yellow,O.white,O.fontFamily,O.white),_n=function(n){var e=n.show,t=void 0===e||e,r=n.className,a=In(n,["show","className"]);return t?o.a.createElement(Rn,An({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},Fn=function(n){return o.a.createElement(_n,n)};Fn.propTypes={show:u.a.bool,className:u.a.string},Fn.defaultProps={show:!0,className:void 0};var Mn=t(21),Bn=t.n(Mn);function Dn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||Ln(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ln(n,e){if(n){if("string"==typeof n)return Un(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Un(n,e):void 0}}function Un(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var Gn=function(){var n=Object(r.useRef)(),e=Dn(Object(r.useState)({}),2),t=e[0],o=e[1];return Object(r.useEffect)((function(){if(n&&n.current){var e=new ResizeObserver((function(n){var e=n[0];e.contentRect&&o({width:e.contentRect.left+e.contentRect.right,height:e.contentRect.top+e.contentRect.bottom})}));return e.observe(n.current),function(){e.unobserve(n.current)}}}),[]),{ref:n,width:t.width?t.width:0,height:t.height?t.height:0}},qn=function(n){var e=Object(r.useRef)(),t=function(t){n&&!e.current.contains(t.target)&&n()};return Object(r.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),e};new Bn.a({concurrency:1,autoStart:!1});function Hn(){var n=Xn(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return Hn=function(){return n},n}function $n(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return Jn(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jn(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function Wn(){var n=Xn(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return Wn=function(){return n},n}function Zn(){var n=Xn(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return Zn=function(){return n},n}function Kn(){var n=Xn(["\n display: inline-block;\n"]);return Kn=function(){return n},n}function Xn(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var Yn=y.a.div(Kn()),Qn=y.a.button(Zn(),O.blue,O.fontFamily,O.fontSizeText,Object(v.a)(.1,O.blue)),Vn=y.a.div(Wn(),O.blue,O.lightShadow,O.blue),ne=function(n){var e=n.title,t=n.disabled,r=void 0!==t&&t,a=n.isPro,i=void 0!==a&&a,l=n.style,c=void 0===l?{}:l,u=$n(o.a.useState(!1),2),s=u[0],f=u[1],d=qn((function(){f(!1)})),p=Gn(),m=p.ref,b=p.width,g=function(){f(!s)},h=o.a.Children.map(n.children,(function(n){return o.a.cloneElement(n,{isPro:i,disabled:n.props.disabled||r,onClick:function(){n.props.onClick&&n.props.onClick(),g()}})}));return o.a.createElement(Yn,{ref:d},o.a.createElement(Qn,{ref:m,type:"button",disabled:r,onClick:g,style:c},o.a.createElement("span",null,e),o.a.createElement(w.Icon,{icon:B.a,width:"24",height:"24",style:{marginLeft:"4px"}})),s&&o.a.createElement(Vn,{style:{transform:"translateX(calc(-50% + ".concat(b/2,"px))")}},h))},ee=y.a.button(Hn(),O.blue,O.fontFamily,O.fontSizeText,Object(v.a)(.1,O.blue),O.proGray),te=function(n){var e=n.onClick,t=n.children,r=n.isPro,a=n.requirePro,i=void 0!==a&&a,l=n.disabled,c=i&&!r;return o.a.createElement(ee,{type:"button",className:c?"is-pro":"",onClick:e,disabled:l||c},o.a.createElement("span",null,t),c&&!r&&o.a.createElement(Fn,null))},re=function(n){return o.a.createElement(ne,n)},oe=function(n){return o.a.createElement(te,n)};function ae(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||ie(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(n,e){if(n){if("string"==typeof n)return le(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?le(n,e):void 0}}function le(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function ce(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return ce=function(){return n},n}re.propTypes={title:u.a.string,disabled:u.a.bool,isPro:u.a.bool},re.defaultProps={title:void 0,disabled:!1,isPro:!1},oe.propTypes={onClick:u.a.func.isRequired,requirePro:u.a.bool},oe.defaultProps={onClick:function(){},requirePro:!1};var ue=y.a.div(ce()),se=function(n){var e=n.className,t=n.children,a=n.nekoErrors,i=void 0===a?[]:a,l=n.style,c=void 0===l?{}:l,u=ae(Object(r.useState)(!1),2),s=u[0],f=u[1],d=ae(Object(r.useState)(!1),2),p=d[0],m=d[1];if(i&&!s){var b,g=function(n,e){var t;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(t=ie(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=n[Symbol.iterator]()},n:function(){var n=t.next();return i=n.done,n},e:function(n){l=!0,a=n},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}(i);try{for(g.s();!(b=g.n()).done;){var h=b.value;if(h){f(h);break}}}catch(n){g.e(n)}finally{g.f()}}return o.a.createElement(ue,{className:e||"",style:c},s&&o.a.createElement("div",{className:"neko-rest-error"},o.a.createElement("div",{className:"container"},!p&&o.a.createElement(o.a.Fragment,null,o.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),o.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),o.a.createElement("p",null,o.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),o.a.createElement("p",{className:"neko-debug"},o.a.createElement("small",null,"URL: ",s.url,o.a.createElement("br",null),"CODE: ",s.code,o.a.createElement("br",null),"MESSAGE: ",s.message,o.a.createElement("br",null)))),s.body&&p&&o.a.createElement("p",{className:"neko-debug"},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:s.body}})),s.body&&o.a.createElement(Nn,{color:"#a94242",onClick:function(){return m(!p)}},p?"Hide":"Display"," response from server"),o.a.createElement(Nn,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},fe=function(n){return o.a.createElement(se,n)};function de(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function pe(){var n=he(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return pe=function(){return n},n}function me(){var n=he(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return me=function(){return n},n}function be(){var n=he(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return be=function(){return n},n}function ge(){var n=he(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return ge=function(){return n},n}function he(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}fe.propTypes={className:u.a.string,style:u.a.object,nekoErrors:u.a.bool},fe.defaultProps={className:void 0,style:{},nekoErrors:!1};var ye=y.a.h1(ge(),O.fontFamily,O.fontSizeH1),ve=y.a.h2(be(),O.fontFamily,O.fontSizeH2),xe=y.a.p(me(),O.fontFamily,O.fontSizeText),Oe=y.a.span(pe(),O.fontFamily,O.fontSizeText),we=function(n){var e=n.children,t=de(n,["children"]);return n.h1?o.a.createElement(ye,t,e):n.h2?o.a.createElement(ve,t,e):n.p?o.a.createElement(xe,t,e):o.a.createElement(Oe,t,e)},ke=function(n){return o.a.createElement(we,n)};function Ee(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return Ee=function(){return n},n}ke.propTypes={h1:u.a.any,h2:u.a.any,p:u.a.any},ke.defaultProps={h1:void 0,h2:void 0,p:void 0};var je=y.a.div(Ee(),O.fontSizeText,O.blue,O.blue,O.white,O.white),Se=function(n){var e=n.title,t=n.children,r=n.className,a=n.busy,i=void 0!==a&&a,l=n.style,c=void 0===l?{}:l;return o.a.createElement(je,{className:"nui-block "+(r||""),style:c},o.a.createElement(h,{busy:i},o.a.createElement(ke,{h2:!0,className:"nui-block-title"},e),o.a.createElement("div",{className:"nui-block-content"},t)))},Pe=function(n){return o.a.createElement(Se,n)};function Ce(){var n=Ne(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return Ce=function(){return n},n}function ze(){var n=Ne(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return ze=function(){return n},n}function Ne(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}Pe.propTypes={title:u.a.string,className:u.a.oneOf(["","primary"]),style:u.a.object},Pe.defaultProps={title:void 0,className:"",style:{}};var Ae=y.a.div(ze(),O.fontSizeText,O.fontFamily,O.white,O.blue),Ie=y.a.div(Ce(),O.lightGray),Te=function(n){var e=n.children,t=n.header,r=n.headerAlign,a=void 0===r?"left":r,i=n.footer,l=n.footerAlign,c=void 0===l?"right":l,u=n.className,s=n.style,f=void 0===s?{}:s;return o.a.createElement(Ae,{className:u||"",style:f},t&&o.a.createElement(Ie,{className:"align-".concat(a)},t),o.a.createElement("div",{className:"content"},e),i&&o.a.createElement(Ie,{className:"align-".concat(c)},i))},Re=function(n){return o.a.createElement(Te,n)};function _e(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return _e=function(){return n},n}Re.propTypes={header:u.a.element,headerAlign:u.a.oneOf(["left","right"]),footer:u.a.element,footerAlign:u.a.oneOf(["left","right"]),className:u.a.string,style:u.a.object},Re.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}};var Fe=Object(y.a)((function(n){var e=n.title,t=void 0===e?"":e,r=n.contentAlign,a=void 0===r?"left":r;return o.a.createElement("div",{className:n.className||""},t?o.a.createElement("div",{className:"nui-settings-head"},t):null,o.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},n.children))}))(_e(),O.fontFamily,O.fontFamily),Me=function(n){return o.a.createElement(Fe,n)};function Be(){var n=Le(["\n background-color: ",";\n color: white;\n"]);return Be=function(){return n},n}function De(){var n=Le(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return De=function(){return n},n}function Le(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}Me.propTypes={title:u.a.string,className:u.a.string,contentAlign:u.a.string},Me.defaultProps={title:"",className:void 0,contentAlign:"left"};var Ue=y.a.div(De()),Ge=Object(y.a)((function(n){return n.children?o.a.createElement("div",{className:n.className},n.children):null}))(Be(),O.blue),qe=function(n){return o.a.createElement(Ue,{className:"window"},o.a.createElement(Ge,null,n.title),n.children)},He=function(n){return o.a.createElement(qe,n)};function $e(){return($e=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 Je(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function We(){var n=Ke(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return We=function(){return n},n}function Ze(){var n=Ke(["\n display: flex;\n flex-wrap: wrap;\n"]);return Ze=function(){return n},n}function Ke(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}He.propTypes={title:u.a.string},He.defaultProps={title:void 0};var Xe=y.a.div(Ze()),Ye=y.a.div(We()),Qe=function(n){return o.a.createElement(Xe,null,n.children)},Ve=function(n){var e=n.full,t=n.minimal,r=Je(n,["full","minimal"]),a=e?"full":"";return a+=t?" minimal":"",o.a.createElement(Ye,$e({className:a},r),n.children)},nt=function(n){return o.a.createElement(Qe,n)},et=function(n){return o.a.createElement(Ve,n)};nt.propTypes={},nt.defaultProps={},et.propTypes={full:u.a.any},et.defaultProps={full:void 0};var tt=t(15),rt=t.n(tt),ot=t(16),at=t.n(ot);function it(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return it=function(){return n},n}var lt=Object(y.a)((function(n){var e=n.id,t=n.name,r=n.checked,a=void 0!==r&&r,i=n.onChange,l=n.label,c=n.description,u=n.isPro,s=n.disabled,f=n.requirePro,d=void 0!==f&&f&&!u,p=s||d,m=p?"disabled":"";return o.a.createElement("div",{className:["nui-checkbox",n.className,m].join(" ")},o.a.createElement("input",{id:e,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){i?i(!a,e):console.log("The onChange handler it not set for this checkbox.",n)},disabled:p}),o.a.createElement("label",{htmlFor:e},o.a.createElement("div",{className:"nui-checkbox-check-container"},o.a.createElement(w.Icon,{icon:a?at.a:rt.a,width:"30px",height:"30px",color:p?O.disabledForm:O.blue})),o.a.createElement("div",{className:"nui-checkbox-inner-container"},o.a.createElement("span",{className:"label"},l,o.a.createElement(Fn,{className:"inline",show:d})),c?o.a.createElement("small",{className:"description"},c):null)))}))(it(),O.fontFamily,O.disabledForm),ct=function(n){return o.a.createElement(lt,n)};function ut(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n"]);return ut=function(){return n},n}ct.propTypes={id:u.a.string,name:u.a.string,checked:u.a.bool,label:u.a.string,description:u.a.string,isPro:u.a.bool,requirePro:u.a.bool},ct.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1};var st=Object(y.a)((function(n){var e=n.name,t=(n.max,n.isPro),r=void 0!==t&&t;return o.a.Children.map(n.children,(function(n){return n.props.name?n:o.a.cloneElement(n,{name:e,isPro:r})}))}))(ut()),ft=function(n){return o.a.createElement(st,n)};function dt(){return(dt=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 pt(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return mt(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return mt(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function bt(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function gt(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return gt=function(){return n},n}ft.propTypes={name:u.a.string,mas:u.a.number,isPro:u.a.bool},ft.defaultProps={name:void 0,mas:-1,isPro:!1};var ht=Object(y.a)((function(n){var e=n.id,t=n.name,a=n.value,i=void 0===a?"":a,l=n.description,c=n.placeholder,u=void 0===c?"":c,s=n.onEnter,f=void 0===s?null:s,d=n.readOnly,p=void 0!==d&&d,m=n.type,b=void 0===m?"text":m,g=n.step,h=void 0===g?1:g,y=n.min,v=void 0===y?1:y,x=n.max,O=void 0===x?999:x,w=n.maxLength,k=void 0===w?3:w,E=n.className,j=n.style,S=n.natural,P=void 0!==S&&S,C=bt(n,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),z=pt(Object(r.useState)(i),2),N=z[0],A=z[1],I=!!n.onChange;Object(r.useEffect)((function(){I||A(i)}),[i]);var T=function(t){I?n.onChange(t.target.value,e):A(t.target.value,e)},R=function(t){f&&"Enter"===event.key&&(t.preventDefault(),n.onEnter(t.target.value,e))},_=function(t){n.onBlur&&i!==t.target.value&&n.onBlur(t.target.value,e)},F="neko-input ".concat(P?" natural":"");return o.a.createElement("div",{className:[E].join(" "),style:j},"number"===b?o.a.createElement("input",dt({className:[F].join(" ")},C,{id:e,name:t,value:I?i:N,type:b,step:h,min:v,max:O,maxlength:k,placeholder:u,onChange:T,onKeyPress:R,onBlur:_,readOnly:p})):o.a.createElement("input",dt({className:[F].join(" ")},C,{id:e,name:t,value:I?i:N,type:b,spellcheck:"false",placeholder:u,onChange:T,onKeyPress:R,onBlur:_,readOnly:p})),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(gt(),O.fontFamily,O.fontSizeText,O.blue,O.gray,O.fontFamily,O.fontSizeSmall),yt=function(n){return o.a.createElement(ht,n)};function vt(){return(vt=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 xt(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return Ot(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ot(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function wt(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function kt(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return kt=function(){return n},n}yt.propTypes={id:u.a.string,type:u.a.oneOf(["number","text"]),name:u.a.string,value:u.a.string,description:u.a.string,placeholder:u.a.string,onChange:u.a.func,onEnter:u.a.func,onBlur:u.a.func,readOnly:u.a.bool,step:u.a.number,min:u.a.number,max:u.a.number,maxLength:u.a.number,natural:u.a.bool},yt.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1};var Et=Object(y.a)((function(n){var e=n.id,t=n.name,a=n.value,i=void 0===a?"":a,l=n.description,c=n.placeholder,u=void 0===c?"":c,s=n.onEnter,f=void 0===s?null:s,d=n.readOnly,p=void 0!==d&&d,m=(n.maxLength,n.className),b=n.style,g=wt(n,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),h=xt(Object(r.useState)(i),2),y=h[0],v=h[1],x=!!n.onChange;Object(r.useEffect)((function(){x||v(i)}),[i]);return o.a.createElement("div",{className:[m].join(" "),style:b},o.a.createElement("textarea",vt({className:"neko-textarea"},g,{id:e,name:t,spellCheck:"false",placeholder:u,onChange:function(t){x?n.onChange(t.target.value,e):v(t.target.value,e)},onKeyPress:function(t){f&&"Enter"===event.key&&(t.preventDefault(),n.onEnter(t.target.value,e))},onBlur:function(t){n.onBlur&&i!==t.target.value&&n.onBlur(t.target.value,e)},readOnly:p}),x?i:y),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(kt(),O.fontFamily,O.fontSizeText,O.blue,O.gray,O.fontFamily,O.fontSizeSmall),jt=function(n){return o.a.createElement(Et,n)};jt.propTypes={id:u.a.string,name:u.a.string,value:u.a.string,description:u.a.string,placeholder:u.a.string,onChange:u.a.func,onEnter:u.a.func,onBlur:u.a.func,readOnly:u.a.bool},jt.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1};var St=t(50),Pt=t.n(St),Ct=t(51),zt=t.n(Ct);function Nt(){var n=Ut(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return Nt=function(){return n},n}function At(){var n=Ut(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return At=function(){return n},n}function It(){return(It=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 Tt(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return Rt(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rt(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function _t(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Ft(){var n=Ut(["\n background-color: ",";\n"]);return Ft=function(){return n},n}function Mt(){var n=Ut(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return Mt=function(){return n},n}function Bt(){var n=Ut(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return Bt=function(){return n},n}function Dt(){var n=Ut(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return Dt=function(){return n},n}function Lt(){var n=Ut(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return Lt=function(){return n},n}function Ut(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var Gt=y.a.div(Lt(),O.blue),qt=y.a.div(Dt(),O.white,O.blue,O.fontFamily),Ht=y.a.div(Bt()),$t=y.a.div(Mt()),Jt=y.a.div(Ft(),O.white),Wt=function(n){var e,t=n.id,a=n.name,i=n.value,l=n.scrolldown,c=void 0!==l&&l,u=n.isPro,s=void 0!==u&&u,f=n.onChange,d=_t(n,["id","name","value","scrolldown","isPro","onChange"]),p=null===(e=o.a.Children.toArray(n.children).find((function(n){return n.props.value===i||n.props.checked})))||void 0===e?void 0:e.props,m=(null==p?void 0:p.label)||"Select",b=(null==p?void 0:p.description)||n.description,g=(null==p?void 0:p.requirePro)||!1,h=Tt(Object(r.useState)(!1),2),y=h[0],v=h[1],x=c?qn((function(){v(!1)})):null,O=g&&!s,k=function(e){if(e!==i){if(!f)return void console.log("The onChange handler it not set for this checkbox.",n);f(e,t)}c&&v(!1)},E=o.a.Children.map(n.children,(function(n){return o.a.cloneElement(n,{name:n.props.name||a,checked:n.props.value===i||n.props.checked,onClick:k,scrolldown:c,isPro:s})}));return c?o.a.createElement(Gt,It({id:t,ref:x},d,{onClick:function(){return v(!y)},className:["nui-select",y?"show-options":""],childrenLength:E.length}),o.a.createElement(qt,null,m,o.a.createElement("div",{className:"rightContent"},O&&o.a.createElement(Fn,null),o.a.createElement(w.Icon,{icon:y?L.a:B.a,width:"24"}))),b&&o.a.createElement(Ht,null,b),y&&o.a.createElement($t,{className:y?"":"hidden"},o.a.createElement(Jt,null,[E]))):E},Zt=y.a.div(At(),O.fontFamily,O.disabledForm),Kt=y.a.div(Nt(),O.blue,O.fontFamily,O.white,O.fontFamily),Xt=function(n){var e=n.id,t=n.name,r=n.value,a=n.checked,i=n.label,l=n.description,c=n.onClick,u=n.scrolldown,s=n.isPro,f=void 0!==s&&s,d=n.requirePro,p=void 0!==d&&d&&!f,m=p?"disabled":"",b=o.a.createElement(Zt,{className:"nui-select ".concat(n.className||""," ").concat(m)},o.a.createElement("input",{id:e,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(n){return c(n.target.value)},disabled:p}),o.a.createElement("label",{htmlFor:e},o.a.createElement(w.Icon,{icon:a?zt.a:Pt.a,width:"24px",color:p?O.disabledForm:O.blue}),o.a.createElement("div",{className:"inner-container"},o.a.createElement("span",{className:"label"},i,o.a.createElement(Fn,{className:"inline",style:{top:-1},show:p})),l?o.a.createElement("small",{className:"description"},l):null))),g=o.a.createElement(Kt,{className:"nui-select ".concat(n.className||""," ").concat(m)},o.a.createElement("input",{id:e,name:t,type:"radio",value:r,defaultChecked:a,disabled:p}),o.a.createElement("div",{className:"option",onClick:function(){return c(r)}},i,o.a.createElement(Fn,{show:p})));return u?g:b},Yt=function(n){return o.a.createElement(Wt,n)};Yt.propTypes={id:u.a.string,name:u.a.string,description:u.a.string,scrolldown:u.a.bool,isPro:u.a.bool,onChange:u.a.func},Yt.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var Qt=function(n){return o.a.createElement(Xt,n)};Qt.propTypes={id:u.a.string,name:u.a.string,value:u.a.string,checked:u.a.bool,label:u.a.string,description:u.a.string,onClick:u.a.func,scrolldown:u.a.bool,isPro:u.a.bool,requirePro:u.a.bool},Qt.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1};var Vt=t(17),nr=t.n(Vt),er=t(52),tr=t.n(er),rr=t(53),or=t.n(rr),ar=t(54),ir=t.n(ar);function lr(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return cr(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cr(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cr(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function ur(){var n=pr(["\n margin-left: 5px;\n"]);return ur=function(){return n},n}function sr(){var n=pr(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return sr=function(){return n},n}function fr(){var n=pr(["\n height: 24px;\n width: 24px;\n"]);return fr=function(){return n},n}function dr(){var n=pr(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return dr=function(){return n},n}function pr(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var mr=function(n){var e=n.chevron,t=void 0===e||e;return o.a.Children.map(n.children,(function(n){return o.a.cloneElement(n,{chevron:t})}))},br=y.a.div(dr()),gr=y.a.div(fr()),hr=y.a.div(sr(),O.finderBorder),yr=y.a.div(ur()),vr=function(n){var e={gallery:or.a,tag:ir.a},t=n.title,r=n.chevron,a=n.rightElement,i=void 0===a?null:a,l=n.showRightElement,c=void 0!==l&&l,u=!n.icon,s=!!n.icon,f=!!n.children,d=lr(o.a.useState(!1),2),p=d[0],m=d[1],b=lr(o.a.useState((function(){return"string"==typeof n.icon&&Object.keys(e).includes(n.icon)?e[n.icon]:n.icon?n.icon:nr.a})),2),g=b[0],h=b[1],y=o.a.Children.map(n.children,(function(n){return o.a.cloneElement(n,{chevron:r})}));return o.a.createElement("div",null,o.a.createElement(br,{onClick:function(){(u||f)&&(s||h(p?nr.a:tr.a),m(!p))},onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,className:"".concat(u||y?"can-expand":"")},r?u||y?o.a.createElement(w.Icon,{icon:p?B.a:F.a,width:"24",height:"24"}):o.a.createElement(gr,null):null,o.a.createElement(w.Icon,{icon:g,color:O.blue,width:"24",height:"24"}),o.a.createElement("p",null,t),c&&o.a.createElement(yr,null,i)),p&&o.a.createElement(hr,{className:"".concat(u?"":"no-line"," ").concat(r?"":"no-chevron")},y))},xr=function(n){return o.a.createElement(mr,n)};xr.propTypes={chevron:u.a.bool},xr.defaultProps={chevron:!0};var Or=function(n){return o.a.createElement(vr,n)};function wr(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return wr=function(){return n},n}Or.propTypes={icon:u.a.oneOfType([u.a.instanceOf(w.IconifyIcon),u.a.oneOf(["gallery"])]),title:u.a.string},Or.defaultProps={icon:nr.a,title:void 0};var kr=y.a.div(wr()),Er=function(){return o.a.createElement(kr,null,o.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},jr=function(n){return o.a.createElement(Er,n)};function Sr(n){return(Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function Pr(){var n=zr(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return Pr=function(){return n},n}function Cr(){var n=zr(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return Cr=function(){return n},n}function zr(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}jr.propTypes={},jr.defaultProps={};var Nr=Object(y.a)((function(n){var e=n.value,t=void 0===e?0:e,r=n.max,a=void 0===r?100:r,i=n.busy,l=void 0!==i&&i,c=n.status;t=Math.min(t,a);var u=parseFloat(t)/parseFloat(a);return o.a.createElement("div",{className:n.className},o.a.createElement(Ar,{ratio:u,busy:n.busy,status:c}),o.a.createElement("div",{className:"nui-progress-buttons"},l&&n.onPauseClick&&o.a.createElement("div",{className:"nui-progress-button pause",onClick:n.onPauseClick},n.paused?o.a.createElement(w.InlineIcon,{icon:H.a}):o.a.createElement(w.InlineIcon,{icon:G.a})),l&&n.onStopClick&&o.a.createElement("div",{className:"nui-progress-button stop",onClick:n.onStopClick},o.a.createElement(w.InlineIcon,{icon:X.a}))))}))(Cr(),O.blue,Object(v.a)(.1,O.blue),O.red,Object(v.a)(.1,O.red)),Ar=Object(y.a)((function(n){var e,t,r,a=isNaN(n.ratio)?0:parseInt(Math.round(100*n.ratio)),i=Sr(n.status),l="undefined"!==i?"string"===i?n.status:n.status(a):"".concat(a,"%");return o.a.createElement("div",{className:n.className,style:(e={minWidth:28},t="minWidth",r=a+"%",t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e)},o.a.createElement("div",null,l))}))(Pr(),O.progress,O.fontFamily,(function(n){return n.busy?"animate-stripes 1.6s linear infinite":"none"})),Ir=function(n){return o.a.createElement(Nr,n)};function Tr(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return Rr(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rr(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function _r(){var n=Mr(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return _r=function(){return n},n}function Fr(){var n=Mr(["\n\tdisplay: flex;\n"]);return Fr=function(){return n},n}function Mr(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}Ir.propTypes={value:u.a.number,max:u.a.number,busy:u.a.bool,paused:u.a.bool,onPauseClick:u.a.func,onStopClick:u.a.func,status:u.a.oneOf([u.a.string,u.a.func])},Ir.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0};var Br=y.a.div(Fr()),Dr=y.a.div(_r(),O.blackRGB,O.white,O.fontFamily,O.fontSizeText,(function(n){return n.visible?"inline-block":"none"}),O.blackRGB,O.blackRGB,O.blackRGB,O.blackRGB,(function(n){return n.style})),Lr=function(n){var e=n.text,t=void 0===e?"Hello world!":e,a=n.position,i=void 0===a?"top":a,l=Tr(Object(r.useState)(!1),2),c=l[0],u=l[1],s=Gn(),f=s.ref,d=s.width,p=s.height,m=Gn(),b=m.ref,g=m.width,h=m.height,y=Object(r.useMemo)((function(){var n=0,e=0;if("top"===i)n=-1*p-5,e=d/2*-1+g/2;else if("bottom"===i)n=h+5,e=d/2*-1+g/2;else if("left"===i){n=(p-h)/2*-1,e=-1*d-5}else if("right"===i){n=(p-h)/2*-1,e=g+5}return{transform:"translateX(".concat(e,"px) translateY(").concat(n,"px)")}}),[i,d,p,g,h]);return o.a.createElement(Br,null,o.a.createElement(Dr,{ref:f,visible:c,className:i,style:y},t),o.a.createElement("div",{ref:b,onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)}},n.children))},Ur=function(n){return o.a.createElement(Lr,n)};function Gr(){return(Gr=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 qr(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Hr(){var n=Jr(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return Hr=function(){return n},n}function $r(){var n=Jr(["\n display: flex;\n align-items: center;\n"]);return $r=function(){return n},n}function Jr(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}Ur.propTypes={text:u.a.string,position:u.a.oneOf(["top","right","bottom","left"])},Ur.defaultProps={text:"Hello world!",position:"top"};var Wr=y.a.div($r()),Zr=Object(y.a)(w.Icon)(Hr(),(function(n){return n.color}),(function(n){return function(n){if(n)return"\n &:hover {\n path {\n fill: ".concat(Object(v.a)(.1,n),";\n }\n }\n ")}(n.color)})),Kr=function(n){var e=n.icon,t=n.spinning,r=void 0!==t&&t,a=n.className,i=void 0===a?"":a,l=n.title,c=n.tooltip,u=n.containerStyle,s=n.color,f=qr(n,["icon","spinning","className","title","tooltip","containerStyle","color"]);f.width||f.height||(f.width=f.height=30);var d=function(){return"string"==typeof e?En[e]||null:e},p="nui-icon ".concat(i).concat(f.onClick?" nui-clickable":"").concat(r?" spin":"");return c?o.a.createElement(Ur,{text:c.text,position:c.position||"top"},o.a.createElement(Wr,{style:u},o.a.createElement(Zr,Gr({icon:d(),className:p,color:s},f)))):o.a.createElement(Wr,{style:u,title:l},o.a.createElement(Zr,Gr({icon:d(),className:p,color:s},f)),c?o.a.createElement(Ur,null,c):null)},Xr=function(n){return o.a.createElement(Kr,n)};Xr.propTypes={icon:u.a.oneOfType([u.a.instanceOf(w.IconifyIcon),u.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:u.a.string,spinning:u.a.bool,className:u.a.string,tooltip:u.a.string},Xr.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0};var Yr=t(55),Qr=t.n(Yr);function Vr(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return Vr=function(){return n},n}var no=y.a.div(Vr(),O.fontFamily,O.fontSizeText,O.header,O.fontFamily,O.fontFamily,O.fontSizeText),eo=function(n){var e=n.title,t=void 0===e?"NekoUI":e,r=n.subtitle,a=void 0===r?"By Jordy Meow":r,i=n.children,l=n.saving,c=void 0!==l&&l;return o.a.createElement(no,null,o.a.createElement("div",{className:"nui-header-logo-container"},o.a.createElement(jr,null)),o.a.createElement("div",{className:"nui-header-title-container"},o.a.createElement("h1",{className:"nui-header-title"},t),o.a.createElement("small",{className:"nui-header-subtitle"},o.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),o.a.createElement("div",{className:"nui-header-extra-content"},i),c&&o.a.createElement(Xr,{icon:Qr.a,width:"36",height:"36"}))},to=function(n){return o.a.createElement(eo,n)};function ro(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n"]);return ro=function(){return n},n}to.propTypes={title:u.a.string,subtitle:u.a.string,saving:u.a.bool},to.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1};var oo=y.a.div(ro(),O.fontFamily,O.blueRGB,O.white,O.darkGray,O.white,O.fontFamily),ao=function(n){var e=n.currentPage,t=n.limit,r=n.onClick,a=n.total,i=Math.ceil(0===a?1:t>0?a/t:1),l="nako-paging-controller-icon ".concat(1===e?"disabled":""),c="nako-paging-controller-icon ".concat(e===i?"disabled":""),u=function(n){r(n)};return o.a.createElement(oo,null,o.a.createElement("span",{className:"neko-paging-text"},a," result",a>0?"s":""),o.a.createElement("div",{className:"neko-paging-controller"},o.a.createElement(w.Icon,{icon:N.a,className:l,onClick:function(){return u(1)}}),o.a.createElement(w.Icon,{icon:R.a,className:l,onClick:function(){return u(e-1)}}),o.a.createElement("p",{className:"nako-paging-controller-text"},"Page ",e," of ",i),o.a.createElement(w.Icon,{icon:F.a,className:c,onClick:function(){return u(e+1)}}),o.a.createElement(w.Icon,{icon:I.a,className:c,onClick:function(){return u(i)}})))},io=function(n){return o.a.createElement(ao,n)};function lo(){var n=uo(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return lo=function(){return n},n}function co(){var n=uo(["\n display: flex;\n align-items: center;\n"]);return co=function(){return n},n}function uo(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}io.propTypes={currentPage:u.a.number,limit:u.a.number,total:u.a.number,onClick:u.a.func},io.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0};var so=y.a.div(co()),fo=y.a.span(lo(),O.blue,O.fontFamily,O.black,O.darkGray,O.darkGray),po=function(n){var e=n.id,t=n.value,r=n.onChange,a=n.busy,i=void 0!==a&&a,l=o.a.Children.map(n.children,(function(n,a){return o.a.cloneElement(n,{busy:i,isActive:n.props.value===t,onClick:function(n){n!==t&&r(n,e)}})}));return o.a.createElement(so,null,l)},mo=function(n){var e=n.title,t=n.value,r=void 0===t?0:t,a=n.count,i=n.onClick,l=n.busy,c=n.isActive;return o.a.createElement(fo,{onClick:function(){return i(r)},className:"".concat(c?"is-active":"")},e,null===a?null:o.a.createElement("span",null,"(",l?o.a.createElement(Xr,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},bo=function(n){return o.a.createElement(po,n)};bo.propTypes={id:u.a.string,value:u.a.string,onChange:u.a.func},bo.defaultProps={id:void 0,value:void 0,onChange:void 0};var go=function(n){return o.a.createElement(mo,n)};function ho(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return ho=function(){return n},n}go.propTypes={title:u.a.string,value:u.a.string,count:u.a.number,onClick:u.a.func,isActive:u.a.bool},go.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1};var yo=y.a.section(ho(),(function(n){return n.width}),(function(n){return n.width/2}),(function(n){return n.width}),(function(n){return n.width/2}),(function(n){return n.backgroundColor}),(function(n){return n.width}),(function(n){return n.width}),(function(n){return n.width+2}),(function(n){return n.width/2+2}),(function(n){return n.width}),(function(n){return n.width/2}),(function(n){return n.degrees}),(function(n){return n.width+2}),(function(n){return n.width/2})),vo=function(n){var e=n.value,t=void 0===e?1e3:e,r=(n.min,n.max),a=void 0===r?2500:r,i=n.width,l=void 0===i?200:i,c=n.background,u=void 0===c?"#007cba":c,s=n.children,f=180*(t<=a?t:a)/a;return o.a.createElement(yo,{backgroundColor:u,degrees:f,width:l},o.a.createElement("div",{class:"gauge"},o.a.createElement("div",{class:"mask"},o.a.createElement("div",{class:"semi-circle"}),o.a.createElement("div",{class:"semi-circle--mask"})),o.a.createElement("div",{class:"child-container"},o.a.createElement("div",{class:"child"},o.a.createElement("div",{class:"spacing"}),s))))};function xo(){var n=wo(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return xo=function(){return n},n}function Oo(){var n=wo(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return Oo=function(){return n},n}function wo(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}vo.propTypes={value:u.a.number,min:u.a.number,max:u.a.number,width:u.a.number,background:u.a.string},vo.defaultProps={value:1e3,min:0,max:2500,width:200,background:"#007cba"};y.a.p(Oo()),y.a.p(xo());function ko(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function Eo(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ko(Object(t),!0).forEach((function(e){jo(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ko(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function jo(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function So(n){return function(n){if(Array.isArray(n))return No(n)}(n)||function(n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(n))return Array.from(n)}(n)||zo(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(n,e,t,r,o,a,i){try{var l=n[a](i),c=l.value}catch(n){return void t(n)}l.done?e(c):Promise.resolve(c).then(r,o)}function Co(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||zo(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zo(n,e){if(n){if("string"==typeof n)return No(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?No(n,e):void 0}}function No(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function Ao(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n"]);return Ao=function(){return n},n}var Io=y.a.div(Ao()),To=function(n){var e=n.width,t=void 0===e?"100%":e,a=n.height,i=void 0===a?"100%":a,l=n.iconSize,c=void 0===l?48:l,u=n.onSuccess,s=void 0===u?function(){}:u,f=n.onFailure,d=void 0===f?function(){}:f,p=n.style,m=void 0===p?{}:p,b=n.apiUrl,g=n.apiConfig,y=Co(Object(r.useState)(!1),2),v=y[0],x=y[1],O=Co(Object(r.useState)(Math.floor(1e8*Math.random())),2),w=O[0],k=(O[1],Object(r.useRef)(null)),E=Co(Object(r.useState)(!1),2),j=E[0],S=E[1],P=function(){var n,e=(n=regeneratorRuntime.mark((function n(e){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return S(!0),g.file=e[0],n.next=4,Ua(b,g);case 4:(t=n.sent).success?s(t):d(t),S(!1);case 7:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function i(n){Po(a,r,o,i,l,"next",n)}function l(n){Po(a,r,o,i,l,"throw",n)}i(void 0)}))});return function(n){return e.apply(this,arguments)}}(),C=function(n){n.preventDefault(),n.stopPropagation()},z=function(n){n.preventDefault(),n.stopPropagation(),x(!0)},N=function(n,e){e.preventDefault(),e.stopPropagation(),x(!1),console.log(n),P(n)};return o.a.createElement(h,{busy:j},o.a.createElement("input",{type:"file",id:w,accept:"image/*",ref:k,onChange:function(n){var e=[n.target.files[0]];N(e,n)},style:{display:"none"}}),o.a.createElement(Io,{onClick:function(){k.current.click()},style:Eo(Eo({},m),{},{width:t,height:i}),className:v?"dropping":"",onDragOver:C,onDragEnter:z,onDragLeave:function(n){n.preventDefault(),n.stopPropagation(),x(!1)},onDrop:function(n){var e=So(n.dataTransfer.files);N(e,n)}},o.a.createElement(Xr,{width:c,height:c,icon:"upload",spinning:j,onDragOver:C,onDragEnter:z})))};To.propTypes={width:u.a.string,height:u.a.string,onSuccess:u.a.func,onFailure:u.a.func,style:u.a.object,apiUrl:u.a.string,apiConfig:u.a.object},To.defaultProps={width:"100%",height:"100%",onSuccess:function(){},onFailure:function(){},style:{}};var Ro=t(56),_o=t.n(Ro);function Fo(){return(Fo=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 Mo(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Bo(){var n=Lo(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return Bo=function(){return n},n}function Do(){var n=Lo(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return Do=function(){return n},n}function Lo(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var Uo=y.a.div(Do(),O.overlay,O.white),Go=y.a.div(Bo(),O.fontFamily,O.fontFamily),qo=function(n){var e=n.children,t=n.className,r=n.style,a=n.ok,i=void 0===a?"OK":a,l=n.cancel,c=void 0===l?"Cancel":l,u=n.customButtons,s=void 0===u?null:u,f=n.title,d=void 0===f?"":f,p=n.content,m=void 0===p?"":p,b=n.onOkClick,g=n.onCancelClick,h=Mo(n,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),y=r?"custom-modal":"",v=e||o.a.createElement(Go,null,d&&o.a.createElement("p",{className:"title"},d),m&&o.a.createElement("p",{className:"content"},m),o.a.createElement("div",{className:"button-group"},g&&o.a.createElement(Nn,{className:"danger",onClick:g},c),b&&o.a.createElement(Nn,{onClick:b},i),s));return o.a.createElement(o.a.Fragment,null,o.a.createElement(Uo,{id:"neko-modal-parent"}),o.a.createElement(_o.a,Fo({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(y)},h),v))},Ho=function(n){return o.a.createElement(qo,n)};Ho.propTypes={className:u.a.string,style:u.a.object,ok:u.a.string,cancel:u.a.string,title:u.a.string,content:u.a.string,onOkClick:u.a.func,onCancelClick:u.a.func,customButtons:u.a.object},Ho.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null};var $o=t(57),Jo=t.n($o);function Wo(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function Zo(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return Zo=function(){return n},n}var Ko=y.a.table(Zo(),O.white,O.fontFamily,O.blackRGB,O.blackRGB,O.blue,O.white,O.tableGray,O.blueRGB,O.white),Xo=function(n){var e=n.checked,t=n.intermediate,r=void 0!==t&&t,a=n.onSelect,i=void 0===a?function(){}:a,l=n.onUnselect,c=void 0===l?function(){}:l;Wo(n,["checked","intermediate","onSelect","onUnselect"]);return o.a.createElement(w.Icon,{icon:r?Jo.a:e?at.a:rt.a,width:"24px",height:"24px",onClick:function(){e?c():i()}})},Yo=function(n){var e=n.columns,t=n.data,r=n.busy,a=void 0!==r&&r,i=n.onSelect,l=n.onUnselect,c=n.selectedItems,u=n.sort,s=n.onSortChange,f=e.length+(i?1:0),d=t.map((function(n){var t=e.map((function(e){return{value:n[e.accessor],style:e.style||{}}}));return{id:n.id,cells:t}})),p=d.map((function(n){return n.id})),m=p.filter((function(n){return c.includes(n)})).length===p.length,b=!m&&c.length>0,g=e.reduce((function(n,e,t){return!1===e.visible&&n.push(t),n}),[]),y=o.a.createElement("tr",null,i&&o.a.createElement("th",{className:"table-checkbox-cell"},o.a.createElement(Xo,{checked:m,intermediate:b,onSelect:function(){return i(p)},onUnselect:function(){l(b?c:p)}})),e.filter((function(n,e){return!g.includes(e)})).map((function(n){var e=u&&u.accessor===n.accessor,t=u&&"asc"===u.by,r=n.style||{};return o.a.createElement("th",{style:r,key:n.accessor},o.a.createElement("div",{className:n.sortable?"sortable":"",onClick:n.sortable?function(){s(n.accessor,e&&t?"desc":"asc")}:void 0},o.a.createElement("div",null,n.title),o.a.createElement("div",null,n.sortable&&o.a.createElement(w.Icon,{icon:e?t?B.a:L.a:B.a,color:e?O.white:"rgba(".concat(O.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return o.a.createElement(h,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},o.a.createElement(Ko,null,o.a.createElement("thead",null,y),o.a.createElement("tbody",null,!d.length&&o.a.createElement("tr",null,o.a.createElement("td",{colspan:f,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),d.map((function(n){return o.a.createElement("tr",{className:c.includes(n.id)?"selected":""},i&&o.a.createElement("td",{className:"table-checkbox-cell"},o.a.createElement(Xo,{checked:c.includes(n.id),onSelect:function(){return i([n.id])},onUnselect:function(){return l([n.id])}})),n.cells.filter((function(n,e){return!g.includes(e)})).map((function(n){return o.a.createElement("td",{style:n.style},n.value)})))}))),o.a.createElement("tfoot",null,y)))},Qo=function(n){return o.a.createElement(Yo,n)};function Vo(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return na(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return na(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function na(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function ea(){var n=aa(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return ea=function(){return n},n}function ta(){var n=aa(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return ta=function(){return n},n}function ra(){var n=aa(["\n"]);return ra=function(){return n},n}function oa(){var n=aa(["\n"]);return oa=function(){return n},n}function aa(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}Qo.propTypes={columns:u.a.arrayOf(u.a.any),data:u.a.arrayOf(u.a.any),busy:u.a.arrayOf(u.a.bool),onSelect:u.a.func,onUnselect:u.a.func,selectedItems:u.a.arrayOf(u.a.object),onSortChange:u.a.func},Qo.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0};var ia=y.a.div(oa()),la=y.a.div(ra()),ca=y.a.button(ta(),O.fontFamily,O.fontSizeText,O.blue,O.white),ua=y.a.div(ea(),O.blue),sa=function(n){var e=Vo(o.a.useState(0),2),t=e[0],r=e[1],a=o.a.Children.map(n.children,(function(e,t){var r=e.props.title||"Untitled Tab "+(t+1);return{key:e.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:e.props.onClick?e.props.onClick:null,requirePro:!n.isPro&&(e.props.requirePro||!1)}})),i=o.a.Children.map(n.children,(function(n,e){return o.a.cloneElement(n,{isActive:e===t})}));return o.a.createElement(ia,null,o.a.createElement(la,null,a.map((function(e,a){return o.a.createElement(ca,{key:e.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(e.requirePro?"disabled":""),onClick:function(t){!function(e,t,o){t.requirePro||(r(e),n.onChange&&n.onChange(e,t,o))}(a,e,t)}},e.title,o.a.createElement(Fn,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:e.requirePro}))}))),i)},fa=function(n){var e=n.children,t=n.isActive;return o.a.createElement(ua,{className:"".concat(t?"active":"")},e)},da=function(n){return o.a.createElement(sa,n)};da.propTypes={isPro:u.a.bool,onChange:u.a.func},da.defaultProps={isPro:!1,onChange:void 0};var pa=function(n){return o.a.createElement(fa,n)};function ma(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return ba(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ba(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ba(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function ga(){var n=va(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return ga=function(){return n},n}function ha(){var n=va(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return ha=function(){return n},n}function ya(){var n=va(["\n"]);return ya=function(){return n},n}function va(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}pa.propTypes={isActive:u.a.bool,requirePro:u.a.bool,title:u.a.string},pa.defaultProps={isActive:!1,requirePro:!1,title:void 0};var xa=y.a.div(ya()),Oa=y.a.div(ha(),O.blue,O.yellowRGB,O.white,O.fontFamily,O.white),wa=y.a.div(ga(),O.white),ka=function(n){var e=ma(o.a.useState(),2),t=e[0],r=e[1],a=o.a.Children.map(n.children,(function(e,t){var r=e.props.title||"Untitled Tab "+(t+1);return{key:e.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:e.props.onClick?e.props.onClick:null,requirePro:!n.isPro&&(e.props.requirePro||!1)}})),i=o.a.Children.map(n.children,(function(n,e){return o.a.cloneElement(n,{isActive:e===t})}));return o.a.createElement(xa,null,a.map((function(e,a){return o.a.createElement(o.a.Fragment,null,o.a.createElement(Oa,{key:e.key,className:"".concat(a===t?"active":""," ").concat(e.requirePro?"disabled":""),onClick:function(o){!function(e,o,a){if(!o.requirePro){var i=e===t?null:e;r(i),n.onChange&&n.onChange(i,o,a)}}(a,e,o)}},o.a.createElement("p",null,e.title,o.a.createElement(Fn,{className:"inline",show:e.requirePro})),o.a.createElement(w.Icon,{icon:a===t?B.a:F.a,className:"neko-side-tab-icon"})),i[a])})))},Ea=function(n){var e=n.children,t=n.isActive;return o.a.createElement(wa,{className:"".concat(t?"active":"")},e)},ja=function(n){return o.a.createElement(ka,n)};ja.propTypes={isPro:u.a.bool,onChange:u.a.func},ja.defaultProps={isPro:!1,onChange:void 0};var Sa=function(n){return o.a.createElement(Ea,n)};function Pa(){var n=function(n,e){e||(e=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.neko-align-left {\n justify-content: flex-start;\n }\n\n &.neko-align-right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return Pa=function(){return n},n}Sa.propTypes={isActive:u.a.bool,requirePro:u.a.bool,title:u.a.string},Sa.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Ca=y.a.div(Pa(),O.white,O.blackRGB),za=function(n){var e=n.align,t=void 0===e?"left":e;return o.a.createElement(Ca,{className:"neko-align-".concat(t)},n.children)},Na=function(n){return o.a.createElement(za,n)};Na.propTypes={align:u.a.oneOf(["left","right"])},Na.defaultProps={align:"left"};t(22);function Aa(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var Ia=function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Aa(this,n),this.url=r,this.message=e,this.code=t,this.body=o,this.debug=a};function Ta(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||Ma(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ra(n,e,t,r,o,a,i){try{var l=n[a](i),c=l.value}catch(n){return void t(n)}l.done?e(c):Promise.resolve(c).then(r,o)}function _a(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function i(n){Ra(a,r,o,i,l,"next",n)}function l(n){Ra(a,r,o,i,l,"throw",n)}i(void 0)}))}}function Fa(n,e){var t;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(t=Ma(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=n[Symbol.iterator]()},n:function(){var n=t.next();return i=n.done,n},e:function(n){l=!0,a=n},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function Ma(n,e){if(n){if("string"==typeof n)return Ba(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ba(n,e):void 0}}function Ba(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var Da=function(n){if(!n.data)return n;if(n.data.length>0&&n.data[0].meta){var e,t=Fa(n.data);try{for(t.s();!(e=t.n()).done;){var r=e.value;try{r.meta=JSON.parse(r.meta)}catch(n){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(n){t.e(n)}finally{t.f()}}else if(n.data.meta)try{n.data.meta=JSON.parse(n.data.meta)}catch(n){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return n},La=function(){var n=_a(regeneratorRuntime.mark((function n(e){var t,r,o,a,i,l,c,u,s,f=arguments;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=f.length>1&&void 0!==f[1]?f[1]:{},r=null,o={},a=null,i=null,n.prev=5,(t=t||{}).headers=t.headers?t.headers:{},t.headers.Pragma="no-cache",t.headers["Cache-Control"]="no-cache",n.next=12,fetch("".concat(e),t);case 12:return i=n.sent,n.next=15,i.text();case 15:r=n.sent,(o=JSON.parse(r)).success||(l=!1===o.success?"NOT-SUCCESS":"N/A",c=o.message?o.message:"Unknown error. Check your Console Logs.","rest_no_route"===o.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===o.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),a=new Ia(c,l,e,r||i)),n.next=26;break;case 20:n.prev=20,n.t0=n.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),a=new Ia(s,u,e,r||i,n.t0);case 26:return a&&(console.error("[NekoError] JsonFetcher",a.url,{code:a.code,error:a.error,body:a.body}),o.success=!1,o.error=a),n.abrupt("return",Da(o));case 28:case"end":return n.stop()}}),n,null,[[5,20]])})));return function(e){return n.apply(this,arguments)}}(),Ua=function(){var n=_a(regeneratorRuntime.mark((function n(e){var t,r,o,a,i,l,c,u,s,f,d,p,m,b=arguments;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=b.length>1&&void 0!==b[1]?b[1]:{},r=t.json,o=void 0===r?{}:r,a=t.signal,i=t.file,l=t.nonce,c=i?new FormData:null,i)for(c.append("file",i),u=0,s=Object.entries(o);u<s.length;u++)f=Ta(s[u],2),d=f[0],p=f[1],c.append(d,p);return m=l?{"X-WP-Nonce":l}:{},c||(m["Content-Type"]="application/json"),n.abrupt("return",La(e,{method:"POST",headers:m,body:c||JSON.stringify(o),signal:a}));case 7:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),Ga=(mgcl_gallery_custom_links.prefix,mgcl_gallery_custom_links.domain,mgcl_gallery_custom_links.rest_url.replace(/\/+$/,""),mgcl_gallery_custom_links.api_url.replace(/\/+$/,""));mgcl_gallery_custom_links.plugin_url.replace(/\/+$/,""),"1"===mgcl_gallery_custom_links.is_pro&&mgcl_gallery_custom_links.is_registered,mgcl_gallery_custom_links.rest_nonce;function qa(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function Ha(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?qa(Object(t),!0).forEach((function(e){$a(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):qa(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function $a(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ja(n,e,t,r,o,a,i){try{var l=n[a](i),c=l.value}catch(n){return void t(n)}l.done?e(c):Promise.resolve(c).then(r,o)}function Wa(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){o=!0,a=n}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return Za(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Za(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Za(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var Ka=wp.element.useState,Xa=function(){var n=Object(l.a)("".concat(Ga,"/all_settings/"),La),e=n.data,t=n.mutate,o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object(r.useState)(e),a=Dn(o,2),i=a[0],l=a[1],c=Object(r.useState)(null),u=Dn(c,2),s=u[0],f=u[1],d=Object(r.useState)(t),p=Dn(d,2),m=p[0],b=p[1],g=Object(r.useState)(0),h=Dn(g,2),y=h[0],v=h[1];return Object(r.useEffect)((function(){void 0!==n&&(n.success?(f(null),l(n.data),v(n.total?n.total:0)):f(n.error)),b(void 0===n)}),[n]),{busy:m,data:i,total:y,error:s}}(e,{},!0),a=o.busy,i=o.data,c=o.error,u=Wa(Ka(!1),2),s=u[0],f=u[1],d=a||s,p=null==i?void 0:i.mgcl_obmode,m=null==i?void 0:i.mgcl_parsing_engine,b=null==i?void 0:i.mgcl_log,g=null==i?void 0:i.mgcl_button_enabled,h=null==i?void 0:i.mgcl_button_label,y=function(){var n,r=(n=regeneratorRuntime.mark((function n(r,o){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(a=Ha({},e.data))[o]=r,t(Ha(Ha({},e),{},{data:a}),!1),f(!0),n.prev=4,n.next=7,Ua("".concat(Ga,"/update_option"),{json:{name:o,value:r}});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n.catch(4),alert(n.t0.message);case 12:return n.prev=12,f(!1),t(),n.finish(12);case 16:case"end":return n.stop()}}),n,null,[[4,9,12,16]])})),function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function i(n){Ja(a,r,o,i,l,"next",n)}function l(n){Ja(a,r,o,i,l,"throw",n)}i(void 0)}))});return function(n,e){return r.apply(this,arguments)}}(),v=React.createElement(Me,{title:"OB Mode"},React.createElement(ft,{max:"1"},React.createElement(ct,{id:"mgcl_obmode",label:"Check",value:"1",checked:p,onChange:y}))),x=React.createElement(Me,{title:"Parsing Engine"},React.createElement(Yt,{id:"mgcl_parsing_engine",onChange:y},[{id:"none",value:"None",label:"None (Not Supported Yet)"},{id:"htmldomparser",value:"HtmlDomParser",label:"HtmlDomParser"},{id:"didom",value:"DiDom",label:"DiDom"}].map((function(n){return React.createElement(Qt,{id:"mgcl_parsing_engine_".concat(n.id),value:n.value,label:n.label,checked:m===n.value})})))),O=React.createElement(Me,{title:"Logs"},React.createElement(ft,{max:"1"},React.createElement(ct,{id:"mgcl_log",label:"Logs",value:"1",checked:b,onChange:y}))),w=React.createElement(Me,{title:"Use Buttons"},React.createElement(ft,{max:"1"},React.createElement(ct,{id:"mgcl_button_enabled",label:"Enabled",value:"1",description:"A call-to-action button will be used of a clickable image.",checked:g,onChange:y}))),k=React.createElement(Me,{title:"Label"},React.createElement(yt,{id:"mgcl_button_label",name:"mgcl_button_label",value:h,description:"A call-to-action button will be used of a clickable image.",onBlur:y}));return React.createElement(fe,{nekoErrors:[c]},React.createElement(to,{title:"Gallery Custom Links | Settings",subtitle:"By Jordy Meow"}),React.createElement(nt,null,React.createElement(et,{full:!0},React.createElement(Re,null,React.createElement(ke,{p:!0},"This plugin works out of the box, the default settings are the best for most installs. If your photos are only in the content, then you should switch the OB Mode off, that will make the process much faster. Don't hesitate to take a look at the ",React.createElement("a",{href:"https://meowapps.com/plugin/gallery-custom-links/"},"official page"),".")),React.createElement(da,null,React.createElement(pa,{title:"Settings"},React.createElement(nt,null,React.createElement(et,{minimal:!0},React.createElement(Pe,{busy:d,title:"Settings",className:"primary"},v,x,O)),React.createElement(et,{minimal:!0},React.createElement(Pe,{busy:d,title:"CTA Buttons",className:"primary"},React.createElement(ke,{p:!0},React.createElement("b",null,"Currently works with the ",React.createElement("a",{href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")," and Gutenberg Galleries.")," In a future Pro version, support for additional galleries might be added (please contact ",React.createElement("a",{href:"https://meowapps.com/contact/"},"Meow Apps")," for this)."),w,g?k:null))))))))};document.addEventListener("DOMContentLoaded",(function(n){var e=document.getElementById("mgcl-admin-settings");e&&i.a.render(o.a.createElement(Xa,null),e)}))}});
2
+ //# sourceMappingURL=index.js.map
app/index.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactDOM\"","webpack:///../neko-ui/src/common/NekoBusyOverlay.js","webpack:///../neko-ui/src/common/NekoTheme.js","webpack:///../neko-ui/src/common/PresetIcons.js","webpack:///../neko-ui/src/button/Button.js","webpack:///../neko-ui/src/label/ProOnly.js","webpack:///../neko-ui/src/hooks.js","webpack:///../neko-ui/src/button/MenuButton.js","webpack:///../neko-ui/src/container/Page.js","webpack:///../neko-ui/src/misc/Typography.js","webpack:///../neko-ui/src/container/Block.js","webpack:///../neko-ui/src/container/Container.js","webpack:///../neko-ui/src/container/Settings.js","webpack:///../neko-ui/src/container/Window.js","webpack:///../neko-ui/src/container/Wrapper.js","webpack:///../neko-ui/src/form/Checkbox.js","webpack:///../neko-ui/src/form/CheckboxGroup.js","webpack:///../neko-ui/src/form/Input.js","webpack:///../neko-ui/src/form/TextArea.js","webpack:///../neko-ui/src/form/Select.js","webpack:///../neko-ui/src/misc/Finder.js","webpack:///../neko-ui/src/misc/Logo.js","webpack:///../neko-ui/src/misc/Progress.js","webpack:///../neko-ui/src/misc/Tooltip.js","webpack:///../neko-ui/src/misc/Icon.js","webpack:///../neko-ui/src/misc/Header.js","webpack:///../neko-ui/src/misc/Paging.js","webpack:///../neko-ui/src/misc/Links.js","webpack:///../neko-ui/src/misc/Gauge.js","webpack:///../neko-ui/src/misc/Message.js","webpack:///../neko-ui/src/misc/Upload.js","webpack:///../neko-ui/src/modal/Modal.js","webpack:///../neko-ui/src/table/Table.js","webpack:///../neko-ui/src/tabs/Tabs.js","webpack:///../neko-ui/src/tabs/SideTabs.js","webpack:///../neko-ui/src/toolbar/Toolbar.js","webpack:///../neko-ui/src/errors.js","webpack:///../neko-ui/src/helpers.js","webpack:///./app/js/settings.js","webpack:///./app/js/components/Settings.js","webpack:///./app/js/index.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","React","ReactDOM","NekoBusyOverlay","props","spinner","busy","overlayStyle","useState","showLoader","setShowLoader","useEffect","timeout","setTimeout","clearTimeout","loader","Fragment","className","style","Boolean","jsx","propsForElement","undefined","position","children","propTypes","PropTypes","bool","isRequired","oneOfType","arrayOf","node","NekoTheme","black","blackRGB","blue","blueRGB","deepBlue","finderBorder","lightBlue","lightGray","gray","green","darkGray","disabledForm","orange","overlay","red","redHighlight","header","proGray","progress","tableGray","yellow","yellowRGB","white","fontFamily","fontSizeH1","fontSizeH2","fontSizeText","fontSizeSmall","lightShadow","presetIcons","lockCheck","lockOpenVariant","fileUndo","chevronDoubleLeft","chevronDoubleRight","chevronLeft","chevronRight","chevronDown","chevronUp","pauseIcon","playIcon","replayIcon","checkIcon","stopIcon","deleteIcon","undoIcon","alertCircle","databaseIcon","toolsIcon","cogIcon","closeIcon","catIcon","uploadIcon","trashCan","leadPencil","viewDashboard","databaseSearch","StyledButton","Styled","icon","onClick","disabled","color","rest","hasIcon","classNames","type","PresetIcons","width","height","marginRight","Theme","lighten","additionalColor","NekoButton","oneOf","instanceOf","IconifyIcon","string","func","defaultProps","Tag","a","Colors","StyledProOnly","show","href","target","ProOnly","useComponentSize","ref","useRef","size","setSize","current","observer","ResizeObserver","entries","element","contentRect","left","right","top","bottom","observe","unobserve","useOutsideClick","onOutsideClick","componentRef","handleOutsideClick","e","contains","document","addEventListener","removeEventListener","PQueue","concurrency","autoStart","MenuButtonWrapper","div","MenuButton","button","MenuItemContainer","StyledMenuButton","title","isPro","isOpen","setIsOpen","wrapperRef","buttonRef","buttonWidth","Children","map","child","cloneElement","marginLeft","transform","MenuItem","StyledNekoMenuItem","requirePro","needsProUser","NekoMenuButton","NekoMenuItem","Page","StyledNekoPage","nekoErrors","fatalError","setFatalError","showBody","setShowBody","error","url","code","message","body","dangerouslySetInnerHTML","__html","open","NekoPage","NekoH1","h1","NekoH2","h2","NekoP","NekoSpan","span","StyledNekoTypo","NekoTypo","any","Block","StyledNekoBlock","NekoBlock","Container","Bar","StyledNekoContainer","headerAlign","footer","footerAlign","NekoContainer","StyledNekoSettings","contentAlign","NekoSettings","WindowBase","TitleBar","StyledNekoWindow","NekoWindow","Wrapper","Column","StyledNekoWrapper","StyledNekoColumn","full","minimal","NekoWrapper","NekoColumn","StyledNekoCheckbox","id","checked","onChange","label","description","showUpProOnly","isDisabled","disabledClass","join","defaultChecked","console","log","htmlFor","checkboxMarked","checkboxBlankOutline","NekoCheckbox","StyledNekoCheckboxGroup","max","NekoCheckboxGroup","mas","number","StyledNekoInput","placeholder","onEnter","readOnly","step","min","maxLength","natural","newValue","setNewValue","isControlled","onKeyPress","event","preventDefault","onBlur","maxlength","spellcheck","NekoInput","StyledNekoTextArea","spellCheck","NekoTextArea","Select","SelectedOption","Description","Options","OptionsContainer","StyledNekoSelect","scrolldown","currentOption","toArray","find","showOptions","toggleOptions","onOptionClick","childrenLength","RadioOption","SelectOption","StyledNekoOption","radioOption","recordCircle","checkboxBlankCircleOutline","selectOption","NekoSelect","NekoOption","StyledNekoFinder","chevron","FinderTitle","ChevronSpace","ItemContainer","RightElementContainer","StyledNekoFinderItem","defaultIcons","gallery","imageMultipleOutline","tag","tagIcon","rightElement","showRightElement","isFolder","isCustomizedIcon","hasChild","expanded","setExpanded","keys","includes","folderIcon","setIcon","folderOpen","onMouseEnter","onMouseLeave","NekoFinder","NekoFinderItem","Logo","StyledNekoLogo","viewBox","fill","xmlns","stroke","strokeWidth","NekoLogo","StyledNekoProgress","status","Math","ratio","parseFloat","ProgressCurrent","onPauseClick","paused","onStopClick","percent","isNaN","parseInt","round","typeOfStatus","minWidth","NekoProgress","TooltipContainer","Tooltip","prop","visible","StyledNekoTooltip","text","setShow","tooltipRef","tooltipWidth","tooltipHeight","childRef","childWidth","childHeight","transformStyle","useMemo","transY","transX","NekoTooltip","StyledIconContainer","StyledIcon","Icon","hoverColor","StyledNekoIcon","spinning","tooltip","containerStyle","getIcon","iconClassName","NekoIcon","HeaderBase","StyledNekoHeader","subtitle","saving","textDecoration","contentSave","NekoHeader","PagingContainer","StyledNekoPaging","currentPage","limit","total","maxPage","ceil","prevIconClassName","nextIconClassName","onClickHandle","page","NekoPaging","LinkContainer","Link","StyledNekoQuickLinks","isActive","StyledNekoLink","count","display","NekoQuickLinks","NekoLink","StyledSection","section","backgroundColor","degrees","NekoGauge","background","class","StyledUpload","NekoUpload","iconSize","onSuccess","onFailure","apiUrl","apiConfig","inDropZone","setInDropZone","floor","random","inputId","inputEl","setBusy","uploadFile","files","file","postFetch","res","success","onDragOver","stopPropagation","onDragEnter","uploadFiles","accept","click","onDragLeave","onDrop","dataTransfer","NekoModalParent","NekoModalContent","StyledNekoModal","ok","cancel","customButtons","content","onOkClick","onCancelClick","customClassName","modalContent","ariaHideApp","parentSelector","getElementById","closeTimeoutMS","NekoModal","Table","table","TableCheckBox","intermediate","onSelect","onUnselect","checkboxMultipleMarked","StyledNekoTable","columns","selectedItems","sort","onSortChange","columnsCount","rows","v","cells","accessor","currentRowsIds","x","areAllRowsSelected","filter","isIntermediate","hiddenColumnIndexes","reduce","headersFooters","column","beingSorted","beingSortedAsc","by","thStyle","sortable","colspan","textAlign","row","cell","NekoTable","TabContainer","TabGroup","Tab","TabContent","StyledNekoTabs","isActiveTabIndex","setIsActiveTabIndex","tabAttributes","toLowerCase","attr","ev","tabIndex","tabAttr","onTabClick","StyledNekoTab","NekoTabs","NekoTab","StyledNekoSideTabs","activeTabIndex","newTabIndex","StyledNekoSideTab","NekoSideTabs","NekoSideTab","ToolbarBase","StyledNekoToolbar","align","NekoToolbar","NekoError","debug","this","consolidateJsonResult","json","meta","JSON","parse","err","jsonFetcher","options","nekoError","rawBody","headers","fetch","config","signal","nonce","formData","FormData","append","method","stringify","mgcl_gallery_custom_links","prefix","domain","rest_url","replace","api_url","plugin_url","is_pro","is_registered","rest_nonce","wp","Settings","useSWR","swrSettings","mutateSwrSettings","mutate","swrData","defaultData","defaultBusy","setData","setError","setTotal","useHandleSWR","busySettings","settings","swrError","busyAction","setBusyAction","obmode","mgcl_obmode","parsingEngine","mgcl_parsing_engine","mgcl_log","buttonEnabled","mgcl_button_enabled","buttonLabel","mgcl_button_label","updateOption","newSettingsData","alert","jsxOBMode","jsxParsingEngine","option","jsxLog","jsxUseButtons","jsxButtonLabel","container","render"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,E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,CAAUrB,GAAC,GAAC,yDAA4B,yBAAG2H,KAAK,+CAAR,gBAA5B,6BAAZ,6FAAqO,yBAAGA,KAAK,iCAAR,aAArO,eACCid,EACCX,EAAuBY,EAAP,cC9GtCxb,SAASC,iBAAiB,oBAAoB,SAASmH,GAGtD,IAAMqU,EAAYzb,SAASkT,eAAe,uBACtCuI,GACHxkB,IAASykB,OAAQ,kBAAC,GAAD,MAAeD","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"wpJsonMgcl\"] = window[\"wpJsonMgcl\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([79,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = React;","module.exports = ReactDOM;","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst NekoBusyOverlay = (props) => {\n const { spinner = true, busy = false, overlayStyle } = props;\n const [ showLoader, setShowLoader ] = useState(true);\n\n useEffect(() => {\n let timeout;\n\n // Show the loader\n if (!busy) { \n timeout = setTimeout(() => { \n setShowLoader(false); \n timeout = null; \n }, 250);\n }\n else { \n setShowLoader(true);\n }\n\n // Cleanup\n return (() => {\n if (timeout) {\n clearTimeout(timeout);\n }\n });\n }, [busy]);\n\n const loader = !showLoader ? null : (\n <React.Fragment>\n <div className={'overlay' + ' ' + (!busy ? 'overlayHidden' : '')} style={overlayStyle}>\n {Boolean(spinner) && \n <div className={'lds-ellipsis ' + (!busy ? 'spinnerHidden' : '')}>\n <div></div><div></div><div></div><div></div>\n </div>\n }\n </div>\n <style jsx>{`\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n `}</style>\n </React.Fragment>\n );\n\n // I am removing the busy because I like it as a boolean...\n // ... but React doesn't like pure boolean value here.\n const propsForElement = { ...props, busy: undefined, spinner: undefined };\n return (\n <div style={{ position: 'relative' }} {...propsForElement}> \n {loader}\n {props.children}\n </div>\n );\n};\n\nNekoBusyOverlay.propTypes = {\n busy: PropTypes.bool.isRequired,\n spinner: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired\n};\n\nexport default NekoBusyOverlay;","const NekoTheme = {\n\n // COLORS\n\n black: 'black',\n blackRGB: '0, 0, 0',\n blue: '#007cba',\n blueRGB: '0, 124, 186',\n deepBlue: '#134575',\n finderBorder: '#DEDEDE',\n lightBlue: '#EBF3FF',\n lightGray: '#F1F1F1',\n gray: '#E8E8E8',\n green: '#0EA480',\n darkGray: '#A0A0A0',\n disabledForm: '#828282',\n orange: '#daa827',\n overlay: 'rgba(16, 16, 16, 0.92)',\n red: '#ba4300',\n redHighlight: '#de5307',\n header: '#134675',\n proGray: '#7F8EA0',\n progress: '#8414a8',\n tableGray: '#FAFAFA',\n yellow: '#e4b42b',\n yellowRGB: '224, 156, 54',\n white: 'white',\n\n // FONT\n\n fontFamily: 'Lato',\n fontSizeH1: '24px',\n fontSizeH2: '18px',\n fontSizeText: '13px',\n fontSizeSmall: '12px',\n\n // SHADOW\n\n lightShadow: '0px 0px 10px rgba(0,0,0,0.1)',\n};\n\nexport default NekoTheme;\n","import lockCheck from '@iconify/icons-mdi/lock-check';\nimport lockOpenVariant from '@iconify/icons-mdi/lock-open-variant';\nimport fileUndo from '@iconify/icons-mdi/file-undo';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport playIcon from '@iconify/icons-mdi/play';\nimport replayIcon from '@iconify/icons-mdi/replay';\nimport checkIcon from '@iconify/icons-mdi/check';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport deleteIcon from '@iconify/icons-mdi/delete';\nimport undoIcon from '@iconify/icons-mdi/undo';\n//import alertIcon from '@iconify/icons-mdi/alert';\nimport alertCircle from '@iconify/icons-mdi/alert-circle';\nimport databaseIcon from '@iconify/icons-mdi/database';\nimport pencilIcon from '@iconify/icons-mdi/pencil';\nimport toolsIcon from '@iconify/icons-mdi/tools';\nimport cogIcon from '@iconify/icons-mdi/cog';\nimport closeIcon from '@iconify/icons-mdi/close';\nimport catIcon from '@iconify/icons-mdi/cat';\nimport uploadIcon from '@iconify/icons-mdi/upload';\nimport trashCan from '@iconify/icons-mdi/trash-can';\nimport leadPencil from '@iconify/icons-mdi/lead-pencil';\nimport viewDashboard from '@iconify/icons-mdi/view-dashboard';\nimport databaseSearch from '@iconify/icons-mdi/database-search';\n\nconst presetIcons = {\n 'lock': lockCheck,\n 'lock-open': lockOpenVariant,\n 'file-undo': fileUndo,\n 'chevron-double-left': chevronDoubleLeft,\n 'chevron-double-right': chevronDoubleRight,\n 'chevron-left': chevronLeft,\n 'chevron-right': chevronRight,\n 'chevron-down': chevronDown,\n 'chevron-up': chevronUp,\n 'pause': pauseIcon,\n 'play': playIcon,\n 'replay': replayIcon,\n 'check': checkIcon,\n 'stop': stopIcon,\n 'delete': deleteIcon,\n 'undo': undoIcon,\n 'alert': alertCircle,\n 'database': databaseIcon,\n 'tools': toolsIcon,\n 'cog': cogIcon,\n 'close': closeIcon,\n 'cat': catIcon,\n 'upload': uploadIcon,\n 'trash': trashCan,\n 'pencil': leadPencil,\n 'dashboard': viewDashboard,\n 'search': databaseSearch\n};\n\nexport default presetIcons;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { Icon, IconifyIcon } from '@iconify/react';\nimport PresetIcons from '../common/PresetIcons';\n\nconst StyledButton = Styled(props => {\n\n const { className, icon = null, onClick, disabled = false, color = null, children, ...rest } = props;\n const hasIcon = !!icon;\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const classNames = `nui-button ${className || ''}${hasIcon ? ' has-icon' : ''} ${color ? 'custom-color' : ''}`;\n\n return (\n <button type=\"button\" className={classNames} onClick={onClick} disabled={disabled} {...rest}>\n {hasIcon && <Icon icon={getIcon()} width=\"24\" height=\"24\" style={{ marginRight: '4px' }} />}\n <span>{children}</span>\n </button>\n );\n})`\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n padding: 0 15px;\n\n background-color: ${Theme.blue};\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ${Theme.lightBlue};\n border: 1px solid ${Theme.blue};\n color: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.lightBlue)};\n }\n }\n\n &.danger {\n background-color: ${Theme.red};\n border-color: ${Theme.red};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.red)};\n\t }\n }\n\n &.success {\n background-color: ${Theme.green};\n border-color: ${Theme.green};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.green)};\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ${props => additionalColor(props.color)}\n`;\n\nconst additionalColor = (color) => {\n if (color) {\n return `\n &.custom-color {\n background-color: ${color};\n border: 1px solid ${color};\n\n &:hover {\n background-color: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\n/**\n * The NekoButton works out of the box without specific attributes.\n */\nconst NekoButton = (props) => {\n return (<StyledButton {...props} />);\n};\n\nNekoButton.propTypes = {\n className: PropTypes.oneOf(['primary', 'secondary', 'danger', 'success']),\n disabled: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['setting', 'edit', 'trash'])]),\n color: PropTypes.string,\n onClick: PropTypes.func.isRequired\n};\n\nNekoButton.defaultProps = {\n className: 'primary',\n disabled: false,\n icon: null,\n color: null,\n onClick: () => {}\n};\n\nexport { NekoButton };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport Theme from '../common/NekoTheme';\n\nconst Tag = Styled.a`\n background-color: ${Colors.yellow};\n position: relative;\n border-radius: 10px;\n color: ${Colors.white};\n font-family: ${Theme.fontFamily};\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ${Colors.white};\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n`;\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledProOnly = (props) => {\n\n const { show = true, className, ...rest } = props;\n\n if (!show) {\n return null;\n }\n\n return (\n <Tag href='https://store.meowapps.com' target='_blank' className={`${className || ''}`} {...rest}>\n Pro Only\n </Tag>\n );\n};\n\nconst ProOnly = (props) => {\n return (<StyledProOnly {...props} />);\n}\n\nProOnly.propTypes = {\n show: PropTypes.bool,\n className: PropTypes.string\n};\n\nProOnly.defaultProps = {\n show: true,\n className: undefined\n};\n\nexport { ProOnly };\n","import React, { useState, useRef, useEffect, useCallback } from 'react';\nimport PQueue from 'p-queue';\n\nconst useHandleSWR = (swrData = undefined, defaultData = null, defaultBusy = false) => {\n const [ data, setData ] = useState(defaultData);\n const [ error, setError ] = useState(null);\n const [ busy, setBusy ] = useState(defaultBusy);\n const [ total, setTotal ] = useState(0);\n\n useEffect(() => {\n if (swrData !== undefined) { \n if (swrData.success) {\n setError(null);\n setData(swrData.data);\n setTotal(swrData.total ? swrData.total : 0);\n }\n else {\n setError(swrData.error);\n }\n }\n setBusy(swrData === undefined);\n }, [ swrData ]);\n\n return { busy, data, total, error };\n}\n\n// Sometimes, we need to align or place elements depending on other dynamic elements.\n// This hook returns a ref (which should be assign to a component), and the size of\n// this element every time it changes.\n\nconst useComponentSize = () => {\n const ref = useRef();\n const [ size, setSize ] = useState({});\n\n useEffect(() => {\n if (ref && ref.current) {\n const observer = new ResizeObserver(entries => {\n let element = entries[0];\n if (element.contentRect) {\n setSize({ \n width: element.contentRect.left + element.contentRect.right, \n height: element.contentRect.top + element.contentRect.bottom \n });\n }\n });\n observer.observe(ref.current);\n return () => { observer.unobserve(ref.current); };\n }\n }, []);\n return { ref, width: size.width ? size.width : 0, height: size.height ? size.height : 0 };\n};\n\n// If a click is made outside the component, then the function onOutsideClick is called.\n// This function returns a ref which needs to be assigned to the component.\n\nconst useOutsideClick = (onOutsideClick) => {\n const componentRef = useRef();\n const handleOutsideClick = (e) => {\n if (!onOutsideClick || componentRef.current.contains(e.target)) {\n return;\n }\n onOutsideClick();\n };\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleOutsideClick);\n return () => { document.removeEventListener(\"mousedown\", handleOutsideClick); };\n });\n return componentRef;\n};\n\n\n// This hook allows calling many requests without having too many of them\n// running concurrently.\n\nlet GlobalQueue = null;\n\nconst useNekoGlobalQueue = (params = {}) => {\n\n if (!GlobalQueue) {\n let { concurrency = 2 } = params;\n GlobalQueue = new PQueue({ concurrency, autoStart: true });\n }\n\n const runTask = async (func) => {\n return await GlobalQueue.add(func);\n }\n\n return { runTask };\n};\n\n// This hook handles batch of asynchronous requests, and provide everything\n// the NekoProgress might need.\n\nconst isDebug = false;\nconst UploadQueue = new PQueue({ concurrency: 1, autoStart: false });\n\nconst useNekoTasks = () => {\n\n // We should be able to kill fetch requests using this\n // Interesting article: https://davidwalsh.name/cancel-fetch\n const [ controller, setController ] = useState(new AbortController());\n const refSkip = useRef(false);\n const refErrors = useRef(0);\n const [ busy, setBusy ] = useState(null);\n const [ paused, setPaused ] = useState(false);\n const [ max, setMax ] = useState(0);\n const [ error, setError ] = useState(false);\n const [ success, setSuccess ] = useState(false);\n const [ value, setValue ] = useState(0);\n\n const reset = async () => {\n let newController = new AbortController();\n setController(newController);\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setValue(0);\n setMax(0);\n };\n\n const start = async (tasks) => {\n const runnerPromise = new Promise((resolve, reject) => {\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setTasks(tasks);\n setBusy(true);\n if (isDebug) { console.log('Started process.'); }\n UploadQueue.start();\n UploadQueue.onIdle().then(() => {\n onIdle();\n resolve();\n }); \n });\n return runnerPromise;\n };\n\n const pause = async () => {\n if (isDebug) { console.log('Paused process.'); }\n UploadQueue.pause();\n setPaused(true);\n };\n\n const resume = async () => {\n if (isDebug) { console.log('Resume process.'); }\n setError(false);\n setPaused(false);\n UploadQueue.start();\n };\n\n const stop = async () => {\n if (isDebug) { console.log('Cancelled process.'); }\n UploadQueue.pause();\n controller.abort();\n setBusy(false);\n setError(false);\n setSuccess(false);\n };\n\n const onIdle = async () => {\n if (isDebug) { console.log('onIdle.'); }\n setSuccess(true);\n setBusy(false);\n };\n\n const addTask = async (task) => {\n UploadQueue.add(async () => {\n try {\n let res = await task(controller.signal);\n if (!res || !res.success) {\n console.error('[useNekoTasks] Task returned nothing.', res);\n }\n if (!res.success) {\n refErrors.current++;\n if (!refSkip.current) {\n setError(res.error);\n pause();\n }\n }\n }\n catch (err) {\n if (err.name === 'AbortError') {\n console.log('Aborted');\n return;\n }\n else {\n refErrors.current++;\n if (!refSkip.current) {\n setError(\"An error was caught (more information in the console).\");\n pause();\n }\n }\n }\n finally {\n setValue(value => value + 1);\n }\n });\n setMax(max => max + 1);\n }\n\n const setTasks = async (tasks) => {\n UploadQueue.clear();\n for (let task of tasks) {\n addTask(task);\n }\n setValue(0);\n };\n\n const setAlwaysSkip = useCallback((value = true) => {\n refSkip.current = true;\n }, []);\n\n const getErrorCount = useCallback(() => {\n return refErrors.current;\n }, []);\n\n return { start, stop, pause, resume, reset, \n addTask, setAlwaysSkip, getErrorCount,\n error, success, busy, paused, value, max };\n};\n\nexport { useHandleSWR, useOutsideClick, useNekoGlobalQueue, useNekoTasks, useComponentSize };","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport { useOutsideClick, useComponentSize } from '../hooks';\n\nconst MenuButtonWrapper = Styled.div`\n display: inline-block;\n`;\n\nconst MenuButton = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n`;\n\nconst MenuItemContainer = Styled.div`\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ${Theme.blue};\n position: absolute;\n z-index: 10;\n box-shadow: ${Theme.lightShadow};\n\n &:before {\n content: \"\";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ${Theme.blue};\n }\n`;\n\nconst StyledMenuButton = props => {\n\n const { title, disabled = false, isPro = false, style = {} } = props;\n const [ isOpen, setIsOpen ] = React.useState(false);\n const wrapperRef = useOutsideClick(() => { setIsOpen(false) });\n const { ref: buttonRef, width: buttonWidth } = useComponentSize();\n\n const onClick = () => {\n setIsOpen(!isOpen);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n isPro,\n disabled: child.props.disabled || disabled,\n onClick: () => {\n if (child.props.onClick) {\n child.props.onClick();\n }\n onClick();\n }\n });\n });\n\n return (\n <MenuButtonWrapper ref={wrapperRef}>\n <MenuButton ref={buttonRef} type=\"button\" disabled={disabled} onClick={onClick} style={style}>\n <span>{title}</span>\n <Icon icon={chevronDown} width=\"24\" height=\"24\" style={{ marginLeft: '4px' }} />\n </MenuButton>\n {isOpen &&\n <MenuItemContainer style={{ transform: `translateX(calc(-50% + ${buttonWidth / 2}px))` }}>\n {children}\n </MenuItemContainer>\n }\n </MenuButtonWrapper>\n );\n};\n\nconst MenuItem = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ${Theme.proGray};\n justify-content: space-between;\n }\n`;\n\nconst StyledNekoMenuItem = props => {\n\n const { onClick, children, isPro, requirePro = false, disabled } = props;\n const needsProUser = requirePro && !isPro;\n\n return (\n <MenuItem type=\"button\" className={needsProUser? 'is-pro' : ''} onClick={onClick} disabled={disabled || needsProUser}>\n <span>{children}</span>\n {needsProUser && !isPro && <ProOnly />}\n </MenuItem>\n );\n};\n\n/**\n * The NekoMenuButton works out of the box without specific attributes.\n */\nconst NekoMenuButton = (props) => {\n return (<StyledMenuButton {...props} />);\n}\nconst NekoMenuItem = (props) => {\n return (<StyledNekoMenuItem {...props} />);\n}\n\nNekoMenuButton.propTypes = {\n title: PropTypes.string,\n disabled: PropTypes.bool,\n isPro: PropTypes.bool\n};\n\nNekoMenuButton.defaultProps = {\n title: undefined,\n disabled: false,\n isPro: false\n};\n\nNekoMenuItem.propTypes = {\n onClick: PropTypes.func.isRequired,\n requirePro: PropTypes.bool\n};\n\nNekoMenuItem.defaultProps = {\n onClick: () => {},\n requirePro: false\n};\n\nexport { NekoMenuButton, NekoMenuItem };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoButton } from '../button/Button';\n\nconst Page = Styled.div`\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoPage = props => {\n\n const { className, children, nekoErrors = [], style = {} } = props;\n const [ fatalError, setFatalError ] = useState(false);\n const [ showBody, setShowBody ] = useState(false);\n\n if (nekoErrors && !fatalError) {\n for (let error of nekoErrors) {\n if (error) {\n setFatalError(error);\n break\n }\n }\n }\n\n return (\n <Page className={className || ''} style={style}>\n {fatalError && \n <div className='neko-rest-error'>\n <div className='container'>\n {!showBody &&\n <>\n <h3>The Rest API is disabled or broken 😢</h3>\n <p>The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled.</p>\n <p><i>Last but not least: check your PHP Error Logs and your Debugging Console.</i></p>\n <p className='neko-debug'>\n <small>\n URL: {fatalError.url}<br />\n CODE: {fatalError.code}<br />\n MESSAGE: {fatalError.message}<br />\n </small>\n </p>\n </>\n }\n {fatalError.body && showBody &&\n <p className='neko-debug'>\n <div dangerouslySetInnerHTML={{ __html: fatalError.body }}></div>\n </p>\n }\n {fatalError.body &&\n <NekoButton color=\"#a94242\" onClick={() => setShowBody(!showBody)}>\n {showBody ? 'Hide' : 'Display'} response from server\n </NekoButton>\n }\n <NekoButton color=\"#a94242\" onClick={() => { window.open('https://meowapps.com/debugging-wordpress/', '_blank') }}>\n Learn about WordPress Debugging\n </NekoButton>\n </div>\n </div>}\n {children}\n </Page>\n );\n};\n\nconst NekoPage = (props) => {\n return (<StyledNekoPage {...props} />);\n};\n\nNekoPage.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n nekoErrors: PropTypes.bool\n};\n\nNekoPage.defaultProps = {\n className: undefined,\n style: {},\n nekoErrors: false\n};\n\nexport { NekoPage };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport Theme from '../common/NekoTheme';\n\nconst NekoH1 = Styled.h1`\n font-family: ${Theme.fontFamily};\n font-weight: normal;\n font-size: ${Theme.fontSizeH1};\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoH2 = Styled.h2`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeH2};\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoP = Styled.p`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n`;\n\nconst NekoSpan = Styled.span`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 0;\n padding: 0;\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTypo = props => {\n const { children, ...rest } = props;\n return (\n props.h1 ? <NekoH1 {...rest}>{children}</NekoH1>\n : props.h2 ? <NekoH2 {...rest}>{children}</NekoH2>\n : props.p ? <NekoP {...rest}>{children}</NekoP>\n : <NekoSpan {...rest}>{children}</NekoSpan>\n );\n};\n\nconst NekoTypo = (props) => {\n return (<StyledNekoTypo {...props} />);\n}\n\nNekoTypo.propTypes = {\n h1: PropTypes.any,\n h2: PropTypes.any,\n p: PropTypes.any\n};\n\nNekoTypo.defaultProps = {\n h1: undefined,\n h2: undefined,\n p: undefined\n};\n\nexport { NekoTypo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoTypo } from '../misc/Typography';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Block = Styled.div`\n font-size: ${Theme.fontSizeText};\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ${Theme.blue};\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ${Theme.blue};\n\n .nui-block-title {\n color: ${Theme.white};\n }\n\n .nui-block-content {\n background-color: ${Theme.white};\n }\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoBlock = props => {\n\n const { title, children, className, busy = false, style = {} } = props;\n\n return (\n \n <Block className={'nui-block ' + (className || '')} style={style}>\n <NekoBusyOverlay busy={busy}>\n <NekoTypo h2 className=\"nui-block-title\">{title}</NekoTypo>\n <div className=\"nui-block-content\">\n {children}\n </div>\n </NekoBusyOverlay>\n </Block>\n \n );\n};\n\nconst NekoBlock = (props) => {\n return (<StyledNekoBlock {...props} />);\n}\n\nNekoBlock.propTypes = {\n title: PropTypes.string,\n className: PropTypes.oneOf(['', 'primary']),\n style: PropTypes.object\n};\n\nNekoBlock.defaultProps = {\n title: undefined,\n className: '',\n style: {}\n};\n\nexport { NekoBlock };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst Container = Styled.div`\n font-size: ${Theme.fontSizeText};\n font-family: ${Theme.fontFamily};\n background-color: ${Theme.white};\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ${Theme.blue};\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n`;\n\nconst Bar = Styled.div`\n justify-content: flex-start;\n background-color: ${Theme.lightGray};\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoContainer = props => {\n\n const { children, header, headerAlign = 'left', footer, footerAlign = 'right', className, style = {} } = props;\n\n return (\n <Container className={className || ''} style={style}>\n {header && <Bar className={`align-${headerAlign}`}>{ header }</Bar>}\n <div className=\"content\">\n { children }\n </div>\n {footer && <Bar className={`align-${footerAlign}`}>{ footer }</Bar>}\n </Container>\n );\n};\n\nconst NekoContainer = (props) => {\n return (<StyledNekoContainer {...props} />);\n}\n\nNekoContainer.propTypes = {\n header: PropTypes.element,\n headerAlign: PropTypes.oneOf(['left', 'right']),\n footer: PropTypes.element,\n footerAlign: PropTypes.oneOf(['left', 'right']),\n className: PropTypes.string,\n style: PropTypes.object\n};\nNekoContainer.defaultProps = {\n header: undefined,\n headerAlign: 'left',\n footer: undefined,\n footerAlign: 'right',\n className: undefined,\n style: {}\n};\n\nexport { NekoContainer };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} title=''\n */\nconst StyledNekoSettings = Styled(props => {\n const { title = '', contentAlign = 'left' } = props;\n return (\n <div className={props.className || ''}>\n {title ? <div className=\"nui-settings-head\">{title}</div> : null}\n <div className={`nui-settings-content nui-settings-content-align-${contentAlign}`}>\n {props.children}\n </div>\n </div>\n );\n})`\n display: flex;\n font-family: ${Theme.fontFamily};\n\n > .nui-settings-head {\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n`;\n\nconst NekoSettings = (props) => {\n return (<StyledNekoSettings {...props} />);\n}\n\nNekoSettings.propTypes = {\n title: PropTypes.string,\n className: PropTypes.string,\n contentAlign: PropTypes.string\n};\n\nNekoSettings.defaultProps = {\n title: '',\n className: undefined,\n contentAlign: 'left'\n};\n\nexport { NekoSettings };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst WindowBase = Styled.div`\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n`;\n\nconst TitleBar = Styled(props => (\n props.children ? (\n <div className={props.className}>\n {props.children}\n </div>\n ) : null\n))`\n background-color: ${Theme.blue};\n color: white;\n`;\n\nconst StyledNekoWindow = props => (\n <WindowBase className='window'>\n <TitleBar>{props.title}</TitleBar>\n {props.children}\n </WindowBase>\n);\n\nconst NekoWindow = (props) => {\n return (<StyledNekoWindow {...props} />);\n}\n\nNekoWindow.propTypes = {\n title: PropTypes.string\n};\nNekoWindow.defaultProps = {\n title: undefined\n};\n\nexport { NekoWindow };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Wrapper = Styled.div`\n display: flex;\n flex-wrap: wrap;\n`;\n\nconst Column = Styled.div`\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoWrapper = props => {\n return (\n <Wrapper>\n { props.children }\n </Wrapper>\n );\n};\n\nconst StyledNekoColumn = props => {\n const { full, minimal, ...rest } = props;\n let className = full ? 'full' : '';\n className += minimal ? ' minimal' : '';\n return (\n <Column className={className} {...rest}>{props.children}</Column>\n );\n};\n\nconst NekoWrapper = (props) => {\n return (<StyledNekoWrapper {...props} />);\n};\n\nconst NekoColumn = (props) => {\n return (<StyledNekoColumn {...props} />);\n};\n\nNekoWrapper.propTypes = {\n};\nNekoWrapper.defaultProps = {\n};\n\nNekoColumn.propTypes = {\n full: PropTypes.any\n};\nNekoColumn.defaultProps = {\n full: undefined\n};\n\nexport { NekoWrapper, NekoColumn };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n */\nconst StyledNekoCheckbox = Styled(props => {\n const { id, name, checked = false, onChange, label, description, isPro, disabled, requirePro = false } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const isDisabled = disabled || showUpProOnly;\n const disabledClass = isDisabled ? 'disabled' : '';\n\n const onClick = () => {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(!checked, id);\n };\n\n return (\n <div className={['nui-checkbox', props.className, disabledClass].join(' ')}>\n <input id={id} name={name} type=\"checkbox\" defaultChecked={false} onClick={onClick} disabled={isDisabled} />\n <label htmlFor={id}>\n <div className=\"nui-checkbox-check-container\">\n <Icon icon={checked ? checkboxMarked : checkboxBlankOutline} width=\"30px\" height=\"30px\" \n color={isDisabled ? Theme.disabledForm : Theme.blue} />\n </div>\n <div className=\"nui-checkbox-inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </div>\n );\n})`\n font-family: ${Theme.fontFamily};\n\n &.disabled {\n color: ${Theme.disabledForm};\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n`;\n\nconst NekoCheckbox = (props) => {\n return (<StyledNekoCheckbox {...props} />);\n};\n\nNekoCheckbox.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool\n};\n\nNekoCheckbox.defaultProps = {\n id: undefined,\n name: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n isPro: false,\n requirePro: false\n};\n\nexport { NekoCheckbox };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\n/**\n * @param {string} name\n * @param {int} max=-1 Max number of checkboxes to be checked. Negative number means unlimited\n */\nconst StyledNekoCheckboxGroup = Styled(props => {\n const { name, max = -1, isPro = false } = props;\n\n // React.Children.toArray(props.children)\n\n // Modify child components (Checkboxes)\n const children = React.Children.map(props.children, child => {\n if (child.props.name) return child; // Do not modify if the child has its own name\n return React.cloneElement(child, {\n name: name, // Apply the group's name\n isPro\n });\n });\n\n return children;\n})`\n`;\n\nconst NekoCheckboxGroup = (props) => {\n return (<StyledNekoCheckboxGroup {...props} />);\n}\n\nNekoCheckboxGroup.propTypes = {\n name: PropTypes.string,\n mas: PropTypes.number,\n isPro: PropTypes.bool\n};\n\nNekoCheckboxGroup.defaultProps = {\n name: undefined,\n mas: -1,\n isPro: false\n}\n\nexport { NekoCheckboxGroup };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoInput = Styled(props => {\n const { id, name, value = '', description, placeholder = '', onEnter = null,\n readOnly = false, type = 'text', step = 1, min = 1, max = 999, \n maxLength = 3, className, style, natural = false, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const isControlled = !!props.onChange;\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n }, [ value ]);\n\n const onChange = (e) => {\n if (isControlled) { \n props.onChange(e.target.value, id);\n }\n else {\n setNewValue(e.target.value, id);\n }\n };\n\n const onKeyPress = (e) => {\n if (onEnter && event.key === 'Enter') {\n e.preventDefault();\n props.onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (props.onBlur && value !== e.target.value) {\n props.onBlur(e.target.value, id);\n }\n };\n\n const classNames = `neko-input ${natural ? ' natural' : ''}`;\n\n return (\n <div className={[className].join(' ')} style={style}>\n {type === 'number'\n ? <input className={[classNames].join(' ')} {...rest} id={id} name={name} value={isControlled ? value : newValue} type={type} \n step={step} min={min} max={max} maxlength={maxLength} \n placeholder={placeholder} \n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} />\n : <input className={[classNames].join(' ')} {...rest} id={id} name={name} value={isControlled ? value : newValue} type={type} \n spellcheck=\"false\" \n placeholder={placeholder} \n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} />\n }\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-input {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ${Theme.gray};\n }\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoInput = (props) => {\n return (<StyledNekoInput {...props} />);\n};\n\nNekoInput.propTypes = {\n id: PropTypes.string,\n type: PropTypes.oneOf(['number', 'text']),\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n step: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n maxLength: PropTypes.number,\n natural: PropTypes.bool\n};\n\nNekoInput.defaultProps = {\n id: undefined,\n type: 'text',\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false,\n step: 1,\n min: 1,\n max: 999,\n maxLength: 3,\n natural: false\n};\n\nexport { NekoInput };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoTextArea = Styled(props => {\n const { id, name, value = '', description, placeholder = '', onEnter = null, readOnly = false, \n maxLength = 3, className, style, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const isControlled = !!props.onChange;\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n }, [ value ]);\n\n const onChange = (e) => {\n if (isControlled) { \n props.onChange(e.target.value, id);\n }\n else {\n setNewValue(e.target.value, id);\n }\n };\n\n const onKeyPress = (e) => {\n if (onEnter && event.key === 'Enter') {\n e.preventDefault();\n props.onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (props.onBlur && value !== e.target.value) {\n props.onBlur(e.target.value, id);\n }\n };\n\n return (\n <div className={[className].join(' ')} style={style}>\n <textarea className=\"neko-textarea\" {...rest} id={id} name={name} spellCheck=\"false\" placeholder={placeholder} \n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly}>\n {isControlled ? value : newValue}\n </textarea>\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-textarea {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ${Theme.gray};\n }\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoTextArea = (props) => {\n return (<StyledNekoTextArea {...props} />);\n};\n\nNekoTextArea.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool\n};\n\nNekoTextArea.defaultProps = {\n id: undefined,\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false\n};\n\nexport { NekoTextArea };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { useOutsideClick } from '../hooks';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankCircleOutline from '@iconify/icons-mdi/checkbox-blank-circle-outline';\nimport recordCircle from '@iconify/icons-mdi/record-circle';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\n\nconst Select = Styled.div`\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ${Theme.blue};\n border-radius: 8px 8px 0 0;\n }\n`;\n\nconst SelectedOption = Styled.div`\n align-items: center;\n background-color: ${Theme.white};\n border: 2px solid ${Theme.blue};\n border-radius: 8px;\n display: flex;\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n`;\n\nconst Description = Styled.div`\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n`;\n\nconst Options = Styled.div`\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n`;\n\nconst OptionsContainer = Styled.div`\n background-color: ${Theme.white};\n`;\n\n/**\n * @param {string} name\n */\nconst StyledNekoSelect = props => {\n const { id, name, value, scrolldown = false, isPro = false, onChange, ...rest } = props;\n\n const currentOption = React.Children.toArray(props.children)\n .find(child => child.props.value === value || child.props.checked)?.props;\n\n\n const label = currentOption?.label || 'Select';\n const description = currentOption?.description || props.description;\n const requirePro = currentOption?.requirePro || false;\n //const id = scrolldown ? props.id : currentOption?.id;\n\n const [ showOptions, toggleOptions ] = useState(false);\n const componentRef = scrolldown ? useOutsideClick(() => { toggleOptions(false) }) : null;\n const showUpProOnly = requirePro && !isPro;\n\n const onOptionClick = (newValue) => {\n if (newValue !== value) {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(newValue, id);\n }\n if (scrolldown) {\n toggleOptions(false);\n }\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n name: child.props.name || name,\n checked: child.props.value === value || child.props.checked,\n onClick: onOptionClick,\n scrolldown,\n isPro\n });\n });\n\n return scrolldown\n ? <Select id={id} ref={componentRef} {...rest}\n onClick={() => toggleOptions(!showOptions)}\n className={[ 'nui-select', showOptions ? 'show-options' : '']}\n childrenLength={children.length}\n >\n <SelectedOption>\n {label}\n <div className=\"rightContent\">\n {showUpProOnly && <ProOnly />}\n <Icon icon={showOptions ? chevronUp : chevronDown} width=\"24\" />\n </div>\n </SelectedOption>\n {description && <Description>{description}</Description>}\n \n {showOptions &&\n <Options className={showOptions ? '' : 'hidden'}>\n <OptionsContainer>{[children]}</OptionsContainer>\n </Options>\n }\n </Select>\n : children;\n};\n\nconst RadioOption = Styled.div`\n font-family: ${Theme.fontFamily};\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ${Theme.disabledForm};\n\n label {\n cursor: default;\n }\n }\n`;\n\nconst SelectOption = Styled.div`\n background-color: ${Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ${Theme.white};\n display: flex;\n justify-content: space-between;\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n`;\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n * @param {function} onClick\n */\nconst StyledNekoOption = props => {\n const { id, name, value, checked, label, description, onClick, scrolldown, isPro = false, requirePro = false } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const disabledClass = showUpProOnly ? 'disabled' : '';\n\n const radioOption = (\n <RadioOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} onClick={(e) => onClick(e.target.value)} disabled={showUpProOnly} />\n <label htmlFor={id}>\n <Icon icon={checked ? recordCircle : checkboxBlankCircleOutline} width=\"24px\" color={showUpProOnly ? Theme.disabledForm : Theme.blue}/>\n <div className=\"inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" style={{ top: -1 }} show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </RadioOption>\n );\n\n const selectOption = (\n <SelectOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} disabled={showUpProOnly} />\n <div className=\"option\" onClick={() => onClick(value)}>\n {label}\n <ProOnly show={showUpProOnly} />\n </div>\n </SelectOption>\n );\n\n return scrolldown ? selectOption : radioOption;\n};\n\n/**\n * The NekoSelect has 2 types, radio (default) or select.\n */\nconst NekoSelect = (props) => {\n return (<StyledNekoSelect {...props} />);\n}\n\nNekoSelect.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n description: PropTypes.string,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoSelect.propTypes = {\n id: undefined,\n name: undefined,\n description: undefined,\n scrolldown: false,\n isPro: false,\n onChange: undefined\n};\n\nconst NekoOption = (props) => {\n return (<StyledNekoOption {...props} />);\n}\n\nNekoOption.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n onClick: PropTypes.func,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool\n};\n\nNekoOption.defaultProps = {\n id: undefined,\n name: undefined,\n value: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n onClick: undefined,\n scrolldown: false,\n isPro: false,\n requirePro: false\n};\n\nexport { NekoSelect, NekoOption };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport { Icon, InlineIcon, IconifyIcon } from '@iconify/react';\nimport folderIcon from '@iconify/icons-mdi/folder';\nimport folderOpen from '@iconify/icons-mdi/folder-open';\nimport imageMultipleOutline from '@iconify/icons-mdi/image-multiple-outline';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport tagIcon from '@iconify/icons-mdi/tag';\n\nconst StyledNekoFinder = props => {\n\n const { chevron = true } = props;\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n return (\n children\n );\n};\n\nconst FinderTitle = Styled.div`\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n`;\n\nconst ChevronSpace = Styled.div`\n height: 24px;\n width: 24px;\n`;\n\nconst ItemContainer = Styled.div`\n border-left: 1px solid ${Colors.finderBorder};\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n`;\n\nconst RightElementContainer = Styled.div`\n margin-left: 5px;\n`;\n\nconst StyledNekoFinderItem = props => {\n\n const defaultIcons = {\n gallery: imageMultipleOutline,\n tag: tagIcon\n }\n\n const { title, chevron, rightElement = null, showRightElement = false } = props;\n const isFolder = !!!props.icon;\n const isCustomizedIcon = !!props.icon;\n const hasChild = !!props.children;\n const [ expanded, setExpanded ] = React.useState(false);\n const [ icon, setIcon ] = React.useState(() => {\n if (typeof props.icon === 'string' && Object.keys(defaultIcons).includes(props.icon)) {\n return defaultIcons[props.icon];\n } else if (props.icon) {\n return props.icon;\n }\n return folderIcon\n });\n\n const onClick = () => {\n if (!isFolder && !hasChild) return;\n if (!isCustomizedIcon) {\n setIcon(expanded ? folderIcon : folderOpen);\n }\n setExpanded(!expanded);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n return (\n <div>\n <FinderTitle onClick={onClick} onMouseEnter={props.onMouseEnter} onMouseLeave={props.onMouseLeave} className={`${isFolder || children ? 'can-expand' : ''}`}>\n {chevron\n ? isFolder || children\n ? <Icon icon={expanded ? chevronDown : chevronRight} width=\"24\" height=\"24\" />\n : <ChevronSpace></ChevronSpace>\n : null\n }\n <Icon icon={icon} color={Colors.blue} width=\"24\" height=\"24\" />\n <p>{ title }</p>\n {showRightElement &&\n <RightElementContainer>{rightElement}</RightElementContainer>\n }\n </FinderTitle>\n {expanded && <ItemContainer className={`${isFolder ? '' : 'no-line'} ${chevron ? '' : 'no-chevron'}`}>{children}</ItemContainer>}\n </div>\n )\n}\n\nconst NekoFinder = (props) => {\n return (<StyledNekoFinder {...props} />);\n}\n\nNekoFinder.propTypes = {\n chevron: PropTypes.bool\n};\n\nNekoFinder.defaultProps = {\n chevron: true\n};\n\nconst NekoFinderItem = (props) => {\n return (<StyledNekoFinderItem {...props} />);\n}\n\nNekoFinderItem.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['gallery'])]),\n title: PropTypes.string\n};\n\nNekoFinderItem.defaultProps = {\n icon: folderIcon,\n title: undefined\n};\n\nexport { NekoFinder, NekoFinderItem };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Logo = Styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n`;\n\nconst StyledNekoLogo = () => {\n return (\n <Logo>\n <svg width=\"54\" height=\"38\" viewBox=\"0 0 54 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z\" fill=\"#724024\" stroke=\"black\" strokeWidth=\"2.1869\"/>\n <path d=\"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z\" fill=\"#B7782E\"/>\n <path d=\"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z\" fill=\"#B7782E\"/>\n <path d=\"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z\" fill=\"#B7782E\"/>\n <path d=\"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z\" stroke=\"black\"/>\n <path d=\"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z\" stroke=\"black\"/>\n <path d=\"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z\" stroke=\"black\"/>\n <path d=\"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z\" stroke=\"black\" strokeWidth=\"2.1869\"/>\n <path d=\"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z\" fill=\"white\" stroke=\"black\" strokeWidth=\"2.1869\"/>\n </svg>\n </Logo>\n );\n}\n\nconst NekoLogo = (props) => {\n return (<StyledNekoLogo {...props} />);\n}\n\nNekoLogo.propTypes = {\n};\n\nNekoLogo.defaultProps = {\n};\n\nexport { NekoLogo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport playIcon from '@iconify/icons-mdi/play';\n\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {number} value Current progress\n * @param {number} max Max progress\n */\nconst StyledNekoProgress = Styled(props => {\n let { value = 0, max = 100, busy = false, status } = props;\n value = Math.min(value, max);\n let ratio = parseFloat(value) / parseFloat(max);\n\n return (\n <div className={props.className}>\n <ProgressCurrent ratio={ratio} busy={props.busy} status={status} />\n <div className=\"nui-progress-buttons\">\n {busy && props.onPauseClick && \n <div className='nui-progress-button pause' onClick={props.onPauseClick}>\n {props.paused ? <InlineIcon icon={playIcon} /> : <InlineIcon icon={pauseIcon} />}\n </div>\n }\n {busy && props.onStopClick && \n <div className='nui-progress-button stop' onClick={props.onStopClick}>\n <InlineIcon icon={stopIcon} />\n </div>\n }\n </div>\n </div>\n );\n})`\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n &.stop {\n background: ${Theme.red};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.red)};\n }\n }\n }\n }\n`;\n\n/**\n * @param {float} ratio Progress ratio (0.0 to 1.0)\n */\nconst ProgressCurrent = Styled(props => {\n const percent = !isNaN(props.ratio) ? parseInt(Math.round(props.ratio * 100)) : 0;\n const typeOfStatus = typeof props.status;\n let status = typeOfStatus !== 'undefined'\n ? (typeOfStatus === 'string') ? props.status : props.status(percent)\n : `${percent}%`;\n\n return (\n <div className={props.className} style={{ minWidth: 28, minWidth: percent + '%' }}>\n <div>{status}</div>\n </div>\n );\n})`\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ${Theme.progress};\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ${Theme.fontFamily};\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ${props => props.busy ? 'animate-stripes 1.6s linear infinite' : 'none'};\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n`;\n\nconst NekoProgress = (props) => {\n return (<StyledNekoProgress {...props} />);\n}\n\nNekoProgress.propTypes = {\n value: PropTypes.number,\n max: PropTypes.number,\n busy: PropTypes.bool,\n paused: PropTypes.bool,\n onPauseClick: PropTypes.func,\n onStopClick: PropTypes.func,\n status: PropTypes.oneOf([PropTypes.string, PropTypes.func])\n};\n\nNekoProgress.defaultProps = {\n value: 0,\n max: 100,\n busy: false,\n paused: false,\n onPauseClick: undefined,\n onStopClick: undefined,\n status: undefined\n};\n\nexport { NekoProgress };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport { useComponentSize } from '../hooks';\nimport Theme from '../common/NekoTheme';\n\nconst TooltipContainer = Styled.div`\n\tdisplay: flex;\n`;\n\nconst Tooltip = Styled.div`\n\tbackground-color: rgba(${Theme.blackRGB}, 0.8);\n\tborder-radius: 4px;\n\tcolor: ${Theme.white};\n\tfont-family: ${Theme.fontFamily};\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ${Theme.fontSizeText};\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ${prop => prop.visible ? 'inline-block' : 'none'};\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: \"\";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t${prop => prop.style}\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTooltip = props => {\n\tconst { text = 'Hello world!', position = 'top' } = props;\n\tconst [ show, setShow ] = useState(false);\n\tconst { ref: tooltipRef, width: tooltipWidth, height: tooltipHeight } = useComponentSize();\n\tconst { ref: childRef, width: childWidth, height: childHeight } = useComponentSize();\n\n\tconst transformStyle = useMemo(() => {\n\t\tconst pointerSize = 5;\n\t\tlet transY = 0;\n\t\tlet transX = 0;\n\n\t\tif (position === 'top') {\n\t\t\ttransY = -1 * tooltipHeight - pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'bottom') {\n\t\t\ttransY = childHeight + pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'left') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = -1 * tooltipWidth - pointerSize;\n\t\t}\n\t\telse if (position === 'right') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = childWidth + pointerSize;\n\t\t}\n\t\t\n\t\treturn { \n\t\t\ttransform: `translateX(${transX}px) translateY(${transY}px)`\n\t\t};\n\n\t}, [position, tooltipWidth, tooltipHeight, childWidth, childHeight])\n\n\treturn (\n\t\t<TooltipContainer>\n\t\t\t<Tooltip ref={tooltipRef} visible={show} className={position} style={transformStyle}>\n\t\t\t\t{text}\n\t\t\t</Tooltip>\n\t\t\t<div ref={childRef} onMouseEnter={() => setShow(true)} onMouseLeave={() => setShow(false)}>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t</TooltipContainer>\n\t);\n};\n\nconst NekoTooltip = (props) => {\n return (<StyledNekoTooltip {...props} />);\n}\n\nNekoTooltip.propTypes = {\n\ttext: PropTypes.string,\n\tposition: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])\n};\n\nNekoTooltip.defaultProps = {\n\ttext: 'Hello world!',\n\tposition: 'top'\n};\n\nexport { NekoTooltip };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, IconifyIcon } from '@iconify/react';\n\nimport PresetIcons from '../common/PresetIcons';\nimport { NekoTooltip } from './Tooltip';\n\nconst StyledIconContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst hoverColor = (color) => {\n if (color) {\n return `\n &:hover {\n path {\n fill: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\nconst StyledIcon = Styled(Icon)`\n\n path {\n fill: ${props => props.color};\n }\n\n ${props => hoverColor(props.color)}\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n`;\n\nconst StyledNekoIcon = props => {\n\n let { icon, spinning = false, className = '', title, tooltip, containerStyle, color, ...rest } = props;\n\n if (!rest.width && !rest.height) {\n rest.width = rest.height = 30;\n }\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const iconClassName = `nui-icon ${className}${rest.onClick ? ' nui-clickable' : ''}${spinning ? ' spin' : ''}`;\n\n if (tooltip) {\n return (\n <NekoTooltip text={tooltip.text} position={tooltip.position || 'top'}>\n <StyledIconContainer style={containerStyle}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} {...rest}/>\n </StyledIconContainer>\n </NekoTooltip>\n );\n }\n\n return (\n <StyledIconContainer style={containerStyle} title={title}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} {...rest} />\n {!tooltip ? null : <NekoTooltip>{tooltip}</NekoTooltip>}\n </StyledIconContainer>\n );\n};\n\nconst NekoIcon = (props) => {\n return (<StyledNekoIcon {...props} />);\n};\n\nNekoIcon.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['lock' ,'lock-open' ,'file-undo' ,'chevron-double-left' ,'chevron-double-right' ,'chevron-left' ,'chevron-right' ,'chevron-down' ,'chevron-up' ,'pause' ,'play' ,'replay' ,'check' ,'stop' ,'delete' ,'undo' ,'alert' ,'database' ,'pencil' ,'tools' ,'cog' ,'close' ,'cat' ,'upload'])]),\n color: PropTypes.string,\n spinning: PropTypes.bool,\n className: PropTypes.string,\n tooltip: PropTypes.string\n};\n\nNekoIcon.defaultProps = {\n icon: undefined,\n color: undefined,\n spinning: false,\n className: '',\n tooltip: undefined\n};\n\nexport { NekoIcon };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoLogo } from './Logo';\nimport { NekoIcon } from './Icon';\nimport Theme from '../common/NekoTheme';\nimport contentSave from '@iconify/icons-mdi/content-save';\n\nconst HeaderBase = Styled.div`\n position: relative;\n color: white;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ${Theme.header};\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ${Theme.fontFamily};\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ${Theme.fontFamily};\n line-height: normal;\n font-size: ${Theme.fontSizeText};\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n`;\n\nconst StyledNekoHeader = props => {\n\n const { title = 'NekoUI', subtitle = 'By Jordy Meow', children, saving = false } = props;\n\n return (\n <HeaderBase>\n <div className='nui-header-logo-container'>\n <NekoLogo />\n </div>\n <div className=\"nui-header-title-container\">\n <h1 className=\"nui-header-title\">{title}</h1>\n <small className=\"nui-header-subtitle\"><a target='_blank' href='https://meowapps.com' \n style={{ color: 'white', textDecoration: 'none' }}>{subtitle}</a></small>\n </div>\n <div className=\"nui-header-extra-content\">{children}</div>\n {saving && <NekoIcon icon={contentSave} width=\"36\" height=\"36\" />}\n </HeaderBase>\n );\n};\n\nconst NekoHeader = (props) => {\n return (<StyledNekoHeader {...props} />);\n}\n\nNekoHeader.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n saving: PropTypes.bool\n};\n\nNekoHeader.defaultProps = {\n title: 'NekoUI',\n subtitle: 'By Jordy Meow',\n saving: false\n};\n\nexport { NekoHeader };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport Theme from '../common/NekoTheme';\n\nconst PagingContainer = Styled.div`\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(${Theme.blueRGB}, 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ${Theme.white};\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ${Theme.darkGray};\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n`;\n\n/**\n * @param {number} currentPage Current page\n * @param {number} limit Items per page\n */\nconst StyledNekoPaging = props => {\n const { currentPage, limit, onClick, total } = props;\n const maxPage = Math.ceil(total === 0 ? 1 : (limit > 0 ? (total / limit) : 1));\n const prevIconClassName = `nako-paging-controller-icon ${currentPage === 1 ? 'disabled' : ''}`;\n const nextIconClassName = `nako-paging-controller-icon ${currentPage === maxPage ? 'disabled' : ''}`;\n\n const onClickHandle = (page) => {\n onClick(page);\n };\n\n return (\n <PagingContainer>\n\n <span className=\"neko-paging-text\">{total} result{total > 0 ? 's' : ''}</span>\n\n <div className=\"neko-paging-controller\">\n <Icon icon={chevronDoubleLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(1)}\n />\n <Icon icon={chevronLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(currentPage - 1)}\n />\n <p className=\"nako-paging-controller-text\">\n Page {currentPage} of {maxPage}\n </p>\n <Icon icon={chevronRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(currentPage + 1)}\n />\n <Icon icon={chevronDoubleRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(maxPage)}\n />\n </div>\n </PagingContainer>\n );\n};\n\nconst NekoPaging = (props) => {\n return (<StyledNekoPaging {...props} />);\n};\n\nNekoPaging.propTypes = {\n currentPage: PropTypes.number,\n limit: PropTypes.number,\n total: PropTypes.number,\n onClick: PropTypes.func\n};\n\nNekoPaging.defaultProps = {\n currentPage: undefined,\n limit: undefined,\n total: undefined,\n onClick: undefined\n};\n\nexport { NekoPaging };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoIcon } from '../misc/Icon';\n\nconst LinkContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Link = Styled.span`\n color: ${Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ${Theme.black};\n font-weight: bold;\n }\n\n &::after {\n content: \"|\";\n color: ${Theme.darkGray};\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ${Theme.darkGray};\n font-weight: normal;\n margin-left: 4px;\n }\n`;\n\nconst StyledNekoQuickLinks = props => {\n const { id, value, onChange, busy = false } = props;\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n busy: busy,\n isActive: child.props.value === value,\n onClick: (newValue) => {\n if (newValue !== value) {\n onChange(newValue, id);\n }\n }\n });\n });\n\n return (\n <LinkContainer>{children}</LinkContainer>\n );\n};\n\nconst StyledNekoLink = props => {\n\n const { title, value = 0, count, onClick, busy, isActive } = props;\n\n return (\n <Link onClick={() => onClick(value)} className={`${isActive ? 'is-active' : ''}`}>\n {title}\n {count === null ? null :\n <span>(\n {busy ? \n <NekoIcon icon=\"replay\" spinning={true} width={12} containerStyle={{ display: 'inline' }} /> : \n count\n })\n </span>\n }\n </Link>\n );\n};\n\nconst NekoQuickLinks = (props) => {\n return (<StyledNekoQuickLinks {...props} />);\n};\n\nNekoQuickLinks.propTypes = {\n id: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func\n};\n\nNekoQuickLinks.defaultProps = {\n id: undefined,\n value: undefined,\n onChange: undefined\n};\n\nconst NekoLink = (props) => {\n return (<StyledNekoLink {...props} />);\n};\n\nNekoLink.propTypes = {\n title: PropTypes.string,\n value: PropTypes.string,\n count: PropTypes.number,\n onClick: PropTypes.func,\n isActive: PropTypes.bool\n};\n\nNekoLink.defaultProps = {\n title: undefined,\n value: 'default',\n count: 0,\n onClick: undefined,\n isActive: false\n};\n\nexport { NekoQuickLinks, NekoLink };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst StyledSection = Styled.section`\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ${props => props.backgroundColor};\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ${props => props.width}px;\n height: ${props => props.width}px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ${props => props.width + 2}px;\n height: ${props => props.width / 2 + 2}px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n \n .semi-circle--mask {\n transform: rotate(${props => props.degrees}deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ${props => props.width + 2}px;\n height: ${props => props.width / 2}px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n`;\n\nconst NekoGauge = ({ value = 1000, min = 0, max = 2500, width = 200, background = '#007cba', children }) => {\n const degrees = 180 * (value <= max ? value : max) / max;\n return (\n <StyledSection backgroundColor={background} degrees={degrees} width={width}>\n <div class=\"gauge\">\n <div class=\"mask\">\n <div class=\"semi-circle\"></div>\n <div class=\"semi-circle--mask\"></div>\n </div>\n <div class=\"child-container\">\n <div class=\"child\">\n <div class=\"spacing\" />\n {children}\n </div>\n </div>\n </div>\n </StyledSection>\n )\n};\n\nNekoGauge.propTypes = {\n value : PropTypes.number,\n min : PropTypes.number,\n max : PropTypes.number,\n width : PropTypes.number,\n background : PropTypes.string,\n};\n\nNekoGauge.defaultProps = {\n value : 1000,\n min : 0,\n max : 2500,\n width : 200,\n background : '#007cba',\n};\n\nexport { NekoGauge };\n","import Styled from 'styled-components';\n\nconst NekoMessageDanger = Styled.p`\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n`;\n\nconst NekoMessageSuccess = Styled.p`\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n`;\n\nexport { NekoMessageDanger, NekoMessageSuccess };","import React, { useState, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoIcon, NekoBusyOverlay, postFetch } from '../../index';\n\nconst StyledUpload = Styled.div`\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n`;\n\nconst NekoUpload = (props) => {\n\n const { width = '100%', height = '100%', iconSize = 48, onSuccess = () => {}, \n onFailure = () => {}, style = {}, apiUrl, apiConfig } = props;\n const [ inDropZone, setInDropZone ] = useState(false);\n const [ inputId, setInputId ] = useState(Math.floor(Math.random() * 100000000));\n const inputEl = useRef(null);\n const [ busy, setBusy ] = useState(false);\n\n const uploadFile = async (files) => {\n setBusy(true);\n apiConfig.file = files[0];\n const res = await postFetch(apiUrl, apiConfig);\n if (res.success) {\n onSuccess(res);\n }\n else {\n onFailure(res);\n }\n setBusy(false);\n }\n\n const onDragOver = (e) => {\n e.preventDefault();\n e.stopPropagation();\n }\n\n const onDragEnter = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(true);\n }\n\n const onDragLeave = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n }\n\n const onDrop = (e) => {\n const files = [...e.dataTransfer.files];\n uploadFiles(files, e);\n }\n\n const onClick = () => {\n inputEl.current.click();\n }\n\n const onInputUpload = (e) => {\n const files = [e.target.files[0]]; \n uploadFiles(files, e);\n }\n\n const uploadFiles = (files, e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n console.log(files);\n uploadFile(files);\n }\n\n return (\n <NekoBusyOverlay busy={busy} >\n <input type=\"file\" id={inputId} accept=\"image/*\" ref={inputEl} onChange={onInputUpload} style={{ display: 'none' }} />\n <StyledUpload onClick={onClick} style={{ ...style, width, height }} className={inDropZone ? 'dropping' : ''} \n onDragOver={onDragOver} onDragEnter={onDragEnter} onDragLeave={onDragLeave} onDrop={onDrop}>\n <NekoIcon width={iconSize} height={iconSize} icon='upload' spinning={busy} \n onDragOver={onDragOver} onDragEnter={onDragEnter} />\n </StyledUpload>\n </NekoBusyOverlay>\n );\n}\n\nNekoUpload.propTypes = {\n width : PropTypes.string,\n height : PropTypes.string,\n onSuccess : PropTypes.func,\n onFailure : PropTypes.func,\n style : PropTypes.object,\n apiUrl : PropTypes.string,\n apiConfig : PropTypes.object\n};\n\nNekoUpload.defaultProps = {\n width : '100%',\n height : '100%',\n onSuccess : () => {},\n onFailure : () => {},\n style : {}\n};\n\nexport { NekoUpload };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-modal';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoButton } from '../button/Button';\n\nconst NekoModalParent = Styled.div`\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: ${Theme.overlay} !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ${Theme.white};\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n`;\n\nconst NekoModalContent = Styled.div`\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n`;\n\nconst StyledNekoModal = (props) => {\n\n const {\n children,\n className,\n style,\n ok = 'OK',\n cancel = 'Cancel',\n customButtons = null,\n title = '',\n content = '',\n onOkClick,\n onCancelClick,\n ...rest\n } = props;\n const customClassName = style ? 'custom-modal' : '';\n\n const modalContent = children\n ? children\n : <NekoModalContent>\n {title && <p className=\"title\">{title}</p>}\n {content && <p className=\"content\">{content}</p>}\n <div className=\"button-group\">\n {onCancelClick && <NekoButton className=\"danger\" onClick={onCancelClick}>{cancel}</NekoButton>}\n {onOkClick && <NekoButton onClick={onOkClick}>{ok}</NekoButton>}\n {customButtons}\n </div>\n </NekoModalContent>;\n\n return (\n <React.Fragment>\n <NekoModalParent id=\"neko-modal-parent\" />\n <Modal ariaHideApp={false}\n parentSelector={() => document.getElementById('neko-modal-parent')}\n closeTimeoutMS={200}\n className={`neko-modal ${className || ''} ${customClassName}`}\n {...rest}\n >\n {modalContent}\n </Modal>\n </React.Fragment>\n );\n};\n\nconst NekoModal = (props) => {\n return (<StyledNekoModal {...props} />);\n};\n\nNekoModal.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n title: PropTypes.string,\n content: PropTypes.string,\n onOkClick: PropTypes.func,\n onCancelClick: PropTypes.func,\n customButtons: PropTypes.object\n};\n\nNekoModal.defaultProps = {\n className: undefined,\n style: undefined,\n ok: 'OK',\n cancel: 'Cancel',\n title: '',\n content: '',\n onOkClick: undefined,\n onCancelClick: undefined,\n customButtons: null\n};\n\nexport { NekoModal };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\nimport checkboxMultipleMarked from '@iconify/icons-mdi/checkbox-multiple-marked';\n\nimport Theme from '../common/NekoTheme';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Table = Styled.table`\n background-color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(${Theme.blackRGB}, 0.1);\n border-right: 1px solid rgba(${Theme.blackRGB}, 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ${Theme.blue};\n color: ${Theme.white};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ${Theme.tableGray};\n }\n &.selected {\n background-color: rgba(${Theme.blueRGB}, 0.8);\n color: ${Theme.white};\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n`;\n\nconst TableCheckBox = (props) => {\n const { checked, intermediate = false, onSelect = () => {}, onUnselect = () => {}, ...rest } = props;\n\n const onClick = () => { \n checked ? onUnselect() : onSelect();\n };\n\n return (\n <Icon icon={intermediate ? checkboxMultipleMarked : (checked ? checkboxMarked : checkboxBlankOutline)}\n width=\"24px\" height=\"24px\" onClick={onClick} />\n );\n};\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledNekoTable = (props) => {\n const { columns, data, busy = false, onSelect, onUnselect, selectedItems, sort, onSortChange } = props;\n const columnsCount = columns.length + (onSelect ? 1 : 0);\n\n const rows = data.map(v => {\n const cells = columns.map(c => { return { value: v[c.accessor], style : c.style || {} }});\n return { id: v.id, cells };\n });\n\n const currentRowsIds = rows.map(x => x.id);\n const currentSelectedRows = currentRowsIds.filter(x => selectedItems.includes(x));\n const areAllRowsSelected = currentSelectedRows.length === currentRowsIds.length;\n const isIntermediate = !areAllRowsSelected && selectedItems.length > 0;\n\n const hiddenColumnIndexes = columns.reduce(function(a, e, i) {\n if (e.visible === false)\n a.push(i);\n return a;\n }, []);\n\n const headersFooters = <tr>\n {onSelect && \n <th className='table-checkbox-cell'>\n <TableCheckBox checked={areAllRowsSelected} intermediate={isIntermediate}\n onSelect={() => onSelect(currentRowsIds) } \n onUnselect={() => { \n // The unselect on selectedItems never happens, but I keep it here in case\n // we find an elegant UI solution to unselect all the invisible selected rows as well.\n isIntermediate ? onUnselect(selectedItems) : onUnselect(currentRowsIds);\n }}\n />\n </th>\n }\n {columns.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(column => {\n let beingSorted = sort && sort.accessor === column.accessor;\n let beingSortedAsc = sort && sort.by === 'asc';\n const thStyle = column.style || {};\n return (<th style={thStyle} key={column.accessor}>\n <div className={column.sortable ? 'sortable' : ''} \n onClick={column.sortable ? () => { \n onSortChange(column.accessor, beingSorted && beingSortedAsc ? 'desc' : 'asc')\n } : undefined}>\n <div>{column.title}</div>\n <div>{column.sortable && \n <Icon icon={!beingSorted ? chevronDown : (beingSortedAsc ? chevronDown : chevronUp)} \n color={beingSorted ? Theme.white : `rgba(${Theme.blackRGB}, 0.1)`} \n width=\"1.6rem\" height=\"1.6rem\" />}\n </div>\n </div>\n </th>)\n })}\n </tr>;\n\n return (\n <NekoBusyOverlay busy={busy} overlayStyle={{ top: '36px', height: 'calc(100% - 76px)' }}>\n <Table>\n <thead>{headersFooters}</thead>\n <tbody>\n {!rows.length && \n <tr><td colspan={columnsCount} style={{ textAlign: 'center', height: 40, color: 'gray' }}>\n Empty.\n </td></tr>\n }\n {rows.map(row => {\n return (\n <tr className={selectedItems.includes(row.id) ? 'selected' : ''}>\n {onSelect && \n <td className='table-checkbox-cell'>\n <TableCheckBox \n checked={selectedItems.includes(row.id)}\n onSelect={() => onSelect([ row.id ])}\n onUnselect={() => onUnselect([ row.id ])} \n />\n </td>\n }\n {row.cells.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(cell => {\n return <td style={cell.style}>{cell.value}</td>;\n })}\n </tr>\n );\n })}\n </tbody>\n <tfoot>{headersFooters}</tfoot>\n </Table>\n </NekoBusyOverlay>\n );\n};\n\nconst NekoTable = (props) => {\n return (<StyledNekoTable {...props} />);\n};\n\nNekoTable.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any),\n data: PropTypes.arrayOf(PropTypes.any),\n busy: PropTypes.arrayOf(PropTypes.bool),\n onSelect: PropTypes.func,\n onUnselect: PropTypes.func,\n selectedItems: PropTypes.arrayOf(PropTypes.object),\n onSortChange: PropTypes.func\n};\n\nNekoTable.defaultProps = {\n columns: undefined,\n data: undefined,\n busy: false,\n onSelect: undefined,\n onUnselect: undefined,\n selectedItems: undefined,\n onSortChange: undefined\n};\n\nexport { NekoTable };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\n\nconst TabContainer = Styled.div`\n`;\n\nconst TabGroup = Styled.div`\n`;\n\nconst Tab = Styled.button`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ${Theme.blue};\n color: ${Theme.white};\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.blue};\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoTabs = props => {\n\n const [isActiveTabIndex, setIsActiveTabIndex] = React.useState(0);\n\n const tabAttributes = React.Children.map(props.children, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n return { key, title, onClick, requirePro };\n });\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === isActiveTabIndex\n });\n });\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n setIsActiveTabIndex(tabIndex);\n if (props.onChange) {\n props.onChange(tabIndex, tabAttr, ev);\n }\n };\n\n return (\n <TabContainer>\n <TabGroup>\n {tabAttributes.map((attr, i) =>\n <Tab \n key={attr.key} \n className={`neko-tab-title ${i === isActiveTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''}`} \n onClick={(ev) => { onTabClick(i, attr, ev) }} >\n {attr.title}<ProOnly className=\"inline\" style={{ marginLeft: 10, marginRight: -5, top: -1 }} show={attr.requirePro} />\n </Tab>\n )}\n </TabGroup>\n { children }\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n { children }\n </TabContent>\n );\n};\n\nconst NekoTabs = (props) => {\n return (<StyledNekoTabs {...props} />);\n};\n\nNekoTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoTabs.defaultProps = {\n isPro: false,\n onChange: undefined\n};\n\nconst NekoTab = (props) => {\n return (<StyledNekoTab {...props} />);\n};\n\nNekoTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string\n};\n\nNekoTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined\n};\n\nexport { NekoTab, NekoTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\n\nconst TabContainer = Styled.div`\n`;\n\nconst Tab = Styled.div`\n align-items: center;\n background-color: ${Theme.blue};\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(${Theme.yellowRGB}, 0.25);\n cursor: default;\n }\n\n p {\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ${Theme.white};\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.white};\n display: none;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoSideTabs = props => {\n\n const [activeTabIndex, setIsActiveTabIndex] = React.useState();\n\n const tabAttributes = React.Children.map(props.children, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n return { key, title, onClick, requirePro };\n });\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === activeTabIndex\n });\n });\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n const newTabIndex = tabIndex === activeTabIndex ? null : tabIndex;\n setIsActiveTabIndex(newTabIndex);\n if (props.onChange) {\n props.onChange(newTabIndex, tabAttr, ev);\n }\n };\n\n return (\n <TabContainer>\n {tabAttributes.map((attr, i) =>\n <React.Fragment>\n <Tab\n key={attr.key}\n className={`${i === activeTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''}`}\n onClick={(ev) => { onTabClick(i, attr, ev); }}\n >\n <p>\n {attr.title}\n <ProOnly className=\"inline\" show={attr.requirePro} />\n </p>\n <Icon icon={i === activeTabIndex ? chevronDown : chevronRight } className=\"neko-side-tab-icon\" />\n </Tab>\n { children[i] }\n </React.Fragment>\n )}\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoSideTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n { children }\n </TabContent>\n );\n};\n\nconst NekoSideTabs = (props) => {\n return (<StyledNekoSideTabs {...props} />);\n};\n\nNekoSideTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoSideTabs.defaultProps = {\n isPro: false,\n onChange: undefined\n};\n\nconst NekoSideTab = (props) => {\n return (<StyledNekoSideTab {...props} />);\n};\n\nNekoSideTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string\n};\n\nNekoSideTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined\n};\n\nexport { NekoSideTab, NekoSideTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\n\nconst ToolbarBase = Styled.div`\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ${Colors.white};\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(${Colors.blackRGB}, 0.1);\n\n &.neko-align-left {\n justify-content: flex-start;\n }\n\n &.neko-align-right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n`;\n\nconst StyledNekoToolbar = (props) => {\n const { align = 'left' } = props;\n return (\n <ToolbarBase className={`neko-align-${align}`}>\n {props.children}\n </ToolbarBase>\n );\n};\n\nconst NekoToolbar = (props) => {\n return (<StyledNekoToolbar {...props} />);\n};\n\nNekoToolbar.propTypes = {\n align: PropTypes.oneOf(['left', 'right'])\n};\n\nNekoToolbar.defaultProps = {\n align: 'left'\n};\n\nexport { NekoToolbar };","class NekoError {\n\n constructor(message, code = '', url = null, body = null, debug = {}, ) {\n this.url = url;\n this.message = message;\n this.code = code;\n this.body = body;\n this.debug = debug;\n }\n}\n\nexport { NekoError };","import { cache, mutate } from 'swr';\nimport { NekoError } from './errors';\n\n// This function allows to invalidate a SWR key which might\n// have been use for paging, for example: swrInvalidateMany('/api/items')\n// will reset everything which happens around this key.\n\nfunction swrInvalidateMany(select) {\n const keys = cache.keys();\n const mutations = [];\n let regexp = new RegExp(`(.*)${select}(.*)`);\n for (let key of keys) {\n if (regexp.test(key)) {\n mutations.push(mutate(key, null, true));\n }\n }\n return Promise.all(mutations);\n}\n\nfunction chunkArrayInGroups(arr, size) {\n let result = [];\n for (let i = 0; i < arr.length; i += size)\n result.push(arr.slice(i, i + size));\n return result;\n}\n\nconst consolidateJsonResult = (json) => {\n if (!json.data) {\n return json;\n }\n if (json.data.length > 0 && json.data[0].meta) {\n for (let x of json.data) {\n try { x.meta = JSON.parse(x.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n }\n else if (json.data.meta) {\n try { json.data.meta = JSON.parse(json.data.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n return json;\n}\n\nconst jsonFetcher = async (url, options = {}) => {\n let body = null;\n let json = {};\n let nekoError = null;\n let rawBody = null;\n\n try {\n options = options ? options : {};\n options.headers = options.headers ? options.headers : {};\n options.headers['Pragma'] = 'no-cache';\n options.headers['Cache-Control'] = 'no-cache';\n rawBody = await fetch(`${url}`, options);\n body = await rawBody.text();\n json = JSON.parse(body);\n if (!json.success) {\n let code = json.success === false ? 'NOT-SUCCESS' : 'N/A';\n let message = json.message ? json.message : 'Unknown error. Check your Console Logs.';\n if (json.code === 'rest_no_route') {\n message = \"The API can't be accessed. Is Rest API enabled?\";\n code = 'NO-ROUTE';\n }\n else if (json.code === 'internal_server_error') {\n message = \"Server error. Please check your PHP Error Logs.\";\n code = 'SERVER-ERROR';\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody);\n }\n }\n catch (error) {\n let code = 'BROKEN-REPLY';\n let message = \"The reply sent by the server is broken.\";\n if (rawBody && rawBody.status) {\n if (rawBody.status === 408) {\n code = \"REQUEST-TIMEOUT\";\n message = \"The request generated a timeout.\";\n }\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody, error);\n }\n\n // Rewrite the Json if there is an error\n if (nekoError) {\n console.error('[NekoError] JsonFetcher', nekoError.url, { code: nekoError.code, \n error: nekoError.error, body: nekoError.body });\n json.success = false;\n json.error = nekoError;\n }\n return consolidateJsonResult(json);\n}\n\nconst getFetch = async (url, json, signal) => {\n return jsonFetcher(url, { \n method: 'GET', \n headers: { 'Content-Type': 'application/json' },\n signal: signal\n });\n}\n\nconst postFetch = async (url, config = {}) => {\n const { json = {}, signal, file, nonce } = config;\n let formData = file ? new FormData() : null;\n if (file) {\n formData.append('file', file);\n for (const [key, value] of Object.entries(json)) {\n formData.append(key, value);\n }\n }\n\n const headers = nonce ? { 'X-WP-Nonce': nonce } : {};\n if (!formData) {\n headers['Content-Type'] = 'application/json';\n }\n\n return jsonFetcher(url, { \n method: 'POST',\n headers: headers,\n body: formData ? formData :JSON.stringify(json) ,\n signal: signal\n });\n}\n\nconst buildUrlWithParams = (apiUrl, params) => {\n const isPlainPermalink = apiUrl.includes('index.php?rest_route');\n const urlParams = new URLSearchParams(params);\n const finalUrl = apiUrl + (isPlainPermalink ? '&' : '?') + urlParams.toString();\n return finalUrl;\n}\n\nexport { getFetch, postFetch, jsonFetcher, swrInvalidateMany, chunkArrayInGroups, buildUrlWithParams };","const prefix = mgcl_gallery_custom_links.prefix;\nconst domain = mgcl_gallery_custom_links.domain;\nconst restUrl = mgcl_gallery_custom_links.rest_url.replace(/\\/+$/, \"\");\nconst apiUrl = mgcl_gallery_custom_links.api_url.replace(/\\/+$/, \"\");\nconst pluginUrl = mgcl_gallery_custom_links.plugin_url.replace(/\\/+$/, \"\");\nconst isPro = mgcl_gallery_custom_links.is_pro === '1';\nconst isRegistered = isPro && mgcl_gallery_custom_links.is_registered === '1';\nconst restNonce = mgcl_gallery_custom_links.rest_nonce;\n\nexport { prefix, domain, apiUrl, restUrl, pluginUrl, isPro, isRegistered, restNonce };\n","// React & Vendor Libs\nconst { useState } = wp.element;\nimport useSWR from 'swr';\n\n// NekoUI\nimport { NekoInput, NekoTypo, NekoPage, NekoBlock, NekoHeader, NekoContainer, NekoSettings,\n NekoTabs, NekoTab, NekoCheckboxGroup, NekoCheckbox, NekoWrapper, NekoSelect, NekoOption,\n NekoColumn } from '@neko-ui';\nimport { jsonFetcher, postFetch, useHandleSWR } from '@neko-ui';\n\nimport { apiUrl } from '@app/settings';\n\nconst Settings = () => {\n\n const { data: swrSettings, mutate: mutateSwrSettings } = useSWR(`${apiUrl}/all_settings/`, jsonFetcher);\n const { busy: busySettings, data: settings, error: swrError } = useHandleSWR(swrSettings, {}, true);\n const [ busyAction, setBusyAction ] = useState(false);\n const busy = busySettings || busyAction;\n\n const obmode = settings?.mgcl_obmode;\n const parsingEngine = settings?.mgcl_parsing_engine;\n const log = settings?.mgcl_log;\n const buttonEnabled = settings?.mgcl_button_enabled;\n const buttonLabel = settings?.mgcl_button_label;\n\n const parsingEngineOptions = [\n { id: \"none\", value: \"None\", label: \"None (Not Supported Yet)\"},\n { id: \"htmldomparser\", value: \"HtmlDomParser\", label: \"HtmlDomParser\"},\n { id: \"didom\", value: \"DiDom\", label: \"DiDom\"}\n ]\n\n const updateOption = async (value, id) => {\n let newSettingsData = { ...swrSettings.data };\n newSettingsData[id] = value;\n mutateSwrSettings({ ...swrSettings, data: newSettingsData }, false);\n setBusyAction(true);\n try {\n await postFetch(`${apiUrl}/update_option`, { json: { name: id, value } });\n }\n catch (err) {\n alert(err.message);\n }\n finally {\n setBusyAction(false);\n mutateSwrSettings();\n }\n }\n\n /**\n * Settings\n */\n\n const jsxOBMode =\n <NekoSettings title=\"OB Mode\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_obmode\" label=\"Check\" value=\"1\" checked={obmode} onChange={updateOption} />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxParsingEngine =\n <NekoSettings title=\"Parsing Engine\">\n <NekoSelect id=\"mgcl_parsing_engine\" onChange={updateOption}>\n {parsingEngineOptions.map(option => <NekoOption id={`mgcl_parsing_engine_${option.id}`} value={option.value} label={option.label} checked={parsingEngine === option.value} /> )}\n </NekoSelect>\n </NekoSettings>;\n\n const jsxLog =\n <NekoSettings title=\"Logs\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_log\" label=\"Logs\" value=\"1\" checked={log} onChange={updateOption} />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n /**\n * CTA Buttons\n */\n const jsxUseButtons =\n <NekoSettings title=\"Use Buttons\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_button_enabled\" label=\"Enabled\" value=\"1\" description=\"A call-to-action button will be used of a clickable image.\" checked={buttonEnabled} onChange={updateOption} />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxButtonLabel =\n <NekoSettings title=\"Label\">\n <NekoInput id=\"mgcl_button_label\" name=\"mgcl_button_label\" value={buttonLabel} description=\"A call-to-action button will be used of a clickable image.\" onBlur={updateOption} />\n </NekoSettings>;\n\n return (\n <NekoPage nekoErrors={[ swrError ]}>\n\n <NekoHeader title='Gallery Custom Links | Settings' subtitle='By Jordy Meow' />\n\n <NekoWrapper>\n\n <NekoColumn full>\n <NekoContainer>\n <NekoTypo p>This plugin works out of the box, the default settings are the best for most installs. If your photos are only in the content, then you should switch the OB Mode off, that will make the process much faster. Don't hesitate to take a look at the <a href=\"https://meowapps.com/plugin/gallery-custom-links/\">official page</a>.</NekoTypo>\n </NekoContainer>\n\n <NekoTabs>\n\n <NekoTab title='Settings'>\n <NekoWrapper>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"Settings\" className=\"primary\">\n {jsxOBMode}\n {jsxParsingEngine}\n {jsxLog}\n </NekoBlock>\n </NekoColumn>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"CTA Buttons\" className=\"primary\">\n <NekoTypo p><b>Currently works with the <a href=\"https://wordpress.org/plugins/meow-gallery/\">Meow Gallery</a> and Gutenberg Galleries.</b> In a future Pro version, support for additional galleries might be added (please contact <a href=\"https://meowapps.com/contact/\">Meow Apps</a> for this).</NekoTypo>\n {jsxUseButtons}\n {!buttonEnabled ? null : jsxButtonLabel}\n </NekoBlock>\n </NekoColumn>\n\n </NekoWrapper>\n </NekoTab>\n\n </NekoTabs>\n\n </NekoColumn>\n\n </NekoWrapper>\n\n </NekoPage>\n );\n};\n\nexport default Settings;","// React & Vendor Libs\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Gallery Custom Links\nimport Settings from '@app/components/Settings';\n\ndocument.addEventListener('DOMContentLoaded', function(event) {\n\n\t// Gallery Custom Links Settings\n\tconst container = document.getElementById('mgcl-admin-settings');\n\tif (container) {\n\t\tReactDOM.render((<Settings />), container);\n\t}\n\n});\n"],"sourceRoot":""}
app/vendor.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (window.wpJsonMgcl=window.wpJsonMgcl||[]).push([[1],[,function(e,t,n){e.exports=n(60)()},function(e,t,n){"use strict";(function(e){var r=n(14),o=n(0),i=n.n(o),a=(n(47),n(48)),u=n(49),s=n(23),l=n(20),c=n.n(l);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},p=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},h=Object.freeze([]),v=Object.freeze({});function y(e){return"function"==typeof e}function b(e){return e.displayName||e.name||"Component"}function m(e){return e&&"string"==typeof e.styledComponentId}var g=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",w="undefined"!=typeof window&&"HTMLElement"in window,_="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1,C=function(){return n.nc};function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#"+e+" for more information."+(n.length>0?" Additional arguments: "+n.join(", "):""))}var k=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(g))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(g,"active"),r.setAttribute("data-styled-version","5.1.1");var a=C();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},S=function(){function e(e){var t=this.element=k(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}O(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),x=function(){function e(e){var t=this.element=k(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),A=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),M=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&O(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),u=0,s=t.length;u<s;u++)this.tag.insertRule(a,t[u])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),j=new Map,E=new Map,P=1,I=function(e){if(j.has(e))return j.get(e);var t=P++;return j.set(e,t),E.set(t,e),t},R=function(e){return E.get(e)},T=function(e,t){t>=P&&(P=t+1),j.set(e,t),E.set(t,e)},L="style["+g+'][data-styled-version="5.1.1"]',F=new RegExp("^"+g+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),z=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},N=function(e,t){for(var n=t.innerHTML.split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var u=a.match(F);if(u){var s=0|parseInt(u[1],10),l=u[2];0!==s&&(T(l,s),z(e,l,u[3]),e.getTag().insertRules(s,r)),r.length=0}else r.push(a)}}},D=w,H={isServer:!w,useCSSOMInjection:!_},q=function(){function e(e,t,n){void 0===e&&(e=H),void 0===t&&(t={}),this.options=f({},H,{},e),this.gs=t,this.names=new Map(n),!this.options.isServer&&w&&D&&(D=!1,function(e){for(var t=document.querySelectorAll(L),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(g)&&(N(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return I(e)};var t=e.prototype;return t.reconstructWithOptions=function(t){return new e(f({},this.options,{},t),this.gs,this.names)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(t=this.options,n=t.isServer,r=t.useCSSOMInjection,o=t.target,e=n?new A(o):r?new S(o):new x(o),new M(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(I(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(I(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(I(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=R(o);if(void 0!==i){var a=e.names.get(i),u=t.getGroup(o);if(void 0!==a&&0!==u.length){var s=g+".g"+o+'[id="'+i+'"]',l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+=e+",")})),r+=""+u+s+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),$=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},V=function(e){return $(5381,e)};var U=/^\s*\/\/.*$/gm;function W(e){var t,n,r,o=void 0===e?v:e,i=o.options,u=void 0===i?v:i,s=o.plugins,l=void 0===s?h:s,c=new a.a(u),f=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,u,s,l,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,r,o){return r>0&&-1!==o.slice(0,r).indexOf(n)&&o.slice(r-n.length,r)!==n?"."+t:e};function y(e,o,i,a){void 0===a&&(a="&");var u=e.replace(U,""),s=o&&i?i+" "+o+" { "+u+" }":u;return t=a,n=o,r=new RegExp("\\"+n+"\\b","g"),c(i||!o?"":o,s)}return c.use([].concat(l,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},d,function(e){if(-2===e){var t=f;return f=[],t}}])),y.hash=l.length?l.reduce((function(e,t){return t.name||O(15),$(e,t.name)}),5381).toString():"",y}var B=i.a.createContext(),G=(B.Consumer,i.a.createContext()),K=(G.Consumer,new q),Y=W();function X(){return Object(o.useContext)(B)||K}function Q(){return Object(o.useContext)(G)||Y}var J=function(){function e(e,t){var n=this;this.inject=function(e){e.hasNameForId(n.id,n.name)||e.insertRules(n.id,n.name,Y.apply(void 0,n.stringifyArgs))},this.toString=function(){return O(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.stringifyArgs=t}return e.prototype.getName=function(){return this.name},e}(),Z=/([A-Z])/g,ee=/^ms-/;function te(e){return e.replace(Z,"-$1").toLowerCase().replace(ee,"-ms-")}var ne=function(e){return null==e||!1===e||""===e},re=function e(t,n){var r=[];return Object.keys(t).forEach((function(n){if(!ne(t[n])){if(p(t[n]))return r.push.apply(r,e(t[n],n)),r;if(y(t[n]))return r.push(te(n)+":",t[n],";"),r;r.push(te(n)+": "+(o=n,(null==(i=t[n])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||o in u.a?String(i).trim():i+"px")+";"))}var o,i;return r})),n?[n+" {"].concat(r,["}"]):r};function oe(e,t,n){if(Array.isArray(e)){for(var r,o=[],i=0,a=e.length;i<a;i+=1)""!==(r=oe(e[i],t,n))&&(Array.isArray(r)?o.push.apply(o,r):o.push(r));return o}return ne(e)?"":m(e)?"."+e.styledComponentId:y(e)?"function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t?e:oe(e(t),t,n):e instanceof J?n?(e.inject(n),e.getName()):e:p(e)?re(e):e.toString();var u}function ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return y(e)||p(e)?oe(d(h,[e].concat(n))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:oe(d(e,n))}var ae=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ue=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function se(e,t,n){var r=e[n];ae(t)&&ae(r)?le(r,t):e[n]=t}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(ae(a))for(var u in a)ue(u)&&se(e,a[u],u)}return e}var ce=/(a)(d)/gi,fe=function(e){return String.fromCharCode(e+(e>25?39:97))};function de(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=fe(t%52)+n;return(fe(t%52)+n).replace(ce,"$1-$2")}function pe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(y(n)&&!m(n))return!1}return!0}var he=function(){function e(e,t){this.rules=e,this.staticRulesId="",this.isStatic=pe(e),this.componentId=t,this.baseHash=V(t),q.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId;if(this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))return this.staticRulesId;var o=oe(this.rules,e,t).join(""),i=de($(this.baseHash,o.length)>>>0);if(!t.hasNameForId(r,i)){var a=n(o,"."+i,void 0,r);t.insertRules(r,i,a)}return this.staticRulesId=i,i}for(var u=this.rules.length,s=$(this.baseHash,n.hash),l="",c=0;c<u;c++){var f=this.rules[c];if("string"==typeof f)l+=f;else{var d=oe(f,e,t),p=Array.isArray(d)?d.join(""):d;s=$(s,p+c),l+=p}}var h=de(s>>>0);if(!t.hasNameForId(r,h)){var v=n(l,"."+h,void 0,r);t.insertRules(r,h,v)}return h},e}(),ve=(new Set,function(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme}),ye=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,be=/(^-|-$)/g;function me(e){return e.replace(ye,"-").replace(be,"")}function ge(e){return"string"==typeof e&&!0}var we=function(e){return de(V(e)>>>0)};var _e=i.a.createContext();_e.Consumer;var Ce={};function Oe(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,u=e.foldedComponentIds,l=e.shouldForwardProp,c=e.styledComponentId,d=e.target;Object(o.useDebugValue)(c);var p=function(e,t,n){void 0===e&&(e=v);var r=f({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in y(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(ve(t,Object(o.useContext)(_e),a)||v,t,r),h=p[0],b=p[1],m=function(e,t,n,r){var i=X(),a=Q(),u=e.isStatic&&!t?e.generateAndInjectStyles(v,i,a):e.generateAndInjectStyles(n,i,a);return Object(o.useDebugValue)(u),u}(i,r.length>0,h),g=n,w=b.$as||t.$as||b.as||t.as||d,_=ge(w),C=b!==t?f({},t,{},b):t,O=l||_&&s.a,k={};for(var S in C)"$"!==S[0]&&"as"!==S&&("forwardedAs"===S?k.as=C[S]:O&&!O(S,s.a)||(k[S]=C[S]));return t.style&&b.style!==t.style&&(k.style=f({},t.style,{},b.style)),k.className=Array.prototype.concat(u,c,m!==c?m:null,t.className,b.className).filter(Boolean).join(" "),k.ref=g,Object(o.createElement)(w,k)}function ke(e,t,n){var r=m(e),o=!ge(e),a=t.displayName,u=void 0===a?function(e){return ge(e)?"styled."+e:"Styled("+b(e)+")"}(e):a,s=t.componentId,l=void 0===s?function(e,t){var n="string"!=typeof e?"sc":me(e);Ce[n]=(Ce[n]||0)+1;var r=n+"-"+we(n+Ce[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):s,d=t.attrs,p=void 0===d?h:d,v=t.displayName&&t.componentId?me(t.displayName)+"-"+t.componentId:t.componentId||l,y=r&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,g=t.shouldForwardProp;r&&e.shouldForwardProp&&(g=g?function(n,r){return e.shouldForwardProp(n,r)&&t.shouldForwardProp(n,r)}:e.shouldForwardProp);var w,_=new he(r?e.componentStyle.rules.concat(n):n,v),C=function(e,t){return Oe(w,e,t)};return C.displayName=u,(w=i.a.forwardRef(C)).attrs=y,w.componentStyle=_,w.displayName=u,w.shouldForwardProp=g,w.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):h,w.styledComponentId=v,w.target=r?e.target:e,w.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(ge(e)?e:me(b(e)));return ke(e,f({},o,{attrs:y,componentId:i}),n)},Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?le({},e.defaultProps,t):t}}),w.toString=function(){return"."+w.styledComponentId},o&&c()(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,self:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}var Se=function(e){return function e(t,n,o){if(void 0===o&&(o=v),!Object(r.isValidElementType)(n))return O(1,String(n));var i=function(){return t(n,o,ie.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,f({},o,{},r))},i.attrs=function(r){return e(t,n,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(ke,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Se[e]=Se(e)}));t.a=Se}).call(this,n(63))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InlineIcon=t.Icon=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};function i(e){return(i="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 a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=0,s=/(-?[0-9.]*[0-9]+[0-9.]*)/g,l=/^-?[0-9.]*[0-9]+[0-9.]*$/g,c=["width","height","inline","hFlip","vFlip","flip","rotate","align","color","box"],f={left:0,top:0,width:16,height:16,rotate:0,hFlip:!1,vFlip:!1};var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._item=t}var t,n,r;return t=e,r=[{key:"splitAttributes",value:function(e){var t={icon:Object.create(null),node:Object.create(null)};return Object.keys(e).forEach((function(n){t[-1===c.indexOf(n)?"node":"icon"][n]=e[n]})),t}},{key:"calculateDimension",value:function(e,t,n){if(1===t)return e;if(n=void 0===n?100:n,"number"==typeof e)return Math.ceil(e*t*n)/n;var r=e.split(s);if(null===r||!r.length)return null;for(var o,i=[],a=r.shift(),u=l.test(a);;){if(u?(o=parseFloat(a),isNaN(o)?i.push(a):i.push(Math.ceil(o*t*n)/n)):i.push(a),void 0===(a=r.shift()))return i.join("");u=!u}}},{key:"replaceIDs",value:function(e){var t,n,r=/\sid="(\S+)"/g,o=[];function i(e,t,n){for(var r=0;-1!==(r=n.indexOf(e,r));)n=n.slice(0,r)+t+n.slice(r+e.length),r+=t.length;return n}for(;t=r.exec(e);)o.push(t[1]);return o.length?(n="IconifyId-"+Date.now().toString(16)+"-"+(16777216*Math.random()|0).toString(16)+"-",o.forEach((function(t){var r=n+u;u++,e=i('="'+t+'"','="'+r+'"',e),e=i('="#'+t+'"','="#'+r+'"',e),e=i("(#"+t+")","(#"+r+")",e)})),e):e}}],(n=[{key:"getAttributes",value:function(t){var n=this._item;"object"!==i(t)&&(t=Object.create(null));var r={horizontal:"center",vertical:"middle",slice:!1},o={rotate:n.rotate,hFlip:n.hFlip,vFlip:n.vFlip},a=Object.create(null),u=Object.create(null),s=!0===t.inline||"true"===t.inline||"1"===t.inline,l={left:n.left,top:s?n.inlineTop:n.top,width:n.width,height:s?n.inlineHeight:n.height};if(["hFlip","vFlip"].forEach((function(e){void 0===t[e]||!0!==t[e]&&"true"!==t[e]&&"1"!==t[e]||(o[e]=!o[e])})),void 0!==t.flip&&t.flip.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"horizontal":o.hFlip=!o.hFlip;break;case"vertical":o.vFlip=!o.vFlip}})),void 0!==t.rotate){var c=t.rotate;if("number"==typeof c)o.rotate+=c;else if("string"==typeof c){var f=c.replace(/^-?[0-9.]*/,"");if(""===f)c=parseInt(c),isNaN(c)||(o.rotate+=c);else if(f!==c){var d=!1;switch(f){case"%":d=25;break;case"deg":d=90}d&&(c=parseInt(c.slice(0,c.length-f.length)),isNaN(c)||(o.rotate+=Math.round(c/d)))}}}var p,h=[];switch(o.hFlip?o.vFlip?o.rotate+=2:(h.push("translate("+(l.width+l.left)+" "+(0-l.top)+")"),h.push("scale(-1 1)"),l.top=l.left=0):o.vFlip&&(h.push("translate("+(0-l.left)+" "+(l.height+l.top)+")"),h.push("scale(1 -1)"),l.top=l.left=0),o.rotate%4){case 1:p=l.height/2+l.top,h.unshift("rotate(90 "+p+" "+p+")"),0===l.left&&0===l.top||(p=l.left,l.left=l.top,l.top=p),l.width!==l.height&&(p=l.width,l.width=l.height,l.height=p);break;case 2:h.unshift("rotate(180 "+(l.width/2+l.left)+" "+(l.height/2+l.top)+")");break;case 3:p=l.width/2+l.left,h.unshift("rotate(-90 "+p+" "+p+")"),0===l.left&&0===l.top||(p=l.left,l.left=l.top,l.top=p),l.width!==l.height&&(p=l.width,l.width=l.height,l.height=p)}var v,y,b=t.width?t.width:null,m=t.height?t.height:null;null===b&&null===m&&(m="1em"),null!==b&&null!==m?(v=b,y=m):null!==b?(v=b,y=e.calculateDimension(v,l.height/l.width)):(y=m,v=e.calculateDimension(y,l.width/l.height)),!1!==v&&(u.width="auto"===v?l.width:v),!1!==y&&(u.height="auto"===y?l.height:y),s&&0!==n.verticalAlign&&(a["vertical-align"]=n.verticalAlign+"em"),void 0!==t.align&&t.align.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"left":case"right":case"center":r.horizontal=e;break;case"top":case"bottom":case"middle":r.vertical=e;break;case"crop":r.slice=!0;break;case"meet":r.slice=!1}})),u.preserveAspectRatio=function(e){var t;switch(e.horizontal){case"left":t="xMin";break;case"right":t="xMax";break;default:t="xMid"}switch(e.vertical){case"top":t+="YMin";break;case"bottom":t+="YMax";break;default:t+="YMid"}return t+=e.slice?" slice":" meet"}(r),u.viewBox=l.left+" "+l.top+" "+l.width+" "+l.height;var g=e.replaceIDs(n.body);return void 0!==t.color&&(g=g.replace(/currentColor/g,t.color)),h.length&&(g='<g transform="'+h.join(" ")+'">'+g+"</g>"),!0!==t.box&&"true"!==t.box&&"1"!==t.box||(g+='<rect x="'+l.left+'" y="'+l.top+'" width="'+l.width+'" height="'+l.height+'" fill="rgba(0, 0, 0, 0)" />'),{attributes:u,body:g,style:a}}},{key:"getSVG",value:function(t,n){var r=e.splitAttributes(t),o=this.getAttributes(r.icon),i='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';return n&&Object.keys(r.node).forEach((function(e){i+=" "+e+'="'+r.node[e]+'"'})),Object.keys(o.attributes).forEach((function(e){i+=" "+e+'="'+o.attributes[e]+'"'})),i+=' style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);',Object.keys(o.style).forEach((function(e){i+=" "+e+": "+o.style[e]+";"})),t&&void 0!==t.style&&(i+=t.style),i+='">',i+=o.body+"</svg>"}}])&&a(t.prototype,n),r&&a(t,r),e}();function p(e,t){if("object"!==i(e.icon))return null;var n=d.splitAttributes(e),r=n.icon,a=n.node;delete a.icon,void 0===r.inline&&(r.inline=t);var u=new d(function(e){var t,n=Object.create(null);for(t in f)n[t]=f[t];for(t in e)n[t]=e[t];return void 0===n.inlineTop&&(n.inlineTop=n.top),void 0===n.inlineHeight&&(n.inlineHeight=n.height),void 0===n.verticalAlign&&(n.verticalAlign=n.height%7==0&&n.height%8!=0?-.143:-.125),n}(e.icon)).getAttributes(r),s={transform:"rotate(360deg)"};if(void 0!==u.style["vertical-align"]&&(s.verticalAlign=u.style["vertical-align"]),void 0!==e.style)for(var l in e.style)s[l]=e.style[l];var c,p={xmlns:"http://www.w3.org/2000/svg",focusable:!1,style:s};for(c in a)p[c]=a[c];for(c in u.attributes)p[c]=u.attributes[c];return p.dangerouslySetInnerHTML={__html:u.body},o.default.createElement("svg",p,null)}var h=function(e){return p(e,!1)};t.Icon=h;t.InlineIcon=function(e){return p(e,!0)};var v=h;t.default=v},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,e)})(e)}function l(e){return(l="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)}n.d(t,"a",(function(){return N}));var c=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(s(Error));function f(e){return Math.round(255*e)}function d(e,t,n){return f(e)+","+f(t)+","+f(n)}function p(e,t,n,r){if(void 0===r&&(r=d),0===t)return r(n,n,n);var o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(o%2-1)),u=0,s=0,l=0;o>=0&&o<1?(u=i,s=a):o>=1&&o<2?(u=a,s=i):o>=2&&o<3?(s=i,l=a):o>=3&&o<4?(s=a,l=i):o>=4&&o<5?(u=a,l=i):o>=5&&o<6&&(u=i,l=a);var c=n-i/2;return r(u+c,s+c,l+c)}var h={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var v=/^#[a-fA-F0-9]{6}$/,y=/^#[a-fA-F0-9]{8}$/,b=/^#[a-fA-F0-9]{3}$/,m=/^#[a-fA-F0-9]{4}$/,g=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,w=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,_=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,C=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function O(e){if("string"!=typeof e)throw new c(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return h[t]?"#"+h[t]:e}(e);if(t.match(v))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(y)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(b))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=g.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=w.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])};var a=_.exec(t);if(a){var u="rgb("+p(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",s=g.exec(u);if(!s)throw new c(4,t,u);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var l=C.exec(t);if(l){var f="rgb("+p(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",d=g.exec(f);if(!d)throw new c(4,t,f);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+l[4])}}throw new c(5)}function k(e){return function(e){var t,n=e.red/255,r=e.green/255,o=e.blue/255,i=Math.max(n,r,o),a=Math.min(n,r,o),u=(i+a)/2;if(i===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:u,alpha:e.alpha}:{hue:0,saturation:0,lightness:u};var s=i-a,l=u>.5?s/(2-i-a):s/(i+a);switch(i){case n:t=(r-o)/s+(r<o?6:0);break;case r:t=(o-n)/s+2;break;default:t=(n-r)/s+4}return t*=60,void 0!==e.alpha?{hue:t,saturation:l,lightness:u,alpha:e.alpha}:{hue:t,saturation:l,lightness:u}}(O(e))}var S=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function x(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function A(e){return x(Math.round(255*e))}function M(e,t,n){return S("#"+A(e)+A(t)+A(n))}function j(e,t,n){return p(e,t,n,M)}function E(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return j(e,t,n);if("object"===l(e)&&void 0===t&&void 0===n)return j(e.hue,e.saturation,e.lightness);throw new c(1)}function P(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?j(e,t,n):"rgba("+p(e,t,n)+","+r+")";if("object"===l(e)&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?j(e.hue,e.saturation,e.lightness):"rgba("+p(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new c(2)}function I(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return S("#"+x(e)+x(t)+x(n));if("object"===l(e)&&void 0===t&&void 0===n)return S("#"+x(e.red)+x(e.green)+x(e.blue));throw new c(6)}function R(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var o=O(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?I(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===l(e)&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?I(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new c(7)}function T(e){if("object"!==l(e))throw new c(8);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}(e))return R(e);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return I(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return P(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return E(e);throw new c(8)}function L(e){return function e(t,n,r){return function(){var o=r.concat(Array.prototype.slice.call(arguments));return o.length>=n?t.apply(this,o):e(t,n,o)}}(e,e.length,[])}function F(e,t,n){return Math.max(e,Math.min(t,n))}function z(e,t){if("transparent"===t)return t;var n=k(t);return T(r({},n,{lightness:F(0,1,n.lightness+parseFloat(e))}))}var N=L(z)},function(e,t){t.__esModule=!0,t.default={body:'<path d="M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M18.41 7.41L17 6l-6 6l6 6l1.41-1.41L13.83 12l4.58-4.59m-6 0L11 6l-6 6l6 6l1.41-1.41L7.83 12l4.58-4.59z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M5.59 7.41L7 6l6 6l-6 6l-1.41-1.41L10.17 12L5.59 7.41m6 0L13 6l6 6l-6 6l-1.41-1.41L16.17 12l-4.58-4.59z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6l1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M14 19h4V5h-4M6 19h4V5H6v14z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M8 5.14v14l11-7l-11-7z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M18 18H6V6h12v12z" fill="currentColor"/>',width:24,height:24}},function(e,t,n){"use strict";e.exports=n(64)},function(e,t){t.__esModule=!0,t.default={body:'<path d="M19 3H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M10 17l-5-5l1.41-1.42L10 14.17l7.59-7.59L19 8m0-5H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M10 4H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z" fill="currentColor"/>',width:24,height:24}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var r,o=n(75);var i=((r=o)&&r.__esModule?r:{default:r}).default,a=i.canUseDOM?window.HTMLElement:{};t.canUseDOM=i.canUseDOM;t.default=a},,function(e,t,n){"use strict";var r=n(14),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?a:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var u=s(t),v=s(n),y=0;y<a.length;++y){var b=a[y];if(!(i[b]||r&&r[b]||v&&v[b]||u&&u[b])){var m=d(n,b);try{l(t,b,m)}catch(e){}}}}return t}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,s,"next",e)}function s(e){r(a,o,i,u,s,"throw",e)}u(void 0)}))}}function i(e){return(i="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 a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0});var d=n(65),p=n(66),h=n(68),v=function(){},y=new p.TimeoutError,b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(g,e);var t,n,r,l,f,d,b,m=s(g);function g(e){var t,n,r,o,a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),t=m.call(this),Object.defineProperty(c(t),"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(c(t),"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(c(t),"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(c(t),"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(c(t),"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(c(t),"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c(t),"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:h.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(null!==(r=null===(n=e.intervalCap)||void 0===n?void 0:n.toString())&&void 0!==r?r:"","` (").concat(i(e.intervalCap),")"));if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(null!==(a=null===(o=e.interval)||void 0===o?void 0:o.toString())&&void 0!==a?a:"","` (").concat(i(e.interval),")"));return t._carryoverConcurrencyCount=e.carryoverConcurrencyCount,t._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,t._intervalCap=e.intervalCap,t._interval=e.interval,t._queue=new e.queueClass,t._queueClass=e.queueClass,t.concurrency=e.concurrency,t._timeout=e.timeout,t._throwOnTimeout=!0===e.throwOnTimeout,t._isPaused=!1===e.autoStart,t}return t=g,(n=[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=v,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=v,this.emit("idle"))}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var e=this,t=Date.now();if(void 0===this._intervalId){var n=this._intervalEnd-t;if(!(n<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){e._onResumeInterval()}),n)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}},{key:"_tryToStartAnother",value:function(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){var e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),e&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var e=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){e._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}},{key:"_onInterval",value:function(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}},{key:"_processQueue",value:function(){for(;this._tryToStartAnother(););}},{key:"add",value:(b=o(regeneratorRuntime.mark((function e(t){var n,r=this,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",new Promise((function(e,i){var a=function(){var a=o(regeneratorRuntime.mark((function o(){var a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r._pendingCount++,r._intervalCount++,o.prev=2,a=void 0===r._timeout&&void 0===n.timeout?t():p.default(Promise.resolve(t()),void 0===n.timeout?r._timeout:n.timeout,(function(){(void 0===n.throwOnTimeout?r._throwOnTimeout:n.throwOnTimeout)&&i(y)})),o.t0=e,o.next=7,a;case 7:o.t1=o.sent,(0,o.t0)(o.t1),o.next=14;break;case 11:o.prev=11,o.t2=o.catch(2),i(o.t2);case 14:r._next();case 15:case"end":return o.stop()}}),o,null,[[2,11]])})));return function(){return a.apply(this,arguments)}}();r._queue.enqueue(a,n),r._tryToStartAnother()})));case 2:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"addAll",value:(d=o(regeneratorRuntime.mark((function e(t,n){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t.map(function(){var e=o(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.add(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return d.apply(this,arguments)})},{key:"start",value:function(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}},{key:"pause",value:function(){this._isPaused=!0}},{key:"clear",value:function(){this._queue=new this._queueClass}},{key:"onEmpty",value:(f=o(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var n=t._resolveEmpty;t._resolveEmpty=function(){n(),e()}})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"onIdle",value:(l=o(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var n=t._resolveIdle;t._resolveIdle=function(){n(),e()}})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"sizeBy",value:function(e){return this._queue.filter(e).length}},{key:"_doesIntervalAllowAnother",get:function(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}},{key:"_doesConcurrentAllowAnother",get:function(){return this._pendingCount<this._concurrency}},{key:"concurrency",get:function(){return this._concurrency},set:function(e){if(!("number"==typeof e&&e>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(e,"` (").concat(i(e),")"));this._concurrency=e,this._processQueue()}},{key:"size",get:function(){return this._queue.size}},{key:"pending",get:function(){return this._pendingCount}},{key:"isPaused",get:function(){return this._isPaused}},{key:"timeout",get:function(){return this._timeout},set:function(e){this._timeout=e}}])&&a(t.prototype,n),r&&a(t,r),g}(d);t.default=b},function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return f}));var r=n(0),o=n(58),i=n.n(o);function a(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}function u(){return void 0===navigator.onLine||navigator.onLine}function s(e){return(s="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)}var l=new WeakMap,c=0;var f=new(function(){function e(e){void 0===e&&(e={}),this.__cache=new Map(Object.entries(e)),this.__listeners=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.__cache.get(t)},e.prototype.set=function(e,t,n){void 0===n&&(n=!0);var r=this.serializeKey(e)[0];this.__cache.set(r,t),n&&S(e,t,!1),this.notify()},e.prototype.keys=function(){return Array.from(this.__cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.__cache.has(t)},e.prototype.clear=function(e){void 0===e&&(e=!0),e&&this.__cache.forEach((function(e){return S(e,null,!1)})),this.__cache.clear(),this.notify()},e.prototype.delete=function(e,t){void 0===t&&(t=!0);var n=this.serializeKey(e)[0];t&&S(e,null,!1),this.__cache.delete(n),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"==typeof e)try{e=e()}catch(t){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",n=0;n<e.length;++n){var r=void 0;null===e[n]||"object"!==s(e[n])?r="string"==typeof e[n]?'"'+e[n]+'"':String(e[n]):l.has(e[n])?r=l.get(e[n]):(r=c,l.set(e[n],c++)),t+="@"+r}return t}(e)):e=String(e||""),[e,t,e?"err@"+e:""]},e.prototype.subscribe=function(e){var t=this;if("function"!=typeof e)throw new Error("Expected the listener to be a function.");var n=!0;return this.__listeners.push(e),function(){if(n){n=!1;var r=t.__listeners.indexOf(e);r>-1&&(t.__listeners[r]=t.__listeners[t.__listeners.length-1],t.__listeners.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.__listeners;e<t.length;e++){(0,t[e])()}},e}()),d={},p={},h={},v={};var y="undefined"!=typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),b=(i.a,!1);if("undefined"!=typeof window&&window.addEventListener&&!b){var m=function(){if(a()&&u())for(var e in p)p[e][0]&&p[e][0]()};window.addEventListener("visibilitychange",m,!1),window.addEventListener("focus",m,!1),b=!0}var g=Object(r.createContext)({});g.displayName="SWRConfigContext";var w=g;var _=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},O="undefined"==typeof window,k=(O?r.useEffect:r.useLayoutEffect,function(e,t){void 0===t&&(t=!0);var n=f.serializeKey(e),r=n[0],o=n[2];if(!r)return Promise.resolve();var i=h[r];if(r&&i){for(var a=f.get(r),u=f.get(o),s=[],l=0;l<i.length;++l)s.push(i[l](t,a,u,l>0));return Promise.all(s).then((function(){return f.get(r)}))}return Promise.resolve(f.get(r))}),S=function(e,t,n){return void 0===n&&(n=!0),_(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,l,c,p,y;return C(this,(function(b){switch(b.label){case 0:if(!(r=f.serializeKey(e)[0]))return[2];if(void 0===t)return[2,k(e,n)];if(v[r]=Date.now()-1,a=v[r],u=d[r],!t||"function"!=typeof t)return[3,5];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,t(f.get(r))];case 2:return o=b.sent(),[3,4];case 3:return s=b.sent(),i=s,[3,4];case 4:return[3,11];case 5:if(!t||"function"!=typeof t.then)return[3,10];b.label=6;case 6:return b.trys.push([6,8,,9]),[4,t];case 7:return o=b.sent(),[3,9];case 8:return l=b.sent(),i=l,[3,9];case 9:return[3,11];case 10:o=t,b.label=11;case 11:if(a!==v[r]||u!==d[r]){if(i)throw i;return[2,o]}if(void 0!==o&&f.set(r,o,!1),c=h[r]){for(p=[],y=0;y<c.length;++y)p.push(c[y](!!n,o,i,y>0));return[2,Promise.all(p).then((function(){return f.get(r)}))]}if(i)throw i;return[2,o]}}))}))};w.Provider,new Map},function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.a=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)};
2
+ /*!
3
+ * Adapted from jQuery UI core
4
+ *
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright 2014 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ *
11
+ * http://api.jqueryui.com/category/ui-core/
12
+ */
13
+ var r=/input|select|textarea|button|object/;function o(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(o(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&i(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t="length"in n?n[0]:n}return u=t||u},t.validateElement=l,t.hide=function(e){l(e)&&(e||u).setAttribute("aria-hidden","true")},t.show=function(e){l(e)&&(e||u).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){u=null},t.resetForTesting=function(){u=null};var r,o=n(74),i=(r=o)&&r.__esModule?r:{default:r},a=n(18);var u=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){return!(!e&&!u)||((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=Array.isArray,o=Object.keys,i=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,u,s,l=r(t),c=r(n);if(l&&c){if((u=t.length)!=n.length)return!1;for(a=u;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(l!=c)return!1;var f=t instanceof Date,d=n instanceof Date;if(f!=d)return!1;if(f&&d)return t.getTime()==n.getTime();var p=t instanceof RegExp,h=n instanceof RegExp;if(p!=h)return!1;if(p&&h)return t.toString()==n.toString();var v=o(t);if((u=v.length)!==o(n).length)return!1;for(a=u;0!=a--;)if(!i.call(n,v[a]))return!1;for(a=u;0!=a--;)if(!e(t[s=v[a]],n[s]))return!1;return!0}return t!=t&&n!=n}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M18 8a2 2 0 0 1 2 2v10c0 1.1-.9 2-2 2H6a2 2 0 0 1-2-2V10c0-1.11.89-2 2-2h1V6C7 3.24 9.24.998 12 .998S17 3.24 17 6v2h1m-6-5c-1.66 0-3 1.34-3 3v2h6V6c0-1.66-1.34-3-3-3m-1 16l6.25-6.24l-1.41-1.41L11 16.18L8.41 13.6L7 15l4 4z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M18 1c-2.76 0-5 2.24-5 5v2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12c1.11 0 2-.89 2-2V10a2 2 0 0 0-2-2h-1V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2h2V6c0-2.76-2.24-5-5-5m-8 12a2 2 0 0 1 2 2c0 1.11-.89 2-2 2a2 2 0 1 1 0-4z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m6.16 12.31c-1.56 0-2.97.58-4.05 1.52L6 13.72V19h5.28l-2.13-2.12c.82-.68 1.85-1.1 3.01-1.1c2.07 0 3.84 1.35 4.45 3.22l1.39-.46c-.81-2.45-3.12-4.23-5.84-4.23z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 5V1L7 6l5 5V7a6 6 0 0 1 6 6a6 6 0 0 1-6 6a6 6 0 0 1-6-6H4a8 8 0 0 0 8 8a8 8 0 0 0 8-8a8 8 0 0 0-8-8z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4s8-1.79 8-4s-3.58-4-8-4M4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4m0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M21.71 20.29l-1.42 1.42a1 1 0 0 1-1.41 0L7 9.85A3.81 3.81 0 0 1 6 10a4 4 0 0 1-3.78-5.3l2.54 2.54l.53-.53l1.42-1.42l.53-.53L4.7 2.22A4 4 0 0 1 10 6a3.81 3.81 0 0 1-.15 1l11.86 11.88a1 1 0 0 1 0 1.41M2.29 18.88a1 1 0 0 0 0 1.41l1.42 1.42a1 1 0 0 0 1.41 0l5.47-5.46l-2.83-2.83M20 2l-4 2v2l-2.17 2.17l2 2L18 8h2l2-4z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 8l-1.33.09C9.81 7.07 7.4 4.5 5 4.5c0 0-1.97 2.96-.04 6.91c-.55.83-.89 1.26-.96 2.25l-1.93.29l.21.98l1.76-.26l.14.71l-1.57.94l.47.89l1.45-.89C5.68 18.76 8.59 20 12 20s6.32-1.24 7.47-3.68l1.45.89l.47-.89l-1.57-.94l.14-.71l1.76.26l.21-.98l-1.93-.29c-.07-.99-.41-1.42-.96-2.25C20.97 7.46 19 4.5 19 4.5c-2.4 0-4.81 2.57-5.67 3.59L12 8m-3 3a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m6 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 3h2l-.7 1.39c.2.64.76 1.11 1.45 1.11a1.5 1.5 0 0 0 1.5-1.5h.5a2 2 0 0 1-2 2c-.75 0-1.4-.41-1.75-1c-.35.59-1 1-1.75 1a2 2 0 0 1-2-2h.5a1.5 1.5 0 0 0 1.5 1.5c.69 0 1.25-.47 1.45-1.11L11 14z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M9 16v-6H5l7-7l7 7h-4v6H9m-4 4v-2h14v2H5z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M16.84 2.73c-.39 0-.77.15-1.07.44l-2.12 2.12l5.3 5.31l2.12-2.1c.6-.61.6-1.56 0-2.14L17.9 3.17c-.3-.29-.68-.44-1.06-.44M12.94 6l-8.1 8.11l2.56.28l.18 2.29l2.28.17l.29 2.56l8.1-8.11m-14 3.74L2.5 21.73l6.7-1.79l-.24-2.16l-2.31-.17l-.18-2.32" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M13 3v6h8V3m-8 18h8V11h-8M3 21h8v-6H3m0-2h8V3H3v10z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M18.68 12.32a4.49 4.49 0 0 0-6.36.01a4.49 4.49 0 0 0 0 6.36a4.508 4.508 0 0 0 5.57.63L21 22.39L22.39 21l-3.09-3.11c1.13-1.77.87-4.09-.62-5.57m-1.41 4.95c-.98.98-2.56.97-3.54 0c-.97-.98-.97-2.56.01-3.54c.97-.97 2.55-.97 3.53 0c.97.98.97 2.56 0 3.54M10.9 20.1a6.527 6.527 0 0 1-1.48-2.32C6.27 17.25 4 15.76 4 14v3c0 2.21 3.58 4 8 4c-.4-.26-.77-.56-1.1-.9M4 9v3c0 1.68 2.07 3.12 5 3.7v-.2c0-.93.2-1.85.58-2.69C6.34 12.3 4 10.79 4 9m8-6C7.58 3 4 4.79 4 7c0 2 3 3.68 6.85 4h.05c1.2-1.26 2.86-2 4.6-2c.91 0 1.81.19 2.64.56A3.215 3.215 0 0 0 20 7c0-2.21-3.58-4-8-4z" fill="currentColor"/>',width:24,height:24}},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var l=i[s];if(!u(l))return!1;var c=e[l],f=t[l];if(!1===(o=n?n.call(r,c,f,l):void 0)||void 0===o&&c!==f)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";u<i;++u)t[u]=n(e,t[u],r).trim();break;default:var s=u=0;for(t=[];u<i;++u)for(var l=0;l<a;++l)t[s++]=n(e[l]+" ",o[u],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",u=2*t+3*n+4*i;if(944===u){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===j||2===j&&o(s,1)?"-webkit-"+s+s:s}if(0===j||2===j&&!o(a,1))return a;switch(u){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return d.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(s=a.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(g,"tb");break;case 232:s=a.replace(g,"tb-rl");break;case 220:s=a.replace(g,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,u=(s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<u?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(C,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(C,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),R(2!==t?r:r.replace(O,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(_," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,u,l,c){for(var f,d=0,p=t;d<I;++d)switch(f=P[d].call(s,e,p,n,r,o,i,a,u,l,c)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==t)return p}function u(e){return void 0!==(e=e.prefix)&&(R=null,e?"function"!=typeof e?j=1:(j=2,R=e):j=0),u}function s(e,n){var u=e;if(33>u.charCodeAt(0)&&(u=u.trim()),u=[u],0<I){var s=a(-1,n,u,u,A,x,0,0,0,0);void 0!==s&&"string"==typeof s&&(n=s)}var f=function e(n,u,s,f,d){for(var p,h,v,g,_,C=0,O=0,k=0,S=0,P=0,R=0,L=v=p=0,F=0,z=0,N=0,D=0,H=s.length,q=H-1,$="",V="",U="",W="";F<H;){if(h=s.charCodeAt(F),F===q&&0!==O+S+k+C&&(0!==O&&(h=47===O?10:47),S=k=C=0,H++,q++),0===O+S+k+C){if(F===q&&(0<z&&($=$.replace(c,"")),0<$.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:$+=s.charAt(F)}h=59}switch(h){case 123:for(p=($=$.trim()).charCodeAt(0),v=1,D=++F;F<H;){switch(h=s.charCodeAt(F)){case 123:v++;break;case 125:v--;break;case 47:switch(h=s.charCodeAt(F+1)){case 42:case 47:e:{for(L=F+1;L<q;++L)switch(s.charCodeAt(L)){case 47:if(42===h&&42===s.charCodeAt(L-1)&&F+2!==L){F=L+1;break e}break;case 10:if(47===h){F=L+1;break e}}F=L}}break;case 91:h++;case 40:h++;case 34:case 39:for(;F++<q&&s.charCodeAt(F)!==h;);}if(0===v)break;F++}switch(v=s.substring(D,F),0===p&&(p=($=$.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<z&&($=$.replace(c,"")),h=$.charCodeAt(1)){case 100:case 109:case 115:case 45:z=u;break;default:z=E}if(D=(v=e(u,z,v,h,d+1)).length,0<I&&(_=a(3,v,z=t(E,$,N),u,A,x,D,h,d,f),$=z.join(""),void 0!==_&&0===(D=(v=_.trim()).length)&&(h=0,v="")),0<D)switch(h){case 115:$=$.replace(w,i);case 100:case 109:case 45:v=$+"{"+v+"}";break;case 107:v=($=$.replace(y,"$1 $2"))+"{"+v+"}",v=1===j||2===j&&o("@"+v,3)?"@-webkit-"+v+"@"+v:"@"+v;break;default:v=$+v,112===f&&(V+=v,v="")}else v="";break;default:v=e(u,t(u,$,N),v,f,d+1)}U+=v,v=N=z=L=p=0,$="",h=s.charCodeAt(++F);break;case 125:case 59:if(1<(D=($=(0<z?$.replace(c,""):$).trim()).length))switch(0===L&&(p=$.charCodeAt(0),45===p||96<p&&123>p)&&(D=($=$.replace(" ",":")).length),0<I&&void 0!==(_=a(1,$,u,n,A,x,V.length,f,d,f))&&0===(D=($=_.trim()).length)&&($="\0\0"),p=$.charCodeAt(0),h=$.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){W+=$+s.charAt(F);break}default:58!==$.charCodeAt(D-1)&&(V+=r($,p,h,$.charCodeAt(2)))}N=z=L=p=0,$="",h=s.charCodeAt(++F)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==f&&0<$.length&&(z=1,$+="\0"),0<I*T&&a(0,$,u,n,A,x,V.length,f,d,f),x=1,A++;break;case 59:case 125:if(0===O+S+k+C){x++;break}default:switch(x++,g=s.charAt(F),h){case 9:case 32:if(0===S+C+O)switch(P){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===S+O+C&&(z=N=1,g="\f"+g);break;case 108:if(0===S+O+C+M&&0<L)switch(F-L){case 2:112===P&&58===s.charCodeAt(F-3)&&(M=P);case 8:111===R&&(M=R)}break;case 58:0===S+O+C&&(L=F);break;case 44:0===O+k+S+C&&(z=1,g+="\r");break;case 34:case 39:0===O&&(S=S===h?0:0===S?h:S);break;case 91:0===S+O+k&&C++;break;case 93:0===S+O+k&&C--;break;case 41:0===S+O+C&&k--;break;case 40:if(0===S+O+C){if(0===p)switch(2*P+3*R){case 533:break;default:p=1}k++}break;case 64:0===O+k+S+C+L+v&&(v=1);break;case 42:case 47:if(!(0<S+C+k))switch(O){case 0:switch(2*h+3*s.charCodeAt(F+1)){case 235:O=47;break;case 220:D=F,O=42}break;case 42:47===h&&42===P&&D+2!==F&&(33===s.charCodeAt(D+2)&&(V+=s.substring(D,F+1)),g="",O=0)}}0===O&&($+=g)}R=P,P=h,F++}if(0<(D=V.length)){if(z=u,0<I&&(void 0!==(_=a(2,V,z,n,A,x,D,f,d,f))&&0===(V=_).length))return W+V+U;if(V=z.join(",")+"{"+V+"}",0!=j*M){switch(2!==j||o(V,2)||(M=0),M){case 111:V=V.replace(m,":-moz-$1")+V;break;case 112:V=V.replace(b,"::-webkit-input-$1")+V.replace(b,"::-moz-$1")+V.replace(b,":-ms-input-$1")+V}M=0}}return W+V+U}(E,u,n,0,0);return 0<I&&(void 0!==(s=a(-2,f,u,u,A,x,f.length,0,0,0))&&(f=s)),"",M=0,x=A=1,f}var l=/^\0+/g,c=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,m=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,_=/([\s\S]*?);/g,C=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,x=1,A=1,M=0,j=1,E=[],P=[],I=0,R=null,T=0;return s.use=function e(t){switch(t){case void 0:case null:I=P.length=0;break;default:if("function"==typeof t)P[I++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else T=0|!!t}return e},s.set=u,void 0!==e&&u(e),s}},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 20a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 7a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M19 20H4a2 2 0 0 1-2-2V6c0-1.11.89-2 2-2h6l2 2h7a2 2 0 0 1 2 2H4v10l2.14-8h17.07l-2.28 8.5c-.23.87-1.01 1.5-1.93 1.5z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M21 17H7V3h14m0-2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2M3 5H1v16a2 2 0 0 0 2 2h16v-2H3m12.96-10.71l-2.75 3.54l-1.96-2.36L8.5 15h11l-3.54-4.71z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M5.5 7A1.5 1.5 0 0 1 4 5.5A1.5 1.5 0 0 1 5.5 4A1.5 1.5 0 0 1 7 5.5A1.5 1.5 0 0 1 5.5 7m15.91 4.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.11 0-2 .89-2 2v7c0 .55.22 1.05.59 1.41l8.99 9c.37.36.87.59 1.42.59c.55 0 1.05-.23 1.41-.59l7-7c.37-.36.59-.86.59-1.41c0-.56-.23-1.06-.59-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,t){t.__esModule=!0,t.default={body:'<path d="M15 9H5V5h10m-3 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3a3 3 0 0 1 3 3a3 3 0 0 1-3 3m5-16H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4z" fill="currentColor"/>',width:24,height:24}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(70),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},function(e,t){t.__esModule=!0,t.default={body:'<path d="M22 16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2h12a2 2 0 0 1 2 2v12m-6 4v2H4a2 2 0 0 1-2-2V7h2v13h12m-3-6l7-7l-1.41-1.41L13 11.17L9.91 8.09L8.5 9.5L13 14z" fill="currentColor"/>',width:24,height:24}},function(e,t,n){"use strict";function r(e){return(r="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)}var o=Array.isArray,i=Object.keys,a=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==r(t)&&"object"==r(n)){var u,s,l,c=o(t),f=o(n);if(c&&f){if((s=t.length)!=n.length)return!1;for(u=s;0!=u--;)if(!e(t[u],n[u]))return!1;return!0}if(c!=f)return!1;var d=t instanceof Date,p=n instanceof Date;if(d!=p)return!1;if(d&&p)return t.getTime()==n.getTime();var h=t instanceof RegExp,v=n instanceof RegExp;if(h!=v)return!1;if(h&&v)return t.toString()==n.toString();var y=i(t);if((s=y.length)!==i(n).length)return!1;for(u=s;0!=u--;)if(!a.call(n,y[u]))return!1;for(u=s;0!=u--;)if(!e(t[l=y[u]],n[l]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";var r=n(0),o=n(28),i=n.n(o);function a(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}function u(){return void 0===navigator.onLine||navigator.onLine}var s=new WeakMap,l=0;var c=new(function(){function e(e){void 0===e&&(e={}),this.__cache=new Map(Object.entries(e)),this.__listeners=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.__cache.get(t)},e.prototype.set=function(e,t,n){void 0===n&&(n=!0);var r=this.serializeKey(e)[0];this.__cache.set(r,t),n&&E(e,t,!1),this.notify()},e.prototype.keys=function(){return Array.from(this.__cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.__cache.has(t)},e.prototype.clear=function(e){void 0===e&&(e=!0),e&&this.__cache.forEach((function(e){return E(e,null,!1)})),this.__cache.clear(),this.notify()},e.prototype.delete=function(e,t){void 0===t&&(t=!0);var n=this.serializeKey(e)[0];t&&E(e,null,!1),this.__cache.delete(n),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"==typeof e)try{e=e()}catch(t){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",n=0;n<e.length;++n){var r=void 0;null===e[n]||"object"!=typeof e[n]?r="string"==typeof e[n]?'"'+e[n]+'"':String(e[n]):s.has(e[n])?r=s.get(e[n]):(r=l,s.set(e[n],l++)),t+="@"+r}return t}(e)):e=String(e||""),[e,t,e?"err@"+e:""]},e.prototype.subscribe=function(e){var t=this;if("function"!=typeof e)throw new Error("Expected the listener to be a function.");var n=!0;return this.__listeners.push(e),function(){if(n){n=!1;var r=t.__listeners.indexOf(e);r>-1&&(t.__listeners[r]=t.__listeners[t.__listeners.length-1],t.__listeners.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.__listeners;e<t.length;e++){(0,t[e])()}},e}()),f={},d={},p={},h={},v={};var y="undefined"!=typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),b={onLoadingSlow:function(){},onSuccess:function(){},onError:function(){},onErrorRetry:function(e,t,n,r,o){if(a()&&!(n.errorRetryCount&&o.retryCount>n.errorRetryCount)){var i=Math.min(o.retryCount||0,8),u=~~((Math.random()+.5)*(1<<i))*n.errorRetryInterval;setTimeout(r,u,o)}},errorRetryInterval:1e3*(y?10:5),focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:1e3*(y?5:3),refreshInterval:0,revalidateOnFocus:!0,revalidateOnReconnect:!0,refreshWhenHidden:!1,refreshWhenOffline:!1,shouldRetryOnError:!0,suspense:!1,compare:i.a},m=!1;if("undefined"!=typeof window&&window.addEventListener&&!m){var g=function(){if(a()&&u())for(var e in p)p[e][0]&&p[e][0]()};window.addEventListener("visibilitychange",g,!1),window.addEventListener("focus",g,!1),m=!0}var w=b;function _(e,t){var n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n||(n=!0,e.apply(void 0,r),setTimeout((function(){return n=!1}),t))}}var C=Object(r.createContext)({});C.displayName="SWRConfigContext";var O=C,k=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},S=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},x="undefined"==typeof window,A=x?r.useEffect:r.useLayoutEffect,M=function(e,t){void 0===t&&(t=!0);var n=c.serializeKey(e),r=n[0],o=n[2];if(!r)return Promise.resolve();var i=h[r];if(r&&i){for(var a=c.get(r),u=c.get(o),s=[],l=0;l<i.length;++l)s.push(i[l](t,a,u,l>0));return Promise.all(s).then((function(){return c.get(r)}))}return Promise.resolve(c.get(r))},j=function(e,t,n){var r=h[e];if(e&&r)for(var o=0;o<r.length;++o)r[o](!1,t,n)},E=function(e,t,n){return void 0===n&&(n=!0),k(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,l,f,p,y;return S(this,(function(b){switch(b.label){case 0:if(!(r=c.serializeKey(e)[0]))return[2];if(void 0===t)return[2,M(e,n)];if(v[r]=Date.now()-1,a=v[r],u=d[r],!t||"function"!=typeof t)return[3,5];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,t(c.get(r))];case 2:return o=b.sent(),[3,4];case 3:return s=b.sent(),i=s,[3,4];case 4:return[3,11];case 5:if(!t||"function"!=typeof t.then)return[3,10];b.label=6;case 6:return b.trys.push([6,8,,9]),[4,t];case 7:return o=b.sent(),[3,9];case 8:return l=b.sent(),i=l,[3,9];case 9:return[3,11];case 10:o=t,b.label=11;case 11:if(a!==v[r]||u!==d[r]){if(i)throw i;return[2,o]}if(void 0!==o&&c.set(r,o,!1),f=h[r]){for(p=[],y=0;y<f.length;++y)p.push(f[y](!!n,o,i,y>0));return[2,Promise.all(p).then((function(){return c.get(r)}))]}if(i)throw i;return[2,o]}}))}))};O.Provider;var P=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o,i,s={};t.length>=1&&(o=t[0]),t.length>2?(i=t[1],s=t[2]):"function"==typeof t[1]?i=t[1]:"object"==typeof t[1]&&(s=t[1]);var l=c.serializeKey(o),y=l[0],b=l[1],m=l[2];s=Object.assign({},w,Object(r.useContext)(O),s),void 0===i&&(i=s.fetcher);var g=c.get(y)||s.initialData,C=c.get(m),M=Object(r.useRef)({data:!1,error:!1,isValidating:!1}),P=Object(r.useRef)({data:g,error:C,isValidating:!1}),I=Object(r.useState)(null)[1],R=Object(r.useCallback)((function(e){var t=!1;for(var n in e)P.current[n]=e[n],M.current[n]&&(t=!0);(t||s.suspense)&&I({})}),[]),T=Object(r.useRef)(!1),L=Object(r.useRef)(y),F=Object(r.useRef)({emit:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];T.current||s[e].apply(s,t)}}),z=Object(r.useCallback)((function(e,t){return E(y,e,t)}),[y]),N=Object(r.useCallback)((function(t){return void 0===t&&(t={}),k(e,void 0,void 0,(function(){var e,n,r,o,a,u,l;return S(this,(function(p){switch(p.label){case 0:if(!y||!i)return[2,!1];if(T.current)return[2,!1];t=Object.assign({dedupe:!1},t),e=!0,n=void 0!==f[y]&&t.dedupe,p.label=1;case 1:return p.trys.push([1,6,,7]),R({isValidating:!0}),r=void 0,o=void 0,n?(o=d[y],[4,f[y]]):[3,3];case 2:return r=p.sent(),[3,5];case 3:return f[y]&&(v[y]=Date.now()-1),s.loadingTimeout&&!c.get(y)&&setTimeout((function(){e&&F.current.emit("onLoadingSlow",y,s)}),s.loadingTimeout),f[y]=null!==b?i.apply(void 0,b):i(y),d[y]=o=Date.now(),[4,f[y]];case 4:r=p.sent(),setTimeout((function(){delete f[y],delete d[y]}),s.dedupingInterval),F.current.emit("onSuccess",r,y,s),p.label=5;case 5:return v[y]&&o<=v[y]?(R({isValidating:!1}),[2,!1]):(c.set(y,r,!1),c.set(m,void 0,!1),a={isValidating:!1},void 0!==P.current.error&&(a.error=void 0),s.compare(P.current.data,r)||(a.data=r),R(a),n||j(y,r,void 0),[3,7]);case 6:return u=p.sent(),delete f[y],delete d[y],c.set(m,u,!1),P.current.error!==u&&(R({isValidating:!1,error:u}),n||j(y,void 0,u)),F.current.emit("onError",u,y,s),s.shouldRetryOnError&&(l=(t.retryCount||0)+1,F.current.emit("onErrorRetry",u,y,s,N,Object.assign({dedupe:!0},t,{retryCount:l}))),[3,7];case 7:return e=!1,[2,!0]}}))}))}),[y]);if(A((function(){if(y){T.current=!1;var e=P.current.data,t=c.get(y)||s.initialData;L.current===y&&s.compare(e,t)||(R({data:t}),L.current=y);var n,r=function(){return N({dedupe:!0})};(s.revalidateOnMount||!s.initialData&&void 0===s.revalidateOnMount)&&(void 0!==t&&!x&&window.requestIdleCallback?window.requestIdleCallback(r):r()),s.revalidateOnFocus&&(n=_(r,s.focusThrottleInterval),p[y]?p[y].push(n):p[y]=[n]);var o=function(e,t,n,o){void 0===e&&(e=!0),void 0===o&&(o=!0);var i={},a=!1;return void 0===t||s.compare(P.current.data,t)||(i.data=t,a=!0),P.current.error!==n&&(i.error=n,a=!0),a&&R(i),!!e&&(o?r():N())};h[y]?h[y].push(o):h[y]=[o];var i=null;return!x&&window.addEventListener&&s.revalidateOnReconnect&&window.addEventListener("online",i=r),function(){var e,t;(R=function(){return null},T.current=!0,n&&p[y])&&((t=(e=p[y]).indexOf(n))>=0&&(e[t]=e[e.length-1],e.pop()));h[y]&&((t=(e=h[y]).indexOf(o))>=0&&(e[t]=e[e.length-1],e.pop()));!x&&window.removeEventListener&&null!==i&&window.removeEventListener("online",i)}}}),[y,N]),A((function(){var t=null,n=function(){return k(e,void 0,void 0,(function(){return S(this,(function(e){switch(e.label){case 0:return P.current.error||!s.refreshWhenHidden&&!a()||!s.refreshWhenOffline&&!u()?[3,2]:[4,N({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return s.refreshInterval&&(t=setTimeout(n,s.refreshInterval)),[2]}}))}))};return s.refreshInterval&&(t=setTimeout(n,s.refreshInterval)),function(){t&&clearTimeout(t)}}),[s.refreshInterval,s.refreshWhenHidden,s.refreshWhenOffline,N]),s.suspense){var D=c.get(y)||g,H=c.get(m)||C;if(void 0===D&&void 0===H){if(f[y]||N(),f[y]&&"function"==typeof f[y].then)throw f[y];D=f[y]}if(void 0===D&&H)throw H;return{error:H,data:D,revalidate:N,mutate:z,isValidating:P.current.isValidating}}return Object(r.useMemo)((function(){var e={revalidate:N,mutate:z};return Object.defineProperties(e,{error:{get:function(){return M.current.error=!0,L.current===y?P.current.error:C},enumerable:!0},data:{get:function(){return M.current.data=!0,L.current===y?P.current.data:g},enumerable:!0},isValidating:{get:function(){return M.current.isValidating=!0,P.current.isValidating},enumerable:!0}}),e}),[N])};new Map;t.a=P},function(e,t,n){"use strict";var r=n(61);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){t.__esModule=!0,t.default={body:'<path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z" fill="currentColor"/>',width:24,height:24}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,f=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=u(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";
14
+ /** @license React v16.13.1
15
+ * react-is.production.min.js
16
+ *
17
+ * Copyright (c) Facebook, Inc. and its affiliates.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case s:case u:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case b:case y:case l:return e;default:return t}}case i:return t}}}function O(e){return C(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=b,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||C(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return C(e)===p},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===b},t.isMemo=function(e){return C(e)===y},t.isPortal=function(e){return C(e)===i},t.isProfiler=function(e){return C(e)===s},t.isStrictMode=function(e){return C(e)===u},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===u||e===h||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===y||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===_||e.$$typeof===m)},t.typeOf=C},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function i(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function u(e,t,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new a(n,r||e,i),s=o?o+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],u]:e._events[s].push(u):(e._events[s]=u,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,a=new Array(i);r<i;r++)a[r]=n[r].fn;return a},l.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,r,i,a){var u=o?o+e:e;if(!this._events[u])return!1;var s,l,c=this._events[u],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,a),!0}for(l=1,s=new Array(f-1);l<f;l++)s[l-1]=arguments[l];c.fn.apply(c.context,s)}else{var d,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,r);break;default:if(!s)for(d=1,s=new Array(f-1);d<f;d++)s[d-1]=arguments[d];c[l].fn.apply(c[l].context,s)}}return!0},l.prototype.on=function(e,t,n){return u(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return u(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,r){var i=o?o+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||s(this,i);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[i]=1===l.length?l[0]:l:s(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=o,l.EventEmitter=l,e.exports=l},function(e,t,n){"use strict";function r(e){return(r="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 o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e){var t="function"==typeof Map?new Map:void 0;return(i=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function a(e,t,n){return(a=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o}).apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=n(67),f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(i,e);var t,n,r=(t=i,n=u(),function(){var e,r=l(t);if(n){var i=l(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return o(this,e)});function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this,e)).name="TimeoutError",t}return i}(i(Error)),d=function(e,t,n){return new Promise((function(r,o){if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(t!==1/0){var i=setTimeout((function(){if("function"!=typeof n){var i="string"==typeof n?n:"Promise timed out after ".concat(t," milliseconds"),a=n instanceof Error?n:new f(i);"function"==typeof e.cancel&&e.cancel(),o(a)}else try{r(n())}catch(e){o(e)}}),t);c(e.then(r,o),(function(){clearTimeout(i)}))}else r(e)}))};e.exports=d,e.exports.default=d,e.exports.TimeoutError=f},function(e,t,n){"use strict";e.exports=function(e,t){return t=t||function(){},e.then((function(e){return new Promise((function(e){e(t())})).then((function(){return e}))}),(function(e){return new Promise((function(e){e(t())})).then((function(){throw e}))}))}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}var t,n,i;return t=e,(n=[{key:"enqueue",value:function(e,t){var n={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)this._queue.push(n);else{var r=o.default(this._queue,n,(function(e,t){return t.priority-e.priority}));this._queue.splice(r,0,n)}}},{key:"dequeue",value:function(){var e=this._queue.shift();return null==e?void 0:e.run}},{key:"filter",value:function(e){return this._queue.filter((function(t){return t.priority===e.priority})).map((function(e){return e.run}))}},{key:"size",get:function(){return this._queue.length}}])&&r(t.prototype,n),i&&r(t,i),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r=0,o=e.length;o>0;){var i=o/2|0,a=r+i;n(e[a],t)<=0?(r=++a,o-=i+1):o=i}return r}},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),u=v(a),s=v(n(19)),l=v(n(1)),c=v(n(71)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(25)),d=n(18),p=v(d),h=n(78);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==r(t)&&"function"!=typeof t?e:t}var m=t.portalClassName="ReactModalPortal",g=t.bodyOpenClassName="ReactModal__Body--open",w=void 0!==s.default.createPortal,_=function(){return w?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function C(e){return e()}var O=function(e){function t(){var e,n,r;y(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=b(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.removePortal=function(){!w&&s.default.unmountComponentAtNode(r.node);var e=C(r.props.parentSelector);e?e.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(e){r.portal=e},r.renderPortal=function(e){var n=_()(r,u.default.createElement(c.default,o({defaultStyles:t.defaultStyles},e)),r.node);r.portalRef(n)},b(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(w||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName,C(this.props.parentSelector).appendChild(this.node),!w&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:C(e.parentSelector),nextParent:C(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,o=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,u=n.nextParent;u!==a&&(a.removeChild(this.node),u.appendChild(this.node)),(e.isOpen||o)&&!w&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&w?(!this.node&&w&&(this.node=document.createElement("div")),_()(u.default.createElement(c.default,o({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){f.setElement(e)}}]),t}(a.Component);O.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.instanceOf(p.default),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func},O.defaultProps={isOpen:!1,portalClassName:m,bodyOpenClassName:g,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,parentSelector:function(){return document.body}},O.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,h.polyfill)(O),t.default=O},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=b(u),l=b(n(1)),c=y(n(72)),f=b(n(73)),d=y(n(25)),p=y(n(76)),h=b(n(18)),v=b(n(27));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}n(77);var m={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},g=0,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==r(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&p.remove(document.body,i),o&&p.remove(document.getElementsByTagName("html")[0],o),r&&g>0&&0===(g-=1)&&d.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(c.returnFocus(),c.teardownScopedFocus()):c.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),v.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(c.setupScopedFocus(n.node),c.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,f.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:m[e],afterOpen:m[e]+"--after-open",beforeClose:m[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,d.hide(t)),v.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,a=n?{}:i.content,u=r?{}:i.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(u.Component);w.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},w.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.instanceOf(h.default),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,testId:l.default.string},t.default=w,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==a.length&&(e=a.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){u=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){u=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var r,o=n(24),i=(r=o)&&r.__esModule?r:{default:r};var a=[],u=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!u)return;setTimeout((function(){u.contains(document.activeElement)||((0,i.default)(u)[0]||u).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,a=n[0],u=n[n.length-1];if(e===document.activeElement){if(!o)return;r=u}u!==document.activeElement||o||(r=a);a===document.activeElement&&o&&(r=u);if(r)return t.preventDefault(),void r.focus();var s=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==s||"Chrome"==s[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var l=n.indexOf(document.activeElement);l>-1&&(l+=o?-1:1);if(void 0===(r=n[l]))return t.preventDefault(),void(r=o?u:a).focus();t.preventDefault(),r.focus()};var r,o=n(24),i=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r;function o(e){return(o="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)}
22
+ /*!
23
+ Copyright (c) 2015 Jed Watson.
24
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
25
+ All rights reserved.
26
+ */!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};"object"===o(n(26))&&n(26)?void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r):e.exports?e.exports=a:window.ExecutionEnvironment=a}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},o={};t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";var r,o=n(27),i=(r=o)&&r.__esModule?r:{default:r};var a=void 0,u=void 0,s=[];function l(){0!==s.length&&s[s.length-1].focusContent()}i.default.subscribe((function(e,t){a&&u||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",l),(u=a.cloneNode()).addEventListener("focus",l)),(s=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==u&&document.body.appendChild(u)):(a.parentElement&&a.parentElement.removeChild(a),u.parentElement&&u.parentElement.removeChild(u))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0}]]);
27
+ //# sourceMappingURL=vendor.js.map
app/vendor.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///../neko-ui/node_modules/prop-types/index.js","webpack:///./node_modules/styled-components/dist/styled-components.browser.esm.js","webpack:///../neko-ui/node_modules/@iconify/react/dist/icon.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/construct.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack:///../neko-ui/node_modules/polished/dist/polished.esm.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-down.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-right.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-up.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-double-left.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-double-right.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-left.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/pause.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/play.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/stop.js","webpack:///./node_modules/react-is/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-blank-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-marked.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/folder.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/safeHTMLElement.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///../neko-ui/node_modules/p-queue/dist/index.js","webpack:///../neko-ui/node_modules/swr/esm/libs/is-document-visible.js","webpack:///../neko-ui/node_modules/swr/esm/libs/is-online.js","webpack:///../neko-ui/node_modules/swr/esm/libs/hash.js","webpack:///../neko-ui/node_modules/swr/esm/cache.js","webpack:///../neko-ui/node_modules/swr/esm/config.js","webpack:///../neko-ui/node_modules/swr/esm/swr-config-context.js","webpack:///../neko-ui/node_modules/swr/esm/use-swr.js","webpack:///../neko-ui/node_modules/swr/esm/use-swr-pages.js","webpack:///./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack:///./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/tabbable.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/ariaAppHider.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/portalOpenInstances.js","webpack:///./node_modules/fast-deep-equal/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lock-check.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lock-open-variant.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/file-undo.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/replay.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/check.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/delete.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/undo.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/alert-circle.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/database.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/tools.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/cog.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/close.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/cat.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/upload.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/trash-can.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lead-pencil.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/view-dashboard.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/database-search.js","webpack:///./node_modules/shallowequal/index.js","webpack:///./node_modules/@emotion/stylis/dist/stylis.browser.esm.js","webpack:///./node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-blank-circle-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/record-circle.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/folder-open.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/image-multiple-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/tag.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/content-save.js","webpack:///../neko-ui/node_modules/react-modal/lib/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-multiple-marked.js","webpack:///../neko-ui/node_modules/fast-deep-equal/index.js","webpack:///./node_modules/swr/esm/libs/is-document-visible.js","webpack:///./node_modules/swr/esm/libs/is-online.js","webpack:///./node_modules/swr/esm/libs/hash.js","webpack:///./node_modules/swr/esm/cache.js","webpack:///./node_modules/swr/esm/config.js","webpack:///./node_modules/swr/esm/libs/throttle.js","webpack:///./node_modules/swr/esm/swr-config-context.js","webpack:///./node_modules/swr/esm/use-swr.js","webpack:///./node_modules/swr/esm/use-swr-pages.js","webpack:///./node_modules/swr/esm/index.js","webpack:///../neko-ui/node_modules/prop-types/factoryWithThrowingShims.js","webpack:///../neko-ui/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/pencil.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///../neko-ui/node_modules/eventemitter3/index.js","webpack:///../neko-ui/node_modules/p-timeout/index.js","webpack:///../neko-ui/node_modules/p-finally/index.js","webpack:///../neko-ui/node_modules/p-queue/dist/priority-queue.js","webpack:///../neko-ui/node_modules/p-queue/dist/lower-bound.js","webpack:///../neko-ui/node_modules/react-modal/lib/components/Modal.js","webpack:///../neko-ui/node_modules/react-modal/lib/components/ModalPortal.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/focusManager.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/scopeTab.js","webpack:///../neko-ui/node_modules/warning/warning.js","webpack:///../neko-ui/node_modules/exenv/index.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/classList.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/bodyTrap.js","webpack:///../neko-ui/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"],"names":["module","exports","require","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","interleave","strings","interpolations","result","len","push","isPlainObject","x","toString","EMPTY_ARRAY","freeze","EMPTY_OBJECT","isFunction","test","getComponentName","displayName","name","isStyledComponent","styledComponentId","SC_ATTR","process","env","REACT_APP_SC_ATTR","IS_BROWSER","window","DISABLE_SPEEDY","SC_DISABLE_SPEEDY","REACT_APP_SC_DISABLE_SPEEDY","getNonce","throwStyledComponentsError","code","_len","Array","_key","Error","join","makeStyleTag","head","document","parent","style","createElement","prevStyle","childNodes","child","nodeType","hasAttribute","findLastStyleTag","nextSibling","undefined","setAttribute","nonce","insertBefore","CSSOMTag","element","appendChild","createTextNode","sheet","tag","styleSheets","l","ownerNode","getSheet","_proto","insertRule","index","rule","_error","deleteRule","getRule","cssRules","cssText","TextTag","nodes","_proto2","node","refNode","removeChild","textContent","VirtualTag","_target","rules","_proto3","splice","DefaultGroupedTag","groupSizes","Uint32Array","indexOfGroup","group","insertRules","oldBuffer","oldSize","newSize","set","ruleIndex","_i","clearGroup","startIndex","endIndex","getGroup","css","groupIDRegister","Map","reverseRegister","nextFreeGroup","getGroupForId","id","has","get","getIdForGroup","setGroupForId","SELECTOR","MARKER_RE","RegExp","rehydrateNamesFromContent","content","names","split","registerName","rehydrateSheetFromTag","parts","innerHTML","part","trim","marker","match","parseInt","getTag","SHOULD_REHYDRATE","defaultOptions","isServer","useCSSOMInjection","StyleSheet","options","globalStyles","gs","querySelectorAll","getAttribute","parentNode","rehydrateSheet","registerId","reconstructWithOptions","allocateGSInstance","_ref","hasNameForId","add","groupNames","Set","clearNames","clear","clearRules","clearTag","selector","forEach","outputSheet","phash","h","charCodeAt","hash","COMMENT_REGEX","createStylisInstance","_temp","_componentId","_selector","_selectorRegexp","_ref$options","_ref$plugins","plugins","stylis","parsingRules","parseRulesPlugin","toSheet","block","e","context","selectors","parents","line","column","ns","depth","at","delimiter","insertRulePlugin","selfReferenceReplacer","offset","string","slice","indexOf","stringifyRules","prefix","componentId","flatCSS","replace","cssStr","use","concat","_","lastIndexOf","parsedRules","reduce","acc","plugin","StyleSheetContext","createContext","StylisContext","Consumer","masterSheet","masterStylis","useStyleSheet","useStylis","Keyframes","stringifyArgs","_this","inject","styleSheet","String","getName","uppercasePattern","msPattern","hyphenateStyleName","toLowerCase","isFalsish","chunk","objToCssArray","obj","prevKey","keys","value","flatten","executionContext","isArray","ruleSet","isReactComponent","styles","isObject","val","isValidKey","mixin","mixinDeep","rest","_rest","AD_REPLACER_R","getAlphabeticChar","fromCharCode","generateAlphabeticName","Math","abs","isStaticRules","ComponentStyle","staticRulesId","isStatic","baseHash","generateAndInjectStyles","cssStatic","cssStaticFormatted","dynamicHash","partRule","partChunk","partString","_name","cssFormatted","determineTheme","props","providedTheme","defaultProps","theme","escapeRegex","dashesAtEnds","escape","str","isTag","generateComponentId","ThemeContext","identifiers","useStyledComponentImpl","forwardedComponent","forwardedRef","componentAttrs","attrs","componentStyle","foldedComponentIds","shouldForwardProp","_useResolvedAttrs","resolvedAttrs","attrDef","a","b","resolvedAttrDef","useResolvedAttrs","generatedClassName","hasAttrs","warnTooManyClasses","className","useInjectedStyle","refToForward","elementToBeCreated","$as","as","isTargetTag","computedProps","propFilterFn","propsForElement","filter","Boolean","ref","createStyledComponent","isTargetStyledComp","isCompositeComponent","_options$displayName","generateDisplayName","_options$componentId","parentComponentId","generateId","_options$attrs","finalAttrs","prop","filterFn","WrappedStyledComponent","forwardRef","withComponent","previousComponentId","optionsToCopy","excluded","sourceKeys","_objectWithoutPropertiesLoose","newComponentId","defineProperty","_foldedDefaultProps","self","styled","constructWithOptions","componentConstructor","templateFunction","withConfig","config","domElement","InlineIcon","Icon","_react","__esModule","_typeof","Symbol","iterator","constructor","_defineProperties","descriptor","enumerable","configurable","writable","idCounter","unitsSplit","unitsTest","iconAttributes","defaultAttributes","left","top","width","height","rotate","hFlip","vFlip","SVG","icon","instance","Constructor","TypeError","_classCallCheck","_item","protoProps","staticProps","create","size","ratio","precision","ceil","num","results","shift","isNumber","parseFloat","isNaN","body","regex","ids","strReplace","search","subject","pos","exec","Date","now","random","newID","item","align","horizontal","vertical","transform","attributes","inline","box","inlineTop","inlineHeight","flip","units","round","tempValue","transformations","unshift","customWidth","customHeight","calculateDimension","verticalAlign","preserveAspectRatio","getAlignment","viewBox","replaceIDs","color","addExtra","splitAttributes","data","getAttributes","svg","attr","component","iconProps","customAttributes","iconData","normalize","xmlns","focusable","dangerouslySetInnerHTML","__html","_default","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_setPrototypeOf","p","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","_construct","Parent","args","Class","isNativeReflectConstruct","Function","bind","_wrapNativeSuper","_cache","fn","Wrapper","PolishedError","_Error","subClass","superClass","ReferenceError","_assertThisInitialized","colorToInt","convertToInt","red","green","blue","hslToRgb","hue","saturation","lightness","convert","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColor","normalizedColorName","nameToHex","alpha","toFixed","_alpha","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","parseToHsl","max","min","delta","rgbToHsl","reduceHexValue","numberToHex","hex","colorToHex","convertToHex","hslToHex","hsl","hsla","rgb","rgba","firstValue","secondValue","thirdValue","fourthValue","rgbValue","toColorString","isRgba","isRgb","isHsla","isHsl","curry","f","curried","combined","guard","lowerBoundary","upperBoundary","lighten","amount","hslColor","curriedLighten","canUseDOM","_exenv","EE","default","SafeHTMLElement","HTMLElement","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","isMemo","ForwardRef","render","Memo","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","EventEmitter","p_timeout_1","priority_queue_1","empty","timeoutError","TimeoutError","PQueue","_a","_b","_c","_d","carryoverConcurrencyCount","intervalCap","Infinity","interval","concurrency","autoStart","queueClass","Number","isFinite","_carryoverConcurrencyCount","_isIntervalIgnored","_intervalCap","_interval","_queue","_queueClass","_timeout","timeout","_throwOnTimeout","throwOnTimeout","_isPaused","_pendingCount","_tryToStartAnother","_resolveEmpty","_resolveIdle","emit","_onInterval","_initializeIntervalIfNeeded","_timeoutId","_intervalId","delay","_intervalEnd","setTimeout","_onResumeInterval","_intervalCount","clearInterval","_resolvePromises","canInitializeInterval","_isIntervalPaused","_doesIntervalAllowAnother","_doesConcurrentAllowAnother","dequeue","setInterval","_processQueue","Promise","resolve","reject","run","operation","_next","enqueue","functions","all","map","function_","existingResolve","_concurrency","newConcurrency","milliseconds","isDocumentVisible","visibilityState","isOnline","navigator","onLine","table","WeakMap","counter","cache","Cache","initialData","__cache","entries","__listeners","serializeKey","shouldNotify","mutate","notify","from","err","_hash","subscribe","listener","isSubscribed","CONCURRENT_PROMISES_TS","FOCUS_REVALIDATORS","CACHE_REVALIDATORS","MUTATION_TS","slowConnection","effectiveType","eventsBinded","deepEqual","addEventListener","revalidate","SWRConfigContext","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","then","__generator","y","t","g","label","sent","trys","ops","verb","n","v","op","pop","IS_SERVER","trigger","useEffect","useLayoutEffect","shouldRevalidate","keyErr","updaters","currentData","currentError","promises","_data","error","beforeMutationTs","beforeConcurrentPromisesTs","err_1","err_2","Provider","reactPropsRegex","arg","tabbable","tabbableNode","hidesContents","zeroSize","offsetWidth","offsetHeight","getComputedStyle","getPropertyValue","scrollWidth","scrollHeight","isTabIndexNotNaN","nodeName","disabled","href","parentElement","visible","tabIndex","isTabIndexNaN","assertNodeList","setElement","useElement","_safeHTMLElement","el","globalElement","validateElement","hide","appElement","show","removeAttribute","documentNotReadyOrSSRTesting","resetForTesting","_warning","_warning2","nodeList","__webpack_amd_options__","portalOpenInstances","PortalOpenInstances","register","openInstance","openInstances","deregister","callback","subscribers","eventType","subscriber","keyList","hasProp","equal","arrA","arrB","dateA","dateB","getTime","regexpA","regexpB","objA","objB","compareContext","ret","keysA","keysB","bHasOwnProperty","idx","valueA","valueB","W","X","d","c","ia","m","Z","F","substring","w","L","ja","ka","aa","G","ba","la","ma","R","na","ea","oa","H","q","A","S","B","U","D","z","M","k","C","K","u","r","I","J","N","charAt","ca","O","da","fa","Y","E","ha","Q","T","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","_Modal","_Modal2","delete","CONCURRENT_PROMISES","defaultConfig","onLoadingSlow","onSuccess","onError","onErrorRetry","__","opts","errorRetryCount","retryCount","count","errorRetryInterval","focusThrottleInterval","dedupingInterval","loadingTimeout","refreshInterval","revalidateOnFocus","revalidateOnReconnect","refreshWhenHidden","refreshWhenOffline","shouldRetryOnError","suspense","throttle","pending","useIsomorphicLayoutEffect","broadcastState","fnArgs","fetcher","initialError","stateDependencies","isValidating","stateRef","rerender","dispatch","payload","shouldUpdateState","current","unmountedRef","keyRef","eventsRef","event","params","boundMutate","revalidateOpts","loading","shouldDeduping","newData","startAt","newState","err_3","dedupe","currentHookData","latestKeyedData","onFocus","softRevalidate","revalidateOnMount","onUpdate","updatedData","updatedError","needUpdate","reconnect","revalidators","removeEventListener","timer","tick","clearTimeout","latestData","latestError","state","defineProperties","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","noop","nextTick","title","browser","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","for","$$typeof","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","Events","emitter","evt","_events","_eventsCount","clearEvent","eventNames","events","handlers","ee","listenerCount","a1","a2","a3","a4","a5","j","prefixed","pFinally","message","pTimeout","promise","fallback","cancel","onFinally","lower_bound_1","PriorityQueue","priority","comparator","first","it","bodyOpenClassName","portalClassName","_createClass","_react2","_interopRequireDefault","_reactDom2","_propTypes2","_ModalPortal2","ariaAppHider","newObj","_interopRequireWildcard","_safeHTMLElement2","_reactLifecyclesCompat","_possibleConstructorReturn","isReact16","createPortal","getCreatePortal","unstable_renderSubtreeIntoContainer","getParentElement","parentSelector","Modal","_Component","removePortal","unmountComponentAtNode","console","warn","portalRef","portal","renderPortal","defaultStyles","_inherits","prevProps","prevParent","nextParent","snapshot","_props","isOpen","closesAt","closeTimeoutMS","beforeClose","closeWithTimeout","Component","overlay","htmlOpenClassName","base","afterOpen","overlayClassName","onAfterOpen","onRequestClose","ariaHideApp","shouldFocusAfterRender","shouldCloseOnOverlayClick","shouldReturnFocusAfterClose","aria","role","contentLabel","shouldCloseOnEsc","overlayRef","contentRef","position","right","bottom","backgroundColor","border","background","overflow","WebkitOverflowScrolling","borderRadius","outline","padding","polyfill","focusManager","_scopeTab2","classList","_portalOpenInstances2","CLASS_NAMES","ariaHiddenInstances","ModalPortal","setOverlayRef","setContentRef","afterClose","_this$props","remove","getElementsByTagName","returnFocus","teardownScopedFocus","popWithoutFocus","onAfterClose","open","beforeOpen","closeTimer","setState","setupScopedFocus","markForFocusLater","overlayEl","contentEl","close","closeWithoutTimeout","focusContent","contentHasFocus","focus","handleKeyDown","keyCode","stopPropagation","requestClose","handleOverlayOnClick","shouldClose","ownerHandlesClose","handleContentOnMouseUp","handleOverlayOnMouseDown","preventDefault","handleContentOnClick","handleContentOnMouseDown","shouldBeClosed","activeElement","contains","buildClassName","which","additional","classNames","attributesFromObject","items","moveFromContentToOverlay","prevState","_props2","contentStyles","overlayStyles","onClick","onMouseDown","onKeyDown","onMouseUp","testId","children","handleBlur","handleFocus","focusLaterElements","toFocus","modalElement","attachEvent","detachEvent","_tabbable","_tabbable2","needToFocus","shiftKey","tail","checkSafari","userAgent","warning","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","canUseViewport","screen","define","dumpClassLists","htmlClassList","docBodyClassList","classString","classListRef","poll","incrementReference","decrementReference","_portalOpenInstances","before","after","instances","cloneNode","firstChild","lastChild","componentWillMount","componentWillReceiveProps","nextProps","componentWillUpdate","nextState","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","componentDidUpdate","maybeSnapshot","__suppressDeprecationWarning"],"mappings":"sEAiBEA,EAAOC,QAAUC,EAAQ,GAARA,I,8BCjBnB,yFAQA,SAASC,IAeP,OAdAA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C9B,OAA9BC,EACG,OAASA,EACT,KACqB,OAAxBC,EAA+B,OAASA,EAAsB,IATjE,wIA0BJ,GARkD,mBAAvC3I,EAAU1jB,2BACnB7rB,EAAUw3C,mBAAqBA,EAC/Bx3C,EAAUy3C,0BAA4BA,GAMS,mBAAtCz3C,EAAU+3C,wBAAwC,CAC3D,GAA4C,mBAAjC/3C,EAAUu4C,mBACnB,MAAM,IAAIh2C,MACR,qHAIJvC,EAAU23C,oBAAsBA,EAEhC,IAAIY,EAAqBv4C,EAAUu4C,mBAEnCv4C,EAAUu4C,mBAAqB,SAC7B1J,EACA4F,EACA+D,GAUA,IAAIxJ,EAAW5uC,KAAKy3C,4BAChBz3C,KAAK03C,wBACLU,EAEJD,EAAmBr4C,KAAKE,KAAMyuC,EAAW4F,EAAWzF,IAIxD,OAAOO,EA1JT,gDA6CAiI,EAAmBiB,8BAA+B,EAClDhB,EAA0BgB,8BAA+B,EACzDd,EAAoBc,8BAA+B","file":"vendor.js","sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { typeOf, isElement, isValidElementType } from 'react-is';\nimport React, { useState, useContext, useMemo, useEffect, useRef, createElement, useDebugValue } from 'react';\nimport shallowequal from 'shallowequal';\nimport Stylis from '@emotion/stylis';\nimport unitless from '@emotion/unitless';\nimport validAttr from '@emotion/is-prop-valid';\nimport hoist from 'hoist-non-react-statics';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n// \nvar interleave = (function (strings, interpolations) {\n var result = [strings[0]];\n\n for (var i = 0, len = interpolations.length; i < len; i += 1) {\n result.push(interpolations[i], strings[i + 1]);\n }\n\n return result;\n});\n\n// \nvar isPlainObject = (function (x) {\n return x !== null && typeof x === 'object' && (x.toString ? x.toString() : Object.prototype.toString.call(x)) === '[object Object]' && !typeOf(x);\n});\n\n// \nvar EMPTY_ARRAY = Object.freeze([]);\nvar EMPTY_OBJECT = Object.freeze({});\n\n// \nfunction isFunction(test) {\n return typeof test === 'function';\n}\n\n// \nfunction getComponentName(target) {\n return (process.env.NODE_ENV !== 'production' ? typeof target === 'string' && target : false) || // $FlowFixMe\n target.displayName || // $FlowFixMe\n target.name || 'Component';\n}\n\n// \nfunction isStatelessFunction(test) {\n return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);\n}\n\n// \nfunction isStyledComponent(target) {\n return target && typeof target.styledComponentId === 'string';\n}\n\n// \nvar SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';\nvar SC_ATTR_ACTIVE = 'active';\nvar SC_ATTR_VERSION = 'data-styled-version';\nvar SC_VERSION = \"5.1.1\";\nvar SPLITTER = '/*!sc*/\\n';\nvar IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\nvar DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || process.env.NODE_ENV !== 'production'; // Shared empty execution context when generating static styles\n\nvar STATIC_EXECUTION_CONTEXT = {};\n\n// \n\n/* eslint-disable camelcase, no-undef */\nvar getNonce = function getNonce() {\n return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n};\n\nvar errorMap = {\n \"1\": \"Cannot create styled-component for component: %s.\\n\\n\",\n \"2\": \"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",\n \"3\": \"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",\n \"4\": \"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",\n \"5\": \"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",\n \"6\": \"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",\n \"7\": \"ThemeProvider: Please return an object from your \\\"theme\\\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n\",\n \"8\": \"ThemeProvider: Please make your \\\"theme\\\" prop an object.\\n\\n\",\n \"9\": \"Missing document `<head>`\\n\\n\",\n \"10\": \"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",\n \"11\": \"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",\n \"12\": \"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",\n \"13\": \"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",\n \"14\": \"ThemeProvider: \\\"theme\\\" prop is required.\\n\\n\",\n \"15\": \"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",\n \"16\": \"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",\n \"17\": \"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"\n};\n\n// \nvar ERRORS = process.env.NODE_ENV !== 'production' ? errorMap : {};\n/**\n * super basic version of sprintf\n */\n\nfunction format() {\n var a = arguments.length <= 0 ? undefined : arguments[0];\n var b = [];\n\n for (var c = 1, len = arguments.length; c < len; c += 1) {\n b.push(c < 0 || arguments.length <= c ? undefined : arguments[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n */\n\n\nfunction throwStyledComponentsError(code) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (process.env.NODE_ENV === 'production') {\n throw new Error(\"An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#\" + code + \" for more information.\" + (interpolations.length > 0 ? \" Additional arguments: \" + interpolations.join(', ') : ''));\n } else {\n throw new Error(format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim());\n }\n}\n\n// \nvar ELEMENT_TYPE = 1;\n/* Node.ELEMENT_TYPE */\n\n/** Find last style element if any inside target */\n\nvar findLastStyleTag = function findLastStyleTag(target) {\n var childNodes = target.childNodes;\n\n for (var i = childNodes.length; i >= 0; i--) {\n var child = childNodes[i];\n\n if (child && child.nodeType === ELEMENT_TYPE && child.hasAttribute(SC_ATTR)) {\n return child;\n }\n }\n\n return undefined;\n};\n/** Create a style element inside `target` or <head> after the last */\n\n\nvar makeStyleTag = function makeStyleTag(target) {\n var head = document.head;\n var parent = target || head;\n var style = document.createElement('style');\n var prevStyle = findLastStyleTag(parent);\n var nextSibling = prevStyle !== undefined ? prevStyle.nextSibling : null;\n style.setAttribute(SC_ATTR, SC_ATTR_ACTIVE);\n style.setAttribute(SC_ATTR_VERSION, SC_VERSION);\n var nonce = getNonce();\n if (nonce) style.setAttribute('nonce', nonce);\n parent.insertBefore(style, nextSibling);\n return style;\n};\n/** Get the CSSStyleSheet instance for a given style element */\n\nvar getSheet = function getSheet(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // Avoid Firefox quirk where the style element might not have a sheet property\n\n\n var _document = document,\n styleSheets = _document.styleSheets;\n\n for (var i = 0, l = styleSheets.length; i < l; i++) {\n var sheet = styleSheets[i];\n\n if (sheet.ownerNode === tag) {\n return sheet;\n }\n }\n\n throwStyledComponentsError(17);\n return undefined;\n};\n\n// \n/** Create a CSSStyleSheet-like tag depending on the environment */\n\nvar makeTag = function makeTag(_ref) {\n var isServer = _ref.isServer,\n useCSSOMInjection = _ref.useCSSOMInjection,\n target = _ref.target;\n\n if (isServer) {\n return new VirtualTag(target);\n } else if (useCSSOMInjection) {\n return new CSSOMTag(target);\n } else {\n return new TextTag(target);\n }\n};\nvar CSSOMTag = /*#__PURE__*/function () {\n function CSSOMTag(target) {\n var element = this.element = makeStyleTag(target); // Avoid Edge bug where empty style elements don't create sheets\n\n element.appendChild(document.createTextNode(''));\n this.sheet = getSheet(element);\n this.length = 0;\n }\n\n var _proto = CSSOMTag.prototype;\n\n _proto.insertRule = function insertRule(index, rule) {\n try {\n this.sheet.insertRule(rule, index);\n this.length++;\n return true;\n } catch (_error) {\n return false;\n }\n };\n\n _proto.deleteRule = function deleteRule(index) {\n this.sheet.deleteRule(index);\n this.length--;\n };\n\n _proto.getRule = function getRule(index) {\n var rule = this.sheet.cssRules[index]; // Avoid IE11 quirk where cssText is inaccessible on some invalid rules\n\n if (rule !== undefined && typeof rule.cssText === 'string') {\n return rule.cssText;\n } else {\n return '';\n }\n };\n\n return CSSOMTag;\n}();\n/** A Tag that emulates the CSSStyleSheet API but uses text nodes */\n\nvar TextTag = /*#__PURE__*/function () {\n function TextTag(target) {\n var element = this.element = makeStyleTag(target);\n this.nodes = element.childNodes;\n this.length = 0;\n }\n\n var _proto2 = TextTag.prototype;\n\n _proto2.insertRule = function insertRule(index, rule) {\n if (index <= this.length && index >= 0) {\n var node = document.createTextNode(rule);\n var refNode = this.nodes[index];\n this.element.insertBefore(node, refNode || null);\n this.length++;\n return true;\n } else {\n return false;\n }\n };\n\n _proto2.deleteRule = function deleteRule(index) {\n this.element.removeChild(this.nodes[index]);\n this.length--;\n };\n\n _proto2.getRule = function getRule(index) {\n if (index < this.length) {\n return this.nodes[index].textContent;\n } else {\n return '';\n }\n };\n\n return TextTag;\n}();\n/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */\n\nvar VirtualTag = /*#__PURE__*/function () {\n function VirtualTag(_target) {\n this.rules = [];\n this.length = 0;\n }\n\n var _proto3 = VirtualTag.prototype;\n\n _proto3.insertRule = function insertRule(index, rule) {\n if (index <= this.length) {\n this.rules.splice(index, 0, rule);\n this.length++;\n return true;\n } else {\n return false;\n }\n };\n\n _proto3.deleteRule = function deleteRule(index) {\n this.rules.splice(index, 1);\n this.length--;\n };\n\n _proto3.getRule = function getRule(index) {\n if (index < this.length) {\n return this.rules[index];\n } else {\n return '';\n }\n };\n\n return VirtualTag;\n}();\n\n// \n/** Create a GroupedTag with an underlying Tag implementation */\n\nvar makeGroupedTag = function makeGroupedTag(tag) {\n return new DefaultGroupedTag(tag);\n};\nvar BASE_SIZE = 1 << 9;\n\nvar DefaultGroupedTag = /*#__PURE__*/function () {\n function DefaultGroupedTag(tag) {\n this.groupSizes = new Uint32Array(BASE_SIZE);\n this.length = BASE_SIZE;\n this.tag = tag;\n }\n\n var _proto = DefaultGroupedTag.prototype;\n\n _proto.indexOfGroup = function indexOfGroup(group) {\n var index = 0;\n\n for (var i = 0; i < group; i++) {\n index += this.groupSizes[i];\n }\n\n return index;\n };\n\n _proto.insertRules = function insertRules(group, rules) {\n if (group >= this.groupSizes.length) {\n var oldBuffer = this.groupSizes;\n var oldSize = oldBuffer.length;\n var newSize = oldSize;\n\n while (group >= newSize) {\n newSize <<= 1;\n\n if (newSize < 0) {\n throwStyledComponentsError(16, \"\" + group);\n }\n }\n\n this.groupSizes = new Uint32Array(newSize);\n this.groupSizes.set(oldBuffer);\n this.length = newSize;\n\n for (var i = oldSize; i < newSize; i++) {\n this.groupSizes[i] = 0;\n }\n }\n\n var ruleIndex = this.indexOfGroup(group + 1);\n\n for (var _i = 0, l = rules.length; _i < l; _i++) {\n if (this.tag.insertRule(ruleIndex, rules[_i])) {\n this.groupSizes[group]++;\n ruleIndex++;\n }\n }\n };\n\n _proto.clearGroup = function clearGroup(group) {\n if (group < this.length) {\n var length = this.groupSizes[group];\n var startIndex = this.indexOfGroup(group);\n var endIndex = startIndex + length;\n this.groupSizes[group] = 0;\n\n for (var i = startIndex; i < endIndex; i++) {\n this.tag.deleteRule(startIndex);\n }\n }\n };\n\n _proto.getGroup = function getGroup(group) {\n var css = '';\n\n if (group >= this.length || this.groupSizes[group] === 0) {\n return css;\n }\n\n var length = this.groupSizes[group];\n var startIndex = this.indexOfGroup(group);\n var endIndex = startIndex + length;\n\n for (var i = startIndex; i < endIndex; i++) {\n css += \"\" + this.tag.getRule(i) + SPLITTER;\n }\n\n return css;\n };\n\n return DefaultGroupedTag;\n}();\n\n// \nvar MAX_SMI = 1 << 31 - 1;\nvar groupIDRegister = new Map();\nvar reverseRegister = new Map();\nvar nextFreeGroup = 1;\nvar getGroupForId = function getGroupForId(id) {\n if (groupIDRegister.has(id)) {\n return groupIDRegister.get(id);\n }\n\n var group = nextFreeGroup++;\n\n if (process.env.NODE_ENV !== 'production' && ((group | 0) < 0 || group > MAX_SMI)) {\n throwStyledComponentsError(16, \"\" + group);\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n return group;\n};\nvar getIdForGroup = function getIdForGroup(group) {\n return reverseRegister.get(group);\n};\nvar setGroupForId = function setGroupForId(id, group) {\n if (group >= nextFreeGroup) {\n nextFreeGroup = group + 1;\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n};\n\n// \nvar SELECTOR = \"style[\" + SC_ATTR + \"][\" + SC_ATTR_VERSION + \"=\\\"\" + SC_VERSION + \"\\\"]\";\nvar MARKER_RE = new RegExp(\"^\" + SC_ATTR + \"\\\\.g(\\\\d+)\\\\[id=\\\"([\\\\w\\\\d-]+)\\\"\\\\].*?\\\"([^\\\"]*)\");\nvar outputSheet = function outputSheet(sheet) {\n var tag = sheet.getTag();\n var length = tag.length;\n var css = '';\n\n for (var group = 0; group < length; group++) {\n var id = getIdForGroup(group);\n if (id === undefined) continue;\n var names = sheet.names.get(id);\n var rules = tag.getGroup(group);\n if (names === undefined || rules.length === 0) continue;\n var selector = SC_ATTR + \".g\" + group + \"[id=\\\"\" + id + \"\\\"]\";\n var content = '';\n\n if (names !== undefined) {\n names.forEach(function (name) {\n if (name.length > 0) {\n content += name + \",\";\n }\n });\n } // NOTE: It's easier to collect rules and have the marker\n // after the actual rules to simplify the rehydration\n\n\n css += \"\" + rules + selector + \"{content:\\\"\" + content + \"\\\"}\" + SPLITTER;\n }\n\n return css;\n};\n\nvar rehydrateNamesFromContent = function rehydrateNamesFromContent(sheet, id, content) {\n var names = content.split(',');\n var name;\n\n for (var i = 0, l = names.length; i < l; i++) {\n // eslint-disable-next-line\n if (name = names[i]) {\n sheet.registerName(id, name);\n }\n }\n};\n\nvar rehydrateSheetFromTag = function rehydrateSheetFromTag(sheet, style) {\n var parts = style.innerHTML.split(SPLITTER);\n var rules = [];\n\n for (var i = 0, l = parts.length; i < l; i++) {\n var part = parts[i].trim();\n if (!part) continue;\n var marker = part.match(MARKER_RE);\n\n if (marker) {\n var group = parseInt(marker[1], 10) | 0;\n var id = marker[2];\n\n if (group !== 0) {\n // Rehydrate componentId to group index mapping\n setGroupForId(id, group); // Rehydrate names and rules\n // looks like: data-styled.g11[id=\"idA\"]{content:\"nameA,\"}\n\n rehydrateNamesFromContent(sheet, id, marker[3]);\n sheet.getTag().insertRules(group, rules);\n }\n\n rules.length = 0;\n } else {\n rules.push(part);\n }\n }\n};\n\nvar rehydrateSheet = function rehydrateSheet(sheet) {\n var nodes = document.querySelectorAll(SELECTOR);\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n\n if (node && node.getAttribute(SC_ATTR) !== SC_ATTR_ACTIVE) {\n rehydrateSheetFromTag(sheet, node);\n\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n }\n};\n\nvar SHOULD_REHYDRATE = IS_BROWSER;\nvar defaultOptions = {\n isServer: !IS_BROWSER,\n useCSSOMInjection: !DISABLE_SPEEDY\n};\n/** Contains the main stylesheet logic for stringification and caching */\n\nvar StyleSheet = /*#__PURE__*/function () {\n /** Register a group ID to give it an index */\n StyleSheet.registerId = function registerId(id) {\n return getGroupForId(id);\n };\n\n function StyleSheet(options, globalStyles, names) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n if (globalStyles === void 0) {\n globalStyles = {};\n }\n\n this.options = _extends({}, defaultOptions, {}, options);\n this.gs = globalStyles;\n this.names = new Map(names); // We rehydrate only once and use the sheet that is created first\n\n if (!this.options.isServer && IS_BROWSER && SHOULD_REHYDRATE) {\n SHOULD_REHYDRATE = false;\n rehydrateSheet(this);\n }\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.reconstructWithOptions = function reconstructWithOptions(options) {\n return new StyleSheet(_extends({}, this.options, {}, options), this.gs, this.names);\n };\n\n _proto.allocateGSInstance = function allocateGSInstance(id) {\n return this.gs[id] = (this.gs[id] || 0) + 1;\n }\n /** Lazily initialises a GroupedTag for when it's actually needed */\n ;\n\n _proto.getTag = function getTag() {\n return this.tag || (this.tag = makeGroupedTag(makeTag(this.options)));\n }\n /** Check whether a name is known for caching */\n ;\n\n _proto.hasNameForId = function hasNameForId(id, name) {\n return this.names.has(id) && this.names.get(id).has(name);\n }\n /** Mark a group's name as known for caching */\n ;\n\n _proto.registerName = function registerName(id, name) {\n getGroupForId(id);\n\n if (!this.names.has(id)) {\n var groupNames = new Set();\n groupNames.add(name);\n this.names.set(id, groupNames);\n } else {\n this.names.get(id).add(name);\n }\n }\n /** Insert new rules which also marks the name as known */\n ;\n\n _proto.insertRules = function insertRules(id, name, rules) {\n this.registerName(id, name);\n this.getTag().insertRules(getGroupForId(id), rules);\n }\n /** Clears all cached names for a given group ID */\n ;\n\n _proto.clearNames = function clearNames(id) {\n if (this.names.has(id)) {\n this.names.get(id).clear();\n }\n }\n /** Clears all rules for a given group ID */\n ;\n\n _proto.clearRules = function clearRules(id) {\n this.getTag().clearGroup(getGroupForId(id));\n this.clearNames(id);\n }\n /** Clears the entire tag which deletes all rules but not its names */\n ;\n\n _proto.clearTag = function clearTag() {\n // NOTE: This does not clear the names, since it's only used during SSR\n // so that we can continuously output only new rules\n this.tag = undefined;\n }\n /** Outputs the current sheet as a CSS string with markers for SSR */\n ;\n\n _proto.toString = function toString() {\n return outputSheet(this);\n };\n\n return StyleSheet;\n}();\n\n// \n\n/* eslint-disable */\nvar SEED = 5381; // When we have separate strings it's useful to run a progressive\n// version of djb2 where we pretend that we're still looping over\n// the same string\n\nvar phash = function phash(h, x) {\n var i = x.length;\n\n while (i) {\n h = h * 33 ^ x.charCodeAt(--i);\n }\n\n return h;\n}; // This is a djb2 hashing function\n\nvar hash = function hash(x) {\n return phash(SEED, x);\n};\n\n/**\n * MIT License\n *\n * Copyright (c) 2016 Sultan Tarimo\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/* eslint-disable */\nfunction insertRulePlugin (insertRule) {\n var delimiter = '/*|*/';\n var needle = delimiter + \"}\";\n\n function toSheet(block) {\n if (block) {\n try {\n insertRule(block + \"}\");\n } catch (e) {}\n }\n }\n\n return function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {\n switch (context) {\n // property\n case 1:\n // @import\n if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content + \";\"), '';\n break;\n // selector\n\n case 2:\n if (ns === 0) return content + delimiter;\n break;\n // at-rule\n\n case 3:\n switch (ns) {\n // @font-face, @page\n case 102:\n case 112:\n return insertRule(selectors[0] + content), '';\n\n default:\n return content + (at === 0 ? delimiter : '');\n }\n\n case -2:\n content.split(needle).forEach(toSheet);\n }\n };\n}\n\nvar COMMENT_REGEX = /^\\s*\\/\\/.*$/gm;\nfunction createStylisInstance(_temp) {\n var _ref = _temp === void 0 ? EMPTY_OBJECT : _temp,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? EMPTY_OBJECT : _ref$options,\n _ref$plugins = _ref.plugins,\n plugins = _ref$plugins === void 0 ? EMPTY_ARRAY : _ref$plugins;\n\n var stylis = new Stylis(options); // Wrap `insertRulePlugin to build a list of rules,\n // and then make our own plugin to return the rules. This\n // makes it easier to hook into the existing SSR architecture\n\n var parsingRules = []; // eslint-disable-next-line consistent-return\n\n var returnRulesPlugin = function returnRulesPlugin(context) {\n if (context === -2) {\n var parsedRules = parsingRules;\n parsingRules = [];\n return parsedRules;\n }\n };\n\n var parseRulesPlugin = insertRulePlugin(function (rule) {\n parsingRules.push(rule);\n });\n\n var _componentId;\n\n var _selector;\n\n var _selectorRegexp;\n\n var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {\n if ( // the first self-ref is always untouched\n offset > 0 && // there should be at least two self-refs to do a replacement (.b > .b)\n string.slice(0, offset).indexOf(_selector) !== -1 && // no consecutive self refs (.b.b); that is a precedence boost and treated differently\n string.slice(offset - _selector.length, offset) !== _selector) {\n return \".\" + _componentId;\n }\n\n return match;\n };\n /**\n * When writing a style like\n *\n * & + & {\n * color: red;\n * }\n *\n * The second ampersand should be a reference to the static component class. stylis\n * has no knowledge of static class so we have to intelligently replace the base selector.\n *\n * https://github.com/thysultan/stylis.js#plugins <- more info about the context phase values\n * \"2\" means this plugin is taking effect at the very end after all other processing is complete\n */\n\n\n var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {\n if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {\n // eslint-disable-next-line no-param-reassign\n selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);\n }\n };\n\n stylis.use([].concat(plugins, [selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]));\n\n function stringifyRules(css, selector, prefix, componentId) {\n if (componentId === void 0) {\n componentId = '&';\n }\n\n var flatCSS = css.replace(COMMENT_REGEX, '');\n var cssStr = selector && prefix ? prefix + \" \" + selector + \" { \" + flatCSS + \" }\" : flatCSS; // stylis has no concept of state to be passed to plugins\n // but since JS is single=threaded, we can rely on that to ensure\n // these properties stay in sync with the current stylis run\n\n _componentId = componentId;\n _selector = selector;\n _selectorRegexp = new RegExp(\"\\\\\" + _selector + \"\\\\b\", 'g');\n return stylis(prefix || !selector ? '' : selector, cssStr);\n }\n\n stringifyRules.hash = plugins.length ? plugins.reduce(function (acc, plugin) {\n if (!plugin.name) {\n throwStyledComponentsError(15);\n }\n\n return phash(acc, plugin.name);\n }, SEED).toString() : '';\n return stringifyRules;\n}\n\n// \nvar StyleSheetContext = React.createContext();\nvar StyleSheetConsumer = StyleSheetContext.Consumer;\nvar StylisContext = React.createContext();\nvar StylisConsumer = StylisContext.Consumer;\nvar masterSheet = new StyleSheet();\nvar masterStylis = createStylisInstance();\nfunction useStyleSheet() {\n return useContext(StyleSheetContext) || masterSheet;\n}\nfunction useStylis() {\n return useContext(StylisContext) || masterStylis;\n}\nfunction StyleSheetManager(props) {\n var _useState = useState(props.stylisPlugins),\n plugins = _useState[0],\n setPlugins = _useState[1];\n\n var contextStyleSheet = useStyleSheet();\n var styleSheet = useMemo(function () {\n var sheet = contextStyleSheet;\n\n if (props.sheet) {\n // eslint-disable-next-line prefer-destructuring\n sheet = props.sheet;\n } else if (props.target) {\n sheet = sheet.reconstructWithOptions({\n target: props.target\n });\n }\n\n if (props.disableCSSOMInjection) {\n sheet = sheet.reconstructWithOptions({\n useCSSOMInjection: false\n });\n }\n\n return sheet;\n }, [props.disableCSSOMInjection, props.sheet, props.target]);\n var stylis = useMemo(function () {\n return createStylisInstance({\n options: {\n prefix: !props.disableVendorPrefixes\n },\n plugins: plugins\n });\n }, [props.disableVendorPrefixes, plugins]);\n useEffect(function () {\n if (!shallowequal(plugins, props.stylisPlugins)) setPlugins(props.stylisPlugins);\n }, [props.stylisPlugins]);\n return /*#__PURE__*/React.createElement(StyleSheetContext.Provider, {\n value: styleSheet\n }, /*#__PURE__*/React.createElement(StylisContext.Provider, {\n value: stylis\n }, process.env.NODE_ENV !== 'production' ? React.Children.only(props.children) : props.children));\n}\n\n// \n\nvar Keyframes = /*#__PURE__*/function () {\n function Keyframes(name, stringifyArgs) {\n var _this = this;\n\n this.inject = function (styleSheet) {\n if (!styleSheet.hasNameForId(_this.id, _this.name)) {\n styleSheet.insertRules(_this.id, _this.name, masterStylis.apply(void 0, _this.stringifyArgs));\n }\n };\n\n this.toString = function () {\n return throwStyledComponentsError(12, String(_this.name));\n };\n\n this.name = name;\n this.id = \"sc-keyframes-\" + name;\n this.stringifyArgs = stringifyArgs;\n }\n\n var _proto = Keyframes.prototype;\n\n _proto.getName = function getName() {\n return this.name;\n };\n\n return Keyframes;\n}();\n\n// \n\n/**\n * inlined version of\n * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js\n */\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction hyphenateStyleName(string) {\n return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\n// \n\nfunction addUnitIfNeeded(name, value) {\n // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133\n // $FlowFixMe\n if (value == null || typeof value === 'boolean' || value === '') {\n return '';\n }\n\n if (typeof value === 'number' && value !== 0 && !(name in unitless)) {\n return value + \"px\"; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return String(value).trim();\n}\n\n// \n/**\n * It's falsish not falsy because 0 is allowed.\n */\n\nvar isFalsish = function isFalsish(chunk) {\n return chunk === undefined || chunk === null || chunk === false || chunk === '';\n};\n\nvar objToCssArray = function objToCssArray(obj, prevKey) {\n var rules = [];\n var keys = Object.keys(obj);\n keys.forEach(function (key) {\n if (!isFalsish(obj[key])) {\n if (isPlainObject(obj[key])) {\n rules.push.apply(rules, objToCssArray(obj[key], key));\n return rules;\n } else if (isFunction(obj[key])) {\n rules.push(hyphenateStyleName(key) + \":\", obj[key], ';');\n return rules;\n }\n\n rules.push(hyphenateStyleName(key) + \": \" + addUnitIfNeeded(key, obj[key]) + \";\");\n }\n\n return rules;\n });\n return prevKey ? [prevKey + \" {\"].concat(rules, ['}']) : rules;\n};\nfunction flatten(chunk, executionContext, styleSheet) {\n if (Array.isArray(chunk)) {\n var ruleSet = [];\n\n for (var i = 0, len = chunk.length, result; i < len; i += 1) {\n result = flatten(chunk[i], executionContext, styleSheet);\n if (result === '') continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);\n }\n\n return ruleSet;\n }\n\n if (isFalsish(chunk)) {\n return '';\n }\n /* Handle other components */\n\n\n if (isStyledComponent(chunk)) {\n return \".\" + chunk.styledComponentId;\n }\n /* Either execute or defer the function */\n\n\n if (isFunction(chunk)) {\n if (isStatelessFunction(chunk) && executionContext) {\n var _result = chunk(executionContext);\n\n if (process.env.NODE_ENV !== 'production' && isElement(_result)) {\n // eslint-disable-next-line no-console\n console.warn(getComponentName(chunk) + \" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\");\n }\n\n return flatten(_result, executionContext, styleSheet);\n } else return chunk;\n }\n\n if (chunk instanceof Keyframes) {\n if (styleSheet) {\n chunk.inject(styleSheet);\n return chunk.getName();\n } else return chunk;\n }\n /* Handle objects */\n\n\n return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();\n}\n\n// \nfunction css(styles) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (isFunction(styles) || isPlainObject(styles)) {\n // $FlowFixMe\n return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));\n }\n\n if (interpolations.length === 0 && styles.length === 1 && typeof styles[0] === \"string\") {\n // $FlowFixMe\n return styles;\n } // $FlowFixMe\n\n\n return flatten(interleave(styles, interpolations));\n}\n\nfunction constructWithOptions(componentConstructor, tag, options) {\n if (options === void 0) {\n options = EMPTY_OBJECT;\n }\n\n if (!isValidElementType(tag)) {\n return throwStyledComponentsError(1, String(tag));\n }\n /* This is callable directly as a template function */\n // $FlowFixMe: Not typed to avoid destructuring arguments\n\n\n var templateFunction = function templateFunction() {\n return componentConstructor(tag, options, css.apply(void 0, arguments));\n };\n /* If config methods are called, wrap up a new template function and merge options */\n\n\n templateFunction.withConfig = function (config) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {}, config));\n };\n /* Modify/inject new props at runtime */\n\n\n templateFunction.attrs = function (attrs) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {\n attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)\n }));\n };\n\n return templateFunction;\n}\n\n/* eslint-disable */\n\n/**\n mixin-deep; https://github.com/jonschlinkert/mixin-deep\n Inlined such that it will be consistently transpiled to an IE-compatible syntax.\n\n The MIT License (MIT)\n\n Copyright (c) 2014-present, Jon Schlinkert.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\nvar isObject = function isObject(val) {\n return typeof val === 'function' || typeof val === 'object' && val !== null && !Array.isArray(val);\n};\n\nvar isValidKey = function isValidKey(key) {\n return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';\n};\n\nfunction mixin(target, val, key) {\n var obj = target[key];\n\n if (isObject(val) && isObject(obj)) {\n mixinDeep(obj, val);\n } else {\n target[key] = val;\n }\n}\n\nfunction mixinDeep(target) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n for (var _i = 0, _rest = rest; _i < _rest.length; _i++) {\n var obj = _rest[_i];\n\n if (isObject(obj)) {\n for (var key in obj) {\n if (isValidKey(key)) {\n mixin(target, obj[key], key);\n }\n }\n }\n }\n\n return target;\n}\n\n// \n\n/* eslint-disable no-bitwise */\nvar AD_REPLACER_R = /(a)(d)/gi;\n/* This is the \"capacity\" of our alphabet i.e. 2x26 for all letters plus their capitalised\n * counterparts */\n\nvar charsLength = 52;\n/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */\n\nvar getAlphabeticChar = function getAlphabeticChar(code) {\n return String.fromCharCode(code + (code > 25 ? 39 : 97));\n};\n/* input a number, usually a hash and convert it to base-52 */\n\n\nfunction generateAlphabeticName(code) {\n var name = '';\n var x;\n /* get a char and divide by alphabet-length */\n\n for (x = Math.abs(code); x > charsLength; x = x / charsLength | 0) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return (getAlphabeticChar(x % charsLength) + name).replace(AD_REPLACER_R, '$1-$2');\n}\n\n// \nfunction isStaticRules(rules) {\n for (var i = 0; i < rules.length; i += 1) {\n var rule = rules[i];\n\n if (isFunction(rule) && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled component\n return false;\n }\n }\n\n return true;\n}\n\n// \n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\n\nvar ComponentStyle = /*#__PURE__*/function () {\n function ComponentStyle(rules, componentId) {\n this.rules = rules;\n this.staticRulesId = '';\n this.isStatic = process.env.NODE_ENV === 'production' && isStaticRules(rules);\n this.componentId = componentId;\n this.baseHash = hash(componentId); // NOTE: This registers the componentId, which ensures a consistent order\n // for this component's styles compared to others\n\n StyleSheet.registerId(componentId);\n }\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n\n\n var _proto = ComponentStyle.prototype;\n\n _proto.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet, stylis) {\n var componentId = this.componentId; // force dynamic classnames if user-supplied stylis plugins are in use\n\n if (this.isStatic && !stylis.hash) {\n if (this.staticRulesId && styleSheet.hasNameForId(componentId, this.staticRulesId)) {\n return this.staticRulesId;\n }\n\n var cssStatic = flatten(this.rules, executionContext, styleSheet).join('');\n var name = generateAlphabeticName(phash(this.baseHash, cssStatic.length) >>> 0);\n\n if (!styleSheet.hasNameForId(componentId, name)) {\n var cssStaticFormatted = stylis(cssStatic, \".\" + name, undefined, componentId);\n styleSheet.insertRules(componentId, name, cssStaticFormatted);\n }\n\n this.staticRulesId = name;\n return name;\n } else {\n var length = this.rules.length;\n var dynamicHash = phash(this.baseHash, stylis.hash);\n var css = '';\n\n for (var i = 0; i < length; i++) {\n var partRule = this.rules[i];\n\n if (typeof partRule === 'string') {\n css += partRule;\n if (process.env.NODE_ENV !== 'production') dynamicHash = phash(dynamicHash, partRule + i);\n } else {\n var partChunk = flatten(partRule, executionContext, styleSheet);\n var partString = Array.isArray(partChunk) ? partChunk.join('') : partChunk;\n dynamicHash = phash(dynamicHash, partString + i);\n css += partString;\n }\n }\n\n var _name = generateAlphabeticName(dynamicHash >>> 0);\n\n if (!styleSheet.hasNameForId(componentId, _name)) {\n var cssFormatted = stylis(css, \".\" + _name, undefined, componentId);\n styleSheet.insertRules(componentId, _name, cssFormatted);\n }\n\n return _name;\n }\n };\n\n return ComponentStyle;\n}();\n\n// \nvar LIMIT = 200;\nvar createWarnTooManyClasses = (function (displayName, componentId) {\n var generatedClasses = {};\n var warningSeen = false;\n return function (className) {\n if (!warningSeen) {\n generatedClasses[className] = true;\n\n if (Object.keys(generatedClasses).length >= LIMIT) {\n // Unable to find latestRule in test environment.\n\n /* eslint-disable no-console, prefer-template */\n var parsedIdString = componentId ? \" with the id of \\\"\" + componentId + \"\\\"\" : '';\n console.warn(\"Over \" + LIMIT + \" classes were generated for component \" + displayName + parsedIdString + \".\\n\" + 'Consider using the attrs method, together with a style object for frequently changed styles.\\n' + 'Example:\\n' + ' const Component = styled.div.attrs(props => ({\\n' + ' style: {\\n' + ' background: props.background,\\n' + ' },\\n' + ' }))`width: 100%;`\\n\\n' + ' <Component />');\n warningSeen = true;\n generatedClasses = {};\n }\n }\n };\n});\n\n// \nvar invalidHookCallRe = /invalid hook call/i;\nvar seen = new Set();\nvar checkDynamicCreation = function checkDynamicCreation(displayName, componentId) {\n if (process.env.NODE_ENV !== 'production') {\n var parsedIdString = componentId ? \" with the id of \\\"\" + componentId + \"\\\"\" : '';\n var message = \"The component \" + displayName + parsedIdString + \" has been created dynamically.\\n\" + 'You may see this warning because you\\'ve called styled inside another component.\\n' + 'To resolve this only create new StyledComponents outside of any render method and function component.';\n\n try {\n // We purposefully call `useRef` outside of a component and expect it to throw\n // If it doesn't, then we're inside another component.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useRef();\n\n if (!seen.has(message)) {\n // eslint-disable-next-line no-console\n console.warn(message);\n seen.add(message);\n }\n } catch (error) {\n // The error here is expected, since we're expecting anything that uses `checkDynamicCreation` to\n // be called outside of a React component.\n if (invalidHookCallRe.test(error.message)) {\n // This shouldn't happen, but resets `warningSeen` if we had this error happen intermittently\n seen[\"delete\"](message);\n }\n }\n }\n};\n\n// \nvar determineTheme = (function (props, providedTheme, defaultProps) {\n if (defaultProps === void 0) {\n defaultProps = EMPTY_OBJECT;\n }\n\n return props.theme !== defaultProps.theme && props.theme || providedTheme || defaultProps.theme;\n});\n\n// \n// Source: https://www.w3.org/TR/cssom-1/#serialize-an-identifier\n// Control characters and non-letter first symbols are not supported\nvar escapeRegex = /[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g;\nvar dashesAtEnds = /(^-|-$)/g;\n/**\n * TODO: Explore using CSS.escape when it becomes more available\n * in evergreen browsers.\n */\n\nfunction escape(str) {\n return str // Replace all possible CSS selectors\n .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end\n .replace(dashesAtEnds, '');\n}\n\n// \nfunction isTag(target) {\n return typeof target === 'string' && (process.env.NODE_ENV !== 'production' ? target.charAt(0) === target.charAt(0).toLowerCase() : true);\n}\n\n// \nfunction generateDisplayName(target) {\n // $FlowFixMe\n return isTag(target) ? \"styled.\" + target : \"Styled(\" + getComponentName(target) + \")\";\n}\n\n// \nvar generateComponentId = (function (str) {\n return generateAlphabeticName(hash(str) >>> 0);\n});\n\n/**\n * Convenience function for joining strings to form className chains\n */\nfunction joinStrings(a, b) {\n return a && b ? a + \" \" + b : a || b;\n}\n\nvar ThemeContext = React.createContext();\nvar ThemeConsumer = ThemeContext.Consumer;\n\nfunction mergeTheme(theme, outerTheme) {\n if (!theme) {\n return throwStyledComponentsError(14);\n }\n\n if (isFunction(theme)) {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')) {\n return throwStyledComponentsError(7);\n }\n\n return mergedTheme;\n }\n\n if (Array.isArray(theme) || typeof theme !== 'object') {\n return throwStyledComponentsError(8);\n }\n\n return outerTheme ? _extends({}, outerTheme, {}, theme) : theme;\n}\n/**\n * Provide a theme to an entire react component tree via context\n */\n\n\nfunction ThemeProvider(props) {\n var outerTheme = useContext(ThemeContext);\n var themeContext = useMemo(function () {\n return mergeTheme(props.theme, outerTheme);\n }, [props.theme, outerTheme]);\n\n if (!props.children) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: themeContext\n }, props.children);\n}\n\n/* global $Call */\n\nvar identifiers = {};\n/* We depend on components having unique IDs */\n\nfunction generateId(displayName, parentComponentId) {\n var name = typeof displayName !== 'string' ? 'sc' : escape(displayName); // Ensure that no displayName can lead to duplicate componentIds\n\n identifiers[name] = (identifiers[name] || 0) + 1;\n var componentId = name + \"-\" + generateComponentId(name + identifiers[name]);\n return parentComponentId ? parentComponentId + \"-\" + componentId : componentId;\n}\n\nfunction useResolvedAttrs(theme, props, attrs) {\n if (theme === void 0) {\n theme = EMPTY_OBJECT;\n }\n\n // NOTE: can't memoize this\n // returns [context, resolvedAttrs]\n // where resolvedAttrs is only the things injected by the attrs themselves\n var context = _extends({}, props, {\n theme: theme\n });\n\n var resolvedAttrs = {};\n attrs.forEach(function (attrDef) {\n var resolvedAttrDef = attrDef;\n var key;\n\n if (isFunction(resolvedAttrDef)) {\n resolvedAttrDef = resolvedAttrDef(context);\n }\n /* eslint-disable guard-for-in */\n\n\n for (key in resolvedAttrDef) {\n context[key] = resolvedAttrs[key] = key === 'className' ? joinStrings(resolvedAttrs[key], resolvedAttrDef[key]) : resolvedAttrDef[key];\n }\n /* eslint-enable guard-for-in */\n\n });\n return [context, resolvedAttrs];\n}\n\nfunction useInjectedStyle(componentStyle, hasAttrs, resolvedAttrs, warnTooManyClasses) {\n var styleSheet = useStyleSheet();\n var stylis = useStylis(); // statically styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n\n var isStatic = componentStyle.isStatic && !hasAttrs;\n var className = isStatic ? componentStyle.generateAndInjectStyles(EMPTY_OBJECT, styleSheet, stylis) : componentStyle.generateAndInjectStyles(resolvedAttrs, styleSheet, stylis);\n useDebugValue(className);\n\n if (process.env.NODE_ENV !== 'production' && !isStatic && warnTooManyClasses) {\n warnTooManyClasses(className);\n }\n\n return className;\n}\n\nfunction useStyledComponentImpl(forwardedComponent, props, forwardedRef) {\n var componentAttrs = forwardedComponent.attrs,\n componentStyle = forwardedComponent.componentStyle,\n defaultProps = forwardedComponent.defaultProps,\n foldedComponentIds = forwardedComponent.foldedComponentIds,\n shouldForwardProp = forwardedComponent.shouldForwardProp,\n styledComponentId = forwardedComponent.styledComponentId,\n target = forwardedComponent.target;\n useDebugValue(styledComponentId); // NOTE: the non-hooks version only subscribes to this when !componentStyle.isStatic,\n // but that'd be against the rules-of-hooks. We could be naughty and do it anyway as it\n // should be an immutable value, but behave for now.\n\n var theme = determineTheme(props, useContext(ThemeContext), defaultProps);\n\n var _useResolvedAttrs = useResolvedAttrs(theme || EMPTY_OBJECT, props, componentAttrs),\n context = _useResolvedAttrs[0],\n attrs = _useResolvedAttrs[1];\n\n var generatedClassName = useInjectedStyle(componentStyle, componentAttrs.length > 0, context, process.env.NODE_ENV !== 'production' ? forwardedComponent.warnTooManyClasses : undefined);\n var refToForward = forwardedRef;\n var elementToBeCreated = attrs.$as || props.$as || attrs.as || props.as || target;\n var isTargetTag = isTag(elementToBeCreated);\n var computedProps = attrs !== props ? _extends({}, props, {}, attrs) : props;\n var propFilterFn = shouldForwardProp || isTargetTag && validAttr;\n var propsForElement = {}; // eslint-disable-next-line guard-for-in\n\n for (var key in computedProps) {\n if (key[0] === '$' || key === 'as') continue;else if (key === 'forwardedAs') {\n propsForElement.as = computedProps[key];\n } else if (!propFilterFn || propFilterFn(key, validAttr)) {\n // Don't pass through non HTML tags through to HTML elements\n propsForElement[key] = computedProps[key];\n }\n }\n\n if (props.style && attrs.style !== props.style) {\n propsForElement.style = _extends({}, props.style, {}, attrs.style);\n }\n\n propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, props.className, attrs.className).filter(Boolean).join(' ');\n propsForElement.ref = refToForward;\n return createElement(elementToBeCreated, propsForElement);\n}\n\nfunction createStyledComponent(target, options, rules) {\n var isTargetStyledComp = isStyledComponent(target);\n var isCompositeComponent = !isTag(target);\n var _options$displayName = options.displayName,\n displayName = _options$displayName === void 0 ? generateDisplayName(target) : _options$displayName,\n _options$componentId = options.componentId,\n componentId = _options$componentId === void 0 ? generateId(options.displayName, options.parentComponentId) : _options$componentId,\n _options$attrs = options.attrs,\n attrs = _options$attrs === void 0 ? EMPTY_ARRAY : _options$attrs;\n var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + \"-\" + options.componentId : options.componentId || componentId; // fold the underlying StyledComponent attrs up (implicit extend)\n\n var finalAttrs = // $FlowFixMe\n isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs; // eslint-disable-next-line prefer-destructuring\n\n var shouldForwardProp = options.shouldForwardProp; // $FlowFixMe\n\n if (isTargetStyledComp && target.shouldForwardProp) {\n if (shouldForwardProp) {\n // compose nested shouldForwardProp calls\n shouldForwardProp = function shouldForwardProp(prop, filterFn) {\n return (// $FlowFixMe\n target.shouldForwardProp(prop, filterFn) && options.shouldForwardProp(prop, filterFn)\n );\n };\n } else {\n // eslint-disable-next-line prefer-destructuring\n shouldForwardProp = target.shouldForwardProp;\n }\n }\n\n var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)\n // $FlowFixMe\n target.componentStyle.rules.concat(rules) : rules, styledComponentId);\n /**\n * forwardRef creates a new interim component, which we'll take advantage of\n * instead of extending ParentComponent to create _another_ interim class\n */\n\n var WrappedStyledComponent; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n var forwardRef = function forwardRef(props, ref) {\n return useStyledComponentImpl(WrappedStyledComponent, props, ref);\n };\n\n forwardRef.displayName = displayName; // $FlowFixMe this is a forced cast to merge it StyledComponentWrapperProperties\n\n WrappedStyledComponent = React.forwardRef(forwardRef);\n WrappedStyledComponent.attrs = finalAttrs;\n WrappedStyledComponent.componentStyle = componentStyle;\n WrappedStyledComponent.displayName = displayName;\n WrappedStyledComponent.shouldForwardProp = shouldForwardProp; // this static is used to preserve the cascade of static classes for component selector\n // purposes; this is especially important with usage of the css prop\n\n WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe\n Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;\n WrappedStyledComponent.styledComponentId = styledComponentId; // fold the underlying StyledComponent target up since we folded the styles\n\n WrappedStyledComponent.target = isTargetStyledComp ? // $FlowFixMe\n target.target : target; // $FlowFixMe\n\n WrappedStyledComponent.withComponent = function withComponent(tag) {\n var previousComponentId = options.componentId,\n optionsToCopy = _objectWithoutPropertiesLoose(options, [\"componentId\"]);\n\n var newComponentId = previousComponentId && previousComponentId + \"-\" + (isTag(tag) ? tag : escape(getComponentName(tag)));\n\n var newOptions = _extends({}, optionsToCopy, {\n attrs: finalAttrs,\n componentId: newComponentId\n });\n\n return createStyledComponent(tag, newOptions, rules);\n }; // $FlowFixMe\n\n\n Object.defineProperty(WrappedStyledComponent, 'defaultProps', {\n get: function get() {\n return this._foldedDefaultProps;\n },\n set: function set(obj) {\n // $FlowFixMe\n this._foldedDefaultProps = isTargetStyledComp ? mixinDeep({}, target.defaultProps, obj) : obj;\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n checkDynamicCreation(displayName, styledComponentId);\n WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName, styledComponentId);\n } // $FlowFixMe\n\n\n WrappedStyledComponent.toString = function () {\n return \".\" + WrappedStyledComponent.styledComponentId;\n };\n\n if (isCompositeComponent) {\n hoist(WrappedStyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n componentStyle: true,\n displayName: true,\n foldedComponentIds: true,\n shouldForwardProp: true,\n self: true,\n styledComponentId: true,\n target: true,\n withComponent: true\n });\n }\n\n return WrappedStyledComponent;\n}\n\n// \n// Thanks to ReactDOMFactories for this handy list!\nvar domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// \n\nvar styled = function styled(tag) {\n return constructWithOptions(createStyledComponent, tag);\n}; // Shorthands for all valid HTML Elements\n\n\ndomElements.forEach(function (domElement) {\n styled[domElement] = styled(domElement);\n});\n\n// \n\nvar GlobalStyle = /*#__PURE__*/function () {\n function GlobalStyle(rules, componentId) {\n this.rules = rules;\n this.componentId = componentId;\n this.isStatic = isStaticRules(rules);\n }\n\n var _proto = GlobalStyle.prototype;\n\n _proto.createStyles = function createStyles(instance, executionContext, styleSheet, stylis) {\n var flatCSS = flatten(this.rules, executionContext, styleSheet);\n var css = stylis(flatCSS.join(''), '');\n var id = this.componentId + instance; // NOTE: We use the id as a name as well, since these rules never change\n\n styleSheet.insertRules(id, id, css);\n };\n\n _proto.removeStyles = function removeStyles(instance, styleSheet) {\n styleSheet.clearRules(this.componentId + instance);\n };\n\n _proto.renderStyles = function renderStyles(instance, executionContext, styleSheet, stylis) {\n StyleSheet.registerId(this.componentId + instance); // NOTE: Remove old styles, then inject the new ones\n\n this.removeStyles(instance, styleSheet);\n this.createStyles(instance, executionContext, styleSheet, stylis);\n };\n\n return GlobalStyle;\n}();\n\nfunction createGlobalStyle(strings) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(void 0, [strings].concat(interpolations));\n var styledComponentId = \"sc-global-\" + generateComponentId(JSON.stringify(rules));\n var globalStyle = new GlobalStyle(rules, styledComponentId);\n\n if (process.env.NODE_ENV !== 'production') {\n checkDynamicCreation(styledComponentId);\n }\n\n function GlobalStyleComponent(props) {\n var styleSheet = useStyleSheet();\n var stylis = useStylis();\n var theme = useContext(ThemeContext);\n var instanceRef = useRef(null);\n\n if (instanceRef.current === null) {\n instanceRef.current = styleSheet.allocateGSInstance(styledComponentId);\n }\n\n var instance = instanceRef.current;\n\n if (process.env.NODE_ENV !== 'production' && React.Children.count(props.children)) {\n // eslint-disable-next-line no-console\n console.warn(\"The global style component \" + styledComponentId + \" was given child JSX. createGlobalStyle does not render children.\");\n }\n\n if (process.env.NODE_ENV !== 'production' && rules.some(function (rule) {\n return typeof rule === 'string' && rule.indexOf('@import') !== -1;\n })) {\n console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app.\");\n }\n\n if (globalStyle.isStatic) {\n globalStyle.renderStyles(instance, STATIC_EXECUTION_CONTEXT, styleSheet, stylis);\n } else {\n var context = _extends({}, props, {\n theme: determineTheme(props, theme, GlobalStyleComponent.defaultProps)\n });\n\n globalStyle.renderStyles(instance, context, styleSheet, stylis);\n }\n\n useEffect(function () {\n return function () {\n return globalStyle.removeStyles(instance, styleSheet);\n };\n }, EMPTY_ARRAY);\n return null;\n } // $FlowFixMe\n\n\n return React.memo(GlobalStyleComponent);\n}\n\n// \nfunction keyframes(strings) {\n /* Warning if you've used keyframes on React Native */\n if (process.env.NODE_ENV !== 'production' && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n // eslint-disable-next-line no-console\n console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');\n }\n\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(void 0, [strings].concat(interpolations)).join('');\n var name = generateComponentId(rules);\n return new Keyframes(name, [rules, name, '@keyframes']);\n}\n\nvar ServerStyleSheet = /*#__PURE__*/function () {\n function ServerStyleSheet() {\n var _this = this;\n\n this._emitSheetCSS = function () {\n var css = _this.instance.toString();\n\n var nonce = getNonce();\n var attrs = [nonce && \"nonce=\\\"\" + nonce + \"\\\"\", SC_ATTR + \"=\\\"true\\\"\", SC_ATTR_VERSION + \"=\\\"\" + SC_VERSION + \"\\\"\"];\n var htmlAttr = attrs.filter(Boolean).join(' ');\n return \"<style \" + htmlAttr + \">\" + css + \"</style>\";\n };\n\n this.getStyleTags = function () {\n if (_this.sealed) {\n return throwStyledComponentsError(2);\n }\n\n return _this._emitSheetCSS();\n };\n\n this.getStyleElement = function () {\n var _props;\n\n if (_this.sealed) {\n return throwStyledComponentsError(2);\n }\n\n var props = (_props = {}, _props[SC_ATTR] = '', _props[SC_ATTR_VERSION] = SC_VERSION, _props.dangerouslySetInnerHTML = {\n __html: _this.instance.toString()\n }, _props);\n var nonce = getNonce();\n\n if (nonce) {\n props.nonce = nonce;\n } // v4 returned an array for this fn, so we'll do the same for v5 for backward compat\n\n\n return [/*#__PURE__*/React.createElement(\"style\", _extends({}, props, {\n key: \"sc-0-0\"\n }))];\n };\n\n this.seal = function () {\n _this.sealed = true;\n };\n\n this.instance = new StyleSheet({\n isServer: true\n });\n this.sealed = false;\n }\n\n var _proto = ServerStyleSheet.prototype;\n\n _proto.collectStyles = function collectStyles(children) {\n if (this.sealed) {\n return throwStyledComponentsError(2);\n }\n\n return /*#__PURE__*/React.createElement(StyleSheetManager, {\n sheet: this.instance\n }, children);\n };\n\n // eslint-disable-next-line consistent-return\n _proto.interleaveWithNodeStream = function interleaveWithNodeStream(input) {\n {\n return throwStyledComponentsError(3);\n }\n };\n\n return ServerStyleSheet;\n}();\n\n// export default <Config: { theme?: any }, Instance>(\n// Component: AbstractComponent<Config, Instance>\n// ): AbstractComponent<$Diff<Config, { theme?: any }> & { theme?: any }, Instance>\n//\n// but the old build system tooling doesn't support the syntax\n\nvar withTheme = (function (Component) {\n // $FlowFixMe This should be React.forwardRef<Config, Instance>\n var WithTheme = React.forwardRef(function (props, ref) {\n var theme = useContext(ThemeContext); // $FlowFixMe defaultProps isn't declared so it can be inferrable\n\n var defaultProps = Component.defaultProps;\n var themeProp = determineTheme(props, theme, defaultProps);\n\n if (process.env.NODE_ENV !== 'production' && themeProp === undefined) {\n // eslint-disable-next-line no-console\n console.warn(\"[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \\\"\" + getComponentName(Component) + \"\\\"\");\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n theme: themeProp,\n ref: ref\n }));\n });\n hoist(WithTheme, Component);\n WithTheme.displayName = \"WithTheme(\" + getComponentName(Component) + \")\";\n return WithTheme;\n});\n\n// \n\nvar useTheme = function useTheme() {\n return useContext(ThemeContext);\n};\n\n// \nvar __PRIVATE__ = {\n StyleSheet: StyleSheet,\n masterSheet: masterSheet\n};\n\n// \n/* Define bundle version for export */\n\nvar version = \"5.1.1\";\n/* Warning if you've imported this file on React Native */\n\nif (process.env.NODE_ENV !== 'production' && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n // eslint-disable-next-line no-console\n console.warn(\"It looks like you've imported 'styled-components' on React Native.\\n\" + \"Perhaps you're looking to import 'styled-components/native'?\\n\" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native');\n}\n/* Warning if there are several instances of styled-components */\n\n\nif (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && typeof window !== 'undefined') {\n window['__styled-components-init__'] = window['__styled-components-init__'] || 0;\n\n if (window['__styled-components-init__'] === 1) {\n // eslint-disable-next-line no-console\n console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. \" + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process, ' + 'missing theme prop, and makes your application bigger without a good reason.\\n\\n' + 'See https://s-c.sh/2BAXzed for more info.');\n }\n\n window['__styled-components-init__'] += 1;\n}\n\nexport default styled;\nexport { ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, __PRIVATE__, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, version, withTheme };\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.InlineIcon = exports.Icon = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Unique id counter\n *\n * @type {number}\n */\nvar idCounter = 0;\n/**\n * Regex used to split dimensions\n *\n * @type {RegExp}\n * @private\n */\n\nvar unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nvar unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\n/**\n * Attributes used for icon\n *\n * @type {string[]}\n */\n\nvar iconAttributes = ['width', 'height', 'inline', 'hFlip', 'vFlip', 'flip', 'rotate', 'align', 'color', 'box'];\n/**\n * Default attribute values\n *\n * @type {object}\n */\n\nvar defaultAttributes = {\n left: 0,\n top: 0,\n width: 16,\n height: 16,\n rotate: 0,\n hFlip: false,\n vFlip: false\n};\n/**\n * Add missing properties to icon\n *\n * Important: in PHP version of this library this function is part of Collection class: Collection::addMissingAttributes()\n *\n * JavaScript version uses separate file so this function could be used in React and other components without loading\n * entire Collection class.\n *\n * @param {object} data\n * @return {object}\n */\n\nfunction normalize(data) {\n // Object.create, compatible with IE11\n var item = Object.create(null);\n var key;\n\n for (key in defaultAttributes) {\n item[key] = defaultAttributes[key];\n }\n\n for (key in data) {\n item[key] = data[key];\n } // Attributes derived from other attributes\n\n\n if (item.inlineTop === void 0) {\n item.inlineTop = item.top;\n }\n\n if (item.inlineHeight === void 0) {\n item.inlineHeight = item.height;\n }\n\n if (item.verticalAlign === void 0) {\n // -0.143 if icon is designed for 14px height,\n // otherwise assume icon is designed for 16px height\n item.verticalAlign = item.height % 7 === 0 && item.height % 8 !== 0 ? -0.143 : -0.125;\n }\n\n return item;\n}\n/**\n * Get preserveAspectRatio attribute value\n *\n * @param {object} align\n * @return {string}\n * @private\n */\n\n\nfunction getAlignment(align) {\n var result;\n\n switch (align.horizontal) {\n case 'left':\n result = 'xMin';\n break;\n\n case 'right':\n result = 'xMax';\n break;\n\n default:\n result = 'xMid';\n }\n\n switch (align.vertical) {\n case 'top':\n result += 'YMin';\n break;\n\n case 'bottom':\n result += 'YMax';\n break;\n\n default:\n result += 'YMid';\n }\n\n result += align.slice ? ' slice' : ' meet';\n return result;\n}\n/**\n * SVG class\n *\n * @see @iconify/json-tools/src/svg.js\n */\n\n\nvar SVG = /*#__PURE__*/function () {\n /**\n * Constructor\n *\n * @param icon Icon data\n * Use Collection.getIconData() to retrieve icon data\n */\n function SVG(icon) {\n _classCallCheck(this, SVG);\n\n this._item = icon;\n }\n /**\n * Get SVG attributes\n *\n * @param {object} props Custom properties (same as query string in Iconify API)\n * @returns {string}\n */\n\n\n _createClass(SVG, [{\n key: \"getAttributes\",\n value: function getAttributes(props) {\n var item = this._item;\n\n if (_typeof(props) !== 'object') {\n props = Object.create(null);\n } // Set data\n\n\n var align = {\n horizontal: 'center',\n vertical: 'middle',\n slice: false\n };\n var transform = {\n rotate: item.rotate,\n hFlip: item.hFlip,\n vFlip: item.vFlip\n };\n var style = Object.create(null);\n var attributes = Object.create(null); // Get width/height\n\n var inline = props.inline === true || props.inline === 'true' || props.inline === '1';\n var box = {\n left: item.left,\n top: inline ? item.inlineTop : item.top,\n width: item.width,\n height: inline ? item.inlineHeight : item.height\n }; // Transformations\n\n ['hFlip', 'vFlip'].forEach(function (key) {\n if (props[key] !== void 0 && (props[key] === true || props[key] === 'true' || props[key] === '1')) {\n transform[key] = !transform[key];\n }\n });\n\n if (props.flip !== void 0) {\n props.flip.toLowerCase().split(/[\\s,]+/).forEach(function (value) {\n switch (value) {\n case 'horizontal':\n transform.hFlip = !transform.hFlip;\n break;\n\n case 'vertical':\n transform.vFlip = !transform.vFlip;\n }\n });\n }\n\n if (props.rotate !== void 0) {\n var value = props.rotate;\n\n if (typeof value === 'number') {\n transform.rotate += value;\n } else if (typeof value === 'string') {\n var units = value.replace(/^-?[0-9.]*/, '');\n\n if (units === '') {\n value = parseInt(value);\n\n if (!isNaN(value)) {\n transform.rotate += value;\n }\n } else if (units !== value) {\n var split = false;\n\n switch (units) {\n case '%':\n // 25% -> 1, 50% -> 2, ...\n split = 25;\n break;\n\n case 'deg':\n // 90deg -> 1, 180deg -> 2, ...\n split = 90;\n }\n\n if (split) {\n value = parseInt(value.slice(0, value.length - units.length));\n\n if (!isNaN(value)) {\n transform.rotate += Math.round(value / split);\n }\n }\n }\n }\n } // Apply transformations to box\n\n\n var transformations = [],\n tempValue;\n\n if (transform.hFlip) {\n if (transform.vFlip) {\n transform.rotate += 2;\n } else {\n // Horizontal flip\n transformations.push('translate(' + (box.width + box.left) + ' ' + (0 - box.top) + ')');\n transformations.push('scale(-1 1)');\n box.top = box.left = 0;\n }\n } else if (transform.vFlip) {\n // Vertical flip\n transformations.push('translate(' + (0 - box.left) + ' ' + (box.height + box.top) + ')');\n transformations.push('scale(1 -1)');\n box.top = box.left = 0;\n }\n\n switch (transform.rotate % 4) {\n case 1:\n // 90deg\n tempValue = box.height / 2 + box.top;\n transformations.unshift('rotate(90 ' + tempValue + ' ' + tempValue + ')'); // swap width/height and x/y\n\n if (box.left !== 0 || box.top !== 0) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n\n break;\n\n case 2:\n // 180deg\n transformations.unshift('rotate(180 ' + (box.width / 2 + box.left) + ' ' + (box.height / 2 + box.top) + ')');\n break;\n\n case 3:\n // 270deg\n tempValue = box.width / 2 + box.left;\n transformations.unshift('rotate(-90 ' + tempValue + ' ' + tempValue + ')'); // swap width/height and x/y\n\n if (box.left !== 0 || box.top !== 0) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n\n break;\n } // Calculate dimensions\n // Values for width/height: null = default, 'auto' = from svg, false = do not set\n // Default: if both values aren't set, height defaults to '1em', width is calculated from height\n\n\n var customWidth = props.width ? props.width : null;\n var customHeight = props.height ? props.height : null;\n var width, height;\n\n if (customWidth === null && customHeight === null) {\n customHeight = '1em';\n }\n\n if (customWidth !== null && customHeight !== null) {\n width = customWidth;\n height = customHeight;\n } else if (customWidth !== null) {\n width = customWidth;\n height = SVG.calculateDimension(width, box.height / box.width);\n } else {\n height = customHeight;\n width = SVG.calculateDimension(height, box.width / box.height);\n }\n\n if (width !== false) {\n attributes.width = width === 'auto' ? box.width : width;\n }\n\n if (height !== false) {\n attributes.height = height === 'auto' ? box.height : height;\n } // Add vertical-align for inline icon\n\n\n if (inline && item.verticalAlign !== 0) {\n style['vertical-align'] = item.verticalAlign + 'em';\n } // Check custom alignment\n\n\n if (props.align !== void 0) {\n props.align.toLowerCase().split(/[\\s,]+/).forEach(function (value) {\n switch (value) {\n case 'left':\n case 'right':\n case 'center':\n align.horizontal = value;\n break;\n\n case 'top':\n case 'bottom':\n case 'middle':\n align.vertical = value;\n break;\n\n case 'crop':\n align.slice = true;\n break;\n\n case 'meet':\n align.slice = false;\n }\n });\n } // Generate viewBox and preserveAspectRatio attributes\n\n\n attributes.preserveAspectRatio = getAlignment(align);\n attributes.viewBox = box.left + ' ' + box.top + ' ' + box.width + ' ' + box.height; // Generate body\n\n var body = SVG.replaceIDs(item.body);\n\n if (props.color !== void 0) {\n body = body.replace(/currentColor/g, props.color);\n }\n\n if (transformations.length) {\n body = '<g transform=\"' + transformations.join(' ') + '\">' + body + '</g>';\n }\n\n if (props.box === true || props.box === 'true' || props.box === '1') {\n // Add transparent bounding box\n body += '<rect x=\"' + box.left + '\" y=\"' + box.top + '\" width=\"' + box.width + '\" height=\"' + box.height + '\" fill=\"rgba(0, 0, 0, 0)\" />';\n }\n\n return {\n attributes: attributes,\n body: body,\n style: style\n };\n }\n /**\n * Generate SVG\n *\n * @param {object} props Custom properties (same as query string in Iconify API)\n * @param {boolean} [addExtra] True if extra attributes should be added to SVG.\n * Due to lack of functions in JavaScript for escaping attributes, it is your job to make sure key and value are both properly escaped. Default value is false.\n * @returns {string}\n */\n\n }, {\n key: \"getSVG\",\n value: function getSVG(props, addExtra) {\n var attributes = SVG.splitAttributes(props),\n data = this.getAttributes(attributes.icon);\n var svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"'; // Add extra attributes - assume that their names and values are escaped\n\n if (addExtra) {\n Object.keys(attributes.node).forEach(function (attr) {\n svg += ' ' + attr + '=\"' + attributes.node[attr] + '\"';\n });\n } // Add SVG attributes\n\n\n Object.keys(data.attributes).forEach(function (attr) {\n svg += ' ' + attr + '=\"' + data.attributes[attr] + '\"';\n }); // Add style with 360deg transformation to style to prevent subpixel rendering bug\n\n svg += ' style=\"-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);';\n Object.keys(data.style).forEach(function (attr) {\n svg += ' ' + attr + ': ' + data.style[attr] + ';';\n });\n\n if (props && props.style !== void 0) {\n svg += props.style;\n }\n\n svg += '\">';\n svg += data.body + '</svg>';\n return svg;\n }\n /**\n * Split attributes\n *\n * @param props\n * @return {{icon: {}, node: {}}}\n */\n\n }], [{\n key: \"splitAttributes\",\n value: function splitAttributes(props) {\n var result = {\n icon: Object.create(null),\n node: Object.create(null)\n };\n Object.keys(props).forEach(function (name) {\n result[iconAttributes.indexOf(name) === -1 ? 'node' : 'icon'][name] = props[name];\n });\n return result;\n }\n /**\n * Calculate second dimension when only 1 dimension is set\n *\n * @param {string|number} size One dimension (such as width)\n * @param {number} ratio Width/height ratio.\n * If size == width, ratio = height/width\n * If size == height, ratio = width/height\n * @param {number} [precision] Floating number precision in result to minimize output. Default = 100\n * @return {string|number|null} Another dimension, null on error\n */\n\n }, {\n key: \"calculateDimension\",\n value: function calculateDimension(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n\n precision = precision === void 0 ? 100 : precision;\n\n if (typeof size === 'number') {\n return Math.ceil(size * ratio * precision) / precision;\n } // split code into sets of strings and numbers\n\n\n var split = size.split(unitsSplit);\n\n if (split === null || !split.length) {\n return null;\n }\n\n var results = [],\n code = split.shift(),\n isNumber = unitsTest.test(code),\n num;\n\n while (true) {\n if (isNumber) {\n num = parseFloat(code);\n\n if (isNaN(num)) {\n results.push(code);\n } else {\n results.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n results.push(code);\n } // next\n\n\n code = split.shift();\n\n if (code === void 0) {\n return results.join('');\n }\n\n isNumber = !isNumber;\n }\n }\n /**\n * Replace IDs in SVG output with unique IDs\n * Fast replacement without parsing XML, assuming commonly used patterns.\n *\n * @param {string} body\n * @return {string}\n */\n\n }, {\n key: \"replaceIDs\",\n value: function replaceIDs(body) {\n var regex = /\\sid=\"(\\S+)\"/g,\n ids = [],\n match,\n prefix;\n\n function strReplace(search, replace, subject) {\n var pos = 0;\n\n while ((pos = subject.indexOf(search, pos)) !== -1) {\n subject = subject.slice(0, pos) + replace + subject.slice(pos + search.length);\n pos += replace.length;\n }\n\n return subject;\n } // Find all IDs\n\n\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n\n if (!ids.length) {\n return body;\n }\n\n prefix = 'IconifyId-' + Date.now().toString(16) + '-' + (Math.random() * 0x1000000 | 0).toString(16) + '-'; // Replace with unique ids\n\n ids.forEach(function (id) {\n var newID = prefix + idCounter;\n idCounter++;\n body = strReplace('=\"' + id + '\"', '=\"' + newID + '\"', body);\n body = strReplace('=\"#' + id + '\"', '=\"#' + newID + '\"', body);\n body = strReplace('(#' + id + ')', '(#' + newID + ')', body);\n });\n return body;\n }\n }]);\n\n return SVG;\n}();\n/**\n * Create React component with SVG data\n *\n * @param {object} props\n * @param {boolean} inline\n * @return {null|React.Component}\n */\n\n\nfunction component(props, inline) {\n if (_typeof(props.icon) !== 'object') {\n return null;\n } // Split properties into SVG properties and icon properties\n\n\n var split = SVG.splitAttributes(props),\n iconProps = split.icon,\n customAttributes = split.node;\n delete customAttributes.icon; // Set default inline value\n\n if (iconProps.inline === void 0) {\n iconProps.inline = inline;\n } // Get SVG data\n\n\n var svg = new SVG(normalize(props.icon));\n var iconData = svg.getAttributes(iconProps); // Set style\n\n var style = {\n transform: 'rotate(360deg)'\n };\n\n if (iconData.style['vertical-align'] !== void 0) {\n style.verticalAlign = iconData.style['vertical-align'];\n }\n\n if (props.style !== void 0) {\n for (var _key in props.style) {\n style[_key] = props.style[_key];\n }\n } // Generate element attributes\n\n\n var attributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n focusable: false,\n style: style\n };\n var key;\n\n for (key in customAttributes) {\n attributes[key] = customAttributes[key];\n }\n\n for (key in iconData.attributes) {\n attributes[key] = iconData.attributes[key];\n }\n\n attributes.dangerouslySetInnerHTML = {\n __html: iconData.body\n }; // Generate SVG\n\n return _react[\"default\"].createElement('svg', attributes, null);\n}\n/**\n * Icon without vertical alignment\n *\n * @param {object} props\n * @return {React.Component}\n * @constructor\n */\n\n\nvar Icon = function Icon(props) {\n return component(props, false);\n};\n/**\n * Icon with vertical alignment\n *\n * @param {object} props\n * @return {React.Component}\n * @constructor\n */\n\n\nexports.Icon = Icon;\n\nvar InlineIcon = function InlineIcon(props) {\n return component(props, true);\n};\n/**\n * Default export\n */\n\n\nexports.InlineIcon = InlineIcon;\nvar _default = Icon;\nexports[\"default\"] = _default;","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nimport setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeFunction from \"./isNativeFunction\";\nimport construct from \"./construct\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction factorial(a) {\n if (a % 1 || !(+a >= 0)) return NaN;\n if (a > 170) return Infinity;else if (a === 0) return 1;else {\n return a * factorial(a - 1);\n }\n}\n\nfunction power(a, b) {\n return Math.pow(a, b);\n}\n\nfunction sqrt(a) {\n return Math.sqrt(a);\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultMathSymbols = {\n symbols: {\n '!': {\n postfix: {\n symbol: '!',\n f: factorial,\n notation: 'postfix',\n precedence: 6,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '!',\n regSymbol: '!'\n },\n '^': {\n infix: {\n symbol: '^',\n f: power,\n notation: 'infix',\n precedence: 5,\n rightToLeft: 1,\n argCount: 2\n },\n symbol: '^',\n regSymbol: '\\\\^'\n },\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n },\n sqrt: {\n func: {\n symbol: 'sqrt',\n f: sqrt,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'sqrt',\n regSymbol: 'sqrt\\\\b'\n }\n }\n};\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found.\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultMathSymbols.symbols, {}, additionalSymbols.symbols) : _extends({}, defaultMathSymbols.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable.\n *\n * Passthrough can be enabled (off by default) for when you are unsure of the input and want non-variable values to be returned instead of an error.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, passThrough) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n if (passThrough) return cssVariable;\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else {\n throw new PolishedError(74);\n }\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith (string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @deprecated - stripUnit's unitReturn functionality has been marked for deprecation in polished 4.0. It's functionality has been been moved to getValueAndUnit.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value, unitReturn) {\n if (typeof value !== 'string') return unitReturn ? [value, undefined] : value;\n var matchedValue = value.match(cssRegex);\n\n if (unitReturn) {\n // eslint-disable-next-line no-console\n console.warn(\"stripUnit's unitReturn functionality has been marked for deprecation in polished 4.0. It's functionality has been been moved to getValueAndUnit.\");\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n }\n\n if (matchedValue) return parseFloat(value);\n return value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pxtoFactory('em');\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex$1);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pxtoFactory('rem');\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width) {\n if (width === void 0) {\n width = '100%';\n }\n\n return {\n display: 'inline-block',\n maxWidth: width,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n}\n\nfunction _createForOfIteratorHelperLoose(o) { var i = 0; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } i = o[Symbol.iterator](); return i.next.bind(i); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, {}, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n localFonts = _ref.localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nfunction _templateObject() {\n var data = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"]);\n\n _templateObject = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject(), toDirection, colorStops.join(', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nfunction _templateObject$1() {\n var data = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"]);\n\n _templateObject$1 = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject$1(), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor, backgroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return backgroundColor + \" \" + backgroundColor + \" \" + foregroundColor + \" \" + backgroundColor;\n\n case 'right':\n case 'bottomLeft':\n return backgroundColor + \" \" + backgroundColor + \" \" + backgroundColor + \" \" + foregroundColor;\n\n case 'bottom':\n case 'topLeft':\n return foregroundColor + \" \" + backgroundColor + \" \" + backgroundColor + \" \" + backgroundColor;\n\n case 'left':\n case 'topRight':\n return backgroundColor + \" \" + foregroundColor + \" \" + backgroundColor + \" \" + backgroundColor;\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return {\n width: '0',\n height: '0',\n borderColor: getBorderColor(pointingDirection, foregroundColor, backgroundColor),\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n };\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsla\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor);\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor);\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(adjustHue);\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(darken);\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(desaturate);\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(lighten);\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * (parseFloat(weight) / 1.0) + color2.alpha * (1 - parseFloat(weight) / 1.0)\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* ::<number | string, string, string, string> */\n(mix);\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(opacify);\n\nvar defaultLightReturnColor = '#000';\nvar defaultDarkReturnColor = '#fff';\n/**\n * Returns black or white (or optional light and dark return colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, set `strict` to `true` to ensure that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, lightReturnColor, darkReturnColor, strict) {\n if (lightReturnColor === void 0) {\n lightReturnColor = defaultLightReturnColor;\n }\n\n if (darkReturnColor === void 0) {\n darkReturnColor = defaultDarkReturnColor;\n }\n\n if (strict === void 0) {\n strict = false;\n }\n\n var isLightColor = getLuminance(color) > 0.179;\n var preferredReturnColor = isLightColor ? lightReturnColor : darkReturnColor; // TODO: Make `strict` the default behaviour in the next major release.\n // Without `strict`, this may return a color that does not meet WCAG AA.\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isLightColor ? defaultLightReturnColor : defaultDarkReturnColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(saturate);\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setHue);\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setLightness);\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setSaturation);\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(shade);\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(tint);\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff');\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')},\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 - parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(transparentize);\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap$1 = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap$1.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken as darken, curriedDesaturate as desaturate, directionalProperty, ellipsis, em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, invert, curriedLighten as lighten, linearGradient, margin, math, meetsContrastGuidelines, curriedMix as mix, modularScale, normalize, curriedOpacify as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate as saturate, curriedSetHue as setHue, curriedSetLightness as setLightness, curriedSetSaturation as setSaturation, curriedShade as shade, size, stripUnit, textInputs, timingFunctions, curriedTint as tint, toColorString, transitions, curriedTransparentize as transparentize, triangle, wordWrap };\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","var data = {\n\t\"body\": \"<path d=\\\"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M18.41 7.41L17 6l-6 6l6 6l1.41-1.41L13.83 12l4.58-4.59m-6 0L11 6l-6 6l6 6l1.41-1.41L7.83 12l4.58-4.59z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M5.59 7.41L7 6l6 6l-6 6l-1.41-1.41L10.17 12L5.59 7.41m6 0L13 6l6 6l-6 6l-1.41-1.41L16.17 12l-4.58-4.59z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6l1.41-1.42z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M14 19h4V5h-4M6 19h4V5H6v14z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M8 5.14v14l11-7l-11-7z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M18 18H6V6h12v12z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","var data = {\n\t\"body\": \"<path d=\\\"M19 3H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M10 17l-5-5l1.41-1.42L10 14.17l7.59-7.59L19 8m0-5H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M10 4H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canUseDOM = undefined;\n\nvar _exenv = require(\"exenv\");\n\nvar _exenv2 = _interopRequireDefault(_exenv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EE = _exenv2.default;\n\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\n\nvar canUseDOM = exports.canUseDOM = EE.canUseDOM;\n\nexports.default = SafeHTMLElement;","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst EventEmitter = require(\"eventemitter3\");\nconst p_timeout_1 = require(\"p-timeout\");\nconst priority_queue_1 = require(\"./priority-queue\");\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst empty = () => { };\nconst timeoutError = new p_timeout_1.TimeoutError();\n/**\nPromise queue with concurrency control.\n*/\nclass PQueue extends EventEmitter {\n constructor(options) {\n var _a, _b, _c, _d;\n super();\n Object.defineProperty(this, \"_carryoverConcurrencyCount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_isIntervalIgnored\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_intervalCount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"_intervalCap\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_interval\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_intervalEnd\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"_intervalId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_timeoutId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_queue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_queueClass\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_pendingCount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194\n Object.defineProperty(this, \"_concurrency\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_isPaused\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_resolveEmpty\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: empty\n });\n Object.defineProperty(this, \"_resolveIdle\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: empty\n });\n Object.defineProperty(this, \"_timeout\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_throwOnTimeout\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n options = Object.assign({ carryoverConcurrencyCount: false, intervalCap: Infinity, interval: 0, concurrency: Infinity, autoStart: true, queueClass: priority_queue_1.default }, options);\n if (!(typeof options.intervalCap === 'number' && options.intervalCap >= 1)) {\n throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(_b = (_a = options.intervalCap) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''}\\` (${typeof options.intervalCap})`);\n }\n if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) {\n throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(_d = (_c = options.interval) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : ''}\\` (${typeof options.interval})`);\n }\n this._carryoverConcurrencyCount = options.carryoverConcurrencyCount;\n this._isIntervalIgnored = options.intervalCap === Infinity || options.interval === 0;\n this._intervalCap = options.intervalCap;\n this._interval = options.interval;\n this._queue = new options.queueClass();\n this._queueClass = options.queueClass;\n this.concurrency = options.concurrency;\n this._timeout = options.timeout;\n this._throwOnTimeout = options.throwOnTimeout === true;\n this._isPaused = options.autoStart === false;\n }\n get _doesIntervalAllowAnother() {\n return this._isIntervalIgnored || this._intervalCount < this._intervalCap;\n }\n get _doesConcurrentAllowAnother() {\n return this._pendingCount < this._concurrency;\n }\n _next() {\n this._pendingCount--;\n this._tryToStartAnother();\n }\n _resolvePromises() {\n this._resolveEmpty();\n this._resolveEmpty = empty;\n if (this._pendingCount === 0) {\n this._resolveIdle();\n this._resolveIdle = empty;\n this.emit('idle');\n }\n }\n _onResumeInterval() {\n this._onInterval();\n this._initializeIntervalIfNeeded();\n this._timeoutId = undefined;\n }\n _isIntervalPaused() {\n const now = Date.now();\n if (this._intervalId === undefined) {\n const delay = this._intervalEnd - now;\n if (delay < 0) {\n // Act as the interval was done\n // We don't need to resume it here because it will be resumed on line 160\n this._intervalCount = (this._carryoverConcurrencyCount) ? this._pendingCount : 0;\n }\n else {\n // Act as the interval is pending\n if (this._timeoutId === undefined) {\n this._timeoutId = setTimeout(() => {\n this._onResumeInterval();\n }, delay);\n }\n return true;\n }\n }\n return false;\n }\n _tryToStartAnother() {\n if (this._queue.size === 0) {\n // We can clear the interval (\"pause\")\n // Because we can redo it later (\"resume\")\n if (this._intervalId) {\n clearInterval(this._intervalId);\n }\n this._intervalId = undefined;\n this._resolvePromises();\n return false;\n }\n if (!this._isPaused) {\n const canInitializeInterval = !this._isIntervalPaused();\n if (this._doesIntervalAllowAnother && this._doesConcurrentAllowAnother) {\n this.emit('active');\n this._queue.dequeue()();\n if (canInitializeInterval) {\n this._initializeIntervalIfNeeded();\n }\n return true;\n }\n }\n return false;\n }\n _initializeIntervalIfNeeded() {\n if (this._isIntervalIgnored || this._intervalId !== undefined) {\n return;\n }\n this._intervalId = setInterval(() => {\n this._onInterval();\n }, this._interval);\n this._intervalEnd = Date.now() + this._interval;\n }\n _onInterval() {\n if (this._intervalCount === 0 && this._pendingCount === 0 && this._intervalId) {\n clearInterval(this._intervalId);\n this._intervalId = undefined;\n }\n this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0;\n this._processQueue();\n }\n /**\n Executes all queued functions until it reaches the limit.\n */\n _processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }\n get concurrency() {\n return this._concurrency;\n }\n set concurrency(newConcurrency) {\n if (!(typeof newConcurrency === 'number' && newConcurrency >= 1)) {\n throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${newConcurrency}\\` (${typeof newConcurrency})`);\n }\n this._concurrency = newConcurrency;\n this._processQueue();\n }\n /**\n Adds a sync or async task to the queue. Always returns a promise.\n */\n async add(fn, options = {}) {\n return new Promise((resolve, reject) => {\n const run = async () => {\n this._pendingCount++;\n this._intervalCount++;\n try {\n const operation = (this._timeout === undefined && options.timeout === undefined) ? fn() : p_timeout_1.default(Promise.resolve(fn()), (options.timeout === undefined ? this._timeout : options.timeout), () => {\n if (options.throwOnTimeout === undefined ? this._throwOnTimeout : options.throwOnTimeout) {\n reject(timeoutError);\n }\n return undefined;\n });\n resolve(await operation);\n }\n catch (error) {\n reject(error);\n }\n this._next();\n };\n this._queue.enqueue(run, options);\n this._tryToStartAnother();\n });\n }\n /**\n Same as `.add()`, but accepts an array of sync or async functions.\n\n @returns A promise that resolves when all functions are resolved.\n */\n async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }\n /**\n Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)\n */\n start() {\n if (!this._isPaused) {\n return this;\n }\n this._isPaused = false;\n this._processQueue();\n return this;\n }\n /**\n Put queue execution on hold.\n */\n pause() {\n this._isPaused = true;\n }\n /**\n Clear the queue.\n */\n clear() {\n this._queue = new this._queueClass();\n }\n /**\n Can be called multiple times. Useful if you for example add additional items at a later time.\n\n @returns A promise that settles when the queue becomes empty.\n */\n async onEmpty() {\n // Instantly resolve if the queue is empty\n if (this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveEmpty;\n this._resolveEmpty = () => {\n existingResolve();\n resolve();\n };\n });\n }\n /**\n The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.\n\n @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.\n */\n async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }\n /**\n Size of the queue.\n */\n get size() {\n return this._queue.size;\n }\n /**\n Size of the queue, filtered by the given options.\n\n For example, this can be used to find the number of items remaining in the queue with a specific priority level.\n */\n sizeBy(options) {\n return this._queue.filter(options).length;\n }\n /**\n Number of pending promises.\n */\n get pending() {\n return this._pendingCount;\n }\n /**\n Whether the queue is currently paused.\n */\n get isPaused() {\n return this._isPaused;\n }\n get timeout() {\n return this._timeout;\n }\n /**\n Set the timeout for future operations.\n */\n set timeout(milliseconds) {\n this._timeout = milliseconds;\n }\n}\nexports.default = PQueue;\n","export default function isDocumentVisible() {\n if (typeof document !== 'undefined' &&\n typeof document.visibilityState !== 'undefined') {\n return document.visibilityState !== 'hidden';\n }\n // always assume it's visible\n return true;\n}\n","export default function isOnline() {\n if (typeof navigator.onLine !== 'undefined') {\n return navigator.onLine;\n }\n // always assume it's online\n return true;\n}\n","// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nvar table = new WeakMap();\n// counter of the key\nvar counter = 0;\n// hashes an array of objects and returns a string\nexport default function hash(args) {\n if (!args.length)\n return '';\n var key = 'arg';\n for (var i = 0; i < args.length; ++i) {\n var _hash = void 0;\n if (args[i] === null || typeof args[i] !== 'object') {\n // need to consider the case that args[i] is a string:\n // args[i] _hash\n // \"undefined\" -> '\"undefined\"'\n // undefined -> 'undefined'\n // 123 -> '123'\n // null -> 'null'\n // \"null\" -> '\"null\"'\n if (typeof args[i] === 'string') {\n _hash = '\"' + args[i] + '\"';\n }\n else {\n _hash = String(args[i]);\n }\n }\n else {\n if (!table.has(args[i])) {\n _hash = counter;\n table.set(args[i], counter++);\n }\n else {\n _hash = table.get(args[i]);\n }\n }\n key += '@' + _hash;\n }\n return key;\n}\n","import { mutate } from './use-swr';\nimport hash from './libs/hash';\nvar Cache = /** @class */ (function () {\n function Cache(initialData) {\n if (initialData === void 0) { initialData = {}; }\n this.__cache = new Map(Object.entries(initialData));\n this.__listeners = [];\n }\n Cache.prototype.get = function (key) {\n var _key = this.serializeKey(key)[0];\n return this.__cache.get(_key);\n };\n Cache.prototype.set = function (key, value, shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n var _key = this.serializeKey(key)[0];\n this.__cache.set(_key, value);\n if (shouldNotify)\n mutate(key, value, false);\n this.notify();\n };\n Cache.prototype.keys = function () {\n return Array.from(this.__cache.keys());\n };\n Cache.prototype.has = function (key) {\n var _key = this.serializeKey(key)[0];\n return this.__cache.has(_key);\n };\n Cache.prototype.clear = function (shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n if (shouldNotify)\n this.__cache.forEach(function (key) { return mutate(key, null, false); });\n this.__cache.clear();\n this.notify();\n };\n Cache.prototype.delete = function (key, shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n var _key = this.serializeKey(key)[0];\n if (shouldNotify)\n mutate(key, null, false);\n this.__cache.delete(_key);\n this.notify();\n };\n // TODO: introduce namespace for the cache\n Cache.prototype.serializeKey = function (key) {\n var args = null;\n if (typeof key === 'function') {\n try {\n key = key();\n }\n catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n if (Array.isArray(key)) {\n // args array\n args = key;\n key = hash(key);\n }\n else {\n // convert null to ''\n key = String(key || '');\n }\n var errorKey = key ? 'err@' + key : '';\n return [key, args, errorKey];\n };\n Cache.prototype.subscribe = function (listener) {\n var _this = this;\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n var isSubscribed = true;\n this.__listeners.push(listener);\n return function () {\n if (!isSubscribed)\n return;\n isSubscribed = false;\n var index = _this.__listeners.indexOf(listener);\n if (index > -1) {\n _this.__listeners[index] = _this.__listeners[_this.__listeners.length - 1];\n _this.__listeners.length--;\n }\n };\n };\n // Notify Cache subscribers about a change in the cache\n Cache.prototype.notify = function () {\n for (var _i = 0, _a = this.__listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener();\n }\n };\n return Cache;\n}());\nexport default Cache;\n","import deepEqual from 'fast-deep-equal';\nimport isDocumentVisible from './libs/is-document-visible';\nimport isOnline from './libs/is-online';\nimport Cache from './cache';\n// cache\nvar cache = new Cache();\n// state managers\nvar CONCURRENT_PROMISES = {};\nvar CONCURRENT_PROMISES_TS = {};\nvar FOCUS_REVALIDATORS = {};\nvar CACHE_REVALIDATORS = {};\nvar MUTATION_TS = {};\n// error retry\nfunction onErrorRetry(_, __, config, revalidate, opts) {\n if (!isDocumentVisible()) {\n // if it's hidden, stop\n // it will auto revalidate when focus\n return;\n }\n if (config.errorRetryCount && opts.retryCount > config.errorRetryCount) {\n return;\n }\n // exponential backoff\n var count = Math.min(opts.retryCount || 0, 8);\n var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;\n setTimeout(revalidate, timeout, opts);\n}\n// client side: need to adjust the config\n// based on the browser status\n// slow connection (<= 70Kbps)\nvar slowConnection = typeof window !== 'undefined' &&\n navigator['connection'] &&\n ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;\n// config\nvar defaultConfig = {\n // events\n onLoadingSlow: function () { },\n onSuccess: function () { },\n onError: function () { },\n onErrorRetry: onErrorRetry,\n errorRetryInterval: (slowConnection ? 10 : 5) * 1000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: (slowConnection ? 5 : 3) * 1000,\n refreshInterval: 0,\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n refreshWhenHidden: false,\n refreshWhenOffline: false,\n shouldRetryOnError: true,\n suspense: false,\n compare: deepEqual\n};\n// Focus revalidate\nvar eventsBinded = false;\nif (typeof window !== 'undefined' && window.addEventListener && !eventsBinded) {\n var revalidate = function () {\n if (!isDocumentVisible() || !isOnline())\n return;\n for (var key in FOCUS_REVALIDATORS) {\n if (FOCUS_REVALIDATORS[key][0])\n FOCUS_REVALIDATORS[key][0]();\n }\n };\n window.addEventListener('visibilitychange', revalidate, false);\n window.addEventListener('focus', revalidate, false);\n // only bind the events once\n eventsBinded = true;\n}\nexport { CONCURRENT_PROMISES, CONCURRENT_PROMISES_TS, FOCUS_REVALIDATORS, CACHE_REVALIDATORS, MUTATION_TS, cache };\nexport default defaultConfig;\n","import { createContext } from 'react';\nvar SWRConfigContext = createContext({});\nSWRConfigContext.displayName = 'SWRConfigContext';\nexport default SWRConfigContext;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { useCallback, useContext, useEffect, useLayoutEffect, useState, useRef, useMemo } from 'react';\nimport defaultConfig, { CACHE_REVALIDATORS, CONCURRENT_PROMISES, CONCURRENT_PROMISES_TS, FOCUS_REVALIDATORS, MUTATION_TS, cache } from './config';\nimport isDocumentVisible from './libs/is-document-visible';\nimport isOnline from './libs/is-online';\nimport throttle from './libs/throttle';\nimport SWRConfigContext from './swr-config-context';\nvar IS_SERVER = typeof window === 'undefined';\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nvar useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\nvar trigger = function (_key, shouldRevalidate) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n // we are ignoring the second argument which correspond to the arguments\n // the fetcher will receive when key is an array\n var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];\n if (!key)\n return Promise.resolve();\n var updaters = CACHE_REVALIDATORS[key];\n if (key && updaters) {\n var currentData = cache.get(key);\n var currentError = cache.get(keyErr);\n var promises = [];\n for (var i = 0; i < updaters.length; ++i) {\n promises.push(updaters[i](shouldRevalidate, currentData, currentError, i > 0));\n }\n // return new updated value\n return Promise.all(promises).then(function () { return cache.get(key); });\n }\n return Promise.resolve(cache.get(key));\n};\nvar broadcastState = function (key, data, error) {\n var updaters = CACHE_REVALIDATORS[key];\n if (key && updaters) {\n for (var i = 0; i < updaters.length; ++i) {\n updaters[i](false, data, error);\n }\n }\n};\nvar mutate = function (_key, _data, shouldRevalidate) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n return __awaiter(void 0, void 0, void 0, function () {\n var key, data, error, beforeMutationTs, beforeConcurrentPromisesTs, err_1, err_2, updaters, promises, i;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = cache.serializeKey(_key)[0];\n if (!key)\n return [2 /*return*/];\n // if there is no new data, call revalidate against the key\n if (typeof _data === 'undefined')\n return [2 /*return*/, trigger(_key, shouldRevalidate)\n // update timestamp\n ];\n // update timestamp\n MUTATION_TS[key] = Date.now() - 1;\n beforeMutationTs = MUTATION_TS[key];\n beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];\n if (!(_data && typeof _data === 'function')) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, _data(cache.get(key))];\n case 2:\n data = _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n error = err_1;\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 11];\n case 5:\n if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 10];\n _a.label = 6;\n case 6:\n _a.trys.push([6, 8, , 9]);\n return [4 /*yield*/, _data];\n case 7:\n data = _a.sent();\n return [3 /*break*/, 9];\n case 8:\n err_2 = _a.sent();\n error = err_2;\n return [3 /*break*/, 9];\n case 9: return [3 /*break*/, 11];\n case 10:\n data = _data;\n _a.label = 11;\n case 11:\n // Check if other mutations have occurred since we've started awaiting, if so then do not persist this change\n if (beforeMutationTs !== MUTATION_TS[key] ||\n beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {\n if (error)\n throw error;\n return [2 /*return*/, data];\n }\n if (typeof data !== 'undefined') {\n // update cached data, avoid notifying from the cache\n cache.set(key, data, false);\n }\n updaters = CACHE_REVALIDATORS[key];\n if (updaters) {\n promises = [];\n for (i = 0; i < updaters.length; ++i) {\n promises.push(updaters[i](!!shouldRevalidate, data, error, i > 0));\n }\n // return new updated value\n return [2 /*return*/, Promise.all(promises).then(function () { return cache.get(key); })];\n }\n // throw error or return data to be used by caller of mutate\n if (error)\n throw error;\n return [2 /*return*/, data];\n }\n });\n });\n};\nfunction useSWR() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _key, fn, config = {};\n if (args.length >= 1) {\n _key = args[0];\n }\n if (args.length > 2) {\n fn = args[1];\n config = args[2];\n }\n else {\n if (typeof args[1] === 'function') {\n fn = args[1];\n }\n else if (typeof args[1] === 'object') {\n config = args[1];\n }\n }\n // we assume `key` as the identifier of the request\n // `key` can change but `fn` shouldn't\n // (because `revalidate` only depends on `key`)\n // `keyErr` is the cache key for error objects\n var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2];\n config = Object.assign({}, defaultConfig, useContext(SWRConfigContext), config);\n if (typeof fn === 'undefined') {\n // use a global fetcher\n fn = config.fetcher;\n }\n var initialData = cache.get(key) || config.initialData;\n var initialError = cache.get(keyErr);\n // if a state is accessed (data, error or isValidating),\n // we add the state to dependencies so if the state is\n // updated in the future, we can trigger a rerender\n var stateDependencies = useRef({\n data: false,\n error: false,\n isValidating: false\n });\n var stateRef = useRef({\n data: initialData,\n error: initialError,\n isValidating: false\n });\n var rerender = useState(null)[1];\n var dispatch = useCallback(function (payload) {\n var shouldUpdateState = false;\n for (var k in payload) {\n stateRef.current[k] = payload[k];\n if (stateDependencies.current[k]) {\n shouldUpdateState = true;\n }\n }\n if (shouldUpdateState || config.suspense) {\n rerender({});\n }\n }, []);\n // error ref inside revalidate (is last request errored?)\n var unmountedRef = useRef(false);\n var keyRef = useRef(key);\n // do unmount check for callbacks\n var eventsRef = useRef({\n emit: function (event) {\n var params = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n params[_i - 1] = arguments[_i];\n }\n if (unmountedRef.current)\n return;\n config[event].apply(config, params);\n }\n });\n var boundMutate = useCallback(function (data, shouldRevalidate) {\n return mutate(key, data, shouldRevalidate);\n }, [key]);\n // start a revalidation\n var revalidate = useCallback(function (revalidateOpts) {\n if (revalidateOpts === void 0) { revalidateOpts = {}; }\n return __awaiter(_this, void 0, void 0, function () {\n var loading, shouldDeduping, newData, startAt, newState, err_3, retryCount;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!key || !fn)\n return [2 /*return*/, false];\n if (unmountedRef.current)\n return [2 /*return*/, false];\n revalidateOpts = Object.assign({ dedupe: false }, revalidateOpts);\n loading = true;\n shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && revalidateOpts.dedupe;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 6, , 7]);\n dispatch({\n isValidating: true\n });\n newData = void 0;\n startAt = void 0;\n if (!shouldDeduping) return [3 /*break*/, 3];\n // there's already an ongoing request,\n // this one needs to be deduplicated.\n startAt = CONCURRENT_PROMISES_TS[key];\n return [4 /*yield*/, CONCURRENT_PROMISES[key]];\n case 2:\n newData = _a.sent();\n return [3 /*break*/, 5];\n case 3:\n // if not deduping the request (hard revalidate) but\n // there're other ongoing request(s) at the same time,\n // we need to ignore the other result(s) to avoid\n // possible race conditions:\n // req1------------------>res1\n // req2-------->res2\n // in that case, the second response should not be overridden\n // by the first one.\n if (CONCURRENT_PROMISES[key]) {\n // we can mark it as a mutation to ignore\n // all requests which are fired before this one\n MUTATION_TS[key] = Date.now() - 1;\n }\n // if no cache being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && !cache.get(key)) {\n setTimeout(function () {\n if (loading)\n eventsRef.current.emit('onLoadingSlow', key, config);\n }, config.loadingTimeout);\n }\n if (fnArgs !== null) {\n CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);\n }\n else {\n CONCURRENT_PROMISES[key] = fn(key);\n }\n CONCURRENT_PROMISES_TS[key] = startAt = Date.now();\n return [4 /*yield*/, CONCURRENT_PROMISES[key]];\n case 4:\n newData = _a.sent();\n setTimeout(function () {\n delete CONCURRENT_PROMISES[key];\n delete CONCURRENT_PROMISES_TS[key];\n }, config.dedupingInterval);\n // trigger the success event,\n // only do this for the original request.\n eventsRef.current.emit('onSuccess', newData, key, config);\n _a.label = 5;\n case 5:\n // if the revalidation happened earlier than the local mutation,\n // we have to ignore the result because it could override.\n // meanwhile, a new revalidation should be triggered by the mutation.\n if (MUTATION_TS[key] && startAt <= MUTATION_TS[key]) {\n dispatch({ isValidating: false });\n return [2 /*return*/, false];\n }\n cache.set(key, newData, false);\n cache.set(keyErr, undefined, false);\n newState = {\n isValidating: false\n };\n if (typeof stateRef.current.error !== 'undefined') {\n // we don't have an error\n newState.error = undefined;\n }\n if (!config.compare(stateRef.current.data, newData)) {\n // deep compare to avoid extra re-render\n // data changed\n newState.data = newData;\n }\n // merge the new state\n dispatch(newState);\n if (!shouldDeduping) {\n // also update other hooks\n broadcastState(key, newData, undefined);\n }\n return [3 /*break*/, 7];\n case 6:\n err_3 = _a.sent();\n delete CONCURRENT_PROMISES[key];\n delete CONCURRENT_PROMISES_TS[key];\n cache.set(keyErr, err_3, false);\n // get a new error\n // don't use deep equal for errors\n if (stateRef.current.error !== err_3) {\n // we keep the stale data\n dispatch({\n isValidating: false,\n error: err_3\n });\n if (!shouldDeduping) {\n // also broadcast to update other hooks\n broadcastState(key, undefined, err_3);\n }\n }\n // events and retry\n eventsRef.current.emit('onError', err_3, key, config);\n if (config.shouldRetryOnError) {\n retryCount = (revalidateOpts.retryCount || 0) + 1;\n eventsRef.current.emit('onErrorRetry', err_3, key, config, revalidate, Object.assign({ dedupe: true }, revalidateOpts, { retryCount: retryCount }));\n }\n return [3 /*break*/, 7];\n case 7:\n loading = false;\n return [2 /*return*/, true];\n }\n });\n });\n }, [key]);\n // mounted (client side rendering)\n useIsomorphicLayoutEffect(function () {\n if (!key)\n return undefined;\n // after `key` updates, we need to mark it as mounted\n unmountedRef.current = false;\n // after the component is mounted (hydrated),\n // we need to update the data from the cache\n // and trigger a revalidation\n var currentHookData = stateRef.current.data;\n var latestKeyedData = cache.get(key) || config.initialData;\n // update the state if the key changed (not the inital render) or cache updated\n if (keyRef.current !== key ||\n !config.compare(currentHookData, latestKeyedData)) {\n dispatch({ data: latestKeyedData });\n keyRef.current = key;\n }\n // revalidate with deduping\n var softRevalidate = function () { return revalidate({ dedupe: true }); };\n // trigger a revalidation\n if (config.revalidateOnMount ||\n (!config.initialData && config.revalidateOnMount === undefined)) {\n if (typeof latestKeyedData !== 'undefined' &&\n !IS_SERVER &&\n window['requestIdleCallback']) {\n // delay revalidate if there's cache\n // to not block the rendering\n window['requestIdleCallback'](softRevalidate);\n }\n else {\n softRevalidate();\n }\n }\n // whenever the window gets focused, revalidate\n var onFocus;\n if (config.revalidateOnFocus) {\n // throttle: avoid being called twice from both listeners\n // and tabs being switched quickly\n onFocus = throttle(softRevalidate, config.focusThrottleInterval);\n if (!FOCUS_REVALIDATORS[key]) {\n FOCUS_REVALIDATORS[key] = [onFocus];\n }\n else {\n FOCUS_REVALIDATORS[key].push(onFocus);\n }\n }\n // register global cache update listener\n var onUpdate = function (shouldRevalidate, updatedData, updatedError, dedupe) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n if (dedupe === void 0) { dedupe = true; }\n // update hook state\n var newState = {};\n var needUpdate = false;\n if (typeof updatedData !== 'undefined' &&\n !config.compare(stateRef.current.data, updatedData)) {\n newState.data = updatedData;\n needUpdate = true;\n }\n // always update error\n // because it can be `undefined`\n if (stateRef.current.error !== updatedError) {\n newState.error = updatedError;\n needUpdate = true;\n }\n if (needUpdate) {\n dispatch(newState);\n }\n if (shouldRevalidate) {\n if (dedupe) {\n return softRevalidate();\n }\n else {\n return revalidate();\n }\n }\n return false;\n };\n // add updater to listeners\n if (!CACHE_REVALIDATORS[key]) {\n CACHE_REVALIDATORS[key] = [onUpdate];\n }\n else {\n CACHE_REVALIDATORS[key].push(onUpdate);\n }\n // set up reconnecting when the browser regains network connection\n var reconnect = null;\n if (!IS_SERVER && window.addEventListener && config.revalidateOnReconnect) {\n window.addEventListener('online', (reconnect = softRevalidate));\n }\n return function () {\n // cleanup\n dispatch = function () { return null; };\n // mark it as unmounted\n unmountedRef.current = true;\n if (onFocus && FOCUS_REVALIDATORS[key]) {\n var revalidators = FOCUS_REVALIDATORS[key];\n var index = revalidators.indexOf(onFocus);\n if (index >= 0) {\n // 10x faster than splice\n // https://jsperf.com/array-remove-by-index\n revalidators[index] = revalidators[revalidators.length - 1];\n revalidators.pop();\n }\n }\n if (CACHE_REVALIDATORS[key]) {\n var revalidators = CACHE_REVALIDATORS[key];\n var index = revalidators.indexOf(onUpdate);\n if (index >= 0) {\n revalidators[index] = revalidators[revalidators.length - 1];\n revalidators.pop();\n }\n }\n if (!IS_SERVER && window.removeEventListener && reconnect !== null) {\n window.removeEventListener('online', reconnect);\n }\n };\n }, [key, revalidate]);\n // set up polling\n useIsomorphicLayoutEffect(function () {\n var timer = null;\n var tick = function () { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(!stateRef.current.error &&\n (config.refreshWhenHidden || isDocumentVisible()) &&\n (config.refreshWhenOffline || isOnline()))) return [3 /*break*/, 2];\n // only revalidate when the page is visible\n // if API request errored, we stop polling in this round\n // and let the error retry function handle it\n return [4 /*yield*/, revalidate({ dedupe: true })];\n case 1:\n // only revalidate when the page is visible\n // if API request errored, we stop polling in this round\n // and let the error retry function handle it\n _a.sent();\n _a.label = 2;\n case 2:\n if (config.refreshInterval) {\n timer = setTimeout(tick, config.refreshInterval);\n }\n return [2 /*return*/];\n }\n });\n }); };\n if (config.refreshInterval) {\n timer = setTimeout(tick, config.refreshInterval);\n }\n return function () {\n if (timer)\n clearTimeout(timer);\n };\n }, [\n config.refreshInterval,\n config.refreshWhenHidden,\n config.refreshWhenOffline,\n revalidate\n ]);\n // suspense\n if (config.suspense) {\n // in suspense mode, we can't return empty state\n // (it should be suspended)\n // try to get data and error from cache\n var latestData = cache.get(key) || initialData;\n var latestError = cache.get(keyErr) || initialError;\n if (typeof latestData === 'undefined' &&\n typeof latestError === 'undefined') {\n // need to start the request if it hasn't\n if (!CONCURRENT_PROMISES[key]) {\n // trigger revalidate immediately\n // to get the promise\n revalidate();\n }\n if (CONCURRENT_PROMISES[key] &&\n typeof CONCURRENT_PROMISES[key].then === 'function') {\n // if it is a promise\n throw CONCURRENT_PROMISES[key];\n }\n // it's a value, return it directly (override)\n latestData = CONCURRENT_PROMISES[key];\n }\n if (typeof latestData === 'undefined' && latestError) {\n // in suspense mode, throw error if there's no content\n throw latestError;\n }\n // return the latest data / error from cache\n // in case `key` has changed\n return {\n error: latestError,\n data: latestData,\n revalidate: revalidate,\n mutate: boundMutate,\n isValidating: stateRef.current.isValidating\n };\n }\n // define returned state\n // can be memorized since the state is a ref\n return useMemo(function () {\n var state = { revalidate: revalidate, mutate: boundMutate };\n Object.defineProperties(state, {\n error: {\n // `key` might be changed in the upcoming hook re-render,\n // but the previous state will stay\n // so we need to match the latest key and data (fallback to `initialData`)\n get: function () {\n stateDependencies.current.error = true;\n return keyRef.current === key ? stateRef.current.error : initialError;\n },\n enumerable: true\n },\n data: {\n get: function () {\n stateDependencies.current.data = true;\n return keyRef.current === key ? stateRef.current.data : initialData;\n },\n enumerable: true\n },\n isValidating: {\n get: function () {\n stateDependencies.current.isValidating = true;\n return stateRef.current.isValidating;\n },\n enumerable: true\n }\n });\n return state;\n }, [revalidate]);\n}\nvar SWRConfig = SWRConfigContext.Provider;\nexport { trigger, mutate, SWRConfig };\nexport default useSWR;\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport React, { useCallback, useMemo, useState, useRef } from 'react';\nimport { cache } from './config';\n/*\nThe idea\n\nA \"Page\" component renders the content of 1 API request, it accepts an offset (in this example it's from),\nuses a SWR hook (useSWR(API + '?limit=' + limit + '&from=' + from)) and returns items (Projects).\n\nThe UI:\n +------------------------------------------+\n | Projects |\n+------------------------------------------------------+\n| | +----------------+ | |\n| | | |\n| | +------------+ | |\n| | | +--> 1 Page\n| | +-----------------+ | |\n| | | | /projects/list?limit=4\n| | +---------+ | |\n+------------------------------------------------------+\n | |\n | +------------+ | + /projects/list?limit=4&from=123\n | | |\n | +----------------+ | |\n | | |\n | +---------+ | |\n | | |\n | +--------------+ | +\n | |\n | +-------------------+ | + /projects/list?limit=4&from=456\n | | |\n | +------------+ | |\n | | |\n | +----------------+ | |\n | | |\n | | +\n\nThe API\n// (inside `render`)\n\nfunction App () {\n const {\n pages, // an array of each page component\n pageSWRs, // an array of SWRs of each page\n isLoadingMore,\n isReachingEnd,\n isEmpty,\n loadMore\n } = useSWRPages(\n 'project-page', // key of this page\n\n // ======== the actual Page component!\n ({ offset, withSWR }) => {\n // required: use `withSWR` to wrap your main SWR (source of your pagination API)\n const { data } = withSWR(\n useSWR(API + '?limit=10&from=' + offset) // request projects with offset\n )\n if (!data) return <Placeholder>\n return data.projects.map(project => <Card project={project} team={team}>)\n },\n // ========\n\n // a function accepts a SWR's `data`, and returns the offset of the next page (or null)\n data => data && data.length >= 10 ? data[data.length - 1].createdAt : null,\n\n // (optional) outside deps of your Page component. in this case it's empty\n []\n )\n\n // ...\n\n if (isEmpty) return <EmptyProjectsPage/>\n\n return <div>\n {pages}\n {isReachingEnd\n ? null\n : <button loading={isLoadingMore} onClick={loadMore}>Load More</button>}\n </div>\n}\n*/\nvar pageCacheMap = new Map();\nexport function useSWRPages(pageKey, pageFn, SWRToOffset, deps) {\n if (deps === void 0) { deps = []; }\n var pageCountKey = \"_swr_page_count_\" + pageKey;\n var pageOffsetKey = \"_swr_page_offset_\" + pageKey;\n var _a = useState(cache.get(pageCountKey) || 1), pageCount = _a[0], setPageCount = _a[1];\n var _b = useState(cache.get(pageOffsetKey) || [null]), pageOffsets = _b[0], setPageOffsets = _b[1];\n var _c = useState([]), pageSWRs = _c[0], setPageSWRs = _c[1];\n var pageFnRef = useRef(pageFn);\n var emptyPageRef = useRef(false);\n // Page component (wraps `pageFn`)\n // for performance reason we need to memorize it\n var Page = useCallback(function (props) {\n // render the page component\n var dataList = pageFnRef.current(props);\n // if dataList is [], we can assume this page is empty\n // TODO: this API is not stable\n if (dataList && !dataList.length) {\n emptyPageRef.current = true;\n }\n else {\n emptyPageRef.current = false;\n }\n return dataList;\n }, []);\n // Doesn't have a next page\n var isReachingEnd = pageOffsets[pageCount] === null;\n var isLoadingMore = pageCount === pageOffsets.length;\n var isEmpty = isReachingEnd && pageCount === 1 && emptyPageRef.current;\n var loadMore = useCallback(function () {\n if (isLoadingMore || isReachingEnd)\n return;\n setPageCount(function (c) {\n cache.set(pageCountKey, c + 1);\n return c + 1;\n });\n }, [isLoadingMore || isReachingEnd]);\n var _pageFn = useCallback(pageFn, deps);\n pageFnRef.current = _pageFn;\n var pages = useMemo(function () {\n var getWithSWR = function (id) { return function (swr) {\n if (!pageSWRs[id] ||\n pageSWRs[id].data !== swr.data ||\n pageSWRs[id].error !== swr.error ||\n pageSWRs[id].revalidate !== swr.revalidate) {\n // hoist side effects: setPageSWRs and setPageOffsets -- https://reactjs.org/blog/2020/02/26/react-v16.13.0.html#warnings-for-some-updates-during-render\n setTimeout(function () {\n setPageSWRs(function (swrs) {\n var _swrs = __spreadArrays(swrs);\n _swrs[id] = {\n data: swr.data,\n error: swr.error,\n revalidate: swr.revalidate,\n isValidating: swr.isValidating,\n mutate: swr.mutate\n };\n return _swrs;\n });\n if (typeof swr.data !== 'undefined') {\n // set next page's offset\n var newPageOffset_1 = SWRToOffset(swr, id);\n if (pageOffsets[id + 1] !== newPageOffset_1) {\n setPageOffsets(function (arr) {\n var _arr = __spreadArrays(arr);\n _arr[id + 1] = newPageOffset_1;\n cache.set(pageOffsetKey, _arr);\n return _arr;\n });\n }\n }\n });\n }\n return swr;\n }; };\n // render each page\n var p = [];\n if (!pageCacheMap.has(pageKey)) {\n pageCacheMap.set(pageKey, []);\n }\n var pageCache = pageCacheMap.get(pageKey);\n for (var i = 0; i < pageCount; ++i) {\n if (!pageCache[i] ||\n pageCache[i].offset !== pageOffsets[i] ||\n pageCache[i].pageFn !== _pageFn) {\n // when props change or at init\n // render the page and cache it\n pageCache[i] = {\n component: (React.createElement(Page, { key: \"page-\" + pageOffsets[i] + \"-\" + i, offset: pageOffsets[i], withSWR: getWithSWR(i) })),\n pageFn: _pageFn,\n offset: pageOffsets[i]\n };\n }\n p.push(pageCache[i].component);\n }\n return p;\n }, [_pageFn, pageCount, pageSWRs, pageOffsets, pageKey]);\n return {\n pages: pages,\n pageCount: pageCount,\n pageSWRs: pageSWRs,\n isLoadingMore: isLoadingMore,\n isReachingEnd: isReachingEnd,\n isEmpty: isEmpty,\n loadMore: loadMore\n };\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n\n // If the node is empty, this is good enough\n if (zeroSize && !element.innerHTML) return true;\n\n // Otherwise we need to check some styles\n var style = window.getComputedStyle(element);\n return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" ||\n // if 'overflow: visible' set, check if there is actually any overflow\n element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue(\"display\") == \"none\";\n}\n\nfunction visible(element) {\n var parentElement = element;\n while (parentElement) {\n if (parentElement === document.body) break;\n if (hidesContents(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute(\"tabindex\");\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n return [].slice.call(element.querySelectorAll(\"*\"), 0).filter(tabbable);\n}\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.assertNodeList = assertNodeList;\nexports.setElement = setElement;\nexports.validateElement = validateElement;\nexports.hide = hide;\nexports.show = show;\nexports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;\nexports.resetForTesting = resetForTesting;\n\nvar _warning = require(\"warning\");\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _safeHTMLElement = require(\"./safeHTMLElement\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar globalElement = null;\n\nfunction assertNodeList(nodeList, selector) {\n if (!nodeList || !nodeList.length) {\n throw new Error(\"react-modal: No elements were found for selector \" + selector + \".\");\n }\n}\n\nfunction setElement(element) {\n var useElement = element;\n if (typeof useElement === \"string\" && _safeHTMLElement.canUseDOM) {\n var el = document.querySelectorAll(useElement);\n assertNodeList(el, useElement);\n useElement = \"length\" in el ? el[0] : el;\n }\n globalElement = useElement || globalElement;\n return globalElement;\n}\n\nfunction validateElement(appElement) {\n if (!appElement && !globalElement) {\n (0, _warning2.default)(false, [\"react-modal: App element is not defined.\", \"Please use `Modal.setAppElement(el)` or set `appElement={el}`.\", \"This is needed so screen readers don't see main content\", \"when modal is opened. It is not recommended, but you can opt-out\", \"by setting `ariaHideApp={false}`.\"].join(\" \"));\n\n return false;\n }\n\n return true;\n}\n\nfunction hide(appElement) {\n if (validateElement(appElement)) {\n (appElement || globalElement).setAttribute(\"aria-hidden\", \"true\");\n }\n}\n\nfunction show(appElement) {\n if (validateElement(appElement)) {\n (appElement || globalElement).removeAttribute(\"aria-hidden\");\n }\n}\n\nfunction documentNotReadyOrSSRTesting() {\n globalElement = null;\n}\n\nfunction resetForTesting() {\n globalElement = null;\n}","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Tracks portals that are open and emits events to subscribers\n\nvar PortalOpenInstances = function PortalOpenInstances() {\n var _this = this;\n\n _classCallCheck(this, PortalOpenInstances);\n\n this.register = function (openInstance) {\n if (_this.openInstances.indexOf(openInstance) !== -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Cannot register modal instance that's already open\");\n }\n return;\n }\n _this.openInstances.push(openInstance);\n _this.emit(\"register\");\n };\n\n this.deregister = function (openInstance) {\n var index = _this.openInstances.indexOf(openInstance);\n if (index === -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Unable to deregister \" + openInstance + \" as \" + \"it was never registered\");\n }\n return;\n }\n _this.openInstances.splice(index, 1);\n _this.emit(\"deregister\");\n };\n\n this.subscribe = function (callback) {\n _this.subscribers.push(callback);\n };\n\n this.emit = function (eventType) {\n _this.subscribers.forEach(function (subscriber) {\n return subscriber(eventType,\n // shallow copy to avoid accidental mutation\n _this.openInstances.slice());\n });\n };\n\n this.openInstances = [];\n this.subscribers = [];\n};\n\nvar portalOpenInstances = new PortalOpenInstances();\n\nexports.default = portalOpenInstances;\nmodule.exports = exports[\"default\"];","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n return a!==a && b!==b;\n};\n","var data = {\n\t\"body\": \"<path d=\\\"M18 8a2 2 0 0 1 2 2v10c0 1.1-.9 2-2 2H6a2 2 0 0 1-2-2V10c0-1.11.89-2 2-2h1V6C7 3.24 9.24.998 12 .998S17 3.24 17 6v2h1m-6-5c-1.66 0-3 1.34-3 3v2h6V6c0-1.66-1.34-3-3-3m-1 16l6.25-6.24l-1.41-1.41L11 16.18L8.41 13.6L7 15l4 4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M18 1c-2.76 0-5 2.24-5 5v2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12c1.11 0 2-.89 2-2V10a2 2 0 0 0-2-2h-1V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2h2V6c0-2.76-2.24-5-5-5m-8 12a2 2 0 0 1 2 2c0 1.11-.89 2-2 2a2 2 0 1 1 0-4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m6.16 12.31c-1.56 0-2.97.58-4.05 1.52L6 13.72V19h5.28l-2.13-2.12c.82-.68 1.85-1.1 3.01-1.1c2.07 0 3.84 1.35 4.45 3.22l1.39-.46c-.81-2.45-3.12-4.23-5.84-4.23z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 5V1L7 6l5 5V7a6 6 0 0 1 6 6a6 6 0 0 1-6 6a6 6 0 0 1-6-6H4a8 8 0 0 0 8 8a8 8 0 0 0 8-8a8 8 0 0 0-8-8z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4s8-1.79 8-4s-3.58-4-8-4M4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4m0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M21.71 20.29l-1.42 1.42a1 1 0 0 1-1.41 0L7 9.85A3.81 3.81 0 0 1 6 10a4 4 0 0 1-3.78-5.3l2.54 2.54l.53-.53l1.42-1.42l.53-.53L4.7 2.22A4 4 0 0 1 10 6a3.81 3.81 0 0 1-.15 1l11.86 11.88a1 1 0 0 1 0 1.41M2.29 18.88a1 1 0 0 0 0 1.41l1.42 1.42a1 1 0 0 0 1.41 0l5.47-5.46l-2.83-2.83M20 2l-4 2v2l-2.17 2.17l2 2L18 8h2l2-4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 8l-1.33.09C9.81 7.07 7.4 4.5 5 4.5c0 0-1.97 2.96-.04 6.91c-.55.83-.89 1.26-.96 2.25l-1.93.29l.21.98l1.76-.26l.14.71l-1.57.94l.47.89l1.45-.89C5.68 18.76 8.59 20 12 20s6.32-1.24 7.47-3.68l1.45.89l.47-.89l-1.57-.94l.14-.71l1.76.26l.21-.98l-1.93-.29c-.07-.99-.41-1.42-.96-2.25C20.97 7.46 19 4.5 19 4.5c-2.4 0-4.81 2.57-5.67 3.59L12 8m-3 3a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m6 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 3h2l-.7 1.39c.2.64.76 1.11 1.45 1.11a1.5 1.5 0 0 0 1.5-1.5h.5a2 2 0 0 1-2 2c-.75 0-1.4-.41-1.75-1c-.35.59-1 1-1.75 1a2 2 0 0 1-2-2h.5a1.5 1.5 0 0 0 1.5 1.5c.69 0 1.25-.47 1.45-1.11L11 14z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M9 16v-6H5l7-7l7 7h-4v6H9m-4 4v-2h14v2H5z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M16.84 2.73c-.39 0-.77.15-1.07.44l-2.12 2.12l5.3 5.31l2.12-2.1c.6-.61.6-1.56 0-2.14L17.9 3.17c-.3-.29-.68-.44-1.06-.44M12.94 6l-8.1 8.11l2.56.28l.18 2.29l2.28.17l.29 2.56l8.1-8.11m-14 3.74L2.5 21.73l6.7-1.79l-.24-2.16l-2.31-.17l-.18-2.32\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M13 3v6h8V3m-8 18h8V11h-8M3 21h8v-6H3m0-2h8V3H3v10z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M18.68 12.32a4.49 4.49 0 0 0-6.36.01a4.49 4.49 0 0 0 0 6.36a4.508 4.508 0 0 0 5.57.63L21 22.39L22.39 21l-3.09-3.11c1.13-1.77.87-4.09-.62-5.57m-1.41 4.95c-.98.98-2.56.97-3.54 0c-.97-.98-.97-2.56.01-3.54c.97-.97 2.55-.97 3.53 0c.97.98.97 2.56 0 3.54M10.9 20.1a6.527 6.527 0 0 1-1.48-2.32C6.27 17.25 4 15.76 4 14v3c0 2.21 3.58 4 8 4c-.4-.26-.77-.56-1.1-.9M4 9v3c0 1.68 2.07 3.12 5 3.7v-.2c0-.93.2-1.85.58-2.69C6.34 12.3 4 10.79 4 9m8-6C7.58 3 4 4.79 4 7c0 2 3 3.68 6.85 4h.05c1.2-1.26 2.86-2 4.6-2c.91 0 1.81.19 2.64.56A3.215 3.215 0 0 0 20 7c0-2.21-3.58-4-8-4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 20a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 7a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M19 20H4a2 2 0 0 1-2-2V6c0-1.11.89-2 2-2h6l2 2h7a2 2 0 0 1 2 2H4v10l2.14-8h17.07l-2.28 8.5c-.23.87-1.01 1.5-1.93 1.5z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M21 17H7V3h14m0-2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2M3 5H1v16a2 2 0 0 0 2 2h16v-2H3m12.96-10.71l-2.75 3.54l-1.96-2.36L8.5 15h11l-3.54-4.71z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M5.5 7A1.5 1.5 0 0 1 4 5.5A1.5 1.5 0 0 1 5.5 4A1.5 1.5 0 0 1 7 5.5A1.5 1.5 0 0 1 5.5 7m15.91 4.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.11 0-2 .89-2 2v7c0 .55.22 1.05.59 1.41l8.99 9c.37.36.87.59 1.42.59c.55 0 1.05-.23 1.41-.59l7-7c.37-.36.59-.86.59-1.41c0-.56-.23-1.06-.59-1.42z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","var data = {\n\t\"body\": \"<path d=\\\"M15 9H5V5h10m-3 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3a3 3 0 0 1 3 3a3 3 0 0 1-3 3m5-16H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Modal = require(\"./components/Modal\");\n\nvar _Modal2 = _interopRequireDefault(_Modal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Modal2.default;\nmodule.exports = exports[\"default\"];","var data = {\n\t\"body\": \"<path d=\\\"M22 16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2h12a2 2 0 0 1 2 2v12m-6 4v2H4a2 2 0 0 1-2-2V7h2v13h12m-3-6l7-7l-1.41-1.41L13 11.17L9.91 8.09L8.5 9.5L13 14z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n return a!==a && b!==b;\n};\n","export default function isDocumentVisible() {\n if (typeof document !== 'undefined' &&\n typeof document.visibilityState !== 'undefined') {\n return document.visibilityState !== 'hidden';\n }\n // always assume it's visible\n return true;\n}\n","export default function isOnline() {\n if (typeof navigator.onLine !== 'undefined') {\n return navigator.onLine;\n }\n // always assume it's online\n return true;\n}\n","// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nvar table = new WeakMap();\n// counter of the key\nvar counter = 0;\n// hashes an array of objects and returns a string\nexport default function hash(args) {\n if (!args.length)\n return '';\n var key = 'arg';\n for (var i = 0; i < args.length; ++i) {\n var _hash = void 0;\n if (args[i] === null || typeof args[i] !== 'object') {\n // need to consider the case that args[i] is a string:\n // args[i] _hash\n // \"undefined\" -> '\"undefined\"'\n // undefined -> 'undefined'\n // 123 -> '123'\n // null -> 'null'\n // \"null\" -> '\"null\"'\n if (typeof args[i] === 'string') {\n _hash = '\"' + args[i] + '\"';\n }\n else {\n _hash = String(args[i]);\n }\n }\n else {\n if (!table.has(args[i])) {\n _hash = counter;\n table.set(args[i], counter++);\n }\n else {\n _hash = table.get(args[i]);\n }\n }\n key += '@' + _hash;\n }\n return key;\n}\n","import { mutate } from './use-swr';\nimport hash from './libs/hash';\nvar Cache = /** @class */ (function () {\n function Cache(initialData) {\n if (initialData === void 0) { initialData = {}; }\n this.__cache = new Map(Object.entries(initialData));\n this.__listeners = [];\n }\n Cache.prototype.get = function (key) {\n var _key = this.serializeKey(key)[0];\n return this.__cache.get(_key);\n };\n Cache.prototype.set = function (key, value, shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n var _key = this.serializeKey(key)[0];\n this.__cache.set(_key, value);\n if (shouldNotify)\n mutate(key, value, false);\n this.notify();\n };\n Cache.prototype.keys = function () {\n return Array.from(this.__cache.keys());\n };\n Cache.prototype.has = function (key) {\n var _key = this.serializeKey(key)[0];\n return this.__cache.has(_key);\n };\n Cache.prototype.clear = function (shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n if (shouldNotify)\n this.__cache.forEach(function (key) { return mutate(key, null, false); });\n this.__cache.clear();\n this.notify();\n };\n Cache.prototype.delete = function (key, shouldNotify) {\n if (shouldNotify === void 0) { shouldNotify = true; }\n var _key = this.serializeKey(key)[0];\n if (shouldNotify)\n mutate(key, null, false);\n this.__cache.delete(_key);\n this.notify();\n };\n // TODO: introduce namespace for the cache\n Cache.prototype.serializeKey = function (key) {\n var args = null;\n if (typeof key === 'function') {\n try {\n key = key();\n }\n catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n if (Array.isArray(key)) {\n // args array\n args = key;\n key = hash(key);\n }\n else {\n // convert null to ''\n key = String(key || '');\n }\n var errorKey = key ? 'err@' + key : '';\n return [key, args, errorKey];\n };\n Cache.prototype.subscribe = function (listener) {\n var _this = this;\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n var isSubscribed = true;\n this.__listeners.push(listener);\n return function () {\n if (!isSubscribed)\n return;\n isSubscribed = false;\n var index = _this.__listeners.indexOf(listener);\n if (index > -1) {\n _this.__listeners[index] = _this.__listeners[_this.__listeners.length - 1];\n _this.__listeners.length--;\n }\n };\n };\n // Notify Cache subscribers about a change in the cache\n Cache.prototype.notify = function () {\n for (var _i = 0, _a = this.__listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener();\n }\n };\n return Cache;\n}());\nexport default Cache;\n","import deepEqual from 'fast-deep-equal';\nimport isDocumentVisible from './libs/is-document-visible';\nimport isOnline from './libs/is-online';\nimport Cache from './cache';\n// cache\nvar cache = new Cache();\n// state managers\nvar CONCURRENT_PROMISES = {};\nvar CONCURRENT_PROMISES_TS = {};\nvar FOCUS_REVALIDATORS = {};\nvar CACHE_REVALIDATORS = {};\nvar MUTATION_TS = {};\n// error retry\nfunction onErrorRetry(_, __, config, revalidate, opts) {\n if (!isDocumentVisible()) {\n // if it's hidden, stop\n // it will auto revalidate when focus\n return;\n }\n if (config.errorRetryCount && opts.retryCount > config.errorRetryCount) {\n return;\n }\n // exponential backoff\n var count = Math.min(opts.retryCount || 0, 8);\n var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;\n setTimeout(revalidate, timeout, opts);\n}\n// client side: need to adjust the config\n// based on the browser status\n// slow connection (<= 70Kbps)\nvar slowConnection = typeof window !== 'undefined' &&\n navigator['connection'] &&\n ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;\n// config\nvar defaultConfig = {\n // events\n onLoadingSlow: function () { },\n onSuccess: function () { },\n onError: function () { },\n onErrorRetry: onErrorRetry,\n errorRetryInterval: (slowConnection ? 10 : 5) * 1000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: (slowConnection ? 5 : 3) * 1000,\n refreshInterval: 0,\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n refreshWhenHidden: false,\n refreshWhenOffline: false,\n shouldRetryOnError: true,\n suspense: false,\n compare: deepEqual\n};\n// Focus revalidate\nvar eventsBinded = false;\nif (typeof window !== 'undefined' && window.addEventListener && !eventsBinded) {\n var revalidate = function () {\n if (!isDocumentVisible() || !isOnline())\n return;\n for (var key in FOCUS_REVALIDATORS) {\n if (FOCUS_REVALIDATORS[key][0])\n FOCUS_REVALIDATORS[key][0]();\n }\n };\n window.addEventListener('visibilitychange', revalidate, false);\n window.addEventListener('focus', revalidate, false);\n // only bind the events once\n eventsBinded = true;\n}\nexport { CONCURRENT_PROMISES, CONCURRENT_PROMISES_TS, FOCUS_REVALIDATORS, CACHE_REVALIDATORS, MUTATION_TS, cache };\nexport default defaultConfig;\n","export default function throttle(fn, interval) {\n var pending = false;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (pending)\n return;\n pending = true;\n fn.apply(void 0, args);\n setTimeout(function () { return (pending = false); }, interval);\n };\n}\n","import { createContext } from 'react';\nvar SWRConfigContext = createContext({});\nSWRConfigContext.displayName = 'SWRConfigContext';\nexport default SWRConfigContext;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { useCallback, useContext, useEffect, useLayoutEffect, useState, useRef, useMemo } from 'react';\nimport defaultConfig, { CACHE_REVALIDATORS, CONCURRENT_PROMISES, CONCURRENT_PROMISES_TS, FOCUS_REVALIDATORS, MUTATION_TS, cache } from './config';\nimport isDocumentVisible from './libs/is-document-visible';\nimport isOnline from './libs/is-online';\nimport throttle from './libs/throttle';\nimport SWRConfigContext from './swr-config-context';\nvar IS_SERVER = typeof window === 'undefined';\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nvar useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\nvar trigger = function (_key, shouldRevalidate) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n // we are ignoring the second argument which correspond to the arguments\n // the fetcher will receive when key is an array\n var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];\n if (!key)\n return Promise.resolve();\n var updaters = CACHE_REVALIDATORS[key];\n if (key && updaters) {\n var currentData = cache.get(key);\n var currentError = cache.get(keyErr);\n var promises = [];\n for (var i = 0; i < updaters.length; ++i) {\n promises.push(updaters[i](shouldRevalidate, currentData, currentError, i > 0));\n }\n // return new updated value\n return Promise.all(promises).then(function () { return cache.get(key); });\n }\n return Promise.resolve(cache.get(key));\n};\nvar broadcastState = function (key, data, error) {\n var updaters = CACHE_REVALIDATORS[key];\n if (key && updaters) {\n for (var i = 0; i < updaters.length; ++i) {\n updaters[i](false, data, error);\n }\n }\n};\nvar mutate = function (_key, _data, shouldRevalidate) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n return __awaiter(void 0, void 0, void 0, function () {\n var key, data, error, beforeMutationTs, beforeConcurrentPromisesTs, err_1, err_2, updaters, promises, i;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = cache.serializeKey(_key)[0];\n if (!key)\n return [2 /*return*/];\n // if there is no new data, call revalidate against the key\n if (typeof _data === 'undefined')\n return [2 /*return*/, trigger(_key, shouldRevalidate)\n // update timestamp\n ];\n // update timestamp\n MUTATION_TS[key] = Date.now() - 1;\n beforeMutationTs = MUTATION_TS[key];\n beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];\n if (!(_data && typeof _data === 'function')) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, _data(cache.get(key))];\n case 2:\n data = _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n error = err_1;\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 11];\n case 5:\n if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 10];\n _a.label = 6;\n case 6:\n _a.trys.push([6, 8, , 9]);\n return [4 /*yield*/, _data];\n case 7:\n data = _a.sent();\n return [3 /*break*/, 9];\n case 8:\n err_2 = _a.sent();\n error = err_2;\n return [3 /*break*/, 9];\n case 9: return [3 /*break*/, 11];\n case 10:\n data = _data;\n _a.label = 11;\n case 11:\n // Check if other mutations have occurred since we've started awaiting, if so then do not persist this change\n if (beforeMutationTs !== MUTATION_TS[key] ||\n beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {\n if (error)\n throw error;\n return [2 /*return*/, data];\n }\n if (typeof data !== 'undefined') {\n // update cached data, avoid notifying from the cache\n cache.set(key, data, false);\n }\n updaters = CACHE_REVALIDATORS[key];\n if (updaters) {\n promises = [];\n for (i = 0; i < updaters.length; ++i) {\n promises.push(updaters[i](!!shouldRevalidate, data, error, i > 0));\n }\n // return new updated value\n return [2 /*return*/, Promise.all(promises).then(function () { return cache.get(key); })];\n }\n // throw error or return data to be used by caller of mutate\n if (error)\n throw error;\n return [2 /*return*/, data];\n }\n });\n });\n};\nfunction useSWR() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _key, fn, config = {};\n if (args.length >= 1) {\n _key = args[0];\n }\n if (args.length > 2) {\n fn = args[1];\n config = args[2];\n }\n else {\n if (typeof args[1] === 'function') {\n fn = args[1];\n }\n else if (typeof args[1] === 'object') {\n config = args[1];\n }\n }\n // we assume `key` as the identifier of the request\n // `key` can change but `fn` shouldn't\n // (because `revalidate` only depends on `key`)\n // `keyErr` is the cache key for error objects\n var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2];\n config = Object.assign({}, defaultConfig, useContext(SWRConfigContext), config);\n if (typeof fn === 'undefined') {\n // use a global fetcher\n fn = config.fetcher;\n }\n var initialData = cache.get(key) || config.initialData;\n var initialError = cache.get(keyErr);\n // if a state is accessed (data, error or isValidating),\n // we add the state to dependencies so if the state is\n // updated in the future, we can trigger a rerender\n var stateDependencies = useRef({\n data: false,\n error: false,\n isValidating: false\n });\n var stateRef = useRef({\n data: initialData,\n error: initialError,\n isValidating: false\n });\n var rerender = useState(null)[1];\n var dispatch = useCallback(function (payload) {\n var shouldUpdateState = false;\n for (var k in payload) {\n stateRef.current[k] = payload[k];\n if (stateDependencies.current[k]) {\n shouldUpdateState = true;\n }\n }\n if (shouldUpdateState || config.suspense) {\n rerender({});\n }\n }, []);\n // error ref inside revalidate (is last request errored?)\n var unmountedRef = useRef(false);\n var keyRef = useRef(key);\n // do unmount check for callbacks\n var eventsRef = useRef({\n emit: function (event) {\n var params = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n params[_i - 1] = arguments[_i];\n }\n if (unmountedRef.current)\n return;\n config[event].apply(config, params);\n }\n });\n var boundMutate = useCallback(function (data, shouldRevalidate) {\n return mutate(key, data, shouldRevalidate);\n }, [key]);\n // start a revalidation\n var revalidate = useCallback(function (revalidateOpts) {\n if (revalidateOpts === void 0) { revalidateOpts = {}; }\n return __awaiter(_this, void 0, void 0, function () {\n var loading, shouldDeduping, newData, startAt, newState, err_3, retryCount;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!key || !fn)\n return [2 /*return*/, false];\n if (unmountedRef.current)\n return [2 /*return*/, false];\n revalidateOpts = Object.assign({ dedupe: false }, revalidateOpts);\n loading = true;\n shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && revalidateOpts.dedupe;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 6, , 7]);\n dispatch({\n isValidating: true\n });\n newData = void 0;\n startAt = void 0;\n if (!shouldDeduping) return [3 /*break*/, 3];\n // there's already an ongoing request,\n // this one needs to be deduplicated.\n startAt = CONCURRENT_PROMISES_TS[key];\n return [4 /*yield*/, CONCURRENT_PROMISES[key]];\n case 2:\n newData = _a.sent();\n return [3 /*break*/, 5];\n case 3:\n // if not deduping the request (hard revalidate) but\n // there're other ongoing request(s) at the same time,\n // we need to ignore the other result(s) to avoid\n // possible race conditions:\n // req1------------------>res1\n // req2-------->res2\n // in that case, the second response should not be overridden\n // by the first one.\n if (CONCURRENT_PROMISES[key]) {\n // we can mark it as a mutation to ignore\n // all requests which are fired before this one\n MUTATION_TS[key] = Date.now() - 1;\n }\n // if no cache being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && !cache.get(key)) {\n setTimeout(function () {\n if (loading)\n eventsRef.current.emit('onLoadingSlow', key, config);\n }, config.loadingTimeout);\n }\n if (fnArgs !== null) {\n CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);\n }\n else {\n CONCURRENT_PROMISES[key] = fn(key);\n }\n CONCURRENT_PROMISES_TS[key] = startAt = Date.now();\n return [4 /*yield*/, CONCURRENT_PROMISES[key]];\n case 4:\n newData = _a.sent();\n setTimeout(function () {\n delete CONCURRENT_PROMISES[key];\n delete CONCURRENT_PROMISES_TS[key];\n }, config.dedupingInterval);\n // trigger the success event,\n // only do this for the original request.\n eventsRef.current.emit('onSuccess', newData, key, config);\n _a.label = 5;\n case 5:\n // if the revalidation happened earlier than the local mutation,\n // we have to ignore the result because it could override.\n // meanwhile, a new revalidation should be triggered by the mutation.\n if (MUTATION_TS[key] && startAt <= MUTATION_TS[key]) {\n dispatch({ isValidating: false });\n return [2 /*return*/, false];\n }\n cache.set(key, newData, false);\n cache.set(keyErr, undefined, false);\n newState = {\n isValidating: false\n };\n if (typeof stateRef.current.error !== 'undefined') {\n // we don't have an error\n newState.error = undefined;\n }\n if (!config.compare(stateRef.current.data, newData)) {\n // deep compare to avoid extra re-render\n // data changed\n newState.data = newData;\n }\n // merge the new state\n dispatch(newState);\n if (!shouldDeduping) {\n // also update other hooks\n broadcastState(key, newData, undefined);\n }\n return [3 /*break*/, 7];\n case 6:\n err_3 = _a.sent();\n delete CONCURRENT_PROMISES[key];\n delete CONCURRENT_PROMISES_TS[key];\n cache.set(keyErr, err_3, false);\n // get a new error\n // don't use deep equal for errors\n if (stateRef.current.error !== err_3) {\n // we keep the stale data\n dispatch({\n isValidating: false,\n error: err_3\n });\n if (!shouldDeduping) {\n // also broadcast to update other hooks\n broadcastState(key, undefined, err_3);\n }\n }\n // events and retry\n eventsRef.current.emit('onError', err_3, key, config);\n if (config.shouldRetryOnError) {\n retryCount = (revalidateOpts.retryCount || 0) + 1;\n eventsRef.current.emit('onErrorRetry', err_3, key, config, revalidate, Object.assign({ dedupe: true }, revalidateOpts, { retryCount: retryCount }));\n }\n return [3 /*break*/, 7];\n case 7:\n loading = false;\n return [2 /*return*/, true];\n }\n });\n });\n }, [key]);\n // mounted (client side rendering)\n useIsomorphicLayoutEffect(function () {\n if (!key)\n return undefined;\n // after `key` updates, we need to mark it as mounted\n unmountedRef.current = false;\n // after the component is mounted (hydrated),\n // we need to update the data from the cache\n // and trigger a revalidation\n var currentHookData = stateRef.current.data;\n var latestKeyedData = cache.get(key) || config.initialData;\n // update the state if the key changed (not the inital render) or cache updated\n if (keyRef.current !== key ||\n !config.compare(currentHookData, latestKeyedData)) {\n dispatch({ data: latestKeyedData });\n keyRef.current = key;\n }\n // revalidate with deduping\n var softRevalidate = function () { return revalidate({ dedupe: true }); };\n // trigger a revalidation\n if (config.revalidateOnMount ||\n (!config.initialData && config.revalidateOnMount === undefined)) {\n if (typeof latestKeyedData !== 'undefined' &&\n !IS_SERVER &&\n window['requestIdleCallback']) {\n // delay revalidate if there's cache\n // to not block the rendering\n window['requestIdleCallback'](softRevalidate);\n }\n else {\n softRevalidate();\n }\n }\n // whenever the window gets focused, revalidate\n var onFocus;\n if (config.revalidateOnFocus) {\n // throttle: avoid being called twice from both listeners\n // and tabs being switched quickly\n onFocus = throttle(softRevalidate, config.focusThrottleInterval);\n if (!FOCUS_REVALIDATORS[key]) {\n FOCUS_REVALIDATORS[key] = [onFocus];\n }\n else {\n FOCUS_REVALIDATORS[key].push(onFocus);\n }\n }\n // register global cache update listener\n var onUpdate = function (shouldRevalidate, updatedData, updatedError, dedupe) {\n if (shouldRevalidate === void 0) { shouldRevalidate = true; }\n if (dedupe === void 0) { dedupe = true; }\n // update hook state\n var newState = {};\n var needUpdate = false;\n if (typeof updatedData !== 'undefined' &&\n !config.compare(stateRef.current.data, updatedData)) {\n newState.data = updatedData;\n needUpdate = true;\n }\n // always update error\n // because it can be `undefined`\n if (stateRef.current.error !== updatedError) {\n newState.error = updatedError;\n needUpdate = true;\n }\n if (needUpdate) {\n dispatch(newState);\n }\n if (shouldRevalidate) {\n if (dedupe) {\n return softRevalidate();\n }\n else {\n return revalidate();\n }\n }\n return false;\n };\n // add updater to listeners\n if (!CACHE_REVALIDATORS[key]) {\n CACHE_REVALIDATORS[key] = [onUpdate];\n }\n else {\n CACHE_REVALIDATORS[key].push(onUpdate);\n }\n // set up reconnecting when the browser regains network connection\n var reconnect = null;\n if (!IS_SERVER && window.addEventListener && config.revalidateOnReconnect) {\n window.addEventListener('online', (reconnect = softRevalidate));\n }\n return function () {\n // cleanup\n dispatch = function () { return null; };\n // mark it as unmounted\n unmountedRef.current = true;\n if (onFocus && FOCUS_REVALIDATORS[key]) {\n var revalidators = FOCUS_REVALIDATORS[key];\n var index = revalidators.indexOf(onFocus);\n if (index >= 0) {\n // 10x faster than splice\n // https://jsperf.com/array-remove-by-index\n revalidators[index] = revalidators[revalidators.length - 1];\n revalidators.pop();\n }\n }\n if (CACHE_REVALIDATORS[key]) {\n var revalidators = CACHE_REVALIDATORS[key];\n var index = revalidators.indexOf(onUpdate);\n if (index >= 0) {\n revalidators[index] = revalidators[revalidators.length - 1];\n revalidators.pop();\n }\n }\n if (!IS_SERVER && window.removeEventListener && reconnect !== null) {\n window.removeEventListener('online', reconnect);\n }\n };\n }, [key, revalidate]);\n // set up polling\n useIsomorphicLayoutEffect(function () {\n var timer = null;\n var tick = function () { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(!stateRef.current.error &&\n (config.refreshWhenHidden || isDocumentVisible()) &&\n (config.refreshWhenOffline || isOnline()))) return [3 /*break*/, 2];\n // only revalidate when the page is visible\n // if API request errored, we stop polling in this round\n // and let the error retry function handle it\n return [4 /*yield*/, revalidate({ dedupe: true })];\n case 1:\n // only revalidate when the page is visible\n // if API request errored, we stop polling in this round\n // and let the error retry function handle it\n _a.sent();\n _a.label = 2;\n case 2:\n if (config.refreshInterval) {\n timer = setTimeout(tick, config.refreshInterval);\n }\n return [2 /*return*/];\n }\n });\n }); };\n if (config.refreshInterval) {\n timer = setTimeout(tick, config.refreshInterval);\n }\n return function () {\n if (timer)\n clearTimeout(timer);\n };\n }, [\n config.refreshInterval,\n config.refreshWhenHidden,\n config.refreshWhenOffline,\n revalidate\n ]);\n // suspense\n if (config.suspense) {\n // in suspense mode, we can't return empty state\n // (it should be suspended)\n // try to get data and error from cache\n var latestData = cache.get(key) || initialData;\n var latestError = cache.get(keyErr) || initialError;\n if (typeof latestData === 'undefined' &&\n typeof latestError === 'undefined') {\n // need to start the request if it hasn't\n if (!CONCURRENT_PROMISES[key]) {\n // trigger revalidate immediately\n // to get the promise\n revalidate();\n }\n if (CONCURRENT_PROMISES[key] &&\n typeof CONCURRENT_PROMISES[key].then === 'function') {\n // if it is a promise\n throw CONCURRENT_PROMISES[key];\n }\n // it's a value, return it directly (override)\n latestData = CONCURRENT_PROMISES[key];\n }\n if (typeof latestData === 'undefined' && latestError) {\n // in suspense mode, throw error if there's no content\n throw latestError;\n }\n // return the latest data / error from cache\n // in case `key` has changed\n return {\n error: latestError,\n data: latestData,\n revalidate: revalidate,\n mutate: boundMutate,\n isValidating: stateRef.current.isValidating\n };\n }\n // define returned state\n // can be memorized since the state is a ref\n return useMemo(function () {\n var state = { revalidate: revalidate, mutate: boundMutate };\n Object.defineProperties(state, {\n error: {\n // `key` might be changed in the upcoming hook re-render,\n // but the previous state will stay\n // so we need to match the latest key and data (fallback to `initialData`)\n get: function () {\n stateDependencies.current.error = true;\n return keyRef.current === key ? stateRef.current.error : initialError;\n },\n enumerable: true\n },\n data: {\n get: function () {\n stateDependencies.current.data = true;\n return keyRef.current === key ? stateRef.current.data : initialData;\n },\n enumerable: true\n },\n isValidating: {\n get: function () {\n stateDependencies.current.isValidating = true;\n return stateRef.current.isValidating;\n },\n enumerable: true\n }\n });\n return state;\n }, [revalidate]);\n}\nvar SWRConfig = SWRConfigContext.Provider;\nexport { trigger, mutate, SWRConfig };\nexport default useSWR;\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport React, { useCallback, useMemo, useState, useRef } from 'react';\nimport { cache } from './config';\n/*\nThe idea\n\nA \"Page\" component renders the content of 1 API request, it accepts an offset (in this example it's from),\nuses a SWR hook (useSWR(API + '?limit=' + limit + '&from=' + from)) and returns items (Projects).\n\nThe UI:\n +------------------------------------------+\n | Projects |\n+------------------------------------------------------+\n| | +----------------+ | |\n| | | |\n| | +------------+ | |\n| | | +--> 1 Page\n| | +-----------------+ | |\n| | | | /projects/list?limit=4\n| | +---------+ | |\n+------------------------------------------------------+\n | |\n | +------------+ | + /projects/list?limit=4&from=123\n | | |\n | +----------------+ | |\n | | |\n | +---------+ | |\n | | |\n | +--------------+ | +\n | |\n | +-------------------+ | + /projects/list?limit=4&from=456\n | | |\n | +------------+ | |\n | | |\n | +----------------+ | |\n | | |\n | | +\n\nThe API\n// (inside `render`)\n\nfunction App () {\n const {\n pages, // an array of each page component\n pageSWRs, // an array of SWRs of each page\n isLoadingMore,\n isReachingEnd,\n isEmpty,\n loadMore\n } = useSWRPages(\n 'project-page', // key of this page\n\n // ======== the actual Page component!\n ({ offset, withSWR }) => {\n // required: use `withSWR` to wrap your main SWR (source of your pagination API)\n const { data } = withSWR(\n useSWR(API + '?limit=10&from=' + offset) // request projects with offset\n )\n if (!data) return <Placeholder>\n return data.projects.map(project => <Card project={project} team={team}>)\n },\n // ========\n\n // a function accepts a SWR's `data`, and returns the offset of the next page (or null)\n data => data && data.length >= 10 ? data[data.length - 1].createdAt : null,\n\n // (optional) outside deps of your Page component. in this case it's empty\n []\n )\n\n // ...\n\n if (isEmpty) return <EmptyProjectsPage/>\n\n return <div>\n {pages}\n {isReachingEnd\n ? null\n : <button loading={isLoadingMore} onClick={loadMore}>Load More</button>}\n </div>\n}\n*/\nvar pageCacheMap = new Map();\nexport function useSWRPages(pageKey, pageFn, SWRToOffset, deps) {\n if (deps === void 0) { deps = []; }\n var pageCountKey = \"_swr_page_count_\" + pageKey;\n var pageOffsetKey = \"_swr_page_offset_\" + pageKey;\n var _a = useState(cache.get(pageCountKey) || 1), pageCount = _a[0], setPageCount = _a[1];\n var _b = useState(cache.get(pageOffsetKey) || [null]), pageOffsets = _b[0], setPageOffsets = _b[1];\n var _c = useState([]), pageSWRs = _c[0], setPageSWRs = _c[1];\n var pageFnRef = useRef(pageFn);\n var emptyPageRef = useRef(false);\n // Page component (wraps `pageFn`)\n // for performance reason we need to memorize it\n var Page = useCallback(function (props) {\n // render the page component\n var dataList = pageFnRef.current(props);\n // if dataList is [], we can assume this page is empty\n // TODO: this API is not stable\n if (dataList && !dataList.length) {\n emptyPageRef.current = true;\n }\n else {\n emptyPageRef.current = false;\n }\n return dataList;\n }, []);\n // Doesn't have a next page\n var isReachingEnd = pageOffsets[pageCount] === null;\n var isLoadingMore = pageCount === pageOffsets.length;\n var isEmpty = isReachingEnd && pageCount === 1 && emptyPageRef.current;\n var loadMore = useCallback(function () {\n if (isLoadingMore || isReachingEnd)\n return;\n setPageCount(function (c) {\n cache.set(pageCountKey, c + 1);\n return c + 1;\n });\n }, [isLoadingMore || isReachingEnd]);\n var _pageFn = useCallback(pageFn, deps);\n pageFnRef.current = _pageFn;\n var pages = useMemo(function () {\n var getWithSWR = function (id) { return function (swr) {\n if (!pageSWRs[id] ||\n pageSWRs[id].data !== swr.data ||\n pageSWRs[id].error !== swr.error ||\n pageSWRs[id].revalidate !== swr.revalidate) {\n // hoist side effects: setPageSWRs and setPageOffsets -- https://reactjs.org/blog/2020/02/26/react-v16.13.0.html#warnings-for-some-updates-during-render\n setTimeout(function () {\n setPageSWRs(function (swrs) {\n var _swrs = __spreadArrays(swrs);\n _swrs[id] = {\n data: swr.data,\n error: swr.error,\n revalidate: swr.revalidate,\n isValidating: swr.isValidating,\n mutate: swr.mutate\n };\n return _swrs;\n });\n if (typeof swr.data !== 'undefined') {\n // set next page's offset\n var newPageOffset_1 = SWRToOffset(swr, id);\n if (pageOffsets[id + 1] !== newPageOffset_1) {\n setPageOffsets(function (arr) {\n var _arr = __spreadArrays(arr);\n _arr[id + 1] = newPageOffset_1;\n cache.set(pageOffsetKey, _arr);\n return _arr;\n });\n }\n }\n });\n }\n return swr;\n }; };\n // render each page\n var p = [];\n if (!pageCacheMap.has(pageKey)) {\n pageCacheMap.set(pageKey, []);\n }\n var pageCache = pageCacheMap.get(pageKey);\n for (var i = 0; i < pageCount; ++i) {\n if (!pageCache[i] ||\n pageCache[i].offset !== pageOffsets[i] ||\n pageCache[i].pageFn !== _pageFn) {\n // when props change or at init\n // render the page and cache it\n pageCache[i] = {\n component: (React.createElement(Page, { key: \"page-\" + pageOffsets[i] + \"-\" + i, offset: pageOffsets[i], withSWR: getWithSWR(i) })),\n pageFn: _pageFn,\n offset: pageOffsets[i]\n };\n }\n p.push(pageCache[i].component);\n }\n return p;\n }, [_pageFn, pageCount, pageSWRs, pageOffsets, pageKey]);\n return {\n pages: pages,\n pageCount: pageCount,\n pageSWRs: pageSWRs,\n isLoadingMore: isLoadingMore,\n isReachingEnd: isReachingEnd,\n isEmpty: isEmpty,\n loadMore: loadMore\n };\n}\n","export * from './use-swr';\nimport { default as useSWR } from './use-swr';\nexport { useSWRPages } from './use-swr-pages';\nexport { cache } from './config';\nexport default useSWR;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","var data = {\n\t\"body\": \"<path d=\\\"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z\\\" fill=\\\"currentColor\\\"/>\",\n\t\"width\": 24,\n\t\"height\": 24\n};\nexports.__esModule = true;\nexports.default = data;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\n\nconst pFinally = require('p-finally');\n\nclass TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\nconst pTimeout = (promise, milliseconds, fallback) => new Promise((resolve, reject) => {\n\tif (typeof milliseconds !== 'number' || milliseconds < 0) {\n\t\tthrow new TypeError('Expected `milliseconds` to be a positive number');\n\t}\n\n\tif (milliseconds === Infinity) {\n\t\tresolve(promise);\n\t\treturn;\n\t}\n\n\tconst timer = setTimeout(() => {\n\t\tif (typeof fallback === 'function') {\n\t\t\ttry {\n\t\t\t\tresolve(fallback());\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`;\n\t\tconst timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message);\n\n\t\tif (typeof promise.cancel === 'function') {\n\t\t\tpromise.cancel();\n\t\t}\n\n\t\treject(timeoutError);\n\t}, milliseconds);\n\n\t// TODO: Use native `finally` keyword when targeting Node.js 10\n\tpFinally(\n\t\t// eslint-disable-next-line promise/prefer-await-to-then\n\t\tpromise.then(resolve, reject),\n\t\t() => {\n\t\t\tclearTimeout(timer);\n\t\t}\n\t);\n});\n\nmodule.exports = pTimeout;\n// TODO: Remove this for the next major release\nmodule.exports.default = pTimeout;\n\nmodule.exports.TimeoutError = TimeoutError;\n","'use strict';\nmodule.exports = (promise, onFinally) => {\n\tonFinally = onFinally || (() => {});\n\n\treturn promise.then(\n\t\tval => new Promise(resolve => {\n\t\t\tresolve(onFinally());\n\t\t}).then(() => val),\n\t\terr => new Promise(resolve => {\n\t\t\tresolve(onFinally());\n\t\t}).then(() => {\n\t\t\tthrow err;\n\t\t})\n\t);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst lower_bound_1 = require(\"./lower-bound\");\nclass PriorityQueue {\n constructor() {\n Object.defineProperty(this, \"_queue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n enqueue(run, options) {\n options = Object.assign({ priority: 0 }, options);\n const element = {\n priority: options.priority,\n run\n };\n if (this.size && this._queue[this.size - 1].priority >= options.priority) {\n this._queue.push(element);\n return;\n }\n const index = lower_bound_1.default(this._queue, element, (a, b) => b.priority - a.priority);\n this._queue.splice(index, 0, element);\n }\n dequeue() {\n const item = this._queue.shift();\n return item === null || item === void 0 ? void 0 : item.run;\n }\n filter(options) {\n return this._queue.filter((element) => element.priority === options.priority).map((element) => element.run);\n }\n get size() {\n return this._queue.length;\n }\n}\nexports.default = PriorityQueue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = (count / 2) | 0;\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\nexports.default = lowerBound;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bodyOpenClassName = exports.portalClassName = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ModalPortal = require(\"./ModalPortal\");\n\nvar _ModalPortal2 = _interopRequireDefault(_ModalPortal);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar portalClassName = exports.portalClassName = \"ReactModalPortal\";\nvar bodyOpenClassName = exports.bodyOpenClassName = \"ReactModal__Body--open\";\n\nvar isReact16 = _reactDom2.default.createPortal !== undefined;\n\nvar getCreatePortal = function getCreatePortal() {\n return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;\n};\n\nfunction getParentElement(parentSelector) {\n return parentSelector();\n}\n\nvar Modal = function (_Component) {\n _inherits(Modal, _Component);\n\n function Modal() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Modal);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {\n !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);\n var parent = getParentElement(_this.props.parentSelector);\n if (parent) {\n parent.removeChild(_this.node);\n } else {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"parentSelector\" prop did not returned any DOM ' + \"element. Make sure that the parent element is unmounted to \" + \"avoid any memory leaks.\");\n }\n }, _this.portalRef = function (ref) {\n _this.portal = ref;\n }, _this.renderPortal = function (props) {\n var createPortal = getCreatePortal();\n var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends({ defaultStyles: Modal.defaultStyles }, props)), _this.node);\n _this.portalRef(portal);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Modal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!_safeHTMLElement.canUseDOM) return;\n\n if (!isReact16) {\n this.node = document.createElement(\"div\");\n }\n this.node.className = this.props.portalClassName;\n\n var parent = getParentElement(this.props.parentSelector);\n parent.appendChild(this.node);\n\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"getSnapshotBeforeUpdate\",\n value: function getSnapshotBeforeUpdate(prevProps) {\n var prevParent = getParentElement(prevProps.parentSelector);\n var nextParent = getParentElement(this.props.parentSelector);\n return { prevParent: prevParent, nextParent: nextParent };\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, _, snapshot) {\n if (!_safeHTMLElement.canUseDOM) return;\n var _props = this.props,\n isOpen = _props.isOpen,\n portalClassName = _props.portalClassName;\n\n\n if (prevProps.portalClassName !== portalClassName) {\n this.node.className = portalClassName;\n }\n\n var prevParent = snapshot.prevParent,\n nextParent = snapshot.nextParent;\n\n if (nextParent !== prevParent) {\n prevParent.removeChild(this.node);\n nextParent.appendChild(this.node);\n }\n\n // Stop unnecessary renders if modal is remaining closed\n if (!prevProps.isOpen && !isOpen) return;\n\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;\n\n var state = this.portal.state;\n var now = Date.now();\n var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);\n\n if (closesAt) {\n if (!state.beforeClose) {\n this.portal.closeWithTimeout();\n }\n\n setTimeout(this.removePortal, closesAt - now);\n } else {\n this.removePortal();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!_safeHTMLElement.canUseDOM || !isReact16) {\n return null;\n }\n\n if (!this.node && isReact16) {\n this.node = document.createElement(\"div\");\n }\n\n var createPortal = getCreatePortal();\n return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({\n ref: this.portalRef,\n defaultStyles: Modal.defaultStyles\n }, this.props)), this.node);\n }\n }], [{\n key: \"setAppElement\",\n value: function setAppElement(element) {\n ariaAppHider.setElement(element);\n }\n\n /* eslint-disable react/no-unused-prop-types */\n\n /* eslint-enable react/no-unused-prop-types */\n\n }]);\n\n return Modal;\n}(_react.Component);\n\nModal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n portalClassName: _propTypes2.default.string,\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),\n onAfterOpen: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n ariaHideApp: _propTypes2.default.bool,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n parentSelector: _propTypes2.default.func,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func\n};\nModal.defaultProps = {\n isOpen: false,\n portalClassName: portalClassName,\n bodyOpenClassName: bodyOpenClassName,\n role: \"dialog\",\n ariaHideApp: true,\n closeTimeoutMS: 0,\n shouldFocusAfterRender: true,\n shouldCloseOnEsc: true,\n shouldCloseOnOverlayClick: true,\n shouldReturnFocusAfterClose: true,\n parentSelector: function parentSelector() {\n return document.body;\n }\n};\nModal.defaultStyles = {\n overlay: {\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(255, 255, 255, 0.75)\"\n },\n content: {\n position: \"absolute\",\n top: \"40px\",\n left: \"40px\",\n right: \"40px\",\n bottom: \"40px\",\n border: \"1px solid #ccc\",\n background: \"#fff\",\n overflow: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n borderRadius: \"4px\",\n outline: \"none\",\n padding: \"20px\"\n }\n};\n\n\n(0, _reactLifecyclesCompat.polyfill)(Modal);\n\nexports.default = Modal;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _focusManager = require(\"../helpers/focusManager\");\n\nvar focusManager = _interopRequireWildcard(_focusManager);\n\nvar _scopeTab = require(\"../helpers/scopeTab\");\n\nvar _scopeTab2 = _interopRequireDefault(_scopeTab);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _classList = require(\"../helpers/classList\");\n\nvar classList = _interopRequireWildcard(_classList);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _portalOpenInstances = require(\"../helpers/portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nrequire(\"../helpers/bodyTrap\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// so that our CSS is statically analyzable\nvar CLASS_NAMES = {\n overlay: \"ReactModal__Overlay\",\n content: \"ReactModal__Content\"\n};\n\nvar TAB_KEY = 9;\nvar ESC_KEY = 27;\n\nvar ariaHiddenInstances = 0;\n\nvar ModalPortal = function (_Component) {\n _inherits(ModalPortal, _Component);\n\n function ModalPortal(props) {\n _classCallCheck(this, ModalPortal);\n\n var _this = _possibleConstructorReturn(this, (ModalPortal.__proto__ || Object.getPrototypeOf(ModalPortal)).call(this, props));\n\n _this.setOverlayRef = function (overlay) {\n _this.overlay = overlay;\n _this.props.overlayRef && _this.props.overlayRef(overlay);\n };\n\n _this.setContentRef = function (content) {\n _this.content = content;\n _this.props.contentRef && _this.props.contentRef(content);\n };\n\n _this.afterClose = function () {\n var _this$props = _this.props,\n appElement = _this$props.appElement,\n ariaHideApp = _this$props.ariaHideApp,\n htmlOpenClassName = _this$props.htmlOpenClassName,\n bodyOpenClassName = _this$props.bodyOpenClassName;\n\n // Remove classes.\n\n bodyOpenClassName && classList.remove(document.body, bodyOpenClassName);\n\n htmlOpenClassName && classList.remove(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n // Reset aria-hidden attribute if all modals have been removed\n if (ariaHideApp && ariaHiddenInstances > 0) {\n ariaHiddenInstances -= 1;\n\n if (ariaHiddenInstances === 0) {\n ariaAppHider.show(appElement);\n }\n }\n\n if (_this.props.shouldFocusAfterRender) {\n if (_this.props.shouldReturnFocusAfterClose) {\n focusManager.returnFocus();\n focusManager.teardownScopedFocus();\n } else {\n focusManager.popWithoutFocus();\n }\n }\n\n if (_this.props.onAfterClose) {\n _this.props.onAfterClose();\n }\n\n _portalOpenInstances2.default.deregister(_this);\n };\n\n _this.open = function () {\n _this.beforeOpen();\n if (_this.state.afterOpen && _this.state.beforeClose) {\n clearTimeout(_this.closeTimer);\n _this.setState({ beforeClose: false });\n } else {\n if (_this.props.shouldFocusAfterRender) {\n focusManager.setupScopedFocus(_this.node);\n focusManager.markForFocusLater();\n }\n\n _this.setState({ isOpen: true }, function () {\n _this.setState({ afterOpen: true });\n\n if (_this.props.isOpen && _this.props.onAfterOpen) {\n _this.props.onAfterOpen({\n overlayEl: _this.overlay,\n contentEl: _this.content\n });\n }\n });\n }\n };\n\n _this.close = function () {\n if (_this.props.closeTimeoutMS > 0) {\n _this.closeWithTimeout();\n } else {\n _this.closeWithoutTimeout();\n }\n };\n\n _this.focusContent = function () {\n return _this.content && !_this.contentHasFocus() && _this.content.focus();\n };\n\n _this.closeWithTimeout = function () {\n var closesAt = Date.now() + _this.props.closeTimeoutMS;\n _this.setState({ beforeClose: true, closesAt: closesAt }, function () {\n _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());\n });\n };\n\n _this.closeWithoutTimeout = function () {\n _this.setState({\n beforeClose: false,\n isOpen: false,\n afterOpen: false,\n closesAt: null\n }, _this.afterClose);\n };\n\n _this.handleKeyDown = function (event) {\n if (event.keyCode === TAB_KEY) {\n (0, _scopeTab2.default)(_this.content, event);\n }\n\n if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {\n event.stopPropagation();\n _this.requestClose(event);\n }\n };\n\n _this.handleOverlayOnClick = function (event) {\n if (_this.shouldClose === null) {\n _this.shouldClose = true;\n }\n\n if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {\n if (_this.ownerHandlesClose()) {\n _this.requestClose(event);\n } else {\n _this.focusContent();\n }\n }\n _this.shouldClose = null;\n };\n\n _this.handleContentOnMouseUp = function () {\n _this.shouldClose = false;\n };\n\n _this.handleOverlayOnMouseDown = function (event) {\n if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) {\n event.preventDefault();\n }\n };\n\n _this.handleContentOnClick = function () {\n _this.shouldClose = false;\n };\n\n _this.handleContentOnMouseDown = function () {\n _this.shouldClose = false;\n };\n\n _this.requestClose = function (event) {\n return _this.ownerHandlesClose() && _this.props.onRequestClose(event);\n };\n\n _this.ownerHandlesClose = function () {\n return _this.props.onRequestClose;\n };\n\n _this.shouldBeClosed = function () {\n return !_this.state.isOpen && !_this.state.beforeClose;\n };\n\n _this.contentHasFocus = function () {\n return document.activeElement === _this.content || _this.content.contains(document.activeElement);\n };\n\n _this.buildClassName = function (which, additional) {\n var classNames = (typeof additional === \"undefined\" ? \"undefined\" : _typeof(additional)) === \"object\" ? additional : {\n base: CLASS_NAMES[which],\n afterOpen: CLASS_NAMES[which] + \"--after-open\",\n beforeClose: CLASS_NAMES[which] + \"--before-close\"\n };\n var className = classNames.base;\n if (_this.state.afterOpen) {\n className = className + \" \" + classNames.afterOpen;\n }\n if (_this.state.beforeClose) {\n className = className + \" \" + classNames.beforeClose;\n }\n return typeof additional === \"string\" && additional ? className + \" \" + additional : className;\n };\n\n _this.attributesFromObject = function (prefix, items) {\n return Object.keys(items).reduce(function (acc, name) {\n acc[prefix + \"-\" + name] = items[name];\n return acc;\n }, {});\n };\n\n _this.state = {\n afterOpen: false,\n beforeClose: false\n };\n\n _this.shouldClose = null;\n _this.moveFromContentToOverlay = null;\n return _this;\n }\n\n _createClass(ModalPortal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.isOpen) {\n this.open();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== \"production\") {\n if (prevProps.bodyOpenClassName !== this.props.bodyOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"bodyOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n if (prevProps.htmlOpenClassName !== this.props.htmlOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"htmlOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n }\n\n if (this.props.isOpen && !prevProps.isOpen) {\n this.open();\n } else if (!this.props.isOpen && prevProps.isOpen) {\n this.close();\n }\n\n // Focus only needs to be set once when the modal is being opened\n if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) {\n this.focusContent();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.isOpen) {\n this.afterClose();\n }\n clearTimeout(this.closeTimer);\n }\n }, {\n key: \"beforeOpen\",\n value: function beforeOpen() {\n var _props = this.props,\n appElement = _props.appElement,\n ariaHideApp = _props.ariaHideApp,\n htmlOpenClassName = _props.htmlOpenClassName,\n bodyOpenClassName = _props.bodyOpenClassName;\n\n // Add classes.\n\n bodyOpenClassName && classList.add(document.body, bodyOpenClassName);\n\n htmlOpenClassName && classList.add(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n if (ariaHideApp) {\n ariaHiddenInstances += 1;\n ariaAppHider.hide(appElement);\n }\n\n _portalOpenInstances2.default.register(this);\n }\n\n // Don't steal focus from inner elements\n\n }, {\n key: \"render\",\n value: function render() {\n var _props2 = this.props,\n id = _props2.id,\n className = _props2.className,\n overlayClassName = _props2.overlayClassName,\n defaultStyles = _props2.defaultStyles;\n\n var contentStyles = className ? {} : defaultStyles.content;\n var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;\n\n return this.shouldBeClosed() ? null : _react2.default.createElement(\n \"div\",\n {\n ref: this.setOverlayRef,\n className: this.buildClassName(\"overlay\", overlayClassName),\n style: _extends({}, overlayStyles, this.props.style.overlay),\n onClick: this.handleOverlayOnClick,\n onMouseDown: this.handleOverlayOnMouseDown\n },\n _react2.default.createElement(\n \"div\",\n _extends({\n id: id,\n ref: this.setContentRef,\n style: _extends({}, contentStyles, this.props.style.content),\n className: this.buildClassName(\"content\", className),\n tabIndex: \"-1\",\n onKeyDown: this.handleKeyDown,\n onMouseDown: this.handleContentOnMouseDown,\n onMouseUp: this.handleContentOnMouseUp,\n onClick: this.handleContentOnClick,\n role: this.props.role,\n \"aria-label\": this.props.contentLabel\n }, this.attributesFromObject(\"aria\", this.props.aria || {}), this.attributesFromObject(\"data\", this.props.data || {}), {\n \"data-testid\": this.props.testId\n }),\n this.props.children\n )\n );\n }\n }]);\n\n return ModalPortal;\n}(_react.Component);\n\nModalPortal.defaultProps = {\n style: {\n overlay: {},\n content: {}\n },\n defaultStyles: {}\n};\nModalPortal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n defaultStyles: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n ariaHideApp: _propTypes2.default.bool,\n appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),\n onAfterOpen: _propTypes2.default.func,\n onAfterClose: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n children: _propTypes2.default.node,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func,\n id: _propTypes2.default.string,\n testId: _propTypes2.default.string\n};\nexports.default = ModalPortal;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.popWithoutFocus = popWithoutFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\n\nvar _tabbable = require(\"../helpers/tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n\nfunction handleBlur() {\n needToFocus = true;\n}\n\nfunction handleFocus() {\n if (needToFocus) {\n needToFocus = false;\n if (!modalElement) {\n return;\n }\n // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n setTimeout(function () {\n if (modalElement.contains(document.activeElement)) {\n return;\n }\n var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;\n el.focus();\n }, 0);\n }\n}\n\nfunction markForFocusLater() {\n focusLaterElements.push(document.activeElement);\n}\n\n/* eslint-disable no-console */\nfunction returnFocus() {\n var toFocus = null;\n try {\n if (focusLaterElements.length !== 0) {\n toFocus = focusLaterElements.pop();\n toFocus.focus();\n }\n return;\n } catch (e) {\n console.warn([\"You tried to return focus to\", toFocus, \"but it is not in the DOM anymore\"].join(\" \"));\n }\n}\n/* eslint-enable no-console */\n\nfunction popWithoutFocus() {\n focusLaterElements.length > 0 && focusLaterElements.pop();\n}\n\nfunction setupScopedFocus(element) {\n modalElement = element;\n\n if (window.addEventListener) {\n window.addEventListener(\"blur\", handleBlur, false);\n document.addEventListener(\"focus\", handleFocus, true);\n } else {\n window.attachEvent(\"onBlur\", handleBlur);\n document.attachEvent(\"onFocus\", handleFocus);\n }\n}\n\nfunction teardownScopedFocus() {\n modalElement = null;\n\n if (window.addEventListener) {\n window.removeEventListener(\"blur\", handleBlur);\n document.removeEventListener(\"focus\", handleFocus);\n } else {\n window.detachEvent(\"onBlur\", handleBlur);\n document.detachEvent(\"onFocus\", handleFocus);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scopeTab;\n\nvar _tabbable = require(\"./tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scopeTab(node, event) {\n var tabbable = (0, _tabbable2.default)(node);\n\n if (!tabbable.length) {\n // Do nothing, since there are no elements that can receive focus.\n event.preventDefault();\n return;\n }\n\n var target = void 0;\n\n var shiftKey = event.shiftKey;\n var head = tabbable[0];\n var tail = tabbable[tabbable.length - 1];\n\n // proceed with default browser behavior on tab.\n // Focus on last element on shift + tab.\n if (node === document.activeElement) {\n if (!shiftKey) return;\n target = tail;\n }\n\n if (tail === document.activeElement && !shiftKey) {\n target = head;\n }\n\n if (head === document.activeElement && shiftKey) {\n target = tail;\n }\n\n if (target) {\n event.preventDefault();\n target.focus();\n return;\n }\n\n // Safari radio issue.\n //\n // Safari does not move the focus to the radio button,\n // so we need to force it to really walk through all elements.\n //\n // This is very error prone, since we are trying to guess\n // if it is a safari browser from the first occurence between\n // chrome or safari.\n //\n // The chrome user agent contains the first ocurrence\n // as the 'chrome/version' and later the 'safari/version'.\n var checkSafari = /(\\bChrome\\b|\\bSafari\\b)\\//.exec(navigator.userAgent);\n var isSafariDesktop = checkSafari != null && checkSafari[1] != \"Chrome\" && /\\biPod\\b|\\biPad\\b/g.exec(navigator.userAgent) == null;\n\n // If we are not in safari desktop, let the browser control\n // the focus\n if (!isSafariDesktop) return;\n\n var x = tabbable.indexOf(document.activeElement);\n\n if (x > -1) {\n x += shiftKey ? -1 : 1;\n }\n\n target = tabbable[x];\n\n // If the tabbable element does not exist,\n // focus head/tail based on shiftKey\n if (typeof target === \"undefined\") {\n event.preventDefault();\n target = shiftKey ? tail : head;\n target.focus();\n return;\n }\n\n event.preventDefault();\n\n target.focus();\n}\nmodule.exports = exports[\"default\"];","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar canUseDOM = !!(\n\t\ttypeof window !== 'undefined' &&\n\t\twindow.document &&\n\t\twindow.document.createElement\n\t);\n\n\tvar ExecutionEnvironment = {\n\n\t\tcanUseDOM: canUseDOM,\n\n\t\tcanUseWorkers: typeof Worker !== 'undefined',\n\n\t\tcanUseEventListeners:\n\t\t\tcanUseDOM && !!(window.addEventListener || window.attachEvent),\n\n\t\tcanUseViewport: canUseDOM && !!window.screen\n\n\t};\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn ExecutionEnvironment;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = ExecutionEnvironment;\n\t} else {\n\t\twindow.ExecutionEnvironment = ExecutionEnvironment;\n\t}\n\n}());\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dumpClassLists = dumpClassLists;\nvar htmlClassList = {};\nvar docBodyClassList = {};\n\nfunction dumpClassLists() {\n if (process.env.NODE_ENV !== \"production\") {\n var classes = document.getElementsByTagName(\"html\")[0].className;\n var buffer = \"Show tracked classes:\\n\\n\";\n\n buffer += \"<html /> (\" + classes + \"):\\n\";\n for (var x in htmlClassList) {\n buffer += \" \" + x + \" \" + htmlClassList[x] + \"\\n\";\n }\n\n classes = document.body.className;\n\n // eslint-disable-next-line max-len\n buffer += \"\\n\\ndoc.body (\" + classes + \"):\\n\";\n for (var _x in docBodyClassList) {\n buffer += \" \" + _x + \" \" + docBodyClassList[_x] + \"\\n\";\n }\n\n buffer += \"\\n\";\n\n // eslint-disable-next-line no-console\n console.log(buffer);\n }\n}\n\n/**\n * Track the number of reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar incrementReference = function incrementReference(poll, className) {\n if (!poll[className]) {\n poll[className] = 0;\n }\n poll[className] += 1;\n return className;\n};\n\n/**\n * Drop the reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar decrementReference = function decrementReference(poll, className) {\n if (poll[className]) {\n poll[className] -= 1;\n }\n return className;\n};\n\n/**\n * Track a class and add to the given class list.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be tracked.\n */\nvar trackClass = function trackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n incrementReference(poll, className);\n classListRef.add(className);\n });\n};\n\n/**\n * Untrack a class and remove from the given class list if the reference\n * reaches 0.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be untracked.\n */\nvar untrackClass = function untrackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n decrementReference(poll, className);\n poll[className] === 0 && classListRef.remove(className);\n });\n};\n\n/**\n * Public inferface to add classes to the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar add = exports.add = function add(element, classString) {\n return trackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};\n\n/**\n * Public inferface to remove classes from the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar remove = exports.remove = function remove(element, classString) {\n return untrackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};","\"use strict\";\n\nvar _portalOpenInstances = require(\"./portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Body focus trap see Issue #742\n\nvar before = void 0,\n after = void 0,\n instances = [];\n\nfunction focusContent() {\n if (instances.length === 0) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Open instances > 0 expected\");\n }\n return;\n }\n instances[instances.length - 1].focusContent();\n}\n\nfunction bodyTrap(eventType, openInstances) {\n if (!before || !after) {\n before = document.createElement(\"div\");\n before.setAttribute(\"data-react-modal-body-trap\", \"\");\n before.style.position = \"absolute\";\n before.style.opacity = \"0\";\n before.setAttribute(\"tabindex\", \"0\");\n before.addEventListener(\"focus\", focusContent);\n after = before.cloneNode();\n after.addEventListener(\"focus\", focusContent);\n }\n\n instances = openInstances;\n\n if (instances.length > 0) {\n // Add focus trap\n if (document.body.firstChild !== before) {\n document.body.insertBefore(before, document.body.firstChild);\n }\n if (document.body.lastChild !== after) {\n document.body.appendChild(after);\n }\n } else {\n // Remove focus trap\n if (before.parentElement) {\n before.parentElement.removeChild(before);\n }\n if (after.parentElement) {\n after.parentElement.removeChild(after);\n }\n }\n}\n\n_portalOpenInstances2.default.subscribe(bodyTrap);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n"],"sourceRoot":""}
classes/admin.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Meow_MGCL_Admin extends MeowCommon_Admin {
3
+
4
+ public $core;
5
+
6
+ public function __construct() {
7
+ parent::__construct( MGCL_PREFIX, MGCL_ENTRY, MGCL_DOMAIN, class_exists( 'MeowPro_MGCL_Core' ) );
8
+ if ( is_admin() ) {
9
+ add_action( 'admin_menu', array( $this, 'app_menu' ) );
10
+ add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 );
11
+ add_filter( 'attachment_fields_to_save', array( $this, 'apply_filter_attachment_fields_to_save' ), 10 , 2 );
12
+
13
+ // Load the scripts only if they are needed by the current screen
14
+ $page = isset( $_GET["page"] ) ? $_GET["page"] : null;
15
+ $is_mgcl_screen = in_array( $page, [ 'mgcl_settings-menu' ] );
16
+ $is_meowapps_dashboard = $page === 'meowapps-main-menu';
17
+ if ( $is_meowapps_dashboard || $is_mgcl_screen ) {
18
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
19
+ }
20
+ }
21
+ }
22
+
23
+ function admin_enqueue_scripts() {
24
+
25
+ // Load the scripts
26
+ $physical_file = MGCL_PATH . '/app/index.js';
27
+ $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : MGCL_VERSION;
28
+ wp_register_script( 'mgcl_gallery_custom_links-vendor', MGCL_URL . 'app/vendor.js',
29
+ ['wp-element', 'wp-i18n'], $cache_buster
30
+ );
31
+ wp_register_script( 'mgcl_gallery_custom_links', MGCL_URL . 'app/index.js',
32
+ ['mgcl_gallery_custom_links-vendor', 'wp-i18n'], $cache_buster
33
+ );
34
+ wp_set_script_translations( 'mgcl_gallery_custom_links', 'gallery-custom-links' );
35
+ wp_enqueue_script('mgcl_gallery_custom_links' );
36
+
37
+ // Load the fonts
38
+ wp_register_style( 'meow-neko-ui-lato-font', '//fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');
39
+ wp_enqueue_style( 'meow-neko-ui-lato-font' );
40
+
41
+ // Localize and options
42
+ wp_localize_script( 'mgcl_gallery_custom_links', 'mgcl_gallery_custom_links', array_merge( [
43
+ 'api_url' => rest_url( 'gallery-custom-links/v1' ),
44
+ 'rest_url' => rest_url(),
45
+ 'plugin_url' => MGCL_URL,
46
+ 'prefix' => MGCL_PREFIX,
47
+ 'domain' => MGCL_DOMAIN,
48
+ 'is_pro' => class_exists( 'MeowPro_MGCL_Core' ),
49
+ 'is_registered' => !!$this->is_registered(),
50
+ 'rest_nonce' => wp_create_nonce( 'wp_rest' )
51
+ ], $this->get_all_options() ) );
52
+ }
53
+
54
+ function is_registered() {
55
+ return apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
56
+ }
57
+
58
+ function attachment_fields_to_edit( $fields, $post ) {
59
+ $fields['gallery_link_url'] = array(
60
+ 'label' => __( 'Link URL', 'gallery-custom-links' ),
61
+ 'input' => 'text',
62
+ 'value' => get_post_meta( $post->ID, '_gallery_link_url', true )
63
+ );
64
+ $target_value = get_post_meta( $post->ID, '_gallery_link_target', true );
65
+ $fields['gallery_link_target'] = array(
66
+ 'label' => __( 'Link Target', 'gallery-custom-links' ),
67
+ 'input' => 'html',
68
+ 'html' => '
69
+ <select class="widefat" name="attachments[' . $post->ID . '][gallery_link_target]" id="attachments[' . $post->ID . '][gallery_link_target]">
70
+ <option value="_self"' . ( $target_value == '_self' ? ' selected="selected"' : '' ) . '>' .
71
+ __( 'Same page', 'gallery-custom-links' ) .
72
+ '</option>
73
+ <option value="_blank"' . ( $target_value == '_blank' ? ' selected="selected"' : '' ) . '>' .
74
+ __( 'New page', 'gallery-custom-links' ) .
75
+ '</option>
76
+ </select>'
77
+ );
78
+ // XXXX: Custom modification to add "noopener noreferrer" als REL-option, Christoph Letmaier, 14.01.2020
79
+ $rel_value = get_post_meta( $post->ID, '_gallery_link_rel', true );
80
+ $fields['gallery_link_rel'] = array(
81
+ 'label' => __( 'Link Rel', 'gallery-custom-links' ),
82
+ 'input' => 'text',
83
+ 'value' => get_post_meta( $post->ID, '_gallery_link_rel', true )
84
+ );
85
+ // XXXX: Custom code for new aria-label field, Christoph Letmaier, 14.01.2020
86
+ $fields['gallery_link_aria'] = array(
87
+ 'label' => __( 'Arial Label', 'gallery-custom-links' ),
88
+ 'input' => 'text',
89
+ 'value' => get_post_meta( $post->ID, '_gallery_link_aria', true )
90
+ );
91
+
92
+ return $fields;
93
+ }
94
+
95
+ function apply_filter_attachment_fields_to_save( $post, $attachment ) {
96
+ if ( isset( $attachment['gallery_link_url'] ) )
97
+ update_post_meta( $post['ID'], '_gallery_link_url', $attachment['gallery_link_url'] );
98
+ if ( isset( $attachment['gallery_link_target'] ) )
99
+ update_post_meta( $post['ID'], '_gallery_link_target', $attachment['gallery_link_target'] );
100
+ if ( isset( $attachment['gallery_link_rel'] ) )
101
+ update_post_meta( $post['ID'], '_gallery_link_rel', $attachment['gallery_link_rel'] );
102
+ // XXXX: Custom code for saving _gallery_link_aria, Christoph Letmaier, 14.01.2020
103
+ if ( isset( $attachment['gallery_link_aria'] ) )
104
+ update_post_meta( $post['ID'], '_gallery_link_aria', $attachment['gallery_link_aria'] );
105
+ return $post;
106
+ }
107
+
108
+ function app_menu() {
109
+ add_submenu_page( 'meowapps-main-menu', 'Gallery Custom Links', 'Custom Links', 'manage_options',
110
+ 'mgcl_settings-menu', array( $this, 'admin_settings' ) );
111
+ }
112
+
113
+ function admin_settings() {
114
+ echo '<div id="mgcl-admin-settings"></div>';
115
+ }
116
+
117
+ function get_all_options() {
118
+ return [
119
+ 'mgcl_obmode' => get_option( 'mgcl_obmode', true ),
120
+ 'mgcl_parsing_engine' => get_option( 'mgcl_parsing_engine', 'HtmlDomParser' ),
121
+ 'mgcl_log' => get_option( 'mgcl_log', false ),
122
+ 'mgcl_button_enabled' => get_option( 'mgcl_button_enabled', false ),
123
+ 'mgcl_button_label' => get_option( 'mgcl_button_label', "Click here" ),
124
+ ];
125
+ }
126
+ }
127
+
128
+ ?>
{button → classes/button}/gutenberg.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Meow_Gallery_Custom_Links_Button_Gutenberg {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
1
  <?php
2
 
3
+ class Meow_MGCL_Core_Button_Gutenberg {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
{button → classes/button}/meow_gallery.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Meow_Gallery_Custom_Links_Button_Meow_Gallery {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
1
  <?php
2
 
3
+ class Meow_MGCL_Core_Button_Meow_Gallery {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
{button → classes/button}/native_gallery.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Meow_Gallery_Custom_Links_Button_Native_Gallery {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
1
  <?php
2
 
3
+ class Meow_MGCL_Core_Button_Native_Gallery {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
mgcl_core.php → classes/core.php RENAMED
@@ -1,23 +1,27 @@
1
  <?php
2
 
3
- require __DIR__ . '/vendor/autoload.php';
4
-
5
- class Meow_Gallery_Custom_Links
6
  {
 
 
 
7
  public $isEnabled = true;
8
  // use OB on the whole page, or only go through the the_content ($renderingMode will be ignored)
9
  public $isObMode = true;
10
  // 'HtmlDomParser' (less prone to break badly formatted HTML) or 'DiDom' (faster)
11
  public $parsingEngine = 'HtmlDomParser';
12
  public $enableLogs = false;
 
13
 
14
  public function __construct() {
15
- if ( is_admin() || $this->is_rest() ) {
16
- return;
17
- }
18
  $this->isObMode = get_option( 'mgcl_obmode', $this->isObMode );
19
  $this->parsingEngine = get_option( 'mgcl_parsing_engine', $this->parsingEngine );
20
  $this->enableLogs = get_option( 'mgcl_log', $this->enableLogs );
 
 
 
 
21
  if ( $this->isObMode ) {
22
  add_action( 'template_redirect', array( $this, 'start' ) );
23
  add_action( 'shutdown', array( $this, 'shutdown' ) );
@@ -31,29 +35,25 @@ class Meow_Gallery_Custom_Links
31
  $button_enabled = get_option( 'mgcl_button_enabled', false );
32
  if ( $button_enabled ) {
33
  require_once( 'button/gutenberg.php' );
34
- new Meow_Gallery_Custom_Links_Button_Gutenberg( $this );
35
  require_once( 'button/native_gallery.php' );
36
- new Meow_Gallery_Custom_Links_Button_Native_Gallery( $this );
37
  require_once( 'button/meow_gallery.php' );
38
- new Meow_Gallery_Custom_Links_Button_Meow_Gallery( $this );
39
  }
40
  }
41
 
42
- function is_rest() {
43
- $prefix = rest_get_url_prefix() . '/';
44
- $method = $_SERVER['REQUEST_METHOD'];
45
- $uri = $_SERVER['REQUEST_URI'];
46
- if ( $method !== 'GET' && strpos( $uri, $prefix ) !== false ) {
47
- return true;
48
- }
49
- return false;
50
- }
51
-
52
  function init() {
 
 
 
 
 
 
 
53
  //add_action( 'init', array( $this, 'init' ) );
54
  // We don't need this now, we go through all the images.
55
- include "mgcl_extra.php";
56
- new Meow_Gallery_Custom_Links_Extra();
57
  }
58
 
59
  function start() {
@@ -77,23 +77,32 @@ class Meow_Gallery_Custom_Links
77
 
78
  function resolve_image_id( $url ) {
79
  global $wpdb;
 
 
 
 
80
  $pattern = '/[_-]\d+x\d+(?=\.[a-z]{3,4}$)/';
81
  $url = preg_replace( $pattern, '', $url );
82
  $url = $this->get_pathinfo_from_image_src( $url );
83
  $urlLike = '%' . $url . '%';
84
- $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid LIKE '%s'", $urlLike );
85
- $attachment = $wpdb->get_col( $query );
86
-
87
- // Code proposed by @wizardcoder
88
- // https://wordpress.org/support/topic/issue-with-page-links-on-images/
89
- if ( empty( $attachment ) ) {
90
- $query = $wpdb->prepare(
91
- "SELECT post_id FROM $wpdb->postmeta WHERE meta_value LIKE '%s' AND meta_key = '_wp_attached_file'",
92
- $urlLike
93
- );
94
  $attachment = $wpdb->get_col( $query );
 
 
 
 
 
 
 
 
 
 
 
95
  }
96
-
97
  return empty( $attachment ) ? null : $attachment[0];
98
  }
99
 
@@ -138,7 +147,7 @@ class Meow_Gallery_Custom_Links
138
  $handled = apply_filters( 'mgcl_linkers', false, $element, $parent, $mediaId, $url, $rel, $aria, $target );
139
  if ( !$handled ) {
140
  include_once( "mgcl_linker.php" );
141
- $linker = new Meow_Gallery_Custom_Links_Linker( $this );
142
  // XXXX: Custom code with $aria Christoph Letmaier, 14.01.2020
143
  $linker->linker( $element, $parent, $mediaId, $url, $rel, $aria, $target );
144
  }
1
  <?php
2
 
3
+ class Meow_MGCL_Core
 
 
4
  {
5
+ public $admin = null;
6
+ public $is_rest = false;
7
+ public $is_cli = false;
8
  public $isEnabled = true;
9
  // use OB on the whole page, or only go through the the_content ($renderingMode will be ignored)
10
  public $isObMode = true;
11
  // 'HtmlDomParser' (less prone to break badly formatted HTML) or 'DiDom' (faster)
12
  public $parsingEngine = 'HtmlDomParser';
13
  public $enableLogs = false;
14
+ public $site_url = null;
15
 
16
  public function __construct() {
17
+ $this->site_url = get_site_url();
 
 
18
  $this->isObMode = get_option( 'mgcl_obmode', $this->isObMode );
19
  $this->parsingEngine = get_option( 'mgcl_parsing_engine', $this->parsingEngine );
20
  $this->enableLogs = get_option( 'mgcl_log', $this->enableLogs );
21
+ $this->is_rest = MeowCommon_Helpers::is_rest();
22
+ $this->is_cli = defined( 'WP_CLI' ) && WP_CLI;
23
+ add_action( 'plugins_loaded', array( $this, 'init' ) );
24
+
25
  if ( $this->isObMode ) {
26
  add_action( 'template_redirect', array( $this, 'start' ) );
27
  add_action( 'shutdown', array( $this, 'shutdown' ) );
35
  $button_enabled = get_option( 'mgcl_button_enabled', false );
36
  if ( $button_enabled ) {
37
  require_once( 'button/gutenberg.php' );
38
+ new Meow_MGCL_Core_Button_Gutenberg( $this );
39
  require_once( 'button/native_gallery.php' );
40
+ new Meow_MGCL_Core_Button_Native_Gallery( $this );
41
  require_once( 'button/meow_gallery.php' );
42
+ new Meow_MGCL_Core_Button_Meow_Gallery( $this );
43
  }
44
  }
45
 
 
 
 
 
 
 
 
 
 
 
46
  function init() {
47
+ // Part of the core, settings and stuff
48
+ $this->admin = new Meow_MGCL_Admin();
49
+
50
+ // Only for REST
51
+ if ( $this->is_rest ) {
52
+ new Meow_MGCL_Rest( $this, $this->admin );
53
+ }
54
  //add_action( 'init', array( $this, 'init' ) );
55
  // We don't need this now, we go through all the images.
56
+ new Meow_MGCL_Extra();
 
57
  }
58
 
59
  function start() {
77
 
78
  function resolve_image_id( $url ) {
79
  global $wpdb;
80
+ global $galleryCustomLinksCache;
81
+ if ( !is_array( $galleryCustomLinksCache ) ) {
82
+ $galleryCustomLinksCache = [];
83
+ }
84
  $pattern = '/[_-]\d+x\d+(?=\.[a-z]{3,4}$)/';
85
  $url = preg_replace( $pattern, '', $url );
86
  $url = $this->get_pathinfo_from_image_src( $url );
87
  $urlLike = '%' . $url . '%';
88
+ if ( array_key_exists( $urlLike, $galleryCustomLinksCache ) ) {
89
+ $attachment = $galleryCustomLinksCache[$urlLike];
90
+ }
91
+ else {
92
+ $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid LIKE '%s' LIMIT 1", $urlLike );
 
 
 
 
 
93
  $attachment = $wpdb->get_col( $query );
94
+ // Code proposed by @wizardcoder
95
+ // https://wordpress.org/support/topic/issue-with-page-links-on-images/
96
+ if ( empty( $attachment ) ) {
97
+ $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta
98
+ WHERE meta_value LIKE '%s'
99
+ AND meta_key = '_wp_attached_file'
100
+ LIMIT 1", $urlLike
101
+ );
102
+ $attachment = $wpdb->get_col( $query );
103
+ }
104
+ $galleryCustomLinksCache[$urlLike] = $attachment;
105
  }
 
106
  return empty( $attachment ) ? null : $attachment[0];
107
  }
108
 
147
  $handled = apply_filters( 'mgcl_linkers', false, $element, $parent, $mediaId, $url, $rel, $aria, $target );
148
  if ( !$handled ) {
149
  include_once( "mgcl_linker.php" );
150
+ $linker = new Meow_MGCL_Linker( $this );
151
  // XXXX: Custom code with $aria Christoph Letmaier, 14.01.2020
152
  $linker->linker( $element, $parent, $mediaId, $url, $rel, $aria, $target );
153
  }
mgcl_extra.php → classes/extra.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Meow_Gallery_Custom_Links_Extra
4
  {
5
  public function __construct() {
6
  if ( class_exists( 'Meow_Gallery_Core' ) )
1
  <?php
2
 
3
+ class Meow_MGCL_Extra
4
  {
5
  public function __construct() {
6
  if ( class_exists( 'Meow_Gallery_Core' ) )
classes/init.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( class_exists( 'Meow_MGCL_Core' ) ) {
4
+ function mfrh_admin_notices() {
5
+ echo '<div class="error"><p>Thanks for installing Gallery Custom Links :) However, another version is still enabled. Please disable or uninstall it.</p></div>';
6
+ }
7
+ add_action( 'admin_notices', 'mfrh_admin_notices' );
8
+ return;
9
+ }
10
+
11
+ spl_autoload_register(function ( $class ) {
12
+ $necessary = true;
13
+ $file = null;
14
+ if ( strpos( $class, 'Meow_MGCL' ) !== false ) {
15
+ $file = MGCL_PATH . '/classes/' . str_replace( 'meow_mgcl_', '', strtolower( $class ) ) . '.php';
16
+ }
17
+ else if ( strpos( $class, 'MeowCommon_Classes_' ) !== false ) {
18
+ $file = MGCL_PATH . '/common/classes/' . str_replace( 'meowcommon_classes_', '', strtolower( $class ) ) . '.php';
19
+ }
20
+ else if ( strpos( $class, 'MeowCommon_' ) !== false ) {
21
+ $file = MGCL_PATH . '/common/' . str_replace( 'meowcommon_', '', strtolower( $class ) ) . '.php';
22
+ }
23
+ else if ( strpos( $class, 'MeowPro_MGCL' ) !== false ) {
24
+ $necessary = false;
25
+ $file = MGCL_PATH . '/premium/' . str_replace( 'meowpro_mgcl_', '', strtolower( $class ) ) . '.php';
26
+ }
27
+ if ( $file ) {
28
+ if ( !$necessary && !file_exists( $file ) ) {
29
+ return;
30
+ }
31
+ require( $file );
32
+ }
33
+ });
34
+
35
+ //require_once( MGCL_PATH . '/classes/api.php');
36
+ require_once( MGCL_PATH . '/common/helpers.php');
37
+
38
+ // In admin or Rest API request (REQUEST URI begins with '/wp-json/')
39
+ if ( is_admin() || MeowCommon_Helpers::is_rest() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
40
+ global $mfrh_core;
41
+ $mfrh_core = new Meow_MGCL_Core();
42
+ }
43
+
44
+ ?>
mgcl_linker.php → classes/linker.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Meow_Gallery_Custom_Links_Linker {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
1
  <?php
2
 
3
+ class Meow_MGCL_Linker {
4
 
5
  public function __construct( $core ) {
6
  $this->core = $core;
classes/rest.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Meow_MGCL_Rest
4
+ {
5
+ private $core = null;
6
+ private $namespace = 'gallery-custom-links/v1';
7
+
8
+ public function __construct( $core, $admin ) {
9
+ if ( !current_user_can( 'administrator' ) ) {
10
+ return;
11
+ }
12
+ $this->core = $core;
13
+ $this->admin = $admin;
14
+ $this->engine = $core->engine;
15
+ add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
16
+ }
17
+
18
+ function rest_api_init() {
19
+ try {
20
+ // SETTINGS
21
+ register_rest_route( $this->namespace, '/update_option', array(
22
+ 'methods' => 'POST',
23
+ 'callback' => array( $this, 'rest_update_option' )
24
+ ) );
25
+ register_rest_route( $this->namespace, '/all_settings', array(
26
+ 'methods' => 'GET',
27
+ 'callback' => array( $this, 'rest_all_settings' ),
28
+ ) );
29
+ }
30
+ catch (Exception $e) {
31
+ var_dump($e);
32
+ }
33
+ }
34
+
35
+ function rest_all_settings() {
36
+ return new WP_REST_Response( [
37
+ 'success' => true,
38
+ 'data' => $this->admin->get_all_options()
39
+ ], 200 );
40
+ }
41
+
42
+ function rest_update_option( $request ) {
43
+ $params = $request->get_json_params();
44
+ try {
45
+ $name = $params['name'];
46
+ $value = is_bool( $params['value'] ) ? ( $params['value'] ? '1' : '' ) : $params['value'];
47
+ $success = update_option( $name, $value );
48
+ if ( $success ) {
49
+ $res = $this->validate_updated_option( $name );
50
+ $result = $res['result'];
51
+ $message = $res['message'];
52
+ return new WP_REST_Response([ 'success' => $result, 'message' => $message ], 200 );
53
+ }
54
+ return new WP_REST_Response([ 'success' => false, 'message' => "Could not update option." ], 200 );
55
+ }
56
+ catch (Exception $e) {
57
+ return new WP_REST_Response([
58
+ 'success' => false,
59
+ 'message' => $e->getMessage(),
60
+ ], 500 );
61
+ }
62
+ }
63
+
64
+ function validate_updated_option( $option_name ) {
65
+ $obmode = get_option( 'mgcl_obmode', false );
66
+ $parsing_engine = get_option( 'mgcl_parsing_engine', 'HtmlDomParser' );
67
+ $log = get_option( 'mgcl_log', false );
68
+ $button_enabled = get_option( 'mgcl_button_enabled', false );
69
+ $button_label = get_option( 'mgcl_button_label', "Click here" );
70
+ if ( $obmode === '' )
71
+ update_option( 'mgcl_obmode', false );
72
+ if ( $parsing_engine === '' )
73
+ update_option( 'mgcl_parsing_engine', 'HtmlDomParser' );
74
+ if ( $log === '' )
75
+ update_option( 'mgcl_log', false );
76
+ if ( $button_enabled === '' )
77
+ update_option( 'mgcl_button_enabled', false );
78
+ if ( $button_label === '' )
79
+ update_option( 'mgcl_button_label', "Click here" );
80
+ return $this->createValidationResult();
81
+ }
82
+
83
+ function createValidationResult( $result = true, $message = null) {
84
+ $message = $message ? $message : __( 'OK', 'gallery-custom-links' );
85
+ return ['result' => $result, 'message' => $message];
86
+ }
87
+ }
common/admin.css DELETED
@@ -1,404 +0,0 @@
1
- /* MEOW-TABS */
2
-
3
- .meow-tabs {
4
- display: flex;
5
- flex-wrap: wrap;
6
- box-sizing: border-box;
7
- }
8
-
9
- .meow-tabs * {
10
- box-sizing: border-box;
11
- }
12
-
13
- .meow-tabs .meow-tabs-input {
14
- position: absolute;
15
- opacity: 0;
16
- }
17
-
18
- .meow-tabs .meow-tabs-label {
19
- width: auto;
20
- padding: 4px 12px;
21
- background: #3c3c3c;
22
- cursor: pointer;
23
- font-weight: bold;
24
- font-size: 13px;
25
- text-transform: uppercase;
26
- color: white;
27
- transition: background 0.1s, color 0.1s;
28
- }
29
-
30
- .meow-tabs .inside {
31
- display: none;
32
- width: 100%;
33
- }
34
-
35
- .meow-tabs .meow-tabs-label:hover {
36
- background: #36495f;
37
- }
38
-
39
- .meow-tabs .meow-tabs-label:active {
40
- background: #3C82C7;
41
- }
42
-
43
- .meow-tabs .meow-tabs-input:focus + .meow-tabs-label {
44
- box-shadow: inset 0px 0px 0px 3px #2aa1c0;
45
- z-index: 1;
46
- }
47
-
48
- .meow-tabs .meow-tabs-input:checked + .meow-tabs-label {
49
- background: #3C82C7 !important;
50
- }
51
-
52
- .meow-tabs-input:checked + .meow-tabs-label + .inside {
53
- display: block;
54
- order: 99;
55
- }
56
-
57
- .meow-tabs .inside {
58
- background: #fff;
59
- }
60
-
61
- /* MEOW-BOX */
62
-
63
- .meow-box {
64
- box-sizing: border-box;
65
- border: 1px solid #e5e5e5;
66
- box-shadow: 0px 3px 5px rgba(0, 0, 0, .1);
67
- background: #fff;
68
- color: #444;
69
- margin-bottom: 15px;
70
- font-size: 13px !important;
71
- border-top-right-radius: 8px;
72
- }
73
-
74
- .meow-box input, .meow-box th, .meow-box label, .meow-box select {
75
- font-size: 13px !important;
76
- }
77
-
78
- .meow-box small {
79
- font-size: 12px !important;
80
- }
81
-
82
- .meow-box h3 {
83
- font-size: 14px;
84
- padding: 10px 12px;
85
- margin: 0;
86
- background: #3c3c3c;
87
- color: #ffffff;
88
- text-transform: uppercase;
89
- /*border-bottom: 1px solid #eee;*/
90
- }
91
-
92
- .meow-box h3 .dashicons {
93
- position: relative;
94
- top: 0px;
95
- margin-right: 5px;
96
- }
97
-
98
- .meow-box .pro_info {
99
- padding: 5px;
100
- margin: 10px -10px 5px -10px;
101
- font-size: 11px;
102
- line-height: 13px;
103
- }
104
-
105
- .meow-box .pro_info.enabled {
106
- background: #4482d2;
107
- border-left: 5px solid #4482d2;
108
- color: white;
109
- }
110
-
111
- .meow-box .pro_info.disabled {
112
- background: #96555b;
113
- border-left: 5px solid #632329;
114
- color: white;
115
- }
116
-
117
- .meow-box .pro_info.disabled a {
118
- background: #96555b;
119
- color: red;
120
- text-decoration: none;
121
- }
122
-
123
- .meow-box .inside {
124
- margin: 10px;
125
- }
126
-
127
- .meow-box th {
128
- padding: 10px 10px 10px 0px;
129
- width: 22%;
130
- }
131
-
132
- .meow-box td {
133
- padding: 10px 10px;
134
- }
135
-
136
- .meow-box p.submit, .meow-box div.submit {
137
- text-align: right;
138
- margin: 10px -10px -10px -10px;
139
- padding: 7px 10px 10px 0px !important;
140
- border-top: 1px solid #eee !important;
141
- max-width: inherit;
142
- background: rgba(125, 125, 125, 0.04);
143
- border-radius: 0px;
144
- }
145
-
146
- .meow-box [type="text"], .meow-box select {
147
- width: 100%;
148
- }
149
-
150
- /* CONTROLS INSIDE A COLUMN (LABEL ON THE LEFT, VALUE ON THE RIGHT) */
151
- .meow-box td [type="text"], .meow-box td [type="checkbox"], .meow-box td select {
152
- margin-top: -3px;
153
- }
154
-
155
- .meow-header-ad {
156
- float: right;
157
- }
158
-
159
- /* BUTTONS */
160
-
161
- .meow-button-xs {
162
- font-size: 10px !important;
163
- height: 20px !important;
164
- line-height: 18px !important;
165
- position: relative !important;
166
- top: 1px !important;
167
- text-align: center !important
168
- }
169
-
170
- /* MODAL */
171
-
172
- #meow-modal-info-backdrop {
173
- background: rgba(0, 0, 0, 0.75);
174
- position: fixed;
175
- top: 0px;
176
- bottom: 0px;
177
- right: 0px;
178
- left: 0px;
179
- z-index: 10000;
180
- }
181
-
182
- #meow-modal-info {
183
- background: white;
184
- box-shadow: 0px 0px 5px black;
185
- padding: 15px;
186
- overflow-y: scroll;
187
- position: fixed;
188
- z-index: 10000;
189
- left: 100px;
190
- right: 100px;
191
- top: 50px;
192
- bottom: 50px;
193
- }
194
-
195
- #meow-modal-info h3 {
196
- height: 25px;
197
- border-bottom: 2px solid #808080;
198
- }
199
-
200
- #meow-modal-info td {
201
- text-align: center;
202
- font-size: 11px;
203
- border: 1px solid #D3DCFF;
204
- padding: 10px 15px;
205
- background: #EFF8FF;
206
- }
207
-
208
- #meow-modal-info .close {
209
- float: right;
210
- font-size: 18px;
211
- font-weight: bold;
212
- font-family: Verdana;
213
- cursor: pointer;
214
- }
215
-
216
- #meow-modal-info .loading {
217
- background-color: #F2F2F2;
218
- text-align: center;
219
- padding-top: 10px;
220
- background-size: 32px 32px;
221
- }
222
-
223
- #meow-modal-info .meow-sized-image {
224
- width: 19px;
225
- height: 19px;
226
- margin-right: 10px;
227
- }
228
-
229
- /* IMAGE SIZES RELATED INFO */
230
-
231
- .meow-sized-images {
232
- margin-top: 0px;
233
- cursor: pointer;
234
- }
235
-
236
- .meow-sized-images li, #meow-modal-info .meow-sized-image {
237
- display: block;
238
- color: white;
239
- padding: 5px 0px;
240
- font-size: 10px;
241
- text-align: center;
242
- width: 18px;
243
- height: 18px;
244
- line-height: 8px;
245
- background: black;
246
- float: left;
247
- margin-right: 1px;
248
- box-sizing: border-box;
249
- margin-bottom: 2px;
250
- }
251
-
252
- .meow-sized-images:after {
253
- clear: both;
254
- content:""; display:table;
255
- }
256
-
257
- .meow-sized-images + span {
258
- position: relative;
259
- top: -12px;
260
- }
261
-
262
- /* MEOW COLORS */
263
-
264
- .meow-bk-blue {
265
- background: #3C82C7 !important;
266
- color: white;
267
- }
268
-
269
- .meow-bk-orange {
270
- background: #f1900e !important;
271
- color: white;
272
- }
273
-
274
- .meow-bk-red {
275
- background: #c53a47 !important;
276
- color: white;
277
- }
278
-
279
- .meow-bk-gray {
280
- background: gray !important;
281
- color: white;
282
- }
283
-
284
- .meow-bk-green {
285
- background: #2b9463 !important;
286
- color: white;
287
- }
288
-
289
- .meow-bk-black {
290
- background: #3c3c3c !important;
291
- color: white;
292
- }
293
-
294
- .meow-bk-purple {
295
- background: #984c96 !important;
296
- color: white;
297
- }
298
-
299
- /* DASHBOARD */
300
-
301
- .meow-dashboard {
302
- box-sizing: border-box;
303
- }
304
-
305
- .meow-dashboard .meow-box ul {
306
- padding: 0px;
307
- margin: 0px;
308
- }
309
-
310
- .meow-featured-plugins .meow-box li {
311
- min-height: 80px;
312
- }
313
-
314
- .meow-dashboard .meow-box li {
315
- border-bottom: 1px solid #eee;
316
- margin: 0px;
317
- padding: 10px;
318
- box-sizing: border-box;
319
- }
320
-
321
- .meow-dashboard .meow-box li img {
322
- width: 80px;
323
- height: 80px;
324
- float: left;
325
- margin: -10px 10px -10px -10px;
326
-
327
- }
328
-
329
- .meow-dashboard .meow-box li:last-child {
330
- border: none;
331
- padding-bottom: 0px;
332
- }
333
-
334
- .meow-button-xs .dashicons {
335
- font-size: 18px !important;
336
- }
337
-
338
- .meow-button-xs.updating-message:before {
339
- margin-top: 0px !important;
340
- }
341
-
342
- .meow-button-xs.updating-message * {
343
- display: none;
344
- }
345
-
346
- #phpinfo {
347
- font-size: 11px;
348
- }
349
-
350
- #phpinfo .e {
351
- padding: 5px;
352
- background: lightgray;
353
- }
354
-
355
- #phpinfo .h th {
356
- padding: 5px;
357
- color: white;
358
- background: gray;
359
- text-align: left;
360
- font-size: 14px !important;
361
- }
362
-
363
- #phpinfo h1 {
364
- padding: 10px 0px;
365
- font-weight: bold;
366
- }
367
-
368
- #phpinfo h2 {
369
- padding: 10px 0px;
370
- font-weight: bold;
371
- font-size: 20px;
372
- }
373
-
374
- #error_log {
375
- font-size: 12px;
376
- }
377
-
378
- /* ROWS AND COLUMNS */
379
- .meow-col { display: block; float:left; margin: 1% 0 1% 1.6%; }
380
- .meow-col:first-child { margin-left: 0; }
381
-
382
- /* GROUPING */
383
- .meow-row { clear: both; padding: 0px; margin: 0px; }
384
- .meow-row:before,
385
- .meow-row:after { content:""; display:table; }
386
- .meow-row:after { clear:both; }
387
- .meow-row { zoom:1; /* For IE 6/7 */ }
388
-
389
- /* GRID OF THREE */
390
- .meow-span_3_of_3 { width: 100%; }
391
- .meow-span_2_of_3 { width: 66.1%; }
392
- .meow-span_1_of_3 { width: 32.2%; }
393
-
394
- /* GRID OF TWO */
395
- .meow-span_2_of_2 { width: 100%; }
396
- .meow-span_1_of_2 { width: 49.2%; }
397
-
398
- @media only screen and (max-width: 480px) {
399
- .meow-col { margin: 0 0 0px 0;}
400
- .meow-span_3_of_3, .meow-span_2_of_3, .meow-span_1_of_3 { width: 100%; }
401
- .meow-span_2_of_2, .meow-span_1_of_2 { width: 100%; }
402
- .meow-header-ad { display: none !important; }
403
- .meow-box [type="text"] { width: 100% !important; }
404
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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A2LTEweiIvPgo8L3N2Zz4K';
8
 
9
  public static $loaded = false;
10
- public static $admin_version = "2.6";
11
 
12
  public $prefix; // prefix used for actions, filters (mfrh)
13
  public $mainfile; // plugin main file (media-file-renamer.php)
14
  public $domain; // domain used for translation (media-file-renamer)
 
 
 
15
 
16
- public function __construct( $prefix, $mainfile, $domain, $disableReview = false ) {
17
 
18
- // Core Admin (used by all Meow Apps plugins)
19
- if ( !MeowApps_Admin::$loaded ) {
20
  if ( is_admin() ) {
 
 
 
 
 
21
  add_action( 'admin_menu', array( $this, 'admin_menu_start' ) );
22
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
23
- add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
24
- add_action( 'wp_ajax_meow_perf_load', array( $this, 'wp_ajax_meow_perf_load' ) );
25
- add_action( 'wp_ajax_meow_file_check', array( $this, 'wp_ajax_meow_file_check' ) );
26
  if ( isset( $_GET['page'] ) && $_GET['page'] === 'meowapps-main-menu' ) {
27
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
28
  }
29
  }
30
- MeowApps_Admin::$loaded = true;
31
  }
32
 
33
  // Variables for this plugin
34
  $this->prefix = $prefix;
35
  $this->mainfile = $mainfile;
36
  $this->domain = $domain;
37
- $this->is_theme = ( strpos( $this->mainfile, '-theme' ) !== false );
38
 
39
  // If there is no mainfile, it's either a Pro only Plugin (with no Free version available) or a Theme.
40
- if ( !$this->is_theme ) {
41
- register_activation_hook( $mainfile, array( $this, 'show_meowapps_create_rating_date' ) );
42
- if ( is_admin() ) {
43
- $license = get_option( $this->prefix . '_license', "" );
44
- if ( ( !empty( $license ) ) && !file_exists( plugin_dir_path( $this->mainfile ) . 'common/meowapps/admin.php' ) ) {
45
- add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
46
- }
47
- if ( !$disableReview ) {
48
- $rating_date = $this->create_rating_date();
49
- if ( time() > $rating_date ) {
50
- add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
51
- }
52
- }
53
- }
54
- }
55
-
56
  add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
57
  }
58
 
59
- function wp_ajax_meow_perf_load() {
60
- return __( 'Did nothing but a blank request.', $this->domain );
61
- }
62
-
63
- function wp_ajax_meow_file_check() {
64
- $tmpfile = wp_tempnam();
65
- unlink( $tmpfile );
66
- // translators: %s is a filename of an empty temporary file
67
- return sprintf( __( 'Created and deleted %s', $this->domain ), $tmpfile );
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
 
70
  function request_verify_ssl() {
71
  return get_option( 'force_sslverify', false );
72
  }
73
 
74
- function show_meowapps_create_rating_date() {
75
- delete_option( 'meowapps_hide_meowapps' );
76
- $this->create_rating_date();
77
- }
78
-
79
- function create_rating_date() {
80
- $rating_date = get_option( $this->prefix . '_rating_date' );
81
- if ( empty( $rating_date ) ) {
82
- $two_months = strtotime( '+2 months' );
83
- $six_months = strtotime( '+4 months' );
84
- $rating_date = mt_rand( $two_months, $six_months );
85
- update_option( $this->prefix . '_rating_date', $rating_date, false );
86
- }
87
- return $rating_date;
88
- }
89
-
90
- function admin_notices_rating() {
91
- if ( isset( $_POST[$this->prefix . '_remind_me'] ) ) {
92
- $two_weeks = strtotime( '+2 weeks' );
93
- $six_weeks = strtotime( '+6 weeks' );
94
- $future_date = mt_rand( $two_weeks, $six_weeks );
95
- update_option( $this->prefix . '_rating_date', $future_date, false );
96
- return;
97
- }
98
- else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
99
- $twenty_years = strtotime( '+5 years' );
100
- update_option( $this->prefix . '_rating_date', $twenty_years, false );
101
- return;
102
- }
103
- else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
104
- $twenty_years = strtotime( '+10 years' );
105
- update_option( $this->prefix . '_rating_date', $twenty_years, false );
106
- return;
107
- }
108
- $rating_date = get_option( $this->prefix . '_rating_date' );
109
- echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
110
- echo '<p style="font-size: 100%;">';
111
- printf(
112
- // translators: %1$s is a plugin nicename, %2$s is a short url (slug)
113
- __( 'You have been using <b>%1$s</b> for some time now. Thank you! Could you kindly share your opinion with me, along with, maybe, features you would like to see implemented? Then, please <a style="font-weight: bold; color: #b926ff;" target="_blank" href="https://wordpress.org/support/plugin/%2$s/reviews/?rate=5#new-post">write a little review</a>. That will also bring me joy and motivation, and I will get back to you :) <u>In the case you already have written a review</u>, please check again. Many reviews got removed from WordPress recently.', $this->domain ),
114
- $this->nice_name_from_file( $this->mainfile ),
115
- $this->nice_short_url_from_file( $this->mainfile )
116
- );
117
- echo '<p>
118
- <form method="post" action="" style="float: right;">
119
- <input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
120
- <input type="submit" name="submit" id="submit" class="button button-red" value="'
121
- . __( 'Never remind me!', $this->domain ) . '">
122
- </form>
123
- <form method="post" action="" style="float: right; margin-right: 10px;">
124
- <input type="hidden" name="' . $this->prefix . '_remind_me" value="true">
125
- <input type="submit" name="submit" id="submit" class="button button-primary" value="'
126
- . __( 'Remind me in a few weeks...', $this->domain ) . '">
127
- </form>
128
- <form method="post" action="" style="float: right; margin-right: 10px;">
129
- <input type="hidden" name="' . $this->prefix . '_did_it" value="true">
130
- <input type="submit" name="submit" id="submit" class="button button-primary" value="'
131
- . __( 'Yes, I did it!', $this->domain ) . '">
132
- </form>
133
- <div style="clear: both;"></div>
134
- </p>
135
- ';
136
- echo '</div>';
137
- }
138
-
139
- function nice_short_url_from_file( $file ) {
140
- $info = pathinfo( $file );
141
- if ( !empty( $info ) ) {
142
- $info['filename'] = str_replace( '-pro', '', $info['filename'] );
143
- return $info['filename'];
144
- }
145
- return "";
146
- }
147
-
148
  function nice_name_from_file( $file ) {
149
  $info = pathinfo( $file );
150
  if ( !empty( $info ) ) {
@@ -163,9 +97,8 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
163
  delete_option( $this->prefix . '_license' );
164
  return;
165
  }
166
- echo '<div class="error">';
167
  printf(
168
- // translators: %s is a plugin nicename
169
  __( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://store.meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
170
  $this->nice_name_from_file( $this->mainfile ) );
171
  echo '<p>
@@ -179,103 +112,29 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
179
  echo '</div>';
180
  }
181
 
182
- function display_ads() {
183
- return !get_option( 'meowapps_hide_ads', false );
184
- }
185
-
186
- function display_title( $title = "Meow Apps",
187
- $author = "By <a style='text-decoration: none;' href='https://meowapps.com' target='_blank'>Jordy Meow</a>" ) {
188
- if ( !empty( $this->prefix ) && $title !== "Meow Apps" )
189
- $title = apply_filters( $this->prefix . '_plugin_title', $title );
190
- if ( $this->display_ads() ) {
191
- }
192
- ?>
193
- <h1 style="line-height: 16px;">
194
- <img width="42" style="margin-right: 10px; float: left; position: relative; top: -5px;"
195
- src="<?php echo MeowApps_Admin::$logo ?>"><?php echo $title; ?><br />
196
- <span style="font-size: 12px"><?php echo $author; ?></span>
197
- </h1>
198
- <div style="clear: both;"></div>
199
- <?php
200
- }
201
-
202
- function admin_enqueue_scripts() {
203
- wp_register_style( 'meowapps-core-css', $this->common_url( 'admin.css' ) );
204
- wp_enqueue_style( 'meowapps-core-css' );
205
- }
206
-
207
  function admin_menu_start() {
 
208
  if ( get_option( 'meowapps_hide_meowapps', false ) ) {
209
  register_setting( 'general', 'meowapps_hide_meowapps' );
210
  add_settings_field( 'meowapps_hide_ads', 'Meow Apps Menu', array( $this, 'meowapps_hide_dashboard_callback' ), 'general' );
211
  return;
212
  }
213
 
214
- // Creates standard menu if it does NOT exist
215
  global $submenu;
216
  if ( !isset( $submenu[ 'meowapps-main-menu' ] ) ) {
217
- add_menu_page( 'Meow Apps', '<img alt="Meow Apps" style="width: 24px; margin-left: -30px; position: absolute; margin-top: -3px;" src="' . MeowApps_Admin::$logo . '" />Meow Apps', 'manage_options', 'meowapps-main-menu',
218
  array( $this, 'admin_meow_apps' ), '', 82 );
219
  add_submenu_page( 'meowapps-main-menu', __( 'Dashboard', $this->domain ),
220
  __( 'Dashboard', $this->domain ), 'manage_options',
221
  'meowapps-main-menu', array( $this, 'admin_meow_apps' ) );
222
  }
223
-
224
- add_settings_section( 'meowapps_common_settings', null, null, 'meowapps_common_settings-menu' );
225
- add_settings_field( 'meowapps_hide_meowapps', __( 'Main Menu', $this->domain ),
226
- array( $this, 'meowapps_hide_dashboard_callback' ),
227
- 'meowapps_common_settings-menu', 'meowapps_common_settings' );
228
- add_settings_field( 'meowapps_force_sslverify', __( 'SSL Verify', $this->domain ),
229
- array( $this, 'meowapps_force_sslverify_callback' ),
230
- 'meowapps_common_settings-menu', 'meowapps_common_settings' );
231
- // add_settings_field( 'meowapps_hide_ads', __( 'Ads', $this->domain ),
232
- // array( $this, 'meowapps_hide_ads_callback' ),
233
- // 'meowapps_common_settings-menu', 'meowapps_common_settings' );
234
- register_setting( 'meowapps_common_settings', 'force_sslverify' );
235
- register_setting( 'meowapps_common_settings', 'meowapps_hide_meowapps' );
236
- register_setting( 'meowapps_common_settings', 'meowapps_hide_ads' );
237
- }
238
-
239
- function meowapps_hide_ads_callback() {
240
- $value = get_option( 'meowapps_hide_ads', null );
241
- $html = '<input type="checkbox" id="meowapps_hide_ads" name="meowapps_hide_ads" value="1" ' .
242
- checked( 1, get_option( 'meowapps_hide_ads' ), false ) . '/>';
243
- $html .= __( '<label>Hide</label><br /><small>Doesn\'t display the ads.</small>', $this->domain );
244
- echo $html;
245
  }
246
 
247
  function meowapps_hide_dashboard_callback() {
248
- $value = get_option( 'meowapps_hide_meowapps', null );
249
  $html = '<input type="checkbox" id="meowapps_hide_meowapps" name="meowapps_hide_meowapps" value="1" ' .
250
  checked( 1, get_option( 'meowapps_hide_meowapps' ), false ) . '/>';
251
  $html .= __( '<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu and all its components, for a cleaner admin. This option will be reset if a new Meow Apps plugin is installed. <b>Once activated, an option will be added in your General settings to display it again.</b></small>', $this->domain );
252
- echo $html;
253
- }
254
-
255
- function meowapps_force_sslverify_callback() {
256
- $value = get_option( 'force_sslverify', null );
257
- $html = '<input type="checkbox" id="force_sslverify" name="force_sslverify" value="1" ' .
258
- checked( 1, get_option( 'force_sslverify' ), false ) . '/>';
259
- $html .= __( '<label>Force</label><br /><small>Updates and licenses checks are usually made without checking SSL certificates and it is actually fine this way. But if you are intransigent when it comes to SSL matters, this option will force it.</small>', $this->domain );
260
- echo $html;
261
- }
262
-
263
- function display_serialkey_box( $url = "https://meowapps.com/" ) {
264
- $html = '<div class="meow-box">';
265
- $html .= '<h3 class="' . ( $this->is_registered( $this->prefix ) ? 'meow-bk-blue' : 'meow-bk-red' ) . '">'
266
- . __( 'Pro Version', $this->domain ) . ' '
267
- . ( $this->is_registered( $this->prefix ) ? __( '(enabled)', $this->domain ) : __( '(disabled)', $this->domain ) )
268
- . '</h3>';
269
- $html .= '<div class="inside">';
270
- echo $html;
271
- $html = apply_filters(
272
- $this->prefix . '_meowapps_license_input',
273
- sprintf(
274
- // translators: %1$s is a url attribute, %2$s is a url visible for user
275
- __( 'More information about the Pro version here: <a target="_blank" href="%1$s">%2$s</a>. If you actually bought the Pro version already, please remove the current plugin and download the Pro version from your account at the <a target="_blank" href="https://store.meowapps.com/account/downloads/">Meow Apps Store</a>.', $this->domain ), $url, $url ),
276
- $url );
277
- $html .= '</div>';
278
- $html .= '</div>';
279
  echo $html;
280
  }
281
 
@@ -283,342 +142,86 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
283
  return apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
284
  }
285
 
286
- function check_install( $plugin ) {
287
- $pro = false;
 
 
 
 
 
 
288
 
289
- $pluginpath = trailingslashit( plugin_dir_path( __FILE__ ) ) . '../../' . $plugin . '-pro';
290
- if ( !file_exists( $pluginpath ) ) {
291
- $pluginpath = trailingslashit( plugin_dir_path( __FILE__ ) ) . '../../' . $plugin;
292
- if ( !file_exists( $pluginpath ) ) {
293
- $url = wp_nonce_url( "update.php?action=install-plugin&plugin=$plugin", "install-plugin_$plugin" );
294
- return "<a href='$url'><small><span class='' style='float: right;'>" . __( 'install', $this->domain ) . "</span></small></a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  }
296
  }
297
- else {
298
- $pro = true;
299
- $plugin = $plugin . "-pro";
300
- }
301
-
302
- $plugin_file = $plugin . '/' . $plugin . '.php';
303
- if ( is_plugin_active( $plugin_file ) ) {
304
- if ( $plugin == 'wplr-sync' )
305
- $pro = true;
306
- if ( $pro )
307
- return "<small><span style='float: right;'><span class='dashicons dashicons-heart' style='color: rgba(255, 63, 0, 1); font-size: 30px !important; margin-right: 10px;'></span></span></small>";
308
- else
309
- return "<small><span style='float: right;'><span class='dashicons dashicons-yes' style='color: #00b4ff; font-size: 30px !important; margin-right: 10px;'></span></span></small>";
310
  }
311
  else {
312
- $url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $plugin_file ),
313
- 'activate-plugin_' . $plugin_file );
314
- return '<small><span style="color: black; float: right;">off
315
- (<a style="color: rgba(30,140,190,1); text-decoration: none;" href="' .
316
- $url . '">' . __( 'enable', $this->domain ) . '</a>)</span></small>';
317
- }
318
- }
319
-
320
- function common_url( $file ) {
321
- die( __( "Meow Apps: The function common_url( \$file ) needs to be overriden.", $this->domain ) );
322
- // Normally, this should be used:
323
- // return plugin_dir_url( __FILE__ ) . ( '\/common\/' . $file );
324
- }
325
-
326
- function meowapps_logo_url() {
327
- return $this->common_url( 'img/meowapps.png' );
328
- }
329
-
330
- function plugins_loaded() {
331
- if ( isset( $_GET[ 'tool' ] ) && $_GET[ 'tool' ] == 'error_log' ) {
332
- $sec = "5";
333
- header( "Refresh: $sec;" );
334
  }
335
  }
336
 
337
  function admin_meow_apps() {
 
 
 
 
 
338
 
339
- echo '<div class="wrap meow-dashboard">';
340
- if ( isset( $_GET['tool'] ) && $_GET['tool'] == 'phpinfo' ) {
341
- echo "<a href=\"javascript:history.go(-1)\">< ". __( 'Go back', $this->domain ) . "</a><br /><br />";
342
- echo '<div id="phpinfo">';
343
- ob_start();
344
- phpinfo();
345
- $pinfo = ob_get_contents();
346
- ob_end_clean();
347
- $pinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $pinfo );
348
- echo $pinfo;
349
- echo "</div>";
350
- }
351
- else if ( isset( $_GET['tool'] ) && $_GET['tool'] == 'error_log' ) {
352
- $log_msg = __( '=== MEOW APPS DEBUG (This is not an error) ===', $this->domain );
353
- if ( isset( $_POST['write_logs'] ) ) {
354
- error_log( $log_msg );
355
- }
356
- $errorpath = ini_get( 'error_log' );
357
- echo "<a href=\"javascript:history.go(-1)\">< ". __( 'Go back', $this->domain ) . "</a><br /><br />";
358
- echo '
359
- <form method="post">
360
- <input type="hidden" name="write_logs" value="true">
361
- <input class="button button-primary" type="submit" value=" ' . __( 'Write in the Error Logs', $this->domain ) . '">
362
- </form><br />';
363
- echo '<div id="error_log">';
364
- if ( file_exists( $errorpath ) ) {
365
- printf(
366
- // translators: %s is a preformatted timestamp
367
- __( "Now (auto-reload every 5 seconds): [%s UTC]", $this->domain ),
368
- date( "d-M-Y H:i:s", time() )
369
- );
370
- echo "<br /><br /><h2 style='margin: 0px;'>" . __( 'Errors (order by latest)', $this->domain ) . "</h2>";
371
- $errors = file_get_contents( $errorpath );
372
- $errors = explode( "\n", $errors );
373
- $errors = array_reverse( $errors );
374
- $errors = implode( "<br />", $errors );
375
- echo $errors;
376
- }
377
- else {
378
- _e( "The PHP Error Logs cannot be found. Please ask your hosting service for it.", $this->domain );
379
- }
380
- echo "</div>";
381
-
382
- }
383
- else {
384
-
385
- ?>
386
- <?php $this->display_title( 'Meow Apps' ); ?>
387
- <p>
388
- <?php _e( 'Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking <a target="_blank" href="http://offbeatjapan.org">a lot of photos</a>). Meow Apps is a suite of plugins focusing on photography, imaging, optimization and it teams up with the best players in the community (other themes and plugins developers). For more information, please check <a href="http://meowapps.com" target="_blank">Meow Apps</a>.', $this->domain )
389
- ?>
390
- </p>
391
-
392
- <h2 style="margin-bottom: 0px; margin-top: 25px;"><?php _e( 'Recommended Meow Apps Plugins', $this->domain ); ?></h2>
393
- <div class="meow-row meow-featured-plugins">
394
- <div class="meow-box meow-col meow-span_1_of_2">
395
- <ul class="">
396
- <li><img src='<?= $this->common_url( 'img/media-cleaner.jpg' ) ?>' />
397
- <a href='https://meowapps.com/plugin/media-cleaner/'><b>Media Cleaner</b></a>
398
- <?php echo $this->check_install( 'media-cleaner' ) ?><br />
399
- <?php _e( 'Very complex plugin which analyzes your WordPress deeply to find out which files are in use, or not. Then you can trash them, before deleting them permanently.', $this->domain ); ?></li>
400
- <li><img src='<?= $this->common_url( 'img/media-file-renamer.jpg' ) ?>' />
401
- <a href='https://meowapps.com/plugin/media-file-renamer/'><b>Media File Renamer</b></a>
402
- <?php echo $this->check_install( 'media-file-renamer' ) ?><br />
403
- <?php _e( 'The Renamer will help you in getting nicer filenames, a better SEO and well-organized files. Extremely popular.', $this->domain ); ?></li>
404
- <li><img src='<?= $this->common_url( 'img/default.png' ) ?>' />
405
- <a href='https://meowapps.com/plugin/contact-form-block/'><b>Contact Form Block</b></a>
406
- <?php echo $this->check_install( 'contact-form-block' ) ?><br />
407
- <?php _e( 'A simpler, nicer, prettier contact form. If you simply want your visitors to get in touch with you, this very light plugin will make your life easier.', $this->domain ); ?></li>
408
- <li><img src='<?= $this->common_url( 'img/default.png' ) ?>' />
409
- <a href='https://meowapps.com/plugin/meow-analytics/'><b>Meow Analytics</b></a>
410
- <?php echo $this->check_install( 'meow-analytics' ) ?><br />
411
- <?php _e( 'Tired of those fat plugins which are messing-up with your install? Switch to Meow Analytics, it\'s extremely light and features a cute dashboard.', $this->domain ); ?></li>
412
- </ul>
413
- </div>
414
- <div class="meow-box meow-col meow-span_1_of_2 ">
415
- <ul class="">
416
- <li><img src='<?= $this->common_url( 'img/meow-gallery.jpg' ) ?>' />
417
- <a href='https://meowapps.com/plugin/meow-gallery/'><b>Meow Gallery</b></a>
418
- <?php echo $this->check_install( 'meow-gallery' ) ?><br />
419
- <?php _e( 'Beautiful but lightweight gallery with many layouts. The only one that allows you to uninstall it without losing anything.', $this->domain ); ?></li>
420
- <li><img src='<?= $this->common_url( 'img/meow-lightbox.jpg' ) ?>' />
421
- <a href='https://meowapps.com/plugin/meow-lightbox/'><b>Meow Lightbox</b></a>
422
- <?php echo $this->check_install( 'meow-lightbox' ) ?><br />
423
- <?php _e( 'A very smooth and fast Lightbox which will also display your EXIF data (camera, lens, etc). Try it, you will love it.', $this->domain ); ?></li>
424
- <li><img src='<?= $this->common_url( 'img/wplr-sync.jpg' ) ?>' />
425
- <a href='https://meowapps.com/plugin/wplr-sync/'><b>WP/LR Sync</b></a>
426
- <?php echo $this->check_install( 'wplr-sync' ) ?><br />
427
- <?php _e( 'Synchronize your Lightroom to your WordPress. This plugin is loved by a huge community of photographers.', $this->domain ); ?></li>
428
- <li><img src='<?= $this->common_url( 'img/wp-retina-2x.jpg' ) ?>' />
429
- <a href='https://meowapps.com/plugin/wp-retina-2x/'><b>WP Retina 2x</b></a>
430
- <?php echo $this->check_install( 'wp-retina-2x' ) ?><br />
431
- <?php _e( 'Here is the very famous plugin that adds Retina support to any website.', $this->domain ); ?></li>
432
- </ul>
433
- </div>
434
- </div>
435
-
436
- <h2><?php _e( 'WordPress Performance', $this->domain ); ?></h2>
437
- <div style="background: white; padding: 5px 15px 5px 15px; box-shadow: 2px 2px 1px rgba(0,0,0,.02); margin-bottom: 15px;">
438
- <p><?php _e( 'The <b>Empty Request Time</b> helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then and click on Reset to see how it influences the results. With <b>File Operation Time</b>, you will find out if your server is slow with files. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms. File Operation Time should take only a few milliseconds more than the Empty Request Time. For more information about this, <a href="https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time" target="_blank">click here</a>.', $this->domain ); ?></p>
439
- </div>
440
-
441
- <div>
442
-
443
- <div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
444
- <div style='font-size: 14px; line-height: 14px; margin-bottom: 20px;'><?php _e( 'Empty Request Time', $this->domain ); ?></div>
445
- <div style='font-size: 32px; line-height: 32px; margin-bottom: 10px;' id='meow-perf-load-average'><?php _e( 'N/A', $this->domain ); ?></div>
446
- <div style='font-size: 12px; line-height: 12px; margin-bottom: 20px;'><?php _e( 'Based on', $this->domain ); ?>
447
- <span id='meow-perf-load-count'>0</span> <?php _e( 'request(s)', $this->domain ); ?>
448
- </div>
449
- <input type='submit' style='text-align: center; width: 100%;' id="meow-perf-reset" value="Reset" class="button button-primary">
450
- </div>
451
-
452
- <div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
453
- <div style='font-size: 14px; line-height: 14px; margin-bottom: 20px;'><?php _e( 'File Operation Time', $this->domain ); ?></div>
454
- <div style='font-size: 32px; line-height: 32px; margin-bottom: 10px;' id='meow-file-check-time'><?php _e( 'N/A', $this->domain ); ?></div>
455
- <div style='font-size: 12px; line-height: 12px; margin-bottom: 20px;'><?php _e( 'Create temporary file and delete it.', $this->domain ); ?></div>
456
- <input type='submit' style='text-align: center; width: 100%;' id="meow-file-check-start" value="<?php _e( 'Check', $this->domain ); ?>" class="button button-primary">
457
- </div>
458
-
459
- <div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
460
- <a target='_blank' href='https://kinsta.com/?kaid=MFROFDOOINML'>
461
- <img style='height: 116px;' src='<?= $this->common_url( 'img/kinsta.png' ) ?>'>
462
- <div>Meow's 2020 Favorite Hosting</div>
463
- </a>
464
- </div>
465
-
466
- <div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
467
- <a target='_blank' href='https://tracking.maxcdn.com/rPK13'>
468
- <img style='height: 116px;' src='<?= $this->common_url( 'img/stackpath.png' ) ?>'>
469
- <div>Meow's 2020 Favorite CDN</div>
470
- </a>
471
- </div>
472
-
473
- <div style="clear: both;"></div>
474
-
475
- </div>
476
-
477
- <script>
478
- (function ($) {
479
- var calls = 0;
480
- var times = [];
481
-
482
- $('#meow-perf-reset').on('click', function () {
483
- calls = 0;
484
- times = [];
485
- $('#meow-perf-load-average').text('<?php _e( "N/A", $this->domain ); ?>');
486
- $('#meow-perf-load-count').text('0');
487
- });
488
-
489
- function perfLoad() {
490
- var start = new Date().getTime();
491
- $.ajax(ajaxurl, {
492
- method: 'post',
493
- dataType: 'json',
494
- data: {
495
- action: 'meow_perf_load',
496
- }
497
- }).done(function (response) {
498
- var end = new Date().getTime();
499
- var time = end - start;
500
- calls++;
501
- times.push(time);
502
- var sum = times.reduce(function(a, b) { return a + b; });
503
- var avg = Math.ceil(sum / times.length);
504
- $('#meow-perf-load-average').text(avg + ' <?php _e( "ms", $this->domain ); ?>');
505
- $('#meow-perf-load-count').text(calls);
506
- setTimeout(perfLoad, 5000);
507
- });
508
- };
509
-
510
- function perfFile() {
511
- var start = new Date().getTime();
512
- $.ajax(ajaxurl, {
513
- method: 'post',
514
- dataType: 'json',
515
- data: {
516
- action: 'meow_file_check',
517
- }
518
- }).done(function (response) {
519
- var end = new Date().getTime();
520
- var time = end - start;
521
- $('#meow-file-check-time').text(time + ' <?php _e( "ms", $this->domain ); ?>');
522
- $('#meow-file-check-start').text('<?php _e( "Check", $this->domain ); ?>');
523
- });
524
- };
525
-
526
- $('#meow-file-check-start').on('click', function () {
527
- $('#meow-file-check-start').text('...');
528
- perfFile();
529
- });
530
-
531
- setTimeout(perfLoad, 1500);
532
-
533
- })(jQuery);
534
- </script>
535
-
536
- <h2><?php _e( 'WordPress Recommendations', $this->domain ); ?></h2>
537
- <div style="background: white; padding: 5px 15px 5px 15px; box-shadow: 2px 2px 1px rgba(0,0,0,.02); margin-top: 15px;">
538
- <p>
539
- <?php _e( 'Too many WordPress installs are blown-up with useless and/or huge plugins, and bad practices. But that is because most users are overwhelmed by the diversity and immensity of the WordPress jungle. One rule of thumb is to keep your install the simplest as possible, with the least number of plugins (avoiding heavy ones too) and a good hosting service (avoid VPS except if you know exactly what you are doing). Articles are kept being updated on the Meow Apps website, with all the latest recommendations: ', $this->domain )?>
540
- <a href='https://meowapps.com/debugging-wordpress/' target='_blank'>
541
- How To Debug</a>,
542
- <a href='https://meowapps.com/seo-optimization/' target='_blank'>
543
- SEO Checklist & Optimization</a>,
544
- <a href='https://meowapps.com/clean-optimize-wordpress/' target='_blank'>
545
- Clean Up and Optimize</a>,
546
- <a href='https://meowapps.com/optimize-images-cdn/' target='_blank'>
547
- Optimize Images</a>,
548
- <a href='https://meowapps.com/best-hosting-services-wordpress/' target='_blank'>
549
- Best Hosting Services</a>.
550
- </p>
551
- </div>
552
-
553
- <h2 style="margin-bottom: 0px; margin-top: 25px;"><?php _e( 'Common Options & Tools', $this->domain ); ?></h2>
554
- <div class="meow-row">
555
- <div class="meow-box meow-col meow-span_2_of_3">
556
- <h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Common', $this->domain ); ?></h3>
557
- <div class="inside">
558
- <form method="post" action="options.php">
559
- <?php settings_fields( 'meowapps_common_settings' ); ?>
560
- <?php do_settings_sections( 'meowapps_common_settings-menu' ); ?>
561
- <?php submit_button(); ?>
562
- </form>
563
- </div>
564
- </div>
565
-
566
- <div class="meow-box meow-col meow-span_1_of_3">
567
- <h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Debug', $this->domain ); ?></h3>
568
- <div class="inside">
569
- <ul>
570
- <li><a href="?page=meowapps-main-menu&amp;tool=error_log"><?php _e( 'Display Error Log', $this->domain ); ?></a></li>
571
- <li><a href="?page=meowapps-main-menu&amp;tool=phpinfo"><?php _e( 'Display PHP Info', $this->domain ); ?></a></li>
572
- </ul>
573
- </div>
574
- </div>
575
-
576
- <div class="meow-box meow-col meow-span_1_of_3">
577
- <h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Post Types (used by this install)', $this->domain ); ?></h3>
578
- <div class="inside">
579
- <?php
580
- global $wpdb;
581
- // Maybe we could avoid to check more post_types.
582
- // SELECT post_type, COUNT(*) FROM `wp_posts` GROUP BY post_type
583
- $types = $wpdb->get_results( "SELECT post_type as 'type', COUNT(*) as 'count' FROM $wpdb->posts GROUP BY post_type" );
584
- $result = array();
585
- foreach( $types as $type )
586
- array_push( $result, "{$type->type} ({$type->count})" );
587
- echo implode( ', ', $result );
588
- ?>
589
- </div>
590
- </div>
591
- </div>
592
-
593
- <?php
594
- }
595
  }
596
 
597
  function admin_footer_text( $current ) {
598
  return sprintf(
599
  // translators: %1$s is the version of the interface; %2$s is a file path.
600
  __( 'Thanks for using <a href="https://meowapps.com">Meow Apps</a>! This is the Meow Admin %1$s <br /><i>Loaded from %2$s </i>', $this->domain ),
601
- MeowApps_Admin::$admin_version,
602
  __FILE__
603
  );
604
  }
605
-
606
- // HELPERS
607
-
608
- static function size_shortname( $name ) {
609
- $name = preg_split( '[_-]', $name );
610
- $short = strtoupper( substr( $name[0], 0, 1 ) );
611
- if ( count( $name ) > 1 )
612
- $short .= strtoupper( substr( $name[1], 0, 1 ) );
613
- return $short;
614
- }
615
-
616
  }
617
-
618
- }
619
-
620
- if ( file_exists( plugin_dir_path( __FILE__ ) . '/meowapps/admin.php' ) ) {
621
- require( 'meowapps/admin.php' );
622
  }
623
 
624
  ?>
1
  <?php
2
 
3
+ if ( !class_exists( 'MeowCommon_Admin' ) ) {
4
 
5
+ class MeowCommon_Admin {
 
 
6
 
7
  public static $loaded = false;
8
+ public static $admin_version = "3.2";
9
 
10
  public $prefix; // prefix used for actions, filters (mfrh)
11
  public $mainfile; // plugin main file (media-file-renamer.php)
12
  public $domain; // domain used for translation (media-file-renamer)
13
+ public $isPro = false;
14
+
15
+ public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+CiAgICAuc3Qye2ZpbGw6IzgwNDYyNX0uc3Qze2ZpbGw6I2ZkYTk2MH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik03MiA3YTc2IDc2IDAgMCAxIDg0IDkxQTc1IDc1IDAgMSAxIDcyIDd6IiBmaWxsPSIjNGE2YjhjIi8+CiAgPHBhdGggZD0iTTQ4IDQ4YzIgNSAyIDEwIDUgMTQgNSA4IDEzIDE3IDIyIDIwbDEtMTBjMS0yIDMtMyA1LTNoMTNjMiAwIDQgMSA1IDNsMyA5IDQtMTBjMi0zIDYtMiA5LTJoMTFjMyAyIDMgNSAzIDhsMiAzN2MwIDMtMSA3LTQgOGgtMTJjLTIgMC0zLTItNS00LTEgMS0yIDMtNCAzLTUgMS05IDEtMTMtMS0zIDItNSAyLTkgMnMtOSAxLTEwLTNjLTItNC0xLTggMC0xMi04LTMtMTUtNy0yMi0xMi03LTctMTUtMTQtMjAtMjMtMy00LTUtOC01LTEzIDEtNCAzLTEwIDYtMTMgNC0zIDEyLTIgMTUgMnoiIGZpbGw9IiMxMDEwMTAiLz4KICA8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDMgNTFsNCAxMS02IDVoLTZjLTMtNS0zLTExIDAtMTYgMi0yIDYtMyA4IDB6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTQ3IDYybDMgNmMwIDMgMCA0LTIgNnMtNCAyLTcgMmwtNi05aDZsNi01eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik01MCA2OGw4IDljLTMgMy01IDYtOSA4bC04LTljMyAwIDUgMCA3LTJzMy0zIDItNnoiLz4KICA8cGF0aCBkPSJNODIgNzRoMTJsNSAxOCAzIDExIDgtMjloMTNsMiA0MmgtOGwtMS0yLTEtMzEtMTAgMzItNyAxLTktMzMtMSAyOS0xIDRoLThsMy00MnoiIGZpbGw9IiNmZmYiLz4KICA8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTggNzdsNSA1Yy0xIDQtMiA4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
16
 
17
+ public function __construct( $prefix, $mainfile, $domain, $isPro = false, $disableReview = false ) {
18
 
19
+ if ( !MeowCommon_Admin::$loaded ) {
 
20
  if ( is_admin() ) {
21
+
22
+ // Check potential issues with this WordPress install, other plugins, etc.
23
+ new MeowCommon_Classes_Issues( $prefix, $mainfile, $domain );
24
+
25
+ // Create the Meow Apps Menu
26
  add_action( 'admin_menu', array( $this, 'admin_menu_start' ) );
 
 
 
 
27
  if ( isset( $_GET['page'] ) && $_GET['page'] === 'meowapps-main-menu' ) {
28
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
29
  }
30
  }
31
+ MeowCommon_Admin::$loaded = true;
32
  }
33
 
34
  // Variables for this plugin
35
  $this->prefix = $prefix;
36
  $this->mainfile = $mainfile;
37
  $this->domain = $domain;
38
+ $this->isPro = $isPro;
39
 
40
  // If there is no mainfile, it's either a Pro only Plugin (with no Free version available) or a Theme.
41
+ if ( is_admin() ) {
42
+ $license = get_option( $this->prefix . '_license', "" );
43
+ if ( !empty( $license ) && !$this->isPro ) {
44
+ add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
45
+ }
46
+ if ( !$disableReview ) {
47
+ new MeowCommon_Classes_Ratings( $prefix, $mainfile, $domain );
48
+ }
49
+ }
50
+ add_filter( 'plugin_row_meta', array( $this, 'custom_plugin_row_meta' ), 10, 2 );
 
 
 
 
 
 
51
  add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
52
  }
53
 
54
+ function custom_plugin_row_meta( $links, $file ) {
55
+ $path = pathinfo( $file );
56
+ $pathName = basename( $path['dirname'] );
57
+ $thisPath = pathinfo( $this->mainfile );
58
+ $thisPathName = basename( $thisPath['dirname'] );
59
+ $isActive = is_plugin_active( $file );
60
+ if ( !$isActive ) {
61
+ return $links;
62
+ }
63
+ $isIssue = $this->isPro && !$this->is_registered();
64
+ if ( strpos( $pathName, $thisPathName ) !== false ) {
65
+ $new_links = array(
66
+ 'settings' =>
67
+ sprintf( __( '<a href="admin.php?page=%s_settings">Settings</a>', $this->domain ), $this->prefix ),
68
+ 'license' =>
69
+ $this->is_registered() ?
70
+ ('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
71
+ ( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span>' . __( '<a target="_blank" href="https://store.meowapps.com">Get the <u>Pro Version</u></a>', $this->domain ), $this->prefix ) . '</span>') ),
72
+ );
73
+ $links = array_merge( $new_links, $links );
74
+ }
75
+ return $links;
76
  }
77
 
78
  function request_verify_ssl() {
79
  return get_option( 'force_sslverify', false );
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  function nice_name_from_file( $file ) {
83
  $info = pathinfo( $file );
84
  if ( !empty( $info ) ) {
97
  delete_option( $this->prefix . '_license' );
98
  return;
99
  }
100
+ echo '<div class="notice notice-error">';
101
  printf(
 
102
  __( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://store.meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
103
  $this->nice_name_from_file( $this->mainfile ) );
104
  echo '<p>
112
  echo '</div>';
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  function admin_menu_start() {
116
+ // Hide the admin if user doesn't like Meow much
117
  if ( get_option( 'meowapps_hide_meowapps', false ) ) {
118
  register_setting( 'general', 'meowapps_hide_meowapps' );
119
  add_settings_field( 'meowapps_hide_ads', 'Meow Apps Menu', array( $this, 'meowapps_hide_dashboard_callback' ), 'general' );
120
  return;
121
  }
122
 
123
+ // Create standard menu if it does not already exist
124
  global $submenu;
125
  if ( !isset( $submenu[ 'meowapps-main-menu' ] ) ) {
126
+ add_menu_page( 'Meow Apps', '<img alt="Meow Apps" style="width: 24px; margin-left: -30px; position: absolute; margin-top: -3px;" src="' . MeowCommon_Admin::$logo . '" />Meow Apps', 'manage_options', 'meowapps-main-menu',
127
  array( $this, 'admin_meow_apps' ), '', 82 );
128
  add_submenu_page( 'meowapps-main-menu', __( 'Dashboard', $this->domain ),
129
  __( 'Dashboard', $this->domain ), 'manage_options',
130
  'meowapps-main-menu', array( $this, 'admin_meow_apps' ) );
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
  function meowapps_hide_dashboard_callback() {
 
135
  $html = '<input type="checkbox" id="meowapps_hide_meowapps" name="meowapps_hide_meowapps" value="1" ' .
136
  checked( 1, get_option( 'meowapps_hide_meowapps' ), false ) . '/>';
137
  $html .= __( '<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu and all its components, for a cleaner admin. This option will be reset if a new Meow Apps plugin is installed. <b>Once activated, an option will be added in your General settings to display it again.</b></small>', $this->domain );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  echo $html;
139
  }
140
 
142
  return apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
143
  }
144
 
145
+ function get_phpinfo() {
146
+ ob_start();
147
+ phpinfo( INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES );
148
+ $html = ob_get_contents();
149
+ ob_end_clean();
150
+ $html = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $html );
151
+ echo $html;
152
+ }
153
 
154
+ function get_phperrorlogs() {
155
+ $errorpath = ini_get( 'error_log' );
156
+ $output_lines = array();
157
+ if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
158
+ try {
159
+ $file = new SplFileObject( $errorpath, 'r' );
160
+ $file->seek( PHP_INT_MAX );
161
+ $last_line = $file->key();
162
+ $iterator = new LimitIterator( $file, $last_line > 500 ? $last_line - 500 : 0, $last_line );
163
+ $lines = iterator_to_array( $iterator );
164
+ foreach ( $lines as $line ) {
165
+ $newline = '';
166
+ if ( preg_match( '/PHP Fatal/', $line ) ) {
167
+ $newline = '<div class="fatal">' . $line . '</div>';
168
+ }
169
+ else if ( preg_match( '/PHP Warning/', $line ) ) {
170
+ $newline = '<div class="warning">' . $line . '</div>';
171
+ }
172
+ else if ( preg_match( '/PHP Notice/', $line ) ) {
173
+ $newline = '<div class="notice">' . $line . '</div>';
174
+ }
175
+ else {
176
+ continue;
177
+ }
178
+ array_push( $output_lines, $newline );
179
+ }
180
+ }
181
+ catch ( OutOfBoundsException $e ) {
182
+ error_log( $e->getMessage() );
183
  }
184
  }
185
+ if ( empty( $output_lines ) ) {
186
+ return '<div class="fatal">Your PHP Error Logs is either empty, or (more likely is not accessible through PHP. You should contact your hosting service and ask them how to get it.</div>';
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
  else {
189
+ $output_lines = array_reverse( $output_lines );
190
+ $html = '';
191
+ $previous = '';
192
+ foreach ( $output_lines as $line ) {
193
+ // Let's avoid similar errors, since it's not useful. We should also make this better
194
+ // and not only theck this depending on tie.
195
+ if ( preg_replace( '/\[.*\] PHP/', '', $previous ) !== preg_replace( '/\[.*\] PHP/', '', $line ) ) {
196
+ $html .= $line;
197
+ $previous = $line;
198
+ }
199
+ }
200
+ return $html;
 
 
 
 
 
 
 
 
 
 
201
  }
202
  }
203
 
204
  function admin_meow_apps() {
205
+ echo "<div id='meow-common-dashboard'></div>";
206
+
207
+ echo "<div style='display: none;' id='meow-common-phperrorlogs'>";
208
+ echo $this->get_phperrorlogs();
209
+ echo "</div>";
210
 
211
+ echo "<div style='display: none;' id='meow-common-phpinfo'>";
212
+ echo $this->get_phpinfo();
213
+ echo "</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  }
215
 
216
  function admin_footer_text( $current ) {
217
  return sprintf(
218
  // translators: %1$s is the version of the interface; %2$s is a file path.
219
  __( 'Thanks for using <a href="https://meowapps.com">Meow Apps</a>! This is the Meow Admin %1$s <br /><i>Loaded from %2$s </i>', $this->domain ),
220
+ MeowCommon_Admin::$admin_version,
221
  __FILE__
222
  );
223
  }
 
 
 
 
 
 
 
 
 
 
 
224
  }
 
 
 
 
 
225
  }
226
 
227
  ?>
common/classes/issues.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists( 'MeowCommon_Classes_Issues' ) ) {
4
+
5
+ class MeowCommon_Classes_Issues {
6
+
7
+ public function __construct( $prefix, $mainfile, $domain ) {
8
+ $this->check_plugins();
9
+ }
10
+
11
+ function check_plugins() {
12
+ if ( class_exists( 'LiteSpeed\Core' ) ) {
13
+ $this->check_litespeed();
14
+ }
15
+ }
16
+
17
+ function check_litespeed() {
18
+ // By default, the REST API is cached by Litespeed. Why is that?
19
+ // It is absolutely not a good idea, especially on the admin side.
20
+ $cache_rest = get_option( 'litespeed.conf.cache-rest' );
21
+ if ( $cache_rest ) {
22
+ update_option( 'litespeed.conf.cache-rest', 0 );
23
+ }
24
+ }
25
+
26
+ }
27
+ }
28
+
29
+ ?>
common/classes/ratings.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !class_exists( 'MeowCommon_Classes_Ratings' ) ) {
4
+
5
+ class MeowCommon_Classes_Ratings {
6
+
7
+ public $mainfile; // plugin main file (media-file-renamer.php)
8
+ public $domain; // domain used for translation (media-file-renamer)
9
+ public $prefix; // used for many things (filters, options, etc)
10
+
11
+ public function __construct( $prefix, $mainfile, $domain ) {
12
+ $this->mainfile = $mainfile;
13
+ $this->domain = $domain;
14
+ $this->prefix = $prefix;
15
+
16
+ register_activation_hook( $mainfile, array( $this, 'show_meowapps_create_rating_date' ) );
17
+
18
+ if ( is_admin() ) {
19
+ $rating_date = $this->create_rating_date();
20
+ if ( time() > $rating_date ) {
21
+ add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
22
+ }
23
+ }
24
+ }
25
+
26
+ function show_meowapps_create_rating_date() {
27
+ delete_option( 'meowapps_hide_meowapps' );
28
+ $this->create_rating_date();
29
+ }
30
+
31
+ function create_rating_date() {
32
+ $rating_date = get_option( $this->prefix . '_rating_date' );
33
+ if ( empty( $rating_date ) ) {
34
+ $two_months = strtotime( '+2 months' );
35
+ $six_months = strtotime( '+4 months' );
36
+ $rating_date = mt_rand( $two_months, $six_months );
37
+ update_option( $this->prefix . '_rating_date', $rating_date, false );
38
+ }
39
+ return $rating_date;
40
+ }
41
+
42
+ function admin_notices_rating() {
43
+ if ( isset( $_POST[$this->prefix . '_remind_me'] ) ) {
44
+ $two_weeks = strtotime( '+2 weeks' );
45
+ $six_weeks = strtotime( '+6 weeks' );
46
+ $future_date = mt_rand( $two_weeks, $six_weeks );
47
+ update_option( $this->prefix . '_rating_date', $future_date, false );
48
+ return;
49
+ }
50
+ else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
51
+ $twenty_years = strtotime( '+5 years' );
52
+ update_option( $this->prefix . '_rating_date', $twenty_years, false );
53
+ return;
54
+ }
55
+ else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
56
+ $twenty_years = strtotime( '+10 years' );
57
+ update_option( $this->prefix . '_rating_date', $twenty_years, false );
58
+ return;
59
+ }
60
+ $rating_date = get_option( $this->prefix . '_rating_date' );
61
+ echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
62
+ echo '<p style="font-size: 100%;">';
63
+ printf(
64
+ // translators: %1$s is a plugin nicename, %2$s is a short url (slug)
65
+ __( 'You have been using <b>%1$s</b> for some time now. Thank you! Could you kindly share your opinion with me, along with, maybe, features you would like to see implemented? Then, please <a style="font-weight: bold; color: #b926ff;" target="_blank" href="https://wordpress.org/support/plugin/%2$s/reviews/?rate=5#new-post">write a little review</a>. That will also bring me joy and motivation! I will get back to you :)', $this->domain ),
66
+ $this->nice_name_from_file( $this->mainfile ),
67
+ $this->nice_short_url_from_file( $this->mainfile )
68
+ );
69
+ echo '<p>
70
+ <form method="post" action="" style="float: right;">
71
+ <input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
72
+ <input type="submit" name="submit" id="submit" class="button button-red" value="'
73
+ . __( 'Never remind me!', $this->domain ) . '">
74
+ </form>
75
+ <form method="post" action="" style="float: right; margin-right: 10px;">
76
+ <input type="hidden" name="' . $this->prefix . '_remind_me" value="true">
77
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="'
78
+ . __( 'Remind me in a few weeks...', $this->domain ) . '">
79
+ </form>
80
+ <form method="post" action="" style="float: right; margin-right: 10px;">
81
+ <input type="hidden" name="' . $this->prefix . '_did_it" value="true">
82
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="'
83
+ . __( 'Yes, I did it!', $this->domain ) . '">
84
+ </form>
85
+ <div style="clear: both;"></div>
86
+ </p>
87
+ ';
88
+ echo '</div>';
89
+ }
90
+
91
+ function nice_short_url_from_file( $file ) {
92
+ $info = pathinfo( $file );
93
+ if ( !empty( $info ) ) {
94
+ $info['filename'] = str_replace( '-pro', '', $info['filename'] );
95
+ return $info['filename'];
96
+ }
97
+ return "";
98
+ }
99
+
100
+ function nice_name_from_file( $file ) {
101
+ $info = pathinfo( $file );
102
+ if ( !empty( $info ) ) {
103
+ if ( $info['filename'] == 'wplr-sync' ) {
104
+ return "WP/LR Sync";
105
+ }
106
+ $info['filename'] = str_replace( '-', ' ', $info['filename'] );
107
+ $file = ucwords( $info['filename'] );
108
+ }
109
+ return $file;
110
+ }
111
+ }
112
+ }
113
+
114
+ ?>
common/classes/rest.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MeowCommon_Classes_Rest
4
+ {
5
+ private $namespace = "meow-common/v1";
6
+ static public $instance = null;
7
+
8
+ static public function init_once() {
9
+ if ( !function_exists( 'wp_get_current_user' ) ) {
10
+ return;
11
+ }
12
+ if ( !current_user_can( 'administrator' ) ) {
13
+ return;
14
+ }
15
+ if ( !MeowCommon_Classes_Rest::$instance ) {
16
+ MeowCommon_Classes_Rest::$instance = new self();
17
+ }
18
+ }
19
+
20
+ private function __construct() {
21
+ add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
22
+ }
23
+
24
+ function rest_api_init() {
25
+ register_rest_route( $this->namespace, '/empty_request/', [
26
+ 'methods' => 'POST',
27
+ 'callback' => [ $this, 'empty_request' ]
28
+ ]);
29
+ register_rest_route( $this->namespace, '/file_operation/', [
30
+ 'methods' => 'POST',
31
+ 'callback' => [ $this, 'file_operation' ]
32
+ ]);
33
+ register_rest_route( $this->namespace, '/sql_request/', [
34
+ 'methods' => 'POST',
35
+ 'callback' => [ $this, 'sql_request' ]
36
+ ]);
37
+ register_rest_route( $this->namespace, '/all_settings/', [
38
+ 'methods' => 'GET',
39
+ 'callback' => [ $this, 'rest_all_settings' ]
40
+ ]);
41
+ register_rest_route( $this->namespace, '/update_option/', [
42
+ 'methods' => 'POST',
43
+ 'callback' => [ $this, 'rest_update_option' ]
44
+ ]);
45
+ }
46
+
47
+ function file_rand( $filesize ) {
48
+ $tmp_file = tmpfile();
49
+ fseek( $tmp_file, $filesize - 1, SEEK_CUR );
50
+ fwrite( $tmp_file, 'a');
51
+ fclose( $tmp_file );
52
+ }
53
+
54
+ function empty_request() {
55
+ return new WP_REST_Response( [ 'success' => true ], 200 );
56
+ }
57
+
58
+ function file_operation() {
59
+ $this->file_rand( 1024 * 10 );
60
+ return new WP_REST_Response( [ 'success' => true ], 200 );
61
+ }
62
+
63
+ function sql_request() {
64
+ global $wpdb;
65
+ $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts}" );
66
+ return new WP_REST_Response( [ 'success' => true, 'data' => $count ], 200 );
67
+ }
68
+
69
+ function rest_all_settings() {
70
+ $settings = array(
71
+ 'meowapps_hide_meowapps' => get_option( 'meowapps_hide_meowapps', false ),
72
+ 'force_sslverify' => get_option( 'force_sslverify', false )
73
+ );
74
+ return new WP_REST_Response([ 'success' => true, 'data' => $settings ], 200 );
75
+ }
76
+
77
+ function rest_update_option( $request ) {
78
+ $params = $request->get_json_params();
79
+ try {
80
+ $result = update_option( $params['name'], $params['value'] );
81
+ return new WP_REST_Response([ 'success' => $result ], 200 );
82
+ }
83
+ catch (Exception $e) {
84
+ return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
85
+ }
86
+ }
87
+
88
+ }
89
+
90
+ ?>
common/classes/rest_license.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MeowCommon_Classes_Rest_License
4
+ {
5
+ private $licenser = null;
6
+ private $namespace = null;
7
+
8
+ public function __construct( &$licenser ) {
9
+ $t