/*!CK:1076909267!*//*1459461216,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["6o9ss"]); }

__d("CommentsPluginSentryAction",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CONFIRM_POST_TO_PROFILE:"confirm_post_to_profile"};},null);
__d("DeveloperCommentsModerationSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={APP:"app",URL:"url"};},null);
__d('MentionResultsPropTypes',['React','SearchableEntry','SelectionState'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i={viewID:h.string.isRequired,selection:h.instanceOf(c('SelectionState')).isRequired,contextComponent:h.object.isRequired,mentionableEntries:h.array.isRequired,highlightedMentionable:h.instanceOf(c('SearchableEntry')),onMentionSelect:h.func.isRequired,onMentionHighlight:h.func.isRequired,onMentionRenderHighlight:h.func.isRequired};f.exports=i;},null);
__d('MentionsLayer.react',['Bootloader','Locale','MentionResultsPropTypes','React','areEqual'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i=false,j=c('Locale').isRTL(),k,l,m,n,o=5,p=c('React').createClass({displayName:'MentionsLayer',propTypes:babelHelpers['extends']({},c('MentionResultsPropTypes'),{typeaheadView:h.func.isRequired,typeaheadViewProps:h.object,autoflip:h.bool,position:h.oneOf(['above','below'])}),getInitialState:function(){return {bootloaded:i};},componentWillMount:function(){if(!this.state.bootloaded)q(function(){this.isMounted()&&this.setState({bootloaded:true});}.bind(this));},_onMentionSelect:function(r,s){s.preventDefault();this.props.onMentionSelect(r,s);},shouldComponentUpdate:function(r,s){return (this.state.bootloaded!==s.bootloaded||!c('areEqual')(this.props.mentionableEntries,r.mentionableEntries)||this.props.highlightedMentionable!==r.highlightedMentionable||this.props.characterOffset!==r.characterOffset);},render:function(){if(!this.state.bootloaded)return null;var r=this.props.mentionableEntries,s=this.props.selection,t=s.isCollapsed()&&s.getHasFocus()&&r&&r.length,u=null,v=this.props.typeaheadViewProps,w=false;if(v&&v.positionAtContext){w=true;}else if(t)u=n(this.props.characterOffset,j);var x={};if(this.props.autoflip){x.ContextualLayerAutoFlip=l;x.ContextualLayerUpdateOnScroll=m;}var y=this.props.typeaheadView;return (c('React').createElement(k,{shown:t,context:this.props.contextComponent,contextBounds:u,containerWidthMatchContext:w,offsetY:o,position:this.props.position||'below',behaviors:x,shouldSetARIAProperties:false},c('React').createElement(y,{id:this.props.viewID,viewProps:this.props.typeaheadViewProps,highlightedEntry:this.props.highlightedMentionable,entries:r||[],onSelect:this._onMentionSelect,onHighlight:this.props.onMentionHighlight,onRenderHighlight:this.props.onMentionRenderHighlight})));}});function q(r){c('Bootloader').loadModules(["ContextualLayer.react","ContextualLayerAutoFlip","ContextualLayerUpdateOnScroll","getMentionableRect"],function(s,t,u,v){k=s;l=t;m=u;n=v;i=true;r();});}f.exports=p;},null);
__d('ActorBio.react',['fbt','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'ActorBio',propTypes:{stats:i.object.isRequired,preferredTypes:i.array.isRequired},renderLink:function(k){return 'url' in k?c('React').createElement('a',babelHelpers['extends']({},this.props,{href:k.url}),k.name):c('React').createElement('span',null,k.name);},renderItem:function(k,l){var m;switch(k){case 'employer':if('position' in l){m=h._("{position} at {employer}",[h.param('position',this.renderLink(l.position)),h.param('employer',this.renderLink(l))]);}else m=h._("Works at {employer}",[h.param('employer',this.renderLink(l))]);break;case 'mutual_friend':m=h._("Friends with {user}",[h.param('user',this.renderLink(l))]);break;default:return this.renderLink(l);}return c('React').createElement('span',null,m);},render:function(){var k=this.props.stats,l=this.props.preferredTypes;for(var m=0;m<l.length;m++)for(var n=0;n<l[m].length;n++){var o=l[m][n];if(o in k)return this.renderItem(o,k[o]);}return c('React').createElement('span',null);}});f.exports=j;},null);
__d('HashtagSpan.react',['cx','React'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'HashtagSpan',render:function(){return (c('React').createElement('span',babelHelpers['extends']({},this.props,{'data-offset-key':this.props.offsetKey,className:"_5u8n",spellCheck:false}),this.props.children));}});f.exports=i;},null);
__d('MentionSpan.react',['cx','React'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'MentionSpan',render:function(){return (c('React').createElement('span',babelHelpers['extends']({},this.props,{'data-offset-key':this.props.offsetKey,className:"_5u8u",spellCheck:false}),this.props.children));}});f.exports=i;},null);
__d('WeakMentionSpan.react',['cx','React'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'WeakMentionSpan',render:function(){return (c('React').createElement('span',{'data-offset-key':this.props.offsetKey,className:"_whq",spellCheck:false},this.props.children));}});f.exports=i;},null);
__d('getHashtagMatches',['getHashtagRegex'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('getHashtagRegex')();function i(j,k){var l=j.getText(),m,n,o,p;while((m=h.exec(l))!==null){n=m.index+m[1].length;o=m[2];p=m[3];k(n,n+o.length+p.length);}}f.exports=i;},null);
__d('getMentionsInputDecorator',['CompositeDraftDecorator','EmoticonSpan.react','HashtagSpan.react','MentionSpan.react','WeakMentionSpan.react','getEntityMatcher','getHashtagMatches'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h;function i(){if(!h)h=new (c('CompositeDraftDecorator'))([{strategy:c('getEntityMatcher')(function(j){var k=j.getData();return j.getType()==='MENTION'&&k&&k.isWeak;}),component:c('WeakMentionSpan.react')},{strategy:c('getEntityMatcher')(function(j){return j.getType()==='MENTION';}),component:c('MentionSpan.react')},{strategy:c('getEntityMatcher')(function(j){return j.getType()==='EMOTICON';}),component:c('EmoticonSpan.react')},{strategy:c('getHashtagMatches'),component:c('HashtagSpan.react')}]);return h;}f.exports=i;},null);
__d('UFIAttachedMediaPreview.react',['cx','fbt','Arbiter','BootloadedComponent.react','CloseButton.react','DOMContainer.react','DOMVector','HTML','Image.react','LoadingIndicator.react','React','ReactDOM','UFIUIEvents','XUISpinner.react','JSResource'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=80,l='ufi_photo_preview_test_id',m=c('React').createClass({displayName:'UFIAttachedMediaPreview',propTypes:{attachedPhoto:j.object,attachedVideo:j.object,attachedSticker:j.object,onRemoveAttachedMediaPreviewClicked:j.func,onRemoveAttachedStickerPreview:j.func,subtitle:j.string,isLoadingPhoto:j.bool,videoFileURL:j.string,videoStatus:j.string,videoProgress:j.number},_height:0,_getScaledDimensions:function(n,o){var p,q,r;if(o>n){r=k/o;p=n*r;q=o*r;}else{r=k/n;p=n*r;q=o*r;}return {height:Math.round(p),width:Math.round(q)};},_checkHeightChange:function(){var n=c('ReactDOM').findDOMNode(this),o=n?c('DOMVector').getElementDimensions(n).y:0;if(o!==this._height){this._height=o;c('Arbiter').inform(c('UFIUIEvents').PhotoPreviewHeightChanged,{node:n});}},componentDidUpdate:function(){if(this.props.monitorHeight)this._checkHeightChange();},render:function(){var n=null,o=this.props.attachedPhoto||this.props.attachedSticker||this.props.attachedVideo;if(o&&this.props.attachedSticker){var p=this._getScaledDimensions(o.metadata.height,o.metadata.width),q=null,r=null;if(window.devicePixelRatio&&window.devicePixelRatio>1){q=o.metadata.sprite_uri_2x;r=o.metadata.source_uri_2x;}else{q=o.metadata.sprite_uri;r=o.metadata.source_uri;}n=c('React').createElement(c('BootloadedComponent.react'),{bootloadPlaceholder:c('React').createElement(c('XUISpinner.react'),null),bootloadLoader:c('JSResource')('Sticker.react'),animationTrigger:'load_and_hover',frameCount:o.metadata.frameCount,frameRate:o.metadata.frameRate,framesPerCol:o.metadata.framesPerCol,framesPerRow:o.metadata.framesPerRow,spriteURI:q,sourceHeight:p.height,sourceURI:r,sourceWidth:p.width});}else if(o&&this.props.attachedPhoto){var s=o.markupPreview;if(s){if(c('HTML').isHTML(s.markup))s=c('HTML').replaceJSONWrapper(s.markup).getRootNode();n=c('React').createElement(c('DOMContainer.react'),{'data-testid':l},s);}else if(this.props.attachedPhoto&&this.props.attachedPhoto.metadata&&this.props.attachedPhoto.metadata.preview_uri)n=c('React').createElement('div',{style:{height:this.props.attachedPhoto.metadata.height}},c('React').createElement(c('Image.react'),{src:this.props.attachedPhoto.metadata.preview_uri}));}else if(this.props.isLoadingPhoto){n=c('React').createElement(c('LoadingIndicator.react'),{color:'white',className:'UFICommentPhotoAttachedPreviewLoadingIndicator',size:'medium'});}else if(this.props.videoStatus==='uploading'||this.props.attachedVideo&&this.props.videoStatus==='encoding'){n=c('React').createElement(c('BootloadedComponent.react'),{bootloadLoader:c('JSResource')('OptimisticVideoComment.react'),bootloadPlaceholder:c('React').createElement('span',null),videoFileURL:this.props.videoFileURL,videoStatus:this.props.videoStatus,progress:this.props.videoProgress});}else if(o&&this.props.attachedVideo)n=c('React').createElement('div',{className:"_3f0q"},c('React').createElement(c('DOMContainer.react'),null,o.markup));var t=null,u=this.props.attachedSticker?this.props.onRemoveAttachedStickerPreview:this.props.onRemoveAttachedMediaPreviewClicked;if(n!=null){var v=null;if(this.props.attachedSticker){v=i._("Remove Sticker");}else if(this.props.attachedPhoto){v=i._("Remove Photo");}else if(this.props.attachedVideo)v=i._("Remove Video");t=c('React').createElement('div',{className:'UFICommentPhotoAttachedPreview pas'},n,c('React').createElement(c('CloseButton.react'),{tooltip:v,onClick:u}));}return t;}});f.exports=m;},null);
__d('AbstractActionList.react',['React','ReactChildren','ReactFragment'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').createElement('span',{role:'presentation','aria-hidden':'true'},' \u00b7 '),i=c('React').createClass({displayName:'AbstractActionList',render:function(){var j=true,k=c('ReactChildren').map(this.props.children,function(l){if(!l)return l;if(j){j=false;return l;}return c('ReactFragment').create({BULLET:h,child:l});});return c('React').createElement('div',this.props,k);}});f.exports=i;},null);
__d('ActionList.react',['AbstractActionList.react','joinClasses','React'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').createClass({displayName:'ActionList',render:function(){return (c('React').createElement(c('AbstractActionList.react'),babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"fsm fwn fcg")}),this.props.children));}});f.exports=h;},null);
__d('AbstractMentionsTextEditor.react',['DraftEditor.react','DraftModifier','EditorState','React','TypeaheadNavigation','clearImmediate','getOrCreateDOMID','setImmediate','uniqueID'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i=5,j=c('React').createClass({displayName:'AbstractMentionsTextEditor',propTypes:{mentionsSource:h.object,mentionCreationFn:h.func.isRequired,mentionResultsComponent:h.func.isRequired,mentionResultsProps:h.object,excludedEntries:h.object,handleContentReturn:h.func,onAddMention:h.func,onShowMentions:h.func,autoHighlight:h.bool,maxResults:h.number},getDefaultProps:function(){return babelHelpers['extends']({},c('DraftEditor.react').defaultProps,{autoHighlight:true,maxResults:i});},componentWillMount:function(){this._viewID=c('uniqueID')();this._searchTimeouts=[];},componentWillUnmount:function(){this._searchTimeouts.forEach(function(l){return c('clearImmediate')(l);});this._searchTimeouts=null;},getInitialState:function(){return {highlightedMentionable:null,ariaActiveDescendantID:null,mentionableEntries:null,characterOffset:0};},_onShowMentions:function(l,m){if(!this.isMounted())return;var n=l&&l.length;if(!n){this.setState({highlightedMentionable:null,activeDescendantID:null,mentionableEntries:null,characterOffset:0});return;}var o=l.slice(0,this.props.maxResults),p=this.props.typeaheadViewProps;if(p&&p.mentionSortFn)o.sort(p.mentionSortFn);var q=null;if(this.props.autoHighlight||this.state.highlightedMentionable!==null)q=l[0];this.setState({highlightedMentionable:q,mentionableEntries:o,characterOffset:m});if(this.props.onShowMentions)this.props.onShowMentions(o,m);},_onBlur:function(l){this.setState(this.getInitialState());this.props.onBlur&&this.props.onBlur(l);},_onFocus:function(l){this.props.mentionsSource&&this.props.mentionsSource.bootstrap();this.props.onFocus&&this.props.onFocus(l);},_handleReturn:function(l){if(this.state.highlightedMentionable){this._onMentionSelect(this.state.highlightedMentionable,l);return true;}else if(this.props.handleContentReturn&&this.props.handleContentReturn(l))return true;return false;},_onTab:function(l){if(this.state.highlightedMentionable){l.preventDefault();this._onMentionSelect(this.state.highlightedMentionable,l);}else if(this.props.onTab)this.props.onTab(l);},_onEscape:function(l){if(this.props.onEscape)this.props.onEscape(l);if(this.state.mentionableEntries){l.stopPropagation();this.setState(this.getInitialState());}},_onUpArrow:function(l){if(this.state.mentionableEntries){l.preventDefault();c('TypeaheadNavigation').moveUp(this.state.mentionableEntries,this.state.highlightedMentionable,this._onMentionHighlight);}else this.props.onUpArrow&&this.props.onUpArrow(l);},_onDownArrow:function(l){if(this.state.mentionableEntries){l.preventDefault();c('TypeaheadNavigation').moveDown(this.state.mentionableEntries,this.state.highlightedMentionable,this._onMentionHighlight);}else this.props.onDownArrow&&this.props.onDownArrow(l);},_onMentionHighlight:function(l){this.setState({highlightedMentionable:l});},_onMentionRenderHighlight:function(l){var m=c('getOrCreateDOMID')(l);this.setState({ariaActiveDescendantID:m});},_onMentionSelect:function(l,m){var n=this.props.editorState,o=n.getSelection(),p=n.getCurrentContent(),q=o.getAnchorKey(),r=o.getAnchorOffset(),s=p.getBlockMap().get(q),t=r-k(s.getText().substr(0,r),l.getTitle(),this.state.characterOffset),u=c('DraftModifier').replaceText(p,o.set('anchorOffset',t),l.getTitle(),n.getCurrentInlineStyle(),this.props.mentionCreationFn(l)),v=c('EditorState').push(n,u,'insert-fragment');this.props.onChange(v);this.setState(this.getInitialState());if(this.props.onAddMention){var w=this.state.mentionableEntries.indexOf(l);this.props.onAddMention(l,w,m);}},shouldComponentUpdate:function(l,m){return (this.props.editorState!==l.editorState||this.props.placeholder!==l.placeholder||this.props.readOnly!==l.readOnly||this.state.mentionableEntries!==m.mentionableEntries||this.state.highlightedMentionable!==m.highlightedMentionable||this.state.ariaActiveDescendantID!==m.ariaActiveDescendantID);},componentDidUpdate:function(l){var m=this.props.editorState;if(m===l.editorState)return;var n=m.getSelection();if(n.getHasFocus()&&n.isCollapsed()){var o=m.getCurrentContent();if(this.props.mentionsSource)this._searchTimeouts.push(c('setImmediate')(function(){this.props.mentionsSource.search(o,n,this._onShowMentions);}.bind(this)));}},blur:function(){this.refs.abstractTextEditor.blur();},focus:function(){this.refs.abstractTextEditor.focus();},_renderMentionables:function(){var l=this.state.mentionableEntries;if(!l||!l.length)return null;var m=this.props.mentionResultsComponent;return (c('React').createElement(m,babelHelpers['extends']({},this.props.mentionResultsProps,{viewID:this._viewID,selection:this.props.editorState.getSelection(),contextComponent:this,characterOffset:this.state.characterOffset,mentionableEntries:l||[],highlightedMentionable:this.state.highlightedMentionable,onMentionSelect:this._onMentionSelect,onMentionHighlight:this._onMentionHighlight,onMentionRenderHighlight:this._onMentionRenderHighlight})));},render:function(){var l=this.state.mentionableEntries,m=!!(l&&l.length),n=this.props.readOnly?null:'-2';return (c('React').createElement('div',{ref:'container',className:this.props.className,tabIndex:n},c('React').createElement(c('DraftEditor.react'),babelHelpers['extends']({},this.props,{ref:'abstractTextEditor',role:'combobox',ariaActiveDescendantID:this.state.ariaActiveDescendantID,ariaAutoComplete:'list',ariaOwneeID:this._viewID,ariaExpanded:m,ariaHasPopup:m,onBlur:this._onBlur,onFocus:this._onFocus,onTab:this._onTab,onEscape:this._onEscape,onDownArrow:this._onDownArrow,onUpArrow:this._onUpArrow,handleReturn:this._handleReturn})),this._renderMentionables()));}});function k(l,m,n){for(var o=n;o<=m.length;o++)if(l.substr(-o)==m.substr(0,o))n=o;return n;}f.exports=j;},null);
__d('createMentionEntity',['DraftEntity'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){var j=i.getType().toLowerCase();if(j==='hashtag')return c('DraftEntity').create('HASHTAG','IMMUTABLE');var k=j==='user'||j==='fb4c'?'SEGMENTED':'IMMUTABLE',l=i.getAuxiliaryData();return c('DraftEntity').create('MENTION',k,{id:i.getUniqueID(),isWeak:l&&l.renderType==='non_member',type:j});}f.exports=h;},null);
__d('MentionsInput.react',['cx','AbstractMentionsTextEditor.react','EditorState','MentionsLayer.react','React','createMentionEntity','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MentionsInput',propTypes:{editorState:i.instanceOf(c('EditorState')).isRequired,mentionsSource:i.object,typeaheadView:i.func.isRequired,typeaheadViewPropTypes:i.object,spellCheck:i.bool,placeholder:i.string,className:i.string,autoflip:i.bool,position:i.oneOf(['above','below']),handleContentReturn:i.func,handleDroppedFiles:i.func,handlePastedFiles:i.func,onAddMention:i.func,onShowMentions:i.func,onChange:i.func,onInputFocus:i.func,onInputBlur:i.func},blur:function(){this.refs.textEditor.blur();},focus:function(){clearTimeout(this._focusTimer);this._focusTimer=setTimeout(function(){this.refs.textEditor.focus();}.bind(this),0);},componentWillUnmount:function(){clearTimeout(this._focusTimer);},render:function(){var k=c('joinClasses')(this.props.className,"_5yk1");return (c('React').createElement('div',{className:k,onClick:this.focus,onFocus:this.focus},c('React').createElement(c('AbstractMentionsTextEditor.react'),babelHelpers['extends']({},this.props,{mentionResultsComponent:c('MentionsLayer.react'),mentionResultsProps:{typeaheadView:this.props.typeaheadView,typeaheadViewProps:this.props.typeaheadViewProps,autoflip:this.props.autoflip,position:this.props.position},mentionCreationFn:c('createMentionEntity'),ref:'textEditor',className:"_5yk2",stripPastedStyles:true}))));}});f.exports=j;},null);
__d('DevxFluxDispatcher',['Dispatcher_DEPRECATED'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Dispatcher_DEPRECATED'));i=h&&h.prototype;j.prototype.handleServerAction=function(k){this.$DevxFluxDispatcher1('serverAction',k);};j.prototype.handleViewAction=function(k){this.$DevxFluxDispatcher1('viewAction',k);};j.prototype.$DevxFluxDispatcher1=function(k,l){this.dispatch(babelHelpers['extends']({source:k},l));};function j(){h.apply(this,arguments);}f.exports=new j();},null);
__d('DevxProxyActions',['DevxFluxDispatcher'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){Object.keys(i.ActionHandler).forEach(function(j){this[j]=function(){for(var k=arguments.length,l=Array(k),m=0;m<k;m++)l[m]=arguments[m];c('DevxFluxDispatcher').handleViewAction({action:j,args:l});};}.bind(this));}f.exports=h;},null);
__d('createPlainBlocksFromText',['CharacterMetadata','ContentBlock','immutable','generateRandomKey','sanitizeDraftText'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('immutable').List,i=c('immutable').Repeat,j=c('CharacterMetadata').EMPTY;function k(l){return l.map(function(m){m=c('sanitizeDraftText')(m);var n=m.length;return new (c('ContentBlock'))({key:c('generateRandomKey')(),text:m,type:'unstyled',characterList:h(i(j,n))});});}f.exports=k;},null);
__d('createEditorStateWithEntities',['ContentState','EditorState','applyEntityToContentBlock','createPlainBlocksFromText','splitTextIntoTextBlocks'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){var j=i.text,k=i.ranges,l=i.decorator,m=i.entityCreationFn,n=i.splitIntoBlocks,o=i.allowUndo,p,q;if(n===undefined)n=true;if(j){p=n?c('splitTextIntoTextBlocks')(j):[j];q=[];var r=0;p.forEach(function(u){q.push(r);r+=u.length+1;});}else p=[''];var s=c('createPlainBlocksFromText')(p);if(k&&k.length&&m)k.forEach(function(u){var v=m(u.entity);if(v===null)return;var w=u.offset,x,y;for(var z=0;z<q.length;z++){var aa=q[z],ba=q[z+1];if(ba===undefined||w>=aa&&w<ba){x=s[z];y=w-aa;break;}}s[z]=c('applyEntityToContentBlock')(x,y,y+u.length,v);});var t=c('EditorState').createWithContent(c('ContentState').createFromBlockArray(s),l);if(o===false)t=c('EditorState').set(t,{allowUndo:false});return t;}f.exports=h;},null);
__d('DocumentMentionsRegex',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h='\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\\/!%\'"~=<>_:;',i='\\b[A-Z][^\\s'+h+']',j={PUNCTUATION:h,NAME:i};f.exports=j;},null);
__d('AtSignMentionsStrategy',['DocumentMentionsRegex'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('DocumentMentionsRegex').PUNCTUATION,i=['@','\\uff20'].join(''),j='[^'+i+h+'\\s]',k='(?:'+'\\.[ |$]|'+' |'+'['+h+']|'+')',l=new RegExp('(?:^|\\s|\\()('+'['+i+']'+'((?:'+j+k+'){0,20})'+')$'),m={name:'AtSignMentionsStrategy',findMentionableString:function(n){var o=l.exec(n);if(o!==null){var p=o[2];if(p.length)return {matchingString:p,leadOffset:o[1].length};}return null;}};f.exports=m;},null);
__d('CapitalizedNameMentionsStrategy',['DocumentMentionsRegex'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=1,i=new RegExp('(^|[^#])((?:'+c('DocumentMentionsRegex').NAME+'{'+h+',})$)'),j={name:'CapitalizedNameMentionsStrategy',findMentionableString:function(k){var l=i.exec(k);if(l!==null)return {matchingString:l[2],leadOffset:l[2].length};return null;}};f.exports=j;},null);
__d('DocumentCompositeMentionsSource',['invariant','emptyFunction','nullthrows'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(k,l){var m=k.getCharacterList().toSeq().slice(0,l).reverse().takeWhile(function(n){return n.getEntity()===null;}).count();return k.getText().slice(l-m,l);}function j(k){!(k.length>0)?h(0):void 0;this.$DocumentCompositeMentionsSource1=k;this.$DocumentCompositeMentionsSource2=false;this.$DocumentCompositeMentionsSource3=null;}j.prototype.bootstrap=function(k){if(this.$DocumentCompositeMentionsSource2)return;this.$DocumentCompositeMentionsSource2=true;k=k||c('emptyFunction');var l=this.$DocumentCompositeMentionsSource1.length;function m(){l--;if(!l)k&&k();}this.$DocumentCompositeMentionsSource1.forEach(function(n){n.bootstrap(m);});};j.prototype.search=function(k,l,m){var n=l.getAnchorKey(),o=k.getBlockForKey(n);this.$DocumentCompositeMentionsSource4(i(o,l.getAnchorOffset()),m);};j.prototype.$DocumentCompositeMentionsSource4=function(k,l){var m=this.$DocumentCompositeMentionsSource1.length,n,o;for(var p=0;p<m;p++){n=this.$DocumentCompositeMentionsSource1[p];o=n.findMatch(k);if(o===null){continue;}else{var q=c('nullthrows')(o).matchingString;this.$DocumentCompositeMentionsSource3=q;n.search(q,function(r,s){if(this.$DocumentCompositeMentionsSource3===s)l(r,o.leadOffset);}.bind(this));return;}}this.$DocumentCompositeMentionsSource3=null;l(null,null);};f.exports=j;},null);
__d('DocumentMentionsSource',['invariant'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j,k){!(typeof j.findMentionableString==='function')?h(0):void 0;this.$DocumentMentionsSource1=j;this.$DocumentMentionsSource2=k;this.$DocumentMentionsSource3=false;}i.prototype.findMatch=function(j){return this.$DocumentMentionsSource1.findMentionableString(j);};i.prototype.bootstrap=function(j){if(!this.$DocumentMentionsSource3){this.$DocumentMentionsSource3=true;this.$DocumentMentionsSource2.bootstrap(j);}};i.prototype.search=function(j,k){this.$DocumentMentionsSource2.search(j,k,{strategyName:this.$DocumentMentionsSource1.name});};f.exports=i;},null);
__d('FilteredSearchSource',['AbstractSearchSource'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('AbstractSearchSource'));i=h&&h.prototype;function j(k,l){'use strict';i.constructor.call(this);this.$FilteredSearchSource1=k;this.$FilteredSearchSource2=l;}j.prototype.bootstrapImpl=function(k){'use strict';this.$FilteredSearchSource2.bootstrap(k);};j.prototype.searchImpl=function(k,l,m){'use strict';var n=function(o,p){o=this.$FilteredSearchSource3(o,p);l(o,p);}.bind(this);this.$FilteredSearchSource2.search(k,n,m);};j.prototype.$FilteredSearchSource3=function(k,l){'use strict';var m=this.$FilteredSearchSource1;return k.filter(function(n){return m(n,l);});};f.exports=j;},null);
__d('filterCapitalizedNames',['TokenizeUtil'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(l,m){return i(l)&&(m.length>=5||j(l,m));}function i(l){var m=l.getAuxiliaryData()||k;return !m.disableAutosuggest&&!!(l.getType()==='user'||m.connectedPage);}function j(l,m){return c('TokenizeUtil').isExactMatch(m,l.getTitle());}var k={};f.exports=h;},null);
__d("XPluginCommentsBanAuthorAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/moderate\/ban\/{comment_id}\/",{comment_id:{type:"String",required:true}});},null);
__d("XPluginCommentsCreateCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/createComment\/{target_id}\/",{target_id:{type:"Int",required:true}});},null);
__d("XPluginCommentsCreateReplyAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/createReply\/{parent_comment_id}\/",{parent_comment_id:{type:"String",required:true}});},null);
__d("XPluginCommentsDeleteCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/delete\/",{});},null);
__d("XPluginCommentsEditCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/edit\/",{});},null);
__d("XPluginCommentsFlagCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/flag\/",{});},null);
__d("XPluginCommentsHideCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/moderate\/hide\/{url_id}\/",{url_id:{type:"Int",required:true},action:{type:"Enum",required:true,enumType:1},type:{type:"Enum",required:true,enumType:1}});},null);
__d("XPluginCommentsLikeCommentAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/like\/",{action_like:{type:"Bool",defaultValue:false}});},null);
__d("XPluginCommentsPagerAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/{target_id}\/pager\/{ordering}\/",{target_id:{type:"Int",required:true},ordering:{type:"Enum",required:true,enumType:1}});},null);
__d("XPluginCommentsRepliesPagerAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/async\/comment\/{comment_id}\/pager\/",{comment_id:{type:"String",required:true}});},null);
__d('CommentsPluginStore',['invariant','AsyncRequest','XPluginCommentsBanAuthorAsyncController','XPluginCommentsCreateCommentAsyncController','XPluginCommentsCreateReplyAsyncController','XPluginCommentsDeleteCommentAsyncController','DeveloperCommentsModerationAction','DeveloperCommentsModerationSource','DeveloperCommentsModerationType','DevxFluxDispatcher','XPluginCommentsEditCommentAsyncController','XCommentEmbedPluginEmbedAsyncDialogController','XPluginCommentsFlagCommentAsyncController','XPluginCommentsLikeCommentAsyncController','XPluginCommentsHideCommentAsyncController','PluginOptin','XPluginCommentsPagerAsyncController','XPluginCommentsRepliesPagerAsyncController','UnverifiedXD','URI','WebStorage','getMentionsTextForContentState','getVisibleValueForContentState','mixInEventEmitter','nullthrows','uniqueID'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=10,j='__DEVX__',k={visibleValue:'',encodedValue:''},l={change:true,composerChange:true,composerCommentAdded:true,login:true,moreCommentsCompleted:true,moreRepliesCompleted:true,postError:true,sortingCompleted:true,sentryAction:true,previousComposerCommentPrefill:true,actorChange:true,previousPostToFeedPrefill:true,commentsCountChange:true},m={maxLines:10,maxLength:1000},n=[],o={},p={userID:null,actors:{},actorsOptIn:{},appID:null,afterCursor:null,channelURL:null,composerSearchSource:{},deeplinkedCommentID:null,href:'',iframeReferer:null,isMobile:false,isModerator:false,mirroredPage:null,moderateURL:null,targetFBID:null,totalCount:0,user:{},minFeedLength:0,maxCommentLength:0,enablePhoto:false,enableSticker:false,ret:null,threadClosed:false,shouldSwitchAccount:false,fromModTool:false},q=false,r={},s={},t={},u={},v={ordering:null,ranking_allowed:null},w={},x={},y={setPostToFeed:true,sort:true,showMoreComments:true,showMoreReplies:true,toggleVisibility:true},z={restorePreviousState:true,setUser:true,edit:true,showReplyComposer:true,cancelEdit:true,cancelReply:true},aa={addComment:true,addReply:true,saveEdit:true};function ba(ja){!ia.hasOwnProperty(ja)?h(0):void 0;}function ca(){!Array.isArray(n)?h(0):void 0;!(o instanceof Object)?h(0):void 0;}function da(ja){var ka,la=ha.getUser().id,ma=ja.action,na=(ka=ia[ja.action]).bind.apply(ka,[ia].concat(ja.args));if(ha.isLoggedIn()&&(ha.isPlatformEnabled(la)||z[ma])||y[ma]){na.call();}else{var oa=c('WebStorage').getSessionStorage();if(oa)oa.setItem('previousState',JSON.stringify(ea(ja)));new (c('PluginOptin'))('comments').addReturnParams({numposts:Math.min(Math.max(1,p.totalCount),100),order_by:v.ordering}).start();}}function ea(ja){var ka='',la='',ma=[],na={},oa={},pa=q,qa=ha.getCreateComposerContent();if(qa)ka=qa.encodedValue;if(!aa[ja.action]){la=ja.action;ma=ja.args;}Object.keys(w).forEach(function(ra){var sa=ha.getCreateComposerContent(ra);if(sa.encodedValue)na[ra]=sa.encodedValue;});Object.keys(x).forEach(function(ra){var sa=ha.getEditComposerContent(ra);if(sa.encodedValue)oa[ra]=sa.encodedValue;});return {commentBody:ka,action:la,commentIDs:ma,replies:na,edits:oa,postToFeed:pa};}function fa(ja,ka,la){return la.indexOf(ja)===ka;}function ga(event,ja){if(!p.channelURL)return;ja.href=p.href;c('UnverifiedXD').send({data:JSON.stringify(ja),event:event,type:'sdk_event'},p.channelURL);}var ha={LOGGED_OUT_USER:'0',getCommentIDs:function(){return n;},getByID:function(ja){ca();return c('nullthrows')(o)[ja];},isOptimisticComment:function(ja){return ja.id.startsWith(j);},getCurrentSorting:function(){return c('nullthrows')(v.ordering);},isRankingAllowed:function(){return c('nullthrows')(v.ranking_allowed);},getTargetFBID:function(){return c('nullthrows')(p.targetFBID);},getCommentsCount:function(){ca();return p.totalCount;},updateCommentsCount:function(ja){p.totalCount+=ja;this.emit('commentsCountChange');},getUser:function(){return p.user;},getIframeReferer:function(){return p.iframeReferer;},getAuthor:function(ja){return this.getByID(this.getByID(ja).authorID);},getPageSize:function(){return i;},getCommentBodyTruncationLimits:function(){return m;},getComposerSearchSource:function(){return p.composerSearchSource;},getMirroredPage:function(){return p.mirroredPage;},getMinFeedLength:function(){return p.minFeedLength+1;},getMaxCommentLength:function(){return p.maxCommentLength?p.maxCommentLength:Number.MAX_VALUE;},isMirrored:function(){return this.getMirroredPage()!=null;},isReply:function(ja){var ka=this.getByID(ja);return ka.targetID!==this.getTargetFBID();},getPermalink:function(ja){var ka=this.getByID(ja);return new (c('URI'))(ka.ogURL).setQueryData({fb_comment_id:ja}).toString();},isOptinReturn:function(){return !!p.ret;},setActor:function(ja){p.user=p.actors[ja];},getPostToFeed:function(){return q;},setPostToFeed:function(ja){q=ja;},getEnablePhoto:function(){return p.enablePhoto;},getEnableSticker:function(){return p.enableSticker;},isDeeplinkComment:function(){return !!p.deeplinkedCommentID&&p.fromModTool;},getOriginalLink:function(){return p.href;},getCreateComposerAttachment:function(ja){return r[ja||j]||null;},setCreateComposerAttachment:function(ja,ka){r[ka||j]=ja;this.emit('composerChange');},getEditComposerAttachment:function(ja){return s[ja]||null;},setEditComposerAttachment:function(ja,ka){s[ka]=ja;this.emit('composerChange');},getLoadingCreateComposerAttachment:function(ja){return t[ja||j]||false;},setLoadingCreateComposerAttachment:function(ja,ka){t[ka||j]=ja;this.emit('composerChange');},getLoadingEditComposerAttachment:function(ja){return u[ja]||false;},setLoadingEditComposerAttachment:function(ja,ka){u[ka]=ja;this.emit('composerChange');},setCreateComposerState:function(ja,ka){w[ka||j]=ja;this.emit('composerChange');},getCreateComposerState:function(ja){return w[ja||j]||null;},getCreateComposerContent:function(ja){return this._editorStateToComposerPayload(this.getCreateComposerState(ja));},isEmptyCreateComposer:function(ja){return this.getLoadingCreateComposerAttachment(ja)||this.getCreateComposerContent(ja).visibleValue.trim()===''&&!this.getCreateComposerAttachment(ja);},setEditComposerState:function(ja,ka){x[ka]=ja;this.emit('composerChange');},getEditComposerState:function(ja){return x[ja];},getEditComposerContent:function(ja){return this._editorStateToComposerPayload(this.getEditComposerState(ja));},isEmptyEditComposer:function(ja){return this.getLoadingEditComposerAttachment(ja)||this.getEditComposerContent(ja).visibleValue.trim()===''&&!this.getEditComposerAttachment(ja);},hasTextChanged:function(ja,ka){return ja.trim()!==ka.trim();},hasAttachmentChanged:function(ja,ka){if(ja){return ka?ja.fbid!==ka.fbid:true;}else return !!ka;},hasCommentChanged:function(ja,ka){var la=this.getByID(ja);return this.hasTextChanged(ka.encodedValue,la.body.text)||this.hasAttachmentChanged(s[ja],la.photo_comment||la.attachment);},_editorStateToComposerPayload:function(ja){if(!ja)return k;var ka=ja.getCurrentContent(),la=c('getVisibleValueForContentState')(ka),ma=c('getMentionsTextForContentState')(ka);return {visibleValue:la,encodedValue:ma};},hasAttachment:function(){var ja=Object.keys(t);for(var ka=0;ka<ja.length;ka++)if(t[ja[ka]]||r[ja[ka]])return true;return false;},getActorIDs:function(){return Object.keys(p.actors);},getModerateURL:function(){return p.moderateURL;},isLoggedIn:function(){return p.user.id!==ha.LOGGED_OUT_USER;},isPlatformEnabled:function(ja){return p.actorsOptIn[ja];},isMobile:function(){return p.isMobile;},useLegacyMentionsInput:function(){return this.isMobile()||!this.isLoggedIn();},useCustomActorSelector:function(){return this.isMobile()||document.body.offsetWidth<450;},isViewerModerator:function(){return p.isModerator;},isThreadClosed:function(){return p.threadClosed;},shouldSwitchAccount:function(){return p.shouldSwitchAccount;},hasUnloadedComments:function(){return !!p.afterCursor;},hasUnloadedReplies:function(ja){var ka=this.getByID(ja).public_replies;if(!ka)return false;if(ka.afterCursor)return true;if((!ka.commentIDs||ka.commentIDs.length===0)&&ka.totalCount>0)return true;return false;},getUnloadedCommentsCount:function(){return p.totalCount-n.length;},getDialogWidth:function(){return Math.min(document.body.offsetWidth-10,this.isMobile()?320:445);},dispatcherIndex:c('DevxFluxDispatcher').register(function(ja){ba(ja.action);da(ja);}),init:function(ja,ka,la,ma){p=ka;this.updateCommentData(ja,la);Object.keys(p.actors).forEach(function(na){return o[na]=p.actors[na];});this.setActor(p.userID);v.ranking_allowed=ma;},updateCommentData:function(ja,ka){n=ja.commentIDs;Object.assign(o,this.initComments(n,ja.idMap));v.ordering=ka;},initComment:function(ja){ja.collapsed=false;ja.editor=false;ja.composer=false;ja.deleted=false;ja.flagged=false;return ja;},initComments:function(ja,ka){ja.forEach(function(la){return ka[la]=this.initComment(ka[la]);}.bind(this));return ka;},emit:undefined,addListener:undefined,removeCurrentListener:undefined,ActionHandler:undefined};c('mixInEventEmitter')(ha,l);var ia={ban:function(ja){var ka=ha.getByID(ja);ka.deleted=true;ha.emit('change');var la=c('XPluginCommentsBanAuthorAsyncController').getURIBuilder().setString('comment_id',ja).getURI();new (c('AsyncRequest'))(la).setMethod('POST').setData({ban:true,source:c('DeveloperCommentsModerationSource').URL}).send();},hide:function(ja){var ka=ha.getByID(ja);ka.deleted=true;ha.emit('change');var la=c('XPluginCommentsHideCommentAsyncController').getURIBuilder().setInt('url_id',p.targetFBID).setEnum('action',c('DeveloperCommentsModerationAction').DELETE).setEnum('type',c('DeveloperCommentsModerationType').APPROVED).getURI();new (c('AsyncRequest'))(la).setData({comment_ids:[ja]}).setMethod('POST').send();},addComment:function(){var ja=ha.getCreateComposerContent(),ka=this._getAttachmentFBID(ha.getCreateComposerAttachment()),la=c('XPluginCommentsCreateCommentAsyncController').getURIBuilder().setInt('target_id',p.targetFBID).getURI();new (c('AsyncRequest'))(la).setData({app_id:p.appID,av:ha.getUser().id,text:ja.encodedValue,attached_photo_fbid:ka.photoFBID,attached_sticker_fbid:ka.stickerFBID,post_to_feed:ha.getPostToFeed(),iframe_referer:p.iframeReferer}).setMethod('POST').setHandler(function(ma){var na=ma.payload,oa=na.commentID;this._prependComment(na.idMap[oa]);delete w[j];ha.emit('composerCommentAdded',{});ga('comment.create',{commentID:oa,message:ja.visibleValue});if(na.sentryAction)ha.emit('sentryAction',na.sentryAction,oa);}.bind(this)).setErrorHandler(function(ma){delete o[j];n.shift();ha.updateCommentsCount(-1);ha.emit('change');ha.emit('postError',ma);}).send();this._prependComment({authorID:p.user.id,targetID:p.targetFBID,body:{text:ja.visibleValue}});ha.updateCommentsCount(1);},addReply:function(ja){var ka=ha.getCreateComposerContent(ja),la=this._getAttachmentFBID(ha.getCreateComposerAttachment(ja)),ma=c('XPluginCommentsCreateReplyAsyncController').getURIBuilder().setString('parent_comment_id',ja).getURI(),na=j+c('uniqueID')();new (c('AsyncRequest'))(ma).setData({app_id:p.appID,av:ha.getUser().id,text:ka.encodedValue,attached_photo_fbid:la.photoFBID,attached_sticker_fbid:la.stickerFBID,iframe_referer:p.iframeReferer,replied_to:ha.getByID(ja).replyToCommentID}).setMethod('POST').setHandler(function(qa){var ra=ha.getByID(ja),sa=Object.assign({},ra.public_replies);Object.assign(o,qa.payload.idMap);ra=ha.getByID(ja);ra.public_replies=sa;delete o[na];delete w[ja];n.splice(n.indexOf(na),1);ra.composer=false;delete ra.replyToCommentID;ra.public_replies.commentIDs.pop();ra.public_replies.commentIDs.push(qa.payload.commentID);ga('comment.create',{commentID:qa.payload.commentID,parentCommentID:ja,message:ka.visibleValue});ha.emit('change');}).setErrorHandler(function(qa){delete o[na];n.splice(n.indexOf(na),1);oa=ha.getByID(ja);oa.public_replies.commentIDs.pop();oa.public_replies.totalCount--;oa.composer=false;delete oa.replyToCommentID;ha.emit('change');ha.emit('postError',qa);}).send();var oa=ha.getByID(ja),pa=Object.assign({},oa.public_replies);if(!pa.commentIDs)pa.commentIDs=[];if(!pa.totalCount)pa.totalCount=0;pa.totalCount++;pa.commentIDs.push(na);oa.public_replies=pa;o[na]={authorID:p.user.id,body:{text:ka.visibleValue},targetID:ja,id:na};n.push(na);ha.emit('change');},_prependComment:function(ja){if(!ja.id){ja.id=j;}else{n.shift();delete o[j];}n.unshift(ja.id);o[ja.id]=ha.initComment(ja);ha.emit('change');},_getAttachmentFBID:function(ja){var ka=0,la=0;if(ja)if(ja.attachmentType==='photo'){ka=c('nullthrows')(ja.fbid);}else if(ja.attachmentType==='sticker')la=c('nullthrows')(ja.fbid);return {photoFBID:ka,stickerFBID:la};},edit:function(ja,ka){var la=ha.getByID(ja);la.editor=true;la.prefillText=ka;ha.emit('change');},saveEdit:function(ja){var ka=JSON.parse(JSON.stringify(ha.getByID(ja))),la=c('XPluginCommentsEditCommentAsyncController').getURIBuilder().getURI(),ma=ha.getEditComposerContent(ja),na=this._getAttachmentFBID(ha.getEditComposerAttachment(ja)),oa=ha.hasCommentChanged(ja,ma);if(oa){new (c('AsyncRequest'))(la).setMethod('POST').setData({app_id:p.appID,text:ma.encodedValue,comment_id:ja,av:ha.getAuthor(ja).id,attached_photo_fbid:na.photoFBID,attached_sticker_fbid:na.stickerFBID,iframe_referer:p.iframeReferer}).setHandler(function(qa){var ra=qa.payload;o[ra.commentID]=ha.initComment(ra.idMap[ra.commentID]);delete x[ja];ha.emit('change');}).setErrorHandler(function(qa){ka.editor=false;Object.assign(ha.getByID(ja),ka);ha.emit('change');ha.emit('postError',qa);}).send();var pa=ha.getByID(ja);pa.editor=false;pa.body.text=ma.visibleValue;if(na.photoFBID===0)delete pa.photo_comment;if(na.stickerFBID===0)delete pa.attachment;delete pa.ranges;ha.emit('change');}else this.cancelEdit(ja);},cancelEdit:function(ja){var ka=ha.getByID(ja);ka.editor=false;ha.emit('change');},'delete':function(ja){var ka=ha.getByID(ja);ka.deleted=true;var la=c('XPluginCommentsDeleteCommentAsyncController').getURIBuilder().getURI();new (c('AsyncRequest'))(la).setData({app_id:p.appID,comment_id:ja,av:ha.getAuthor(ja).id,iframe_referer:p.iframeReferer}).setMethod('POST').setHandler(function(){return (ga('comment.remove',{commentID:ja}));}).setErrorHandler(function(ma){var na=ha.getByID(ja);na.deleted=false;ha.updateCommentsCount(1);ha.emit('change');}).send();ha.updateCommentsCount(-1);ha.emit('change');},like:function(ja){var ka=ha.getByID(ja),la=c('XPluginCommentsLikeCommentAsyncController').getURIBuilder().setBool('action_like',!ka.hasLiked).getURI();new (c('AsyncRequest'))(la).setData({app_id:p.appID,comment_id:ka.id,iframe_referer:p.iframeReferer}).setMethod('POST').setHandler(function(ma){var na=ma.payload;Object.assign(o[na.commentID],ha.initComment(na.idMap[na.commentID]));ha.emit('change');}).setErrorHandler(function(ma){ka.likeCount--;ka.hasLiked=false;ha.emit('postError',ma);}).send();ka.hasLiked=!ka.hasLiked;if(ka.hasLiked){ka.likeCount++;}else if(ka.likeCount>0)ka.likeCount--;o[ka.id]=ka;ha.emit('change');},sort:function(ja){var ka=c('XPluginCommentsPagerAsyncController').getURIBuilder().setInt('target_id',p.targetFBID).setEnum('ordering',ja).getURI();new (c('AsyncRequest'))(ka).setMethod('POST').setData({app_id:p.appID,limit:ha.getPageSize(),iframe_referer:p.iframeReferer}).setHandler(function(la){var ma=la.payload;p.afterCursor=ma.afterCursor;ha.updateCommentData(ma,ja);ha.emit('sortingCompleted');ha.emit('change');}).send();},showMoreComments:function(){var ja=c('XPluginCommentsPagerAsyncController').getURIBuilder().setInt('target_id',p.targetFBID).setEnum('ordering',ha.getCurrentSorting()).getURI();new (c('AsyncRequest'))(ja).setMethod('POST').setData({app_id:p.appID,after_cursor:p.afterCursor,limit:ha.getPageSize(),deeplinked_comment_id:p.deeplinkedCommentID,iframe_referer:p.iframeReferer}).setHandler(function(ka){var la=ka.payload;p.afterCursor=la.afterCursor;n=n.concat(la.commentIDs).filter(fa);Object.assign(o,ha.initComments(la.commentIDs,la.idMap));ha.emit('moreCommentsCompleted');ha.emit('change');}).setErrorHandler(function(ka){ha.emit('postError',ka);ha.emit('moreCommentsCompleted');}).send();},setUser:function(ja){ha.setActor(ja);ha.emit('actorChange');},setPostToFeed:function(ja){ha.setPostToFeed(ja);},showMoreReplies:function(ja){var ka=c('XPluginCommentsRepliesPagerAsyncController').getURIBuilder().setString('comment_id',ja).getURI(),la=ha.getByID(ja).public_replies;new (c('AsyncRequest'))(ka).setMethod('POST').setData({app_id:p.appID,after_cursor:la.afterCursor,limit:ha.getPageSize(),iframe_referer:p.iframeReferer}).setHandler(function(ma){var na=ma.payload;o=Object.assign(ha.initComments(na.commentIDs,na.idMap),o);la.afterCursor=na.afterCursor;la.commentIDs=la.commentIDs.concat(na.commentIDs).filter(fa);ha.emit('moreRepliesCompleted',{commentID:ja});ha.emit('change');}).setErrorHandler(function(ma){ha.emit('postError',ma);ha.emit('moreRepliesCompleted',{commentID:ja});}).send();},toggleVisibility:function(ja){var ka=ha.getByID(ja);ka.collapsed=!ka.collapsed;ha.emit('change');},flag:function(ja){o[ja].flagged=true;this._sendFlagOrUnflagRequest(ja,'flag');ha.emit('change');},unflag:function(ja){o[ja].flagged=false;this._sendFlagOrUnflagRequest(ja,'unflag');ha.emit('change');},_sendFlagOrUnflagRequest:function(ja,ka){var la=c('XPluginCommentsFlagCommentAsyncController').getURIBuilder().getURI();new (c('AsyncRequest'))(la).setData({app_id:p.appID,comment_id:ja,iframe_referer:p.iframeReferer,unflag:ka==='unflag'}).setMethod('POST').setErrorHandler(function(ma){o[ja].flagged=!o[ja].flagged;ha.emit('postError',ma);}).send();},report:function(ja){window.open(ha.getByID(ja).reportURI,'_blank');},showReplyComposer:function(ja,ka){var la=ha.getByID(ja);if(ha.isReply(ja)){var ma=ja;la=ha.getByID(la.targetID);la.replyToCommentID=ma;}la.prefillText=ka;la.composer=true;ha.emit('change');},cancelReply:function(ja){var ka=ha.getByID(ja);ka.composer=false;delete ka.replyToCommentID;ha.emit('change');},restorePreviousState:function(){var ja=c('WebStorage').getSessionStorage();if(ja){var ka=JSON.parse(ja.getItem('previousState'));ja.clear();var la=ha.getCommentIDs();if(ka.action){var ma={};ma.action=ka.action;ma.args=ka.commentIDs;da(ma);}var na=ka.replies,oa=ka.edits;la.map(function(pa){if(na[pa])this.showReplyComposer(pa,na[pa]);if(oa[pa])this.edit(pa,oa[pa]);}.bind(this));if(ka.commentBody)ha.emit('previousComposerCommentPrefill',{prefillText:ka.commentBody});if(ka.postToFeed){this.setPostToFeed(ka.postToFeed);ha.emit('previousPostToFeedPrefill');}}},embed:function(ja){var ka=c('XCommentEmbedPluginEmbedAsyncDialogController').getURIBuilder().setString('comment_id',ja).setInt('width',ha.getDialogWidth()).getURI();new (c('AsyncRequest'))(ka).setMethod('POST').send();}};ha.ActionHandler=ia;f.exports=ha;},null);
__d('CommentsPluginActions',['CommentsPluginStore','DevxProxyActions'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('DevxProxyActions'))(c('CommentsPluginStore'));},null);
__d('CommentsPluginAction',['fbt'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={EDIT:'edit',DELETE:'delete',FLAG:'flag',SETUSER:'setUser',BAN:'ban',HIDE:'hide',REPORT:'report',COLLAPSE:'collapse',EMBED:'embed',getLabel:function(j){switch(j){case i.COLLAPSE:return h._("Collapse comment");case i.EDIT:return h._("Edit comment");case i.DELETE:return h._("Delete comment");case i.FLAG:return h._("Mark as spam");case i.BAN:return h._("Ban user");case i.HIDE:return h._("Hide comment");case i.REPORT:return h._("Report to Facebook");case i.SETUSER:return h._("Switch Accounts");case i.EMBED:return h._("Embed");}},getMenuActions:function(){return [i.COLLAPSE,i.EDIT,i.DELETE,i.FLAG,i.BAN,i.HIDE,i.REPORT,i.EMBED];}};f.exports=i;},null);
__d('MixinCommentsPluginConfirmAction',['fbt','invariant','CommentsPluginAction','CommentsPluginActions','CommentsPluginStore','React','Set','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=120,k={componentWillMount:function(){this.setState({actionConfirmationShown:false,action:null,id:null,pageY:null});},requiresConfirmation:function(l){var m=new (c('Set'))([c('CommentsPluginAction').DELETE,c('CommentsPluginAction').BAN,c('CommentsPluginAction').HIDE]);return m.has(l);},confirmAction:function(l,m,n){this.setState({actionConfirmationShown:true,action:l,id:m,pageY:n});},_onActionConfirmed:function(){c('CommentsPluginActions')[this.state.action](this.state.id);this.setState({actionConfirmationShown:false});},_onActionCancelled:function(){this.setState({actionConfirmationShown:false});},_getActionMetadata:function(l){switch(l){case c('CommentsPluginAction').DELETE:return {body:h._("Are you sure you want to delete this comment?"),button_label:h._("Confirm Delete")};case c('CommentsPluginAction').BAN:return {body:h._("Are you sure you want to ban this user?"),button_label:h._("Confirm Ban")};case c('CommentsPluginAction').HIDE:return {body:h._("Are you sure you want to hide this comment?"),button_label:h._("Confirm Hide")};case c('CommentsPluginAction').SETUSER:return {body:h._("Commenting as another account will clear the attachments you've uploaded."),button_label:h._("Switch Accounts")};default:i(0);}},renderActionConfirmationDialog:function(){var l=this.state.action;if(!l)return null;var m=this._getActionMetadata(l);return (c('React').createElement(c('XUIDialog.react'),{shown:this.state.actionConfirmationShown,fixedTopPosition:this.state.pageY+j<document.body.offsetHeight?this.state.pageY-j/2:null,width:c('CommentsPluginStore').getDialogWidth()},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},c('CommentsPluginAction').getLabel(l)),c('React').createElement(c('XUIDialogBody.react'),null,m.body),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogCancelButton.react'),{onClick:this._onActionCancelled.bind(this)}),c('React').createElement(c('XUIDialogButton.react'),{use:'confirm',label:m.button_label,onClick:this._onActionConfirmed.bind(this)}))));}};f.exports=k;},null);
__d('CommentsPluginAuthorSelector.react',['cx','fbt','ActorSelector.react','CommentsPluginAction','CommentsPluginActions','CommentsPluginStore','MixinCommentsPluginConfirmAction','React','ShortProfiles','XUIText.react','classWithMixins','joinClasses','mixin'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('classWithMixins')(c('React').Component,c('mixin')(c('MixinCommentsPluginConfirmAction'))));k=j&&j.prototype;function l(m){k.constructor.call(this,m);var n=this;n.$CommentsPluginAuthorSelector1=this.$CommentsPluginAuthorSelector1.bind(this);this.actorIDs=c('CommentsPluginStore').getActorIDs();this.state={actorsData:null};}l.prototype.componentWillMount=function(){if(this.actorIDs.length>1&&c('CommentsPluginStore').useCustomActorSelector())c('ShortProfiles').getMulti(this.actorIDs,function(m){this.setState({actorsData:m});}.bind(this));};l.prototype.$CommentsPluginAuthorSelector1=function(m){if(c('CommentsPluginStore').hasAttachment()){this.confirmAction(c('CommentsPluginAction').SETUSER,m);}else c('CommentsPluginActions').setUser(m);};l.prototype.$CommentsPluginAuthorSelector2=function(m){return i._("Commenting as {actorName}",[i.param('actorName',m)]);};l.prototype.render=function(){if(this.actorIDs.length<=1)return null;var m=c('CommentsPluginStore').getUser().id;if(c('CommentsPluginStore').useCustomActorSelector()){var n=this.state.actorsData;if(!n)return null;return (c('React').createElement('div',{className:"_3-95"},c('React').createElement(c('XUIText.react'),{size:'small',className:"_1y5f _2pih"},i._("Commenting as")),c('React').createElement('select',{value:m,onChange:function(o){return this.$CommentsPluginAuthorSelector1(o.target.value);}.bind(this),className:"_1y5g"},this.actorIDs.map(function(o){return (c('React').createElement('option',{value:o,key:o},n&&n[o].name));})),this.renderActionConfirmationDialog()));}return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,'inlineBlock')},c('React').createElement(c('ActorSelector.react'),{actorIDs:this.actorIDs,coverEnabled:false,selectedActorID:m,onChange:function(o){return this.$CommentsPluginAuthorSelector1(o.value);}.bind(this),tooltipConstructor:this.$CommentsPluginAuthorSelector2}),this.renderActionConfirmationDialog()));};f.exports=l;},null);
__d('CommentsPluginComposerMirroringNotice.react',['cx','fbt','CommentsPluginStore','React'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.prototype.render=function(){var n=c('CommentsPluginStore').getMirroredPage();if(!n)return null;return (c('React').createElement('div',{className:"_5sge _2ph-"},n.name?this.props.isReply?i._("Your reply may also appear on {page name}'s Facebook Page.",[i.param('page name',c('React').createElement('a',{href:n.uri,target:'blank'},n.name))]):i._("Your comment may also appear on {page name}'s Facebook Page.",[i.param('page name',c('React').createElement('a',{href:n.uri,target:'blank'},n.name))]):this.props.isReply?i._("Your reply may also appear on Facebook."):i._("Your comment may also appear on Facebook.")));};function m(){j.apply(this,arguments);}m.propTypes={isReply:l.bool};f.exports=m;},null);
__d('CommentsPluginProfilePicture.react',['cx','Image.react','React'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;l.prototype.render=function(){return (c('React').createElement('a',babelHelpers['extends']({},this.props,{href:this.props.href}),c('React').createElement(c('Image.react'),{className:(!this.props.isReply?"_1ci":'')+(this.props.isReply?' '+"_1cj":''),src:this.props.src})));};function l(){i.apply(this,arguments);}l.propTypes={href:k.string.isRequired,src:k.string.isRequired,isReply:k.bool};f.exports=l;},null);
__d('CommentsPluginComposer.react',['cx','fbt','ActorURI','AsyncRequest','CommentsPluginStore','CommentsPluginComposerMirroringNotice.react','CommentsPluginConfig','CommentsPluginProfilePicture.react','DraftEntity','EditorState','EmoticonsList','MentionsInput.react','React','UFIAttachMediaSection.react','UFIAttachedMediaPreview.react','UFICommentUtils','UFIImageBlock.react','UFIStickerButton.react','XUINotice.react','XUITypeaheadView.react','createEditorStateWithEntities','getMentionsInputDecorator','getVisibleValueForContentState','insertEmoticonIntoEditorState','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes,m=19,n='/ajax/ufi/sticker_preview/';function o(q){return c('DraftEntity').create('MENTION','IMMUTABLE',{id:q.id});}j=babelHelpers.inherits(p,c('React').Component);k=j&&j.prototype;function p(q,r){k.constructor.call(this,q,r);this.state=this.$CommentsPluginComposer1();var s=this;s.$CommentsPluginComposer2=this.$CommentsPluginComposer2.bind(this);s.$CommentsPluginComposer3=this.$CommentsPluginComposer3.bind(this);}p.prototype.$CommentsPluginComposer1=function(q){var r=null,s=null,t=q||this.props.prefillText;if(t){r=this.$CommentsPluginComposer4(t);if(this.props.editCommentID){c('CommentsPluginStore').setEditComposerState(r,this.props.editCommentID);}else c('CommentsPluginStore').setCreateComposerState(r,this.props.parentCommentIDOfNewReply);}else{var u=null,v=null;if(this.props.editCommentID){s=c('CommentsPluginStore').getByID(this.props.editCommentID);r=c('createEditorStateWithEntities')({text:s.body.text,ranges:c('UFICommentUtils').shallowCopyRanges(s.ranges).filter(function(y){return !y.entity.external;}),decorator:c('getMentionsInputDecorator')(),entityCreationFn:o});if(s.photo_comment){u=s.photo_comment;u.attachmentType='photo';this.$CommentsPluginComposer5(u);}else if(s.attachment){v=s.attachment;v.attachmentType='sticker';this.$CommentsPluginComposer5(v);}}else if(this.props.parentCommentIDOfNewReply){s=c('CommentsPluginStore').getByID(this.props.parentCommentIDOfNewReply);if(s.replyToCommentID&&c('CommentsPluginStore').getAuthor(s.replyToCommentID).id!==c('CommentsPluginStore').getUser().id){var w=c('CommentsPluginStore').getAuthor(s.replyToCommentID),x={id:w.id,text:w.name,offset:0,length:w.name.length,entity:{id:w.id}};r=c('EditorState').moveFocusToEnd(c('createEditorStateWithEntities')({text:w.name+' ',ranges:[x],decorator:c('getMentionsInputDecorator')(),entityCreationFn:o}));}}if(!r)r=c('EditorState').createEmpty(c('getMentionsInputDecorator')());}return {editorState:r,expanded:t||!!this.props.alwaysExpanded,attachedPhoto:u,attachedSticker:v};};p.prototype.$CommentsPluginComposer4=function(q){return c('createEditorStateWithEntities')({text:q,decorator:c('getMentionsInputDecorator')()});};p.prototype.$CommentsPluginComposer6=function(){return !this.props.editCommentID&&!this.props.parentCommentIDOfNewReply;};p.prototype.$CommentsPluginComposer5=function(q){if(this.props.editCommentID){c('CommentsPluginStore').setEditComposerAttachment(q,this.props.editCommentID);}else c('CommentsPluginStore').setCreateComposerAttachment(q,this.props.parentCommentIDOfNewReply);};p.prototype.$CommentsPluginComposer7=function(q){if(this.props.editCommentID){c('CommentsPluginStore').setLoadingEditComposerAttachment(q,this.props.editCommentID);}else c('CommentsPluginStore').setLoadingCreateComposerAttachment(q,this.props.parentCommentIDOfNewReply);};p.prototype.$CommentsPluginComposer8=function(){if(this.props.editCommentID){return c('CommentsPluginStore').getLoadingEditComposerAttachment(this.props.editCommentID);}else return c('CommentsPluginStore').getLoadingCreateComposerAttachment(this.props.parentCommentIDOfNewReply);};p.prototype.$CommentsPluginComposer9=function(){return this.state.isLoadingAttachment||!!this.state.attachedSticker||!!this.state.attachedPhoto;};p.prototype.getPhotoUploadData=function(){var q=c('CommentsPluginStore').getUser().id,r={profile_id:q,target_id:this.props.targetID,source:m};r[c('ActorURI').PARAMETER_ACTOR]=q;return r;};p.prototype.onPhotoUploadComplete=function(q){if(!this.$CommentsPluginComposer8())return;var r=q.getPayload();if(r&&r.fbid){r.attachmentType='photo';this.$CommentsPluginComposer5(r);this.$CommentsPluginComposer7(false);this.setState({attachedPhoto:r,isLoadingAttachment:false,expanded:true});}else this.resetAttachment(null);};p.prototype.onStickerSelected=function(q){this.$CommentsPluginComposer10();new (c('AsyncRequest'))(n).setData({sticker_id:q}).setErrorHandler(this.resetAttachment.bind(this)).setHandler(this.$CommentsPluginComposer11.bind(this)).send();};p.prototype.$CommentsPluginComposer11=function(q){if(!this.$CommentsPluginComposer8())return;var r=q.getPayload();if(r&&r.fbid){r.attachmentType='sticker';this.$CommentsPluginComposer5(r);this.$CommentsPluginComposer7(false);this.setState({attachedSticker:r,isLoadingAttachment:false,expanded:true});}else this.resetAttachment(null);};p.prototype.insertEmoticonToCommentText=function(q){var r=c('EmoticonsList').symbols[q];if(!r)return;var s=c('insertEmoticonIntoEditorState')(r,this.state.editorState);if(s!==this.state.editorState)this.$CommentsPluginComposer2(s);};p.prototype.resetAttachment=function(event){this.$CommentsPluginComposer5(undefined);this.$CommentsPluginComposer7(false);this.setState({attachedPhoto:null,attachedSticker:null,isLoadingAttachment:false});};p.prototype.$CommentsPluginComposer10=function(){this.$CommentsPluginComposer5(undefined);this.$CommentsPluginComposer7(true);this.setState({attachedSticker:null,attachedPhoto:null,isLoadingAttachment:true});};p.prototype.componentDidMount=function(){c('CommentsPluginStore').addListener('composerCommentAdded',function(event){if(this.$CommentsPluginComposer6()){var q=this.$CommentsPluginComposer1();q.expanded=true;this.setState(q);if(this.refs.composer.style)this.refs.composer.style.cssText='';}}.bind(this));c('CommentsPluginStore').addListener('previousComposerCommentPrefill',function(q){var r=this.$CommentsPluginComposer1(q.prefillText);r.expanded=true;this.setState(r);}.bind(this));if(!this.$CommentsPluginComposer6())this.refs.composer.focus();};p.prototype.$CommentsPluginComposer2=function(q){this.setState({editorState:q});if(this.props.editCommentID){c('CommentsPluginStore').setEditComposerState(q,this.props.editCommentID);}else c('CommentsPluginStore').setCreateComposerState(q,this.props.parentCommentIDOfNewReply);};p.prototype.$CommentsPluginComposer12=function(){if(this.props.editCommentID)return c('CommentsPluginStore').isReply(this.props.editCommentID);return !!this.props.parentCommentIDOfNewReply;};p.prototype.$CommentsPluginComposer3=function(){this.setState({expanded:true});};p.prototype.setFileInput=function(q,r){this.setState({fileInput:q,fileUploader:r});};p.prototype.$CommentsPluginComposer13=function(){return c('getVisibleValueForContentState')(this.state.editorState.getCurrentContent());};p.prototype.$CommentsPluginComposer14=function(q){var r=q.target,s=r.value;r.value='';r.value=s;this.$CommentsPluginComposer3();};p.prototype.$CommentsPluginComposer15=function(q){var r=q.target,s=r.scrollHeight;if(r.offsetHeight<s)r.style.cssText='height:'+s+'px';this.$CommentsPluginComposer2(c('createEditorStateWithEntities')({text:r.value}));};p.prototype.$CommentsPluginComposer16=function(){var q=this.props.placeholder||i._("Add a comment...");if(c('CommentsPluginStore').useLegacyMentionsInput())return (c('React').createElement('textarea',{className:"_1cb"+(' '+"_1u9t")+(this.props.readOnly?' '+"_5pu_":''),placeholder:q,ref:'composer',onFocus:this.$CommentsPluginComposer14.bind(this),onChange:this.$CommentsPluginComposer15.bind(this),readOnly:this.props.readOnly,value:this.$CommentsPluginComposer13()}));return (c('React').createElement(c('MentionsInput.react'),{className:"_1cb"+(this.props.readOnly?' '+"_5pu_":''),editorState:this.state.editorState,mentionsSource:c('CommentsPluginStore').getComposerSearchSource(),onChange:this.$CommentsPluginComposer2,onFocus:this.$CommentsPluginComposer3,placeholder:q,readOnly:this.props.readOnly,typeaheadView:c('XUITypeaheadView.react'),ref:'composer'}));};p.prototype.render=function(){var q=this.props.editCommentID?c('CommentsPluginStore').getAuthor(this.props.editCommentID):q=c('CommentsPluginStore').getUser(),r=this.$CommentsPluginComposer12();return (c('React').createElement(c('UFIImageBlock.react'),{spacing:'medium',className:c('joinClasses')("_4uyl"+(r?' '+"_1zz6":'')+(!this.state.expanded?' '+"_1zz7":'')+(!!this.state.expanded?' '+"_1zz8":''),this.props.className)},c('CommentsPluginStore').useCustomActorSelector()?c('React').createElement('div',null):c('React').createElement(c('CommentsPluginProfilePicture.react'),{href:q.uri,src:q.thumbSrc,isReply:r,target:'_blank'}),c('React').createElement('div',null,c('React').createElement('div',{className:'UFIInputContainer'},this.$CommentsPluginComposer16(),c('React').createElement('div',{className:"UFICommentAttachmentButtons"+(' '+"clearfix")+(!(c('CommentsPluginConfig').commentsPluginZemeckisAttachments&&c('CommentsPluginStore').isPlatformEnabled(q.id)&&c('CommentsPluginStore').isLoggedIn()&&!this.$CommentsPluginComposer9())?' '+"hidden_elem":'')},this.props.allowPhotoAttachments?c('React').createElement(c('UFIAttachMediaSection.react'),{onPhotoUploadComplete:this.onPhotoUploadComplete.bind(this),getPhotoUploadData:this.getPhotoUploadData.bind(this),prepareForAttachedPhotoPreview:this.$CommentsPluginComposer10.bind(this),setFileInput:this.setFileInput.bind(this),attachment:this.state.attachedPhoto}):null,this.props.allowStickerAttachments?c('React').createElement(c('UFIStickerButton.react'),{onStickerSelected:this.onStickerSelected.bind(this),onEmoticonSelected:this.insertEmoticonToCommentText.bind(this)}):null)),c('React').createElement(c('UFIAttachedMediaPreview.react'),{attachedPhoto:this.state.attachedPhoto,attachedSticker:this.state.attachedSticker,onRemoveAttachedMediaPreviewClicked:this.resetAttachment.bind(this),onRemoveAttachedStickerPreview:this.resetAttachment.bind(this),isLoadingPhoto:this.state.isLoadingAttachment}),this.props.unableToPost?c('React').createElement(c('XUINotice.react'),{use:'warn'},i._({"*":"Comments must be less than {lengthLimit} characters"},[i.param('lengthLimit',c('CommentsPluginStore').getMaxCommentLength(),[0])])):null,this.state.expanded?c('React').createElement('div',{className:"_4uym"},c('React').createElement(c('CommentsPluginComposerMirroringNotice.react'),{isReply:r}),this.props.children):null)));};p.propTypes={editCommentID:l.string,parentCommentIDOfNewReply:l.string,readOnly:l.bool,placeholder:l.node,alwaysExpanded:l.bool,unableToPost:l.bool,allowStickerAttachments:l.bool,allowPhotoAttachments:l.bool};f.exports=p;},null);
__d('CommentsPluginComposerComment.react',['cx','fbt','CommentsPluginActions','CommentsPluginAuthorSelector.react','CommentsPluginComposer.react','CommentsPluginStore','Grid.react','InputLabel.react','LeftRight.react','React','XUIButton.react','XUICheckboxInput.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('Grid.react').GridItem;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.state={selectedActorID:c('CommentsPluginStore').getUser().id,postToFeed:false,ablePostToFeed:false,commentLength:0,waitingAsyncResponse:false,unableToPost:false};var o=this;o.$CommentsPluginComposerComment1=this.$CommentsPluginComposerComment1.bind(this);o.$CommentsPluginComposerComment2=this.$CommentsPluginComposerComment2.bind(this);}m.prototype.componentDidMount=function(){c('CommentsPluginStore').addListener('composerChange',function(){var n=c('CommentsPluginStore').getCreateComposerContent().visibleValue,o=n.trim().length;this.setState({commentLength:o,ablePostToFeed:o>=c('CommentsPluginStore').getMinFeedLength(),unableToPost:o>c('CommentsPluginStore').getMaxCommentLength()});}.bind(this));c('CommentsPluginStore').addListener('composerCommentAdded',function(){this.setState({waitingAsyncResponse:false});this.refs.composer.resetAttachment();}.bind(this));c('CommentsPluginStore').addListener('login',function(){this.setState({waitingAsyncResponse:false});}.bind(this));c('CommentsPluginStore').addListener('actorChange',function(){this.refs.composer.resetAttachment();this.forceUpdate();}.bind(this));c('CommentsPluginStore').addListener('previousPostToFeedPrefill',function(){this.setState({postToFeed:c('CommentsPluginStore').getPostToFeed()});}.bind(this));};m.prototype.$CommentsPluginComposerComment2=function(event){var n=!this.state.postToFeed;this.setState({postToFeed:n});c('CommentsPluginActions').setPostToFeed(n);};m.prototype.$CommentsPluginComposerComment1=function(){if(c('CommentsPluginStore').isLoggedIn())this.setState({waitingAsyncResponse:true});c('CommentsPluginActions').setPostToFeed(this.state.postToFeed);c('CommentsPluginActions').addComment();};m.prototype.$CommentsPluginComposerComment3=function(){return (this.state.waitingAsyncResponse||this.state.unableToPost||c('CommentsPluginStore').isEmptyCreateComposer());};m.prototype.render=function(){var n=c('CommentsPluginStore').isLoggedIn()?i._("Post"):i._("Log In to Post"),o=c('CommentsPluginStore').getMinFeedLength()-this.state.commentLength;return (c('React').createElement(c('CommentsPluginComposer.react'),{allowPhotoAttachments:c('CommentsPluginStore').getEnablePhoto(),allowStickerAttachments:c('CommentsPluginStore').getEnableSticker(),ref:'composer',className:"_2392",readOnly:this.state.waitingAsyncResponse,unableToPost:this.state.unableToPost},c('React').createElement(c('LeftRight.react'),{className:"_5tr6 clearfix _2ph-"},!c('CommentsPluginStore').isMirrored()?c('React').createElement(c('Grid.react'),{cols:1},c('React').createElement(l,null,c('React').createElement(c('InputLabel.react'),{className:"_1u0n"},c('React').createElement(c('XUICheckboxInput.react'),{checked:this.state.postToFeed,onChange:this.$CommentsPluginComposerComment2}),c('React').createElement('label',{className:"_3-99 _2ern _50f8 _5kx5"},i._("Also post on Facebook")))),c('React').createElement(l,null,this.state.postToFeed&&!this.state.ablePostToFeed?i._({"*":{"character":"Write {lengthRemain} more character to post to Facebook","characters":"Write {lengthRemain} more characters to post to Facebook"}},[i.param('lengthRemain',o,[0]),i['enum'](o===1?'character':'characters',{character:'character',characters:'characters'})]):c('React').createElement('span',null))):c('React').createElement('span',null),c('React').createElement('span',null,c('React').createElement(c('CommentsPluginAuthorSelector.react'),null),c('React').createElement(c('XUIButton.react'),{disabled:this.$CommentsPluginComposerComment3(),label:n,use:'confirm',className:"rfloat _3-99",onClick:this.$CommentsPluginComposerComment1})))));};f.exports=m;},null);
__d("XDeveloperDocumentationController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/docs\/{?path1}\/{?path2}\/{?path3}\/{?path4}\/{?path5}\/{?path6}\/",{path:{type:"String"},version:{type:"String"},preview:{type:"Exists",defaultValue:false},revisionid:{type:"Int"},locale:{type:"String"},path1:{type:"String"},path2:{type:"String"},path3:{type:"String"},path4:{type:"String"},path5:{type:"String"},path6:{type:"String"}});},null);
__d('CommentsPluginFooter.react',['cx','ImageBlock.react','React','XDeveloperDocumentationController'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;k.prototype.render=function(){return (c('React').createElement('div',{className:"_5lm5 _2pi3 _3-8y"},c('React').createElement(c('ImageBlock.react'),null,c('React').createElement('img',{src:'/images/like/icons/fav.png'}),c('React').createElement('a',{target:'_blank',href:c('XDeveloperDocumentationController').getURIBuilder().setString('path1','plugins').setString('path2','comments').getURI().setSubdomain('developers')},'Facebook Comments Plugin'))));};function k(){i.apply(this,arguments);}f.exports=k;},null);
__d('CommentsPluginHeader.react',['cx','fbt','CommentsPluginActions','CommentsPluginStore','DeveloperCommentsPluginOrdering','LeftRight.react','Link.react','React','XUISelector.react','XUISpinner.react','XUIText.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('XUISelector.react').Option;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.state={sorting:false};var o=this;o.$CommentsPluginHeader1=this.$CommentsPluginHeader1.bind(this);}m.prototype.$CommentsPluginHeader1=function(event){this.setState({sorting:true});c('CommentsPluginStore').addListener('sortingCompleted',function(){this.setState({sorting:false});c('CommentsPluginStore').removeCurrentListener();}.bind(this));c('CommentsPluginActions').sort(event.value);};m.prototype.componentDidMount=function(){c('CommentsPluginStore').addListener('commentsCountChange',function(){this.forceUpdate();}.bind(this));};m.prototype.render=function(){var n=null,o=null;if(c('CommentsPluginStore').getModerateURL())n=c('React').createElement('span',null,c('React').createElement('span',{className:"_52bm"},'|'),c('React').createElement(c('Link.react'),{href:c('CommentsPluginStore').getModerateURL(),target:'_blank'},i._("Moderation Tool")));if(c('CommentsPluginStore').isDeeplinkComment())o=c('React').createElement('span',null,c('React').createElement('span',{className:"_52bm"},'|'),c('React').createElement(c('Link.react'),{href:c('CommentsPluginStore').getOriginalLink(),target:'_blank'},i._("Original Link")));var p=c('DeveloperCommentsPluginOrdering').__types.filter(function(q){return q!=='social'||c('CommentsPluginStore').isRankingAllowed();});return (c('React').createElement(c('LeftRight.react'),{className:"_491z"},c('React').createElement('span',null,c('React').createElement(c('XUIText.react'),{weight:'bold'},c('CommentsPluginStore').getCommentsCount()!==1?i._("{count} Comments",[i.param('count',c('CommentsPluginStore').getCommentsCount())]):i._("1 Comment")),n,o),c('React').createElement('div',null,this.state.sorting?c('React').createElement(c('XUISpinner.react'),{size:'small',className:"_3-90"}):null,c('React').createElement('span',{className:"_pup"},i._("Sort by")),' ',c('React').createElement(c('XUISelector.react'),{alignh:'right',className:"_3-8_",initialValue:c('CommentsPluginStore').getCurrentSorting(),onChange:this.$CommentsPluginHeader1},p.map(function(q){return (c('React').createElement(l,{value:q,key:q},c('DeveloperCommentsPluginOrdering').__labels[q]));})))));};f.exports=m;},null);
__d('CommentsPluginCommentActions.react',['cx','fbt','ActionList.react','CommentsPluginAction','CommentsPluginActions','CommentsPluginStore','Image.react','Link.react','MixinCommentsPluginConfirmAction','React','UFICommentMetadata.react','classWithMixins','mixin'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('classWithMixins')(c('React').Component,c('mixin')(c('MixinCommentsPluginConfirmAction'))));k=j&&j.prototype;function m(n,o){k.constructor.call(this,n,o);var p=this;p.$CommentsPluginCommentActions1=this.$CommentsPluginCommentActions1.bind(this);p.$CommentsPluginCommentActions2=this.$CommentsPluginCommentActions2.bind(this);p.$CommentsPluginCommentActions3=this.$CommentsPluginCommentActions3.bind(this);}m.prototype.$CommentsPluginCommentActions3=function(){c('CommentsPluginActions').like(this.props.commentID);};m.prototype.$CommentsPluginCommentActions2=function(){c('CommentsPluginActions').showReplyComposer(this.props.commentID);};m.prototype.$CommentsPluginCommentActions1=function(){c('CommentsPluginActions').flag(this.props.commentID);};m.prototype.$CommentsPluginCommentActions4=function(n){if(!n.canLike&&c('CommentsPluginStore').isLoggedIn())return null;return (c('React').createElement(c('Link.react'),{onClick:this.$CommentsPluginCommentActions3},n.hasLiked?i._("Unlike"):i._("Like")));};m.prototype.$CommentsPluginCommentActions5=function(){if(c('CommentsPluginStore').isThreadClosed()||c('CommentsPluginStore').shouldSwitchAccount())return null;return (c('React').createElement(c('Link.react'),{onClick:this.$CommentsPluginCommentActions2},i._("Reply")));};m.prototype.render=function(){var n=c('CommentsPluginStore').getByID(this.props.commentID);return (c('React').createElement(c('ActionList.react'),{className:"_2vq9"},this.$CommentsPluginCommentActions4(n),this.$CommentsPluginCommentActions5(),c('CommentsPluginStore').isMobile()?n.canEdit?c('React').createElement(c('Link.react'),{onClick:this.confirmAction.bind(this,c('CommentsPluginAction').DELETE,this.props.commentID)},i._("Delete")):c('React').createElement(c('Link.react'),{onClick:this.$CommentsPluginCommentActions1},i._("Mark as spam")):null,n.likeCount?c('React').createElement('span',null,c('React').createElement(c('Image.react'),{src:'/images/ufi/fbfeed/like.png',className:"_3-8_ _4iy4"}),n.likeCount):null,c('React').createElement(c('UFICommentMetadata.react'),{comment:n,permalink:c('CommentsPluginStore').getPermalink(this.props.commentID),shortenTimestamp:true,showPermalink:!c('CommentsPluginStore').isReply(this.props.commentID),permalinkTarget:'_blank'}),c('CommentsPluginStore').isMobile()?this.renderActionConfirmationDialog():null));};m.propTypes={commentID:l.string.isRequired};f.exports=m;},null);
__d('CommentsPluginComposerEdit.react',['cx','fbt','CommentsPluginActions','CommentsPluginComposer.react','CommentsPluginStore','React','XUIButton.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n,o){k.constructor.call(this,n,o);this.state={waitingAsyncResponse:false,unableToPost:false};var p=this;p.$CommentsPluginComposerEdit3=this.$CommentsPluginComposerEdit3.bind(this);p.$CommentsPluginComposerEdit4=this.$CommentsPluginComposerEdit4.bind(this);this.$CommentsPluginComposerEdit1=null;}m.prototype.componentDidMount=function(){this.$CommentsPluginComposerEdit1=c('CommentsPluginStore').addListener('composerChange',function(){var n=c('CommentsPluginStore').getEditComposerContent(this.props.commentID).visibleValue;this.setState({unableToPost:n.trim().length>c('CommentsPluginStore').getMaxCommentLength()});this.forceUpdate();}.bind(this));this.$CommentsPluginComposerEdit2=c('CommentsPluginStore').addListener('actorChange',function(){this.refs.composer.resetAttachment();this.forceUpdate();}.bind(this));};m.prototype.componentWillUnmount=function(){if(this.$CommentsPluginComposerEdit1)this.$CommentsPluginComposerEdit1.remove();if(this.$CommentsPluginComposerEdit2)this.$CommentsPluginComposerEdit2.remove();};m.prototype.$CommentsPluginComposerEdit3=function(){this.setState({waitingAsyncResponse:true});c('CommentsPluginActions').saveEdit(this.props.commentID);};m.prototype.$CommentsPluginComposerEdit4=function(){this.refs.composer.resetAttachment();c('CommentsPluginActions').cancelEdit(this.props.commentID);};m.prototype.$CommentsPluginComposerEdit5=function(){return (this.state.waitingAsyncResponse||this.state.unableToPost||c('CommentsPluginStore').isEmptyEditComposer(this.props.commentID));};m.prototype.render=function(){var n=c('CommentsPluginStore').getByID(this.props.commentID);return (c('React').createElement(c('CommentsPluginComposer.react'),{alwaysExpanded:true,ref:'composer',prefillText:n.prefillText,readOnly:this.state.waitingAsyncResponse,allowPhotoAttachments:c('CommentsPluginStore').getEnablePhoto(),allowStickerAttachments:c('CommentsPluginStore').getEnableSticker(),editCommentID:this.props.commentID,unableToPost:this.state.unableToPost},c('React').createElement('div',{className:"_5tr6 clearfix _2ph_"},c('React').createElement(c('XUIButton.react'),{disabled:this.$CommentsPluginComposerEdit5(),label:i._("Save"),use:'confirm',className:"rfloat _3-99",onClick:this.$CommentsPluginComposerEdit3}),c('React').createElement(c('XUIButton.react'),{disabled:this.state.waitingAsyncResponse,label:i._("Cancel"),use:'default',className:"rfloat _3-99",onClick:this.$CommentsPluginComposerEdit4})),this.props.children));};m.propTypes={commentID:l.string.isRequired};f.exports=m;},null);
__d('CommentsPluginComposerReply.react',['cx','fbt','CommentsPluginActions','CommentsPluginAuthorSelector.react','CommentsPluginComposer.react','CommentsPluginStore','React','XUIButton.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n,o){k.constructor.call(this,n,o);this.state={waitingAsyncResponse:false,unableToPost:false};var p=this;p.$CommentsPluginComposerReply3=this.$CommentsPluginComposerReply3.bind(this);p.$CommentsPluginComposerReply4=this.$CommentsPluginComposerReply4.bind(this);this.$CommentsPluginComposerReply1=null;}m.prototype.componentDidMount=function(){this.$CommentsPluginComposerReply1=c('CommentsPluginStore').addListener('composerChange',function(){var n=c('CommentsPluginStore').getCreateComposerContent(this.props.commentID).visibleValue;this.setState({unableToPost:n.trim().length>c('CommentsPluginStore').getMaxCommentLength()});this.forceUpdate();}.bind(this));this.$CommentsPluginComposerReply2=c('CommentsPluginStore').addListener('actorChange',function(){this.refs.composer.resetAttachment();this.forceUpdate();}.bind(this));};m.prototype.componentWillUnmount=function(){if(this.$CommentsPluginComposerReply1)this.$CommentsPluginComposerReply1.remove();if(this.$CommentsPluginComposerReply2)this.$CommentsPluginComposerReply2.remove();};m.prototype.$CommentsPluginComposerReply3=function(){this.setState({waitingAsyncResponse:true});c('CommentsPluginActions').addReply(this.props.commentID);this.refs.composer.resetAttachment();};m.prototype.$CommentsPluginComposerReply4=function(){this.refs.composer.resetAttachment();c('CommentsPluginActions').cancelReply(this.props.commentID);};m.prototype.$CommentsPluginComposerReply5=function(){return (this.state.waitingAsyncResponse||this.state.unableToPost||c('CommentsPluginStore').isEmptyCreateComposer(this.props.commentID));};m.prototype.render=function(){var n=c('CommentsPluginStore').getByID(this.props.commentID);return (c('React').createElement(c('CommentsPluginComposer.react'),{allowPhotoAttachments:c('CommentsPluginStore').getEnablePhoto(),allowStickerAttachments:c('CommentsPluginStore').getEnableSticker(),ref:'composer',alwaysExpanded:true,prefillText:n.prefillText,readOnly:this.state.waitingAsyncResponse,parentCommentIDOfNewReply:this.props.commentID,unableToPost:this.state.unableToPost,placeholder:i._("Add a reply...")},c('React').createElement('div',{className:"_5tr6 clearfix _2ph_"},c('React').createElement(c('CommentsPluginAuthorSelector.react'),null),c('React').createElement(c('XUIButton.react'),{disabled:this.state.waitingAsyncResponse,label:i._("Cancel"),use:'default',className:"_3-99",onClick:this.$CommentsPluginComposerReply4}),c('React').createElement(c('XUIButton.react'),{disabled:this.$CommentsPluginComposerReply5(),label:i._("Reply"),use:'confirm',className:"_3-99",onClick:this.$CommentsPluginComposerReply3}))));};m.propTypes={commentID:l.string.isRequired};f.exports=m;},null);
__d('CommentsPluginMenu.react',['fbt','ix','CommentsPluginAction','CommentsPluginActions','CommentsPluginConfig','CommentsPluginStore','Image.react','MixinCommentsPluginConfirmAction','ReactXUIMenu','PopoverMenu.react','React','Tooltip','classWithMixins','mixin'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes,m=c('ReactXUIMenu').Item;j=babelHelpers.inherits(n,c('classWithMixins')(c('React').Component,c('mixin')(c('MixinCommentsPluginConfirmAction'))));k=j&&j.prototype;function n(o,p){k.constructor.call(this,o,p);this.state={opened:false};var q=this;q.$CommentsPluginMenu1=this.$CommentsPluginMenu1.bind(this);q.$CommentsPluginMenu2=this.$CommentsPluginMenu2.bind(this);q.$CommentsPluginMenu3=this.$CommentsPluginMenu3.bind(this);}n.prototype.isOpen=function(){return this.state.opened;};n.prototype.$CommentsPluginMenu1=function(){this.setState({opened:true});};n.prototype.$CommentsPluginMenu2=function(){this.setState({opened:false});};n.prototype.$CommentsPluginMenu4=function(){c('CommentsPluginActions').toggleVisibility(this.props.commentID);};n.prototype.$CommentsPluginMenu3=function(o,event){var p=event.item.getValue();if(this.requiresConfirmation(p)){this.confirmAction(p,this.props.commentID,event.event.pageY);}else if(p===c('CommentsPluginAction').SHOW||p===c('CommentsPluginAction').COLLAPSE){this.$CommentsPluginMenu4();}else c('CommentsPluginActions')[p](this.props.commentID);};n.prototype.$CommentsPluginMenu5=function(o,p){var q=c('CommentsPluginStore').isReply(p.id);switch(o){case c('CommentsPluginAction').DELETE:if(!p.canEdit)return null;break;case c('CommentsPluginAction').EDIT:if(!p.canEdit||c('CommentsPluginStore').isThreadClosed())return null;break;case c('CommentsPluginAction').FLAG:if(p.canEdit||p.collapsed||p.flagged)return null;break;case c('CommentsPluginAction').COLLAPSE:if(q||p.collapsed||p.flagged)return null;break;case c('CommentsPluginAction').BAN:case c('CommentsPluginAction').HIDE:if(!c('CommentsPluginStore').isViewerModerator())return null;break;case c('CommentsPluginAction').REPORT:if(!p.reportURI)return null;break;case c('CommentsPluginAction').EMBED:var r=p.canEmbed;if(q){var s=c('CommentsPluginStore').getByID(p.targetID);r=r&&s.canEmbed;}if(p.flagged||!c('CommentsPluginConfig').commentEmbed||!r)return null;break;default:break;}return (c('React').createElement(m,{value:o,key:o},c('CommentsPluginAction').getLabel(o)));};n.prototype.render=function(){var o=c('CommentsPluginStore').getByID(this.props.commentID);return (c('React').createElement('div',null,c('React').createElement(c('PopoverMenu.react'),{alignh:'right',onShow:this.$CommentsPluginMenu1,onHide:this.$CommentsPluginMenu2,menu:c('React').createElement(c('ReactXUIMenu'),{onItemClick:this.$CommentsPluginMenu3},c('CommentsPluginAction').getMenuActions().map(function(p){return this.$CommentsPluginMenu5(p,o);}.bind(this)))},c('React').createElement('a',null,c('React').createElement(c('Image.react'),babelHelpers['extends']({},c('Tooltip').propsFor(h._("Menu")),{src:i('/images/plugins/comments/chevron-down.png')})))),this.renderActionConfirmationDialog()));};n.propTypes={commentID:l.string.isRequired};f.exports=n;},null);
__d('CommentsPluginComment.react',['cx','fbt','xuiglyph','ActorBio.react','Badge.react','CenteredContainer.react','CommentsPluginActions','CommentsPluginCommentActions.react','CommentsPluginComposerEdit.react','CommentsPluginProfilePicture.react','CommentsPluginMenu.react','CommentsPluginComposerReply.react','CommentsPluginStore','HovercardLinkInterpolator','Link.react','Image.react','React','TruncatedTextWithEntities.react','UFIActor.react','UFICommentAttachment.react','UFICommentUtils','UFIImageBlock.react','XUIGrayText.react','XUISpinner.react','XUIText.react','joinClasses','nullthrows'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l,m,n;if(c.__markCompiled)c.__markCompiled();var o=c('React').PropTypes;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;function p(r,s){l.constructor.call(this,r,s);this.state={showMenu:false};var t=this;t.$CommentsPluginComment1=this.$CommentsPluginComment1.bind(this);t.$CommentsPluginComment2=this.$CommentsPluginComment2.bind(this);t.$CommentsPluginComment3=this.$CommentsPluginComment3.bind(this);}p.prototype.$CommentsPluginComment1=function(){this.setState({showMenu:true});};p.prototype.$CommentsPluginComment2=function(){if(!this.refs.menu||!this.refs.menu.isOpen())this.setState({showMenu:false});};p.prototype.$CommentsPluginComment3=function(){var r=c('nullthrows')(c('CommentsPluginStore').getByID(this.props.commentID));if(r.collapsed){c('CommentsPluginActions').toggleVisibility(this.props.commentID);}else if(r.flagged)c('CommentsPluginActions').unflag(this.props.commentID);};p.prototype.render=function(){var r=c('nullthrows')(c('CommentsPluginStore').getByID(this.props.commentID));if(r.deleted)return null;if(r.editor)return (c('React').createElement('div',{className:"_3-8y"},c('React').createElement(c('CommentsPluginComposerEdit.react'),{commentID:this.props.commentID}),c('React').createElement(q,{commentID:this.props.commentID,className:"_3j_p"})));var s=c('UFICommentUtils').shallowCopyRanges(r.ranges),t=c('UFICommentUtils').getCommentTextWithTruncatedURIs(s,r.body.text),u=null;if(r.collapsed||r.flagged){u=c('React').createElement('div',{className:"_5mlf"},c('React').createElement(c('XUIGrayText.react'),{shade:'light'},i._("This comment is {action}",[i.param('action',r.collapsed?'collapsed. ':'marked as spam. ')]),c('React').createElement(c('Link.react'),{onClick:this.$CommentsPluginComment3},i._("Undo"))));}else{if(r.photoComment){r.photo_comment=r.photoComment;delete r.photoComment;}u=c('React').createElement('div',{className:"_30o4"},t?c('React').createElement(c('TruncatedTextWithEntities.react'),babelHelpers['extends']({className:"_5mdd",text:t,ranges:s,interpolator:function(z,aa){return (c('HovercardLinkInterpolator')(z,aa,'_blank'));}},c('CommentsPluginStore').getCommentBodyTruncationLimits(),{renderEmoticons:true,renderEmoji:true})):null,c('React').createElement(c('UFICommentAttachment.react'),{comment:r,disableTheater:true}));}var v=c('nullthrows')(c('CommentsPluginStore').getByID(r.authorID)),w=c('CommentsPluginStore').isOptimisticComment(r),x=c('CommentsPluginStore').isReply(this.props.commentID),y=c('CommentsPluginStore').isMobile();return (c('React').createElement(c('UFIImageBlock.react'),{className:"_3-8y"+(!x?' '+"_5nz1":''),spacing:'medium',onMouseEnter:this.$CommentsPluginComment1,onMouseLeave:this.$CommentsPluginComment2},c('React').createElement(c('CommentsPluginProfilePicture.react'),{href:v.uri,src:v.thumbSrc,isReply:x,target:'_blank'}),c('React').createElement('div',null,c('React').createElement(c('UFIActor.react'),{author:v,delimiter:y?' ':undefined,key:'author',showHovercard:!y,target:'_blank'},v.isVerified?c('React').createElement(c('Badge.react'),{key:'badge',size:'xsmall',type:'verified'}):null,v.bio?c('React').createElement('div',{className:"_4q1v"},c('React').createElement(c('ActorBio.react'),{target:'_blank',preferredTypes:v.bio.preferredTypes,stats:v.bio.stats})):null),c('React').createElement('div',{className:"_3-8m"},u),w||r.collapsed||r.flagged?null:c('React').createElement(c('CommentsPluginCommentActions.react'),{commentID:this.props.commentID}),c('React').createElement(q,{commentID:this.props.commentID})),c('React').createElement('div',null,this.state.showMenu&&!w&&!y?c('React').createElement(c('CommentsPluginMenu.react'),{ref:'menu',commentID:this.props.commentID}):null)));};p.propTypes={commentID:o.string.isRequired};m=babelHelpers.inherits(q,c('React').Component);n=m&&m.prototype;function q(r,s){n.constructor.call(this,r,s);this.state={loading:false};var t=this;t.$CommentsPluginCommentReplies1=this.$CommentsPluginCommentReplies1.bind(this);}q.prototype.$CommentsPluginCommentReplies1=function(){this.setState({loading:true});c('CommentsPluginStore').addListener('moreRepliesCompleted',function(event){if(this.props.commentID===event.commentID){this.setState({loading:false});c('CommentsPluginStore').removeCurrentListener();}}.bind(this));c('CommentsPluginActions').showMoreReplies(this.props.commentID);};q.prototype.render=function(){var r=c('CommentsPluginStore').getByID(this.props.commentID),s=r.public_replies;if(s===undefined||r.collapsed===true||r.flagged)return r.composer?c('React').createElement('div',{className:c('joinClasses')("_44ri _2pis _3-8y",this.props.className)},c('React').createElement(c('CommentsPluginComposerReply.react'),{commentID:this.props.commentID})):null;if(!s.commentIDs)s.commentIDs=[];var t=s.totalCount-s.commentIDs.length,u=c('CommentsPluginStore').getPageSize(),v=t<u?t:u;return (c('React').createElement('div',{className:c('joinClasses')("_44ri _2pis",this.props.className)},s.commentIDs.map(function(w){if(w===this.props.commentID)return null;return c('React').createElement(p,{commentID:w,key:w});}.bind(this)),c('CommentsPluginStore').hasUnloadedReplies(this.props.commentID)&&t>0?c('React').createElement('div',{className:"_5yct _3-8y _3-96 _2ph-"},this.state.loading?c('React').createElement(c('CenteredContainer.react'),null,c('React').createElement(c('XUISpinner.react'),{size:'small'})):c('React').createElement(c('Link.react'),{onClick:this.$CommentsPluginCommentReplies1},c('React').createElement(c('XUIText.react'),{size:'small',weight:'bold'},v===1?i._("Show 1 more reply in this thread"):i._("Show {number of replies} more replies in this thread",[i.param('number of replies',v)])),c('React').createElement(c('Image.react'),{src:j({name:'triangle-down'})}))):null,r.composer?c('React').createElement('div',{className:"_3-8y"},c('React').createElement(c('CommentsPluginComposerReply.react'),{commentID:this.props.commentID})):null));};q.propTypes={commentID:o.string.isRequired};f.exports=p;},null);
__d('CommentsPluginLoadMore.react',['cx','fbt','CenteredContainer.react','CommentsPluginActions','CommentsPluginStore','React','XUIButton.react','XUISpinner.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;function l(m,n){k.constructor.call(this,m,n);this.state={loading:false};var o=this;o.$CommentsPluginLoadMore1=this.$CommentsPluginLoadMore1.bind(this);}l.prototype.$CommentsPluginLoadMore1=function(){c('CommentsPluginActions').showMoreComments();this.setState({loading:true});c('CommentsPluginStore').addListener('moreCommentsCompleted',function(){this.setState({loading:false});c('CommentsPluginStore').removeCurrentListener();}.bind(this));};l.prototype.render=function(){var m=c('CommentsPluginStore').getUnloadedCommentsCount();if(!c('CommentsPluginStore').hasUnloadedComments()||m<1)return null;if(this.state.loading)return (c('React').createElement(c('CenteredContainer.react'),{className:"_ndl"},c('React').createElement(c('XUISpinner.react'),{size:'large'})));var n=c('CommentsPluginStore').getPageSize(),o=m<n?m:n;return (c('React').createElement('div',{className:"_5o4h"},c('React').createElement(c('XUIButton.react'),{className:"_1gl3",role:'button',onClick:this.$CommentsPluginLoadMore1,label:o===1?i._("Load 1 more comment"):i._("Load {pagesize} more comments",[i.param('pagesize',o)])})));};f.exports=l;},null);
__d('CommentsPluginListing.react',['cx','CommentsPluginComment.react','CommentsPluginLoadMore.react','CommentsPluginStore','React'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;k.prototype.render=function(){var l=c('CommentsPluginStore').getCommentIDs(),m=l.map(function(n){return c('React').createElement(c('CommentsPluginComment.react'),{commentID:n,key:n});});return (c('React').createElement('div',{className:"_4k-6"},m,c('React').createElement(c('CommentsPluginLoadMore.react'),null)));};function k(){i.apply(this,arguments);}f.exports=k;},null);
__d('CommentsPluginNotice.react',['fbt','CommentsPluginStore','React','XUINotice.react'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;k.prototype.render=function(){return (c('CommentsPluginStore').isThreadClosed()?c('React').createElement(c('XUINotice.react'),{use:'notify'},h._("This thread is closed")):c('CommentsPluginStore').shouldSwitchAccount()?c('React').createElement(c('XUINotice.react'),{use:'notify'},h._("Please switch to personal account to post comments.")):null);};function k(){i.apply(this,arguments);}f.exports=k;},null);
__d("XPluginCommentsConfirmPostToFacebookAsyncDialogController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/plugins\/comments\/{comment_id}\/async\/confirm\/publish\/dialog\/",{comment_id:{type:"String",required:true},plugin_width:{type:"Int"},__asyncDialog:{type:"Int"}});},null);
__d('CommentsPlugin.react',['cx','fbt','AsyncDialog','AsyncRequest','CommentsPluginActions','CommentsPluginComposerComment.react','CommentsPluginFooter.react','CommentsPluginHeader.react','CommentsPluginListing.react','CommentsPluginNotice.react','CommentsPluginStore','XPluginCommentsConfirmPostToFacebookAsyncDialogController','DOMQuery','PluginResize','React','ReactDOM','CommentsPluginSentryAction','SimpleXUIDialog','getElementPosition','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.prototype.componentWillMount=function(){c('CommentsPluginStore').init(this.props.comments,this.props.meta,this.props.initialOrdering,this.props.rankingAllowed);c('CommentsPluginStore').addListener('postError',function(n){c('SimpleXUIDialog').show(n.errorSummary||i._("Sorry, something went wrong. Please try again later."),null,null,{width:c('CommentsPluginStore').getDialogWidth()});});c('CommentsPluginStore').addListener('sentryAction',function(n,o){switch(n){case c('CommentsPluginSentryAction').CONFIRM_POST_TO_PROFILE:var p=c('XPluginCommentsConfirmPostToFacebookAsyncDialogController').getURIBuilder().setString('comment_id',o).setInt('plugin_width',document.body.offsetWidth).getURI();c('AsyncDialog').send(new (c('AsyncRequest'))(p).setData({iframe_referer:c('CommentsPluginStore').getIframeReferer()}));break;default:break;}});};m.prototype.componentDidMount=function(){var n=c('ReactDOM').findDOMNode(this);c('PluginResize').autoHeight(null,n);new (c('PluginResize'))(function(){},function(){var o=n.offsetHeight,p=c('DOMQuery').scry(document.body,'.uiLayer:not(.hidden_elem) .uiContextualLayer'),q=c('DOMQuery').scry(document.body,'.captcha_dialog');if(p.length===0&&q.length===0)return o;var r=p.length>0?c('getElementPosition')(p[0]):null,s=q.length>0?c('getElementPosition')(q[0]):null;return Math.max(o,r?r.y+r.height+1:0,s?s.height:0);},'resize.iframe',false).resize().auto();c('CommentsPluginStore').addListener('change',function(){this.forceUpdate();}.bind(this));if(c('CommentsPluginStore').isOptinReturn())c('CommentsPluginActions').restorePreviousState();};m.prototype.$CommentsPlugin1=function(){return c('CommentsPluginStore').isThreadClosed()||c('CommentsPluginStore').shouldSwitchAccount();};m.prototype.render=function(){return (c('React').createElement('div',{className:c('joinClasses')("_56q9",this.props.className)},c('React').createElement('div',{className:"_2pi8"},c('React').createElement(c('CommentsPluginHeader.react'),null),this.$CommentsPlugin1()?c('React').createElement(c('CommentsPluginNotice.react'),null):c('CommentsPluginStore').isDeeplinkComment()?null:c('React').createElement(c('CommentsPluginComposerComment.react'),null),c('React').createElement(c('CommentsPluginListing.react'),null),c('React').createElement(c('CommentsPluginFooter.react'),null))));};function m(){j.apply(this,arguments);}m.propTypes={comments:l.object.isRequired,meta:l.object.isRequired,initialOrdering:l.string.isRequired,rankingAllowed:l.bool};f.exports=m;},null);