define("app/ui/inline_edit",["module","require","exports","core/component"],function(module, require, exports) {
function inlineEdit(){var a=1.2;this.defaultAttrs({editableFieldSelector:".editable-field",profileFieldSelector:".profile-field",globalProfileFieldSelector:null,globalProfileFieldContainerSelector:null,measuringFieldSelector:".measuring-field",padding:20,extraCharsForMeasuring:""}),this.syncDimensions=function(){if(!this.$measuringField.length)return;var a=this.getDimensions(this.currentText());if(this.isTextArea){var b=Math.ceil(a.height/this.lineHeight);this.$editableField.attr("rows",b)}else this.$editableField.width(a.width+this.padding)},this.saveOldValues=function(){this.oldTextValue=this.editableFieldValue(),this.oldHtmlValue=this.$profileField.html()},this.resetProfileField=function(){this.$profileField.html(this.oldHtmlValue)},this.resetToOldValues=function(){this.$editableField.val(this.oldTextValue).trigger("uiInputChanged"),this.resetProfileField(),this.updateProfileFieldContainerVisibility()},this.syncValue=function(){var a=this.editableFieldValue();this.oldTextValue!==a&&(this.setProfileField(),this.trigger("uiInlineEditSave",{newValue:a,field:this.$editableField.attr("name")}))},this.setProfileField=function(){var a=this.editableFieldValue();this.truncateLength&&a.length>this.truncateLength&&(a=a.substr(0,this.truncateLength)+"…"),this.$profileField.text(a),this.updateProfileFieldContainerVisibility()},this.currentText=function(){return this.editableFieldValue()||this.getPlaceholderText()},this.editableFieldValue=function(){return this.$editableField.val()},this.updateProfileFieldContainerVisibility=function(){var a=this.editableFieldValue().trim()=="";this.$profileFieldContainer.toggleClass("u-hidden",a)},this.addPadding=function(){this.padding=this.attr.padding},this.removePadding=function(){this.padding=0},this.getDimensions=function(a){return this.truncateLength&&(a=a.substr(0,this.truncateLength)),this.prevText!==a&&(this.measureDimensions(a),this.prevText=a),{width:this.width,height:this.height}},this.measureDimensions=function(a){this.$measuringField.text(a+this.attr.extraCharsForMeasuring),this.height=this.$measuringField.height(),this.width=this.$measuringField.width()},this.preventNewlineAndLeadingSpace=function(a){if(a.keyCode===13||a.keyCode===32&&!this.editableFieldValue())a.preventDefault(),a.stopImmediatePropagation()},this.getPlaceholderText=function(){return this.$editableField.attr("placeholder")},this.closeOpenDropdowns=function(){this.trigger("uiEditProfileHideOptions")},this.after("initialize",function(){this.$editableField=this.select("editableFieldSelector"),this.$profileField=this.attr.globalProfileFieldSelector?$(this.attr.globalProfileFieldSelector):this.select("profileFieldSelector"),this.$measuringField=this.select("measuringFieldSelector"),this.$profileFieldContainer=$(this.attr.globalProfileFieldContainerSelector),this.lineHeight=parseInt(this.$profileField.css("line-height"),10)||parseInt(this.$profileField.css("font-size"),10)*a,this.isTextArea=this.$editableField.is("textarea"),this.truncateLength=parseInt(this.$editableField.attr("data-truncate-length"),10),this.padding=0,this.on(document,"uiEditProfileSaveFields",this.syncValue),this.on(document,"uiEditProfileStart",this.saveOldValues),this.on(document,"uiEditProfileCancel",this.resetToOldValues),this.on(document,"uiEditProfileStart",this.syncDimensions),this.on(document,"uiShowProfileEditError",this.resetProfileField),this.on(this.$editableField,"keydown",this.preventNewlineAndLeadingSpace),this.on(this.$editableField,"focus",this.closeOpenDropdowns),this.isTextArea||(this.on(this.$editableField,"focus",this.addPadding),this.on(this.$editableField,"blur",this.removePadding)),this.on(this.$editableField,"keyup focus blur update paste",this.syncDimensions)})}var defineComponent=require("core/component");module.exports=defineComponent(inlineEdit)
});
define("app/data/async_profile",["module","require","exports","core/component","app/data/with_data"],function(module, require, exports) {
function asyncProfileData(){this.defaultAttrs({noShowError:!0}),this.saveField=function(a,b){this.fields[b.field]=b.newValue},this.clearFields=function(){this.fields={}},this.saveFields=function(a,b){function c(a){if(a.error===!0)return d.call(this,a);this.trigger("dataInlineEditSaveSuccess",a),this.clearFields()}function d(a){this.trigger("dataInlineEditSaveError",a),this.clearFields()}a.preventDefault(),Object.keys(this.fields).length>0?(this.trigger("dataInlineEditSaveStarted",{}),this.fields.page_context=this.attr.pageName,this.fields.section_context=this.attr.sectionName,this.post({url:"/i/profiles/update",data:this.fields,eventData:b,success:c.bind(this),error:d.bind(this)})):this.trigger("dataInlineEditSaveSuccess")},this.after("initialize",function(){this.fields={},this.on("uiInlineEditSave",this.saveField),this.on("uiEditProfileSave",this.saveFields)})}var defineComponent=require("core/component"),withData=require("app/data/with_data");module.exports=defineComponent(asyncProfileData,withData)
});
define("app/ui/dialogs/profile_edit_error_dialog",["module","require","exports","core/component","core/i18n","app/ui/with_dialog"],function(module, require, exports) {
function profileEditErrorDialog(){this.defaultAttrs({okaySelector:".ok-btn",messageSelector:".profile-message"}),this.closeDialog=function(a,b){this.close()},this.showError=function(a,b){this.select("messageSelector").html(b.message),this.open()},this.after("initialize",function(){this.on(document,"uiShowProfileEditError",this.showError),this.on("click",{okaySelector:this.closeDialog})})}var defineComponent=require("core/component"),_=require("core/i18n"),withDialog=require("app/ui/with_dialog"),ProfileEditErrorDialog=defineComponent(profileEditErrorDialog,withDialog);module.exports=ProfileEditErrorDialog
});
define("app/ui/dialogs/profile_confirm_image_delete_dialog",["module","require","exports","core/component","app/ui/with_dialog","app/ui/with_verify_upload_type"],function(module, require, exports) {
function profileConfirmImageDeleteDialog(){this.defaultAttrs({removeSelector:".ok-btn",cancelSelector:".cancel-btn",uploadType:""}),this.removeImage=function(){this.disableButtons(),this.trigger("uiDeleteImage",{uploadType:this.attr.uploadType})},this.triggerHideDeleteLink=function(){this.trigger("uiHideDeleteLink",{uploadType:this.attr.uploadType})},this.disableButtons=function(){this.select("removeSelector").attr("disabled",!0),this.select("cancelSelector").stop(!0,!0).fadeOut()},this.enableButtons=function(){this.select("removeSelector").removeAttr("disabled"),this.select("cancelSelector").stop(!0,!0).show()},this.after("initialize",function(){this.on(document,"uiConfirmDeleteImage",this.verifyUploadType(this.open)),this.on(document,"dataDeleteImageSuccess",this.verifyUploadType(this.close)),this.on(document,"dataDeleteImageSuccess",this.verifyUploadType(this.triggerHideDeleteLink)),this.on(document,"dataDeleteImageFailure",this.verifyUploadType(this.enableButtons)),this.on("uiDialogClosed",this.enableButtons),this.on("click",{cancelSelector:this.close,removeSelector:this.removeImage})})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),withVerifyUploadType=require("app/ui/with_verify_upload_type");module.exports=defineComponent(profileConfirmImageDeleteDialog,withDialog,withVerifyUploadType)
});
define("app/ui/droppable_image",["module","require","exports","core/component","app/ui/with_drop_events","app/utils/image"],function(module, require, exports) {
function droppableImage(){this.defaultAttrs({uploadType:"",enableEvent:"uiEditProfileStart",disableEvent:"uiEditProfileEnd"}),this.triggerGotProfileImageData=function(a,b){this.trigger("uiGotProfileImageData",{name:a,contents:b,uploadType:this.attr.uploadType,wasDropped:!0})},this.getDroppedImageData=function(a,b){if(!this.editing)return;if(!b.file||b.file.type&&!b.file.type.match(/^image\//))return;a.stopImmediatePropagation();var c=b.file;image.getFileData(c.name,c,this.triggerGotProfileImageData.bind(this))},this.enableDrop=function(){this.editing=!0},this.disableDrop=function(){this.editing=!1},this.after("initialize",function(){this.editing=!1,this.on(document,this.attr.enableEvent,this.enableDrop),this.on(document,this.attr.disableEvent,this.disableDrop),this.on("uiDrop",this.getDroppedImageData)})}var defineComponent=require("core/component"),withDropEvents=require("app/ui/with_drop_events"),image=require("app/utils/image");module.exports=defineComponent(droppableImage,withDropEvents)
});
define("app/data/inline_edit_scribe",["module","require","exports","core/component","core/utils","app/data/with_scribe"],function(module, require, exports) {
function inlineEditScribe(){this.defaultAttrs({scribeContext:{component:"inline_edit"}}),this.scribeAction=function(a){var b=utils.merge(this.attr.scribeContext,{action:a});return function(a,c){this.scribe(b,c)}},this.after("initialize",function(){this.on("uiEditProfileStart",this.scribeAction("edit")),this.on("uiEditProfileCancel",this.scribeAction("cancel")),this.on("dataInlineEditSaveSuccess",this.scribeAction("success")),this.on("dataInlineEditSaveError",this.scribeAction("error"))})}var defineComponent=require("core/component"),utils=require("core/utils"),withScribe=require("app/data/with_scribe"),InlineEditScribe=defineComponent(inlineEditScribe,withScribe);module.exports=InlineEditScribe
});
define("app/data/drag_and_drop_scribe",["module","require","exports","core/component","core/utils","app/data/with_scribe"],function(module, require, exports) {
function dragAndDropScribe(){this.after("initialize",function(){this.scribeOnEvent("uiDropped",{action:"drag_and_drop"})})}var defineComponent=require("core/component"),utils=require("core/utils"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(dragAndDropScribe,withScribe)
});
define("app/ui/inline_profile_editing_initializor",["module","require","exports","core/component","app/utils/image","app/data/user_info"],function(module, require, exports) {
function inlineProfileEditingInitializor(){this.defaultAttrs({profileEditingCSSBundle:"",testForCssSelector:null,retryDelay:100,retryMax:20}),this.supportsInlineEditing=function(){return image.supportsCropper()||userInfo.getDecider("enableInlineEditingOnLegacyBrowsers")},this.initializeInlineProfileEditing=function(a,b){this.supportsInlineEditing()?using("css!"+this.attr.profileEditingCSSBundle,this.testForCssLoaded.bind(this,b.scribeElement)):this.navigateToOldSettingsPage()},this.editHeader=function(a,b){$(document).one("uiEditProfileStart",this.showHeaderOptions.bind(this)),this.trigger("uiEditProfileInitialize",{scribeElement:b.scribeElement})},this.showHeaderOptions=function(){this.trigger("uiShowEditHeaderOptions")},this.navigateToOldSettingsPage=function(){this.trigger("uiNavigate",{href:"/settings/profile"})},this.testForCssLoaded=function(a){!this.attr.testForCssSelector||$(this.attr.testForCssSelector).length?this.triggerStart(a):this.retryCount<this.attr.retryMax?(this.retryCount++,setTimeout(this.testForCssLoaded.bind(this,a),this.attr.retryDelay)):this.navigateToOldSettingsPage()},this.triggerStart=function(a){this.trigger("uiEditProfileStart",{scribeContext:{element:a}})},this.after("initialize",function(){this.retryCount=0,this.on(document,"uiEditProfileInitialize",this.initializeInlineProfileEditing),this.on(document,"uiEditProfileInitializeAndFocusOnHeaderOptions",this.editHeader)})}var defineComponent=require("core/component"),image=require("app/utils/image"),userInfo=require("app/data/user_info");module.exports=defineComponent(inlineProfileEditingInitializor)
});
define("app/utils/hide_or_show_divider",["module","require","exports"],function(module, require, exports) {
module.exports=function(b,c,d,e){var f=b.find(c),g=!!$.trim(b.find(d).text()),h=!!$.trim(b.find(e).text());g&&h?f.show():f.hide()}
});
define("app/ui/with_inline_image_options",["module","require","exports","app/utils/is_showing_avatar_options"],function(module, require, exports) {
function withInlineImageOptions(){this.defaultAttrs({editHeaderSelector:".edit-header-target",editAvatarSelector:".profile-picture",profileHeaderMaskSelector:".profile-header-mask",cancelOptionsSelector:".cancel-options",changePhotoSelector:"#choose-photo",changeHeaderSelector:"#choose-header",canToggleHeaderOptions:!1}),this.isShowingHeaderOptions=function(){return this.$body.hasClass("show-header-options")},this.optionsEnabled=function(){this.canShowOptions=!0},this.optionsDisabled=function(){this.canShowOptions=!1},this.toggleAvatarOptions=function(a){a.preventDefault(),this.hideHeaderOptions(),isShowingAvatarOptions()?this.hideAvatarOptions():this.showAvatarOptions()},this.showAvatarOptions=function(){this.canShowOptions&&!isShowingAvatarOptions()&&(this.$body.addClass("show-avatar-options"),this.trigger(this.select("changePhotoSelector"),"uiShouldShowDropdown"))},this.hideAvatarOptions=function(){this.$body.removeClass("show-avatar-options"),this.trigger(document,"uiForceDropdownClosed")},this.toggleHeaderOptions=function(a){a.preventDefault(),this.hideAvatarOptions(),this.isShowingHeaderOptions()?this.hideHeaderOptions():this.showHeaderOptions()},this.showHeaderOptions=function(){this.canShowOptions&&!this.$body.hasClass("show-header-options")&&(this.$body.addClass("show-header-options"),this.trigger(this.select("changeHeaderSelector"),"uiShouldShowDropdown"))},this.hideHeaderOptions=function(){this.$body.removeClass("show-header-options"),this.trigger(document,"uiForceDropdownClosed")},this.hideOptions=function(){this.hideHeaderOptions(),this.hideAvatarOptions()},this.after("initialize",function(){this.$body=$("body"),this.on("click",{editAvatarSelector:this.toggleAvatarOptions,editHeaderSelector:this.attr.canToggleHeaderOptions?this.toggleHeaderOptions:this.showHeaderOptions,profileHeaderMaskSelector:this.hideOptions,cancelOptionsSelector:this.hideOptions}),this.attr.canToggleHeaderOptions||this.on("uiDropdownCloseRequested",function(a){this.isShowingHeaderOptions()&&a.preventDefault()}),this.on("uiEditProfileStart",this.optionsEnabled),this.on("uiEditProfileEnd",this.optionsDisabled),this.on("uiProfileHeaderUpdated uiProfileAvatarUpdated uiEditProfileEnd uiEditProfileHideOptions",this.hideOptions),this.on(document,"uiShortcutEsc",this.hideOptions),this.on(document,"uiShowEditAvatarOptions",this.showAvatarOptions),this.on(document,"uiShowEditHeaderOptions",this.showHeaderOptions)})}var isShowingAvatarOptions=require("app/utils/is_showing_avatar_options");module.exports=withInlineImageOptions
});
define("app/ui/with_inline_image_editing",["module","require","exports","core/compose","app/utils/hide_or_show_divider","app/ui/with_inline_image_options"],function(module, require, exports) {
function withInlineImageEditing(){compose.mixin(this,[withInlineImageOptions]),this.defaultAttrs({avatarSelector:".avatar:first",avatarContainerSelector:".profile-picture:first",avatarPlaceholderSelector:".profile-picture-placeholder",hiddenClass:"hidden",removeFromPreview:".profile-editing-dialogs, .edit-header-target, input, label, textarea, .controls, .inline-edit-icon",avatarEditingSelector:".ProfileAvatarEditing",headerImageUploadDialogSelector:"#header_image_upload_dialog",headerCropperSelector:"#header_image_upload_dialog .cropper-mask",profileHeaderEditingClass:"is-editingHeader",profileHeaderInnerSelector:".ProfileCanopy-header",profileHeaderImageContainerSelector:".ProfileCanopy-headerBg",profileHeaderImageSelector:".ProfileCanopy-headerBg img",headerEditingSelector:".ProfileHeaderEditing",hasHeaderClass:"is-withHeader",iframeSavingClass:"is-iframeSaving"}),this.editHeaderModeOn=function(){this.$body.addClass(this.attr.profileHeaderEditingClass),this.hideHeaderOptions()},this.editHeaderModeOff=function(){this.$body.removeClass(this.attr.profileHeaderEditingClass),this.removeHeaderPreview()},this.removeHeaderPreview=function(){this.$headerPreview&&this.$headerPreview.remove()},this.updateImage=function(a,b){var c=this.getBase64orImgUrl(b);this.isOfType("header",b)&&this.updateHeader(c),this.isOfType("avatar",b)&&(this.select("avatarSelector").attr("src",c),this.showAvatar())},this.getBase64orImgUrl=function(a){return a.sourceEventData?"data:image/jpeg;base64,"+a.sourceEventData.fileData:a.status},this.updateHeader=function(a){var b=this.select("profileHeaderImageSelector");b.attr("src",a),b.removeClass(this.attr.hiddenClass),this.trigger("uiProfileHeaderUpdated"),this.select("headerEditingSelector").addClass(this.attr.hasHeaderClass)},this.useDefaultHeader=function(){this.select("profileHeaderImageSelector").addClass(this.attr.hiddenClass),this.select("headerEditingSelector").removeClass(this.attr.hasHeaderClass),this.trigger("uiProfileHeaderUpdated")},this.hasHeader=function(){return this.select("headerEditingSelector").hasClass(this.attr.hasHeaderClass)},this.showAvatar=function(){this.select("avatarContainerSelector").removeClass(this.attr.hiddenClass),this.select("avatarPlaceholderSelector").addClass(this.attr.hiddenClass),this.trigger("uiProfileAvatarUpdated"),this.select("avatarEditingSelector").addClass("is-withAvatar")},this.showAvatarPlaceholder=function(){this.select("avatarContainerSelector").addClass(this.attr.hiddenClass),this.select("avatarPlaceholderSelector").removeClass(this.attr.hiddenClass),this.trigger("uiProfileAvatarUpdated"),this.select("avatarEditingSelector").removeClass("is-withAvatar")},this.showDefaultImage=function(a,b){this.isOfType("avatar",b)&&this.showAvatarPlaceholder(),this.isOfType("header",b)&&this.useDefaultHeader()},this.isOfType=function(a,b){if(!b)return;return b.sourceEventData&&b.sourceEventData.uploadType===a||b.uploadType===a},this.showLargeCanopy=function(){this.trigger("uiShowLargeCanopy")},this.showNormalCanopy=function(){this.trigger(this.hasHeader()?"uiShowLargeCanopy":"uiShowSmallCanopy")},this.showSavingHelp=function(a,b){this.isOfType("header",b)?this.select("headerEditingSelector").addClass(this.attr.iframeSavingClass):this.isOfType("avatar",b)&&this.select("avatarEditingSelector").addClass(this.attr.iframeSavingClass)},this.hideSavingHelp=function(a,b){this.isOfType("header",b)?this.select("headerEditingSelector").removeClass(this.attr.iframeSavingClass):this.isOfType("avatar",b)&&this.select("avatarEditingSelector").removeClass(this.attr.iframeSavingClass)},this.after("initialize",function(){this.$body=$("body"),this.on("uiDialogOpened",{headerImageUploadDialogSelector:this.editHeaderModeOn}),this.on("uiDialogClosed",{headerImageUploadDialogSelector:this.editHeaderModeOff}),this.on(document,"dataSaveImageSuccess",this.updateImage),this.on(document,"dataDeleteImageSuccess",this.showDefaultImage),this.on(document,"uiEditProfileStart",this.showLargeCanopy),this.on(document,"uiEditProfileEnd",this.showNormalCanopy),this.on(document,"dataSaveImageWithAsyncIframeStart",this.showSavingHelp),this.on(document,"dataSaveImageWithAsyncIframeFinish",this.hideSavingHelp)})}var compose=require("core/compose"),hideOrShowDivider=require("app/utils/hide_or_show_divider"),withInlineImageOptions=require("app/ui/with_inline_image_options");module.exports=withInlineImageEditing
});
define("app/ui/inline_profile_editing",["module","require","exports","core/i18n","app/utils/animate_window_scrolltop","core/clock","core/component","app/utils/hide_or_show_divider","app/utils/params","app/ui/tooltips","app/ui/with_inline_image_editing","app/utils/with_keyboard_modality","app/ui/with_scrollbar_width"],function(module, require, exports) {
function inlineProfileEditing(){this.defaultAttrs({cancelProfileButtonSelector:".cancel-profile-btn",saveProfileButtonSelector:".save-profile-btn",saveProfileFooterSelector:".save-profile-footer",bioProfileFieldSelector:".bio.profile-field",locationSelector:".location",urlProfileFieldSelector:".url .profile-field",dividerSelector:".location-and-url .divider",anchorSelector:"a",ignoreInTabIndex:".js-tooltip",tooltipSelector:".js-tooltip",updateSaveMessage:_('Votre profil a \xe9t\xe9 sauvegard\xe9.'),scrollResetDuration:300,profileSavingClass:"profile-saving",profileEditingClass:"profile-editing",updateErrorMessage:_('Une erreur est survenue lors de la mise \xe0 jour de votre profil.'),useProfileErrorDialog:!0,firstActiveControlSelector:".ProfileCanopy",lastActiveControlSelector:".ProfilePage-editingButtons",firstEditableFieldSelector:".ProfileHeaderCardEditing"}),this.saveProfile=function(a,b){a.preventDefault(),this.trigger("uiEditProfileSaveFields"),this.trigger("uiEditProfileSave")},this.cancelProfileEditing=function(a,b){a.preventDefault();var c=$(a.target).attr("data-scribe-element");this.trigger("uiEditProfileCancel",{scribeContext:{element:c}}),this.trigger("uiEditProfileEnd")},this.isEditing=function(){return this.$body.hasClass(this.attr.profileEditingClass)},this.editModeOn=function(){animateWinScrollTop(0,this.attr.scrollResetDuration,function(){this.trigger(document,"uiProfileEditingOn")}.bind(this)),this.calculateScrollbarWidth(),this.$body.addClass(this.attr.profileEditingClass)},this.editModeOff=function(){this.$body.removeClass(this.attr.profileEditingClass),this.trigger(document,"uiProfileEditingOff")},this.fieldEditingModeOn=function(){this.$body.addClass("profile-field-editing"),this.select("dividerSelector").show()},this.fieldEditingModeOff=function(){this.$body.removeClass("profile-field-editing"),hideOrShowDivider(this.$node,this.attr.dividerSelector,this.attr.locationSelector,this.attr.urlProfileFieldSelector)},this.catchAnchorClicks=function(a){var b=$(a.target).attr("target")=="_blank";this.isEditing()&&!b&&a.preventDefault()},this.focusFirstActiveControl=function(a){this.focusNextAvailableControl("first",this.select("firstActiveControlSelector")),a.preventDefault()},this.focusLastActiveControl=function(a){this.focusNextAvailableControl("last",this.select("lastActiveControlSelector")),a.preventDefault()},this.disabledTabbing=function(){this.select("ignoreInTabIndex").attr("tabindex","-1"),this.createFirstLastTabStop(this.$node,1,4),this.focusNextAvailableControl("first",this.select("firstEditableFieldSelector")),this.on(this.$node.find(this.attr.lastTabStopSelector),"focus",this.focusFirstActiveControl),this.on(this.$node.find(this.attr.firstTabStopSelector),"focus",this.focusLastActiveControl)},this.enableTabbing=function(){this.select("ignoreInTabIndex").removeAttr("tabindex"),this.removeFirstLastTabStop(this.$node),this.off(this.$node.find(this.attr.lastTabStopSelector),"focus",this.focusFirstActiveControl),this.off(this.$node.find(this.attr.firstTabStopSelector),"focus",this.focusLastActiveControl)},this.saving=function(){this.$body.addClass(this.attr.profileSavingClass)},this.handleError=function(a,b){this.doneSaving(),this.fieldEditingModeOn();var c={message:b.message||this.attr.updateErrorMessage};this.trigger("uiShowProfileEditError",c),this.attr.useProfileErrorDialog||this.trigger("uiShowError",c)},this.savingError=function(a,b){clock.setTimeoutEvent("uiHandleSaveError",1e3,{message:b.message})},this.saveSuccess=function(a,b){this.doneSaving(),this.trigger("uiShowMessage",{message:this.attr.updateSaveMessage}),this.trigger("uiEditProfileSuccess")},this.doneSaving=function(){this.$body.removeClass(this.attr.profileSavingClass)},this.disableTooltips=function(){this.select("tooltipSelector").tooltip("disable").tooltip("hide")},this.enableTooltips=function(){this.select("tooltipSelector").tooltip("enable")},this.finishedProcessing=function(a,b){b&&b.linkified_description&&this.select("bioProfileFieldSelector").html(b.linkified_description),b&&b.user_url&&this.select("urlProfileFieldSelector").html(b.user_url),this.trigger("uiEditProfileEnd")},this.after("initialize",function(){this.$body=$("body"),this.on("click",{cancelProfileButtonSelector:this.cancelProfileEditing,saveProfileButtonSelector:this.saveProfile,anchorSelector:this.catchAnchorClicks}),this.on("uiEditProfileStart",this.editModeOn),this.on("uiEditProfileEnd",this.editModeOff),this.on("uiEditProfileStart",this.disableTooltips),this.on("uiEditProfileEnd",this.enableTooltips),this.on("uiEditProfileStart",this.fieldEditingModeOn),this.on("uiEditProfileSave",this.fieldEditingModeOff),this.on("uiEditProfileEnd",this.fieldEditingModeOff),this.on("uiEditProfileStart",this.disabledTabbing),this.on("uiEditProfileEnd",this.enableTabbing),this.on(document,"dataInlineEditSaveStarted",this.saving),this.on(document,"dataInlineEditSaveSuccess",this.saveSuccess),this.on(document,"dataInlineEditSaveError",this.savingError),this.on(document,"uiHandleSaveError",this.handleError),this.on(document,"dataInlineEditSaveSuccess",this.finishedProcessing)})}var _=require("core/i18n"),animateWinScrollTop=require("app/utils/animate_window_scrolltop"),clock=require("core/clock"),defineComponent=require("core/component"),hideOrShowDivider=require("app/utils/hide_or_show_divider"),params=require("app/utils/params"),Tooltips=require("app/ui/tooltips"),withInlineImageEditing=require("app/ui/with_inline_image_editing"),withKeyboardModality=require("app/utils/with_keyboard_modality"),withScrollbarWidth=require("app/ui/with_scrollbar_width");module.exports=defineComponent(inlineProfileEditing,withScrollbarWidth,withInlineImageEditing,withKeyboardModality)
});
define("app/ui/profile_edit_param",["module","require","exports","core/component","app/utils/params"],function(module, require, exports) {
function profileEditParam(){this.defaultAttrs({editHeaderParam:"edit_header",editParam:"edit"}),this.hasParam=function(a){return!!params.fromQuery(window.location)[a]},this.hasEditParam=function(){return this.hasParam(this.attr.editParam)},this.hasEditHeaderParam=function(){return this.hasParam(this.attr.editHeaderParam)},this.checkEditParam=function(){this.hasEditParam()?this.trigger("uiEditProfileInitialize",{scribeElement:"edit_param"}):this.hasEditHeaderParam()&&this.trigger("uiEditProfileInitializeAndFocusOnHeaderOptions",{scribeElement:"edit_header_param"})},this.after("initialize",function(){this.on(document,"uiSwiftLoaded uiPageChanged",this.checkEditParam)})}var defineComponent=require("core/component"),params=require("app/utils/params");module.exports=defineComponent(profileEditParam)
});
define("app/ui/edit_header_button",["module","require","exports","core/component","app/ui/with_verify_upload_type"],function(module, require, exports) {
function editHeaderButton(){this.defaultAttrs({scribeElement:"add_header_button",uploadType:"header"}),this.initializeAndEditHeader=function(a,b){this.trigger("uiEditProfileInitializeAndFocusOnHeaderOptions",{scribeElement:this.attr.scribeElement})},this.switchToHeaderPresentState=function(a,b){this.$node.addClass("has-header")},this.switchToHeaderAbsentState=function(a,b){this.$node.removeClass("has-header")},this.after("initialize",function(){this.on("click",this.initializeAndEditHeader),this.on(document,"dataDeleteImageSuccess",this.verifyUploadType(this.switchToHeaderAbsentState)),this.on(document,"dataSaveImageSuccess",this.verifyUploadType(this.switchToHeaderPresentState))})}var defineComponent=require("core/component"),withVerifyUploadType=require("app/ui/with_verify_upload_type");module.exports=defineComponent(editHeaderButton,withVerifyUploadType)
});
define("app/boot/inline_edit",["module","require","exports","app/ui/inline_edit","app/data/async_profile","app/ui/dialogs/profile_image_upload_dialog","app/ui/dialogs/profile_edit_error_dialog","app/ui/dialogs/profile_confirm_image_delete_dialog","app/ui/droppable_image","app/data/inline_edit_scribe","app/data/settings/profile_image_upload_scribe","app/data/drag_and_drop_scribe","app/ui/settings/change_photo","app/ui/image_uploader","app/ui/inline_profile_editing_initializor","app/ui/inline_profile_editing","app/data/settings","app/utils/image","app/ui/profile_edit_param","app/ui/edit_header_button","app/ui/alert_banner_to_message_drawer","core/i18n"],function(module, require, exports) {
var InlineEdit=require("app/ui/inline_edit"),AsyncProfileData=require("app/data/async_profile"),ProfileImageUploadDialog=require("app/ui/dialogs/profile_image_upload_dialog"),ProfileEditErrorDialog=require("app/ui/dialogs/profile_edit_error_dialog"),ProfileConfirmImageDeleteDialog=require("app/ui/dialogs/profile_confirm_image_delete_dialog"),DroppableImage=require("app/ui/droppable_image"),InlineEditScribe=require("app/data/inline_edit_scribe"),ProfileImageUploadScribe=require("app/data/settings/profile_image_upload_scribe"),DragAndDropScribe=require("app/data/drag_and_drop_scribe"),ChangePhoto=require("app/ui/settings/change_photo"),ImageUploader=require("app/ui/image_uploader"),InlineProfileEditingInitializor=require("app/ui/inline_profile_editing_initializor"),InlineProfileEditing=require("app/ui/inline_profile_editing"),SettingsData=require("app/data/settings"),image=require("app/utils/image"),ProfileEditParam=require("app/ui/profile_edit_param"),EditHeaderButton=require("app/ui/edit_header_button"),AlertBannerToMessageDrawer=require("app/ui/alert_banner_to_message_drawer"),_=require("core/i18n");module.exports=function(b){InlineProfileEditingInitializor.attachTo(".profile-page-header",b);if(image.supportsCropper()){AlertBannerToMessageDrawer.attachTo(document),ProfileEditErrorDialog.attachTo("#profile_edit_error_dialog",{top:0,left:0}),InlineProfileEditing.attachTo(".profile-page-header",b),SettingsData.attachTo(document,b),AsyncProfileData.attachTo(document,b),InlineEdit.attachTo(".profile-page-header .editable-group"),InlineEditScribe.attachTo(document),ProfileImageUploadScribe.attachTo("#profile_image_upload_dialog"),ProfileImageUploadScribe.attachTo("#header_image_upload_dialog"),DragAndDropScribe.attachTo(document);var c={scribeContext:{component:"profile_image_upload"}};ProfileConfirmImageDeleteDialog.attachTo("#avatar_confirm_remove_dialog",{top:0,left:0,uploadType:"avatar"}),ImageUploader.attachTo(".avatar-settings .uploader-image .photo-selector",{maxSizeInBytes:10485760,fileTooBigMessage:_('Veuillez s\xe9lectionner une image de profil qui fait moins de 10 Mo.'),uploadType:"avatar",eventData:c}),ProfileImageUploadDialog.attachTo("#profile_image_upload_dialog",{uploadType:"avatar",eventData:c,maximumWidth:b.maxAvatarUploadDimension,maximumHeight:b.maxAvatarUploadDimension}),ChangePhoto.attachTo("#choose-photo",{uploadType:"avatar",alwaysOpen:!0,confirmDelete:!0,eventData:c}),DroppableImage.attachTo(".profile-page-header .profile-picture",{uploadType:"avatar",eventData:c});var d={scribeContext:{component:"header_image_upload"}};ProfileConfirmImageDeleteDialog.attachTo("#header_confirm_remove_dialog",{top:0,left:0,uploadType:"header"}),ImageUploader.attachTo(".header-settings .uploader-image .photo-selector",{fileNameString:"user[profile_header_image_name]",fileDataString:"user[profile_header_image]",fileInputString:"user[profile_header_image]",uploadType:"header",maxSizeInBytes:1024e4,fileTooBigMessage:_('Veuillez s\xe9lectionner une image qui fait moins de 10 Mo.'),onError:function(){window.scrollTo(0,0)},eventData:d}),ProfileImageUploadDialog.attachTo("#header_image_upload_dialog",{uploadType:"header",maskPadding:0,top:0,left:0,maximumWidth:1252,maximumHeight:626,imageNameSelector:"#choose-header div.photo-selector input.file-name",imageDataSelector:"#choose-header div.photo-selector input.file-data",eventData:d}),ChangePhoto.attachTo("#choose-header",{uploadType:"header",chooseExistingSelector:"#header-choose-existing",chooseWebcamSelector:"#header-choose-webcam",deleteImageSelector:"#header-delete-image",alwaysOpen:!0,confirmDelete:!0,eventData:d}),DroppableImage.attachTo(".profile-page-header .profile-header-inner",{uploadType:"header",eventData:d}),EditHeaderButton.attachTo(".enhanced-mini-profile-camera-button .edit-header-trigger")}ProfileEditParam.attachTo(".profile-page-header")}
});
define("app/ui/profile/canopy",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
function profileCanopy(){this.defaultAttrs({verticalThreshold:280,retractedCanopyClass:"retracted"}),this.belowVerticalThreshhold=function(){return this.$window.scrollTop()>=this.attr.verticalThreshold},this.determineCanopyPresence=function(){var a=this.$node.hasClass(this.attr.retractedCanopyClass);this.belowVerticalThreshhold()?a&&this.trigger("uiShowProfileCanopy"):a||this.trigger("uiHideProfileCanopy")},this.showCanopyAfterModal=function(){this.belowVerticalThreshhold()&&this.showProfileCanopy()},this.hideCanopyBeforeModal=function(){this.belowVerticalThreshhold()&&this.hideProfileCanopy()},this.showProfileCanopy=function(){this.$node.removeClass(this.attr.retractedCanopyClass)},this.hideProfileCanopy=function(){this.$node.addClass(this.attr.retractedCanopyClass)},this.after("initialize",function(){this.$window=$(window),this.$node.removeClass("hidden"),this.on("uiShowProfileCanopy",this.showProfileCanopy),this.on("uiHideProfileCanopy",this.hideProfileCanopy),this.on(window,"scroll",utils.throttle(this.determineCanopyPresence.bind(this))),this.on(document,"uiShowProfilePopup",this.hideCanopyBeforeModal),this.on(document,"uiCloseProfilePopup",this.showCanopyAfterModal),this.determineCanopyPresence()})}var defineComponent=require("core/component"),utils=require("core/utils");module.exports=defineComponent(profileCanopy)
});
define("app/data/profile_canopy_scribe",["module","require","exports","core/component","core/utils","app/data/with_scribe"],function(module, require, exports) {
function profileCanopyScribe(){this.defaultAttrs({scribeContext:{component:"profile_canopy"}}),this.scribeProfileCanopy=function(a,b){var c=utils.merge(this.attr.scribeContext,{action:"impression"});this.scribe(c,b)},this.after("initialize",function(){this.on("uiShowProfileCanopy",this.scribeProfileCanopy)})}var defineComponent=require("core/component"),utils=require("core/utils"),withScribe=require("app/data/with_scribe"),ProfileCanopyScribe=defineComponent(profileCanopyScribe,withScribe);module.exports=ProfileCanopyScribe
});
define("app/ui/profile/head",["module","require","exports","core/component","core/i18n","app/ui/with_user_actions","app/ui/with_profile_stats","app/ui/with_handle_overflow","core/utils"],function(module, require, exports) {
function profileHead(){this.defaultAttrs({profileHead:!0,isCanopy:!1,editProfileButtonInlineSelector:".inline-edit-profile-btn",nonEmptyAvatarSelector:".profile-picture .avatar:not(.empty-avatar)",emptyAvatarSelector:".profile-picture .empty-avatar",overflowContainer:".profile-header-inner",itemType:"user",fullNameSelector:".fullname",usernameSelector:".username",urlSelector:".url a",locationSelector:".location a"}),this.showAvatarModal=function(a){a.preventDefault(),this.isEditing()||(this.trigger("uiAvatarClicked"),this.trigger(a.target,"uiOpenGallery",{title:_('Photo de profil de @{{screenName}}',{screenName:this.attr.profile_user.screen_name})}))},this.emptyAvatarClicked=function(a){if(!this.isEditing()){a.preventDefault(),a.stopImmediatePropagation();var b=$(a.target).attr("data-scribe-element");$(document).one("uiEditProfileStart",this.showAvatarOptions.bind(this)),this.trigger("uiEditProfileInitialize",{scribeElement:b})}},this.showAvatarOptions=function(){this.trigger("uiShowEditAvatarOptions")},this.editProfileInline=function(a){a.preventDefault();var b=$(a.target).attr("data-scribe-element");this.trigger(document,"uiEditProfileInitialize",{scribeElement:b})},this.isEditing=function(){return $("body").hasClass("profile-editing")},this.fullNameClicked=function(){this.trigger("uiFullNameClicked")},this.usernameClicked=function(){this.trigger("uiUsernameClicked")},this.urlClicked=function(){this.trigger("uiUrlClicked")},this.locationClicked=function(a,b){var c=$(a.target),d=c.data("place-id"),e={scribeData:{message:d}};this.trigger("uiLocationClicked",e)},this.notifyDropdownToHide=function(){this.trigger("uiCloseDropdowns")},this.after("initialize",function(){this.checkForOverflow(this.select("overflowContainer")),this.on("click",{nonEmptyAvatarSelector:this.showAvatarModal,emptyAvatarSelector:this.emptyAvatarClicked,editProfileButtonInlineSelector:this.editProfileInline,fullNameSelector:this.fullNameClicked,usernameSelector:this.usernameClicked,urlSelector:this.urlClicked,locationSelector:this.locationClicked}),this.attr.isCanopy&&this.on("uiHideProfileCanopy",this.notifyDropdownToHide),this.attr.eventData=utils.merge(this.attr.eventData||{},{scribeContext:this.attr.scribeContext,profileHead:this.attr.profileHead})})}var defineComponent=require("core/component"),_=require("core/i18n"),withUserActions=require("app/ui/with_user_actions"),withProfileStats=require("app/ui/with_profile_stats"),withHandleOverflow=require("app/ui/with_handle_overflow"),utils=require("core/utils");module.exports=defineComponent(profileHead,withUserActions,withProfileStats,withHandleOverflow)
});
define("app/data/profile_head_scribe",["module","require","exports","core/component","core/utils","app/data/with_scribe"],function(module, require, exports) {
function profileHeadScribe(){this.after("initialize",function(){this.scribeOnEvent("uiAvatarClicked",{element:"avatar",action:"click"}),this.scribeOnEvent("uiFullNameClicked",{element:"fullname",action:"click"}),this.scribeOnEvent("uiUsernameClicked",{element:"username",action:"click"}),this.scribeOnEvent("uiUrlClicked",{element:"url",action:"click"}),this.scribeOnEvent("uiLocationClicked",{element:"place_tag",action:"click"})})}var defineComponent=require("core/component"),utils=require("core/utils"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(profileHeadScribe,withScribe)
});
define("app/ui/profile/social_proof",["module","require","exports","core/component","app/ui/with_item_actions"],function(module, require, exports) {
function profileSocialProof(){this.defaultAttrs({socialProofAvatarSelector:".social-proof .avatar",followersYouFollowSelector:".followers-you-follow",itemType:"user"}),this.socialProofAvatarClick=function(a,b){this.trigger("uiSocialProofAvatarClick")},this.viewAllFollowersYouFollow=function(a,b){this.trigger("uiFollowersYouFollowLink")},this.after("initialize",function(){this.trigger("uiHasProfileSocialProof"),this.on("click",{socialProofAvatarSelector:this.socialProofAvatarClick,followersYouFollowSelector:this.viewAllFollowersYouFollow})})}var defineComponent=require("core/component"),withItemActions=require("app/ui/with_item_actions"),ProfileSocialProof=defineComponent(profileSocialProof,withItemActions);module.exports=ProfileSocialProof
});
define("app/data/profile_social_proof_scribe",["module","require","exports","core/component","core/utils","app/data/with_scribe"],function(module, require, exports) {
function profileSocialProofScribe(){this.defaultAttrs({scribeContext:{component:"profile_follow_card"}}),this.scribeProfileSocialProof=function(a,b){var c=utils.merge(this.attr.scribeContext,{element:"social_proof",action:"impression"});this.scribe(c,b)},this.scribeSocialProofAvatarClick=function(a,b){var c=utils.merge(this.attr.scribeContext,{element:"social_proof_avatar",action:"click"});this.scribe(c,b)},this.scribeFollowersYouFolowClick=function(a,b){var c=utils.merge(this.attr.scribeContext,{element:"followers_you_follow",action:"click"});this.scribe(c,b)},this.after("initialize",function(){this.on("uiHasProfileSocialProof",this.scribeProfileSocialProof),this.on("uiSocialProofAvatarClick",this.scribeSocialProofAvatarClick),this.on("uiFollowersYouFollowLink",this.scribeFollowersYouFolowClick)})}var defineComponent=require("core/component"),utils=require("core/utils"),withScribe=require("app/data/with_scribe"),ProfileSocialProofScribe=defineComponent(profileSocialProofScribe,withScribe);module.exports=ProfileSocialProofScribe
});
define("app/ui/media/card_thumbnails",["module","require","exports","core/component","core/utils","app/utils/image_thumbnail","app/utils/image/image_loader","core/i18n"],function(module, require, exports) {
function cardThumbnails(){var a=800,b={NOT_LOADED:"not-loaded",LOADING:"loading",LOADED:"loaded"};this.hasMoreItems=!0,this.defaultAttrs({profileUser:!1,mediaGrid:!1,mediaGridOpen:!1,gridPushState:!1,pushStateUrl:"/",defaultGalleryTitle:_('Galerie de M\xe9dias'),viewAllSelector:".list-link",thumbnailSelector:".media-thumbnail",thumbnailContainerSelector:".photo-list",thumbnailPlaceholderSelector:".thumbnail-placeholder.first",thumbnailNotLoadedSelector:'.media-thumbnail[data-load-status="'+b.NOT_LOADED+'"]',thumbnailType:"thumb",thumbnailSize:90,thumbnailsVisible:6,showAllInlineMedia:!1,loadOnEventName:"uiLoadThumbnails",dataEvents:{requestItems:"uiWantsMoreMediaTimelineItems",gotItems:"dataGotMoreMediaTimelineItems"},defaultRequestData:{}}),this.thumbs=function(){return this.select("thumbnailSelector")},this.getMaxId=function(){var a=this.thumbs();if(a.length)return a.last().attr("data-status-id")},this.shouldGetMoreItems=function(a){var b=$(a.target);if(b.attr("data-paged"))return;this.getMoreItems()},this.getMoreItems=function(){if(!this.hasMoreItems)return;var a=this.thumbs();a.attr("data-paged",!0),this.trigger(document,this.attr.dataEvents.requestItems,utils.merge(this.attr.defaultRequestData,{max_id:this.maxId||this.getMaxId(),for_photo_rail:!0}))},this.gotMoreItems=function(a,b){if(b.items_html&&$.trim(b.items_html).length){var c=$.isArray(b.items_html)?$(b.items_html.join("")):$(b.items_html);this.appendItems(c)}else this.hasMoreItems=!1;this.trigger(document,"dataGotMoreMediaItems",b),this.select("thumbnailSelector").length<this.attr.thumbnailsVisible&&this.hasMoreItems&&this.getMoreItems()},this.appendItems=function(a){this.attr.gridPushState&&(a.addClass("js-nav"),a.attr("href",this.attr.pushStateUrl)),this.select("thumbnailPlaceholderSelector").before(a),this.updateMaxId(),this.removeUnsupportedTypes(),this.renderVisible()},this.updateMaxId=function(){this.maxId=this.getMaxId()},this.removeUnsupportedTypes=function(){this.select("thumbnailSelector").each(function(a,b){$(b).attr("data-card-type")==="summary"&&$(b).remove()})},this.renderVisible=function(){var a=this.select("thumbnailSelector").slice(0,this.attr.thumbnailsVisible),b=a.filter(this.attr.thumbnailNotLoadedSelector);if(b.length){this.loadThumbs(b);var c={thumbnails:[]};b.each(function(a,b){c.thumbnails.push($(b).attr("data-url"))}),this.trigger("uiMediaThumbnailsVisible",c)}else a.length>0&&this.showThumbs();var c={thumbnails:[]};b.each(function(a,b){c.thumbnails.push($(b).attr("data-url"))}),this.trigger("uiMediaThumbnailsVisible",c)},this.loadThumbs=function(a){a.attr("data-load-status",b.LOADING),a.each(this.loadThumb.bind(this))},this.loadThumb=function(a,b){var c=$(b),d=function(a){this.loadThumbSuccess(c,a)}.bind(this),e=function(){this.loadThumbFail(c)}.bind(this);imageLoader.load(c.attr("data-resolved-url-"+this.attr.thumbnailType),d,e)},this.loadThumbSuccess=function(a,c){a.attr("data-load-status",b.LOADED),c.css(imageThumbnail.getThumbnailOffset(c.get(0).height,c.get(0).width,this.attr.thumbnailSize)),a.append(c),this.showThumbs()},this.loadThumbFail=function(a){a.remove(),this.renderVisible()},this.showThumbs=function(){this.$node.show(),this.$node.attr("data-loaded",!0),this.gridAutoOpen()},this.thumbnailClick=function(a){a.stopPropagation(),a.preventDefault(),this.openGallery(a.target);var b=$(a.target),c=b.hasClass("video")?"video":"photo";this.trigger("uiMediaThumbnailClick",{url:b.attr("data-url"),mediaType:c})},this.gridAutoOpen=function(){this.attr.mediaGrid&&this.attr.mediaGridOpen&&this.thumbs().length&&this.viewGrid()},this.viewAllClick=function(a){this.attr.mediaGrid?this.trigger("uiMediaViewAllClick"):(this.openGallery(this.thumbs()[0]),a.preventDefault())},this.showThumbs=function(){this.$node.show(),this.$node.attr("data-loaded",!0),this.attr.mediaGridOpen&&(this.attr.mediaGridOpen=!1,this.viewGrid())},this.viewGrid=function(){this.openGrid(this.thumbs()[0])},this.openGrid=function(a){this.trigger(a,"uiOpenGrid",{gridTitle:this.attr.defaultGalleryTitle,profileUser:this.attr.profileUser})},this.openGallery=function(a){this.trigger(a,"uiOpenGallery",{gridTitle:this.attr.defaultGalleryTitle,showGrid:this.attr.mediaGrid,profileUser:this.attr.profileUser})},this.removeThumbs=function(){this.thumbs().remove()},this.before("teardown",this.removeThumbs),this.after("initialize",function(){this.$node.attr("data-loaded")||(this.$node.hide(),this.trigger("uiMediaThumbnailsVisible",{thumbnails:[]}),this.thumbs().length>0&&this.renderVisible()),this.on("click",{thumbnailSelector:this.thumbnailClick,viewAllSelector:this.viewAllClick}),this.gridAutoOpen(),this.on(document,this.attr.dataEvents.gotItems,this.gotMoreItems),this.on("uiGalleryMediaLoad",this.shouldGetMoreItems),this.attr.showAllInlineMedia?this.getMoreItems():this.on(document,"uiReloadThumbs",this.getMoreItems)})}var defineComponent=require("core/component"),utils=require("core/utils"),imageThumbnail=require("app/utils/image_thumbnail"),imageLoader=require("app/utils/image/image_loader"),_=require("core/i18n"),CardThumbnails=defineComponent(cardThumbnails);module.exports=CardThumbnails
});
define("app/data/media_timeline",["module","require","exports","core/component","app/data/with_data"],function(module, require, exports) {
function mediaTimeline(){this.requestItems=function(a,b){var c={},d={since_id:b.since_id,max_id:b.max_id,for_photo_rail:b.for_photo_rail};this.attr.forceT1Media&&(d.force_t1_media=!0),this.get({url:this.attr.endpoint,headers:c,data:d,eventData:b,success:"dataGotMoreMediaTimelineItems",error:"dataGotMoreMediaTimelineItemsError"})},this.after("initialize",function(){this.on(document,"uiWantsMoreMediaTimelineItems",this.requestItems)})}var defineComponent=require("core/component"),withData=require("app/data/with_data");module.exports=defineComponent(mediaTimeline,withData)
});
define("app/ui/suggested_users",["module","require","exports","core/component","app/ui/with_user_actions","app/ui/with_item_actions","app/ui/with_interaction_data"],function(module, require, exports) {
function suggestedUsers(){this.defaultAttrs({closeSelector:".js-close",itemType:"user",userSelector:".js-actionable-user",targetSelector:"#suggested-users",childSelector:"",followedButtonSelector:".stream-item .following",lastStreamItemSelector:".stream-end-item",streamItemSelector:".stream-item",streamItemsSelector:"#suggested-users .stream-item",refreshAnimationDuration:200,isClusterFollowReplenishEnabled:!1}),this.getTimelineNodeSelector=function(a){return this.attr.targetSelector+(a?'[data-item-id="'+a+'"]':"")+" "+this.attr.childSelector},this.getPosition=function(a){var b=$(this.attr.streamItemsSelector);return b.index(a.closest(this.attr.streamItemSelector))+1},this.replaceSuggestedUser=function(a,b){var c=$(this.attr.targetSelector).find(this.attr.followedButtonSelector).closest(this.attr.userSelector);if(c.length===0)return;var d=this.getPosition(c),e=$(b.html).find(this.attr.userSelector),f=this.attr.refreshAnimationDuration;c.fadeOut(f,function(){c.replaceWith(e.hide()),e.fadeIn(f)});var g=[this.interactionData(e,{position:d})],h=[{id:e.attr("data-user-id"),impressionId:e.attr("data-impression-id")}];this.trigger("uiSuggestedUsersRendered",{isReplacement:!0,items:g,user_id:b.sourceEventData.userId}),this.trigger("uiUsersDisplayed",{users:h})},this.slideInUsersList=function(a,b){if(this.$node.hasClass("has-content"))return;this.$node.addClass("has-content"),this.$node.html(b.html);var c=this.$node.outerHeight(),d=$(window).scrollTop();d>this.$node.position().top+c?$(window).scrollTop(d+c):this.$node.hide().slideDown();var e=this.$node.find(this.attr.userSelector),f=e.map(function(a,b){return this.interactionData($(b),{position:a})}.bind(this)).get(),g=e.map(function(a,b){var c=$(b);return{id:c.attr("data-user-id"),impressionId:c.attr("data-impression-id")}}).get();this.trigger("uiSuggestedUsersRendered",{items:f,user_id:b.sourceEventData.userId}),this.trigger("uiUsersDisplayed",{users:g})},this.isClusterFollowAction=function(a){return a.closest(this.attr.targetSelector).length>0},this.handleClusterFollow=function(a,b){this.isClusterFollowAction($(a.target))&&this.attr.isClusterFollowReplenishEnabled&&this.trigger("uiGetClusterFollowReplacementSuggestion",{isReplacement:!0})},this.handleSuggestedUsersResults=function(a,b){b.isReplacement?this.replaceSuggestedUser(a,b):this.slideInUsersList(a,b)},this.slideOutContent=function(a,b){this.$node.slideUp(function(){this.$node.empty().show(),this.$node.removeClass("has-content")}.bind(this))},this.after("initialize",function(){this.on(document,"dataSuggestedUsersSuccess",this.handleSuggestedUsersResults),this.on(document,"uiFollowAction",this.handleClusterFollow),this.on("click",{closeSelector:this.slideOutContent})})}var defineComponent=require("core/component"),withUserActions=require("app/ui/with_user_actions"),withItemActions=require("app/ui/with_item_actions"),withInteractionData=require("app/ui/with_interaction_data");module.exports=defineComponent(suggestedUsers,withUserActions,withItemActions,withInteractionData)
});
define("app/data/suggested_users",["module","require","exports","core/component","app/data/with_data","core/utils","app/data/with_interaction_data_scribe"],function(module, require, exports) {
function suggestedUsersData(){this.shouldPerformRequest=function(a){return a&&(a.profileHead||a.isReplacement)},this.getLimit=function(a){return a.isReplacement?1:3},this.getHTML=function(a,b){function c(a){a.html&&(a.isReplacement=b.isReplacement,this.trigger("dataSuggestedUsersSuccess",a))}if(!this.shouldPerformRequest(b))return;this.get({url:"/i/users/suggested_users",data:{user_id:b.userId,pc:!0,limit:this.getLimit(b),display_location:"cluster-follow"},eventData:b,success:c.bind(this),error:"dataSuggestedUsersFailure"})},this.scribeSuggestedUserResults=function(a,b){var c=b.isReplacement?"newer":"initial";this.scribeInteractiveResults({element:c,action:"results"},b.items,b,{referring_event:c,profile_id:b.user_id})},this.after("initialize",function(a,b){this.on("uiSuggestedUsersRendered",this.scribeSuggestedUserResults),this.on("uiFollowAction uiGetClusterFollowReplacementSuggestion",this.getHTML)})}var defineComponent=require("core/component"),withData=require("app/data/with_data"),utils=require("core/utils"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe");module.exports=defineComponent(suggestedUsersData,withData,withInteractionDataScribe)
});
define("app/ui/profile/alcohol_brand_follower_notification",["module","require","exports","core/component"],function(module, require, exports) {
function alcoholBrandFollowerNotification(){this.after("initialize",function(){var a=this.attr.profile_user_follows_alcohol_brand;a&&this.$node.trigger("uiShowStickyMessage",{message:a})})}var defineComponent=require("core/component"),AlcoholBrandFollowerNotification=defineComponent(alcoholBrandFollowerNotification);module.exports=AlcoholBrandFollowerNotification
});
define("app/ui/profile/auto_signup_dialog",["module","require","exports","core/component","app/utils/storage/with_expiry"],function(module, require, exports) {
function autoSignupDialog(){this.namespace="signup_dialog",this.storageKey="until",this.possiblyShowDialog=function(){this.isExpired(this.storageKey)&&(this.showDialog(),this.clear(),this.updateComponentTTL())},this.showDialog=function(){this.trigger("uiOpenSigninOrSignupDialog")},this.updateComponentTTL=function(){var a=1e4,b=864e5;this.attr.environment=="selenium"?this.updateTTL(this.storageKey,a):this.updateTTL(this.storageKey,b)},this.after("initialize",function(){this.on(document,"uiSwiftLoaded uiPageChanged",this.possiblyShowDialog)})}var defineComponent=require("core/component"),withExpiry=require("app/utils/storage/with_expiry");module.exports=defineComponent(autoSignupDialog,withExpiry)
});
define("app/boot/profile",["module","require","exports","app/boot/app","core/i18n","app/data/profile_info","app/boot/trends","app/boot/logged_out","app/boot/inline_edit","app/ui/profile/canopy","app/data/profile_canopy_scribe","app/ui/profile/head","app/data/profile_head_scribe","app/ui/profile/social_proof","app/data/profile_social_proof_scribe","app/ui/dashboard_tweetbox","app/ui/who_to_follow/who_to_follow_dashboard","app/data/who_to_follow/wtf_import_prompt_scribe","app/ui/who_to_follow/import_services","app/data/who_to_follow","app/data/who_to_follow_scribe","app/ui/media/card_thumbnails","app/data/media_timeline","app/data/media_thumbnails_scribe","core/utils","app/ui/suggested_users","app/data/suggested_users","app/data/client_event","app/ui/navigation_links","app/data/profile_edit_btn_scribe","app/boot/wtf_module","app/ui/dm_envelope","app/ui/profile/alcohol_brand_follower_notification","app/ui/profile/auto_signup_dialog"],function(module, require, exports) {
function initialize(a){bootApp(a),profileInfo.set(a),trends(a),whoToFollowModule(".dashboard .js-wtf-module",a);var b=".profile-canopy",c={scribeContext:{component:"profile_canopy"}};ProfileHead.attachTo(b,a,c,{profileHead:!1,isCanopy:!0}),ProfileHeadScribe.attachTo(b,c),ProfileCanopy.attachTo(b),ProfileCanopyScribe.attachTo(b);var d=".profile-page-header",e={scribeContext:{component:"profile_follow_card"}};ProfileHead.attachTo(d,a,e),ProfileHeadScribe.attachTo(d),DMEnvelope.attachTo(d,{noTeardown:!0,directMessagesSelector:".dm-button"});var f=".profile-social-proof";ProfileSocialProofScribe.attachTo(f),ProfileSocialProof.attachTo(f,{profileHoversEnabled:a.profileHoversEnabled}),a.inlineProfileEditing&&inlineEditBoot(a),ProfileEditBtnScribe.attachTo(d,e),clientEvent.scribeData.profile_id=a.profile_id,loggedOutBoot(a),MediaThumbnailsScribe.attachTo(document,a);var g={showAllInlineMedia:!0,defaultGalleryTitle:a.profile_user.name,profileUser:a.profile_user,mediaGrid:a.mediaGrid,mediaGridOpen:a.mediaGridOpen,gridPushState:a.mediaGrid,pushStateUrl:"/"+a.profile_user.screen_name+"/media",eventData:{scribeContext:{component:"dashboard_media"}}},h;h=".enhanced-media-thumbnails",g.thumbnailSize=90,g.thumbnailsVisible=6,MediaTimeline.attachTo(document,{endpoint:"/i/profiles/show/"+a.profile_user.screen_name+"/media_timeline",forceT1Media:a.force_t1_media}),CardThumbnails.attachTo(h,utils.merge(a,g)),NavigationLinks.attachTo(".profile-page-header",{eventData:{scribeContext:{component:"profile_follow_card"}}}),NavigationLinks.attachTo(".view-toggler",{eventData:{scribeContext:{component:"dashboard_nav"}}}),DashboardTweetbox.attachTo(".profile-tweet-box",{draftTweetId:"profile_"+a.profile_id,eventData:{scribeContext:{component:"tweet_box"}}});var i=utils.merge(a,{eventData:{scribeContext:{component:"similar_user_recommendations"}}}),j=".dashboard .js-similar-to-module";WTFImportPromptScribe.attachTo(j,i),WhoToFollowDashboard.attachTo(j,i),WhoToFollowData.attachTo(j,i),WhoToFollowScribe.attachTo(j,i),ImportServices.attachTo(".dashboard .import-prompt",a,{otherServicesSelector:".other-services",eventData:{scribeContext:{component:"user_recommendations",element:"wtf_import_prompt"}}}),SuggestedUsersData.attachTo(document,a),SuggestedUsers.attachTo("#suggested-users",utils.merge({eventData:{scribeContext:{component:"user_similarities_list"}}},a)),AlcoholBrandFollowerNotification.attachTo(document,a),AutoSignupDialog.attachTo(".SignupDialog",{environment:a.environment})}var bootApp=require("app/boot/app"),_=require("core/i18n"),profileInfo=require("app/data/profile_info"),trends=require("app/boot/trends"),loggedOutBoot=require("app/boot/logged_out"),inlineEditBoot=require("app/boot/inline_edit"),ProfileCanopy=require("app/ui/profile/canopy"),ProfileCanopyScribe=require("app/data/profile_canopy_scribe"),ProfileHead=require("app/ui/profile/head"),ProfileHeadScribe=require("app/data/profile_head_scribe"),ProfileSocialProof=require("app/ui/profile/social_proof"),ProfileSocialProofScribe=require("app/data/profile_social_proof_scribe"),DashboardTweetbox=require("app/ui/dashboard_tweetbox"),WhoToFollowDashboard=require("app/ui/who_to_follow/who_to_follow_dashboard"),WTFImportPromptScribe=require("app/data/who_to_follow/wtf_import_prompt_scribe"),ImportServices=require("app/ui/who_to_follow/import_services"),WhoToFollowData=require("app/data/who_to_follow"),WhoToFollowScribe=require("app/data/who_to_follow_scribe"),CardThumbnails=require("app/ui/media/card_thumbnails"),MediaTimeline=require("app/data/media_timeline"),MediaThumbnailsScribe=require("app/data/media_thumbnails_scribe"),utils=require("core/utils"),SuggestedUsers=require("app/ui/suggested_users"),SuggestedUsersData=require("app/data/suggested_users"),clientEvent=require("app/data/client_event"),NavigationLinks=require("app/ui/navigation_links"),ProfileEditBtnScribe=require("app/data/profile_edit_btn_scribe"),whoToFollowModule=require("app/boot/wtf_module"),DMEnvelope=require("app/ui/dm_envelope"),AlcoholBrandFollowerNotification=require("app/ui/profile/alcohol_brand_follower_notification"),AutoSignupDialog=require("app/ui/profile/auto_signup_dialog");module.exports=initialize
});
define("app/pages/profile/tweets",["module","require","exports","app/boot/profile","app/boot/tweet_timeline","app/boot/user_completion_module","app/data/contact_import","app/data/contact_import_scribe","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),tweetTimelineBoot=require("app/boot/tweet_timeline"),userCompletionModuleBoot=require("app/boot/user_completion_module"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services");module.exports=function(b){profileBoot(b),tweetTimelineBoot(b,b.timeline_url,"tweets_timeline","tweet"),userCompletionModuleBoot(b),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog",b),ImportServices.attachTo(".dashboard .import-prompt",b,{otherServicesSelector:".other-services",eventData:{scribeContext:{component:"user_recommendations",element:"wtf_import_prompt"}}}),b.profile_user&&$(document).trigger("profileVisit",b.profile_user)}
});
define("app/ui/timelines/with_cursor_pagination",["module","require","exports"],function(module, require, exports) {
function withCursorPagination(){function a(){return!0}function b(){return!1}this.isOldItem=a,this.isNewItem=b,this.wasRangeRequest=b,this.wasNewItemsRequest=b,this.wasOldItemsRequest=a,this.shouldGetOldItems=function(){return!!this.cursor&&this.cursor!="0"},this.getOldItemsData=function(){return{cursor:this.cursor,cursor_index:this.cursorIndex,cursor_offset:this.cursorOffset,is_forward:!this.attr.isBackward,query:this.query}},this.resetStateVariables=function(a){a&&a.cursor!==undefined?(this.cursor=a.cursor,this.select("containerSelector").attr("data-cursor",this.cursor)):this.cursor=this.select("containerSelector").attr("data-cursor")||"",a&&a.cursor_index!==undefined?(this.cursorIndex=a.cursor_index,this.select("containerSelector").attr("data-cursor-index",this.cursorIndex)):this.cursorIndex=this.select("containerSelector").attr("data-cursor-index")||"",a&&a.cursor_offset!==undefined?(this.cursorOffset=a.cursor_offset,this.select("containerSelector").attr("data-cursor-offset",this.cursorOffset)):this.cursorOffset=this.select("containerSelector").attr("data-cursor-offset")||""},this.after("initialize",function(){this.query=this.attr.query||"",this.resetStateVariables(),this.on("uiTimelineReset",this.resetStateVariables)})}module.exports=withCursorPagination
});
define("app/ui/with_stream_users",["module","require","exports"],function(module, require, exports) {
function withStreamUsers(){this.defaultAttrs({streamUserSelector:".stream-items .js-actionable-user"}),this.oldUsersDisplayed=function(a,b){var c=b.items||[],d=c.map(function(a){return{id:a.userId,impressionId:a.impressionId}});this.trigger("uiUsersDisplayed",{users:d})},this.usersDisplayed=function(){var a=this.select("streamUserSelector"),b=[];a.each(function(a,c){var d=$(c);b.push({id:d.attr("data-user-id"),impressionId:d.attr("data-impression-id")})}),this.trigger("uiUsersDisplayed",{users:b})},this.after("initialize",function(){this.usersDisplayed(),this.on("uiHasInjectedOldTimelineItems",this.oldUsersDisplayed)})}module.exports=withStreamUsers
});
define("app/ui/timelines/with_excluded_ids_pagination",["module","require","exports"],function(module, require, exports) {
function withExcludedIdsPagination(){this.aroundGetOldItemsData=function(a){var b=a();return this.attr.useExcludedIdsPagination&&(b.excluded=this.select("excludedUserSelector").map(function(){return $(this).attr("data-user-id")}).toArray().join(","),b.cursor=undefined),b},this.after("initialize",function(){this.around("getOldItemsData",this.aroundGetOldItemsData)})}module.exports=withExcludedIdsPagination
});
define("app/ui/timelines/user_timeline",["module","require","exports","core/component","app/ui/timelines/base_timeline","app/ui/timelines/with_old_items","app/ui/timelines/with_cursor_pagination","app/ui/with_item_actions","app/ui/with_user_actions","app/ui/with_stream_users","app/ui/timelines/with_excluded_ids_pagination"],function(module, require, exports) {
function userTimeline(){this.defaultAttrs({itemType:"user"})}var defineComponent=require("core/component"),BaseTimeline=require("app/ui/timelines/base_timeline"),withOldItems=require("app/ui/timelines/with_old_items"),withCursorPagination=require("app/ui/timelines/with_cursor_pagination"),withItemActions=require("app/ui/with_item_actions"),withUserActions=require("app/ui/with_user_actions"),withStreamUsers=require("app/ui/with_stream_users"),withExcludedIdsPagination=require("app/ui/timelines/with_excluded_ids_pagination");module.exports=BaseTimeline.mixin(userTimeline,withOldItems,withCursorPagination,withItemActions,withUserActions,withStreamUsers,withExcludedIdsPagination)
});
define("app/boot/user_timeline",["module","require","exports","app/boot/timeline","app/ui/timelines/user_timeline","app/data/tweet_actions","core/utils"],function(module, require, exports) {
function initialize(a,b,c,d){var e=utils.merge(a,{endpoint:b,itemType:c,eventData:{scribeContext:{component:d}}});timelineBoot(e),UserTimeline.attachTo("#timeline",e),TweetActionsData.attachTo(document,e)}var timelineBoot=require("app/boot/timeline"),UserTimeline=require("app/ui/timelines/user_timeline"),TweetActionsData=require("app/data/tweet_actions"),utils=require("core/utils");module.exports=initialize
});
define("app/ui/timelines/follower_request_timeline",["module","require","exports","core/component","app/ui/with_interaction_data"],function(module, require, exports) {
function followerRequestTimeline(){this.defaultAttrs({userItemSelector:"div.js-follower-request",streamUserItemSelector:"li.js-stream-item",followerActionsSelector:".friend-actions",profileActionsSelector:".js-profile-actions",acceptFollowerSelector:".js-action-accept",declineFollowerSelector:".js-action-deny",itemType:"user"}),this.findUser=function(a){return this.$node.find(this.attr.userItemSelector+"[data-user-id="+a+"]")},this.findFollowerActions=function(a){return this.findUser(a).find(this.attr.followerActionsSelector)},this.findProfileActions=function(a){return this.findUser(a).find(this.attr.profileActionsSelector)},this.handleAcceptSuccess=function(a,b){var c=this.findFollowerActions(b.userId),d=this.findProfileActions(b.userId);c.fadeOut(300,function(){d.fadeIn(300)})},this.handleDeclineSuccess=function(a,b){var c=this.findUser(b.userId);c.closest(this.attr.streamUserItemSelector).remove()},this.handleDecisionFailure=function(a,b){var c=this.findFollowerActions(b.userId);c.find(".btn").attr("disabled",!1).removeClass("pending")},this.handleFollowerDecision=function(a){return function(b,c){b.preventDefault(),b.stopPropagation();var d=this.interactionData(b),e=this.findFollowerActions(d.userId);e.find(".btn").attr("disabled",!0);var f=e.find(a=="Accept"?this.attr.acceptFollowerSelector:this.attr.declineFollowerSelector);f.addClass("pending"),this.trigger("uiDidFollower"+a,d)}},this.after("initialize",function(){this.on("click",{acceptFollowerSelector:this.handleFollowerDecision("Accept"),declineFollowerSelector:this.handleFollowerDecision("Decline")}),this.on(document,"dataFollowerAcceptSuccess",this.handleAcceptSuccess),this.on(document,"dataFollowerDeclineSuccess",this.handleDeclineSuccess),this.on(document,"dataFollowerAcceptFailure dataFollowerDeclineFailure",this.handleDecisionFailure)})}var defineComponent=require("core/component"),withInteractionData=require("app/ui/with_interaction_data");module.exports=defineComponent(followerRequestTimeline,withInteractionData)
});
define("app/data/follower_request",["module","require","exports","core/component","app/data/with_data"],function(module, require, exports) {
function followerRequestData(){this.followerRequestAction=function(a,b){return function(c,d){var e=function(a){this.trigger("dataFollower"+b+"Success",{userId:d.userId,pendingRequestsHtml:a.pendingRequestsHtml})}.bind(this),f=function(){this.trigger("dataFollower"+b+"Failure",{userId:d.userId})}.bind(this);this.post({url:a,data:{user_id:d.userId},eventData:d,success:e,error:f})}},this.after("initialize",function(){this.on(document,"uiDidFollowerAccept",this.followerRequestAction("/i/user/accept","Accept")),this.on(document,"uiDidFollowerDecline",this.followerRequestAction("/i/user/deny","Decline"))})}var defineComponent=require("core/component"),withData=require("app/data/with_data");module.exports=defineComponent(followerRequestData,withData)
});
define("app/data/follower_request_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function followerRequestScribe(){this.after("initialize",function(){this.scribeOnEvent("dataFollowerAcceptSuccess",{component:"user",action:"accept"}),this.scribeOnEvent("dataFollowerDeclineSuccess",{component:"user",action:"decline"})})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(withScribe,followerRequestScribe)
});
define("app/pages/profile/follower_requests",["module","require","exports","app/boot/profile","app/boot/user_timeline","app/ui/timelines/follower_request_timeline","app/data/follower_request","app/data/follower_request_scribe"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),userTimelineBoot=require("app/boot/user_timeline"),FollowerRequestTimeline=require("app/ui/timelines/follower_request_timeline"),FollowerRequestData=require("app/data/follower_request"),FollowerRequestScribe=require("app/data/follower_request_scribe");module.exports=function(b){profileBoot(b),userTimelineBoot(b,b.timeline_url,"user"),FollowerRequestTimeline.attachTo("#timeline",b),FollowerRequestData.attachTo(document,b),FollowerRequestScribe.attachTo(document)}
});
define("app/pages/profile/followers",["module","require","exports","app/boot/profile","app/boot/user_timeline","app/data/contact_import","app/data/contact_import_scribe","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),userTimelineBoot=require("app/boot/user_timeline"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services");module.exports=function(b){profileBoot(b),userTimelineBoot(b,b.timeline_url,"user","user"),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog",b),ImportServices.attachTo(".content-main.import-prompt",b,{eventData:{scribeContext:{component:"address_book_import_prompt"}}})}
});
define("app/pages/profile/following",["module","require","exports","app/boot/profile","app/boot/user_timeline","app/ui/suggested_users","app/data/contact_import","app/data/contact_import_scribe","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),userTimelineBoot=require("app/boot/user_timeline"),SuggestedUsers=require("app/ui/suggested_users"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services");module.exports=function(b){profileBoot(b),userTimelineBoot(b,b.timeline_url,"user","user"),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog",b),ImportServices.attachTo(".content-main.import-prompt",b,{eventData:{scribeContext:{component:"address_book_import_prompt"}}})}
});
define("app/pages/profile/favorites",["module","require","exports","app/boot/profile","app/boot/tweet_timeline","app/data/contact_import","app/data/contact_import_scribe","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),tweetTimelineBoot=require("app/boot/tweet_timeline"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services");module.exports=function(b){profileBoot(b),tweetTimelineBoot(b,b.timeline_url,"swift_favorites_timeline","tweet"),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog",b),ImportServices.attachTo(".dashboard .import-prompt",b,{otherServicesSelector:".other-services",eventData:{scribeContext:{component:"user_recommendations",element:"wtf_import_prompt"}}})}
});
define("app/ui/timelines/list_timeline",["module","require","exports","core/component","app/ui/timelines/base_timeline","app/ui/timelines/with_old_items","app/ui/timelines/with_min_max_pagination","app/ui/with_item_actions","app/ui/with_user_actions"],function(module, require, exports) {
function listTimeline(){this.defaultAttrs({itemType:"list"})}var defineComponent=require("core/component"),BaseTimeline=require("app/ui/timelines/base_timeline"),withOldItems=require("app/ui/timelines/with_old_items"),withMinMaxPagination=require("app/ui/timelines/with_min_max_pagination"),withItemActions=require("app/ui/with_item_actions"),withUserActions=require("app/ui/with_user_actions");module.exports=BaseTimeline.mixin(listTimeline,withOldItems,withMinMaxPagination,withItemActions,withUserActions)
});
define("app/boot/list_timeline",["module","require","exports","app/boot/timeline","app/ui/timelines/list_timeline","app/data/tweet_actions","core/utils"],function(module, require, exports) {
function initialize(a,b,c,d){var e=utils.merge(a,{endpoint:b,itemType:c,eventData:{scribeContext:{component:d||c}}});timelineBoot(e),ListTimeline.attachTo("#timeline",e),TweetActionsData.attachTo(document,e)}var timelineBoot=require("app/boot/timeline"),ListTimeline=require("app/ui/timelines/list_timeline"),TweetActionsData=require("app/data/tweet_actions"),utils=require("core/utils");module.exports=initialize
});
define("app/ui/profile/list_create_button",["module","require","exports","core/component"],function(module, require, exports) {
function listCreateButton(){this.defaultAttrs({createListSelector:".js-create-list-button"}),this.openListCreateDialog=function(){this.trigger("uiOpenCreateListDialog")},this.after("initialize",function(){this.on("click",{createListSelector:this.openListCreateDialog})})}var defineComponent=require("core/component");module.exports=defineComponent(listCreateButton)
});
define("app/pages/profile/lists",["module","require","exports","app/boot/profile","app/boot/list_timeline","app/data/tweet_actions","app/ui/profile/list_create_button"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),listTimelineBoot=require("app/boot/list_timeline"),TweetActionsData=require("app/data/tweet_actions"),ListCreateButton=require("app/ui/profile/list_create_button");module.exports=function(b){profileBoot(b),ListCreateButton.attachTo(".js-header-button-container"),listTimelineBoot(b,b.timeline_url,"list"),TweetActionsData.attachTo(document,b)}
});
define("app/ui/timelines/grid_timeline",["module","require","exports","app/ui/timelines/paginating_timeline","app/ui/timelines/with_tweet_pagination","app/ui/with_conversation_actions","app/ui/gallery/with_grid"],function(module, require, exports) {
function gridTimeline(){this.defaultAttrs({itemType:"tweet"}),this.reportInitialTweetsDisplayed=function(){var b=this.select("genericItemSelector"),c=[],d=function(b,d){var e=this.interactionData(this.findFirstItemContent($(d)));this.attr.reinjectedPromotedTweets&&(e.impressionId=undefined),c.push(e)}.bind(this);for(var e=0,f=b.length;e<f;e++)d(e,b[e]);var g={scribeContext:{component:"stream"},tweets:c};this.trigger("uiTweetsDisplayed",g)},this.reportTweetsDisplayed=function(a,b){b.tweets=b.items,this.trigger("uiTweetsDisplayed",b)},this.removeTweetsFromUser=function(a,b){var c=this.$node.find("[data-user-id="+b.userId+"]");c.parent().remove(),this.trigger("uiRemovedSomeTweets")},this.after("initialize",function(a){this.attr.reinjectedPromotedTweets=a.reinjectedPromotedTweets,this.reportInitialTweetsDisplayed(),this.on("uiHasInjectedNewTimeline uiHasInjectedOldTimelineItems uiHasInjectedRangeTimelineItems",this.reportTweetsDisplayed),this.on("uiRemoveTweetsFromUser",this.removeTweetsFromUser)})}var PaginatingTimeline=require("app/ui/timelines/paginating_timeline"),withTweetPagination=require("app/ui/timelines/with_tweet_pagination"),withConversationActions=require("app/ui/with_conversation_actions"),withGrid=require("app/ui/gallery/with_grid");module.exports=PaginatingTimeline.mixin(gridTimeline,withTweetPagination,withConversationActions,withGrid)
});
define("app/boot/grid_timeline",["module","require","exports","app/boot/timeline","app/boot/tweets","app/boot/help_pips","app/ui/expando/close_all_button","app/ui/timelines/grid_timeline","app/ui/timeline_tweet_actions","app/ui/profile/highline_tweet_stats","app/ui/more_tweet_actions_dropdown","core/utils"],function(module, require, exports) {
function initialize(a,b,c,d){var e=utils.merge(a,{endpoint:b,itemType:c,eventData:{scribeContext:{component:d||c}}});timelineBoot(e),tweetsBoot("#timeline",e),e.help_pips_decider&&helpPipsBoot(e),CloseAllButton.attachTo("#close-all-button");var f={itemsSelector:"#stream-items-id .media-grid",gridHeight:230,gridRatio:1.6,gridWidth:582,tweetWithReplyDialogSelector:".grid-tweet"};HighlineTweetStats.attachTo(document),GridTimeline.attachTo("#timeline",e,f),TimelineTweetActions.attachTo("#timeline",e,{tweetItemSelector:".grid-tweet"}),MoreTweetActionsDropdown.attachTo("#timeline",e,{tweetItemSelector:".grid-tweet"})}var timelineBoot=require("app/boot/timeline"),tweetsBoot=require("app/boot/tweets"),helpPipsBoot=require("app/boot/help_pips"),CloseAllButton=require("app/ui/expando/close_all_button"),GridTimeline=require("app/ui/timelines/grid_timeline"),TimelineTweetActions=require("app/ui/timeline_tweet_actions"),HighlineTweetStats=require("app/ui/profile/highline_tweet_stats"),MoreTweetActionsDropdown=require("app/ui/more_tweet_actions_dropdown"),utils=require("core/utils");module.exports=initialize
});
define("app/pages/profile/media",["module","require","exports","app/boot/profile","app/boot/grid_timeline","app/boot/user_completion_module","app/data/contact_import","app/data/contact_import_scribe","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services"],function(module, require, exports) {
var profileBoot=require("app/boot/profile"),gridTimelineBoot=require("app/boot/grid_timeline"),userCompletionModuleBoot=require("app/boot/user_completion_module"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services");module.exports=function(b){profileBoot(b),gridTimelineBoot(b,b.timeline_url,"tweet"),userCompletionModuleBoot(b),b.profile_user&&$(document).trigger("profileVisit",b.profile_user),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog",b),ImportServices.attachTo(".dashboard .import-prompt",b,{otherServicesSelector:".other-services",eventData:{scribeContext:{component:"user_recommendations",element:"wtf_import_prompt"}}})}
});
define("app/ui/timelines/custom_timelines_timeline",["module","require","exports","core/component","app/ui/timelines/base_timeline","app/ui/with_item_actions","app/ui/with_user_actions"],function(module, require, exports) {
function customTimelinesTimeline(){this.defaultAttrs({itemType:"custom-timeline"})}var defineComponent=require("core/component"),BaseTimeline=require("app/ui/timelines/base_timeline"),withItemActions=require("app/ui/with_item_actions"),withUserActions=require("app/ui/with_user_actions");module.exports=BaseTimeline.mixin(customTimelinesTimeline,withItemActions,withUserActions)
});
define("app/boot/custom_timelines_timeline",["module","require","exports","app/boot/timeline","app/ui/timelines/custom_timelines_timeline","core/utils"],function(module, require, exports) {
function initialize(a,b,c,d){var e=utils.merge(a,{endpoint:b,itemType:c,eventData:{scribeContext:{component:d||c}}});timelineBoot(e),CustomTimelinesTimeline.attachTo("#timeline",e)}var timelineBoot=require("app/boot/timeline"),CustomTimelinesTimeline=require("app/ui/timelines/custom_timelines_timeline"),utils=require("core/utils");module.exports=initialize
});
define("app/pages/profile/custom_timelines",["module","require","exports","core/component","app/boot/profile","app/boot/custom_timelines_timeline","app/ui/with_custom_timeline_create_button","app/data/curation"],function(module, require, exports) {
var defineComponent=require("core/component"),profileBoot=require("app/boot/profile"),customTimelinesTimelineBoot=require("app/boot/custom_timelines_timeline"),withCustomTimelineCreateButton=require("app/ui/with_custom_timeline_create_button"),CurationData=require("app/data/curation");module.exports=function(b){profileBoot(b),defineComponent(withCustomTimelineCreateButton).attachTo(".js-header-button-container"),customTimelinesTimelineBoot(b,b.timeline_url,"custom-timeline"),CurationData.attachTo(document,b)}
});
define("app/ui/dialogs/edit_custom_timeline_dialog",["module","require","exports","core/component","app/ui/updating_text_counter","app/ui/with_dialog","app/ui/dialogs/with_create_or_edit_custom_timeline_dialog","template"],function(module, require, exports) {
function editCustomTimelineDialog(){this.defaultAttrs({createOrUpdateEventName:"uiUpdateCustomTimeline",orderSelector:"[name=edit-timeline-order]:checked"}),this.around("params",function(a){var b=a();return b.id=this.attr.timeline_id,b}),this.openDialog=function(){var a={is_create_dialog:!1,id_prefix:"edit",timeline_name:this.attr.timeline_name,timeline_description:this.attr.timeline_description,tweet_chron:this.attr.timeline_order=="tweet_chron",tweet_reverse_chron:this.attr.timeline_order=="tweet_reverse_chron",curation_reverse_chron:this.attr.timeline_order=="curation_reverse_chron"},b=template["dialogs/create_or_edit_custom_timeline_dialog"].render(a,template);this.$node.html(b),this.$dialog=this.$dialogContainer.find(this.attr.modalSelector),this.open()},this.after("open",function(){UpdatingTextCounter.attachTo(".custom-timeline-name-field",{maxLength:25,superwarnLength:20,warnLength:15,textSelector:"#custom-timeline-name",counterSelector:".custom-timeline-name-count"}),UpdatingTextCounter.attachTo(".custom-timeline-description-field",{maxLength:160,superwarnLength:150,warnLength:140,textSelector:"#custom-timeline-description",counterSelector:".custom-timeline-description-count"})}),this.after("initialize",function(){this.on(document,"uiOpenEditCustomTimelineDialog",this.openDialog)})}var defineComponent=require("core/component"),UpdatingTextCounter=require("app/ui/updating_text_counter"),withDialog=require("app/ui/with_dialog"),withCreateOrEditCustomTimelineDialog=require("app/ui/dialogs/with_create_or_edit_custom_timeline_dialog"),template=require("template");module.exports=defineComponent(withDialog,withCreateOrEditCustomTimelineDialog,editCustomTimelineDialog)
});
define("app/ui/timelines/custom_timeline",["module","require","exports","app/ui/timelines/paginating_timeline","app/ui/timelines/with_min_max_pagination","app/ui/with_user_actions","app/utils/find_tweet"],function(module, require, exports) {
function customTimeline(){this.defaultAttrs({itemType:"tweet"}),this.removeTweetFromTimeline=function(a,b){var c=findTweet(this.$node,".tweet",b.sourceEventData.id);this.trigger(c,"uiBeforeTweetRemoved",b),c.closest(this.attr.tweetContainerSelector).remove(),this.trigger("uiTweetRemoved",b)},this.after("initialize",function(){this.on(document,"dataTweetRemovedFromTimeline",this.removeTweetFromTimeline)})}var PaginatingTimeline=require("app/ui/timelines/paginating_timeline"),withMinMaxPagination=require("app/ui/timelines/with_min_max_pagination"),withUserActions=require("app/ui/with_user_actions"),findTweet=require("app/utils/find_tweet");module.exports=PaginatingTimeline.mixin(customTimeline,withMinMaxPagination,withUserActions)
});
define("app/ui/custom_timeline_tweetbox",["module","require","exports","core/component","app/ui/with_tweetbox_initialization"],function(module, require, exports) {
function customTimelineTweetbox(){this.defaultAttrs({defaultTextFrom:"data-default-text",condensedTextFrom:"data-condensed-text"}),this.getText=function(){return this.$node.attr(this.attr.defaultTextFrom)||""},this.getDefaultText=function(){return this.$node.attr(this.attr.defaultTextFrom)},this.getCondensedText=function(){return this.$node.attr(this.attr.condensedTextFrom)},this.after("initialize",function(){var a=this.$node.attr("data-selection-length");this.initTweetbox({canTweetDefaultText:this.attr.canTweetDefaultText,condensedText:this.getCondensedText(),defaultText:this.getDefaultText(),selectedRange:[0,a]})})}var defineComponent=require("core/component"),withTweetboxInitialization=require("app/ui/with_tweetbox_initialization");module.exports=defineComponent(withTweetboxInitialization,customTimelineTweetbox)
});
define("app/ui/custom_timeline_follow_card",["module","require","exports","core/component","core/i18n"],function(module, require, exports) {
function customTimelineFollowCard(){this.defaultAttrs({editSelector:".js-edit-custom-timeline-action",deleteSelector:".js-delete-custom-timeline-action",confirmAction:"DeleteCustomTimeline",confirmTitleText:_('Supprimer la collection'),confirmBodyText:_('\xcates-vous s\xfbr de vouloir supprimer cette collection ?'),confirmCancelText:_('Non'),confirmSubmitText:_('Oui')}),this.triggerDeleteCustomTimelineDialog=function(){this.trigger("uiOpenConfirmDialog",{action:this.attr.confirmAction,titleText:this.attr.confirmTitleText,bodyText:this.attr.confirmBodyText,cancelText:this.attr.confirmCancelText,submitText:this.attr.confirmSubmitText})},this.triggerDelete=function(a,b){this.trigger("uiDeleteCustomTimeline",{timeline_id:this.attr.timeline_id})},this.after("initialize",function(){this.on("click",{editSelector:"uiOpenEditCustomTimelineDialog",deleteSelector:this.triggerDeleteCustomTimelineDialog}),this.on(document,"uiDeleteCustomTimelineConfirm",this.triggerDelete)})}var defineComponent=require("core/component"),_=require("core/i18n");module.exports=defineComponent(customTimelineFollowCard)
});
define("app/ui/with_curated_tweet_removal",["module","require","exports"],function(module, require, exports) {
function withCuratedTweetRemoval(){this.defaultAttrs({removeCuratedTweetSelector:".js-action-remove-curated-tweet"}),this.getTimelineId=function(){return{timelineId:this.attr.timeline_id}},this.after("initialize",function(){var a=this.mkTweetDataCollectorForAction(this.interactionData,this.getTimelineId);this.on("click",{removeCuratedTweetSelector:this.composeHandler(this.preventDefault,this.getClosestTweet,a,this.triggerTweetAction("uiCurateRemoveTweet"))})})}module.exports=withCuratedTweetRemoval
});
define("app/ui/custom_timeline_tweet_actions",["module","require","exports","app/ui/timeline_tweet_actions","app/ui/with_curated_tweet_removal"],function(module, require, exports) {
var TimelineTweetActions=require("app/ui/timeline_tweet_actions"),withCuratedTweetRemoval=require("app/ui/with_curated_tweet_removal");module.exports=TimelineTweetActions.mixin(withCuratedTweetRemoval)
});
define("app/boot/custom_timeline",["module","require","exports","app/boot/timeline","app/boot/tweets","app/ui/dialogs/edit_custom_timeline_dialog","app/ui/timelines/custom_timeline","app/ui/custom_timeline_tweetbox","app/ui/custom_timeline_follow_card","app/ui/expando/close_all_button","core/utils","app/ui/custom_timeline_tweet_actions","app/ui/profile/highline_tweet_stats","app/ui/more_tweet_actions_dropdown"],function(module, require, exports) {
function initialize(a){var b=utils.merge(a,{endpoint:a.timeline_url,itemType:"tweet",eventData:{scribeContext:{component:"tweet"}}});timelineBoot(b),tweetsBoot("#timeline",b),CloseAllButton.attachTo("#close-all-button",{addEvent:"uiHasExpandedTweet uiHasDetachedConversation",subtractEvent:"uiHasCollapsedTweet uiHasReattachedConversation"}),CustomTimeline.attachTo("#timeline",b,{autoplay:!0}),HighlineTweetStats.attachTo(document),CustomTimelineTweetActions.attachTo("#timeline",b),MoreTweetActionsDropdown.attachTo("#timeline",b),CustomTimelineTweetbox.attachTo(".custom-timeline-tweet-box",{draftTweetId:"custom_timeline_"+b.timeline_id,canTweetDefaultText:!0,eventData:{scribeContext:{component:"tweet_box"}}}),CustomTimelineFollowCard.attachTo(".custom-timeline-follow-card",{timeline_id:a.timeline_id}),EditCustomTimelineDialog.attachTo("#edit-custom-timeline-dialog",a)}var timelineBoot=require("app/boot/timeline"),tweetsBoot=require("app/boot/tweets"),EditCustomTimelineDialog=require("app/ui/dialogs/edit_custom_timeline_dialog"),CustomTimeline=require("app/ui/timelines/custom_timeline"),CustomTimelineTweetbox=require("app/ui/custom_timeline_tweetbox"),CustomTimelineFollowCard=require("app/ui/custom_timeline_follow_card"),CloseAllButton=require("app/ui/expando/close_all_button"),utils=require("core/utils"),CustomTimelineTweetActions=require("app/ui/custom_timeline_tweet_actions"),HighlineTweetStats=require("app/ui/profile/highline_tweet_stats"),MoreTweetActionsDropdown=require("app/ui/more_tweet_actions_dropdown");module.exports=initialize
});
define("app/pages/custom_timeline",["module","require","exports","app/boot/app","app/boot/logged_out","app/boot/custom_timeline"],function(module, require, exports) {
var bootApp=require("app/boot/app"),loggedOutBoot=require("app/boot/logged_out"),customBoot=require("app/boot/custom_timeline");module.exports=function(b){bootApp(b),loggedOutBoot(b),customBoot(b)}
});