akkoma/priv/static/packs/share.js
2018-08-12 18:02:43 +02:00

2 lines
No EOL
65 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([35],{293:function(e,t,n){"use strict";n.d(t,"a",function(){return L});var o,i,a,r=n(2),s=n.n(r),c=n(1),u=n.n(c),l=n(3),d=n.n(l),p=n(4),f=n.n(p),h=n(0),m=n.n(h),g=n(294),v=n(100),y=n(14),b=n.n(y),_=n(5),k=n.n(_),C=n(295),j=n(297),w=n(302),x=n(7),O=n(304),S=n(306),M=n(308),D=n(309),T=n(311),N=n(317),F=n(43),P=n(12),I=n.n(P),R=n(99),E=(n.n(R),n(13)),A="><…    \u2028\u2029\t\n\v\f\r",z=Object(x.f)({placeholder:{id:"compose_form.placeholder",defaultMessage:"What is on your mind?"},spoiler_placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here"},publish:{id:"compose_form.publish",defaultMessage:"Toot"},publishLoud:{id:"compose_form.publish_loud",defaultMessage:"{publish}!"}}),L=Object(x.g)((a=i=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=d()(this,e.call.apply(e,[this].concat(r))),o.handleChange=function(e){o.props.onChange(e.target.value)},o.handleKeyDown=function(e){13===e.keyCode&&(e.ctrlKey||e.metaKey)&&o.handleSubmit()},o.handleSubmit=function(){o.props.text!==o.autosuggestTextarea.textarea.value&&o.props.onChange(o.autosuggestTextarea.textarea.value);var e=o.props,t=e.is_submitting,n=e.is_uploading,i=e.anyMedia,a=[o.props.spoiler_text,o.props.text].join("");t||n||Object(R.length)(a)>E.h||0!==a.length&&0===a.trim().length&&!i||o.props.onSubmit()},o.onSuggestionsClearRequested=function(){o.props.onClearSuggestions()},o.onSuggestionsFetchRequested=function(e){o.props.onFetchSuggestions(e)},o.onSuggestionSelected=function(e,t,n){o.props.onSuggestionSelected(e,t,n)},o.handleChangeSpoilerText=function(e){o.props.onChangeSpoilerText(e.target.value)},o.setAutosuggestTextarea=function(e){o.autosuggestTextarea=e},o.setSpoilerText=function(e){o.spoilerText=e},o.handleEmojiPick=function(e){var t=o.props.text,n=o.autosuggestTextarea.textarea.selectionStart,i=e.custom&&n>0&&!A.includes(t[n-1]);o.props.onPickEmoji(n,e,i)},i=n,d()(o,i)}return f()(t,e),t.prototype.componentDidUpdate=function(e){if(this.props.focusDate!==e.focusDate){var t=void 0,n=void 0;this.props.preselectDate!==e.preselectDate?(t=this.props.text.length,n=this.props.text.search(/\s/)+1):"number"==typeof this.props.caretPosition?(n=this.props.caretPosition,t=this.props.caretPosition):(t=this.props.text.length,n=t),this.autosuggestTextarea.textarea.setSelectionRange(n,t),this.autosuggestTextarea.textarea.focus()}else e.is_submitting&&!this.props.is_submitting?this.autosuggestTextarea.textarea.focus():this.props.spoiler!==e.spoiler&&(this.props.spoiler?this.spoilerText.focus():this.autosuggestTextarea.textarea.focus())},t.prototype.render=function(){var e=this.props,t=e.intl,n=e.onPaste,o=e.showSearch,i=e.anyMedia,a=this.props.is_submitting,r=[this.props.spoiler_text,this.props.text].join(""),c=a||this.props.is_uploading||Object(R.length)(r)>E.h||0!==r.length&&0===r.trim().length&&!i,u="";return u="private"===this.props.privacy||"direct"===this.props.privacy?s()("span",{className:"compose-form__publish-private"},void 0,s()("i",{className:"fa fa-lock"})," ",t.formatMessage(z.publish)):"unlisted"!==this.props.privacy?t.formatMessage(z.publishLoud,{publish:t.formatMessage(z.publish)}):t.formatMessage(z.publish),s()("div",{className:"compose-form"},void 0,s()(N.a,{}),s()(C.a,{}),s()("div",{className:"spoiler-input "+(this.props.spoiler?"spoiler-input--visible":"")},void 0,s()("label",{},void 0,s()("span",{style:{display:"none"}},void 0,t.formatMessage(z.spoiler_placeholder)),m.a.createElement("input",{placeholder:t.formatMessage(z.spoiler_placeholder),value:this.props.spoiler_text,onChange:this.handleChangeSpoilerText,onKeyDown:this.handleKeyDown,type:"text",className:"spoiler-input__input",id:"cw-spoiler-input",ref:this.setSpoilerText}))),s()("div",{className:"compose-form__autosuggest-wrapper"},void 0,m.a.createElement(j.a,{ref:this.setAutosuggestTextarea,placeholder:t.formatMessage(z.placeholder),disabled:a,value:this.props.text,onChange:this.handleChange,suggestions:this.props.suggestions,onKeyDown:this.handleKeyDown,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected,onPaste:n,autoFocus:!o&&!Object(F.b)(window.innerWidth)}),s()(D.a,{onPickEmoji:this.handleEmojiPick})),s()("div",{className:"compose-form__modifiers"},void 0,s()(T.a,{})),s()("div",{className:"compose-form__buttons-wrapper"},void 0,s()("div",{className:"compose-form__buttons"},void 0,s()(w.a,{}),s()(S.a,{}),s()(M.a,{}),s()(O.a,{})),s()("div",{className:"character-counter__wrapper"},void 0,s()(g.a,{max:E.h,text:r}))),s()("div",{className:"compose-form__publish"},void 0,s()("div",{className:"compose-form__publish-button-wrapper"},void 0,s()(v.a,{text:u,onClick:this.handleSubmit,disabled:c,block:!0}))))},t}(I.a),i.propTypes={intl:k.a.object.isRequired,text:k.a.string.isRequired,suggestion_token:k.a.string,suggestions:b.a.list,spoiler:k.a.bool,privacy:k.a.string,spoiler_text:k.a.string,focusDate:k.a.instanceOf(Date),caretPosition:k.a.number,preselectDate:k.a.instanceOf(Date),is_submitting:k.a.bool,is_uploading:k.a.bool,onChange:k.a.func.isRequired,onSubmit:k.a.func.isRequired,onClearSuggestions:k.a.func.isRequired,onFetchSuggestions:k.a.func.isRequired,onSuggestionSelected:k.a.func.isRequired,onChangeSpoilerText:k.a.func.isRequired,onPaste:k.a.func.isRequired,onPickEmoji:k.a.func.isRequired,showSearch:k.a.bool,anyMedia:k.a.bool},i.defaultProps={showSearch:!1},o=a))||o},294:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(99),h=(n.n(f),function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.checkRemainingText=function(e){return e<0?i()("span",{className:"character-counter character-counter--over"},void 0,e):i()("span",{className:"character-counter"},void 0,e)},t.prototype.render=function(){var e=this.props.max-Object(f.length)(this.props.text);return this.checkRemainingText(e)},t}(p.a.PureComponent))},295:function(e,t,n){"use strict";var o=n(9),i=n(17),a=n(67),r=n(296),s=function(){var e=Object(a.e)();return function(t){return{status:e(t,t.getIn(["compose","in_reply_to"]))}}},c=function(e){return{onCancel:function(){e(Object(i.E)())}}};t.a=Object(o.connect)(s,c)(r.a)},296:function(e,t,n){"use strict";n.d(t,"a",function(){return S});var o,i,a,r=n(2),s=n.n(r),c=n(1),u=n.n(c),l=n(3),d=n.n(l),p=n(4),f=n.n(p),h=n(0),m=(n.n(h),n(14)),g=n.n(m),v=n(5),y=n.n(v),b=n(54),_=n(23),k=n(53),C=n(7),j=n(12),w=n.n(j),x=n(98),O=Object(C.f)({cancel:{id:"reply_indicator.cancel",defaultMessage:"Cancel"}}),S=Object(C.g)((a=i=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=d()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){o.props.onCancel()},o.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),o.context.router.history.push("/accounts/"+o.props.status.getIn(["account","id"])))},i=n,d()(o,i)}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.status,n=e.intl;if(!t)return null;var o={__html:t.get("contentHtml")},i={direction:Object(x.a)(t.get("search_index"))?"rtl":"ltr"};return s()("div",{className:"reply-indicator"},void 0,s()("div",{className:"reply-indicator__header"},void 0,s()("div",{className:"reply-indicator__cancel"},void 0,s()(_.a,{title:n.formatMessage(O.cancel),icon:"times",onClick:this.handleClick,inverted:!0})),s()("a",{href:t.getIn(["account","url"]),onClick:this.handleAccountClick,className:"reply-indicator__display-name"},void 0,s()("div",{className:"reply-indicator__display-avatar"},void 0,s()(b.a,{account:t.get("account"),size:24})),s()(k.a,{account:t.get("account")}))),s()("div",{className:"reply-indicator__content",style:i,dangerouslySetInnerHTML:o}))},t}(w.a),i.contextTypes={router:y.a.object},i.propTypes={status:g.a.map,onCancel:y.a.func.isRequired,intl:y.a.object.isRequired},o=a))||o},297:function(e,t,n){"use strict";n.d(t,"a",function(){return D});var o,i,a=n(2),r=n.n(a),s=n(29),c=n.n(s),u=n(1),l=n.n(u),d=n(3),p=n.n(d),f=n(4),h=n.n(f),m=n(0),g=(n.n(m),n(298)),v=n(300),y=n(14),b=n.n(y),_=n(5),k=n.n(_),C=n(98),j=n(12),w=n.n(j),x=n(301),O=n(10),S=n.n(O),M=function(e,t){var n=void 0,o=e.slice(0,t).search(/\S+$/),i=e.slice(t).search(/\s/);return!(n=i<0?e.slice(o):e.slice(o,i+t))||n.trim().length<3||-1===["@",":","#"].indexOf(n[0])?[null,null]:(n=n.trim().toLowerCase(),n.length>0?[o+1,n]:[null,null])},D=(i=o=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return n=o=p()(this,e.call.apply(e,[this].concat(s))),o.state={suggestionsHidden:!1,selectedSuggestion:0,lastToken:null,tokenStart:0},o.onChange=function(e){var t=M(e.target.value,e.target.selectionStart),n=t[0],i=t[1];null!==i&&o.state.lastToken!==i?(o.setState({lastToken:i,selectedSuggestion:0,tokenStart:n}),o.props.onSuggestionsFetchRequested(i)):null===i&&(o.setState({lastToken:null}),o.props.onSuggestionsClearRequested()),o.props.onChange(e)},o.onKeyDown=function(e){var t=o.props,n=t.suggestions,i=t.disabled,a=o.state,r=a.selectedSuggestion,s=a.suggestionsHidden;if(i)return void e.preventDefault();if(229!==e.which&&!e.isComposing){switch(e.key){case"Escape":0===n.size||s?document.querySelector(".ui").parentElement.focus():(e.preventDefault(),o.setState({suggestionsHidden:!0}));break;case"ArrowDown":n.size>0&&!s&&(e.preventDefault(),o.setState({selectedSuggestion:Math.min(r+1,n.size-1)}));break;case"ArrowUp":n.size>0&&!s&&(e.preventDefault(),o.setState({selectedSuggestion:Math.max(r-1,0)}));break;case"Enter":case"Tab":null!==o.state.lastToken&&n.size>0&&!s&&(e.preventDefault(),e.stopPropagation(),o.props.onSuggestionSelected(o.state.tokenStart,o.state.lastToken,n.get(r)))}!e.defaultPrevented&&o.props.onKeyDown&&o.props.onKeyDown(e)}},o.onBlur=function(){o.setState({suggestionsHidden:!0})},o.onSuggestionClick=function(e){var t=o.props.suggestions.get(e.currentTarget.getAttribute("data-index"));e.preventDefault(),o.props.onSuggestionSelected(o.state.tokenStart,o.state.lastToken,t),o.textarea.focus()},o.setTextarea=function(e){o.textarea=e},o.onPaste=function(e){e.clipboardData&&1===e.clipboardData.files.length&&(o.props.onPaste(e.clipboardData.files),e.preventDefault())},o.renderSuggestion=function(e,t){var n=o.state.selectedSuggestion,i=void 0,a=void 0;return"object"===(void 0===e?"undefined":c()(e))?(i=r()(v.a,{emoji:e}),a=e.id):"#"===e[0]?(i=e,a=e):(i=r()(g.a,{id:e}),a=e),r()("div",{role:"button",tabIndex:"0","data-index":t,className:S()("autosuggest-textarea__suggestions__item",{selected:t===n}),onMouseDown:o.onSuggestionClick},a,i)},i=n,p()(o,i)}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){e.suggestions!==this.props.suggestions&&e.suggestions.size>0&&this.state.suggestionsHidden&&this.setState({suggestionsHidden:!1})},t.prototype.render=function(){var e=this.props,t=e.value,n=e.suggestions,o=e.disabled,i=e.placeholder,a=e.onKeyUp,s=e.autoFocus,c=this.state.suggestionsHidden,u={direction:"ltr"};return Object(C.a)(t)&&(u.direction="rtl"),r()("div",{className:"autosuggest-textarea"},void 0,r()("label",{},void 0,r()("span",{style:{display:"none"}},void 0,i),r()(x.a,{inputRef:this.setTextarea,className:"autosuggest-textarea__textarea",disabled:o,placeholder:i,autoFocus:s,value:t,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:a,onBlur:this.onBlur,onPaste:this.onPaste,style:u,"aria-autocomplete":"list"})),r()("div",{className:"autosuggest-textarea__suggestions "+(c||n.isEmpty()?"":"autosuggest-textarea__suggestions--visible")},void 0,n.map(this.renderSuggestion)))},t}(w.a),o.propTypes={value:k.a.string,suggestions:b.a.list,disabled:k.a.bool,placeholder:k.a.string,onSuggestionSelected:k.a.func.isRequired,onSuggestionsClearRequested:k.a.func.isRequired,onSuggestionsFetchRequested:k.a.func.isRequired,onChange:k.a.func.isRequired,onKeyUp:k.a.func,onKeyDown:k.a.func,onPaste:k.a.func.isRequired,autoFocus:k.a.bool},o.defaultProps={autoFocus:!0},i)},298:function(e,t,n){"use strict";var o=n(9),i=n(299),a=n(67),r=function(){var e=Object(a.c)();return function(t,n){var o=n.id;return{account:e(t,o)}}};t.a=Object(o.connect)(r)(i.a)},299:function(e,t,n){"use strict";n.d(t,"a",function(){return _});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),u=n(3),l=n.n(u),d=n(4),p=n.n(d),f=n(0),h=(n.n(f),n(54)),m=n(53),g=n(14),v=n.n(g),y=n(12),b=n.n(y),_=(i=o=function(e){function t(){return c()(this,t),l()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props.account;return r()("div",{className:"autosuggest-account"},void 0,r()("div",{className:"autosuggest-account-icon"},void 0,r()(h.a,{account:e,size:18})),r()(m.a,{account:e}))},t}(b.a),o.propTypes={account:v.a.map.isRequired},i)},300:function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return g});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(161),h=n.n(f),m=e.env.CDN_HOST||"",g=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){var e=this.props.emoji,t=void 0;if(e.custom)t=e.imageUrl;else{var n=h.a[e.native]||h.a[e.native.replace(/\uFE0F$/,"")];if(!n)return null;t=m+"/emoji/"+n.filename+".svg"}return i()("div",{className:"autosuggest-emoji"},void 0,i()("img",{className:"emojione",src:t,alt:e.native||e.colons}),e.colons)},t}(p.a.PureComponent)}).call(t,n(35))},301:function(e,t,n){"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e,t){if(null==e)return{};var n,o,i={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function r(e,t,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=null),void 0===i&&(i=null),null===f.parentNode&&document.body.appendChild(f);var a=s(e,t,n);if(null===a)return null;var r=a.paddingSize,c=a.borderSize,u=a.boxSizing,l=a.sizingStyle;Object.keys(l).forEach(function(e){f.style[e]=l[e]}),Object.keys(h).forEach(function(e){f.style.setProperty(e,h[e],"important")}),f.value=e.value||e.placeholder||"x";var d=-1/0,p=1/0,m=f.scrollHeight;"border-box"===u?m+=c:"content-box"===u&&(m-=r),f.value="x";var g=f.scrollHeight-r;return null===o&&null===i||(null!==o&&(d=g*o,"border-box"===u&&(d=d+r+c),m=Math.max(d,m)),null!==i&&(p=g*i,"border-box"===u&&(p=p+r+c),m=Math.min(p,m))),{height:m,minHeight:d,maxHeight:p,rowCount:Math.floor(m/g)}}function s(e,t,n){if(void 0===n&&(n=!1),n&&g[t])return g[t];var o=window.getComputedStyle(e);if(null===o)return null;var i=m.reduce(function(e,t){return e[t]=o.getPropertyValue(t),e},{}),a=i["box-sizing"];p&&"border-box"===a&&(i.width=parseFloat(i.width)+parseFloat(o["border-right-width"])+parseFloat(o["border-left-width"])+parseFloat(o["padding-right"])+parseFloat(o["padding-left"])+"px");var r=parseFloat(i["padding-bottom"])+parseFloat(i["padding-top"]),s=parseFloat(i["border-bottom-width"])+parseFloat(i["border-top-width"]),c={sizingStyle:i,paddingSize:r,borderSize:s,boxSizing:a};return n&&(g[t]=c),c}var c=n(0),u=n.n(c),l=n(5),d=(n.n(l),"undefined"!=typeof window&&"undefined"!=typeof document),p=!!d&&!!document.documentElement.currentStyle,f=d&&document.createElement("textarea"),h={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},m=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],g={},v=function(e){return delete g[e]},y=function(e){return void 0===e&&(e=0),function(){return++e}}(),b=function(){},_=d&&window.requestAnimationFrame?[window.requestAnimationFrame,window.cancelAnimationFrame]:[setTimeout,clearTimeout],k=_[0],C=_[1],j=function(e){function t(t){var n;return n=e.call(this,t)||this,n._resizeLock=!1,n._onRootDOMNode=function(e){n._rootDOMNode=e,n.props.inputRef&&n.props.inputRef(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e)},n._resizeComponent=function(e){if(void 0===e&&(e=b),void 0===n._rootDOMNode)return void e();var t=r(n._rootDOMNode,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null===t)return void e();var o=t.height,i=t.minHeight,a=t.maxHeight,s=t.rowCount;if(n.rowCount=s,n.state.height!==o||n.state.minHeight!==i||n.state.maxHeight!==a)return void n.setState({height:o,minHeight:i,maxHeight:a},e);e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=y(),n._controlled="string"==typeof t.value,n}i(t,e);var n=t.prototype;return n.render=function(){var e=this.props,t=(e.minRows,e.maxRows,e.onHeightChange,e.useCacheForDOMMeasurements,e.inputRef,a(e,["minRows","maxRows","onHeightChange","useCacheForDOMMeasurements","inputRef"]));return t.style=o({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)<this.state.height&&(t.style.overflow="hidden"),u.a.createElement("textarea",o({},t,{onChange:this._onChange,ref:this._onRootDOMNode}))},n.componentDidMount=function(){var e=this;this._resizeComponent(),this._resizeListener=function(){e._resizeLock||(e._resizeLock=!0,e._resizeComponent(function(){return e._resizeLock=!1}))},window.addEventListener("resize",this._resizeListener)},n.componentWillReceiveProps=function(){var e=this;this._clearNextFrame(),this._onNextFrameActionId=k(function(){return e._resizeComponent()})},n.componentDidUpdate=function(e,t){this.state.height!==t.height&&this.props.onHeightChange(this.state.height,this)},n.componentWillUnmount=function(){this._clearNextFrame(),window.removeEventListener("resize",this._resizeListener),v(this._uid)},n._clearNextFrame=function(){C(this._onNextFrameActionId)},t}(u.a.Component);j.defaultProps={onChange:b,onHeightChange:b,useCacheForDOMMeasurements:!1},t.a=j},302:function(e,t,n){"use strict";var o=n(9),i=n(303),a=n(17),r=function(e){return{disabled:e.getIn(["compose","is_uploading"])||e.getIn(["compose","media_attachments"]).size>3||e.getIn(["compose","media_attachments"]).some(function(e){return"video"===e.get("type")}),resetFileKey:e.getIn(["compose","resetFileKey"])}},s=function(e){return{onSelectFile:function(t){e(Object(a.Z)(t))}}};t.a=Object(o.connect)(r,s)(i.a)},303:function(e,t,n){"use strict";n.d(t,"a",function(){return D});var o,i,a,r,s=n(2),c=n.n(s),u=n(1),l=n.n(u),d=n(3),p=n.n(d),f=n(4),h=n.n(f),m=n(0),g=n.n(m),v=n(23),y=n(5),b=n.n(y),_=n(7),k=n(9),C=n(12),j=n.n(C),w=n(14),x=n.n(w),O=Object(_.f)({upload:{id:"upload_button.label",defaultMessage:"Add media"}}),S=function(){return function(e){return{acceptContentTypes:e.getIn(["media_attachments","accept_content_types"])}}},M={height:null,lineHeight:"27px"},D=(o=Object(k.connect)(S))(i=Object(_.g)((r=a=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.handleChange=function(e){e.target.files.length>0&&o.props.onSelectFile(e.target.files)},o.handleClick=function(){o.fileElement.click()},o.setRef=function(e){o.fileElement=e},i=n,p()(o,i)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.intl,n=e.resetFileKey,o=e.disabled,i=e.acceptContentTypes;return c()("div",{className:"compose-form__upload-button"},void 0,c()(v.a,{icon:"camera",title:t.formatMessage(O.upload),disabled:o,onClick:this.handleClick,className:"compose-form__upload-button-icon",size:18,inverted:!0,style:M}),c()("label",{},void 0,c()("span",{style:{display:"none"}},void 0,t.formatMessage(O.upload)),g.a.createElement("input",{key:n,ref:this.setRef,type:"file",multiple:!1,accept:i.toArray().join(","),onChange:this.handleChange,disabled:o,style:{display:"none"}})))},t}(j.a),a.propTypes={disabled:b.a.bool,onSelectFile:b.a.func.isRequired,style:b.a.object,resetFileKey:b.a.number,acceptContentTypes:x.a.listOf(b.a.string).isRequired,intl:b.a.object.isRequired},i=r))||i)||i},304:function(e,t,n){"use strict";var o=n(9),i=n(305),a=n(17),r=n(7),s=Object(r.f)({marked:{id:"compose_form.spoiler.marked",defaultMessage:"Text is hidden behind warning"},unmarked:{id:"compose_form.spoiler.unmarked",defaultMessage:"Text is not hidden"}}),c=function(e,t){return{label:"CW",title:t.intl.formatMessage(e.getIn(["compose","spoiler"])?s.marked:s.unmarked),active:e.getIn(["compose","spoiler"]),ariaControls:"cw-spoiler-input"}},u=function(e){return{onClick:function(){e(Object(a.I)())}}};t.a=Object(r.g)(Object(o.connect)(c,u)(i.a))},305:function(e,t,n){"use strict";n.d(t,"a",function(){return f});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return n=o=c()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(e){e.preventDefault(),o.props.onClick()},i=n,c()(o,i)}return l()(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.title,o=e.active,a=e.ariaControls;return i()("button",{title:n,"aria-label":n,className:"text-icon-button "+(o?"active":""),"aria-expanded":o,onClick:this.handleClick,"aria-controls":a},void 0,t)},t}(p.a.PureComponent)},306:function(e,t,n){"use strict";var o=n(9),i=n(307),a=n(17),r=n(26),s=n(43),c=function(e){return{isModalOpen:"ACTIONS"===e.get("modal").modalType,value:e.getIn(["compose","privacy"])}},u=function(e){return{onChange:function(t){e(Object(a.J)(t))},isUserTouching:s.c,onModalOpen:function(t){return e(Object(r.d)("ACTIONS",t))},onModalClose:function(){return e(Object(r.c)())}}};t.a=Object(o.connect)(c,u)(i.a)},307:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var o,i=n(2),a=n.n(i),r=n(1),s=n.n(r),c=n(3),u=n.n(c),l=n(4),d=n.n(l),p=n(0),f=n.n(p),h=n(7),m=n(23),g=n(97),v=n.n(g),y=n(28),b=n(27),_=n.n(b),k=n(45),C=n.n(k),j=n(10),w=n.n(j),x=Object(h.f)({public_short:{id:"privacy.public.short",defaultMessage:"Public"},public_long:{id:"privacy.public.long",defaultMessage:"Post to public timelines"},unlisted_short:{id:"privacy.unlisted.short",defaultMessage:"Unlisted"},unlisted_long:{id:"privacy.unlisted.long",defaultMessage:"Do not show in public timelines"},private_short:{id:"privacy.private.short",defaultMessage:"Followers-only"},private_long:{id:"privacy.private.long",defaultMessage:"Post to followers only"},direct_short:{id:"privacy.direct.short",defaultMessage:"Direct"},direct_long:{id:"privacy.direct.long",defaultMessage:"Post to mentioned users only"},change_privacy:{id:"privacy.change",defaultMessage:"Adjust status privacy"}}),O=!!C.a.hasSupport&&{passive:!0},S=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),c=0;c<a;c++)r[c]=arguments[c];return n=o=u()(this,e.call.apply(e,[this].concat(r))),o.state={mounted:!1},o.handleDocumentClick=function(e){o.node&&!o.node.contains(e.target)&&o.props.onClose()},o.handleKeyDown=function(e){var t=o.props.items,n=e.currentTarget.getAttribute("data-index"),i=t.findIndex(function(e){return e.value===n}),a=void 0;switch(e.key){case"Escape":o.props.onClose();break;case"Enter":o.handleClick(e);break;case"ArrowDown":a=o.node.childNodes[i+1],a&&(a.focus(),o.props.onChange(a.getAttribute("data-index")));break;case"ArrowUp":a=o.node.childNodes[i-1],a&&(a.focus(),o.props.onChange(a.getAttribute("data-index")));break;case"Home":a=o.node.firstChild,a&&(a.focus(),o.props.onChange(a.getAttribute("data-index")));break;case"End":a=o.node.lastChild,a&&(a.focus(),o.props.onChange(a.getAttribute("data-index")))}},o.handleClick=function(e){var t=e.currentTarget.getAttribute("data-index");e.preventDefault(),o.props.onClose(),o.props.onChange(t)},o.setRef=function(e){o.node=e},o.setFocusRef=function(e){o.focusedItem=e},i=n,u()(o,i)}return d()(t,e),t.prototype.componentDidMount=function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,O),this.focusedItem&&this.focusedItem.focus(),this.setState({mounted:!0})},t.prototype.componentWillUnmount=function(){document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,O)},t.prototype.render=function(){var e=this,t=this.state.mounted,n=this.props,o=n.style,i=n.items,r=n.value;return a()(y.a,{defaultStyle:{opacity:0,scaleX:.85,scaleY:.75},style:{opacity:_()(1,{damping:35,stiffness:400}),scaleX:_()(1,{damping:35,stiffness:400}),scaleY:_()(1,{damping:35,stiffness:400})}},void 0,function(n){var s=n.opacity,c=n.scaleX,u=n.scaleY;return f.a.createElement("div",{className:"privacy-dropdown__dropdown",style:Object.assign({},o,{opacity:s,transform:t?"scale("+c+", "+u+")":null}),role:"listbox",ref:e.setRef},i.map(function(t){return f.a.createElement("div",{role:"option",tabIndex:"0",key:t.value,"data-index":t.value,onKeyDown:e.handleKeyDown,onClick:e.handleClick,className:w()("privacy-dropdown__option",{active:t.value===r}),"aria-selected":t.value===r,ref:t.value===r?e.setFocusRef:null},a()("div",{className:"privacy-dropdown__option__icon"},void 0,a()("i",{className:"fa fa-fw fa-"+t.icon})),a()("div",{className:"privacy-dropdown__option__content"},void 0,a()("strong",{},void 0,t.text),t.meta))}))})},t}(f.a.PureComponent),M=Object(h.g)(o=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),c=0;c<a;c++)r[c]=arguments[c];return n=o=u()(this,e.call.apply(e,[this].concat(r))),o.state={open:!1,placement:null},o.handleToggle=function(e){var t=e.target;if(o.props.isUserTouching())o.state.open?o.props.onModalClose():o.props.onModalOpen({actions:o.options.map(function(e){return Object.assign({},e,{active:e.value===o.props.value})}),onClick:o.handleModalActionClick});else{var n=t.getBoundingClientRect(),i=n.top;o.setState({placement:2*i<innerHeight?"bottom":"top"}),o.setState({open:!o.state.open})}},o.handleModalActionClick=function(e){e.preventDefault();var t=o.options[e.currentTarget.getAttribute("data-index")].value;o.props.onModalClose(),o.props.onChange(t)},o.handleKeyDown=function(e){switch(e.key){case"Escape":o.handleClose()}},o.handleClose=function(){o.setState({open:!1})},o.handleChange=function(e){o.props.onChange(e)},i=n,u()(o,i)}return d()(t,e),t.prototype.componentWillMount=function(){var e=this.props.intl.formatMessage;this.options=[{icon:"globe",value:"public",text:e(x.public_short),meta:e(x.public_long)},{icon:"unlock-alt",value:"unlisted",text:e(x.unlisted_short),meta:e(x.unlisted_long)},{icon:"lock",value:"private",text:e(x.private_short),meta:e(x.private_long)},{icon:"envelope",value:"direct",text:e(x.direct_short),meta:e(x.direct_long)}]},t.prototype.render=function(){var e=this.props,t=e.value,n=e.intl,o=this.state,i=o.open,r=o.placement,s=this.options.find(function(e){return e.value===t});return a()("div",{className:w()("privacy-dropdown",{active:i}),onKeyDown:this.handleKeyDown},void 0,a()("div",{className:w()("privacy-dropdown__value",{active:0===this.options.indexOf(s)})},void 0,a()(m.a,{className:"privacy-dropdown__value-icon",icon:s.icon,title:n.formatMessage(x.change_privacy),size:18,expanded:i,active:i,inverted:!0,onClick:this.handleToggle,style:{height:null,lineHeight:"27px"}})),a()(v.a,{show:i,placement:r,target:this},void 0,a()(S,{items:this.options,value:t,onClose:this.handleClose,onChange:this.handleChange})))},t}(f.a.PureComponent))||o},308:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(9),h=n(10),m=n.n(h),g=n(23),v=n(17),y=n(28),b=n(27),_=n.n(b),k=n(7),C=Object(k.f)({marked:{id:"compose_form.sensitive.marked",defaultMessage:"Media is marked as sensitive"},unmarked:{id:"compose_form.sensitive.unmarked",defaultMessage:"Media is not marked as sensitive"}}),j=function(e){return{visible:e.getIn(["compose","media_attachments"]).size>0,active:e.getIn(["compose","sensitive"]),disabled:e.getIn(["compose","spoiler"])}},w=function(e){return{onClick:function(){e(Object(v.G)())}}},x=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){var e=this.props,t=e.visible,n=e.active,o=e.disabled,a=e.onClick,r=e.intl;return i()(y.a,{defaultStyle:{scale:.87},style:{scale:_()(t?1:.87,{stiffness:200,damping:3})}},void 0,function(e){var s=e.scale,c=n?"eye-slash":"eye",u=m()("compose-form__sensitive-button",{"compose-form__sensitive-button--visible":t});return i()("div",{className:u,style:{transform:"scale("+s+")"}},void 0,i()(g.a,{className:"compose-form__sensitive-button__icon",title:r.formatMessage(n?C.marked:C.unmarked),icon:c,onClick:a,size:18,active:n,disabled:o,style:{lineHeight:null,height:null},inverted:!0}))})},t}(p.a.PureComponent);t.a=Object(f.connect)(j,w)(Object(k.g)(x))},309:function(e,t,n){"use strict";var o=n(9),i=n(310),a=n(56),r=n(95),s=(n.n(r),n(8)),c=(n.n(s),n(102)),u=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","yum","disappointed","thinking_face","weary","sob","sunglasses","heart","ok_hand"],l=Object(r.createSelector)([function(e){return e.getIn(["settings","frequentlyUsedEmojis"],Object(s.Map)())}],function(e){var t=e.keySeq().sort(function(t,n){return e.get(t)-e.get(n)}).reverse().slice(0,16).toArray();if(t.length<u.length){var n=u.filter(function(e){return!t.includes(e)});t=t.concat(n.slice(0,u.length-t.length))}return t}),d=Object(r.createSelector)([function(e){return e.get("custom_emojis")}],function(e){return e.filter(function(e){return e.get("visible_in_picker")}).sort(function(e,t){var n=e.get("shortcode").toLowerCase(),o=t.get("shortcode").toLowerCase();return n<o?-1:n>o?1:0})}),p=function(e){return{custom_emojis:d(e),skinTone:e.getIn(["settings","skinTone"]),frequentlyUsedEmojis:l(e)}},f=function(e,t){var n=t.onPickEmoji;return{onSkinTone:function(t){e(Object(a.c)(["skinTone"],t))},onPickEmoji:function(t){e(Object(c.b)(t)),n&&n(t)}}};t.a=Object(o.connect)(p,f)(i.a)},310:function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return E});var o,i,a,r,s=n(2),c=n.n(s),u=n(1),l=n.n(u),d=n(3),p=n.n(d),f=n(4),h=n.n(f),m=n(0),g=n.n(m),v=n(7),y=n(58),b=n(97),_=n.n(b),k=n(10),C=n.n(k),j=n(45),w=n.n(j),x=n(73),O=Object(v.f)({emoji:{id:"emoji_button.label",defaultMessage:"Insert emoji"},emoji_search:{id:"emoji_button.search",defaultMessage:"Search..."},emoji_not_found:{id:"emoji_button.not_found",defaultMessage:"No emojos!! (╯°□°)╯︵ ┻━┻"},custom:{id:"emoji_button.custom",defaultMessage:"Custom"},recent:{id:"emoji_button.recent",defaultMessage:"Frequently used"},search_results:{id:"emoji_button.search_results",defaultMessage:"Search results"},people:{id:"emoji_button.people",defaultMessage:"People"},nature:{id:"emoji_button.nature",defaultMessage:"Nature"},food:{id:"emoji_button.food",defaultMessage:"Food & Drink"},activity:{id:"emoji_button.activity",defaultMessage:"Activity"},travel:{id:"emoji_button.travel",defaultMessage:"Travel & Places"},objects:{id:"emoji_button.objects",defaultMessage:"Objects"},symbols:{id:"emoji_button.symbols",defaultMessage:"Symbols"},flags:{id:"emoji_button.flags",defaultMessage:"Flags"}}),S=e.env.CDN_HOST||"",M=void 0,D=void 0,T=function(){return S+"/emoji/sheet_10.png"},N=!!w.a.hasSupport&&{passive:!0},F=["recent","custom","people","nature","foods","activity","places","objects","symbols","flags"],P=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(e){o.props.onSelect(1*e.currentTarget.getAttribute("data-index"))},o.handleDocumentClick=function(e){o.node&&!o.node.contains(e.target)&&o.props.onClose()},o.setRef=function(e){o.node=e},i=n,p()(o,i)}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){e.active?this.attachListeners():this.removeListeners()},t.prototype.componentWillUnmount=function(){this.removeListeners()},t.prototype.attachListeners=function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,N)},t.prototype.removeListeners=function(){document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,N)},t.prototype.render=function(){var e=this.props.active;return g.a.createElement("div",{className:"emoji-picker-dropdown__modifiers__menu",style:{display:e?"block":"none"},ref:this.setRef},c()("button",{onClick:this.handleClick,"data-index":1},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:1,backgroundImageFn:T})),c()("button",{onClick:this.handleClick,"data-index":2},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:2,backgroundImageFn:T})),c()("button",{onClick:this.handleClick,"data-index":3},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:3,backgroundImageFn:T})),c()("button",{onClick:this.handleClick,"data-index":4},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:4,backgroundImageFn:T})),c()("button",{onClick:this.handleClick,"data-index":5},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:5,backgroundImageFn:T})),c()("button",{onClick:this.handleClick,"data-index":6},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:6,backgroundImageFn:T})))},t}(g.a.PureComponent),I=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){o.props.active?o.props.onClose():o.props.onOpen()},o.handleSelect=function(e){o.props.onChange(e),o.props.onClose()},i=n,p()(o,i)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.active,n=e.modifier;return c()("div",{className:"emoji-picker-dropdown__modifiers"},void 0,c()(D,{emoji:"fist",set:"twitter",size:22,sheetSize:32,skin:n,onClick:this.handleClick,backgroundImageFn:T}),c()(P,{active:t,onSelect:this.handleSelect,onClose:this.props.onClose}))},t}(g.a.PureComponent),R=Object(v.g)((a=i=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.state={modifierOpen:!1,placement:null},o.handleDocumentClick=function(e){o.node&&!o.node.contains(e.target)&&o.props.onClose()},o.setRef=function(e){o.node=e},o.getI18n=function(){var e=o.props.intl;return{search:e.formatMessage(O.emoji_search),notfound:e.formatMessage(O.emoji_not_found),categories:{search:e.formatMessage(O.search_results),recent:e.formatMessage(O.recent),people:e.formatMessage(O.people),nature:e.formatMessage(O.nature),foods:e.formatMessage(O.food),activity:e.formatMessage(O.activity),places:e.formatMessage(O.travel),objects:e.formatMessage(O.objects),symbols:e.formatMessage(O.symbols),flags:e.formatMessage(O.flags),custom:e.formatMessage(O.custom)}}},o.handleClick=function(e){e.native||(e.native=e.colons),o.props.onClose(),o.props.onPick(e)},o.handleModifierOpen=function(){o.setState({modifierOpen:!0})},o.handleModifierClose=function(){o.setState({modifierOpen:!1})},o.handleModifierChange=function(e){o.props.onSkinTone(e)},i=n,p()(o,i)}return h()(t,e),t.prototype.componentDidMount=function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,N)},t.prototype.componentWillUnmount=function(){document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,N)},t.prototype.render=function(){var e=this.props,t=e.loading,n=e.style,o=e.intl,i=e.custom_emojis,a=e.skinTone,r=e.frequentlyUsedEmojis;if(t)return c()("div",{style:{width:299}});var s=o.formatMessage(O.emoji),u=this.state.modifierOpen;return g.a.createElement("div",{className:C()("emoji-picker-dropdown__menu",{selecting:u}),style:n,ref:this.setRef},c()(M,{perLine:8,emojiSize:22,sheetSize:32,custom:Object(x.buildCustomEmojis)(i),color:"",emoji:"",set:"twitter",title:s,i18n:this.getI18n(),onClick:this.handleClick,include:F,recent:r,skin:a,showPreview:!1,backgroundImageFn:T,emojiTooltip:!0}),c()(I,{active:u,modifier:a,onOpen:this.handleModifierOpen,onClose:this.handleModifierClose,onChange:this.handleModifierChange}))},t}(g.a.PureComponent),i.defaultProps={style:{},loading:!0,frequentlyUsedEmojis:[]},o=a))||o,E=Object(v.g)(r=function(e){function t(){var n,o,i;l()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.state={active:!1,loading:!1},o.setRef=function(e){o.dropdown=e},o.onShowDropdown=function(e){var t=e.target;o.setState({active:!0}),M||(o.setState({loading:!0}),Object(y.i)().then(function(e){M=e.Picker,D=e.Emoji,o.setState({loading:!1})}).catch(function(){o.setState({loading:!1})}));var n=t.getBoundingClientRect(),i=n.top;o.setState({placement:2*i<innerHeight?"bottom":"top"})},o.onHideDropdown=function(){o.setState({active:!1})},o.onToggle=function(e){o.state.loading||e.key&&"Enter"!==e.key||(o.state.active?o.onHideDropdown():o.onShowDropdown(e))},o.handleKeyDown=function(e){"Escape"===e.key&&o.onHideDropdown()},o.setTargetRef=function(e){o.target=e},o.findTarget=function(){return o.target},i=n,p()(o,i)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.intl,n=e.onPickEmoji,o=e.onSkinTone,i=e.skinTone,a=e.frequentlyUsedEmojis,r=t.formatMessage(O.emoji),s=this.state,u=s.active,l=s.loading,d=s.placement;return c()("div",{className:"emoji-picker-dropdown",onKeyDown:this.handleKeyDown},void 0,g.a.createElement("div",{ref:this.setTargetRef,className:"emoji-button",title:r,"aria-label":r,"aria-expanded":u,role:"button",onClick:this.onToggle,onKeyDown:this.onToggle,tabIndex:0},c()("img",{className:C()("emojione",{"pulse-loading":u&&l}),alt:"🙂",src:S+"/emoji/1f602.svg"})),c()(_.a,{show:u,placement:d,target:this.findTarget},void 0,c()(R,{custom_emojis:this.props.custom_emojis,loading:l,onClose:this.onHideDropdown,onPick:n,onSkinTone:o,skinTone:i,frequentlyUsedEmojis:a})))},t}(g.a.PureComponent))||r}).call(t,n(35))},311:function(e,t,n){"use strict";var o=n(9),i=n(312),a=function(e){return{mediaIds:e.getIn(["compose","media_attachments"]).map(function(e){return e.get("id")})}};t.a=Object(o.connect)(a)(i.a)},312:function(e,t,n){"use strict";n.d(t,"a",function(){return _});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),u=n(3),l=n.n(u),d=n(4),p=n.n(d),f=n(0),h=(n.n(f),n(14)),m=n.n(h),g=n(313),v=n(12),y=n.n(v),b=n(315),_=(i=o=function(e){function t(){return c()(this,t),l()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props.mediaIds;return r()("div",{className:"compose-form__upload-wrapper"},void 0,r()(g.a,{}),r()("div",{className:"compose-form__uploads-wrapper"},void 0,e.map(function(e){return r()(b.a,{id:e},e)})))},t}(y.a),o.propTypes={mediaIds:m.a.list.isRequired},i)},313:function(e,t,n){"use strict";var o=n(9),i=n(314),a=function(e){return{active:e.getIn(["compose","is_uploading"]),progress:e.getIn(["compose","progress"])}};t.a=Object(o.connect)(a)(i.a)},314:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(28),h=n(27),m=n.n(h),g=n(7),v=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){var e=this.props,t=e.active,n=e.progress;return t?i()("div",{className:"upload-progress"},void 0,i()("div",{className:"upload-progress__icon"},void 0,i()("i",{className:"fa fa-upload"})),i()("div",{className:"upload-progress__message"},void 0,i()(g.b,{id:"upload_progress.label",defaultMessage:"Uploading..."}),i()("div",{className:"upload-progress__backdrop"},void 0,i()(f.a,{defaultStyle:{width:0},style:{width:m()(n)}},void 0,function(e){var t=e.width;return i()("div",{className:"upload-progress__tracker",style:{width:t+"%"}})})))):null},t}(p.a.PureComponent)},315:function(e,t,n){"use strict";var o=n(9),i=n(316),a=n(17),r=n(26),s=function(e,t){var n=t.id;return{media:e.getIn(["compose","media_attachments"]).find(function(e){return e.get("id")===n})}},c=function(e){return{onUndo:function(t){e(Object(a.X)(t))},onDescriptionChange:function(t,n){e(Object(a.L)(t,{description:n}))},onOpenFocalPoint:function(t){e(Object(r.d)("FOCAL_POINT",{id:t}))}}};t.a=Object(o.connect)(s,c)(i.a)},316:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var o,i,a,r=n(2),s=n.n(r),c=n(1),u=n.n(c),l=n(3),d=n.n(l),p=n(4),f=n.n(p),h=n(0),m=(n.n(h),n(14)),g=n.n(m),v=n(5),y=n.n(v),b=n(28),_=n(27),k=n.n(_),C=n(12),j=n.n(C),w=n(7),x=n(10),O=n.n(x),S=Object(w.f)({description:{id:"upload_form.description",defaultMessage:"Describe for the visually impaired"}}),M=Object(w.g)((a=i=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=d()(this,e.call.apply(e,[this].concat(r))),o.state={hovered:!1,focused:!1,dirtyDescription:null},o.handleUndoClick=function(){o.props.onUndo(o.props.media.get("id"))},o.handleFocalPointClick=function(){o.props.onOpenFocalPoint(o.props.media.get("id"))},o.handleInputChange=function(e){o.setState({dirtyDescription:e.target.value})},o.handleMouseEnter=function(){o.setState({hovered:!0})},o.handleMouseLeave=function(){o.setState({hovered:!1})},o.handleInputFocus=function(){o.setState({focused:!0})},o.handleInputBlur=function(){var e=o.state.dirtyDescription;o.setState({focused:!1,dirtyDescription:null}),null!==e&&o.props.onDescriptionChange(o.props.media.get("id"),e)},i=n,d()(o,i)}return f()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.intl,o=t.media,i=this.state.hovered||this.state.focused,a=this.state.dirtyDescription||""!==this.state.dirtyDescription&&o.get("description")||"",r=o.getIn(["meta","focus","x"]),c=o.getIn(["meta","focus","y"]),u=100*(r/2+.5),l=100*(c/-2+.5);return s()("div",{className:"compose-form__upload",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,s()(b.a,{defaultStyle:{scale:.8},style:{scale:k()(1,{stiffness:180,damping:12})}},void 0,function(t){var r=t.scale;return s()("div",{className:"compose-form__upload-thumbnail",style:{transform:"scale("+r+")",backgroundImage:"url("+o.get("preview_url")+")",backgroundPosition:u+"% "+l+"%"}},void 0,s()("div",{className:O()("compose-form__upload__actions",{active:i})},void 0,s()("button",{className:"icon-button",onClick:e.handleUndoClick},void 0,s()("i",{className:"fa fa-times"})," ",s()(w.b,{id:"upload_form.undo",defaultMessage:"Delete"})),"image"===o.get("type")&&s()("button",{className:"icon-button",onClick:e.handleFocalPointClick},void 0,s()("i",{className:"fa fa-crosshairs"})," ",s()(w.b,{id:"upload_form.focus",defaultMessage:"Crop"}))),s()("div",{className:O()("compose-form__upload-description",{active:i})},void 0,s()("label",{},void 0,s()("span",{style:{display:"none"}},void 0,n.formatMessage(S.description)),s()("input",{placeholder:n.formatMessage(S.description),type:"text",value:a,maxLength:420,onFocus:e.handleInputFocus,onChange:e.handleInputChange,onBlur:e.handleInputBlur}))))}))},t}(j.a),i.propTypes={media:g.a.map.isRequired,intl:y.a.object.isRequired,onUndo:y.a.func.isRequired,onDescriptionChange:y.a.func.isRequired,onOpenFocalPoint:y.a.func.isRequired},o=a))||o},317:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),r=(n.n(a),n(9)),s=n(318),c=n(7),u=n(13),l=/(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i,d=function(e){return{needsLockWarning:"private"===e.getIn(["compose","privacy"])&&!e.getIn(["accounts",u.i,"locked"]),hashtagWarning:"public"!==e.getIn(["compose","privacy"])&&l.test(e.getIn(["compose","text"])),directMessageWarning:"direct"===e.getIn(["compose","privacy"])}},p=function(e){var t=e.needsLockWarning,n=e.hashtagWarning,o=e.directMessageWarning;if(t)return i()(s.a,{message:i()(c.b,{id:"compose_form.lock_disclaimer",defaultMessage:"Your account is not {locked}. Anyone can follow you to view your follower-only posts.",values:{locked:i()("a",{href:"/user-settings"},void 0,i()(c.b,{id:"compose_form.lock_disclaimer.lock",defaultMessage:"locked"}))}})});if(n)return i()(s.a,{message:i()(c.b,{id:"compose_form.hashtag_warning",defaultMessage:"This toot won't be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag."})});if(o){var a=i()("span",{},void 0,i()(c.b,{id:"compose_form.direct_message_warning",defaultMessage:"This toot will only be sent to all the mentioned users."})," ",i()("a",{href:"/terms",target:"_blank"},void 0,i()(c.b,{id:"compose_form.direct_message_warning_learn_more",defaultMessage:"Learn more"})));return i()(s.a,{message:a})}return null};t.a=Object(r.connect)(d)(p)},318:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(28),h=n(27),m=n.n(h),g=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){var e=this.props.message;return i()(f.a,{defaultStyle:{opacity:0,scaleX:.85,scaleY:.75},style:{opacity:m()(1,{damping:35,stiffness:400}),scaleX:m()(1,{damping:35,stiffness:400}),scaleY:m()(1,{damping:35,stiffness:400})}},void 0,function(t){var n=t.opacity,o=t.scaleX,a=t.scaleY;return i()("div",{className:"compose-form__warning",style:{opacity:n,transform:"scale("+o+", "+a+")"}},void 0,e)})},t}(p.a.PureComponent)},319:function(e,t,n){"use strict";var o=n(9),i=n(293),a=n(17),r=function(e){return{text:e.getIn(["compose","text"]),suggestion_token:e.getIn(["compose","suggestion_token"]),suggestions:e.getIn(["compose","suggestions"]),spoiler:e.getIn(["compose","spoiler"]),spoiler_text:e.getIn(["compose","spoiler_text"]),privacy:e.getIn(["compose","privacy"]),focusDate:e.getIn(["compose","focusDate"]),caretPosition:e.getIn(["compose","caretPosition"]),preselectDate:e.getIn(["compose","preselectDate"]),is_submitting:e.getIn(["compose","is_submitting"]),is_uploading:e.getIn(["compose","is_uploading"]),showSearch:e.getIn(["search","submitted"])&&!e.getIn(["search","hidden"]),anyMedia:e.getIn(["compose","media_attachments"]).size>0}},s=function(e){return{onChange:function(t){e(Object(a.F)(t))},onSubmit:function(){e(Object(a.W)())},onClearSuggestions:function(){e(Object(a.M)())},onFetchSuggestions:function(t){e(Object(a.O)(t))},onSuggestionSelected:function(t,n,o){e(Object(a.V)(t,n,o))},onChangeSpoilerText:function(t){e(Object(a.H)(t))},onPaste:function(t){e(Object(a.Z)(t))},onPickEmoji:function(t,n,o){e(Object(a.Q)(t,n,o))}}};t.a=Object(o.connect)(r,s)(i.a)},683:function(e,t,n){"use strict";function o(){var e=n(684).default,t=n(0),o=n(20),i=document.getElementById("mastodon-compose");if(null!==i){var a=JSON.parse(i.getAttribute("data-props"));o.render(t.createElement(e,a),i)}}function i(){(0,n(89).default)(o)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(77);Object(a.a)().then(i).catch(function(e){console.error(e)})},684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return w});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(9),h=n(126),m=n(31),g=n(7),v=n(6),y=n(685),b=n(13),_=Object(v.getLocale)(),k=_.localeData,C=_.messages;Object(g.e)(k);var j=Object(h.a)();b.c&&j.dispatch(Object(m.b)(b.c));var w=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){var e=this.props.locale;return i()(g.d,{locale:e,messages:C},void 0,i()(f.Provider,{store:j},void 0,i()(y.a,{})))},t}(p.a.PureComponent)},685:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),u=n(4),l=n.n(u),d=n(0),p=n.n(d),f=n(319),h=n(247),m=n(250),g=n(150),v=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return l()(t,e),t.prototype.render=function(){return i()("div",{},void 0,i()(f.a,{}),i()(h.a,{}),i()(g.a,{}),i()(m.a,{className:"loading-bar"}))},t}(p.a.PureComponent)},7:function(e,t,n){"use strict";function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(Array.isArray(e)?e:[e]).forEach(function(e){e&&e.locale&&(N.a.__addLocaleData(e),P.a.__addLocaleData(e))})}function i(e){for(var t=(e||"").split("-");t.length>0;){if(a(t.join("-")))return!0;t.pop()}return!1}function a(e){var t=e&&e.toLowerCase();return!(!N.a.__localeData__[t]||!P.a.__localeData__[t])}function r(e){return(""+e).replace(_e,function(e){return be[e]})}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.reduce(function(t,o){return e.hasOwnProperty(o)?t[o]=e[o]:n.hasOwnProperty(o)&&(t[o]=n[o]),t},{})}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intl;L()(t,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}function u(e,t){if(e===t)return!0;if("object"!==(void 0===e?"undefined":K(e))||null===e||"object"!==(void 0===t?"undefined":K(t))||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++)if(!i(n[a])||e[n[a]]!==t[n[a]])return!1;return!0}function l(e,t,n){var o=e.props,i=e.state,a=e.context,r=void 0===a?{}:a,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=r.intl,d=void 0===l?{}:l,p=c.intl,f=void 0===p?{}:p;return!u(t,o)||!u(n,i)||!(f===d||u(s(f,ye),s(d,ye)))}function d(e){return e.displayName||e.name||"Component"}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.intlPropName,o=void 0===n?"intl":n,i=t.withRef,a=void 0!==i&&i,r=function(t){function n(e,t){W(this,n);var o=V(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return c(t),o}return Z(n,t),B(n,[{key:"getWrappedInstance",value:function(){return L()(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 A.a.createElement(e,Y({},this.props,X({},o,this.context.intl),{ref:a?"wrappedInstance":null}))}}]),n}(E.Component);return r.displayName="InjectIntl("+d(e)+")",r.contextTypes={intl:fe},r.WrappedComponent=e,r}function f(e){return e}function h(e){return N.a.prototype._resolveLocale(e)}function m(e){return N.a.prototype._findPluralRuleFunction(e)}function g(e){var t=P.a.thresholds;t.second=e.second,t.minute=e.minute,t.hour=e.hour,t.day=e.day,t.month=e.month}function v(e,t,n){var o=e&&e[t]&&e[t][n];if(o)return o}function y(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=e.formats,r=o.format,c=new Date(n),u=r&&v(a,"date",r),l=s(o,Ce,u);try{return t.getDateTimeFormat(i,l).format(c)}catch(e){}return String(c)}function b(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=e.formats,r=o.format,c=new Date(n),u=r&&v(a,"time",r),l=s(o,Ce,u);l.hour||l.minute||l.second||(l=Y({},l,{hour:"numeric",minute:"numeric"}));try{return t.getDateTimeFormat(i,l).format(c)}catch(e){}return String(c)}function _(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=e.formats,r=o.format,c=new Date(n),u=new Date(o.now),l=r&&v(a,"relative",r),d=s(o,we,l),p=Y({},P.a.thresholds);g(Oe);try{return t.getRelativeFormat(i,d).format(c,{now:isFinite(u)?u:t.now()})}catch(e){}finally{g(p)}return String(c)}function k(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=e.formats,r=o.format,c=r&&v(a,"number",r),u=s(o,je,c);try{return t.getNumberFormat(i,u).format(n)}catch(e){}return String(n)}function C(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=s(o,xe);try{return t.getPluralFormat(i,a).format(n)}catch(e){}return"other"}function j(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.locale,a=e.formats,r=e.messages,s=e.defaultLocale,c=e.defaultFormats,u=n.id,l=n.defaultMessage;L()(u,"[React Intl] An `id` must be provided to format a message.");var d=r&&r[u];if(!(Object.keys(o).length>0))return d||l||u;var p=void 0;if(d)try{p=t.getMessageFormat(d,i,a).format(o)}catch(e){}if(!p&&l)try{p=t.getMessageFormat(l,s,c).format(o)}catch(e){}return p||d||l||u}function w(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return j(e,t,n,Object.keys(o).reduce(function(e,t){var n=o[t];return e[t]="string"==typeof n?r(n):n,e},{}))}function x(e){var t=Math.abs(e);return t<Re?"second":t<Ee?"minute":t<Ae?"hour":"day"}function O(e){switch(e){case"second":return Ie;case"minute":return Re;case"hour":return Ee;case"day":return Ae;default:return ze}}function S(e,t){if(e===t)return!0;var n=new Date(e).getTime(),o=new Date(t).getTime();return isFinite(n)&&isFinite(o)&&n===o}n.d(t,"e",function(){return o}),n.d(t,"g",function(){return p}),n.d(t,"f",function(){return f}),n.d(t,"d",function(){return Ne}),n.d(t,"a",function(){return Fe}),n.d(t,"c",function(){return qe}),n.d(t,"b",function(){return Ue});var M=n(107),D=n.n(M),T=n(59),N=n.n(T),F=n(76),P=n.n(F),I=n(5),R=n.n(I),E=n(0),A=n.n(E),z=n(18),L=n.n(z),q=n(108),H=n.n(q),U={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),r=i&&n[0].slice(-2);return t?1==a&&11!=r?"one":2==a&&12!=r?"two":3==a&&13!=r?"few":"other":1==e&&o?"one":"other"},fields:{year:{displayName:"year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"hour",relative:{0:"this hour"},relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"minute",relative:{0:"this minute"},relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}},K="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},W=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},B=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),X=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)},J=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},V=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},G=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},$=R.a.bool,Q=R.a.number,ee=R.a.string,te=R.a.func,ne=R.a.object,oe=R.a.oneOf,ie=R.a.shape,ae=R.a.any,re=R.a.oneOfType,se=oe(["best fit","lookup"]),ce=oe(["narrow","short","long"]),ue=oe(["numeric","2-digit"]),le=te.isRequired,de={locale:ee,formats:ne,messages:ne,textComponent:ae,defaultLocale:ee,defaultFormats:ne},pe={formatDate:le,formatTime:le,formatRelative:le,formatNumber:le,formatPlural:le,formatMessage:le,formatHTMLMessage:le},fe=ie(Y({},de,pe,{formatters:ne,now:le})),he=(ee.isRequired,re([ee,ne]),{localeMatcher:se,formatMatcher:oe(["basic","best fit"]),timeZone:ee,hour12:$,weekday:ce,era:ce,year:ue,month:oe(["numeric","2-digit","narrow","short","long"]),day:ue,hour:ue,minute:ue,second:ue,timeZoneName:oe(["short","long"])}),me={localeMatcher:se,style:oe(["decimal","currency","percent"]),currency:ee,currencyDisplay:oe(["symbol","code","name"]),useGrouping:$,minimumIntegerDigits:Q,minimumFractionDigits:Q,maximumFractionDigits:Q,minimumSignificantDigits:Q,maximumSignificantDigits:Q},ge={style:oe(["best fit","numeric"]),units:oe(["second","minute","hour","day","month","year"])},ve={style:oe(["cardinal","ordinal"])},ye=Object.keys(de),be={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},_e=/[&><"']/g,ke=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e);var o="ordinal"===n.style,i=m(h(t));this.format=function(e){return i(e,o)}},Ce=Object.keys(he),je=Object.keys(me),we=Object.keys(ge),xe=Object.keys(ve),Oe={second:60,minute:60,hour:24,day:30,month:12},Se=Object.freeze({formatDate:y,formatTime:b,formatRelative:_,formatNumber:k,formatPlural:C,formatMessage:j,formatHTMLMessage:w}),Me=Object.keys(de),De=Object.keys(pe),Te={formats:{},messages:{},textComponent:"span",defaultLocale:"en",defaultFormats:{}},Ne=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));L()("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 i=n.intl,a=void 0;a=isFinite(e.initialNow)?Number(e.initialNow):i?i.now():Date.now();var r=i||{},s=r.formatters,c=void 0===s?{getDateTimeFormat:H()(Intl.DateTimeFormat),getNumberFormat:H()(Intl.NumberFormat),getMessageFormat:H()(N.a),getRelativeFormat:H()(P.a),getPluralFormat:H()(ke)}:s;return o.state=Y({},c,{now:function(){return o._didDisplay?Date.now():a}}),o}return Z(t,e),B(t,[{key:"getConfig",value:function(){var e=this.context.intl,t=s(this.props,Me,e);for(var n in Te)void 0===t[n]&&(t[n]=Te[n]);if(!i(t.locale)){var o=t,a=(o.locale,o.defaultLocale),r=o.defaultFormats;t=Y({},t,{locale:a,formats:r,messages:Te.messages})}return t}},{key:"getBoundFormatFns",value:function(e,t){return De.reduce(function(n,o){return n[o]=Se[o].bind(null,e,t),n},{})}},{key:"getChildContext",value:function(){var e=this.getConfig(),t=this.getBoundFormatFns(e,this.state),n=this.state,o=n.now,i=J(n,["now"]);return{intl:Y({},e,t,{formatters:i,now:o})}}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"componentDidMount",value:function(){this._didDisplay=!0}},{key:"render",value:function(){return E.Children.only(this.props.children)}}]),t}(E.Component);Ne.displayName="IntlProvider",Ne.contextTypes={intl:fe},Ne.childContextTypes={intl:fe.isRequired};var Fe=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatDate,n=e.textComponent,o=this.props,i=o.value,a=o.children,r=t(i,this.props);return"function"==typeof a?a(r):A.a.createElement(n,null,r)}}]),t}(E.Component);Fe.displayName="FormattedDate",Fe.contextTypes={intl:fe};var Pe=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatTime,n=e.textComponent,o=this.props,i=o.value,a=o.children,r=t(i,this.props);return"function"==typeof a?a(r):A.a.createElement(n,null,r)}}]),t}(E.Component);Pe.displayName="FormattedTime",Pe.contextTypes={intl:fe};var Ie=1e3,Re=6e4,Ee=36e5,Ae=864e5,ze=2147483647,Le=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));c(n);var i=isFinite(e.initialNow)?Number(e.initialNow):n.intl.now();return o.state={now:i},o}return Z(t,e),B(t,[{key:"scheduleNextUpdate",value:function(e,t){var n=this;clearTimeout(this._timer);var o=e.value,i=e.units,a=e.updateInterval,r=new Date(o).getTime();if(a&&isFinite(r)){var s=r-t.now,c=O(i||x(s)),u=Math.abs(s%c),l=s<0?Math.max(a,c-u):Math.max(a,u);this._timer=setTimeout(function(){n.setState({now:n.context.intl.now()})},l)}}},{key:"componentDidMount",value:function(){this.scheduleNextUpdate(this.props,this.state)}},{key:"componentWillReceiveProps",value:function(e){S(e.value,this.props.value)||this.setState({now:this.context.intl.now()})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"componentWillUpdate",value:function(e,t){this.scheduleNextUpdate(e,t)}},{key:"componentWillUnmount",value:function(){clearTimeout(this._timer)}},{key:"render",value:function(){var e=this.context.intl,t=e.formatRelative,n=e.textComponent,o=this.props,i=o.value,a=o.children,r=t(i,Y({},this.props,this.state));return"function"==typeof a?a(r):A.a.createElement(n,null,r)}}]),t}(E.Component);Le.displayName="FormattedRelative",Le.contextTypes={intl:fe},Le.defaultProps={updateInterval:1e4};var qe=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatNumber,n=e.textComponent,o=this.props,i=o.value,a=o.children,r=t(i,this.props);return"function"==typeof a?a(r):A.a.createElement(n,null,r)}}]),t}(E.Component);qe.displayName="FormattedNumber",qe.contextTypes={intl:fe};var He=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatPlural,n=e.textComponent,o=this.props,i=o.value,a=o.other,r=o.children,s=t(i,this.props),c=this.props[s]||a;return"function"==typeof r?r(c):A.a.createElement(n,null,c)}}]),t}(E.Component);He.displayName="FormattedPlural",He.contextTypes={intl:fe},He.defaultProps={style:"cardinal"};var Ue=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!u(e.values,t))return!0;for(var n=Y({},e,{values:t}),o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return l.apply(void 0,[this,n].concat(i))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatMessage,n=e.textComponent,o=this.props,i=o.id,a=o.description,r=o.defaultMessage,s=o.values,c=o.tagName,u=void 0===c?n:c,l=o.children,d=void 0,p=void 0,f=void 0;if(s&&Object.keys(s).length>0){var h=Math.floor(1099511627776*Math.random()).toString(16),m=function(){var e=0;return function(){return"ELEMENT-"+h+"-"+(e+=1)}}();d="@__"+h+"__@",p={},f={},Object.keys(s).forEach(function(e){var t=s[e];if(Object(E.isValidElement)(t)){var n=m();p[e]=d+n+d,f[n]=t}else p[e]=t})}var g={id:i,description:a,defaultMessage:r},v=t(g,p||s),y=void 0;return y=f&&Object.keys(f).length>0?v.split(d).filter(function(e){return!!e}).map(function(e){return f[e]||e}):[v],"function"==typeof l?l.apply(void 0,G(y)):E.createElement.apply(void 0,[u,null].concat(G(y)))}}]),t}(E.Component);Ue.displayName="FormattedMessage",Ue.contextTypes={intl:fe},Ue.defaultProps={values:{}};var Ke=function(e){function t(e,n){W(this,t);var o=V(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return c(n),o}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!u(e.values,t))return!0;for(var n=Y({},e,{values:t}),o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return l.apply(void 0,[this,n].concat(i))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatHTMLMessage,n=e.textComponent,o=this.props,i=o.id,a=o.description,r=o.defaultMessage,s=o.values,c=o.tagName,u=void 0===c?n:c,l=o.children,d={id:i,description:a,defaultMessage:r},p=t(d,s);if("function"==typeof l)return l(p);var f={__html:p};return A.a.createElement(u,{dangerouslySetInnerHTML:f})}}]),t}(E.Component);Ke.displayName="FormattedHTMLMessage",Ke.contextTypes={intl:fe},Ke.defaultProps={values:{}},o(U),o(D.a)}},[683]);
//# sourceMappingURL=share.js.map