/*!CK:1225942328!*//*1427086800,*/

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

__d("XAYMTPanelSaveSettingsController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/ads\/growth\/aymt\/homepage_panel\/save_settings\/",{time_range:{type:"Enum",enumType:1},ad_account_id:{type:"Int"},promoted_object:{type:"Int"},collapsed:{type:"Int"},dismiss_nux:{type:"Bool",defaultValue:false},flash_insights_dismiss_nux:{type:"Bool",defaultValue:false},refresh_panel:{type:"Bool",defaultValue:false}});},null);
__d("AdvertiserHomePagelet",["AsyncRequest","DOM","URI","XAYMTPanelSaveSettingsController","$"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l={init:function(m,n){var o=j.getURIBuilder().setBool('refresh_panel',true).getURI();o.addQueryData(i.getRequestURI().getQueryData());new g().setURI(o).setStatusElement(n).setErrorHandler(function(p){h.setContent(k('pagelet_advertiser_panel'),'');}).send();}};e.exports=l;},null);
__d("LeftNavBigIconExpandItem.react",["Arbiter","React","cx"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();"use strict";var j=h.createClass({displayName:"LeftNavBigIconExpandItem",render:function(){var k=this.props,l=k.model,m=l.keys.some(function(o){return o===k.selectedKey;}),n=(("_4qh8")+(m?' '+"selectedItem":''));return (h.createElement("li",{key:"expandItem_"+l.id,className:n,"data-sortable":l.sortable,id:"navItem_"+l.id},this._renderBookmarkContent()));},_renderBookmarkContent:function(){var k=this.props,l=k.model,m=this._renderCounter(l.count),n=h.createElement("a",{className:"_4qh9","data-testid":'left_nav_item_'+l.link.title,"data-gt":l.datagt,title:l.link.title,rel:l.link.rel,href:l.link.href,ajaxify:l.link.ajaxify,onClick:function(){return g.inform('LeftNavController/setItemCount',{item:l,count:0});}},m,h.createElement("div",{className:"_4qha"},l.name));return n;},_renderCounter:function(k){var l=k>0,m=(("_4qhb")+(!l?' '+"hidden_elem":''));return (h.createElement("span",{className:m},k<=20?k:'20+'));}});e.exports=j;},null);
__d("LeftNavBigIconExpandLinkItem.react",["Link.react","React","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();"use strict";var k=h.createClass({displayName:"LeftNavBigIconExpandLinkItem",render:function(){var l=this.props.model;return (h.createElement("div",{className:"_1dni"},h.createElement(g,{href:l.link.href},j._("View all")),h.createElement("span",{className:"_1dnj"},"·"),h.createElement("a",{ajaxify:"/ajax/groups/create_get.php?ref=bookmarks",href:"#",rel:"dialog"},j._("New Group"))));}});e.exports=k;},null);
__d("LeftNavBigIconItem.react",["Arbiter","DOMContainer.react","Image.react","LeftNavBigIconExpandItem.react","LeftNavBigIconExpandLinkItem.react","Link.react","React","XUISpinner.react","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();"use strict";var p=m.createClass({displayName:"LeftNavBigIconItem",getInitialState:function(){return {hidden:true};},render:function(){var q=this.props,r=q.model,s=r.keys.some(function(v){return v===q.selectedKey;}),t=r.keys.some(function(v){return v===q.loadingKey;}),u=(("_23k3")+(s?' '+"selectedItem":'')+(this.state.hidden?' '+"unexpanded":'')+(t?' '+"_23k6":''));return (m.createElement("li",{className:u,"data-sortable":r.sortable,id:"navItem_"+r.id},this._renderBookmarkContent()));},_renderBookmarkContent:function(){var q=this.props,r=q.model,s=q.expandItems?q.expandItems.items:null,t=null,u=null,v=false;if(s&&s.length!==0){v=true;var w=((this.state.hidden?"_23k7":'')+(!this.state.hidden?' '+"_23k8":''));t=m.createElement(l,{className:w,onClick:this._expandOnClick});u=this._renderExpandContent(s);r.count=0;s.forEach(function(z){r.count+=z.count;});}var x=this._renderCounter(r.count),y=r.auxcontent?m.createElement(h,{key:"auxpopover"},r.auxcontent):null;return (m.createElement("div",null,t,y,m.createElement("div",{className:"_23k9"},m.createElement("a",{className:"_23ka","data-testid":'left_nav_item_'+r.link.title,"data-gt":r.datagt,title:r.link.title,rel:v?null:r.link.rel,href:v?null:r.link.href,ajaxify:v?null:r.link.ajaxify,onClick:v?this._expandOnClick:this._resetCountOnClick},m.createElement("div",{className:"_23kb"},m.createElement(n,{className:"uiSideNavSpinner",showOnAsync:true}),x),m.createElement("span",null,m.createElement(i,{src:r.image,alt:""})),m.createElement("div",{className:"_23kc"},r.name))),u));},_renderCounter:function(q){var r=q>0,s=(("_23kd")+(!r?' '+"hidden_elem":''));return (m.createElement("span",{className:s},q<=20?q:'20+'));},_renderExpandContent:function(q){var r=this.props.selectedKey,s=[],t=q.map(function(w){if(w.type.indexOf('_tool')>-1){s.push(w);return null;}return (m.createElement(j,{key:"expand"+w.id,model:w,selectedKey:r}));}),u=m.createElement(k,{model:this.props.model,items:s,hasNoItem:t===null}),v=((this.state.hidden?"hidden_elem":'')+(' '+"_23ke"));return (m.createElement("div",{className:v},m.createElement("ul",null,t,u)));},_expandOnClick:function(){this.setState({hidden:!this.state.hidden});},_resetCountOnClick:function(){g.inform('LeftNavController/setItemCount',{item:this.props.model,count:0});}});e.exports=p;},null);
__d("LeftNavBigIconSection.react",["React","LeftNavBigIconItem.react","cx"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();"use strict";var j=g.createClass({displayName:"LeftNavBigIconSection",render:function(){var k=this,l=this.props.model,m=l.items,n=this.props.selectedKey,o=this.props.loadingKey,p=this.props.expandModel,q=p?p.title.toLowerCase():null;if(m.length===0)return null;var r=m.map(function(v){var w=q===v.name.toLowerCase()?p:null;return (g.createElement(h,{key:v.id,expandItems:w,model:v,section:k,selectedKey:n,loadingKey:o}));}),s="_2yt8",t="_2yt9",u={nav_items_count:m.length.toString(),nav_section:this.props.id.toString(),bm_sec:this.props.id.toString()};return (g.createElement("div",{id:this.props.id,className:s,"data-ft":l.dataft,ref:"sectionBody"},g.createElement("ul",{className:t,"data-gt":JSON.stringify(u),"data-ft":l.dataft},r)));}});e.exports=j;},null);
__d("Collection",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();function g(h,i){if(!h.__collection__){var j=new Function();for(var k in h.prototype)j.prototype[k]=g._call.bind(null,k);h.__collection__=j;}var l=new h.__collection__();l._elements=i;return l;}g._call=function(h){var i=Array.prototype.slice.call(arguments,1);this._elements.forEach(function(j){j[h].apply(j,i);});return this;};e.exports=g;},null);
__d("Drag",["Event","Arbiter","DOM","Style","Vector"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l={};l.currentDraggable=null;l.grab=function(m){if(l.currentDraggable)l._onmouseup();m.lastDragOver=null;l.attachDragEvents();l.currentDraggable=m;};l.attachDragEvents=function(){document.onselectstart=function(){document.onselectstart=null;return false;};if(l.dragEventsAttached)return;l.dragEventsAttached=true;h.subscribe('scroller/scroll',l._onmousemove);g.listen(document,{mousemove:l._onmousemove,mouseup:l._onmouseup});};l.droppables={};l.addDroppable=function(m,n){(l.droppables[m]=l.droppables[m]||[]).push(n);};l.removeDroppable=function(m,n){l.droppables[m]=l.droppables[m].filter(function(o){return o!=n;});};l.getOffsetParent=function(m){if(i.isNodeOfType(m,['body','html']))return document.body;while((m=m.parentNode)&&m!==document.body)if(j.get(m,'position')!=='static')return m;return document.body;};l._onmousemove=function(event,m){if(!l.currentDraggable)return;var n=m||k.getEventPosition(event),o=l.currentDraggable,p=l.droppables[o.namespace];if(o.namespace&&o.active&&p){var q={};p.forEach(function(w){q[w.zIndex]=w.zIndex;});var r=[];for(var s in q)r.push(q[s]);r.sort();var t=o.lastDragOver,u=null;for(var v=r.length-1;v>=0;v--)if(t&&t.dom!=null&&t.zIndex==r[v]&&t.isDraggedOver(n)){u=t;break;}else for(s=0;s<p.length;s++){if(r[v]!=p[s].zIndex)continue;if(t!=p[s]&&o.dom!=p[s].dom&&p[s].isDraggedOver(n)){u=p[s];v=-1;break;}}if(u&&u!=t){u.ondragover(o);l.currentDraggable.adjustCursorPosition();}if(u)u.ondragmove(o,n.sub(k.getElementPosition(u.dom)));o.lastDragOver=u;}l.currentDraggable._onmousemove(n);};l._onmouseup=function(m){document.onselectstart=null;if(l.currentDraggable){l.currentDraggable._ondrop();l.currentDraggable=null;}};e.exports=l;},null);
__d("Draggable",["Event","Arbiter","Collection","DOM","Drag","Rect","Style","Vector","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();function p(r){"use strict";this.canvas=r;this.scrollZone=50;this.velocity=100;this.coefficient=1;}p.prototype.activate=function(){"use strict";this.activate=o;this.event=g.listen(document,'mousemove',this._onmousemove.bind(this));this.interval=setInterval(this._intervalHandler.bind(this),50);this.cursor=null;};p.prototype.deactivate=function(){"use strict";delete this.activate;this.event&&this.event.remove();this.event=null;clearInterval(this.interval);};p.prototype._onmousemove=function(event){"use strict";this.cursor=n.getEventPosition(event);};p.prototype._intervalHandler=function(){"use strict";if(!this.cursor)return;var r=this.canvas==document.body?l.getViewportBounds():new l(this.canvas),s=new l(this.cursor.y-r.t,r.r-this.cursor.x,r.b-this.cursor.y,this.cursor.x-r.l),t=new n(0,0);if(s.t<s.b&&s.t<this.scrollZone){t.y=-this.scrollZone+s.t;}else if(s.b<this.scrollZone)t.y=this.scrollZone-s.b;t.y=this._doMath(t.y);if(s.l<s.r&&s.l<this.scrollZone){t.x=-this.scrollZone+s.l;}else if(s.r<this.scrollZone)t.x=this.scrollZone-s.r;t.x=this._doMath(t.x);if(t.x||t.y){t.scrollElementBy(this.canvas);if(document.body==this.canvas){var u=n.getScrollPosition();t.scrollElementBy(this.canvas);var v=n.getScrollPosition();this.cursor=this.cursor.add(v.sub(u));}else t.scrollElementBy(this.canvas);h.inform('scroller/scroll',this.cursor);}};p.prototype._doMath=function(r){"use strict";r=(r>=0?Math.min(r,this.scrollZone):Math.max(r,-this.scrollZone));return Math.floor(Math.pow(r/this.scrollZone*this.velocity,this.coefficient));};p.findScrollParent=function(r){"use strict";var s;r=r.parentNode;while(r){if(r.scrollHeight!=r.offsetTop){s=m.get(r,'overflowY');if(s=='scroll'||s=='auto')return r;}r=r.parentNode;}return document.body;};function q(r){"use strict";if(!r)throw new Error('Element should be a DOM node');if(!(this instanceof q)){if(r instanceof Array){var s=[];r.forEach(function(t){s.push(new q(t));});return new i(q,s);}else return new q(r);}else{this.data={};this.handles=[];this.dom=r;this.boundingBox=null;this.useScroller=true;this.grabPctX=this.grabPctY=0;this._shouldKillEvents=true;this.addHandle(this.dom);}}q.prototype.destroy=function(){"use strict";this.handles.forEach(function(r){this.removeHandle(r.obj);}.bind(this));this.data=this.dom=null;};q.prototype.adjustCursorPosition=function(){"use strict";var r=n.getElementDimensions(this.dom);this.cursorPositionVector=new n(parseInt(this.grabPctX*r.x,10),parseInt(this.grabPctY*r.y,10));};q.prototype._onclick=function(event){"use strict";if(!this._shouldKillEvents)return true;if(this.active)return g.kill(event);};q.prototype._ongrab=function(r){"use strict";this.ongrab();if(this.useScroller){if(!this.scroller)this.scroller=new p(p.findScrollParent(this.dom));this.scroller.activate();}if(this.active){if(!this.oldPosition)this.oldPosition=this.dom.style.position;var s=k.getOffsetParent(this.dom);if(s!==document.body)r=r.sub(n.getElementPosition(s));this.dom.style.position=this.absolute?'absolute':'relative';r.sub(this.cursorPositionVector).setElementPosition(this.dom);}};q.prototype._onmousedown=function(event){"use strict";if(!((event.which&&event.which===1)||(event.button&&event.button===1)))return;var r=event.getTarget();if(j.isNodeOfType(r,['input','select','textarea','object','embed']))return true;var s=n.getEventPosition(event),t=n.getElementDimensions(this.dom);this.draggableInitialVector=n.getElementPosition(this.dom);this.cursorPositionVector=s.sub(this.draggableInitialVector);this.grabPctX=t.x===0?0:this.cursorPositionVector.x/t.x;this.grabPctY=t.y===0?0:this.cursorPositionVector.y/t.y;k.grab(this,event);if(this.gutter){this.cursorInitialVector=s;}else{this._setActive(true);this._ongrab(s);}if(!this._shouldKillEvents)return true;return g.kill(event);};q.prototype._onmousemove=function(r){"use strict";if(!this.active)if(r.distanceTo(this.cursorInitialVector)>=this.gutter){this._setActive(true);this._ongrab(r);}if(this.active){var s=r.sub(this.cursorPositionVector),t;if(this.boundingBox){var u=l.newFromVectors(s,n.getElementDimensions(this.dom));u=u.boundWithin(this.boundingBox);s=u.getPositionVector();if(this.boundingBox.w()===0){t=new n(this.draggableInitialVector.x,s.y,'document');}else if(this.boundingBox.h()===0){t=new n(s.x,this.draggableInitialVector.y,'document');}else t=s;}else t=s;var v=k.getOffsetParent(this.dom);if(v!==document.body)t=t.sub(n.getElementPosition(v));t.setElementPosition(this.dom);this.ondrag(r);}};q.prototype._ondrop=function(){"use strict";this.scroller&&this.scroller.deactivate();if(this.active){setTimeout((function(){this._setActive(false);}).bind(this),0);this.ondrop(this.scroller&&this.scroller.cursor);if(this.lastDragOver)this.lastDragOver.ondrop(this);}};q.prototype.killDrag=function(){"use strict";this._setActive(false);k._onmouseup();};q.prototype.forceDrop=function(){"use strict";k._onmouseup();};q.prototype.setBoundingBox=function(r){"use strict";this.boundingBox=r;return this;};q.prototype.resetPosition=function(){"use strict";this.dom.style.position=this.oldPosition;this.oldPosition=null;this.dom.style.left='';this.dom.style.top='';return this;};q.prototype.setUseAbsolute=function(r){"use strict";this.absolute=r;return this;};q.prototype.setDragHandler=function(r){"use strict";this.ondrag=r;return this;};q.prototype.setGrabHandler=function(r){"use strict";this.ongrab=r;return this;};q.prototype.setDropHandler=function(r){"use strict";this.ondrop=r;return this;};q.prototype.setGutter=function(r){"use strict";this.gutter=r;return this;};q.prototype.setNamespace=function(r){"use strict";this.namespace=r;return this;};q.prototype.setUseScroller=function(r){"use strict";this.useScroller=r;return this;};q.prototype.setAvoidKillingEvents=function(r){"use strict";this._shouldKillEvents=!r;return this;};q.prototype.addHandle=function(r){"use strict";if(this.handles.length==1&&this.handles[0].obj==this.dom)this.removeHandle(this.dom);this.handles.push({obj:r,evt:[g.listen(r,'mousedown',this._onmousedown.bind(this)),g.listen(r,'click',this._onclick.bind(this)),g.listen(r,'drag',this._killUnlessActive.bind(this)),g.listen(r,'selectstart',this._killUnlessActive.bind(this))]});return this;};q.prototype.removeHandle=function(r){"use strict";this.handles=this.handles.filter(function(s){if(s.obj!=r){return true;}else{s.evt.forEach(function(t){t.remove();});return false;}});};q.prototype.getDOM=function(){"use strict";return this.dom;};q.prototype.setKey=function(r,s){"use strict";this.data[r]=s;return this;};q.prototype.getKey=function(r){"use strict";return this.data[r];};q.prototype._setActive=function(r){"use strict";if(!this.dom)return;this.dom.activeDrag=this.active=r;for(var s=0;s<this.handles.length;s++)this.handles[s].obj.activeDrag=r;};q.prototype._killUnlessActive=function(r){"use strict";if(!this._shouldKillEvents)return;if(r.getTarget()!==document.activeElement)return r.kill();};q.prototype.ondrag=o;q.prototype.ongrab=o;q.prototype.ondrop=o;q.prototype.gutter=0;q.prototype.handles=null;e.exports=q;},null);
__d("Droppable",["Collection","Drag","Draggable","Vector","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();function l(m){"use strict";if(!m)throw new Error('Element should be a DOM node');if(!(this instanceof l)){if(m instanceof Array){var n=[];m.forEach(function(o){n.push(new l(o));});return new g(l,n);}else return new l(m);}else{this.data={};this.dom=m;this.namespace=null;}}l.prototype.destroy=function(){"use strict";if(this.namespace)h.removeDroppable(this.namespace,this);this.data=this.dom=null;};l.prototype.setNamespace=function(m){"use strict";if(this.namespace)h.removeDroppable(this.namespace,this);this.namespace=m;h.addDroppable(m,this);return this;};l.prototype.setZIndex=function(m){"use strict";this.zIndex=m;return this;};l.prototype.hasPointMovedHorizontally=function(m){"use strict";var n=j.getElementPosition(this.dom);return n.x<=m.x&&this.dom.offsetWidth+n.x>m.x;};l.prototype.hasPointMovedVertically=function(m){"use strict";var n=j.getElementPosition(this.dom);return n.y<=m.y&&this.dom.offsetHeight+n.y>m.y;};l.prototype.hasPointMovedInside=function(m){"use strict";return this.hasPointMovedHorizontally(m)&&this.hasPointMovedVertically(m);};l.prototype.setDragOverHandler=function(m){"use strict";this.ondragover=m;return this;};l.prototype.setDragOverVectically=function(){"use strict";this.isDraggedOver=l.prototype.hasPointMovedVertically;return this;};l.prototype.setDragOverHorizontally=function(){"use strict";this.isDraggedOver=l.prototype.hasPointMovedHorizontally;return this;};l.prototype.setDragMoveHandler=function(m){"use strict";this.ondragmove=m;return this;};l.prototype.setDropHandler=function(m){"use strict";this.ondrop=m;return this;};l.prototype.zIndex=0;l.prototype.isDraggedOver=l.prototype.hasPointMovedInside;l.prototype.ondragover=k;l.prototype.ondragmove=k;l.prototype.ondrop=k;l.prototype.getDOM=i.prototype.getDOM;l.prototype.setKey=i.prototype.setKey;l.prototype.getKey=i.prototype.getKey;e.exports=l;},null);
__d("LeftNavItemClassicDraggableContainer.react",["Arbiter","DOMDimensions","Draggable","Droppable","React","Style"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();'use strict';var m=k,n=m.PropTypes,o=k.createClass({displayName:"LeftNavItemClassicDraggableContainer",propTypes:{itemID:n.oneOfType([n.string,n.number]).isRequired,section:n.object.isRequired,sortable:n.bool.isRequired},render:function(){return (k.createElement("div",{"data-itemid":this.props.itemID},this.props.children));},componentWillReceiveProps:function(p){if(!this.props.sortable&&p.sortable)this._mountDraggable(p.draggableBound);if(this.props.sortable&&!p.sortable)this._unmountDraggable();},_mountDraggable:function(p){var q='bookmarkItem',r=this.props.section,s=this.props.itemID,t=k.findDOMNode(this);this._draggable=(new i(t)).setNamespace(q).setUseAbsolute(true).setGutter(15).setBoundingBox(p).setGrabHandler(function(){var u=h.getElementDimensions(this.dom);l.set(this.dom,'width',u.width+'px');g.inform('LeftNavDragController/onItemEditDraggableGrab',{section:r,draggable:this});}).setDropHandler(function(){l.set(this.dom,'width','');this.resetPosition();g.inform('LeftNavDragController/onItemEditDraggableDrop',{section:r,draggable:this});});this._droppable=(new j(t)).setNamespace(q).setDragOverHandler(function(u){g.inform('LeftNavDragController/onItemEditDroppableDragOver',{section:r,draggable:u,targetItemID:s});});},_unmountDraggable:function(){if(this._draggable)this._draggable.destroy();if(this._droppable)this._droppable.destroy();}});e.exports=o;},null);
__d("LeftNavItem.react",["Arbiter","Bootloader","DOMContainer.react","Image.react","LeftNavItemClassicDraggableContainer.react","React","Run","XUISpinner.react","XUIButton.react","URI","cx","joinClasses","fbt"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){b.__markCompiled&&b.__markCompiled();'use strict';var t='\u00A0',u='\u00B7',v=l.createClass({displayName:"LeftNavItem",render:function(){var w=this.props,x=w.model,y=w.section,z=x.keys.some(function(da){return da===w.selectedKey;}),aa=x.keys.some(function(da){return da===w.loadingKey;}),ba=y.props.id==='pinnedNav',ca=(("sideNavItem")+(' '+"stat_elem")+(z?' '+"selectedItem":'')+(aa?' '+"_5afd":''));return (l.createElement("li",{key:x.id,className:ca,"data-sortable":x.sortable,id:"navItem_"+x.id},l.createElement(k,{itemID:x.id,section:y,sortable:ba&&w.inEditMode&&x.sortable,draggableBound:this.props.draggableBound},this._renderBookmarkContent())));},_renderBookmarkContent:function(){var w=this.props.model,x=this.props.section,y=x.props.id==='pinnedNav',z=x.props.id==='bookmarksSeeAllEntSection',aa=w.count>0,ba=w.auxcontent?l.createElement(i,{key:"auxpopover"},w.auxcontent):null,ca=this._renderCounter(w.count,z),da=r('linkWrap',aa?'hasCount':'noCount'),ea=(("_5afe")+(y&&w.sortable?' '+"sortableItem":'')),fa=x.props.id==='foldNav'||x.props.id==='aboveFoldNav';if(!fa&&!this.BookmarkPopoverMenu)m.onLoad(function(){h.loadModules(["BookmarkPopoverMenu.react"],function(na){this.BookmarkPopoverMenu=na;setTimeout(this.forceUpdate.bind(this),0);}.bind(this));}.bind(this));var ga=null,ha=this.BookmarkPopoverMenu;if(ha)ga=l.createElement(ha,{key:"popover",navSection:this.props.section,navItem:this,editmenu:w.editmenu});var ia=null;if(z&&w.subtitle)ia=l.createElement("div",{className:"_1xmt"},t+t+u+t+t,l.createElement(i,null,w.subtitle));var ja=null;if(z&&w.type==='type_page'){var ka=p(w.link.href),la=p("?ref=hl");la.setDomain(ka.getDomain());la.setProtocol(ka.getProtocol());la.setPath(ka.getPath());ja=l.createElement("form",{action:"/menu/identity_switch",method:"post",rel:"async"},l.createElement("input",{type:"hidden",name:"user_id",value:w.id}),l.createElement("input",{type:"hidden",name:"url",value:la.toString()}),l.createElement(o,{className:"_85u",use:"confirm",label:s._("Log in")}));}var ma=[ba,ga,l.createElement("div",{key:"link",className:"clearfix"},l.createElement("a",{"data-testid":'left_nav_item_'+w.link.title,className:ea,"data-gt":w.datagt,title:w.link.title,rel:w.link.rel,href:w.link.href,ajaxify:w.link.ajaxify,draggable:"false",onClick:function(){return g.inform('LeftNavController/setItemCount',{item:w,count:0});}},l.createElement("div",{className:"rfloat"},l.createElement(n,{className:"uiSideNavSpinner",showOnAsync:true}),z?null:ca,y&&w.sortable?l.createElement("span",{className:"_upa"}):null),l.createElement("span",{className:"imgWrap"},l.createElement(j,{src:w.image,height:"16",width:"16",draggable:"false",alt:""})),l.createElement("div",{className:da},w.name,z?ca:null)),ia,ja)];return ma;},_renderCounter:function(w,x){var y=w>0,z=(("count")+(' '+"_5aff")+(!y?' '+"hidden_elem":'')+(x?' '+"mlm":''));return (l.createElement("span",{className:z},l.createElement("span",{className:"countValue fss"},w<=20?w:'20+')));}});e.exports=v;},null);
__d("LeftNavItemPlaceholder.react",["React","cx"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();"use strict";var i=g.createClass({displayName:"LeftNavItemPlaceholder",render:function(){return (g.createElement("li",{className:"sideNavItem stat_elem"},g.createElement("a",{className:"_5afe clearfix sortableItem"})));}});e.exports=i;},null);
__d("LeftNavSection.react",["Arbiter","Bootloader","React","Link.react","LeftRight.react","InlineBlock.react","LeftNavItem.react","LeftNavItemPlaceholder.react","ReactLayeredComponentMixin","cx","fbt","Run"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){b.__markCompiled&&b.__markCompiled();"use strict";var s=null,t=i.createClass({displayName:"LeftNavSection",mixins:[o],getInitialState:function(){return {dragged:false,inEditMode:false,glowingType:null,draggableBound:null,placeholderIdx:-1};},renderLayers:function(){var u=this.props.id==='bookmarksSeeAllEntSection';if(u)return {dragNUX:null};if(!s)r.onLoad(function(){h.loadModules(["LeftNavDragNUX.react"],function(x){if(!s)s=x;setTimeout(this.forceUpdate.bind(this),0);}.bind(this));}.bind(this));var v=this.state.glowingType,w=null;if(v==='add'||v==='sort')if(s)w=i.createElement(s,{contextRef:"sectionBody",nuxType:v,position:"above",alignment:"center"});return {dragNUX:w};},render:function(){var u=this,v=this.props.model,w=v.items,x=this.props.selectedKey,y=this.props.loadingKey,z=this.state.inEditMode,aa=this.state.draggableBound;if(w.length===0)return null;var ba=1,ca=w.map(function(ia){return (i.createElement(m,{key:ia.id,model:ia,section:u,selectedKey:x,loadingKey:y,inEditMode:z,draggableBound:aa,rank:ba++}));});if(this.state.placeholderIdx>=0)ca.splice(this.state.placeholderIdx,0,i.createElement(n,{key:"itemplaceholder",ref:"placeholder"}));var da=this.state.glowingType,ea=(("homeSideNav")+(da==='add'?' '+"_1492":'')+(da==='sort'?' '+"_1493":'')+(da==='remove'?' '+"_1494":'')),fa=(("_bui")+(this._isPinnedSection()?' '+"droppableNav":'')+(!this._isPinnedSection()?' '+"nonDroppableNav":'')+(' '+"_3-8w")+(!z?' '+"_3-96":'')),ga=this._isPinnedSection()?i.createElement("div",{className:"_3hge stat_elem"},i.createElement(j,{className:"navEditDone",onClick:function(){g.inform('LeftNavDragController/toggleEditMode',{section:u});}},i.createElement("span",{className:"_3hgf"},q._("Done")))):null,ha={nav_items_count:w.length.toString(),nav_section:this.props.id.toString(),bm_sec:this.props.id.toString()};return (i.createElement("div",{id:this.props.id,className:ea,"data-ft":v.dataft,ref:"sectionBody"},this._renderHeader(),i.createElement("ul",{className:fa,"data-gt":JSON.stringify(ha),"data-ft":v.dataft},ca),ga));},_renderHeader:function(){var u=this.props.model,v;if(u.title){var w=u.seeallhref?i.createElement(j,{href:u.seeallhref},i.createElement(k,null,i.createElement("span",{className:"sectionDragHandle"},u.title),u.remainingcount&&!this.state.dragged?i.createElement(l,{className:"_3-91"},i.createElement("div",{className:"_1cwg _5ol3"},u.seealltext)):null)):i.createElement("span",{className:"sectionDragHandle"},u.title);v=i.createElement("h4",{className:"navHeader"},w);}else v=null;return v;},componentDidUpdate:function(){this._updatePinnedSectionBound();},_updatePinnedSectionBound:function(){if(this._isPinnedSection())g.inform('LeftNavDragController/updatePinnedSectionBound');},_isPinnedSection:function(){return this.props.id==='pinnedNav';}});e.exports=t;},null);
__d("LeftNavSectionPlaceholder.react",["React","cx"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();"use strict";var i=g.createClass({displayName:"LeftNavSectionPlaceholder",render:function(){var j={height:this.props.height+'px',width:this.props.width+'px'};return (g.createElement("div",{className:"homeSideNav",style:j},g.createElement("ul",{className:"_bui"})));}});e.exports=i;},null);
__d("LeftNavContainer.react",["invariant","LeftNavSection.react","LeftNavSectionPlaceholder.react","React"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();"use strict";var k=j.createClass({displayName:"LeftNavContainer",getInitialState:function(){return {placeholderIdx:-1,placeholderWidth:0,placeholderHeight:0};},render:function(){var l=this.props.model,m=j.createElement(h,{selectedKey:l.selectedKey,loadingKey:l.loadingKey,model:l.pinnedSection,key:"pinnedNav",id:"pinnedNav",ref:"pinnedNav"}),n=l.sections,o=n.map(function(p){return j.createElement(h,{selectedKey:l.selectedKey,loadingKey:l.loadingKey,model:p,key:p.id,id:p.id});});if(this.state.placeholderIdx>-1)o.splice(this.state.placeholderIdx,0,j.createElement(i,{key:"placeholder",width:this.state.placeholderWidth,height:this.state.placeholderHeight}));return (j.createElement("div",null,m,o));},getPinnedSection:function(){var l=this.refs.pinnedNav;g(l);return l;}});e.exports=k;},null);
__d("LeftNavShortListContainer.react",["cx","fbt","LeftNavBigIconSection.react","LeftNavSection.react","Link.react","React"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();"use strict";var m=l.createClass({displayName:"LeftNavShortListContainer",getInitialState:function(){return {hidden:true};},_clickViewMore:function(){this.setState({hidden:false});},_clickViewLess:function(){this.setState({hidden:true});},_renderBigDesign:function(n,o,p){var q=this.props.model,r=l.createElement(i,{expandModel:n,loadingKey:q.loadingKey,model:q.pinnedSection,selectedKey:q.selectedKey,key:"aboveFoldNav",id:"aboveFoldNav",ref:"aboveFoldNav"}),s=l.createElement(i,{expandModel:false,selectedKey:q.selectedKey,loadingKey:q.loadingKey,model:q.foldSection,key:"foldNav",id:"foldNav",ref:"foldNav"});return (l.createElement("div",null,r,o,l.createElement("div",{className:((this.state.hidden?"hidden_elem":''))},s,p)));},_renderOldDesign:function(n,o,p){var q=this.props.model,r=l.createElement(j,{selectedKey:q.selectedKey,loadingKey:q.loadingKey,model:q.pinnedSection,key:"aboveFoldNav",id:"aboveFoldNav",ref:"aboveFoldNav"});n=l.createElement(j,{selectedKey:q.selectedKey,loadingKey:q.loadingKey,model:n,key:n.id,id:n.id,hasArrow:true});var s=l.createElement(j,{selectedKey:q.selectedKey,loadingKey:q.loadingKey,model:q.foldSection,key:"foldNav",id:"foldNav",ref:"foldNav"});return (l.createElement("div",null,r,n,o,l.createElement("div",{className:((this.state.hidden?"hidden_elem":''))},s,p)));},render:function(){var n=this.props.model,o;n.sections.forEach(function(r){if(r.title==='GROUPS')o=r;});var p=l.createElement("div",{className:"_564o"},l.createElement(k,{className:((!this.state.hidden?"hidden_elem":'')+(' '+"_32uf")),onClick:this._clickViewMore},h._("View More..."))),q=l.createElement(k,{className:"_32uf",onClick:this._clickViewLess},h._("View Less..."));return n.useBigIcon?this._renderBigDesign(o,p,q):this._renderOldDesign(o,p,q);}});e.exports=m;},null);
__d("LeftNavDragController",["Arbiter","CSS","cx","DOMDimensions","DOMQuery","invariant","React","Rect","Style","SubscriptionsHandler","Vector"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b.__markCompiled&&b.__markCompiled();"use strict";var r;function s(t,u){l(!r);r=this;this.$LeftNavDragController0=t;this.$LeftNavDragController1=u;this.$LeftNavDragController2();this.$LeftNavDragController3=null;this.$LeftNavDragController4=false;this.$LeftNavDragController5=new p();this.$LeftNavDragController5.addSubscriptions(g.subscribe('LeftNavDragController/updatePinnedSectionBound',this.$LeftNavDragController2.bind(this)),g.subscribe('LeftNavDragController/toggleEditMode',this.$LeftNavDragController6.bind(this)),g.subscribe('LeftNavDragController/onItemEditDraggableGrab',this.$LeftNavDragController7.bind(this)),g.subscribe('LeftNavDragController/onItemEditDraggableDrop',this.$LeftNavDragController8.bind(this)),g.subscribe('LeftNavDragController/onItemEditDroppableDragOver',this.$LeftNavDragController9.bind(this)),g.subscribe('LeftNavDragController/onItemDraggableGrab',this.$LeftNavDragControllera.bind(this)),g.subscribe('LeftNavDragController/onItemDraggableDrag',this.$LeftNavDragControllerb.bind(this)),g.subscribe('LeftNavDragController/onItemDraggableDrop',this.$LeftNavDragControllerc.bind(this)),g.subscribe('LeftNavDragController/onItemDroppableDragOver',this.$LeftNavDragControllerd.bind(this)));}s.prototype.destroy=function(){this.$LeftNavDragController5.release();r=null;};s.prototype.$LeftNavDragController2=function(){this.$LeftNavDragControllere=this.$LeftNavDragControllerf(false);};s.prototype.$LeftNavDragControllera=function(t,u){var v=u,w=v.section,x=v.draggable,y=v.dragContainer,z=v.isDraggedItemPinned;if(!this.$LeftNavDragControllere){x.killDrag();o.set(x.dom,'width','');x.resetPosition();return;}var aa=this.$LeftNavDragController1.getPinnedSection();this.$LeftNavDragController3=y;h.addClass(this.$LeftNavDragController0,'draggingMode');if(z){var ba=this.$LeftNavDragControllerg(w,x);aa.setState({placeholderIdx:ba,glowingType:'sort'});}else aa.setState({glowingType:'add'});};s.prototype.$LeftNavDragControllerb=function(t,u){var v=u.vector,w=u.dragContainer,x=u.isDraggedItemPinned,y=this.$LeftNavDragController1.getPinnedSection();if(this.$LeftNavDragControllerh(v)){var z=y.state.placeholderIdx>-1;if(!z){var aa=y.props.model.items.findIndex(function(ba){return !ba.sortable;});y.setState({placeholderIdx:aa+1,glowingType:x?'sort':'add'});this.$LeftNavDragController3.setTooltip(null);}}else{y.setState({placeholderIdx:-1,glowingType:x?'remove':'add'});if(x)w.setTooltip('remove');}};s.prototype.$LeftNavDragControllerc=function(t,u){var v=u.draggable,w=u.isDraggedItemPinned,x=this.$LeftNavDragController1.getPinnedSection(),y=v.dom.getAttribute('data-itemid');if(this.$LeftNavDragControllerh()){var z=this.$LeftNavDragControlleri(x,y);if(z)g.inform('LeftNavController/updatePinnedSection',{idOrder:z});}else if(w)g.inform('LeftNavController/toggleFavorite',y);this.$LeftNavDragController3=null;h.removeClass(this.$LeftNavDragController0,'draggingMode');x.setState({placeholderIdx:-1,glowingType:null});};s.prototype.$LeftNavDragControllerd=function(t,u){var v=u.section,w=u.draggable,x=u.targetItemID,y=h.hasClass(w.dom,'pinnedItem'),z=v.state.placeholderIdx>=0,aa=v.props.model.items,ba=aa.findIndex(function(da){return da.id===x;}),ca;if(z){ca=v.state.placeholderIdx<=ba?ba+1:ba;}else ca=ba;v.setState({placeholderIdx:ca,glowingType:y?'sort':'add'});if(y)this.$LeftNavDragController3.setTooltip(null);};s.prototype.$LeftNavDragController6=function(t,u){var v=u.section;if(!v.state.inEditMode){var w=this.$LeftNavDragControllerf(true);if(w){w.l=w.r=0;v.setState({draggableBound:w});}}h.toggleClass(this.$LeftNavDragController0,"_2ryg");v.setState({inEditMode:!v.state.inEditMode});};s.prototype.$LeftNavDragController7=function(t,u){var v=u.section,w=u.draggable,x=this.$LeftNavDragControllerg(v,w);v.setState({placeholderIdx:x});};s.prototype.$LeftNavDragController8=function(t,u){var v=u.section,w=u.draggable,x=this.$LeftNavDragControllerg(v,w),y=v.state.placeholderIdx;if(y!==x&&y!==x+1){var z=v.props.model,aa=z.items[x];g.inform('LeftNavController/updatePinnedSection',{idOrder:this.$LeftNavDragControlleri(v,aa.id)});}v.setState({placeholderIdx:-1});};s.prototype.$LeftNavDragController9=function(t,u){var v=u.section,w=u.draggable,x=u.targetItemID,y=v.props.model,z=this.$LeftNavDragControllerg(v,w);if(z>=0){var aa=y.items.findIndex(function(ca){return ca.id===x;}),ba=v.state.placeholderIdx<=aa?aa+1:aa;v.setState({placeholderIdx:ba});}};s.prototype.$LeftNavDragControllerh=function(t){if(t){var u=this.$LeftNavDragControllere;this.$LeftNavDragController4=u&&t.x>=u.l&&t.x<=u.r&&t.y>=u.t&&t.y<=u.b;}return this.$LeftNavDragController4;};s.prototype.$LeftNavDragControlleri=function(t,u){if(!t)return (void 0);var v=t.props.model.items,w=t.state.placeholderIdx,x=[];v.forEach(function(y,z){if(z===w)x.push(u);if(y.sortable&&y.id!==u)x.push(y.id);});if(w===v.length)x.push(u);return x;};s.prototype.$LeftNavDragControllerg=function(t,u){var v=t.props.model,w=u.dom.getAttribute('data-itemid');return (v.items.findIndex(function(x){return x.id.toString()===w;}));};s.prototype.$LeftNavDragControllerf=function(t){var u=this.$LeftNavDragController1.getPinnedSection(),v=m.findDOMNode(u),w=k.scry(v,'li.sideNavItem');if(t)w=w.filter(function(ga){return ga.getAttribute('data-sortable')==='true';});if(w.length>0){var x=w[0],y=j.getElementDimensions(x).width,z=w[w.length-1],aa=j.getElementDimensions(z).height,ba=q.getElementPosition(x).y,ca=q.getElementPosition(z).y+aa;if(u.state.placeholderIdx>=0){var da=m.findDOMNode(u.refs.placeholder),ea=q.getElementPosition(da),fa=j.getElementDimensions(da);ba=Math.min(ba,ea.y);ca=Math.max(ca,ea.y+fa.height);}return new n(ba,q.getElementPosition(x).x+y,ca,q.getElementPosition(x).x);}else return null;};e.exports=s;},null);
__d("LeftNavController",["React","LeftNavContainer.react","LeftNavShortListContainer.react","LeftNavDragController","AsyncRequest","Arbiter","Event","SubscriptionsHandler","Run","$","copyProperties","CSS","cx","debounce","DOMDimensions","Locale","URI","Vector","NavigationMessage","ChannelConstants"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z){b.__markCompiled&&b.__markCompiled();"use strict";var aa,ba,ca,da,ea,fa=null,ga,ha=false,ia={init:function(mb,nb){aa=mb;ba=nb;ga=false;ea=new n();ea.addSubscriptions(m.listen(window,'resize',t(ka,200)),l.subscribe('LeftNavController/toggleFavorite',ya),l.subscribe('LeftNavController/updatePinnedSection',za),l.subscribe('LeftNavController/setItemCount',function(pb,qb){var rb=qb.item,sb=qb.count;return na(rb,sb);}),l.subscribe(z.getArbiterType('nav_update_counts'),oa),l.subscribeOnce('AsyncLayout/initialized',function(){return ga=true;}),l.subscribe(y.NAVIGATION_ITEM_REMOVED,pa),l.subscribe(y.NAVIGATION_COMPLETED,va),l.subscribe(y.NAVIGATION_FAILED,wa),l.subscribe(y.NAVIGATION_COUNT_UPDATE,xa),l.subscribe(y.NAVIGATION_SELECT,ua),l.subscribe('LeftNavController/updateSectionOrder',ab));var ob=hb(ba.selectedKey);if(ob)ob.count=0;if(ha){ca=g.render(g.createElement(i,{model:ba}),aa);}else{ca=g.render(g.createElement(h,{model:ba}),aa);ka();da=new j(aa,ca);}o.onLeave(this.uninstall.bind(this));},initWithShortList:function(mb,nb){ha=true;this.init(mb,nb);},uninstall:function(){ga=false;ea.release();if(da)da.destroy();},initPageTransitions:function(mb){mb.registerHandler(function(nb){return ga&&qa(nb);},6);},mountSeeAllPayload:function(mb){fa=mb;}};function ja(){ca.forceUpdate();}function ka(){if(!aa)return;var mb=x.getElementPosition(aa).x;r.conditionClass(aa,"_3evf",mb<20||(v.isRTL()&&mb+u.getElementDimensions(aa).width<u.getElementDimensions(p('globalContainer')).width));}function la(mb){ba.loadingKey=null;ba.selectedKey=mb||ba.defaultKey;ja();}function ma(mb){ba.loadingKey=mb;ja();}function na(mb,nb){mb.count=nb;ja();}function oa(mb,nb){var ob=nb.obj,pb=ob.items;pb.forEach(function(qb){var rb=hb(qb.key);if(rb)rb.count=rb.count+qb.count;});ja();}function pa(mb,nb){var ob;function pb(rb,sb){return rb.keys.some(function(tb){return tb===sb;});}for(var qb=0;qb<ba.sections.length;qb++){ob=kb(ba.sections[qb].items,function(rb){return pb(rb,nb);});if(ob)break;}kb(ba.pinnedSection.items,function(rb){return pb(rb,nb);});ja();}function qa(mb){var nb=ib(mb);return nb&&nb.endpoint&&ra(nb,mb);}function ra(mb,nb){ma(mb.keys[0]);na(mb,0);ta(mb.endpoint,q(sa(mb,nb),nb.getQueryData()));return true;}function sa(mb,nb){var ob={};ob.sidecol=true;ob.path=nb.getPath();var pb=jb(mb.keys);pb=pb.text?pb.text:pb.numeric;ob.sk=pb;ob.key=pb;return ob;}function ta(mb,nb){nb.endpoint=mb;l.inform(y.NAVIGATION_BEGIN,{useAjaxPipe:true,params:nb});}function ua(mb,nb){var ob=nb.sk;if(nb.asLoading){ma(ob);}else la(ob);}function va(mb,nb){var ob=ba.loadingKey;la(ob);}function wa(mb,nb){ma(null);}function xa(mb,nb){var ob=hb(nb&&nb.key);if(ob)na(ob,nb.hide?0:ob.count+nb.count);}function ya(mb,nb){var ob=eb(nb),pb=ba.pinnedSection;if(!ob){if(!fa)return;ob=fa.find(function(tb){return tb.id===nb;});if(!ob)return;ob=q({},ob);ob.pinned=true;pb.items.push(ob);new k().setURI('/ajax/bookmark/add/').setData({id:ob.keys[0]}).send();}else{var qb=db(ob);if(fb(nb)){ob.pinned=false;var rb=pb.items.findIndex(function(tb){return tb.id===ob.id;});if(rb>=0){pb.items.splice(rb,1);if(qb)qb.items.unshift(ob);new k().setURI('/ajax/bookmark/delete/').setData({id:ob.keys[0]}).send();}}else{ob.pinned=true;var sb=qb.items.findIndex(function(tb){return tb.id===ob.id;});if(qb&&sb>=0){qb.items.splice(sb,1);pb.items.push(ob);new k().setURI('/ajax/bookmark/add/').setData({id:ob.keys[0]}).send();}}}ja();}function za(mb,nb){var ob=nb.idOrder,pb=ba.pinnedSection,qb=pb.items.filter(function(sb){return !sb.sortable;});ob.forEach(function(sb){var tb=pb.items.find(function(vb){return vb.id===sb;});if(tb){qb.push(tb);}else if(tb=eb(sb)){var ub=db(tb);kb(ub.items,function(vb){return vb.id===tb.id;});qb.push(tb);tb.pinned=true;}});pb.items=qb;var rb=qb.map(function(sb){return sb.keys[0];});new k().setURI('/ajax/bookmark/edit/').setData({ids:rb}).send();ja();}function ab(mb,nb){var ob=nb.idOrder,pb=ba.sections;ba.sections=ob.reduce(function(qb,rb){var sb=pb.find(function(tb){return tb.id===rb;});if(sb)qb.push(sb);return qb;},[]);new k().setURI('/bookmark/section/edit/').setData({nav_section_names:ob}).send();ja();}function bb(mb){var nb=w.getRequestURI();return ((mb.getDomain()===nb.getDomain())&&(mb.getPath()==='/'||mb.getPath()==='/home.php'));}function cb(mb){if(mb==='pinnedNav'){return ba.pinnedSection;}else return (ba.sections.filter(function(nb){return nb.id===mb;})[0]);}function db(mb){return cb(lb[mb.type]);}function eb(mb){mb=mb.toString();return gb(function(nb){return nb.id.toString()===mb;});}function fb(mb){mb=mb.toString();var nb=cb('pinnedNav');return nb.items.some(function(ob){return ob.id.toString()===mb;});}function gb(mb){for(var nb=0;nb<ba.sections.length;nb++){var ob=ba.sections[nb].items.find(mb);if(ob)return ob;}return ba.pinnedSection.items.find(mb);}function hb(mb){return gb(function(nb){return nb.keys.some(function(ob){return ob===mb;});});}function ib(mb){var nb=mb.getQueryData().sk;if(nb){return hb(nb);}else if(bb(mb)){return hb(ba.defaultKey);}else return gb(function(ob){return ob.path&&ob.path.some(function(pb){return pb===mb.getPath();});});}function jb(mb){var nb=/^(app|group|fl)_/,ob={};for(var pb=0;pb<mb.length;pb++){var qb=nb.test(mb[pb]);if(qb&&!ob.numeric){ob.numeric=mb[pb];}else if(!qb&&!ob.text)ob.text=mb[pb];if(ob.numeric&&ob.text)break;}return ob;}function kb(mb,nb){for(var ob=0;ob<mb.length;ob++)if(nb(mb[ob])){var pb=mb[ob];mb.splice(ob,1);return pb;}return (void 0);}var lb={favorites:'pinnedNav',profiles:'pinnedNav',company:'companyNav',apps:'appsNav',groups:'groupsNav',pages:'pagesNav',lists:'listsNav',interests:'interestsNav',connect_apps:'connectNav',type_user:'pinnedNav',type_group:'groupsNav',type_company:'companyNav',type_page:'pagesNav',type_friend_list:'listsNav',type_interest_list:'interestsNav',type_non_canvas_app:'appsNav',type_facebook_app:'appsNav',type_canvas_app_game:'appsNav',type_canvas_app_non_game:'appsNav',type_curated_feed:'interestsNav',type_game_tool:'appsNav',type_page_tool:'pagesNav',type_pinnable_page_tool:'pagesNav',type_developer:'developerNav',type_developer_tool:'developerNav'};e.exports=ia;},null);
__d("XEventImpressionLoggerAsyncController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/events\/{eventid}\/ajax\/impression\/",{eventid:{type:"Int",required:true},acontext:{type:"StringToStringMap",required:true}});},null);
__d("EventImpressionLogger",["Arbiter","AsyncRequest","OnVisible","XEventImpressionLoggerAsyncController","copyProperties"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();function l(m,n){"use strict";this.elem=m;this.options=n;this.initListeners();this.listener=new i(this.elem,this.$EventImpressionLogger0.bind(this),true,0);}l.prototype.initListeners=function(){"use strict";var m=this.options;this.$EventImpressionLogger1=!m.start_signal;if(m.start_signal)g.subscribe(m.start_signal,function(n,o){this.$EventImpressionLogger2=o;this.$EventImpressionLogger1=true;if(this.$EventImpressionLogger2){this.$EventImpressionLogger0();}else if(!this.logged){this.listener.reset();this.listener.checkBuffer();}}.bind(this));if(m.stop_signal)g.subscribe(m.stop_signal,function(){this.$EventImpressionLogger2=null;this.$EventImpressionLogger1=false;}.bind(this));if(m.check_signal)g.subscribe(m.check_signal,function(n,o){this.$EventImpressionLogger2=o;if(this.$EventImpressionLogger2){this.$EventImpressionLogger0();}else if(!this.logged){this.listener.reset();this.listener.checkBuffer();}}.bind(this));};l.prototype.$EventImpressionLogger0=function(){"use strict";var m=this.options;if(!this.$EventImpressionLogger1)return;if(this.logged)return;if(!document.documentElement.contains(this.elem))return;if(this.$EventImpressionLogger2&&this.$EventImpressionLogger2.rect){var n=this.elem.getBoundingClientRect(),o=this.$EventImpressionLogger2.rect,p=0;if(this.$EventImpressionLogger2.scrollTop)p=this.$EventImpressionLogger2.scrollTop;if(o.left&&o.left>n.left)return;if(o.right&&o.right<n.right)return;if(o.top&&o.top>n.top-p)return;if(o.bottom&&o.bottom<n.bottom-p)return;}this.logged=true;var q=j.getURIBuilder().setInt('eventid',m.event_id).setStringToStringMap('acontext',m.action_context).getURI();new h(q).send();};k(l,{init:function(m,n){return new l(m,n);}});e.exports=l;},null);