define("app/ui/alert_banner",["module","require","exports","core/component"],function(module, require, exports) {
function alertBanner(){this.defaultAttrs({closeSelector:"#settings-alert-close",bannerSelector:"h4,p",listenToShow:!0}),this.showBanner=function(a,b){$(window).scrollTop(0),this.select("bannerSelector").remove(),this.$node.append($("<h4>").text(b.message)),this.$node.show()},this.closeBanner=function(){this.select("bannerSelector").remove(),this.$node.hide()},this.after("initialize",function(){this.attr.listenToShow&&this.on(document,"uiAlertBanner",this.showBanner),this.on(document,"uiAlertBannerClose",this.closeBanner),this.on(this.attr.closeSelector,"click",this.closeBanner)})}var defineComponent=require("core/component"),AlertBanner=defineComponent(alertBanner);module.exports=AlertBanner
});
define("app/ui/contact_import_buttons",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function ContactImportButtons(){this.defaultAttrs({toggleSelector:".ContactImportButtons-toggle"}),this.toggle=function(a,b){a.preventDefault();var c=this.$node.hasClass("ContactImportButtons--showSingleService")?"multi_import":"single_import";this.$node.addClass("ContactImportButtons--transition").toggleClass("ContactImportButtons--showSingleService").toggleClass("ContactImportButtons--showMultipleServices"),this.scribe({component:"import_button",element:c,action:"click"})},this.after("initialize",function(){this.on(this.attr.toggleSelector,"click",this.toggle)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(ContactImportButtons,withScribe)
});
define("app/ui/timelines/with_load_more_pagination",["module","require","exports","core/compose","app/ui/timelines/with_old_items"],function(module, require, exports) {
function withLoadMorePagination(){compose.mixin(this,[withOldItems]),this.defaultAttrs({loadMoreSelector:".btn-load-more",streamLoadingSelector:".stream-loading"}),this.loadMoreClicked=function(a,b){this.trigger("uiLoadMoreClicked"),a.preventDefault(),this.getOldItems(a),this.select("loadMoreSelector").hide(),this.select("streamLoadingSelector").show()},this.handleMoreItems=function(a,b){b.has_more_items&&this.select("loadMoreSelector").show(),this.select("streamLoadingSelector").hide()},this.after("initialize",function(){this.on("click",{loadMoreSelector:this.loadMoreClicked}),this.off(window,this.attr.isBackward?"uiNearTheTop":"uiNearTheBottom",this.getOldItems),this.on("dataGotMoreTimelineItems",this.handleMoreItems),this.select("streamLoadingSelector").hide()})}var compose=require("core/compose"),withOldItems=require("app/ui/timelines/with_old_items");module.exports=withLoadMorePagination
});
define("app/ui/timelines/with_dismissible_recommendation",["module","require","exports","core/compose","app/ui/with_interaction_data"],function(module, require, exports) {
function withDismissibleRecommendation(){compose.mixin(this,[withInteractionData]),this.defaultAttrs({dismissSelector:".js-dismiss-recommendation",tweetSelector:".js-stream-tweet",userSelector:".account"}),this.dismissRecommendation=function(a,b){var c=$(a.target).closest(this.attr.genericItemSelector);c.fadeOut();var d=this.getUserIdFromStreamItem(c);this.trigger("uiDismissUserRecommendation",{recommended_user_id:d,excluded:[d]})},this.handleDismissResponse=function(a,b){var c=b.sourceEventData.recommended_user_id;if(c){var d=this.getStreamItemById(c),e=this.interactionData(d,{userId:c,itemType:"user"});d.remove(),this.trigger("uiDidDismissUserRecommendation",{oldUser:e})}},this.getStreamItemById=function(a){switch(this.attr.itemType){case"tweet":var b=this.$node.find(this.attr.tweetSelector+'[data-user-id="'+a+'"]');return b.closest(this.attr.genericItemSelector);case"user":return this.$node.find(this.attr.genericItemSelector+'[data-item-id="'+a+'"]');default:console.warn('You must configure your dismissible timeline component with an "itemType" attribute of user or tweet.');return}},this.getUserIdFromStreamItem=function(a){switch(this.attr.itemType){case"tweet":return a.find(this.attr.tweetSelector).data("user-id");case"user":return a.find(this.attr.userSelector).data("user-id");default:console.warn('You must configure your dismissible timeline component with an "itemType" attribute of user or tweet.');return}},this.after("initialize",function(){this.on("click",{dismissSelector:this.dismissRecommendation}),this.on(document,"dataDidDismissRecommendation",this.handleDismissResponse)})}var compose=require("core/compose"),withInteractionData=require("app/ui/with_interaction_data");module.exports=withDismissibleRecommendation
});
define("app/ui/timelines/dismissible_timeline",["module","require","exports","core/component","app/ui/timelines/base_timeline","app/ui/timelines/with_cursor_pagination","app/ui/timelines/with_load_more_pagination","app/ui/timelines/with_old_items","app/ui/timelines/with_dismissible_recommendation","app/ui/with_item_actions","app/ui/with_user_actions","core/utils"],function(module, require, exports) {
function dismissibleTimeline(){this.defaultAttrs({updateStateAfterFollowAll:!1,followingStreamItemClass:"DismissibleStreamItem--following",followPendingStreamItemClass:"DismissibleStreamItem--pending",followingState:"following",unfollowingState:"not-following",pendingFollowState:"pending"}),this.showFollowState=function(a,b){this.toggleStreamItem(a,utils.merge(b,{newState:this.attr.followingState}))},this.showUnfollowState=function(a,b){this.toggleStreamItem(a,utils.merge(b,{newState:this.attr.unfollowingState}))},this.toggleStreamItem=function(a,b){var c=this.getStreamItemById(b.userId);switch(b.newState){case this.attr.followingState:c.addClass(this.attr.followingStreamItemClass);break;case this.attr.pendingFollowState:c.addClass(this.attr.followPendingStreamItemClass);break;default:c.removeClass(this.attr.followingStreamItemClass),c.removeClass(this.attr.followPendingStreamItemClass)}},this.onFollowAllSuccess=function(a,b){this.updateUserFollowStates(b.result.followed,this.attr.followingState),this.updateUserFollowStates(b.result.requested,this.attr.pendingFollowState)},this.updateUserFollowStates=function(a,b){a.forEach(function(a){this.trigger(document,"uiFollowStateChange",{userId:a,newState:b,itemType:"user"})}.bind(this))},this.after("initialize",function(){this.on(document,"uiFollowAction",this.showFollowState),this.on(document,"uiUnfollowAction",this.showUnfollowState),this.on(document,"uiFollowStateChange dataFollowStateChange dataBulkFollowStateChange",this.toggleStreamItem),this.attr.updateStateAfterFollowAll&&this.on(document,"dataFollowAllUsersSuccess",this.onFollowAllSuccess)})}var defineComponent=require("core/component"),BaseTimeline=require("app/ui/timelines/base_timeline"),withCursorPagination=require("app/ui/timelines/with_cursor_pagination"),withLoadMorePagination=require("app/ui/timelines/with_load_more_pagination"),withOldItems=require("app/ui/timelines/with_old_items"),withDismissibleRecommendation=require("app/ui/timelines/with_dismissible_recommendation"),withItemActions=require("app/ui/with_item_actions"),withUserActions=require("app/ui/with_user_actions"),utils=require("core/utils");module.exports=BaseTimeline.mixin(dismissibleTimeline,withCursorPagination,withLoadMorePagination,withOldItems,withItemActions,withUserActions,withDismissibleRecommendation)
});
define("app/ui/start/follow_context",["module","require","exports","core/component","template"],function(module, require, exports) {
function followContext(){this.defaultAttrs({numUsersToShow:5}),this.renderUsers=function(a,b){var c=b.users.slice(this.attr.numUsersToShow*-1);this.$node.empty();for(var d=0;d<this.attr.numUsersToShow;d++)this.renderUser(c[d])},this.renderUser=function(a){this.$node.append(template["start/follow_context"].render({user:a},template))},this.after("initialize",function(){this.on(document,"dataFollowContextChange dataFollowContextLoaded",this.renderUsers)})}var defineComponent=require("core/component"),template=require("template");module.exports=defineComponent(followContext)
});
define("app/data/start/follow_context",["module","require","exports","core/component","app/utils/storage/custom"],function(module, require, exports) {
function followContext(){this.defaultAttrs({counterName:"follow_counter",maxUsers:50}),this.handleFollowStateChange=function(a,b){var c=b.user;b.newState=="not-following"?this.removeUser(c):this.addUser(c),this.trigger("dataFollowContextChange",{users:this.storage.getArray(this.attr.counterName)})},this.removeUser=function(a){var b=this.storage.getArray(this.attr.counterName),c=b.filter(function(b){return b.id!=a.id});this.storage.setItem(this.attr.counterName,c)},this.addUser=function(a){var b={id:a.id,profile_url:a.profile_image_url_https,screen_name:a.screen_name};this.storage.push(this.attr.counterName,b)},this.triggerFollowContextLoaded=function(){this.trigger("dataFollowContextLoaded",{users:this.storage.getArray(this.attr.counterName)})},this.after("initialize",function(){var a=customStorage({withArray:!0,withMaxElements:!0});this.storage=new a("nux_follow_context"),this.storage.setMaxElements(this.attr.counterName,this.attr.maxUsers),this.on("uiSwiftLoaded uiPageChanged",this.triggerFollowContextLoaded),this.on("dataFollowContextProxyChange",this.handleFollowStateChange)})}var defineComponent=require("core/component"),customStorage=require("app/utils/storage/custom");module.exports=defineComponent(followContext)
});
define("app/ui/start/navigation_monitor",["module","require","exports","core/component","core/i18n"],function(module, require, exports) {
function navigationMonitor(){this.defaultAttrs({linkSelector:".stream-items a, #profile_popup-dialog a",mediaContainerSelector:".stream-items .js-media-container",skipStepClass:"js-skip-step"}),this.checkNavAttempt=function(a,b){var c,d;if(this.isCompleted||a.shiftKey||a.ctrlKey||a.metaKey||a.which!==undefined&&a.which>1)return;c=$(a.target),d=c.closest("a"),d.length&&!a.isDefaultPrevented()&&d.attr("href")&&(a.preventDefault(),a.stopImmediatePropagation(),this.showBlockerDialog())},this.checkNavEventAttempt=function(a,b){if(b.isPopState)return;b.href=="/"&&(a.stopImmediatePropagation(),this.off(document,"uiNavigate",this.checkNavEventAttempt),this.trigger("uiNuxComplete"));var c=$(a.target).hasClass(this.attr.skipStepClass)||!!b.skippedStep;this.trigger("uiNuxStepComplete",{skippedStep:c})},this.onMediaClick=function(a){a.preventDefault(),this.showBlockerDialog()},this.showBlockerDialog=function(){this.trigger("uiWantsNavigationBlockerDialog")},this.after("initialize",function(){this.on("click",{linkSelector:this.checkNavAttempt,mediaContainerSelector:this.onMediaClick}),this.on(document,"uiNavigate",this.checkNavEventAttempt)})}var defineComponent=require("core/component"),_=require("core/i18n");module.exports=defineComponent(navigationMonitor)
});
define("app/ui/pushstate_loading_bar",["module","require","exports","core/component"],function(module, require, exports) {
function pushstateLoadingBar(){this.defaultAttrs({pageSelector:"body",loadingSelectorClass:".PushstateLoadingBar",modifierClass:"",hideDelay:1e3}),this.showProgress=function(a,b){this.insertLoader(),setTimeout(function(){var a=25+Math.random()*50;this.$loader.css("width",a+"%")}.bind(this),0)},this.completeProgress=function(a,b){this.$loader&&(this.$loader.css("width","100%"),this.$loader.delay(this.attr.hideDelay).fadeOut(function(){this.$loader.remove()}.bind(this)))},this.insertLoader=function(){var a=this.attr.loadingSelectorClass.replace(".","");$(this.attr.pageSelector).append('<div class="'+a+'"></div>'),this.$loader=this.select("loadingSelectorClass"),this.$loader.addClass(this.attr.modifierClass)},this.after("initialize",function(){this.on(document,"uiShowGlobalLoadingIndicator",this.showProgress),this.on(document,"uiHideGlobalLoadingIndicator",this.completeProgress)})}var defineComponent=require("core/component");module.exports=defineComponent(pushstateLoadingBar)
});
define("app/ui/start/search_dialog",["module","require","exports","app/ui/timelines/base_timeline","app/ui/timelines/with_story_pagination","app/ui/with_item_actions","app/ui/with_user_actions","app/ui/timelines/with_old_items","app/ui/with_dialog","app/ui/infinite_scroll_watcher","app/data/timeline","core/i18n"],function(module, require, exports) {
function searchDialog(){this.defaultAttrs({top:80,maxTop:80,bottomPadding:80,streamSelector:".stream-items",emptyTextSelector:".empty-text"}),this.setup=function(a,b){this.showMoreSpinner(),this.query=b.query,this.reset(),this.getOldItems(),this.setTitle(),this.open()},this.setTitle=function(){this.select("modalTitleSelector").text(_('R\xe9sultats de recherche pour "{{query}}"',{query:this.query}))},this.reset=function(){this.clearScrollCursor(),this.select("streamSelector").empty(),this.select("modalBodySelector").css("height",""),this.select("emptyTextSelector").hide(),this.on("dataGotMoreTimelineItems",this.injectOldItemsOnInitialRequest),this.has_more_items=!0},this.adjustDialogHeight=function(){var a=this.select("modalBodySelector").outerHeight(),b=$(window).height()-(this.select("modalSelector").outerHeight()+this.attr.top)-this.attr.bottomPadding;this.select("modalBodySelector").css("height",a+b),this.$dialog.css({position:"",top:this.attr.top})},this.addQueryToOldItemsData=function(a){var b=a();return b.query=this.query,b},this.injectOldItemsOnInitialRequest=function(a,b){this.off("dataGotMoreTimelineItems",this.injectOldItemsOnInitialRequest),this.has_more_items=b.has_more_items,this.injectOldItems(b)},this.possiblyRenderNoResultsMessage=function(a,b){b.items.length==0&&(this.select("emptyTextSelector").show(),this.select("backToTopSelector").hide(),this.select("emptyTextSelector").text(_('Aucun r\xe9sultat n\'a \xe9t\xe9 trouv\xe9 pour la requ\xeate {{query}}.',{query:this.query})))},this.scrollToTop=function(){this.select("modalBodySelector").animate({scrollTop:0},"fast")},this.after("initialize",function(){InfiniteScrollWatcher.attachTo(this.select("modalBodySelector"),{contentSelector:".stream-items"}),TimelineData.attachTo(this.$node,{allowConcurrentRequests:!1,endpoint:"/i/search/timeline",defaultAjaxData:{mode:"users"}}),this.around("getOldItemsData",this.addQueryToOldItemsData),this.after("open",this.adjustDialogHeight),this.on(document,"uiSeachDialogWantsUsers",this.setup),this.on("uiHasInjectedOldTimelineItems",this.possiblyRenderNoResultsMessage)})}var BaseTimeline=require("app/ui/timelines/base_timeline"),withStoryPagination=require("app/ui/timelines/with_story_pagination"),withItemActions=require("app/ui/with_item_actions"),withUserActions=require("app/ui/with_user_actions"),withOldItems=require("app/ui/timelines/with_old_items"),withDialog=require("app/ui/with_dialog"),InfiniteScrollWatcher=require("app/ui/infinite_scroll_watcher"),TimelineData=require("app/data/timeline"),_=require("core/i18n");module.exports=BaseTimeline.mixin(searchDialog,withStoryPagination,withUserActions,withItemActions,withOldItems,withDialog)
});
define("app/ui/start/search_typeahead_form",["module","require","exports","core/component"],function(module, require, exports) {
function searchTypeaheadProxy(){this.defaultAttrs({inputSelector:"input"}),this.proxyItemSelect=function(a,b){b.source=="account_search"?this.triggerUserSearch(b.query):(this.trigger("uiSearchUserSelected"),this.trigger("uiShowProfilePopup",{userId:b.item.id}))},this.triggerDialog=function(a,b){var c=!1,d=function(a,b){c=!0},e=function(a,b){this.off(document,"uiFollowAction",d),this.off(document,"uiDialogClosed",e),c?this.reset():this.select("inputSelector").focus()};this.on(document,"uiFollowAction",d),this.on(document,"uiDialogClosed",e),this.trigger(a,b)},this.proxySubmit=function(a,b){a.preventDefault(),a.stopImmediatePropagation(),this.triggerUserSearch(this.select("inputSelector").val())},this.triggerUserSearch=function(a){if(!a)return;this.triggerDialog("uiSeachDialogWantsUsers",{query:a})},this.reset=function(){this.select("inputSelector").val("")},this.after("initialize",function(){this.on("uiNavigate",this.proxySubmit),this.on("uiTypeaheadItemSelected",this.proxyItemSelect)})}var defineComponent=require("core/component");module.exports=defineComponent(searchTypeaheadProxy)
});
define("app/ui/start/start_alert_modal",["module","require","exports","core/component","app/ui/with_dialog","core/i18n"],function(module, require, exports) {
function startAlertModal(){this.defaultAttrs({watchEvent:"uiStartAlertModal"}),this.after("initialize",function(){this.on(document,this.attr.watchEvent,this.open)})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),_=require("core/i18n");module.exports=defineComponent(startAlertModal,withDialog)
});
define("app/ui/start/transition_dialog",["module","require","exports","core/component"],function(module, require, exports) {
function startExitTransitionDialog(){this.defaultAttrs({bodyTransitionClass:"StartPage-transitioning",dialogClass:"StartExitTransitionDialog",dialogActiveClass:"StartExitTransitionDialog--active"}),this.showTransitionAndGoHome=function(){$("body").addClass(this.attr.bodyTransitionClass),this.$node.addClass(this.attr.dialogActiveClass),setTimeout(this.navigateToHome.bind(this),2100)},this.navigateToHome=function(){location.href="/"},this.after("initialize",function(){this.on(document,"uiNuxComplete",this.showTransitionAndGoHome)})}var defineComponent=require("core/component");module.exports=defineComponent(startExitTransitionDialog)
});
define("app/data/start_flow_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function StartFlowScribe(){this.defaultAttrs({exitDialogSelector:"#start-navigation-dialog"}),this.scribeCompleteStep=function(a,b){var c=b.skippedStep?"skip":"done";this.scribe({component:"progress",action:c})},this.scribeDialogOpen=function(a,b){this.scribe({component:"exit_dialog",action:"open"})},this.scribeDialogClose=function(a,b){this.scribe({component:"exit_dialog",action:"close"})},this.scribeFinished=function(){this.scribe({page:"welcome",section:"finished",action:"impression"})},this.trackNuxComplete=function(a,b){this.scribeFinished(),this.trigger("GATrackEvent",{gaEvent:"complete-NUX"})},this.after("initialize",function(){this.on(document,"uiNuxStepComplete",this.scribeCompleteStep),this.on(document,"uiNuxComplete",this.trackNuxComplete),this.on("uiDialogOpened",{exitDialogSelector:this.scribeDialogOpen}),this.on("uiDialogClosed",{exitDialogSelector:this.scribeDialogClose})})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(StartFlowScribe,withScribe)
});
define("app/data/start/tooltip_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function toolTipScribe(){this.defaultAttrs({componentName:"tooltip"}),this.scribeTooltipShow=function(a,b){var c=$(a.target);this.scribe({component:this.attr.componentName,action:"show"},{event_value:c.text().trim()})},this.after("initialize",function(){this.on(document,"uiTooltipShow",this.scribeTooltipShow)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(toolTipScribe,withScribe)
});
define("app/data/users",["module","require","exports","core/component","app/data/with_data"],function(module, require, exports) {
function users(){this.getUsers=function(a,b){var c={ids:b.ids};this.get({url:"/i/users/html",data:c,eventData:b,success:"dataUsersSuccess",error:"dataUsersError"})},this.after("initialize",function(){this.on("uiGetUsers",this.getUsers)})}var defineComponent=require("core/component"),withData=require("app/data/with_data");module.exports=defineComponent(users,withData)
});
define("app/boot/start",["module","require","exports","app/boot/app","app/ui/contact_import_buttons","app/data/contact_import","app/data/contact_import_scribe","app/ui/timelines/dismissible_timeline","app/ui/start/follow_context","app/data/start/follow_context","app/ui/who_to_follow/import_loading_dialog","app/ui/who_to_follow/import_services","app/ui/navigation_links","app/ui/start/navigation_monitor","app/ui/pushstate_loading_bar","app/ui/start/search_dialog","app/ui/search_input","app/data/search_input_scribe","app/ui/start/search_typeahead_form","app/ui/start/start_alert_modal","app/ui/start/transition_dialog","app/data/start_flow_scribe","app/data/start/tooltip_scribe","app/ui/typeahead/typeahead_dropdown","app/ui/typeahead/typeahead_input","app/data/users","core/utils","app/data/who_to_follow","app/data/who_to_follow_scribe"],function(module, require, exports) {
var bootApp=require("app/boot/app"),ContactImportButtons=require("app/ui/contact_import_buttons"),ContactImportData=require("app/data/contact_import"),ContactImportScribe=require("app/data/contact_import_scribe"),DismissibleTimeline=require("app/ui/timelines/dismissible_timeline"),FollowContext=require("app/ui/start/follow_context"),FollowContextData=require("app/data/start/follow_context"),ImportLoadingDialog=require("app/ui/who_to_follow/import_loading_dialog"),ImportServices=require("app/ui/who_to_follow/import_services"),NavigationLinks=require("app/ui/navigation_links"),NavigationMonitor=require("app/ui/start/navigation_monitor"),PushstateLoadingBar=require("app/ui/pushstate_loading_bar"),SearchDialog=require("app/ui/start/search_dialog"),SearchInput=require("app/ui/search_input"),SearchInputScribe=require("app/data/search_input_scribe"),SearchTypeaheadForm=require("app/ui/start/search_typeahead_form"),StartAlertModal=require("app/ui/start/start_alert_modal"),StartExitTransitionDialog=require("app/ui/start/transition_dialog"),StartFlowScribe=require("app/data/start_flow_scribe"),StartTooltipScribe=require("app/data/start/tooltip_scribe"),TypeaheadDropdown=require("app/ui/typeahead/typeahead_dropdown"),TypeaheadInput=require("app/ui/typeahead/typeahead_input"),UsersData=require("app/data/users"),utils=require("core/utils"),WhoToFollowData=require("app/data/who_to_follow"),WhoToFollowScribe=require("app/data/who_to_follow_scribe");module.exports=function(b){NavigationMonitor.attachTo(document,utils.merge(b,{noTeardown:!0})),StartFlowScribe.attachTo(document),bootApp(b),StartTooltipScribe.attachTo(document),PushstateLoadingBar.attachTo(document,{modifierClass:"PushstateLoadingBar--light",noTeardown:!0}),NavigationLinks.attachTo(".StartNavigation",{eventData:{scribeContext:{component:"subnav"}}}),SearchDialog.attachTo("#nux-search-dialog",{itemType:"user",loggedIn:b.loggedIn,eventData:{scribeContext:{component:"search_dialog"}}});var c="#nux-nav-search";SearchInput.attachTo(c,{eventData:{scribeContext:{component:"search"}}}),SearchInputScribe.attachTo(c),SearchTypeaheadForm.attachTo(c),TypeaheadInput.attachTo(c),TypeaheadDropdown.attachTo(c,{nextElementSelector:".search-btn",accountsShortcutShow:!0,autocompleteAccounts:!1,blockLinkActions:!0,typeaheadSrc:"SEARCH_BOX",datasourceRenders:[["accounts",["accounts"]]],deciders:b.typeaheadData,eventData:{scribeContext:{component:"search",element:"typeahead"}}}),FollowContext.attachTo(".StartFollowContext"),FollowContextData.attachTo(document,{counterName:"interests_follow_counter"}),StartAlertModal.attachTo("#start-navigation-blocker-dialog",{watchEvent:"uiWantsNavigationBlockerDialog"}),ContactImportData.attachTo(document,b),ContactImportScribe.attachTo(document,b),ImportLoadingDialog.attachTo("#import-loading-dialog"),ContactImportButtons.attachTo(".ContactImportButtons"),ImportServices.attachTo(".StartPage",{matchesHref:b.importSuccessUrl,eventData:{scribeContext:{component:"import_service_stream"}}}),StartExitTransitionDialog.attachTo(".StartExitTransitionDialog")}
});
define("app/boot/customize_profile",["module","require","exports","app/boot/app","app/data/tweet","app/data/tweet_box_scribe","app/ui/tweet_box_manager"],function(module, require, exports) {
var bootApp=require("app/boot/app"),TweetData=require("app/data/tweet"),TweetBoxScribe=require("app/data/tweet_box_scribe"),TweetBoxManager=require("app/ui/tweet_box_manager");module.exports=function(b){bootApp(b),TweetData.attachTo(document,b),TweetBoxScribe.attachTo(document,b),TweetBoxManager.attachTo(document,b)}
});
define("app/ui/start/home_popover",["module","require","exports","core/component","core/utils","core/i18n"],function(module, require, exports) {
function HomePopover(){this.defaultAttrs({hideDelay:5e3,homeNavSelector:".StartPreviewTimelineBtn",contentSelector:".HomeNavPopover-content",arrowSelector:".HomeNavPopover-arrow",resizeThrottle:50}),this.displayPopoverContent=function(a,b){if(this.currentShowIsForced)return;this.select("contentSelector").html(b.html),this.currentShowIsForced=b.forceFullDuration;if(!this.timeout){var c=this.getLeftHomePosition();this.$node.removeClass("fadingOut"),this.$node.css({animation:"",top:"-50px",left:c,opacity:1}),this.$node.show(),this.noAnimationSupport?this.$node.css({"z-index":1001,top:"47px"}):this.$node.css("animation","underOverNavBar .7s both linear")}this.resetTimeout()},this.reposition=function(){this.$node.css("left",this.getLeftHomePosition())},this.getLeftHomePosition=function(){return $(this.attr.homeNavSelector).offset().left},this.hidePopover=function(){this.currentShowIsForced||this.forceHidePopover()},this.forceHidePopover=function(){this.timeout=null,this.currentShowIsForced=!1,this.usersShowing=[],this.$node.addClass("fadingOut"),this.$node.css("opacity",0),this.trigger("uiHomePopoverHidden")},this.resetTimeout=function(){this.timeout&&window.clearInterval(this.timeout),this.timeout=setTimeout(this.forceHidePopover.bind(this),this.attr.hideDelay)},this.after("initialize",function(){this.noAnimationSupport=$.browser.msie&&parseInt($.browser.version,10)<=9,$.browser.msie&&parseInt($.browser.version,10)<=8&&this.select("arrowSelector").remove(),this.on(document,"uiHideHomePopover",this.hidePopover),this.on(document,"uiShowHomePopover",this.displayPopoverContent),this.on(window,"resize",utils.throttle(this.reposition.bind(this),this.attr.resizeThrottle))})}var defineComponent=require("core/component"),utils=require("core/utils"),_=require("core/i18n"),HomePopover=defineComponent(HomePopover);module.exports=HomePopover
});
define("app/ui/start/start_alert_modal_with_message",["module","require","exports","core/component","app/ui/start/start_alert_modal"],function(module, require, exports) {
function startAlertModalWithMessage(){this.defaultAttrs({messageSelector:".StartAlertModal-message"}),this.around("open",function(a,b,c){this.select("messageSelector").text(c&&c.message||""),a()})}var defineComponent=require("core/component"),StartAlertModal=require("app/ui/start/start_alert_modal");module.exports=StartAlertModal.mixin(startAlertModalWithMessage)
});
define("app/ui/start/fixed_right_rail",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
function fixedRightRail(){this.defaultAttrs({fixedRailSelector:".FixedRail",offsetRight:20,resizeThrottle:50}),this.reposition=function(){this.resetPosition();var a=this.$node.offset().left-$(window).scrollLeft()+this.originalLeftOffset;this.select("fixedRailSelector").css("left",a)},this.setup=function(){var a=this.select("fixedRailSelector");a.css("top",""),a.css("top",a.offset().top),this.resetPosition(),this.reposition()},this.resetPosition=function(){var a=this.select("fixedRailSelector");a.css({position:"",width:""}),this.originalLeftOffset=a.offset().left-this.$node.offset().left,a.css({position:"fixed",width:a.outerWidth()})},this.after("initialize",function(){this.on(document,"uiSwiftLoaded uiPageChanged",this.setup),this.on(document,"scroll",utils.throttle(this.reposition.bind(this),this.attr.resizeThrottle)),this.on(window,"resize",utils.throttle(this.reposition.bind(this),this.attr.resizeThrottle))})}var defineComponent=require("core/component"),utils=require("core/utils");module.exports=defineComponent(fixedRightRail)
});
define("app/ui/start_header",["module","require","exports","core/component","app/ui/start/fixed_right_rail"],function(module, require, exports) {
function StartHeader(){this.attributes({isActionsSticky:!1,actionsContainerSelector:".StartHeader-actions",defaultStateClass:"StartHeader--default",completeStateClass:"StartHeader--complete"}),this.setupSticky=function(){StartFixedRightRail.attachTo(this.node,{fixedRailSelector:this.attr.actionsContainerSelector})},this.updateText=function(a,b){var c=a.type==this.attr.showDefaultEvent;this.$node.toggleClass(this.attr.defaultStateClass,c).toggleClass(this.attr.completeStateClass,!c)},this.after("initialize",function(){this.attr.isActionsSticky&&this.setupSticky(),this.on(document,"uiStartHeaderShowCompleteText",this.updateText),this.on(document,"uiStartHeaderShowDefaultText",this.updateText)})}var defineComponent=require("core/component"),StartFixedRightRail=require("app/ui/start/fixed_right_rail");module.exports=defineComponent(StartHeader)
});
define("app/ui/start_link",["module","require","exports","core/component"],function(module, require, exports) {
function startLink(){this.attributes({clickEvent:"uiStartLinkClick",disableEvent:"uiStartLinkDisable",textEvent:"uiStartLinkText",disableClass:"StartLink--disabled"}),this.onClick=function(a){this.$node.hasClass(this.attr.disableClass)?(a.preventDefault(),a.stopPropagation()):this.trigger(this.attr.clickEvent)},this.onDisabled=function(a,b){this.$node.toggleClass(this.attr.disableClass,b.disabled)},this.onTextChange=function(a,b){this.$node.text(b.text)},this.after("initialize",function(){this.on("click",this.onClick),this.on(document,this.attr.disableEvent,this.onDisabled),this.on(document,this.attr.textEvent,this.onTextChange)})}var defineComponent=require("core/component");module.exports=defineComponent(startLink)
});
define("app/ui/start/start_setup_profile",["module","require","exports","core/component","app/utils/drag_drop_helper","app/utils/image","core/i18n"],function(module, require, exports) {
function StartSetupProfile(){this.defaultAttrs({cameraButtonSelector:'[data-action="camera"]',uploadButtonSelector:'[data-action="upload"]',imageSelector:".StartSetupProfile-profileCardPhoto img",profilePhotoSelector:".StartSetupProfile-profileCardPhotoDrag",orDragImageClass:"StartSetupProfile-profileCardPhotoDrag--show StartSetupProfile-profileCardPhotoDrag--showOrDrag",dragHereImageClass:"StartSetupProfile-profileCardPhotoDrag--show StartSetupProfile-profileCardPhotoDrag--showDragHere"}),this.openWebCam=function(a){this.trigger(document,"uiCropperWebcam",{uploadType:"avatar"})},this.imageUpdate=function(a,b){var c=image.getDataUri(b.sourceEventData.fileData);this.select("imageSelector").attr("src",c)},this.enableContinueButton=function(a){this.trigger("uiStartContinueLinkDisable",{disabled:!1})},this.changeToCancelSkipText=function(){this.trigger("uiStartSkipLinkText",{text:_('Continuer sans enregistrer')}),this.revertImageOnSkip=!0},this.changeHeader=function(){this.trigger("uiStartHeaderShowCompleteText")},this.skipLinkClick=function(a){this.revertImageOnSkip&&this.trigger("uiDeleteImage",{uploadType:"avatar"})},this.showOrDragMessage=function(a){this.select("profilePhotoSelector").addClass(this.attr.orDragImageClass)},this.hideOrDragMessage=function(a){this.select("profilePhotoSelector").removeClass(this.attr.orDragImageClass)},this.showDragHereMessage=function(a,b){(!b||dragDropHelper.hasFiles(b,/^image\/.*/))&&this.select("profilePhotoSelector").addClass(this.attr.dragHereImageClass)},this.hideDragHereMessage=function(a){this.select("profilePhotoSelector").removeClass(this.attr.dragHereImageClass)},this.after("initialize",function(){this.on(this.select("uploadButtonSelector"),"mouseenter",this.showOrDragMessage),this.on(this.select("uploadButtonSelector"),"mouseleave click",this.hideOrDragMessage),this.on(document,"dataSaveImageSuccess",this.imageUpdate),this.on(document,"dataSaveImageSuccess",this.enableContinueButton),this.on(document,"dataSaveImageSuccess",this.changeToCancelSkipText),this.on(document,"dataSaveImageSuccess",this.changeHeader),this.on(this.select("cameraButtonSelector"),"click",this.openWebCam),this.on(document,"uiStartSkipLinkClick",this.skipLinkClick),this.on(document.body,"uiDragEnter",this.showDragHereMessage),this.on(document.body,"uiDragLeave uiDrop",this.hideDragHereMessage)})}var defineComponent=require("core/component"),dragDropHelper=require("app/utils/drag_drop_helper"),image=require("app/utils/image"),_=require("core/i18n");module.exports=defineComponent(StartSetupProfile)
});
define("app/pages/start/setup_profile",["module","require","exports","core/i18n","app/ui/alert_banner","app/ui/alert_banner_to_message_drawer","app/boot/start","app/ui/settings/change_photo","app/boot/customize_profile","app/data/drag_and_drop_scribe","app/ui/droppable_image","app/ui/edit_header_button","app/ui/start/home_popover","app/utils/image","app/ui/image_uploader","app/ui/inline_edit","app/ui/profile_edit_param","app/ui/dialogs/profile_image_upload_dialog","app/data/settings/profile_image_upload_scribe","app/data/settings","app/ui/start/start_alert_modal_with_message","app/ui/start_header","app/ui/start_link","app/ui/start/start_setup_profile"],function(module, require, exports) {
var _=require("core/i18n"),AlertBanner=require("app/ui/alert_banner"),AlertBannerToMessageDrawer=require("app/ui/alert_banner_to_message_drawer"),bootStartPages=require("app/boot/start"),ChangePhoto=require("app/ui/settings/change_photo"),customizeProfileBoot=require("app/boot/customize_profile"),DragAndDropScribe=require("app/data/drag_and_drop_scribe"),DroppableImage=require("app/ui/droppable_image"),EditHeaderButton=require("app/ui/edit_header_button"),HomePopover=require("app/ui/start/home_popover"),image=require("app/utils/image"),ImageUploader=require("app/ui/image_uploader"),InlineEdit=require("app/ui/inline_edit"),ProfileEditParam=require("app/ui/profile_edit_param"),ProfileImageUploadDialog=require("app/ui/dialogs/profile_image_upload_dialog"),ProfileImageUploadScribe=require("app/data/settings/profile_image_upload_scribe"),SettingsData=require("app/data/settings"),StartAlertModalWithMessage=require("app/ui/start/start_alert_modal_with_message"),StartHeader=require("app/ui/start_header"),StartLink=require("app/ui/start_link"),StartSetupProfile=require("app/ui/start/start_setup_profile");module.exports=function(b){bootStartPages(b),customizeProfileBoot(b),StartAlertModalWithMessage.attachTo("#start-alert-dialog",{watchEvent:"uiStartAlertModalWithMessage"}),StartLink.attachTo(".StartContinueLink",{clickEvent:"uiStartContinueLinkClick",disableEvent:"uiStartContinueLinkDisable",textEvent:"uiStartContinueLinkText",disableClass:"disabled"}),StartLink.attachTo(".StartSkipLink",{clickEvent:"uiStartSkipLinkClick",disableEvent:"uiStartSkipLinkDisable",textEvent:"uiStartSkipLinkText",disableClass:"StartLinkLink--disabled"}),StartSetupProfile.attachTo(".StartSetupProfile",{fileTypeRegExp:/image\/.*/}),AlertBannerToMessageDrawer.attachTo(document),SettingsData.attachTo(document,b),InlineEdit.attachTo(".profile-page-header .editable-group"),ProfileImageUploadScribe.attachTo("#profile_image_upload_dialog"),DragAndDropScribe.attachTo(document);var c={scribeContext:{component:"profile_image_upload",page:b.pageName,section:b.sectionName}};ImageUploader.attachTo('[data-action="upload"]',{maxSizeInBytes:10485760,fileTooBigMessage:_('Veuillez s\xe9lectionner une image de profil qui fait moins de 10 Mo.'),uploadType:"avatar",eventData:c,alertEvent:"uiStartAlertModalWithMessage",formAuthenticityToken:b.formAuthenticityToken}),ProfileImageUploadDialog.attachTo("#profile_image_upload_dialog",{uploadType:"avatar",eventData:c,maximumWidth:b.maxAvatarUploadDimension,maximumHeight:b.maxAvatarUploadDimension,imageNameSelector:".StartSetupProfile-uploadButton input.file-name",imageDataSelector:".StartSetupProfile-uploadButton input.file-data",maxImageSize:716800,alertMessageEvent:"uiStartAlertModalWithMessage"}),DroppableImage.attachTo("body",{uploadType:"avatar",eventData:c}),$(document).trigger("uiEditProfileStart"),image.supportsCropper()&&using("css!"+b.profileEditingCSSBundle,function(){}),StartHeader.attachTo(".StartHeader",{isActionsSticky:!0})}
});
define("app/pages/start/import",["module","require","exports","app/boot/start"],function(module, require, exports) {
var bootStartPages=require("app/boot/start");module.exports=function(b){bootStartPages(b)}
});
define("app/ui/start/with_dismissible_timeline_follow_all",["module","require","exports"],function(module, require, exports) {
function withDismissibleTimelineFollowAll(){this.collectAllUserIds=function(a,b){var c=this.select("genericItemSelector").map(function(a,b){var c=$(b);return{id:this.getUserIdFromStreamItem($(b)),source:c.data("recommendation-source"),token:c.data("recommendation-token")}}.bind(this)).toArray(),d=c.map(function(a){return a.id});this.trigger("uiHasFollowAllUserIds",{ids:d,followContext:c})},this.onRecommendationChanged=function(a,b){this.trigger("uiFollowAllUserSelectionChanged",{count:this.select("genericItemSelector").length})},this.after("initialize",function(){this.on(document,"uiWantsFollowAllUsersIds",this.collectAllUserIds),this.on(document,"uiSwiftLoaded uiPageChanged uiDidDismissUserRecommendation uiHasInjectedOldTimelineItems",this.onRecommendationChanged)})}module.exports=withDismissibleTimelineFollowAll
});
define("app/ui/start/with_select_all_timeline_ui",["module","require","exports"],function(module, require, exports) {
function withSelectAllTimelineUI(){this.defaultAttrs({checkboxSelector:".js-action-checkbox",selectAllSelector:".js-select-all input"}),this.onSelectionChange=function(a,b){this.trigger("uiFollowAllUserSelectionChanged",{count:b.numSelected})},this.collectAllUserIds=function(){var a=this.select("checkedCheckboxSelector").map(function(a,b){var c=parseInt($(b).val(),10),d=$(b).closest(this.attr.genericItemSelector);return{id:c,source:d.data("recommendation-source"),token:d.data("recommendation-token")}}.bind(this)).toArray(),b=a.map(function(a){return a.id});this.trigger("uiHasFollowAllUserIds",{ids:b,followContext:a})},this.updateSelection=function(a,b){this.select("checkedSelectAllSelector").length>0&&this.trigger("uiSelectAllReload")},this.after("initialize",function(){this.attr.checkedCheckboxSelector=this.attr.checkboxSelector+":checked",this.attr.checkedSelectAllSelector=this.attr.selectAllSelector+":checked",this.on("uiListSelectionChanged",this.onSelectionChange),this.on("uiWantsFollowAllUsersIds",this.collectAllUserIds),this.on("uiHasInjectedOldTimelineItems",this.updateSelection)})}module.exports=withSelectAllTimelineUI
});
define("app/data/follow_all",["module","require","exports","core/component","app/data/with_data","app/data/user_info"],function(module, require, exports) {
function followAll(){this.defaultAttrs({followAllEndpoint:"/i/user/follow_all",unfollowAllEndpoint:"/i/user/unfollow_all"}),this.followAllUsers=function(a,b){if(!b.ids||b.ids.length==0){this.trigger("dataFollowAllUsersSuccess",{result:{followed:[],requested:[]}});return}this.post({url:this.attr.followAllEndpoint,data:{user_ids:b.ids},eventData:b,success:"dataFollowAllUsersSuccess",error:"dataFollowAllUsersFailure"})},this.unfollowAllUsers=function(a,b){var c=b.ids||[];userInfo.getDecider("bulkUnfollowEnabled")?this.post({url:this.attr.unfollowAllEndpoint,data:{user_ids:c},success:"dataUnfollowAllUsersSuccess",error:"dataUnfollowAllUsersFailure"}):(c.forEach(function(a){this.trigger("uiUnfollowAction",{userId:a,originalFollowState:"not-following"})},this),this.trigger("dataUnfollowAllUsersSuccess",{result:{followed:c}}))},this.after("initialize",function(){this.on("uiFollowAllUsers",this.followAllUsers),this.on("uiUnfollowAllUsers",this.unfollowAllUsers)})}var defineComponent=require("core/component"),withData=require("app/data/with_data"),userInfo=require("app/data/user_info");module.exports=defineComponent(followAll,withData)
});
define("app/data/follow_all_scribe",["module","require","exports","core/component","app/data/with_scribe","app/data/user_info"],function(module, require, exports) {
function followAllScribe(){this.scribeFollowAllSuccess=function(a,b){var c=b.result&&b.result.requested?b.result.requested.length:0,d=b.result&&b.result.followed?b.result.followed.length:0,e=b.sourceEventData||{};this.scribe({component:"user",action:"follow_all"},{event_value:c+d,items:e.followContext||[]})},this.scribeUnfollowAllSuccess=function(a,b){var c=b.result&&b.result.unfollowed?b.result.unfollowed.length:0;this.scribe({component:"user",action:"unfollow_all"},{event_value:c})},this.after("initialize",function(){this.on("dataFollowAllUsersSuccess",this.scribeFollowAllSuccess),this.scribeOnEvent("dataFollowAllUsersFailure",{component:"user",action:"follow_all_failure"}),userInfo.getDecider("bulkUnfollowEnabled")&&(this.on("dataUnfollowAllUsersSuccess",this.scribeUnfollowAllSuccess),this.scribeOnEvent("dataUnfollowAllUsersFailure",{component:"user",action:"unfollow_all_failure"}))})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe"),userInfo=require("app/data/user_info");module.exports=defineComponent(followAllScribe,withScribe)
});
define("app/ui/start/fixed_scroll_header",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
function fixedScrollHeader(){this.defaultAttrs({headerSelector:".FixedScrollHeader-header",maskClassSelector:".FixedScrollHeader-mask",fillClassSelector:".FixedScrollHeader-fill",maskHeight:20,scrollOffsetTop:66,scrollOffsetBuffer:5,scrollThrottle:50,zIndex:1}),this.checkHorizontalAlignment=function(){if(!this.isFixed)return;var a=this.$node.offset().left-$(window).scrollLeft()+this.originalLeftOffset;this.$header.css("left",a),this.select("maskClassSelector").css("left",a)},this.checkScrollPosition=function(){var a=this.getHeaderOffset()<this.scrollOffsetTop()+this.attr.scrollOffsetBuffer;a?this.setFixedHeader():this.isFixed&&this.removeFixedHeader()},this.getHeaderOffset=function(){var a=this.isFixed?this.select("fillClassSelector"):this.select("headerSelector");return a.offset().top-$(window).scrollTop()},this.setFixedHeader=function(){if(this.isFixed){this.checkHorizontalAlignment();return}var a={width:this.$header.width(),top:this.getHeaderOffset(),left:this.$header.offset().left,marginTop:0,position:"fixed",zIndex:this.attr.zIndex};this.isFixed=!0,this.createFill(),this.$header.css(a),setTimeout(function(){this.$header.css("top",this.scrollOffsetTop())}.bind(this),0),this.createMask()},this.createFill=function(){this.$header.after('<div class="'+this.attr.fillClassSelector.replace(".","")+'"></div>'),this.select("fillClassSelector").css({height:this.$header.outerHeight(),marginTop:this.$header.css("margin-top"),marginBottom:this.$header.css("margin-bottom")})},this.createMask=function(){this.$header.before('<div class="'+this.attr.maskClassSelector.replace(".","")+'"></div>'),this.select("maskClassSelector").css({height:this.attr.maskHeight,top:this.scrollOffsetTop()-this.attr.maskHeight,width:this.$header.outerWidth(),left:this.$header.offset().left,position:"fixed",backgroundColor:this.$header.css("background-color"),zIndex:this.attr.zIndex})},this.removeFixedHeader=function(){this.isFixed=!1,this.select("headerSelector").css({width:"",top:"",left:"",paddingTop:"",marginTop:"",zIndex:"",position:""}),this.select("maskClassSelector").remove(),this.select("fillClassSelector").remove()},this.scrollOffsetTop=function(){return $.isFunction(this.attr.scrollOffsetTop)?this.attr.scrollOffsetTop():this.attr.scrollOffsetTop},this.after("initialize",function(){this.isFixed=!1,this.$header=this.select("headerSelector"),this.originalLeftOffset=this.$header.offset().left-this.$node.offset().left,this.on(document,"uiSwiftLoaded uiPageChanged",this.checkScrollPosition),this.on(document,"scroll",utils.throttle(this.checkScrollPosition.bind(this),this.attr.scrollThrottle)),this.on(window,"resize",utils.throttle(this.checkHorizontalAlignment.bind(this),this.attr.scrollThrottle)),this.checkScrollPosition()})}var defineComponent=require("core/component"),utils=require("core/utils");module.exports=defineComponent(fixedScrollHeader)
});
define("app/ui/select_all",["module","require","exports","core/component"],function(module, require, exports) {
function selectAll(){this.defaultAttrs({checkboxSelector:'li input[type="checkbox"]',selectAllSelector:'.content-header input[type="checkbox"]'}),this.checkboxChanged=function(a){var b=this.select("checkboxSelector"),c=this.select("checkedCheckboxSelector");this.select("selectAllSelector").attr("checked",c.length==b.length),this.triggerSelectionChanged()},this.selectAllChanged=function(){var a=this.select("selectAllSelector").is(":checked");this.select("checkboxSelector").attr("checked",a),this.triggerSelectionChanged(),this.trigger("uiSelectAllChanged",{checked:a})},this.initSelections=function(){this.select("selectAllSelector").is(":checked")&&(this.select("checkboxSelector").attr("checked","checked"),this.select("listItemSelector").addClass("selected")),this.triggerSelectionChanged()},this.triggerSelectionChanged=function(){this.trigger("uiListSelectionChanged",{numSelected:this.select("checkedCheckboxSelector").size(),selectAllChecked:this.select("selectAllSelector").is(":checked")})},this.after("initialize",function(){this.attr.checkedCheckboxSelector=this.attr.checkboxSelector+":checked",this.on("change",{checkboxSelector:this.checkboxChanged,selectAllSelector:this.selectAllChanged}),this.on(document,"uiSwiftLoaded uiPageChanged uiSelectAllReload",this.initSelections)})}var defineComponent=require("core/component");module.exports=defineComponent(selectAll)
});
define("app/data/select_all_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function selectAllScribe(){this.defaultAttrs({checkboxSelector:'.contact-select-box input[type="checkbox"]',selectAllSelector:'.content-header input[type="checkbox"]',eventData:{scribeContext:{component:"select_all"}}}),this.scribeCheckboxSelection=function(a,b){this.scribeCheck($(a.target),"checkbox")},this.scribeSelectAllSelection=function(a,b){this.scribeCheck($(a.target),"select_all_checkbox")},this.scribeCheck=function(a,b){var c=a.is(":checked")?"checked":"unchecked",d=a.attr("value");this.scribe({element:b,action:c},this.attr.eventData,{event_value:d})},this.after("initialize",function(){this.on("change",{checkboxSelector:this.scribeCheckboxSelection,selectAllSelector:this.scribeSelectAllSelection})})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(selectAllScribe,withScribe)
});
define("app/data/start/timeline_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function timelineScribe(){this.defaultAttrs({selectAllSelector:".js-select-all"}),this.scribeFollowAll=function(a,b){var c=this.select("selectAllSelector");if(c.length>0){var d=c.is(":checked")?"checked":"unchecked";this.scribe({component:"follow_all",element:"select_all_checkbox",action:d})}},this.scribeLoadMore=function(a,b){this.scribe({component:"load_more",action:"click"})},this.after("initialize",function(){this.on(document,"uiLoadMoreClicked",this.scribeLoadMore),this.on(document,"uiFollowAllUsers",this.scribeFollowAll)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(timelineScribe,withScribe)
});
define("app/ui/start/follow_all_button",["module","require","exports","core/component","core/utils","core/i18n","template"],function(module, require, exports) {
function followAllButton(){this.defaultAttrs({redirectUrl:"/",templatePath:null}),this.updateFollowButton=function(a,b){if(this.attr.templatePath){var b={num_users_selected:b.count};this.$node.html(template[this.attr.templatePath].render(b,template))}},this.requestFollowAllUserIds=function(a,b){this.$node.prop("disabled",!0),this.trigger("uiWantsFollowAllUsersIds")},this.onFollowAllSuccess=function(a,b){var c=b.result&&b.result.requested?b.result.requested.length:0,d=b.result&&b.result.followed?b.result.followed.length:0,e=c+d==0;this.trigger("uiNavigate",{href:this.attr.redirectUrl,skippedStep:e})},this.onFollowAllError=function(a,b){this.$node.prop("disabled",!1),this.trigger("uiShowMessage",{message:_('Oups ! Quelque chose s\'est mal pass\xe9. Veuillez r\xe9essayer !')})},this.after("initialize",function(){this.$node.prop("disabled",!1),this.on("click",this.requestFollowAllUserIds),this.on(document,"uiHasFollowAllUserIds","uiFollowAllUsers"),this.on(document,"dataFollowAllUsersSuccess",this.onFollowAllSuccess),this.on(document,"dataFollowAllUsersFailure",this.onFollowAllError),this.on(document,"uiFollowAllUserSelectionChanged",this.updateFollowButton)})}var defineComponent=require("core/component"),utils=require("core/utils"),_=require("core/i18n"),template=require("template");module.exports=defineComponent(followAllButton)
});
define("app/pages/start/find_friends",["module","require","exports","app/boot/start","app/data/timeline","app/ui/start/home_popover","app/ui/timelines/dismissible_timeline","app/ui/start/with_dismissible_timeline_follow_all","app/ui/start/with_select_all_timeline_ui","app/data/follow_all","app/data/follow_all_scribe","app/ui/start/fixed_right_rail","app/ui/start/fixed_scroll_header","app/ui/select_all","app/data/select_all_scribe","app/data/start/timeline_scribe","app/ui/start/follow_all_button","app/data/who_to_follow","app/data/who_to_follow_scribe","app/data/users","core/utils"],function(module, require, exports) {
var bootStartPages=require("app/boot/start"),TimelineData=require("app/data/timeline"),HomePopover=require("app/ui/start/home_popover"),DismissibleTimeline=require("app/ui/timelines/dismissible_timeline"),withDismissibleTimelineFollowAll=require("app/ui/start/with_dismissible_timeline_follow_all"),withSelectAllTimelineUI=require("app/ui/start/with_select_all_timeline_ui"),FollowAllData=require("app/data/follow_all"),FollowAllScribe=require("app/data/follow_all_scribe"),StartFixedRightRail=require("app/ui/start/fixed_right_rail"),StartFixedScrollHeader=require("app/ui/start/fixed_scroll_header"),SelectAll=require("app/ui/select_all"),SelectAllScribe=require("app/data/select_all_scribe"),StartTimelineScribe=require("app/data/start/timeline_scribe"),StartFollowAllButton=require("app/ui/start/follow_all_button"),WhoToFollowData=require("app/data/who_to_follow"),WhoToFollowScribe=require("app/data/who_to_follow_scribe"),UsersData=require("app/data/users"),utils=require("core/utils");module.exports=function(b){bootStartPages(b);var c="#start-find-friends-timeline";TimelineData.attachTo(c,b,{endpoint:b.timeline_url,allowConcurrentRequests:!1}),WhoToFollowScribe.attachTo(document),WhoToFollowData.attachTo(document),StartFollowAllButton.attachTo(".btn-follow-all",{redirectUrl:b.redirect_url,templatePath:"start/wtf_follow_button"}),StartFixedScrollHeader.attachTo(".StartFindFriends-content",{headerSelector:".StartFindFriends-timelineHeader",scrollOffsetTop:function(){return $(window).width()<=1010?10:$(".StartNavigation").height()+30},maskHeight:30,zIndex:2});var d=b.isDismissible?withDismissibleTimelineFollowAll:withSelectAllTimelineUI;DismissibleTimeline.mixin(d).attachTo(c,{itemType:"user",loggedIn:b.loggedIn,loadMoreSelector:".StartFindFriends-loadMore",eventData:{scribeContext:{component:"user"}}});if(!b.isDismissible){var e='.contact-select-box input[type="checkbox"]',f=".js-select-all";SelectAll.attachTo(c,{checkboxSelector:e,selectAllSelector:f}),SelectAllScribe.attachTo(c,{checkboxSelector:e,selectAllSelector:f})}StartFixedRightRail.attachTo(c,{fixedRailSelector:".StartHeader-follow"}),FollowAllData.attachTo(document),FollowAllScribe.attachTo(document),UsersData.attachTo(document),StartTimelineScribe.attachTo(document,{selectAllSelector:'.StartFindFriends-timelineHeader input[type="checkbox"]'})}
});
define("app/pages/start/first_tweet",["module","require","exports","app/boot/start","app/boot/inline_edit","app/data/tweet","app/data/tweet_box_scribe","app/ui/tweet_box_manager"],function(module, require, exports) {
var bootStartPages=require("app/boot/start"),inlineEditBoot=require("app/boot/inline_edit"),TweetData=require("app/data/tweet"),TweetBoxScribe=require("app/data/tweet_box_scribe"),TweetBoxManager=require("app/ui/tweet_box_manager");module.exports=function(b){bootStartPages(b),inlineEditBoot(b),TweetData.attachTo(document,b),TweetBoxScribe.attachTo(document,b),TweetBoxManager.attachTo(document,b),$(".StartFirstTweet .tweet-form").trigger("uiInitTweetbox",{condenseable:!1,preventTweetingDefaultText:!1,eventData:{scribeContext:{component:"first_tweet_box"}}}),$(document).on("uiTweetboxTweetSuccess dataTweetError",function(){$(this).trigger("uiNavigate",{href:b.nextPage})})}
});
define("app/ui/start/select_interests",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
function selectInterests(){this.defaultAttrs({checkedInputSelector:"input:checked",itemSelector:".StartCheckboxList-item"}),this.handleSubmit=function(a,b){a.preventDefault();var c=this.select("checkedInputSelector").map(function(a,b){return $(b).closest(this.attr.itemSelector)}.bind(this)),d=c.length==0;d||this.scribe({component:"select_interests",action:"complete"},{items:this.mapScribeItemsFromDOMItems(c).toArray(),item_count:c.length,event_value:c.length}),this.trigger("uiNavigate",{href:this.getSubmitUrl(),skippedStep:d})},this.mapScribeItemsFromDOMItems=function(a){return a.map(function(a,b){return{id:$(b).find(this.attr.checkedInputSelector).val(),name:$(b).text().trim(),position:a}}.bind(this))},this.getSubmitUrl=function(){var a=this.$node.attr("action"),b=this.$node.serialize();return b?a+"?"+b:a},this.after("initialize",function(){this.on("submit",this.handleSubmit)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(selectInterests,withScribe)
});
define("app/ui/account_create_event_ga",["module","require","exports","core/component"],function(module, require, exports) {
function acctCreate(){this.trackAcctCreate=function(){this.trigger("GATrackEvent",{gaEvent:"account-create"})},this.after("initialize",function(){this.on("uiSwiftLoaded",this.trackAcctCreate)})}var defineComponent=require("core/component"),AcctCreateGA=defineComponent(acctCreate);module.exports=AcctCreateGA
});
define("app/pages/start/interest_list",["module","require","exports","app/boot/start","app/data/select_all_scribe","app/ui/start/fixed_right_rail","app/ui/start/select_interests","app/ui/account_create_event_ga"],function(module, require, exports) {
var bootStartPages=require("app/boot/start"),SelectAllScribe=require("app/data/select_all_scribe"),StartFixedRightRail=require("app/ui/start/fixed_right_rail"),StartSelectInterests=require("app/ui/start/select_interests"),AcctCreateGA=require("app/ui/account_create_event_ga");module.exports=function(b){bootStartPages(b),AcctCreateGA.attachTo(document),StartSelectInterests.attachTo(".StartCheckboxList"),SelectAllScribe.attachTo(".StartCheckboxList",{checkboxSelector:'input[type="checkbox"]',eventData:{scribeContext:{component:"select_interests"}}}),StartFixedRightRail.attachTo(".StartCheckboxList",{fixedRailSelector:".StartHeader-follow"})}
});
define("app/ui/macaw_nymizer_signup_conversion",["module","require","exports","core/component"],function(module, require, exports) {
function macawNymizerSignupConversion(){this.signupConversion=function(){this.trigger("MNConversion",{mnType:"signup"})},this.after("initialize",function(){this.on("uiSwiftLoaded",this.signupConversion)})}var defineComponent=require("core/component"),MacawNymizerSignupConversion=defineComponent(macawNymizerSignupConversion);module.exports=MacawNymizerSignupConversion
});
define("app/pages/start/congratulations_splash",["module","require","exports","app/boot/start","app/ui/account_create_event_ga","app/ui/macaw_nymizer_signup_conversion","app/boot/help_pips_enable"],function(module, require, exports) {
var bootStartPages=require("app/boot/start"),AcctCreateGA=require("app/ui/account_create_event_ga"),MacawNymizerSignupConversion=require("app/ui/macaw_nymizer_signup_conversion"),enableHelpPips=require("app/boot/help_pips_enable");module.exports=function(b){bootStartPages(b),enableHelpPips(),AcctCreateGA.attachTo(document),MacawNymizerSignupConversion.attachTo(document)}
});