honkoma/priv/static/packs/flavours/glitch/public.js

2 lines
379 KiB
JavaScript
Raw Normal View History

2019-06-26 19:06:28 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[82,0,42,79],{0:function(e,t,n){"use strict";var s;function a(e,t,n,a){s||(s="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var r=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),t&&r)for(var i in r)void 0===t[i]&&(t[i]=r[i]);else t||(t=r||{});if(1===o)t.children=a;else if(1<o){for(var l=new Array(o),f=0;f<o;f++)l[f]=arguments[f+3];t.children=l}return{$$typeof:s,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.d(t,"a",function(){return a})},1:function(e,t,n){"use strict";function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return a})},100:function(e,t,n){"use strict";n.r(t),n.d(t,"timeAgoString",function(){return v}),n.d(t,"default",function(){return k});var a,r,o,u=n(0),i=n(2),l=n(6),f=n(1),s=n(15),c=n(3),d=n.n(c),p=n(7),m=Object(p.f)({just_now:{id:"relative_time.just_now",defaultMessage:"now"},seconds:{id:"relative_time.seconds",defaultMessage:"{number}s"},minutes:{id:"relative_time.minutes",defaultMessage:"{number}m"},hours:{id:"relative_time.hours",defaultMessage:"{number}h"},days:{id:"relative_time.days",defaultMessage:"{number}d"},moments_remaining:{id:"time_remaining.moments",defaultMessage:"Moments remaining"},seconds_remaining:{id:"time_remaining.seconds",defaultMessage:"{number, plural, one {# second} other {# seconds}} left"},minutes_remaining:{id:"time_remaining.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}} left"},hours_remaining:{id:"time_remaining.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}} left"},days_remaining:{id:"time_remaining.days",defaultMessage:"{number, plural, one {# day} other {# days}} left"}}),g={hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"},h={month:"short",day:"numeric"},b=1e3,y=6e4,_=36e5,w=864e5,v=function(e,t,n,a){var r=n-t.getTime();return r<1e4?e.formatMessage(m.just_now):r<7*w?r<y?e.formatMessage(m.seconds,{number:Math.floor(r/b)}):r<_?e.formatMessage(m.minutes,{number:Math.floor(r/y)}):r<w?e.formatMessage(m.hours,{number:Math.floor(r/_)}):e.formatMessage(m.days,{number:Math.floor(r/w)}):t.getFullYear()===a?e.formatDate(t,h):e.formatDate(t,Object(s.a)({},h,{year:"numeric"}))},k=Object(p.g)((o=r=function(r){function e(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n))||this,Object(f.a)(Object(i.a)(e),"state",{now:e.props.intl.now()}),e}Object(l.a)(e,r);var t=e.prototype;return t.shouldComponentUpdate=function(e,t){return this.props.timestamp!==e.timestamp||this.props.intl.locale!==e.intl.locale||this.state.now!==t.now},t.componentWillReceiveProps=function(e){this.props.timestamp!==e.timestamp&&this.setState({now:this.props.intl.now()})},t.componentDidMount=function(){this._scheduleNextUpdate(this.props,this.state)},t.componentWillUpdate=function(e,t){this._scheduleNextUpdate(e,t)},t.componentWillUnmount=function(){clearTimeout(this._timer)},t._scheduleNextUpdate=function(e,t){var n=this;clearTimeout(this._timer);var a,r,o=e.timestamp,i=new Date(o).getTime()-t.now,l=function(e){switch(e){case"second":return b;case"minute":return y;case"hour":return _;case"day":return w;default:return 2147483647}}((a=i,(r=Math.abs(a))<y?"second":r<_?"minute":r<w?"hour":"day")),f=Math.abs(i%l),s=i<0?Math.max(1e4,l-f):Math.max(1e4,f);this._timer=setTimeout(function(){n.setState({now:n.props.intl.now()})},s)},t.render=function(){var e,t,n,a,r=this.props,o=r.timestamp,i=r.intl,l=r.year,f=r.futureDate,s=new Date(o),c=f?(e=i,t=s,n=this.state.now,(a=t.getTime()-n)<1e4?e.formatMessage(m.moments_remaining):a<y?e.formatMessage(m.seconds_remaining,{number:Math.floor(a/b)}):a<_?e.formatMessage(m.minutes_remaining,{number:Math.floor(a/y)}):a<w?e.formatMessage(m.hours_remaining,{number:Math.floor(a/_)}):e.formatMessage(m.days_remaining,{number:Math.floor(a/w)})):v(i,s,this.state.now,l);return Object(u.a)("time",{dateTime:o,title:i.formatDate(s,g)},void 0,
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=public.js.map