X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Fstatic%2Fpacks%2Fapplication.js;h=d107877c713447de5ade4eb262e2ec13193045b4;hb=bf5b1c7f06c9f8882c40cf2385439bee3b74522c;hp=047178a75546a892b48640f008bb4e53a31e3520;hpb=38361e7b5e24cbbd4654bd76fce4b3c66562ab59;p=akkoma diff --git a/priv/static/packs/application.js b/priv/static/packs/application.js index 047178a75..d107877c7 100644 --- a/priv/static/packs/application.js +++ b/priv/static/packs/application.js @@ -1,2 +1,2 @@ -webpackJsonp([36],{155:function(t,e,n){"use strict";n.d(e,"a",function(){return m});var o=n(2),r=n.n(o),a=n(1),i=n.n(a),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(0),p=n.n(d),h=n(10),f=n.n(h),m=function(t){function e(){var n,o,r;i()(this,e);for(var a=arguments.length,s=Array(a),l=0;l0||o.setState({draggingOver:!1})},o.closeUploadModal=function(){o.setState({draggingOver:!1})},o.handleServiceWorkerPostMessage=function(t){var e=t.data;"navigate"===e.type?o.context.router.history.push(e.path):console.warn("Unknown message type:",e.type)},o.setRef=function(t){o.node=t},o.handleHotkeyNew=function(t){t.preventDefault();var e=o.node.querySelector(".compose-form__autosuggest-wrapper textarea");e&&e.focus()},o.handleHotkeySearch=function(t){t.preventDefault();var e=o.node.querySelector(".search__input");e&&e.focus()},o.handleHotkeyForceNew=function(t){o.handleHotkeyNew(t),o.props.dispatch(Object(M.U)())},o.handleHotkeyFocusColumn=function(t){var e=1*t.key+1,n=o.node.querySelector(".column:nth-child("+e+")");if(n){var r=n.querySelector(".focusable");r&&r.focus()}},o.handleHotkeyBack=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},o.setHotkeysRef=function(t){o.hotkeys=t},o.handleHotkeyToggleHelp=function(){"/keyboard-shortcuts"===o.props.location.pathname?o.context.router.history.goBack():o.context.router.history.push("/keyboard-shortcuts")},o.handleHotkeyGoToHome=function(){o.context.router.history.push("/timelines/home")},o.handleHotkeyGoToNotifications=function(){o.context.router.history.push("/notifications")},o.handleHotkeyGoToLocal=function(){o.context.router.history.push("/timelines/public/local")},o.handleHotkeyGoToFederated=function(){o.context.router.history.push("/timelines/public")},o.handleHotkeyGoToDirect=function(){o.context.router.history.push("/timelines/direct")},o.handleHotkeyGoToStart=function(){o.context.router.history.push("/getting-started")},o.handleHotkeyGoToFavourites=function(){o.context.router.history.push("/favourites")},o.handleHotkeyGoToPinned=function(){o.context.router.history.push("/pinned")},o.handleHotkeyGoToProfile=function(){o.context.router.history.push("/accounts/"+R.i)},o.handleHotkeyGoToBlocked=function(){o.context.router.history.push("/blocks")},o.handleHotkeyGoToMuted=function(){o.context.router.history.push("/mutes")},r=n,p()(o,r)}return f()(e,t),e.prototype.componentWillMount=function(){window.addEventListener("beforeunload",this.handleBeforeUnload,!1),document.addEventListener("dragenter",this.handleDragEnter,!1),document.addEventListener("dragover",this.handleDragOver,!1),document.addEventListener("drop",this.handleDrop,!1),document.addEventListener("dragleave",this.handleDragLeave,!1),document.addEventListener("dragend",this.handleDragEnd,!1),"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",this.handleServiceWorkerPostMessage),this.props.dispatch(Object(P.p)()),this.props.dispatch(Object(S.h)())},e.prototype.componentDidMount=function(){this.hotkeys.__mousetrap__.stopCallback=function(t,e){return["TEXTAREA","SELECT","INPUT"].includes(e.tagName)}},e.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragover",this.handleDragOver),document.removeEventListener("drop",this.handleDrop),document.removeEventListener("dragleave",this.handleDragLeave),document.removeEventListener("dragend",this.handleDragEnd)},e.prototype.render=function(){var t=this.state.draggingOver,e=this.props,n=e.children,o=e.isComposing,r=e.location,a=e.dropdownMenuIsOpen,i={help:this.handleHotkeyToggleHelp,new:this.handleHotkeyNew,search:this.handleHotkeySearch,forceNew:this.handleHotkeyForceNew,focusColumn:this.handleHotkeyFocusColumn,back:this.handleHotkeyBack,goToHome:this.handleHotkeyGoToHome,goToNotifications:this.handleHotkeyGoToNotifications,goToLocal:this.handleHotkeyGoToLocal,goToFederated:this.handleHotkeyGoToFederated,goToDirect:this.handleHotkeyGoToDirect,goToStart:this.handleHotkeyGoToStart,goToFavourites:this.handleHotkeyGoToFavourites,goToPinned:this.handleHotkeyGoToPinned,goToProfile:this.handleHotkeyGoToProfile,goToBlocked:this.handleHotkeyGoToBlocked,goToMuted:this.handleHotkeyGoToMuted};return w.a.createElement(A.HotKeys,{keyMap:q,handlers:i,ref:this.setHotkeysRef},w.a.createElement("div",{className:g()("ui",{"is-composing":o}),ref:this.setRef,style:{pointerEvents:a?"none":null}},c()(C.a,{}),c()(B,{location:r,onLayoutChange:this.handleLayoutChange},void 0,n),c()(k.a,{}),c()(T.a,{className:"loading-bar"}),c()(x.a,{}),c()(I.a,{active:t,onClose:this.closeUploadModal})))},e}(w.a.PureComponent),a.contextTypes={router:O.a.object.isRequired},r=i))||r)||r)||r},670:function(t,e,n){"use strict";n.d(e,"b",function(){return O}),n.d(e,"a",function(){return T});var o,r,a=n(55),i=n.n(a),s=n(34),c=n.n(s),l=n(2),u=n.n(l),d=n(1),p=n.n(d),h=n(3),f=n.n(h),m=n(4),v=n.n(m),y=n(0),g=n.n(y),b=n(44),w=n(252),k=n(253),_=n(151),O=function(t){function e(){return p()(this,e),f()(this,t.apply(this,arguments))}return v()(e,t),e.prototype.render=function(){var t=this.props,e=t.multiColumn,n=t.children;return u()(b.f,{},void 0,g.a.Children.map(n,function(t){return g.a.cloneElement(t,{multiColumn:e})}))},e}(g.a.PureComponent),T=(r=o=function(t){function e(){var n,o,r;p()(this,e);for(var a=arguments.length,i=Array(a),s=0;s0&&void 0!==arguments[0]?arguments[0]:[];(Array.isArray(t)?t:[t]).forEach(function(t){t&&t.locale&&(P.a.__addLocaleData(t),D.a.__addLocaleData(t))})}function r(t){for(var e=(t||"").split("-");e.length>0;){if(a(e.join("-")))return!0;e.pop()}return!1}function a(t){var e=t&&t.toLowerCase();return!(!P.a.__localeData__[e]||!D.a.__localeData__[e])}function i(t){return(""+t).replace(wt,function(t){return bt[t]})}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,o){return t.hasOwnProperty(o)?e[o]=t[o]:n.hasOwnProperty(o)&&(e[o]=n[o]),e},{})}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.intl;R()(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function l(t,e){if(t===e)return!0;if("object"!==(void 0===t?"undefined":q(t))||null===t||"object"!==(void 0===e?"undefined":q(e))||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var r=Object.prototype.hasOwnProperty.bind(e),a=0;a3&&void 0!==arguments[3]?arguments[3]:{},u=i.intl,d=void 0===u?{}:u,p=c.intl,h=void 0===p?{}:p;return!l(e,o)||!l(n,r)||!(h===d||l(s(h,gt),s(d,gt)))}function d(t){return t.displayName||t.name||"Component"}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.intlPropName,o=void 0===n?"intl":n,r=e.withRef,a=void 0!==r&&r,i=function(e){function n(t,e){B(this,n);var o=Y(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return c(e),o}return J(n,e),z(n,[{key:"getWrappedInstance",value:function(){return R()(a,"[React Intl] To access the wrapped instance, the `{withRef: true}` option must be set when calling: `injectIntl()`"),this.refs.wrappedInstance}},{key:"render",value:function(){return F.a.createElement(t,K({},this.props,V({},o,this.context.intl),{ref:a?"wrappedInstance":null}))}}]),n}(H.Component);return i.displayName="InjectIntl("+d(t)+")",i.contextTypes={intl:ht},i.WrappedComponent=t,i}function h(t){return t}function f(t){return P.a.prototype._resolveLocale(t)}function m(t){return P.a.prototype._findPluralRuleFunction(t)}function v(t){var e=D.a.thresholds;e.second=t.second,e.minute=t.minute,e.hour=t.hour,e.day=t.day,e.month=t.month}function y(t,e,n){var o=t&&t[e]&&t[e][n];if(o)return o}function g(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=t.formats,i=o.format,c=new Date(n),l=i&&y(a,"date",i),u=s(o,_t,l);try{return e.getDateTimeFormat(r,u).format(c)}catch(t){}return String(c)}function b(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=t.formats,i=o.format,c=new Date(n),l=i&&y(a,"time",i),u=s(o,_t,l);u.hour||u.minute||u.second||(u=K({},u,{hour:"numeric",minute:"numeric"}));try{return e.getDateTimeFormat(r,u).format(c)}catch(t){}return String(c)}function w(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=t.formats,i=o.format,c=new Date(n),l=new Date(o.now),u=i&&y(a,"relative",i),d=s(o,Tt,u),p=K({},D.a.thresholds);v(xt);try{return e.getRelativeFormat(r,d).format(c,{now:isFinite(l)?l:e.now()})}catch(t){}finally{v(p)}return String(c)}function k(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=t.formats,i=o.format,c=i&&y(a,"number",i),l=s(o,Ot,c);try{return e.getNumberFormat(r,l).format(n)}catch(t){}return String(n)}function _(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=s(o,Ct);try{return e.getPluralFormat(r,a).format(n)}catch(t){}return"other"}function O(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,a=t.formats,i=t.messages,s=t.defaultLocale,c=t.defaultFormats,l=n.id,u=n.defaultMessage;R()(l,"[React Intl] An `id` must be provided to format a message.");var d=i&&i[l];if(!(Object.keys(o).length>0))return d||u||l;var p=void 0;if(d)try{p=e.getMessageFormat(d,r,a).format(o)}catch(t){}if(!p&&u)try{p=e.getMessageFormat(u,s,c).format(o)}catch(t){}return p||d||u||l}function T(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return O(t,e,n,Object.keys(o).reduce(function(t,e){var n=o[e];return t[e]="string"==typeof n?i(n):n,t},{}))}function C(t){var e=Math.abs(t);return e=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},Y=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},X=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e":">","<":"<",'"':""","'":"'"},wt=/[&><"']/g,kt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};B(this,t);var o="ordinal"===n.style,r=m(f(e));this.format=function(t){return r(t,o)}},_t=Object.keys(ft),Ot=Object.keys(mt),Tt=Object.keys(vt),Ct=Object.keys(yt),xt={second:60,minute:60,hour:24,day:30,month:12},Nt=Object.freeze({formatDate:g,formatTime:b,formatRelative:w,formatNumber:k,formatPlural:_,formatMessage:O,formatHTMLMessage:T}),jt=Object.keys(dt),Et=Object.keys(pt),Mt={formats:{},messages:{},textComponent:"span",defaultLocale:"en",defaultFormats:{}},Pt=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};B(this,e);var o=Y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));R()("undefined"!=typeof Intl,"[React Intl] The `Intl` APIs must be available in the runtime, and do not appear to be built-in. An `Intl` polyfill should be loaded.\nSee: http://formatjs.io/guides/runtime-environments/");var r=n.intl,a=void 0;a=isFinite(t.initialNow)?Number(t.initialNow):r?r.now():Date.now();var i=r||{},s=i.formatters,c=void 0===s?{getDateTimeFormat:W()(Intl.DateTimeFormat),getNumberFormat:W()(Intl.NumberFormat),getMessageFormat:W()(P.a),getRelativeFormat:W()(D.a),getPluralFormat:W()(kt)}:s;return o.state=K({},c,{now:function(){return o._didDisplay?Date.now():a}}),o}return J(e,t),z(e,[{key:"getConfig",value:function(){var t=this.context.intl,e=s(this.props,jt,t);for(var n in Mt)void 0===e[n]&&(e[n]=Mt[n]);if(!r(e.locale)){var o=e,a=(o.locale,o.defaultLocale),i=o.defaultFormats;e=K({},e,{locale:a,formats:i,messages:Mt.messages})}return e}},{key:"getBoundFormatFns",value:function(t,e){return Et.reduce(function(n,o){return n[o]=Nt[o].bind(null,t,e),n},{})}},{key:"getChildContext",value:function(){var t=this.getConfig(),e=this.getBoundFormatFns(t,this.state),n=this.state,o=n.now,r=Z(n,["now"]);return{intl:K({},t,e,{formatters:r,now:o})}}},{key:"shouldComponentUpdate",value:function(){for(var t=arguments.length,e=Array(t),n=0;n1?o-1:0),a=1;a0){var f=Math.floor(1099511627776*Math.random()).toString(16),m=function(){var t=0;return function(){return"ELEMENT-"+f+"-"+(t+=1)}}();d="@__"+f+"__@",p={},h={},Object.keys(s).forEach(function(t){var e=s[t];if(Object(H.isValidElement)(e)){var n=m();p[t]=d+n+d,h[n]=e}else p[t]=e})}var v={id:r,description:a,defaultMessage:i},y=e(v,p||s),g=void 0;return g=h&&Object.keys(h).length>0?y.split(d).filter(function(t){return!!t}).map(function(t){return h[t]||t}):[y],"function"==typeof u?u.apply(void 0,X(g)):H.createElement.apply(void 0,[l,null].concat(X(g)))}}]),e}(H.Component);Gt.displayName="FormattedMessage",Gt.contextTypes={intl:ht},Gt.defaultProps={values:{}};var qt=function(t){function e(t,n){B(this,e);var o=Y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return c(n),o}return J(e,t),z(e,[{key:"shouldComponentUpdate",value:function(t){var e=this.props.values;if(!l(t.values,e))return!0;for(var n=K({},t,{values:e}),o=arguments.length,r=Array(o>1?o-1:0),a=1;a may have only one child element"),this.unlisten=n.listen(function(){t.setState({match:t.computeMatch(n.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){O()(this.props.history===t.history,"You cannot change ")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?h.a.Children.only(t):null},e}(h.a.Component);x.propTypes={history:S.a.object.isRequired,children:S.a.node},x.contextTypes={router:S.a.object},x.childContextTypes={router:S.a.object.isRequired};var j=x;function P(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var R=function(t){function e(){var o,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return h.a.createElement(j,{history:this.history,children:this.props.children})},e}(h.a.Component),M=o(811),N=o(123),L=o(38),H=o.n(L),D=o(14),I=o.n(D),q=o(118),A=o(4),W=o(145),G=o.n(W),B={},F=0,z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,o=B[e]||(B[e]={});if(o[t])return o[t];var n=G.a.compile(t);return F<1e4&&(o[t]=n,F++),n}(t)(e,{pretty:!0})},Y=Object.assign||function(t){for(var e=1;e outside a "),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=Object(T.createLocation)(t.to),o=Object(T.createLocation)(this.props.to);Object(T.locationsAreEqual)(e,o)?O()(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,o=t.to;return e?"string"==typeof o?z(o,e.params):Y({},o,{pathname:z(o.pathname,e.params)}):o},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,o=this.computeTo(this.props);e?t.push(o):t.replace(o)},e.prototype.render=function(){return null},e}(h.a.Component);V.propTypes={computedMatch:S.a.object,push:S.a.bool,from:S.a.string,to:S.a.oneOfType([S.a.string,S.a.object]).isRequired},V.defaultProps={push:!1},V.contextTypes={router:S.a.shape({history:S.a.shape({push:S.a.func.isRequired,replace:S.a.func.isRequired}).isRequired,staticContext:S.a.object}).isRequired};var J,K=V,X=o(812),Z=o(144),$=o(143),Q=o(813),tt=o(36),et=[a()(Q.a,{className:"tabs-bar__link primary",to:"/timelines/home","data-preview-title-id":"column.home","data-preview-icon":"home"},void 0,a()("i",{className:"fa fa-fw fa-home"}),a()(A.b,{id:"tabs_bar.home",defaultMessage:"Home"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/notifications","data-preview-title-id":"column.notifications","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-bell"}),a()(A.b,{id:"tabs_bar.notifications",defaultMessage:"Notifications"})),a()(Q.a,{className:"tabs-bar__link secondary",to:"/timelines/public/local","data-preview-title-id":"column.community","data-preview-icon":"users"},void 0,a()("i",{className:"fa fa-fw fa-users"}),a()(A.b,{id:"tabs_bar.local_timeline",defaultMessage:"Local"})),a()(Q.a,{className:"tabs-bar__link secondary",exact:!0,to:"/timelines/public","data-preview-title-id":"column.public","data-preview-icon":"globe"},void 0,a()("i",{className:"fa fa-fw fa-globe"}),a()(A.b,{id:"tabs_bar.federated_timeline",defaultMessage:"Federated"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/search","data-preview-title-id":"tabs_bar.search","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-search"}),a()(A.b,{id:"tabs_bar.search",defaultMessage:"Search"})),a()(Q.a,{className:"tabs-bar__link primary",style:{flexGrow:"0",flexBasis:"30px"},to:"/getting-started","data-preview-title-id":"getting_started.heading","data-preview-icon":"bars"},void 0,a()("i",{className:"fa fa-fw fa-bars"}))];function ot(t){return et.findIndex(function(e){return e.props.to===t})}var nt=Object(A.g)(J=Object(X.a)(J=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c outside a ")},e.prototype.componentWillReceiveProps=function(t){O()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),O()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,o=this.props.location||t.location,n=void 0,r=void 0;return h.a.Children.forEach(e,function(e){if(null==n&&h.a.isValidElement(e)){var a=e.props,i=a.path,s=a.exact,c=a.strict,l=a.sensitive,p=a.from,u=i||p;r=e,n=Object(ft.a)(o.pathname,{path:u,exact:s,strict:c,sensitive:l},t.match)}}),n?h.a.cloneElement(r,{location:o,computedMatch:n}):null},e}(h.a.Component);mt.contextTypes={router:S.a.shape({route:S.a.object.isRequired}).isRequired};var yt,gt,vt,bt,wt,St,Tt,kt,Ot,Ct,Et=mt,_t=o(62),Ut=o(60),xt=o(18),jt=(gt=yt=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.render=function(){var t=this.props,e=t.title,o=t.icon;return a()(_t.a,{},void 0,a()(Ut.a,{icon:o,title:e,multiColumn:!1,focusable:!1}),a()("div",{className:"scrollable"}))},e}(xt.a),yt.propTypes={title:S.a.oneOfType([S.a.node,S.a.string]),icon:S.a.string},yt.defaultProps={title:"",icon:""},gt),Pt=o(193),Rt=o(135),Mt=o(197),Nt=o(20),Lt=Object(A.f)({title:{id:"bundle_column_error.title",defaultMessage:"Network error"},body:{id:"bundle_column_error.body",defaultMessage:"Something went wrong while loading this component."},retry:{id:"bundle_column_error.retry",defaultMessage:"Try again"}}),Ht=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c0||n.setState({draggingOver:!1})},n.closeUploadModal=function(){n.setState({draggingOver:!1})},n.handleServiceWorkerPostMessage=function(t){var e=t.data;"navigate"===e.type?n.context.router.history.push(e.path):console.warn("Unknown message type:",e.type)},n.setRef=function(t){n.node=t},n.handleHotkeyNew=function(t){t.preventDefault();var e=n.node.querySelector(".compose-form__autosuggest-wrapper textarea");e&&e.focus()},n.handleHotkeySearch=function(t){t.preventDefault();var e=n.node.querySelector(".search__input");e&&e.focus()},n.handleHotkeyForceNew=function(t){n.handleHotkeyNew(t),n.props.dispatch(Object(at.U)())},n.handleHotkeyFocusColumn=function(t){var e=1*t.key+1,o=n.node.querySelector(".column:nth-child("+e+")");if(o){var r=o.querySelector(".focusable");r&&r.focus()}},n.handleHotkeyBack=function(){window.history&&1===window.history.length?n.context.router.history.push("/"):n.context.router.history.goBack()},n.setHotkeysRef=function(t){n.hotkeys=t},n.handleHotkeyToggleHelp=function(){"/keyboard-shortcuts"===n.props.location.pathname?n.context.router.history.goBack():n.context.router.history.push("/keyboard-shortcuts")},n.handleHotkeyGoToHome=function(){n.context.router.history.push("/timelines/home")},n.handleHotkeyGoToNotifications=function(){n.context.router.history.push("/notifications")},n.handleHotkeyGoToLocal=function(){n.context.router.history.push("/timelines/public/local")},n.handleHotkeyGoToFederated=function(){n.context.router.history.push("/timelines/public")},n.handleHotkeyGoToDirect=function(){n.context.router.history.push("/timelines/direct")},n.handleHotkeyGoToStart=function(){n.context.router.history.push("/getting-started")},n.handleHotkeyGoToFavourites=function(){n.context.router.history.push("/favourites")},n.handleHotkeyGoToPinned=function(){n.context.router.history.push("/pinned")},n.handleHotkeyGoToProfile=function(){n.context.router.history.push("/accounts/"+ae.i)},n.handleHotkeyGoToBlocked=function(){n.context.router.history.push("/blocks")},n.handleHotkeyGoToMuted=function(){n.context.router.history.push("/mutes")},n.handleHotkeyGoToRequests=function(){n.context.router.history.push("/follow_requests")},r=o,l()(n,r)}return u()(e,t),e.prototype.componentWillMount=function(){var t=this;window.addEventListener("beforeunload",this.handleBeforeUnload,!1),document.addEventListener("dragenter",this.handleDragEnter,!1),document.addEventListener("dragover",this.handleDragOver,!1),document.addEventListener("drop",this.handleDrop,!1),document.addEventListener("dragleave",this.handleDragLeave,!1),document.addEventListener("dragend",this.handleDragEnd,!1),"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",this.handleServiceWorkerPostMessage),this.props.dispatch(Object(it.p)()),this.props.dispatch(Object(st.h)()),setTimeout(function(){return t.props.dispatch(Object(ct.b)())},500)},e.prototype.componentDidMount=function(){this.hotkeys.__mousetrap__.stopCallback=function(t,e){return["TEXTAREA","SELECT","INPUT"].includes(e.tagName)}},e.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragover",this.handleDragOver),document.removeEventListener("drop",this.handleDrop),document.removeEventListener("dragleave",this.handleDragLeave),document.removeEventListener("dragend",this.handleDragEnd)},e.prototype.render=function(){var t=this.state.draggingOver,e=this.props,o=e.children,n=e.isComposing,r=e.location,i=e.dropdownMenuIsOpen,s={help:this.handleHotkeyToggleHelp,new:this.handleHotkeyNew,search:this.handleHotkeySearch,forceNew:this.handleHotkeyForceNew,focusColumn:this.handleHotkeyFocusColumn,back:this.handleHotkeyBack,goToHome:this.handleHotkeyGoToHome,goToNotifications:this.handleHotkeyGoToNotifications,goToLocal:this.handleHotkeyGoToLocal,goToFederated:this.handleHotkeyGoToFederated,goToDirect:this.handleHotkeyGoToDirect,goToStart:this.handleHotkeyGoToStart,goToFavourites:this.handleHotkeyGoToFavourites,goToPinned:this.handleHotkeyGoToPinned,goToProfile:this.handleHotkeyGoToProfile,goToBlocked:this.handleHotkeyGoToBlocked,goToMuted:this.handleHotkeyGoToMuted,goToRequests:this.handleHotkeyGoToRequests};return h.a.createElement(q.HotKeys,{keyMap:ce,handlers:s,ref:this.setHotkeysRef},h.a.createElement("div",{className:I()("ui",{"is-composing":n}),ref:this.setRef,style:{pointerEvents:i?"none":null}},a()(nt,{}),a()(le,{location:r,onLayoutChange:this.handleLayoutChange},void 0,o),a()(Z.a,{}),a()($.a,{className:"loading-bar"}),a()(rt.a,{}),a()(Ft,{active:t,onClose:this.closeUploadModal})))},e}(h.a.PureComponent),Ot.contextTypes={router:S.a.object.isRequired},kt=Ct))||kt)||kt)||kt,ue=o(150),de=o(29),he=o(63),fe=o(8),me=Object(fe.getLocale)(),ye=me.localeData,ge=me.messages;Object(A.e)(ye);var ve=Object(m.a)(),be=Object(de.b)(ae.c);ve.dispatch(be),ve.dispatch(Object(ue.b)());var we=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.componentDidMount=function(){this.disconnect=ve.dispatch(Object(he.f)()),void 0!==window.Notification&&"default"===Notification.permission&&window.setTimeout(function(){return Notification.requestPermission()},6e4),ve.dispatch(function(t,e){e().getIn(["settings","onboarded"])||(t(Object(y.d)("ONBOARDING")),t(Object(g.c)(["onboarded"],!0)),t(Object(g.d)()))})},e.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},e.prototype.render=function(){var t=this.props.locale;return a()(A.d,{locale:t,messages:ge},void 0,a()(f.Provider,{store:ve},void 0,a()(R,{basename:"/web"},void 0,a()(N.b,{},void 0,a()(M.a,{path:"/",component:pe})))))},e}(h.a.PureComponent),Se=o(28),Te=o.n(Se),ke=o(80),Oe=o(454);e.default=function(){if(Oe.start("main()"),window.history&&history.replaceState){var t=window.location,e=t.pathname+t.search+t.hash;/^\/web($|\/)/.test(e)||history.replaceState(null,document.title,"/web"+e)}Object(ke.default)(function(){var t=document.getElementById("mastodon"),e=JSON.parse(t.getAttribute("data-props"));Te.a.render(h.a.createElement(we,e),t),o(453).install(),ve.dispatch(n.f()),Oe.stop("main()")})}},453:function(t,e){function o(){return"serviceWorker"in navigator&&("https:"===window.location.protocol||"localhost"===window.location.hostname||0===window.location.hostname.indexOf("127."))}e.install=function(t){t||(t={}),o()&&navigator.serviceWorker.register("/sw.js",{})},e.applyUpdate=function(t,e){},e.update=function(){o()&&navigator.serviceWorker.getRegistration().then(function(t){if(t)return t.update()})}},454:function(t,e,o){"use strict";o.r(e),o.d(e,"start",function(){return n}),o.d(e,"stop",function(){return r});function n(t){0}function r(t){0}},457:function(t,e,o){"use strict";o.r(e);var n=o(67),r=o(66);Object(r.a)(),Object(n.a)().then(function(){o(389).default()}).catch(function(t){console.error(t)})}},[[457,0]]]); //# sourceMappingURL=application.js.map \ No newline at end of file