Files
Express_console_build/build/static/js/2142.b22bf308.chunk.js

1 line
7.0 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2142],{35791:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var s=n(69039),r=n(76264),o=n(71392),i=n(48738),c=n(2866),a=n(1939),l=n(86270),m=n(80911);const u=n.p+"static/media/coming-soon.69b99428ab9e22eca0ba.png";var d=n(59008),h=n(65908);const{useTimer:x}=n(41549),p=e=>{let{count:t,label:n}=e;const a=(0,s.A)(),l=(0,r.A)(a.breakpoints.down("sm"));return(0,h.jsx)(d.A,{content:!1,sx:{width:{xs:60,sm:80}},children:(0,h.jsxs)(o.A,{justifyContent:"center",alignItems:"center",children:[(0,h.jsx)(i.A,{sx:{py:1.75},children:(0,h.jsx)(c.A,{variant:l?"h4":"h2",children:t})}),(0,h.jsx)(i.A,{sx:{p:.5,bgcolor:"secondary.lighter",width:"100%"},children:(0,h.jsx)(c.A,{align:"center",variant:"subtitle2",children:n})})]})})};const g=function(){const e=new Date;e.setSeconds(e.getSeconds()+172800-55800);const{seconds:t,minutes:n,hours:s,days:r}=x({expiryTimestamp:e});return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(a.Ay,{container:!0,spacing:4,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",py:2},children:[(0,h.jsx)(a.Ay,{item:!0,xs:12,children:(0,h.jsx)(i.A,{sx:{height:{xs:310,sm:420},width:{xs:360,sm:"auto"}},children:(0,h.jsx)("img",{src:u,alt:"mantis",style:{height:"100%",width:"100%"}})})}),(0,h.jsx)(a.Ay,{item:!0,xs:12,children:(0,h.jsxs)(o.A,{spacing:1,justifyContent:"center",alignItems:"center",sx:{mt:-2},children:[(0,h.jsx)(c.A,{align:"center",variant:"h1",children:"Coming Soon"}),(0,h.jsx)(c.A,{align:"center",color:"textSecondary",children:"Something new is on its way"})]})}),(0,h.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:"95%",md:"40%"}},children:(0,h.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:{xs:1,sm:2},children:[(0,h.jsx)(p,{count:r,label:"day"}),(0,h.jsx)(c.A,{variant:"h1",children:" : "}),(0,h.jsx)(p,{count:s,label:"hour"}),(0,h.jsx)(c.A,{variant:"h1",children:" : "}),(0,h.jsx)(p,{count:n,label:"min"}),(0,h.jsx)(c.A,{variant:"h1",children:" : "}),(0,h.jsx)(p,{count:t,label:"sec"})]})}),(0,h.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:380,md:"40%",lg:"30%"}},children:(0,h.jsxs)(o.A,{spacing:2,sx:{mt:2},children:[(0,h.jsx)(c.A,{align:"center",color:"textSecondary",children:"Be the first to be notified when Mantis launches."}),(0,h.jsxs)(o.A,{direction:"row",spacing:1,children:[(0,h.jsx)(l.A,{fullWidth:!0,placeholder:"Email Address"}),(0,h.jsx)(m.A,{variant:"contained",sx:{width:"50%"},children:"Notify Me"})]})]})})]})})}},41549:(e,t,n)=>{n.r(t);var s,r,o=n(22555);e=n.hmd(e),s="undefined"!=typeof self?self:void 0,r=e=>(()=>{var t={155:t=>{t.exports=e}},n={};function s(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,s),o.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};s.r(r),s.d(r,{default:()=>p,useStopwatch:()=>h,useTime:()=>x,useTimer:()=>d});var i=s(155);class c{static expiryTimestamp(e){const t=new Date(e).getTime()>0;return t||console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings",e),t}static onExpire(e){const t=e&&"function"==typeof e;return e&&!t&&console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function",e),t}}class a{static getTimeFromSeconds(e){const t=Math.ceil(e),n=Math.floor(t/86400),s=Math.floor(t%86400/3600),r=Math.floor(t%3600/60);return{totalSeconds:t,seconds:Math.floor(t%60),minutes:r,hours:s,days:n}}static getSecondsFromExpiry(e,t){const n=e-(new Date).getTime();if(n>0){const e=n/1e3;return t?Math.round(e):e}return 0}static getSecondsFromPrevTime(e,t){const n=(new Date).getTime()-e;if(n>0){const e=n/1e3;return t?Math.round(e):e}return 0}static getSecondsFromTimeNow(){const e=new Date;return e.getTime()/1e3-60*e.getTimezoneOffset()}static getFormattedTimeFromSeconds(e,t){const{seconds:n,minutes:s,hours:r}=a.getTimeFromSeconds(e);let o="",i=r;return"12-hour"===t&&(o=r>=12?"pm":"am",i=r%12),{seconds:n,minutes:s,hours:i,ampm:o}}}function l(e,t){const n=(0,i.useRef)();(0,i.useEffect)((()=>{n.current=e})),(0,i.useEffect)((()=>{if(!t)return()=>{};const e=setInterval((()=>{n.current&&n.current()}),t);return()=>clearInterval(e)}),[t])}const m=1e3;function u(e){if(!c.expiryTimestamp(e))return null;const t=a.getSecondsFromExpiry(e),n=Math.floor(1e3*(t-Math.floor(t)));return n>0?n:m}function d(){let{expiryTimestamp:e,onExpire:t,autoStart:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[s,r]=(0,i.useState)(e),[d,h]=(0,i.useState)(a.getSecondsFromExpiry(s)),[x,p]=(0,i.useState)(n),[g,f]=(0,i.useState)(n),[y,S]=(0,i.useState)(u(s)),T=(0,i.useCallback)((()=>{c.onExpire(t)&&t(),p(!1),S(null)}),[t]),j=(0,i.useCallback)((()=>{p(!1)}),[]),v=(0,i.useCallback)((function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];S(u(e)),f(t),p(t),r(e),h(a.getSecondsFromExpiry(e))}),[]),A=(0,i.useCallback)((()=>{const e=new Date;e.setMilliseconds(e.getMilliseconds()+1e3*d),v(e)}),[d,v]),w=(0,i.useCallback)((()=>{g?(h(a.getSecondsFromExpiry(s)),p(!0)):A()}),[s,g,A]);return l((()=>{y!==m&&S(m);const e=a.getSecondsFromExpiry(s);h(e),e<=0&&T()}),x?y:null),(0,o.A)((0,o.A)({},a.getTimeFromSeconds(d)),{},{start:w,pause:j,resume:A,restart:v,isRunning:x})}function h(){let{autoStart:e,offsetTimestamp:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,s]=(0,i.useState)(a.getSecondsFromExpiry(t,!0)||0),[r,c]=(0,i.useState)(new Date),[m,u]=(0,i.useState)(n+a.getSecondsFromPrevTime(r||0,!0)),[d,h]=(0,i.useState)(e);l((()=>{u(n+a.getSecondsFromPrevTime(r,!0))}),d?1e3:null);const x=(0,i.useCallback)((()=>{const e=new Date;c(e),h(!0),u(n+a.getSecondsFromPrevTime(e,!0))}),[n]),p=(0,i.useCallback)((()=>{s(m),h(!1)}),[m]),g=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=a.getSecondsFromExpiry(e,!0)||0,r=new Date;c(r),s(n),h(t),u(n+a.getSecondsFromPrevTime(r,!0))}),[]);return(0,o.A)((0,o.A)({},a.getTimeFromSeconds(m)),{},{start:x,pause:p,reset:g,isRunning:d})}function x(){let{format:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,i.useState)(a.getSecondsFromTimeNow());return l((()=>{n(a.getSecondsFromTimeNow())}),1e3),(0,o.A)({},a.getFormattedTimeFromSeconds(t,e))}function p(e){if((0,i.useEffect)((()=>{console.warn("react-timer-hook: default export useTimer is deprecated, use named exports { useTimer, useStopwatch, useTime } instead")}),[]),e.expiryTimestamp){const t=d(e);return(0,o.A)((0,o.A)({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:()=>{}})}const t=h(e);return(0,o.A)((0,o.A)({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:t.reset})}return r})(),"object"==typeof exports?e.exports=r(n(85672)):"function"==typeof define&&n.amdO?define(["react"],r):"object"==typeof exports?exports["react-timer-hook"]=r(n(85672)):s["react-timer-hook"]=r(s.react)}}]);