text: (this.webpackJsonpview=this.webpackJsonpview||[]).push([[0],{94:function(e,t,n){},99:function(e,t,n){"use strict";n.r(t);var o=n(107),c=n(0),r=n.n(c),i=n(39),a=n.n(i),s=n(110),l=n(80),u=n(42),h=n(101),d=n(108),j=n(68),f=n(3),b=function(e){var t=Object(h.b)().toggleColorMode,n=Object(h.c)("dark","light"),o=Object(h.c)(j.a,j.b);return Object(f.jsx)(d.a,Object(u.a)({size:"md",fontSize:"lg","aria-label":"Switch to ".concat(n," mode"),variant:"ghost",color:"current",marginLeft:"2",onClick:t,icon:Object(f.jsx)(o,{})},e))},v=n(64),p=n.n(v),g=n(77),O=n(30),w=n(31),m=n(33),k=n(32);n(94);var x=function(e){return function(t){Object(m.a)(o,t);var n=Object(k.a)(o);function o(e){var t;return Object(O.a)(this,o),(t=n.call(this,e)).state={loading:!0},t}return Object(w.a)(o,[{key:"componentDidMount",value:function(){var e=Object(g.a)(p.a.mark((function e(){var t=this;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{setTimeout((function(){t.setState({loading:!1})}),2e3)}catch(n){console.log(n),this.setState({loading:!1})}case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){return this.state.loading?Object(f.jsxs)("div",{className:"splash-screen",children:["Wait a moment while we load your app.",Object(f.jsx)("div",{className:"loading-dot",children:"."})]}):Object(f.jsx)(e,Object(u.a)({},this.props))}}]),o}(c.Component)},y=n(61),C=n(8),E=n(56),N=function(e){Object(m.a)(n,e);var t=Object(k.a)(n);function n(e){var o;return Object(O.a)(this,n),(o=t.call(this,e)).gotoLogin=function(){o.state.history.push("/login")},o.state={history:o.props.history},o}return Object(w.a)(n,[{key:"render",value:function(){return Object(f.jsxs)("div",{children:["Home",Object(f.jsx)("button",{onClick:this.gotoLogin,children:"Go to login"}),this.props.count,Object(f.jsx)("button",{onClick:this.props.handleIncrementClick,children:"Inc"})]})}}]),n}(r.a.Component),S=Object(E.b)((function(e){return{count:e}}),(function(e){return{handleIncrementClick:function(){return e({type:"INCREMENT"})},handleDecrementClick:function(){return e({type:"DECREMENT"})}}}))(Object(C.e)(N)),W=function(e){Object(m.a)(n,e);var t=Object(k.a)(n);function n(){return Object(O.a)(this,n),t.apply(this,arguments)}return Object(w.a)(n,[{key:"render",value:function(){return Object(f.jsx)("div",{children:"Login"})}}]),n}(r.a.Component),M=n(79),T=Object(M.a)();var I=x((function(){return Object(f.jsxs)(s.a,{theme:l.theme,children:[Object(f.jsx)(b,{justifySelf:"flex-end"}),Object(f.jsx)("div",{children:Object(f.jsx)(y.a,{history:T,children:Object(f.jsxs)("div",{children:[Object(f.jsx)(C.a,{exact:!0,path:"/",component:S}),Object(f.jsx)(C.a,{exact:!0,path:"/login",component:W})]})})})]})})),L=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function R(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var n=e.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}var D=n(50),A=Object(D.b)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INCREMENT":return e+1;case"DECREMENT":return e-1;default:return e}}));a.a.render(Object(f.jsx)(c.StrictMode,{children:Object(f.jsxs)(E.a,{store:A,children:[Object(f.jsx)(o.a,{}),Object(f.jsx)(I,{})]})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("","/service-worker.js");L?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(n){var o=n.headers.get("content-type");404===n.status||null!=o&&-1===o.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):R(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):R(t,e)}))}}()}},[[99,1,2]]]);
  //# sourceMappingURL=main.c23459bb.chunk.js.map