/*1360955003,173217823*/

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

__d("DoublyLinkedListMap",["copyProperties"],function(a,b,c,d,e,f){var g=b('copyProperties');function h(){this._head=null;this._tail=null;this._nodes={};this._nodeCount=0;}g(h.prototype,{get:function(i){return this._nodes[i]?this._nodes[i].data:null;},_insert:function(i,j,k,l){k&&!this._nodes[k]&&(k=null);var m=(k&&this._nodes[k])||(l?this._head:this._tail),n={data:j,key:i,next:null,prev:null};if(m){this.remove(i);if(l){n.prev=m.prev;m.prev&&(m.prev.next=n);m.prev=n;n.next=m;}else{n.next=m.next;m.next&&(m.next.prev=n);m.next=n;n.prev=m;}}n.prev===null&&(this._head=n);n.next===null&&(this._tail=n);this._nodes[i]=n;this._nodeCount++;return this;},insertBefore:function(i,j,k){return this._insert(i,j,k,true);},insertAfter:function(i,j,k){return this._insert(i,j,k,false);},prepend:function(i,j){return this.insertBefore(i,j,this._head&&this._head.key);},append:function(i,j){return this.insertAfter(i,j,this._tail&&this._tail.key);},remove:function(i){var j=this._nodes[i];if(j){var k=j.next,l=j.prev;k&&(k.prev=l);l&&(l.next=k);this._head===j&&(this._head=k);this._tail===j&&(this._tail=l);delete this._nodes[i];this._nodeCount--;}return this;},find:function(i){for(var j=this._head;j;j=j.next)if(i(j.data))return j.key;return null;},reduce:function(i,j){for(var k=this._head;k;k=k.next)j=i(k.data,j);return j;},exists:function(i){return !!this._nodes[i];},isEmpty:function(){return !this._head;},reset:function(){this._head=null;this._tail=null;this._nodes={};this._nodeCount=0;},map:function(i){for(var j=this._head;j;j=j.next)i(j.data);},getCount:function(){return this._nodeCount;},getHead:function(){return this._head&&this._head.data;},getTail:function(){return this._tail&&this._tail.data;},getNext:function(i){var j=this._nodes[i];if(j&&j.next)return j.next.data;return null;},getPrev:function(i){var j=this._nodes[i];if(j&&j.prev)return j.prev.data;return null;}});e.exports=h;});
__d("TidyArbiterMixin",["Arbiter","ArbiterMixin","Run","copyProperties"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('ArbiterMixin'),i=b('Run'),j=b('copyProperties'),k={};j(k,h,{_getArbiterInstance:function(){if(!this._arbiter){this._arbiter=new g();i.onLeave(function(){delete this._arbiter;}.bind(this));}return this._arbiter;}});e.exports=k;});
__d("TidyArbiter",["TidyArbiterMixin","copyProperties"],function(a,b,c,d,e,f){var g=b('TidyArbiterMixin'),h=b('copyProperties'),i={};h(i,g);e.exports=i;});
__d("TriggerablePageletLoader",["Event","function-extensions","CSS","OnVisible","Run","UIPagelet","copyProperties"],function(a,b,c,d,e,f){var g=b('Event');b('function-extensions');var h=b('CSS'),i=b('OnVisible'),j=b('Run'),k=b('UIPagelet'),l=b('copyProperties'),m=[];function n(p){if(!m[p])return;m[p].__trigger&&m[p].__trigger.remove();delete m[p];}function o(p,q){this._disabledTriggerKeys=[];this._pageletConfig=p;this._loaded=false;this._loading=false;this._triggerKeys=[];if(q)q.forEach(this.addTrigger.bind(this));j.onLeave(this.removeTriggers.bind(this));}l(o,{removeTrigger:function(p){for(var q in m)if(m[q]&&m[q].node===p)n(q);},TRIGGER_CLICK:'click',TRIGGER_ONVISIBLE:'onvisible'});l(o.prototype,{addTrigger:function(p){p.__trigger=this._createTrigger(p);m.push(p);this._triggerKeys.push(m.length-1);},disableTriggers:function(){this._triggerKeys.forEach(function(p){if(m[p]){m[p].__trigger.remove();this._disabledTriggerKeys.push(p);}}.bind(this));},enableTriggers:function(){if(this._loaded||this._loading)return;this._disabledTriggerKeys.forEach(function(p){if(m[p])m[p].__trigger=this._createTrigger(m[p]);}.bind(this));this._disabledTriggerKeys.length=0;},_createTrigger:function(p){if(this._loaded||this._loading)return;var q=this.onTrigger.bind(this,p);switch(p.type){case o.TRIGGER_CLICK:return g.listen(p.node,'click',function(r){r.prevent();q();});case o.TRIGGER_ONVISIBLE:return new i(p.node,q,p.onVisibleStrict,p.onVisibleBuffer);default:}},getPageletRequest:function(){return this._pageletRequest;},load:function(p){if(this._loaded||this._loading)return;this._loading=true;h.addClass(this._pageletConfig.node,'async_saving');if(p&&p.node)h.addClass(p.node,'async_saving');var q=this._pageletConfig.options||{};q.displayCallback=this.onLoad.bind(this).curry(p);this._pageletRequest=k.loadFromEndpoint(this._pageletConfig.controller,this._pageletConfig.node.id,this._pageletConfig.data,q);},onLoad:function(p,q){this._loaded=true;this._pageletRequest=null;h.removeClass(this._pageletConfig.node,'async_saving');if(p&&p.node)h.removeClass(p.node,'async_saving');if(this._pageletConfig.displayCallback){this._pageletConfig.displayCallback(q);}else q();},onTrigger:function(p){p.callback&&p.callback(p);if(!this._loaded&&!this._loading)this.load(p);},removeTriggers:function(p){this._triggerKeys.forEach(function(q){if(m[q]&&(!p||m[q].type===p))n(q);});}});e.exports=o;});
__d("TimelineSection",["Arbiter","DOMScroll","DoublyLinkedListMap","Run","TidyArbiterMixin","copyProperties","ge"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('DOMScroll'),i=b('DoublyLinkedListMap'),j=b('Run'),k=b('TidyArbiterMixin'),l=b('copyProperties'),m=b('ge'),n=null;function o(){n=null;}function p(q,r,s){this.id=q;this.label=s;this.nodeID=r;this._parentSection=null;this.childSections=new i();this._isLoaded=false;p.inform.bind(p,'sectionInitialized/'+q,{section:this},g.BEHAVIOR_STATE).defer();}l(p,k,{callWithSection:function(q,r){this.subscribe('sectionInitialized/'+q,function(s,t){r(t.section);});},setActiveSectionID:function(q){!n&&j.onLeave(o);n=q;}});l(p.prototype,{appendSection:function(q){this.childSections.append(q.id,q);q._parentSection=this;},freeze:function(){this.freezeChildren();},freezeChildren:function(){var q=this.childSections.getHead();while(q){!q.isActive()&&q.freeze();q=q.getNext();}},getNext:function(){return this._parentSection&&this._parentSection.childSections.getNext(this.id);},getPrev:function(){return this._parentSection&&this._parentSection.childSections.getPrev(this.id);},isActive:function(){var q=this;while(q){if(q.id===n)return true;q=q._parentSection;}return false;},isLoaded:function(){return this._isLoaded;},setIsLoaded:function(q){this._isLoaded=q;return this;},scrollTo:function(){if(!m(this.nodeID))return;h.scrollTo(this.getNode(),true,false,false,h.scrollTo.bind(this).curry(this.getNode(),0));},thaw:function(){this.thawChildren();},thawChildren:function(){var q=this.childSections.getHead();while(q){q.thaw();q=q.getNext();}}});e.exports=p;});
__d("OGCollectionAddObject",["Arbiter","AsyncRequest","CSS","DOM","DOMQuery","Form","JSLogger","Parent","TidyArbiterMixin","TimelineSection","copyProperties","csx","cx"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('AsyncRequest'),i=b('CSS'),j=b('DOM'),k=b('DOMQuery'),l=b('Form'),m=b('JSLogger'),n=b('Parent'),o=b('TidyArbiterMixin'),p=b('TimelineSection'),q=b('copyProperties'),r=b('csx'),s=b('cx'),t=m.create('og_collection_add_object'),u=q({ADD_PLACEHOLDER:'OGCollectionAddObject/addPlaceholder',NEW_ITEM:'OGCollectionAddObject/newItem',PLACEHOLDER:'OGCollectionAddObject/placeholder',REMOVE_PLACEHOLDER:'OGCollectionAddObject/removePlaceholder',init:function(v,w,x,y,z){p.callWithSection(z,function(aa){this.initImpl(v,w,x,y,aa.getNode(),z,aa.id);}.bind(this));},initInReport:function(v,w,x,y){this.initImpl(v,w,x,y,y.parentNode,null,null);},initImpl:function(v,w,x,y,z,aa,ba){var ca=k.scry(z,"._620")[0];if(!ca){t.error('grid_not_found',{collection_id:aa,section:ba,csx:'.public/fbTimelineCollectionGrid/root'});return;}w.subscribe('select',function(da,ea){u.inform(u.ADD_PLACEHOLDER,aa);var fa=ca.nextSibling,ga=null;if(fa&&i.hasClass(fa,"_3t3")){i.hide(ca.lastChild);ga=ca.lastChild;}var ha=j.prependContent(ca,x.cloneNode(true))[0];g.inform(u.PLACEHOLDER,ca);var ia=q({action:'add',mechanism:'typeahead'},l.serialize(y));ha.setAttribute('data-item',ia.item_id);new h().setURI(v).setData(ia).setRelativeTo(ca).setErrorHandler(function(ja){j.remove(ha);u.inform(u.REMOVE_PLACEHOLDER,aa);ga&&i.show(ga);}).setHandler(function(ja){ga&&j.remove(ga);}).setFinallyHandler(function(ja){g.inform(u.PLACEHOLDER,ca);}).send();});},replaceItem:function(v,w,x){var y=j.scry(v,'div[data-obj="'+w+'"]')[0];if(y){var z=n.byClass(y,"_30f");if(z)u.inform(u.REMOVE_PLACEHOLDER,z.id);j.remove(y.parentNode);}var aa=j.find(v,'[data-item="'+w+'"]'+"._gx9");j.replace(aa,x);g.inform(u.NEW_ITEM,v);}},o);e.exports=u;});
__d("MedleyPageletRequestData",["Arbiter","TidyArbiter"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('TidyArbiter'),i={},j={get:function(){return i;},set:function(k){i=k;h.inform('Medley/requestDataSet',null,g.BEHAVIOR_STATE);}};e.exports=j;});
__d("TimelineDynamicSection",["Class","DOM","TimelineSection","copyProperties","cx","ge","TimelineDynamicSectionConfig"],function(a,b,c,d,e,f){var g=b('Class'),h=b('DOM'),i=b('TimelineSection'),j=b('copyProperties'),k=b('cx'),l=b('ge'),m=b('TimelineDynamicSectionConfig');function n(o,p,q){this._controller=p;this._data=null;this._node=null;this._triggerLoader=null;this.parent.construct(this,o,o,q);}g.extend(n,i);j(n.prototype,{_createNode:function(){return h.create('div',{className:"_30f",id:this.nodeID},[m.throbber.cloneNode(true)]);},getNode:function(){if(!this._node)this._node=l(this.nodeID)||this._createNode();return this._node;}});e.exports=n;});
__d("TimelineAppCollection",["Event","function-extensions","Class","CSS","DOM","DOMQuery","MedleyPageletRequestData","PageTransitions","Style","TidyArbiter","TimelineDynamicSection","TimelineSection","TriggerablePageletLoader","TimelineDynamicSectionConfig","copyProperties","csx","cx","ge"],function(a,b,c,d,e,f){var g=b('Event');b('function-extensions');var h=b('Class'),i=b('CSS'),j=b('DOM'),k=b('DOMQuery'),l=b('MedleyPageletRequestData'),m=b('PageTransitions'),n=b('Style'),o=b('TidyArbiter'),p=b('TimelineDynamicSection'),q=b('TimelineSection'),r=b('TriggerablePageletLoader'),s=b('TimelineDynamicSectionConfig'),t=b('copyProperties'),u=b('csx'),v=b('cx'),w=b('ge'),x=500;function y(ba){var ca=ba._parentSection,da=ca._parentSection;q.setActiveSectionID(ca.id);ca.setActiveCollection(ba);if(ca._sk===da._sk){if(!i.hasClass(da.getNode(),"_c4f")){i.addClass(da.getNode(),"_c4f");da.freezeChildren();}ba._isFullyLoaded&&da.addSectionTeasers();}if(!da.isMedleyView()&&ca._sk===da._sk){var ea=m.getCurrentURI();ea.addQueryData({collection_token:ba._token});ea.removeQueryData(['next_cursor']);m.rewriteCurrentURI(m.getCurrentURI().getUnqualifiedURI(),ea);}}function z(ba,ca){ca.data.overview=ba._parentSection._sk!==ba._parentSection._parentSection._sk;y(ba);}function aa(ba,ca,da,ea){this._contentLoader=null;this._isFrozen=false;this._isFullyLoaded=false;this._cursor=0;this._tabNode=da;this._tabCount=ea>0?ea:0;this._token=ba;this.auxContent=null;this.curationContent=null;this.refreshCount();this.parent.construct(this,aa.getIDByToken(ba),ca);if(!da)return;if(w(this.nodeID)){g.listen(da,'click',y.curry(this));}else this.createTriggerLoader.bind(this).defer();}h.extend(aa,p);t(aa,{addPlaceholderToCollection:function(ba,ca,da){if(!da)this.incrementCount(aa.getIDByToken(ba));var ea=j.scry(ca,"._gx7")[0].cloneNode(true),fa=j.scry(ca,"._gx8 .img")[0],ga=j.scry(ca,"._3owb")[0],ha=ga&&ga.getAttribute('data-obj'),ia=w(aa.getIDByToken(ba));if(!ia)return;var ja=j.scry(ia,"._620");if(ja.length===0)return;var ka=ja[0];if(!ea||!ha||!ka)return;q.callWithSection(aa.getIDByToken(ba),function(la){var ma=j.scry(ka,'[data-obj="'+ha+'"]')[0];if(ma){var na=ma.parentNode;j.remove(na);}else if(la.isOverview()&&ka.children.length>=8)j.remove(ka.lastChild);var oa=j.create('div',{className:"_4-he"});if(fa)n.set(oa,'background-image','url('+fa.src+')');var pa=j.create('div',{className:"_gx8"},[oa]),qa=j.create('div',{className:"_gx6"},[ea]),ra=j.create('div',{className:"_3owb"},[pa,qa]);j.prependContent(ka,j.create('li',{className:"_5rz",id:'collectionItemPlaceholder'+ha},[ra]));});},addItemToCollection:function(ba,ca,da){var ea=w(da);if(!ea)return;var fa=j.scry(ea,"._620")[0],ga=fa.parentNode.nextSibling;if(ga&&i.hasClass(ga,"_3t3"))j.remove(fa.lastChild);var ha=w('collectionItemPlaceholder'+ca);if(ha){j.replace(ha,ba);return;}j.prependContent(fa,ba);},createFromArray:function(ba){return ba.map(function(ca){return new aa(ca.token,ca.controller,ca.tab_node,ca.tab_count);});},decrementCount:function(ba){q.callWithSection(ba,function(ca){if(ca._tabCount>0){ca._tabCount--;ca.refreshCount();ca.flashCountIf();}});},enableContentLoader:function(ba,ca,da){q.callWithSection(ba,function(ea){ea.addContentLoader(ca,da);});},getIDByToken:function(ba){return 'pagelet_timeline_app_collection_'+ba;},incrementCount:function(ba){q.callWithSection(ba,function(ca){ca._tabCount++;ca.refreshCount();ca.flashCountIf();});},registerAuxContent:function(ba,ca){q.callWithSection(ba,function(da){da.registerAuxContent(ca);});},registerAddCurationContent:function(ba,ca,da){q.callWithSection(ba,function(ea){ea.registerAddCurationContent(ca,da);});},setLoaded:function(ba){q.callWithSection(ba,function(ca){ca.setIsLoaded(true);ca._parentSection.unsetMinHeight();});},setFullyLoaded:function(ba){q.callWithSection(ba,function(ca){ca._isFullyLoaded=true;var da=ca._parentSection;da._sk===da._parentSection._sk&&da._parentSection.addSectionTeasers();});}});t(aa.prototype,{addContentLoader:function(ba,ca){this._cursor=ca;o.subscribe('Medley/requestDataSet',function(){var da={node:ba};if(i.hasClass(ba,"_3t3")){da.type=r.TRIGGER_CLICK;}else if(this._isFrozen){j.remove(ba);da.node=s.pager.cloneNode(true);j.appendContent(this.getNode(),da.node);da.type=r.TRIGGER_CLICK;}else{da.onVisibleBuffer=x;da.onVisibleStrict=true;da.type=r.TRIGGER_ONVISIBLE;}if(da.type===r.TRIGGER_CLICK)da.callback=q.setActiveSectionID.curry(this.id);var ea=t({displayCallback:function(fa){j.remove(da.node);fa();},options:{append:true}},this.getDefaultPageletConfig());ea.data.overview=false;this._triggerLoader=null;this._contentLoader=new r(ea,[da]);}.bind(this));},_createNode:function(){var ba=this.parent._createNode();ba.setAttribute('aria-role','tabpanel');return ba;},createTriggerLoader:function(){o.subscribe('Medley/requestDataSet',function(){var ba=this.getDefaultPageletConfig(),ca={callback:z.curry(this,ba),node:this._tabNode,type:r.TRIGGER_CLICK};this._triggerLoader=new r(ba,[ca]);}.bind(this));},disableContentLoader:function(){this._contentLoader&&this._contentLoader.disableTriggers();},enableContentLoader:function(){var ba=this._triggerLoader||this._contentLoader;if(ba){ba.enableTriggers();ba.getPageletRequest()&&ba.getPageletRequest().refresh();}},freeze:function(){this._isFrozen=true;if(!this._contentLoader||this._contentLoader._loading)return;this._contentLoader.removeTriggers(r.TRIGGER_ONVISIBLE);var ba=k.scry(this.getNode(),"._3t3");if(!ba.length){var ca=k.scry(this.getNode(),"._359")[0];ca.length&&this.addContentLoader(ca,this._cursor);}},getCount:function(){return this._tabCount;},getDefaultPageletConfig:function(){return {controller:this._controller,data:t({collection_token:this._token,cursor:this._cursor},l.get(),{sk:this._parentSection._sk}),node:this.getNode()};},getMedleySiteKey:function(){return this._parentSection._parentSection._sk;},flashCountIf:function(){if(this._parentSection.getActiveCollection()!=this){i.addClass(this._tabNode,"_4-k9");setTimeout(i.removeClass.curry(this._tabNode,"_4-k9"),800);}},isOverview:function(){return this._parentSection._sk!=this._parentSection._parentSection._sk;},registerAuxContent:function(ba){this.auxContent=ba;if(ba.nodeType==11)this.auxContent=j.create('span',null,ba);if(this._parentSection._activeCollection!==this)i.hide(this.auxContent);this._parentSection.addAuxContent(this.auxContent);},registerAddCurationContent:function(ba,ca){this.curationContent=(ba.nodeType==11)?j.create('span',null,ba):ba;this.curationContentOpen=ca;this._parentSection.addCurationContent(this.curationContent,this);},refreshCount:function(){if(!this._tabNode)return;var ba=k.find(this._tabNode,"._3d0");if(this._tabCount>0){j.setContent(ba,this._tabCount);}else j.setContent(ba,'');},thaw:function(){this._isFrozen=false;},getToken:function(){return this._token;}});e.exports=aa;});
__d("TimelineNavLight",["CSS","DOMQuery","TimelineSection","csx","cx"],function(a,b,c,d,e,f){var g=b('CSS'),h=b('DOMQuery'),i=b('TimelineSection'),j=b('csx'),k=b('cx');function l(m){var n=h.scry(m,"._6-7")[0],o=h.scry(m,"._6-6");i.subscribe('Medley/transitionToSection',function(p,q){if(n&&q===n.getAttribute('data-medley-id'))return;n&&g.removeClass(n,"_6-7");for(var r=0;r<o.length;++r)if(o[r].getAttribute('data-medley-id')===q){g.addClass(o[r],"_6-7");n=o[r];return;}});}e.exports=l;});
__d("TimelineSpinelessComposer",["Arbiter","Bootloader","CSS","DOM","Parent","Run","Style","TimelineComposer","TimelineComposerUtilities","$","csx","cx","requestAnimationFrame"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('Bootloader'),i=b('CSS'),j=b('DOM'),k=b('Parent'),l=b('Run'),m=b('Style'),n=b('TimelineComposer'),o=b('TimelineComposerUtilities'),p=b('$'),q=b('csx'),r=b('cx'),s=b('requestAnimationFrame'),t=false,u,v;function w(ba){if(ba.isScheduledPost||ba.isOGPost)return;if(!ba.streamStory){window.location.reload();return;}if(ba.backdatedTime){h.loadModules(['TimelineStoryPublisher'],function(da){da.publish(ba);});return;}if(t){v.insertBefore(ba.streamStory,v.firstChild);var ca=v.firstChild;i.addClass(ca,("_4jb"));s(m.set.curry(ca,'background','#fff'));}else n.renderCapsuleBasedStory(u,ba.streamStory);}function x(){return j.find(k.byClass(u,'fbTimelineComposerCapsule'),"div._4s3");}function y(ba){var ca=z();i.show(ca);var da=ba.subscribe('hide',function(){i.hide(ca);ba.unsubscribe(da);});}function z(){var ba=k.byClass(u,'fbTimelineComposerCapsule'),ca=j.scry(ba,'div.composerVeil');if(ca.length!==1)ca=j.appendContent(ba,j.create('div',{className:'composerVeil hidden_elem'}));return ca[0];}var aa={init:function(ba,ca){u=ba;t=ca;if(ca)v=j.find(p('pagelet_timeline_left_recent'),"div._6ly");var da=g.subscribe('composer/publish',function(event,ea){if(ea.composer_id===u.id)w(ea);});l.onLeave(da.unsubscribe.bind(da));if(i.hasClass(u,"_mj")){o.hidePlaceIfAttachmentsTooTall(u);}else o.hidePlaceIfAttachmentsTooTallOld(u);},showMLEFlyout:function(ba){ba.setContext(x()).show();y(ba);}};e.exports=aa;});
__d("TimelineStickyRightColumn",["Event","Arbiter","CSS","DOMQuery","Run","Style","TimelineContentLoader","Vector","csx","queryThenMutateDOM"],function(a,b,c,d,e,f){var g=b('Event'),h=b('Arbiter'),i=b('CSS'),j=b('DOMQuery'),k=b('Run'),l=b('Style'),m=b('TimelineContentLoader'),n=b('Vector'),o=b('csx'),p=b('queryThenMutateDOM'),q=100,r=15,s=15,t=71,u=false,v=null,w=null,x=null,y,z,aa,ba,ca,da,ea,fa;function ga(){y=m.getCurrentSection();if(!y||!y.rightColumnFinished)return;var pa=j.find(y.node,"._3rbf"),qa=j.find(y.node,"._3rbh");z=pa.offsetHeight;aa=qa.offsetHeight;ba=n.getViewportDimensions().y;ea=n.getElementPosition(pa).y;fa=n.getElementPosition(qa.parentNode).x+'px';}function ha(){if(x&&x!==y)ja(j.find(x.node,"._3rbh"),'','','','');if(!y||!y.rightColumnFinished)return;ia(y);var pa=j.find(y.node,"._3rbh");x=pa.style.position==='fixed'?y:null;}function ia(pa){if(aa>=z||z<=ba)return;da=ca;ca=n.getScrollPosition().y;var qa,ra=j.find(pa.node,"._3rbh");if(ca<=ea-ka()){ja(ra,'','','','');return;}if(z+ea<=ca+Math.min(aa+ka(),ba-s-t)){ja(ra,'absolute','',s+'px','');return;}if(aa>ba-s-ka()){if(ca<da){var sa=false;if(ra.style.position==='absolute')if(ra.style.top!==''&&ca+ka()-ea<=parseInt(ra.style.top,10)){sa=true;}else if(ra.style.bottom!==''&&ca<=(ea+z-ka())-aa)sa=true;if(sa){ja(ra,'fixed',ka()+'px','',fa);return;}else if(ra.style.position==='absolute'&&ra.style.top){return;}else if(ra.style.position==='fixed'){if(parseInt(ra.style.top,10)>=ka())return;qa=ca-ea-(aa-(ba-t));if(da)qa+=da-ca;ja(ra,'absolute',qa+'px','','');return;}}else{var ta=false;if(ra.style.position==='absolute'||ra.style.position===''){qa=ra.style.top?parseInt(ra.style.top,10):0;if(ca+ba>=ea+qa+aa+t)ta=true;}if(ta){qa=ba-aa-s-t;ja(ra,'fixed',qa+'px','',fa);return;}else if(ca==da){return;}else if(ra.style.position==='fixed'){if(parseInt(ra.style.top,10)>=ka()){qa=ca-ea+ka();if(da)qa+=da-ca;ja(ra,'absolute',qa+'px','','');return;}}else if(ra.style.position==='absolute')return;}}else ja(ra,'fixed',ka()+'px','',fa);}function ja(pa,qa,ra,sa,ta){l.set(pa,'bottom',sa);l.set(pa,'position',qa);l.set(pa,'top',ra);l.set(pa,'left',ta);}function ka(){return i.hasClass(document.documentElement,'tinyViewport')?r:q;}function la(){p(ga,ha);}function ma(){if(!u)return;if(x){var pa=j.find(x.node,"._3rbh");fa=n.getElementPosition(pa.parentNode).x+'px';l.set(pa,'left',fa);}}function na(){u=false;x=null;while(v.length)v.pop().remove();w.forEach(h.unsubscribe);v=w=null;}var oa={init:function(){if(u)return;u=true;v=[g.listen(window,'scroll',la),g.listen(window,'resize',ma)];w=[h.subscribe('sidebar/hide',ma),h.subscribe('sidebar/show',ma)];k.onLeave(na);},adjust:function(){if(u){ga();ha();}}};e.exports=oa;});