/*1357589232,178142497*/

if (self.CavalryLogger) { CavalryLogger.start_js(["R\/AVf"]); }

__d("ComposerXLinkScraperAttachment",["Event","Class","ComposerXAttachment","ComposerXAttachmentUtils","ComposerXController","ComposerXDragDrop","ComposerXPrivacyWidgetTags","DOM","Parent","copyProperties","csx","cx"],function(a,b,c,d,e,f){var g=b('Event'),h=b('Class'),i=b('ComposerXAttachment'),j=b('ComposerXAttachmentUtils'),k=b('ComposerXController'),l=b('ComposerXDragDrop'),m=b('ComposerXPrivacyWidgetTags'),n=b('DOM'),o=b('Parent'),p=b('copyProperties'),q=b('csx'),r=b('cx');function s(t,u,v){this.parent.construct(this);this._root=t;this._tagger=u;this._config=v;if(v.plus_version)this._initDragDropDialog(v.dragdropPhotoDialog);}h.extend(s,i);p(s.prototype,{_privacyWidgetTags:null,_removeListener:null,_uploadPhotoCallback:null,_dragdrop:null,attachmentClassName:"_4j",getRoot:function(){return this._root;},initWithComponents:function(){var t=this.getComponent('maininput');j.initMentions(t,this._config.mentionsPlaceholder);this._tagger.init(this);this._privacyWidgetTags=new m(this);var u=n.find(this._root,"._9s");this._removeListener=g.listen(u,'click',function(){k.getAttachment(this._root,this._config.removeEndpoint);}.bind(this));if(this._config.plus_version)this._dragdrop=new l(this._root,this._composerID,this._config.targetID,this._onDragDropPhoto.bind(this));},cleanup:function(){this._tagger.cleanup();this._privacyWidgetTags.destroy();this._privacyWidgetTags=null;this._removeListener.remove();this._removeListener=null;if(this._dragdrop){this._dragdrop.deactivate();this._dragdrop=null;}},reset:function(){this._tagger.reset();},canSwitchAway:function(){return !o.byClass(this._root,'async_saving');},_initDragDropDialog:function(t){this._dragdropPhotoDialog=t;t.subscribe('button',this._onConfirmDragDropPhoto.bind(this));},_onDragDropPhoto:function(t){this._uploadPhotoCallback=t;this._dragdropPhotoDialog.show();},_onConfirmDragDropPhoto:function(){this._uploadPhotoCallback&&this._uploadPhotoCallback();this._dragdropPhotoDialog.hide();}});e.exports=s;});
__d("ComposerXMediaUploadProgressBarAttachment",["Event","Button","Class","ComposerXAttachment","ComposerXAttachmentUtils","ComposerXController","ComposerXPrivacyWidgetTags","CSS","DOM","Parent","VideoUploadLogger","copyProperties","csx","cx"],function(a,b,c,d,e,f){var g=b('Event'),h=b('Button'),i=b('Class'),j=b('ComposerXAttachment'),k=b('ComposerXAttachmentUtils'),l=b('ComposerXController'),m=b('ComposerXPrivacyWidgetTags'),n=b('CSS'),o=b('DOM'),p=b('Parent'),q=b('VideoUploadLogger'),r=b('copyProperties'),s=b('csx'),t=b('cx'),u={};function v(w,x,y,z){this.parent.construct(this);this._root=w;this._form=x;this._tagger=y;this._config=z;this._listeners=[];}i.extend(v,j);r(v.prototype,{_privacyWidgetTags:null,_videoSubscription:null,attachmentClassName:"_92",getRoot:function(){return this._root;},initWithComponents:function(){u[this._composerID]=this;this._submitButton=o.find(this._root,"._yo");this._fileInput=o.find(this._root,"input._95");this._listeners.push(g.listen(this._fileInput,'change',this._onFileChange.bind(this)));this._listeners.push(g.listen(this._root,'submit',this._onSubmit.bind(this),g.Priority.URGENT));k.initMentions(this.getComponent('maininput'),this._config.mentionsPlaceholder);this._tagger.init(this);this._privacyWidgetTags=new m(this);this._root.action=this._config.photoEndpoint;},cleanup:function(){this._tagger.cleanup();this._privacyWidgetTags.destroy();this._privacyWidgetTags=null;this._videoSubscription=null;while(this._listeners.length)this._listeners.pop().remove();delete u[this._composerID];},reset:function(){this._tagger.reset();this._fileInput.value='';},canSwitchAway:function(){return !p.byClass(this._root,'async_saving');},_onFileChange:function(){h.setEnabled(this._submitButton,!!this._fileInput.value);},_onSubmit:function(){if(this._isVideoFile(this._fileInput)){q.logStartedUploadingVideo({target_id:this._config.videoTargetID,source:q.SOURCE_COMPOSER});this._root.action=this._config.videoEndpoint;n.addClass(this._root,"_4_8");if(!this._videoSubscription)this._videoSubscription=this._form.subscribe(['success','failure'],this._onVideoUploadComplete.bind(this));}},_isVideoFile:function(w){var x=w.value.split('.').pop().toLowerCase();return !!this._config.videoExtensions[x];},_onVideoUploadComplete:function(){n.removeClass(this._root,"_4_8");l.reset(this._root);}});e.exports=v;});
__d("ComposerXTimelineTagger",["Arbiter","Class","ComposerXStandardTagger","CSS","copyProperties","cx"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('Class'),i=b('ComposerXStandardTagger'),j=b('CSS'),k=b('copyProperties'),l=b('cx');function m(n){this.parent.construct(this,n);}h.extend(m,i);k(m.prototype,{init:function(n,o){this.parent.init(n);if(!o)o='backdateicon';this._datepicker=this.getTimelineDatepickerComponent(n);this._datepickerIcon=n.getComponent(o);if(this._datepickerIcon&&this._datepicker){this.registerTagger('date',this._datepicker,this._datepickerIcon);this._subscriptions.push(this._datepicker.instance.subscribe('changed',this._handleDateChanged.bind(this)));}g.inform('ComposerXTimelineTagger/init',{composerTimelineTagger:this,datePickerElement:this._datepicker?this._datepicker.element:null,datePickerInstance:this._datepicker?this._datepicker.instance:null},g.BEHAVIOR_STATE);},getTimelineDatepickerComponent:function(n){return n.getComponent('backdatepicker');},_handleDateChanged:function(){var n=this._datepicker.instance.isSet();j.conditionClass(this._datepickerIcon.element,"_t5",n);}});e.exports=m;});
__d("ComposerXProgressiveDatepickerReset",["CSS","ProgressiveDatepicker"],function(a,b,c,d,e,f){var g=b('CSS'),h=b('ProgressiveDatepicker');function i(j){j.instance._resetMenu(h.PERIODS.indexOf('year'));g.hide(j.element);}e.exports=i;});