/*1358551713,173213215*/

if (self.CavalryLogger) { CavalryLogger.start_js(["pE+9l"]); }

/** js/channel2/AjaxRequest.js */
__d("AjaxRequest",["ErrorUtils","Keys","URI","UserAgent","XHR","copyProperties"],function(a,b,c,d,e,f){



var g=b('ErrorUtils'),
h=b('Keys'),
i=b('URI'),
j=b('UserAgent'),
k=b('XHR'),

l=b('copyProperties');














































































































function m(q,r,s){
this.xhr=k.create();

if(!(r instanceof i))
r=new i(r);


if(s&&q=='GET'){
r.setQueryData(s);}else 

this._params=s;


this.method=q;
this.uri=r;

this.xhr.open(q,r);}


var n=window.XMLHttpRequest&&
('withCredentials' in new XMLHttpRequest());
m.supportsCORS=function(){return n;};



m.ERROR='ar:error';
m.TIMEOUT='ar:timeout';
m.PROXY_ERROR='ar:proxy error';
m.TRANSPORT_ERROR='ar:transport error';
m.SERVER_ERROR='ar:http error';
m.PARSE_ERROR='ar:parse error';

m._inflight=[];


function o(){
var q=m._inflight;
m._inflight=[];
q.forEach(function(r){
r.abort();});}




function p(q){

q.onJSON=q.onError=q.onSuccess=null;


clearTimeout(q._timer);


if(q.xhr&&q.xhr.readyState<4){
q.xhr.abort();
q.xhr=null;}



m._inflight=m._inflight.filter(function(r){
return r&&r!=q&&r.xhr&&r.xhr.readyState<4;});}



l(m.prototype,
{timeout:60000,

streamMode:true,

prelude:/^for \(;;\);/,


status:null,


_eol:-1,




_call:function(q){
if(this[q])
this[q](this);},








_parseStatus:function(){
var q;

try{this.status=this.xhr.status;
q=this.xhr.statusText;}catch(
r){

if(this.xhr.readyState>=4){
this.errorType=m.TRANSPORT_ERROR;
this.errorText=r.message;}

return;}


if(this.status===0&&!(/^(file|ftp)/.test(this.uri))){




this.errorType=m.TRANSPORT_ERROR;}else
if(this.status>=100&&this.status<200){
this.errorType=m.PROXY_ERROR;}else
if(this.status>=200&&this.status<300){
return;}else
if(this.status>=300&&this.status<400){




this.errorType=m.PROXY_ERROR;}else
if(this.status>=400&&this.status<500){
this.errorType=m.SERVER_ERROR;}else
if(this.status>=500&&this.status<600){
this.errorType=m.PROXY_ERROR;}else
if(this.status==1223){

return;}else
if(this.status>=12001&&this.status<=12156){










this.errorType=m.TRANSPORT_ERROR;}else{

q='unrecognized status code: '+this.status;
this.errorType=m.ERROR;}


if(!this.errorText)
this.errorText=q;},







_parseResponse:function(){
var q,
r=this.xhr.readyState;


try{q=this.xhr.responseText||'';}catch(
s){

if(r>=4){
this.errorType=m.ERROR;
this.errorText='responseText not available - '+s.message;}

return;}



while(this.xhr){
var t=this._eol+1,
u=this.streamMode?q.indexOf('\n',t):q.length;
if(u<0&&r==4)

u=q.length;



if(u<=this._eol)
break;


var v=q;
if(this.streamMode)

v=q.substr(t,u-t).replace(/^\s*|\s*$/g,'');



if(t===0&&this.prelude)
if(this.prelude.test(v))
v=v.replace(this.prelude,'');









this._eol=u;


if(v){

try{this.json=JSON.parse(v);}catch(
s){

var w=(/(<body[\S\s]+?<\/body>)/i).test(q)&&RegExp.$1,
x=
{message:s.message,
'char':t,
excerpt:((t===0&&w)||v).substr(512)};

this.errorType=m.PARSE_ERROR;
this.errorText='parse error - '+JSON.stringify(x);
return;}


g.applyWithGuard(this._call,this,['onJSON']);}}},







_onReadyState:function(){
var q=this.xhr&&this.xhr.readyState||0;

if(this.status==null&&q>=2)
this._parseStatus();


if(!this.errorType&&this.status!=null)


if((q==3&&this.streamMode)||q==4)
this._parseResponse();




if(this.errorType||q==4){
this._time=Date.now()-this._sentAt;
this._call(!this.errorType?'onSuccess':'onError');
p(this);}},






send:function(q){
this.xhr.onreadystatechange=function(){
g.applyWithGuard(this._onReadyState,this,arguments);}.
bind(this);

var r=this.timeout;
if(r)
this._timer=setTimeout
((function(){
this.errorType=m.TIMEOUT;
this.errorText='timeout';
this._time=Date.now()-this._sentAt;
this._call('onError');
p(this);}).
bind(this),
r,
false);




m._inflight.push(this);

if(this.method=='POST')
this.xhr.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');


this._sentAt=Date.now();
this.xhr.send(q?i.implodeQuery(q):'');},





abort:function(){
p(this);},





toString:function(){
var q='[AjaxRequest readyState='+this.xhr.readyState;
if(this.errorType)
q+=' errorType='+this.errorType+' ('+this.errorText+')';

return q+']';},





toJSON:function(){
var q=
{json:this.json,
status:this.status,
errorType:this.errorType,
errorText:this.errorText,
time:this._time};



if(this.errorType)
q.uri=this.uri;



for(var r in q)
if(q[r]==null)
delete q[r];



return q;}});




if(window.addEventListener&&j.firefox())
window.addEventListener('keydown',function(event){
if(event.keyCode===h.ESC)
event.prevent();},

false);


if(window.attachEvent)


window.attachEvent('onunload',o);


e.exports=m;});

/** js/channel2/FBAjaxRequest.js */
__d("FBAjaxRequest",["AjaxRequest","copyProperties","XHR"],function(a,b,c,d,e,f){



var g=b('AjaxRequest'),
h=b('copyProperties'),
i=b('XHR');





function j(k,l,m){


m=h(i.getAsyncParams(k),m);

var n=new g(k,l,m);

n.streamMode=false;


var o=n._call;
n._call=function(p){
if(p=='onJSON'&&this.json){
if(this.json.error){
this.errorType=g.SERVER_ERROR;
this.errorText='AsyncResponse error: '+this.json.error;}

this.json=this.json.payload;}

o.apply(this,arguments);};

n.ajaxReqSend=n.send;
n.send=function(p){
this.ajaxReqSend(h(p,m));};


return n;}


e.exports=j;});

/** js/mercury/callback_manager/CallbackManagerController.js */
__d("CallbackManagerController",["ErrorUtils","copyProperties"],function(a,b,c,d,e,f){



var g=b('ErrorUtils'),
h=b('copyProperties'),













i=function(j){

this._pendingIDs=[];


this._allRequests=[undefined];
this._callbackArgHandler=j;};


h(i.prototype,










{executeOrEnqueue:function(j,k,l){
l=l||{};

var m=this._attemptCallback(k,j,l);

if(m)
return 0;


this._allRequests.push({fn:k,request:j,options:l});
var n=this._allRequests.length-1;
this._pendingIDs.push(n);

return n;},








unsubscribe:function(j){
delete this._allRequests[j];},





reset:function(){
this._allRequests=[];},





getRequest:function(j){
return this._allRequests[j];},


runPossibleCallbacks:function(){





var j=this._pendingIDs;
this._pendingIDs=[];
var k=[];

j.forEach(function(l){
var m=this._allRequests[l];
if(!m)

return;


if(this._callbackArgHandler(m.request,m.options)){
k.push(l);}else 

this._pendingIDs.push(l);}.

bind(this));

k.forEach(function(l){
var m=this._allRequests[l];
delete this._allRequests[l];
this._attemptCallback(m.fn,m.request,m.options);}.
bind(this));},






_attemptCallback:function(j,k,l){
var m=this._callbackArgHandler(k,l);
if(m){
var n=
{ids:k};

g.applyWithGuard(j,n,m);}

return !!m;}});



e.exports=i;});

/** js/mercury/callback_manager/KeyedCallbackManager.js */
__d("KeyedCallbackManager",["CallbackManagerController","ErrorUtils","copyProperties"],function(a,b,c,d,e,f){







var g=b('CallbackManagerController'),
h=b('ErrorUtils'),
i=b('copyProperties'),

j=function(){
this._resources={};
this._controller=new g
(this._constructCallbackArg.bind(this));};



i(j.prototype,















{executeOrEnqueue:function(k,l){
if(!(k instanceof Array)){
var m=k,
n=l;

k=[k];
l=function(o){
n(o[m]);};}



k=k.filter(function(o){
var p=(o!==null&&o!==undefined);

if(!p)

h.applyWithGuard(function(){
throw new Error
('KeyedCallbackManager.executeOrEnqueue: key '+
JSON.stringify(o)+
' is invalid');});




return p;});


return this._controller.executeOrEnqueue(k,l);},








unsubscribe:function(k){
this._controller.unsubscribe(k);},





reset:function(){
this._controller.reset();
this._resources={};},






getUnavailableResources:function(k){
var l=this._controller.getRequest(k),
m=[];
if(l)
m=l.request.filter(function(n){
return !this._resources[n];}.
bind(this));

return m;},








addResourcesAndExecute:function(k){
i(this._resources,k);
this._controller.runPossibleCallbacks();},





setResource:function(k,l){
this._resources[k]=l;
this._controller.runPossibleCallbacks();},







getResource:function(k){
return this._resources[k];},





getAllResources:function(){
return this._resources;},





dumpResources:function(){
var k={};
for(var l in this._resources){
var m=this._resources[l];
if(typeof m==='object')
m=i({},m);

k[l]=m;}

return k;},






_constructCallbackArg:function(k){
var l={};
for(var m=0;m<k.length;m++){
var n=k[m],
o=this._resources[n];

if(typeof o=='undefined')
return false;


l[n]=o;}


return [l];}});



e.exports=j;});

/** js/mercury/callback_manager/BaseAsyncLoader.js */
__d("BaseAsyncLoader",["KeyedCallbackManager","copyProperties"],function(a,b,c,d,e,f){


















var g=b('KeyedCallbackManager'),

h=b('copyProperties'),

i={};

function j(l,m,n){
var o=new g(),
p=false,
q=[];





function r(){
if(!q.length||p)
return;



p=true;

t.defer();}


function s(w){
p=false;



w.forEach(o.unsubscribe.bind(o));

r();}


function t(){
var w={},
x=[];
q=q.filter(function(z){
var aa=o.getUnavailableResources(z);
if(aa.length){
aa.forEach(function(ba){w[ba]=true;});
x.push(z);
return true;}

return false;});


var y=Object.keys(w);
if(y.length){
n
(l,
y,
x,
u.curry(x),
v.curry(x));}else 

p=false;}



function u(w,x){

var y=x.payload[m]||x.payload;
o.addResourcesAndExecute(y);

s(w);}


function v(w){
s(w);}







return {get:function(w,x){
var y=o.executeOrEnqueue(w,x),
z=o.getUnavailableResources(y);
if(z.length){
q.push(y);
r();}},






getCachedKeys:function(){
return Object.keys(o.getAllResources());},





getNow:function(w){
return o.getResource(w)||null;},





set:function(w){
o.addResourcesAndExecute(w);}};}





function k(l,m){



throw ('BaseAsyncLoader can\'t be instantiated');}


h(k.prototype,

{_getLoader:function(){
if(!i[this._endpoint])
i[this._endpoint]=
j
(this._endpoint,
this._type,
this.send);

return i[this._endpoint];},


get:function(l,m){
return this._getLoader().get(l,m);},


getCachedKeys:function(){
return this._getLoader().getCachedKeys();},


getNow:function(l){
return this._getLoader().getNow(l);},


reset:function(){
i[this._endpoint]=null;},


set:function(l){
this._getLoader().set(l);}});




e.exports=k;});

/** js/mercury/callback_manager/AjaxLoader.js */
__d("AjaxLoader",["copyProperties","FBAjaxRequest","BaseAsyncLoader"],function(a,b,c,d,e,f){







var g=b('copyProperties'),

h=b('FBAjaxRequest'),
i=b('BaseAsyncLoader');

function j(k,l){
this._endpoint=k;
this._type=l;}


g(j.prototype,i.prototype);

j.prototype.send=
function(k,l,m,n,o){
var p=new h('GET',k,{ids:l});
p.onJSON=function(q){
n({payload:q.json});};

p.onError=o;
p.send();};


e.exports=j;});

/** js/chat/ShortProfiles.js */
__d("ShortProfiles",["ArbiterMixin","AjaxLoader","Env","FBAjaxRequest","JSLogger","copyProperties"],function(a,b,c,d,e,f){



var g=b('ArbiterMixin'),
h=b('AjaxLoader'),
i=b('Env'),
j=b('FBAjaxRequest'),
k=b('JSLogger'),

l=b('copyProperties'),

m='/ajax/chat/user_info.php',
n='/ajax/chat/user_info_all.php',

o=new h(m,'profiles'),
p=false,

q=k.create('short_profiles');




function r(){
if(!p){
q.log('fetch_all');

p=true;
var u=new j('GET',n,{viewer:i.user});
u.onJSON=function(v){
o.set(v.json);
t.inform('updated');};

u.send();}}



function s(u){
return JSON.parse(JSON.stringify(u));}


var t={};

l(t,g,





{get:function(u,v){
this.getMulti([u],function(w){
v(w[u],u);});},



getMulti:function(u,v){
function w(x){
v(s(x));}

o.get(u,w);},


getNow:function(u){
return s(o.getNow(u)||null);},





getCachedProfileIDs:function(){
return o.getCachedKeys();},


hasAll:function(){
return p;},


fetchAll:function(){
r();},


set:function(u,v){
var w={};
w[u]=v;
this.setMulti(w);},


setMulti:function(u){
o.set(s(u));}});



e.exports=t;});

/** js/react/utils/keyMirror.js */
__d("keyMirror",[],function(a,b,c,d,e,f){
















var g=function(h){
var i={},
j;
if(!h)
return h;

for(j in h){
if(!h.hasOwnProperty(j))
continue;

i[j]=j;}

return i;};


e.exports=g;});

/** js/react/utils/throwIf.js */
__d("throwIf",[],function(a,b,c,d,e,f){



var g=function(h,i){
if(h)
throw new Error(i);};



e.exports=g;});

/** js/react/core/ReactErrors.js */
__d("ReactErrors",["keyMirror","throwIf"],function(a,b,c,d,e,f){



var g=b('keyMirror'),
h=b('throwIf'),

i=g
({CLASS_SPEC:null,
CONTROL_WITHOUT_BACKING_DOM:null,
NO_RENDER_NODE:null,
USING_CHILD_TWICE:null,
DUAL_TRANSACTION:null,
MISSING_TRANSACTION:null,
INVALID_STATE:null,
ON_DOM_READY_MISMATCH:null,
INVALID_COMPONENT:null,
RUNAWAY_TREE:null,
ESCAPE_TYPE:null,
INVALID_HIERARCHY:null,
INVALID_ID:null});
























































































i.throwIf=h;

e.exports=i;});

/** js/react/core/BrowserEnv.js */
__d("BrowserEnv",[],function(a,b,c,d,e,f){






var g=
{currentScrollLeft:0,
currentScrollTop:0,
browserInfo:null,
refreshAuthoritativeScrollValues:function(){
g.currentScrollLeft=
document.body.scrollLeft+document.documentElement.scrollLeft;
g.currentScrollTop=
document.body.scrollTop+document.documentElement.scrollTop;}};



e.exports=g;});

/** js/react/core/EventListener.js */
__d("EventListener",["Event"],function(a,b,c,d,e,f){



var g=b('Event'),







h=







{listen:g.listen,







capture:function(i,j,k){





if(i.addEventListener)
i.addEventListener(j,k,true);}};




e.exports=h;});

/** js/react/core/DOMEventUtils.js */
__d("DOMEventUtils",["EventListener"],function(a,b,c,d,e,f){






var g=b('EventListener'),

h=function(k){
var l=k||window.event,





m='target' in l,
n=l.target||l.srcElement||window,


o=
(n.nodeType===3)?n.parentNode:n;
if(!m||l.target!==o)
l.target=o;},



i=function(k){
return function(l){
h(l);
var m=l;
k(m);};},



j=







{listenOn:function(k,l,m){
g.listen(k,l,i(m));},







captureOn:function(k,l,m){
g.capture(k,l,i(m));}};



e.exports=j;});

/** js/react/core/EventConstants.js */
__d("EventConstants",["keyMirror"],function(a,b,c,d,e,f){



var g=b('keyMirror'),

h=g({bubbled:null,captured:null}),




i=g
({topMouseMove:null,topMouseOver:null,topMouseOut:null,
topMouseUp:null,topMouseDown:null,topClick:null,topDoubleClick:null,
topTouchStart:null,topTouchEnd:null,topTouchMove:null,
topTouchCancel:null,
topKeyUp:null,topKeyPress:null,topKeyDown:null,
topFocus:null,topBlur:null,
topMouseWheel:null,topScroll:null,topChange:null}),


j=
{topLevelTypes:i,
PropagationPhases:h};


e.exports=j;});

/** js/modules/core/TouchEventUtils.js */
__d("TouchEventUtils",[],function(a,b,c,d,e,f){



var g=










{extractSingleTouch:function(h){
var i=h.touches,
j=h.changedTouches,
k=i&&i.length>0,
l=j&&j.length>0;

return !k&&l?j[0]:
k?i[0]:
h;}};



e.exports=g;});

/** js/react/core/AbstractEvent.js */
__d("AbstractEvent",["BrowserEnv","TouchEventUtils","throwIf"],function(a,b,c,d,e,f){



var g=b('BrowserEnv'),
h=b('TouchEventUtils'),

i=b('throwIf'),

j=20,


k='CLONE_TYPE_ERR',












l=[];









function m
(n,
o,
p,
q,
r){
this.type=n;
this.abstractTargetID=o||'';
this.originatingTopLevelEventType=p;
this.nativeEvent=q;
this.data=r;

this.target=q&&q.target;










this._dispatchListeners=null;
this._dispatchIDs=null;}


m.prototype.preventDefault=function(){
m.preventDefaultOnNativeEvent(this.nativeEvent);};





m.preventDefaultOnNativeEvent=function(n){
if(n.preventDefault){
n.preventDefault();}else 

n.returnValue=false;};






m.normalizeScrollDataFromTarget=function(n){

return {scrollTop:n.scrollTop,
scrollLeft:n.scrollLeft,
clientWidth:n.clientWidth,
clientHeight:n.clientHeight,
scrollHeight:n.scrollHeight,
scrollWidth:n.scrollWidth};};









m.normalizeMouseWheelData=function(n){
var o=0,
p=0,
q=0;


if(n.wheelDelta)o=n.wheelDelta/120;
if(n.detail)o=-n.detail/3;


q=o;


if(n.axis!==undefined&&
n.axis===n.HORIZONTAL_AXIS){
q=0;
p=-o;}



if(n.wheelDeltaY!==undefined)
q=n.wheelDeltaY/120;

if(n.wheelDeltaX!==undefined)
p=-n.wheelDeltaX/120;


return {delta:o,deltaX:p,deltaY:q};};






m.isNativeClickEventRightClick=function(n){
return n.which?n.which===3:
n.button?n.button===2:
false;};


m.normalizePointerData=function(n){

return {globalX:m.eventPageX(n),
globalY:m.eventPageY(n),
rightMouseButton:
m.isNativeClickEventRightClick(n)};};



m.normalizeDragEventData=
function(n,o,p,q,r){

return {globalX:o,
globalY:p,
startX:q,
startY:r};};




















m.eventPageY=function(n){
var o=h.extractSingleTouch(n);
if(o){
return o.pageY;}else
if(typeof n.pageY!=='undefined'){
return n.pageY;}else 

return n.clientY+g.currentPageScrollTop;};









m.eventPageX=function(n){
var o=h.extractSingleTouch(n);
if(o){
return o.pageX;}else
if(typeof n.pageX!=='undefined'){
return n.pageX;}else 

return n.clientX+g.currentPageScrollLeft;};







m.pooled=
function(n,o,p,q,r){
if(l.length){
var s=l.pop();
s.type=n;
s.abstractTargetID=o||'';
s.originatingTopLevelEventType=p;
s.nativeEvent=q;
s.data=r;
s.target=q&&q.target;
s._dispatchListeners=null;
s._dispatchIDs=null;
return s;}else 

return new m
(n,
o,
p,
q,
r);};











m.release=function(n){
if(l.length<j){
l.push(n);
n.target=null;
n._dispatchListeners=null;
n._dispatchIDs=null;}};




















m.persistentCloneOf=function(n){




return new m
(n.type,
n.abstractTargetID,
n.originatingTopLevelEventType,
n.nativeEvent,
n.data,
n.target);};



e.exports=m;});

/** js/react/utils/Accumulation.js */
__d("Accumulation",["throwIf"],function(a,b,c,d,e,f){



var g=b('throwIf'),

h='INVALID_ACCUM_ARGS';

















function i(l,m){
var n=l==null,
o=m===null;



if(o){
return l;}else 

if(n){
return m;}else{



var p=Array.isArray(l),
q=Array.isArray(m);
if(p){
return l.concat(m);}else 

if(q){
return [l].concat(m);}else 

return [l,m];}}














var j=function(l,m,n){
if(Array.isArray(l)){
l.forEach(m,n);}else
if(l)
m.call(n,l);},



k=
{accumulate:i,
forEachItem:j};


e.exports=k;});

/** js/react/core/CallbackRegistry.js */
__d("CallbackRegistry",[],function(a,b,c,d,e,f){



var g={},








h=







{putListener:function(i,j,k){
var l=
g[j]||(g[j]={});
l[i]=k;},







getListener:function(i,j){
var k=g[j];
return k&&k[i];},







deleteListener:function(i,j){
var k=g[j];
if(k)
delete k[i];},



listenerBank:g};


e.exports=h;});

/** js/react/core/EventPluginUtils.js */
__d("EventPluginUtils",["EventConstants","AbstractEvent","ReactErrors","throwIf"],function(a,b,c,d,e,f){



var g=b('EventConstants'),
h=b('AbstractEvent'),
i=b('ReactErrors'),

j=b('throwIf'),

k=g.topLevelTypes;

function l(y){
return y===k.topMouseUp||
y===k.topTouchEnd||
y===k.topTouchCancel;}


function m(y){
return y===k.topMouseMove||
y===k.topTouchMove;}

function n(y){
return y===k.topMouseDown||
y===k.topTouchStart;}


function o(y,z){
var aa=h.eventPageX(z),
ba=h.eventPageY(z);
y.pageX=aa;
y.pageY=ba;}


function p(y,z){
var aa=h.eventPageX(z),
ba=h.eventPageY(z);
return Math.pow
(Math.pow(aa-y.pageX,2)+Math.pow(ba-y.pageY,2),
.5);}



var q;



















function r(y,z){
var aa=y._dispatchListeners,
ba=y._dispatchIDs;



if(Array.isArray(aa)){
var ca;
for(ca=0;ca<aa.length;ca++)

z(y,aa[ca],ba[ca]);}else

if(aa)
z(y,aa,ba);}



function s(y,z,aa){
z(y,aa);}





function t(y){
r(y,s);
y._dispatchListeners=null;
y._dispatchIDs=null;}









function u(y){
var z=y._dispatchListeners,
aa=y._dispatchIDs;



if(Array.isArray(z)){
var ba;
for(ba=0;ba<z.length;ba++)

if(z[ba](y,aa[ba]))
return aa[ba];}else


if(z)
if(z(y,aa))
return aa;


return null;}











function v(y){



var z=y._dispatchListeners,
aa=y._dispatchIDs;
j(Array.isArray(z),i.DISPATCH_IDS_MISSING);
var ba=
z?z(y,aa):null;
y._dispatchListeners=null;
y._dispatchIDs=null;
return ba;}






function w(y){
return !!y._dispatchListeners;}





var x=
{isEndish:l,
isMoveish:m,
isStartish:n,
storePageCoordsIn:o,
eventDistance:p,
executeDispatchesInOrder:t,
executeDispatchesInOrderStopAtTrue:u,
executeDirectDispatch:v,
hasDispatches:w,
forEachEventDispatch:r};


e.exports=x;});

/** js/react/core/EventPropagators.js */
__d("EventPropagators",["Accumulation","CallbackRegistry","EventConstants"],function(a,b,c,d,e,f){



var g=b('Accumulation'),
h=b('CallbackRegistry'),
i=b('EventConstants'),

j=g.accumulate,
k=g.forEachItem,

l=h.getListener,
m=i.PropagationPhases,






n=null,




o=null,
p=null,

q;








function r(ba){
n=ba;
o=ba.traverseTwoPhase;
p=ba.traverseEnterLeave;}






function s(ba,ca,da){
var ea=
ca.type.phasedRegistrationNames[da];
return l(ba,ea);}








function t(ba,ca,da){






var ea=ca?m.bubbled:m.captured,
fa=s(ba,da,ea);
if(fa){
da._dispatchListeners=
j(da._dispatchListeners,fa);
da._dispatchIDs=j(da._dispatchIDs,ba);}}










function u(ba){
if(ba&&ba.type.phasedRegistrationNames){
var ca=ba.abstractTargetID;
o(ca,t,ba);}}









function v(ba,ca,da){
if(da&&da.type.registrationName){
var ea=l(ba,da.type.registrationName);
if(ea){
da._dispatchListeners=
j(da._dispatchListeners,ea);
da._dispatchIDs=j(da._dispatchIDs,ba);}}}









function w(ba){
if(ba&&ba.type.registrationName)
v(ba.abstractTargetID,null,ba);}



function x(ba){



k(ba,u);}


function y(ba,ca,da,ea){



p(da,ea,v,ba,ca);}



function z(ba){



k(ba,w);}















var aa=
{accumulateTwoPhaseDispatches:x,
accumulateDirectDispatches:z,
accumulateEnterLeaveDispatches:y,
injectInstanceHandleModule:r};


e.exports=aa;});

/** js/react/core/EventPluginHub.js */
__d("EventPluginHub",["AbstractEvent","Accumulation","CallbackRegistry","EventPluginUtils","EventPropagators","throwIf"],function(a,b,c,d,e,f){



var g=b('AbstractEvent'),
h=b('Accumulation'),
i=b('CallbackRegistry'),
j=b('EventPluginUtils'),
k=b('EventPropagators'),

l=b('throwIf'),

m=h.accumulate,
n=i.deleteListener,
o=h.forEachItem,

p='DOUBLE_REGISTER',
q='DOUBLE_ENQUEUE',



























r={},





s=[],





t=[],





u=[];







function v(da){
var ea,
fa=da.phasedRegistrationNames;
if(fa){
for(ea in fa){
if(!fa.hasOwnProperty(ea))
continue;







r[fa[ea]]=true;
s.push(fa[ea]);}}else

if(da.registrationName){
r[da.registrationName]=true;
s.push(da.registrationName);}}








var w=function(da){
u.push(da);
var ea;
for(ea in da.abstractEventTypes){
if(!da.abstractEventTypes.hasOwnProperty(ea))
continue;

var fa=da.abstractEventTypes[ea];
v(fa);}},




x=function(da){
var ea;
for(ea=0;ea<s.length;ea++)
n(da,s[ea]);},















y=
function(da,ea,fa,ga){
var ha,
ia;
for(ia=0;ia<u.length;ia++){
var ja=
u[ia].extractAbstractEvents
(da,
ea,
fa,
ga);

if(ja)
ha=m(ha,ja);}


return ha;},


z=function(da){
if(da)
t=m(t,da);},











aa=function(da){
if(da){
j.executeDispatchesInOrder(da);
g.release(da);}},










ba=function(){
var da=t;
t=null;
o(da,aa);},














ca=
{registrationNames:r,
registrationNamesArr:s,
injectEventPlugin:w,
putListener:i.putListener,
getListener:i.getListener,
deleteAllListeners:x,
extractAbstractEvents:y,
enqueueAbstractEvents:z,
processAbstractEventQueue:ba,
injectInstanceHandleModule:k.injectInstanceHandleModule};



window.EventPluginHub=ca;

e.exports=ca;});

/** js/react/core/ReactBrowserUtils.js */
__d("ReactBrowserUtils",["ReactErrors"],function(a,b,c,d,e,f){



var g=b('ReactErrors');












function h(k){

return {"&":"&amp;",
">":"&gt;",
"<":"&lt;",
"\"":"&quot;",
"'":"&#x27;",
"/":"&#x2f;"}[
k];}


var i=document.createElement('div'),




j=







{getSupportedStyleMap:function(){
var k={},
l;
for(l in i.style)
k[l]=j.escapeTextForBrowser(l);

return k;},






getContentAccessorKey:function(){
return i.innerText!==undefined?'innerText':'textContent';},


escapeTextForBrowser:function(k){
g.throwIf
((!k||!k.indexOf)&&isNaN(k),
g.ESCAPE_TYPE);

return (''+k).replace(/[&><"'\/]/g,h);},






supportsEvent:function(k,l){
var m=document.createElement('div'),
n='on'+k,
o=n in m,
p=!!i.addEventListener;

if(!o){
if(!m.setAttribute)
m=document.createElement('div');

if(m.setAttribute&&m.removeAttribute){
m.setAttribute(n,'');
o=typeof m[n]==='function';
if(typeof m[n]!=='undefined')
m[n]=undefined;

m.removeAttribute(n);}}


m=null;
return (l&&p||!l)&&o;}};



e.exports=j;});

/** js/react/utils/objMapKeyVal.js */
__d("objMapKeyVal",[],function(a,b,c,d,e,f){











var g=function(h,i,j){
var k,
l=0,
m={};
if(!h)
return h;

for(k in h){
if(!h.hasOwnProperty(k))
continue;

m[k]=i.call(j,k,h[k],l++);}

return m;};


e.exports=g;});

/** js/react/core/ReactDOMAttributes.js */
__d("ReactDOMAttributes",["ReactBrowserUtils","objMapKeyVal"],function(a,b,c,d,e,f){












var g=b('ReactBrowserUtils'),

h=b('objMapKeyVal'),
i=function(q){return q;},

j=g.getContentAccessorKey(),


k=g.getSupportedStyleMap(),






l=function(q){
return q.replace(/[A-Z]/g,function(r){
return '-'+r.toLowerCase();});},



m=function(q,r,s){
return h(s,function(t,u){
return q+u(t)+r;});},



n=h(k,function(){
return l;}),


o=
{className:function(){return 'class';},
data:l,
margin:l,
marginRight:l,
marginLeft:l,
tabIndex:i,
marginTop:l,
marginBottom:l,
padding:l,
paddingRight:l,
paddingLeft:l,
paddingTop:l,
paddingBottom:l,
dir:i,
width:i,
height:i,
alt:i,
src:i,
value:i,
checked:i,
href:i,
placeholder:i,
title:i,
selected:i,
target:i,
scrollTop:i,
scrollLeft:i,
name:i,
type:i,
htmlFor:i,
rel:i,
ajaxify:i,
allowfullscreen:i,
allowscriptaccess:i,
wmode:i,
contentEditable:i,

x1:i,
x2:i,
y1:i,
y2:i,
transform:i,
opacity:i,
'stroke-width':i,
'stroke-linecap':i,
stroke:i},


p=

{CONTENT_ACCESSOR_KEY:j,




customAttrRegexp:/^(data|aria)-[a-z_][a-z\d_.\-]*$/,





styleFeatureNames:m(';',':',n),






allTagAttrPieces:m(' ','=\'',o),








cssNumber:
{textDecoration:true,
zoom:true,
fillOpacity:true,
fontWeight:true,
opacity:true,
orphans:true,
zIndex:true,
outline:true},






controlSimply:
{className:true,
data:true,
scrollTop:true,
scrollLeft:true,
title:true,
rows:true,
cols:true,
size:true},







controlDirectlyNonIdempotent:
{value:true,
src:true,
checked:true,
selected:true,
rel:true},








controlUsingSetAttr:
{ajaxify:true,
margin:true,
marginRight:true,
marginLeft:true,
marginTop:true,
marginBottom:true,
padding:true,
paddingRight:true,
paddingLeft:true,
paddingTop:true,
paddingBottom:true,
width:true,
height:true,
href:true,
placeholder:true,
target:true}};












e.exports=p;});

/** js/react/core/ReactDOMUtils.js */
__d("ReactDOMUtils",["ReactBrowserUtils","ReactDOMAttributes"],function(a,b,c,d,e,f){








var g=b('ReactBrowserUtils'),
h=b('ReactDOMAttributes'),

i=h.cssNumber,
j=g.escapeTextForBrowser,
k=h.styleFeatureNames;





function l(t,u,v){
if(v){
if(v.nextSibling){
return t.insertBefore(u,v.nextSibling);}else 

return t.appendChild(u);}else 


return t.insertBefore(u,t.firstChild);}



function m(t,u,v){
var w,x,
y=u.length;

for(x=0;x<y;x++)
w=l(t,u[0],w||v);

return w;}





function n(t,u,v){
if(!u)
return 0;

var w=document.createElement(t?t.tagName:'div');
w.innerHTML=u;
var x=w.childNodes,
y=x.length,

z=v?t.childNodes[v-1]:null;
m(t,x,z);

return y;}










function o(t,u,v){
var w=t.childNodes;


if(u.parentNode)
u.parentNode.removeChild(u);

if(v>=w.length){
t.appendChild(u);}else 

t.insertBefore(u,w[v]);

return u;}









function p(t,u){
if(!isNaN(u))
return i[t]?u:(j(u)+'px');

return (u!==0&&!u)?'':u;}







function q(t){
var u='',
v;
for(v in t){
if(!t.hasOwnProperty(v))
continue;

var w=t[v];
if(w!==undefined)
u+=k[v]+p(v,w);}


return u;}








function r(t){


if(t.getAttributeNode){
var u=t.getAttributeNode('id');
return u&&u.value||'';}else 

return t.id||'';}



var s=
{insertNodeAfterNode:l,
insertNodeAt:o,
insertMarkupAt:n,
serializeInlineStyle:q,
getDOMNodeID:r};


e.exports=s;});

/** js/react/core/ReactInstanceHandles.js */
__d("ReactInstanceHandles",["ReactErrors","ReactDOMUtils","throwIf"],function(a,b,c,d,e,f){



var g=b('ReactErrors'),
h=b('ReactDOMUtils'),
i=b('throwIf'),

j='.',
k=j.length,




l=100,

m;














function n(ba,ca){
return ba.charAt(ca)===j||ca===ba.length;}


function o(ba){
var ca=ba===''||
(ba.charAt(0)===j&&ba.charAt(ba.length-1)!==j);
i(!ca,g.INVALID_ID);}


var p=function(ba){
var ca=h.getDOMNodeID(ba);
return ca&&ca.charAt(0)===j;},





q=function(ba){
var ca=ba;
while(ca&&ca.parentNode!==ca&&!p(ca))
ca=ca.parentNode;

return ca||window;},










r=function(ba,ca){
var da=ba.firstChild;
while(da){
if(ca==da.id){
return da;}else
if(ca.indexOf(da.id)===0)
return r(da,ca);

da=da.nextSibling;}},












s=function(ba,ca){
var da=0,
ea=0,
fa=Math.min(ba.length,ca.length);
if(ba===''||ca==='')
return '';

for(da=0;da<=fa;da++)
if(n(ba,da)&&n(ca,da)){
ea=da;}else
if(ba.charAt(da)!==ca.charAt(da))
break;


var ga=ba.substr(0,ea);



return ga;},





















t=function(ba){
return '.reactRoot['+ba+']';},









u=function(ba){
var ca=/\.reactRoot\[[^\]]+\]/.exec(ba);
return ca&&ca[0];},







v=function(ba){
if(!ba||!ba.length)
return '';

var ca=ba.lastIndexOf(".");
return ba.substr(0,ca);},








w=function(ba,ca){



if(ba===ca)
return ba;



var da=ba.length+k,
ea;
for(ea=da;ea<=ca.length;ea++)
if(n(ca,ea))
return ca.substr(0,ea);


i(true,g.INVALID_ID);},













x=function(ba,ca,da,ea,fa,ga){
ba=ba||'';
ca=ca||'';





var ha=s(ba,ca),
ia=ha===ca,
ja=ha===ba,
ka=ba,
la=false,
ma=0;
if(ia){
while(!la){
if((ma!==0||!fa)&&(ka!==ca||!ga))
da(ka,true,ea);

la=ka===ca;
ka=v(ka);
i(ma++>l,g.RUNAWAY_TREE);}}else

if(ja)
while(!la){
if((ma!==0||!fa)&&(ka!==ca||!ga))
da(ka,false,ea);

la=ka===ca;
ka=w(ka,ca);
i(ma++>l,g.RUNAWAY_TREE);}},












y=function(ba,ca,da){
if(ba){
x('',ba,ca,da,true,false);
x(ba,'',ca,da,false,true);}},








z=function(ba,ca,da,ea,fa){
var ga=s(ba,ca);
if(ga!==ba)
x(ba,ga,da,ea,false,true);

if(ga!==ca)
x(ga,ca,da,fa,true,false);},



aa=
{separator:j,
getFirstReactDOM:q,
findComponentRoot:r,
getFirstCommonAncestorID:s,
getReactRootID:t,
getReactRootIDFromNodeID:u,
traverseEnterLeave:z,
traverseTwoPhase:y,
nextDescendantID:w};


e.exports=aa;});

/** js/modules/core/keyOf.js */
__d("keyOf",[],function(a,b,c,d,e,f){













var g=function(h){
var i;
for(i in h){
if(!h.hasOwnProperty(i))
continue;

return i;}

return null;};



e.exports=g;});

/** js/react/EventPlugins/EnterLeaveEventPlugin.js */
__d("EnterLeaveEventPlugin",["EventPropagators","AbstractEvent","ReactDOMUtils","EventConstants","ReactInstanceHandles","keyOf"],function(a,b,c,d,e,f){



var g=b('EventPropagators'),
h=b('AbstractEvent'),
i=b('ReactDOMUtils'),
j=b('EventConstants'),
k=b('ReactInstanceHandles'),

l=b('keyOf'),

m=j.topLevelTypes,
n=k.getFirstReactDOM,

o=
{mouseEnter:{registrationName:l({onMouseEnter:null})},
mouseLeave:{registrationName:l({onMouseLeave:null})}},













p=
function(r,
s,
t,
u){

if(r===m.topMouseOver&&
(s.relatedTarget||s.fromElement))
return;

if(r!==m.topMouseOut&&
r!==m.topMouseOver)
return null;


var v=r===m.topMouseOut?
n(s.relatedTarget||s.toElement):
u,
w=
r===m.topMouseOut?u:window;


if(w===v)
return;


var x=w?i.getDOMNodeID(w):'',
y=v?i.getDOMNodeID(v):'',
z=h.pooled
(o.mouseLeave,
x,
r,
s),

aa=h.pooled
(o.mouseEnter,
y,
r,
s);

g.accumulateEnterLeaveDispatches(z,aa,x,y);
return [aa,z];},


q=
{abstractEventTypes:o,
extractAbstractEvents:p};


e.exports=q;});

/** js/react/EventPlugins/SimpleEventPlugin.js */
__d("SimpleEventPlugin",["AbstractEvent","EventConstants","EventPropagators","keyOf"],function(a,b,c,d,e,f){



var g=b('AbstractEvent'),
h=b('EventConstants'),
i=b('EventPropagators'),

j=b('keyOf'),

k=h.topLevelTypes,

l=
{abstractEventTypes:


{mouseDown:
{phasedRegistrationNames:
{bubbled:j({onMouseDown:true}),
captured:j({onMouseDownCapture:true})}},


mouseUp:
{phasedRegistrationNames:
{bubbled:j({onMouseUp:true}),
captured:j({onMouseUpCapture:true})}},


doubleClick:
{phasedRegistrationNames:
{bubbled:j({onDoubleClick:true}),
captured:j({onDoubleClickCapture:true})}},


click:
{phasedRegistrationNames:
{bubbled:j({onClick:true}),
captured:j({onClickCapture:true})}},


mouseWheel:
{phasedRegistrationNames:
{bubbled:j({onMouseWheel:true}),
captured:j({onMouseWheelCapture:true})}},


touchStart:
{phasedRegistrationNames:
{bubbled:j({onTouchStart:true}),
captured:j({onTouchStartCapture:true})}},


touchEnd:
{phasedRegistrationNames:
{bubbled:j({onTouchEnd:true}),
captured:j({onTouchEndCapture:true})}},


touchCancel:
{phasedRegistrationNames:
{bubbled:j({onTouchCancel:true}),
captured:j({onTouchCancelCapture:true})}},


touchMove:
{phasedRegistrationNames:
{bubbled:j({onTouchMove:true}),
captured:j({onTouchMoveCapture:true})}},


keyUp:
{phasedRegistrationNames:
{bubbled:j({onKeyUp:true}),
captured:j({onKeyUpCapture:true})}},


keyPress:
{phasedRegistrationNames:
{bubbled:j({onKeyPress:true}),
captured:j({onKeyPressCapture:true})}},


keyDown:
{phasedRegistrationNames:
{bubbled:j({onKeyDown:true}),
captured:j({onKeyDownCapture:true})}},


focus:
{phasedRegistrationNames:
{bubbled:j({onFocus:true}),
captured:j({onFocusCapture:true})}},


blur:
{phasedRegistrationNames:
{bubbled:j({onBlur:true}),
captured:j({onBlurCapture:true})}},


scroll:
{phasedRegistrationNames:
{bubbled:j({onScroll:true}),
captured:j({onScrollCapture:true})}},


change:
{phasedRegistrationNames:
{bubbled:j({onChange:true}),
captured:j({onChangeCapture:true})}}},







extractAbstractEvents:
function(m,n,o,p){
var q,
r=
l.topLevelTypesToAbstract[m];
if(!r)
return null;

switch(m){
case k.topMouseWheel:
q=g.normalizeMouseWheelData(n);
break;
case k.topScroll:
q=g.normalizeScrollDataFromTarget(p);
break;
case k.topClick:
case k.topDoubleClick:
case k.topChange:
case k.topMouseDown:
case k.topMouseUp:
case k.topTouchMove:
case k.topTouchStart:
case k.topTouchEnd:
q=g.normalizePointerData(n);
break;

default:q=null;
}
var s=g.pooled
(r,
o,
m,
n,
q);

i.accumulateTwoPhaseDispatches(s);
return s;}};



l.topLevelTypesToAbstract=
{topMouseDown:l.abstractEventTypes.mouseDown,
topMouseUp:l.abstractEventTypes.mouseUp,
topClick:l.abstractEventTypes.click,
topDoubleClick:l.abstractEventTypes.doubleClick,
topMouseWheel:l.abstractEventTypes.mouseWheel,
topTouchStart:l.abstractEventTypes.touchStart,
topTouchEnd:l.abstractEventTypes.touchEnd,
topTouchMove:l.abstractEventTypes.touchMove,
topTouchCancel:l.abstractEventTypes.touchCancel,
topKeyUp:l.abstractEventTypes.keyUp,
topKeyPress:l.abstractEventTypes.keyPress,
topKeyDown:l.abstractEventTypes.keyDown,
topFocus:l.abstractEventTypes.focus,
topBlur:l.abstractEventTypes.blur,
topScroll:l.abstractEventTypes.scroll,
topChange:l.abstractEventTypes.change};


e.exports=l;});

/** js/react/core/ReactEvent.js */
__d("ReactEvent",["BrowserEnv","DOMEventUtils","EventConstants","EventPluginHub","ReactBrowserUtils","ReactDOMUtils","ReactInstanceHandles","EnterLeaveEventPlugin","SimpleEventPlugin"],function(a,b,c,d,e,f){



var g=b('BrowserEnv'),
h=b('DOMEventUtils'),
i=b('EventConstants'),
j=b('EventPluginHub'),
k=b('ReactBrowserUtils'),
l=b('ReactDOMUtils'),
m=b('ReactInstanceHandles'),


n=b('EnterLeaveEventPlugin'),
o=b('SimpleEventPlugin'),

p=j.registrationNames,

q=l.getDOMNodeID,
r=i.topLevelTypes,
s=h.listenOn,
t=h.captureOn;




j.injectEventPlugin(o);
j.injectEventPlugin(n);




j.injectInstanceHandleModule(m);
















































































var u={},







v=true;
















function w(ha){
return function(ia){
if(v){
var ja=
m.getFirstReactDOM(ia.target),
ka=q(ja);
ca
(ha,
ia,
ka,
ja);}};}










function x(ha,ia,ja){
s(ja,ia,w(ha));}





function y(ha,ia,ja){
t(ja,ia,w(ha));}








function z(){
s(window,'scroll',function(ha){
if(ha.target===window)
g.refreshAuthoritativeScrollValues();});}




function aa(){
s(window,'resize',function(ha){
if(ha.target===window)
g.refreshAuthoritativeScrollValues();});}























function ba(ha,ia){
z();
aa();

x(r.topMouseOver,'mouseover',ha);
x(r.topMouseDown,'mousedown',ha);
x(r.topMouseUp,'mouseup',ha);
x(r.topMouseOut,'mouseout',ha);
x(r.topClick,'click',ha);
x(r.topDoubleClick,'dblclick',ha);
x(r.topMouseWheel,'mousewheel',ha);
if(ia){
x(r.topTouchStart,'touchstart',ha);
x(r.topTouchEnd,'touchend',ha);
x(r.topTouchMove,'touchmove',ha);
x(r.topTouchCancel,'touchcancel',ha);}

x(r.topKeyUp,'keyup',ha);
x(r.topKeyPress,'keypress',ha);
x(r.topKeyDown,'keydown',ha);
x(r.topChange,'change',ha);






x(r.topMouseWheel,'DOMMouseScroll',ha);
x(r.topScroll,'scroll',ha);





if(k.supportsEvent('focusin')){
x(r.topFocus,'focusin',ha);
x(r.topBlur,'focusout',ha);}else
if(k.supportsEvent('focus',true)){
y(r.topFocus,'focus',ha);
y(r.topBlur,'blur',ha);}}












function ca
(ha,
ia,
ja,
ka){

var la=j.extractAbstractEvents
(ha,
ia,
ja,
ka);



j.enqueueAbstractEvents(la);
j.processAbstractEventQueue();}


function da(ha){
v=!!ha;}


function ea(){
return v;}








function fa(ha,ia){
if(!u[ha.id]){
ba(ha,ia);
u[ha.id]=true;}}



var ga=
{setEnabled:da,
isEnabled:ea,
ensureListening:fa,
registrationNames:p,
putListener:j.putListener,
getListener:j.getListener,
deleteAllListeners:j.deleteAllListeners};









e.exports=ga;});

/** js/react/core/ReactInputSelection.js */
__d("ReactInputSelection",[],function(a,b,c,d,e,f){









var g=

{hasSelectionCapabilities:function(h){
return h&&
((h.nodeName==='INPUT'&&h.type==='text'||
h.nodeName==='TEXTAREA'));},



getSelectionInformation:function(){
var h=document.activeElement;

return {focusedElem:h,
selectionRange:
g.hasSelectionCapabilities(h)?
g.getSelection(h):
null};},








restoreSelection:function(h){
var i=document.activeElement,
j=h.focusedElem,
k=h.selectionRange;
if(i!==j&&
document.getElementById(j.id)){
if(g.hasSelectionCapabilities(j))
g.setSelection
(j,
k);


j.focus();}},








getSelection:function(h){

if(!document.selection)

return {start:h.selectionStart,end:h.selectionEnd};


var i=document.selection.createRange();
if(i.parentElement()!==h)



return {start:0,end:0};


var j=h.value.length;

if(h.nodeName==='INPUT'){

return {start:-i.moveStart('character',-j),
end:-i.moveEnd('character',-j)};}else{


var k=i.duplicate();
k.moveToElementText(h);
k.setEndPoint('StartToEnd',i);
var l=j-k.text.length;
k.setEndPoint('StartToStart',i);

return {start:j-k.text.length,
end:l};}},










setSelection:function(h,i){
var j=i.start,
k=i.end;
if(typeof k==='undefined')
k=j;

if(document.selection){


if(h.tagName==='TEXTAREA'){
var l=
(h.value.slice(0,j).match(/\r/g)||[]).length,
m=
(h.value.slice(j,k).match(/\r/g)||[]).length;
j-=l;
k-=l+m;}

var n=h.createTextRange();
n.collapse(true);
n.moveStart('character',j);
n.moveEnd('character',k-j);
n.select();}else{

h.selectionStart=j;
h.selectionEnd=Math.min(k,h.value.length);
h.focus();}}};





e.exports=g;});

/** js/react/core/ReactOnDOMReady.js */
__d("ReactOnDOMReady",["ReactErrors"],function(a,b,c,d,e,f){


var g=b('ReactErrors'),




























h=null,

i=




{enqueue:function(j,k){
g.throwIf(!h,g.ON_DOM_READY_MISMATCH);
h.push({instance:j,callback:k});},









beginEnqueueing:function(){
g.throwIf(h,g.ON_DOM_READY_MISMATCH);
h=[];},





notifyAll:function(){
var j=h,
k=j.length;
g.throwIf(!j,g.ON_DOM_READY_MISMATCH);
h=null;
for(var l=0;l<k;l=l+1){
var m=j[l].instance,
n=j[l].callback;
n.call(m,m.getDOMNode());}

j.length=0;}};



e.exports=i;});

/** js/react/core/ReactDOMTransaction.js */
__d("ReactDOMTransaction",["ReactErrors","ReactEvent","ReactInputSelection","ReactOnDOMReady"],function(a,b,c,d,e,f){




var g=b('ReactErrors'),
h=b('ReactEvent'),
i=b('ReactInputSelection'),
j=b('ReactOnDOMReady'),

k=null,




















l=


{totalOnDomReadyTime:0,







perform:function(m,n){
l.initialize();

try{m.call(n);}catch(
o){
throw o;}finally{





l.close();}},









initialize:function(){
g.throwIf(k,g.DUAL_TRANSACTION);
h.setEnabled(false);
j.beginEnqueueing();
k=
{selectionInformation:i.getSelectionInformation()};},









close:function(){
g.throwIf(!k,g.MISSING_TRANSACTION);
i.restoreSelection(k.selectionInformation);
h.setEnabled(true);
k=null;

var m=Date.now();
j.notifyAll();
l.totalOnDomReadyTime+=(Date.now()-m);}};



e.exports=l;});

/** js/react/core/ReactMount.js */
__d("ReactMount",["ReactErrors","ReactEvent","ReactInstanceHandles"],function(a,b,c,d,e,f){



var g=b('ReactErrors'),
h=b('ReactEvent'),
i=b('ReactInstanceHandles'),
j=0,































k=

{instanceByReactRootId:{},


containersByReactRootId:{},


totalInstantiationTime:0,


totalInjectionTime:0,

useTouchEvents:false,







scrollMonitor:function(l,m){
return m();},










prepareForRendering:function(l){
h.ensureListening
(l,
k.useTouchEvents);},










renderComponent:function(l,m){
g.throwIf(!m,g.NO_RENDER_NODE);
k.prepareForRendering(document.documentElement);
k.renderMarkupIntoNode(l,m);
return l;},









constructAndRenderComponent:function(l,m,n){
k.renderComponent(l(m),n);},









renderMarkupIntoNode:function(l,m){
var n=this.registerContainer(m);
k.instanceByReactRootId[n]=l;
l.genMarkupIntoContainer(n,m);},









registerContainer:function(l){
var m=l.firstChild&&l.firstChild.id,
n=(m&&
i.getReactRootIDFromNodeID(m))||
i.getReactRootID(j++);
k.containersByReactRootId[n]=l;
return n;},











destroyAndReleaseReactRootNode:function(l){
var m=k.getInstanceHeldByContainer(l),
n=l.firstChild&&l.firstChild.id;
m.destroy();
delete k.instanceByReactRootId[n];
delete k.containersByReactRootId[n];
l.innerHTML='';},


getInstanceHeldByContainer:function(l){
var m=
k.instanceByReactRootId[l.firstChild&&l.firstChild.id];
return m;},








findReactContainerForId:function(l){
return k.containersByReactRootId[
i.getReactRootIDFromNodeID(l)];},









renderOrUpdateComponent:function(l,m){
var n=k.getInstanceHeldByContainer(m);
if(n){
var o=
n.updateAllProps.bind(n,l.props);
k.scrollMonitor(m,o);
return n;}else 

return k.renderComponent(l,m);}};




e.exports=k;});

/** js/react/utils/mergeHelpers.js */
__d("mergeHelpers",["keyMirror","throwIf"],function(a,b,c,d,e,f){





var g=b('keyMirror'),
h=b('throwIf'),





i=36,

j=g
({MERGE_ARRAY_FAIL:null,
MERGE_CORE_FAILURE:null,
MERGE_TYPE_USAGE_FAILURE:null,
MERGE_DEEP_MAX_LEVELS:null,
MERGE_DEEP_NO_ARR_STRATEGY:null}),



































k=function(m){
return typeof m!=='object'||m===null;},


l=

{MAX_MERGE_DEPTH:i,

isTerminal:k,







normalizeMergeArg:function(m){
return m===undefined||m===null?{}:m;},










checkMergeArrayArgs:function(m,n){
h
(!Array.isArray(m)||!Array.isArray(n),
j.MERGE_CORE_FAILURE);},







checkMergeObjectArgs:function(m,n){
var o=
k(m)||
k(n)||
Array.isArray(m)||
Array.isArray(n);
h(o,j.MERGE_CORE_FAILURE);},









checkMergeLevel:function(m){
h(m>=i,j.MERGE_DEEP_MAX_LEVELS);},








checkArrayStrategy:function(m){
h
(m!==undefined&&!(m in l.ArrayStrategies),
j.MERGE_DEEP_NO_ARR_STRATEGY);},










ArrayStrategies:g
({Clobber:true,
IndexByIndex:true}),


ERRORS:j};


e.exports=l;});

/** js/react/utils/merge.js */
__d("merge",["mergeHelpers"],function(a,b,c,d,e,f){



var g=b('mergeHelpers'),

h=g.checkMergeObjectArgs,
i=g.normalizeMergeArg,








j=function(k,l){
var m=i(k),
n=i(l);
h(m,n);
var o={};
for(var p in m)
if(m.hasOwnProperty(p))
o[p]=m[p];


for(var q in n)
if(n.hasOwnProperty(q))
o[q]=n[q];


return o;};


e.exports=j;});

/** js/react/core/ReactComponent.js */
__d("ReactComponent",["ReactDOMTransaction","ReactErrors","ReactInstanceHandles","ReactMount","merge"],function(a,b,c,d,e,f){



var g=b('ReactDOMTransaction'),
h=b('ReactErrors'),
i=b('ReactInstanceHandles'),
j=b('ReactMount'),

k=b('merge'),



































































l=





{currentlyConstructingOwner:null,





isValidComponent:function(m){

return (m&&
typeof m.genMarkupIntoContainer==='function'&&
typeof m.updateAllProps==='function');},







validateReactComponentInstance:function(m){
h.throwIf
(!l.isValidComponent(m),
h.INVALID_COMPONENT);},







ReactComponentMixin:






{getDOMNode:function(){
var m=this.rootDomNode;
if(!m){
m=document.getElementById(this._rootDomId);
if(!m){





var n=j.findReactContainerForId(this._rootDomId);
m=
i.findComponentRoot(n,this._rootDomId);}}


return (this.rootDomNode=m);},











captureOwnerAtConstruction:function(){
var m=this.props;
if(m.ref)
m.owner=l.currentlyConstructingOwner;},







attachOwnersRefsOnRender:function(){
var m=this.props;
if(m.ref)
m.owner.attachRef(m.ref,this);},








detachOwnersRefs:function(){
var m=this.props;
if(m.ref&&m.owner.refs[m.ref]===this)
m.owner.detachRef(m.ref);},



destroyComponent:function(){
this.detachOwnersRefs();
this.isDestroyed=true;},






detachFromDom:function(){
var m=this.getDOMNode();
m.parentNode.removeChild(m);},


destroyAndDetachFromDom:function(){
this.destroy();
this.detachFromDom();},


initializeComponent:function(m){
this._rootDomId=m;
this.attachOwnersRefsOnRender();},








handleGenMarkup:function(){},







handleUpdateAllProps:function(){},





updateProps:function(m){
this.updateAllProps(k(this.props,m));},











updateAllProps:function(m){
if(m.isStatic)
return;

g.perform
(this.handleUpdateAllProps.bind(this,m));},
















genMarkupIntoContainer:function(m,n){
g.perform
(this.genMarkupIntoContainerImpl.bind(this,m,n));},



genMarkupIntoContainerImpl:function(m,n){
var o=Date.now(),
p=this.handleGenMarkup(m);
j.totalInstantiationTime+=(Date.now()-o);

var q=Date.now(),
r=n.nextSibling,
s=n.parentNode;
if(s){
s.removeChild(n);
n.innerHTML=p;
if(r){
s.insertBefore(n,r);}else 

s.appendChild(n);}else 


n.innerHTML=p;

j.totalInjectionTime+=(Date.now()-q);},








handleUpdateAllPropsComponent:function(m){
var n=this.props,
o=this.rootDomId;
h.throwIf(o,h.CONTROL_WITHOUT_BACKING_DOM);

if(m.owner===n.owner&&m.ref===n.ref)
return;

this.detachOwnersRefs();



if(m.ref)
m.owner.attachRef(m.ref,this);}}};





e.exports=l;});

/** js/react/utils/fallbackSerializePosInfo.js */
__d("fallbackSerializePosInfo",[],function(a,b,c,d,e,f){







var g=function(h){
if(!h)return '';
var i=';',j=h.w,k=h.h,l=h.l,
m=h.t,n=h.b,o=h.r,p=h.z;

if(j===0||j)
i+='width:'+(j.charAt?(j+';'):(j+'px;'));

if(k===0||k)
i+='height:'+(k.charAt?(k+';'):(k+'px;'));

if(l===0||l)
i+='left:'+(l.charAt?(l+';'):(l+'px;'));

if(m===0||m)
i+='top:'+(m.charAt?(m+';'):(m+'px;'));

if(n===0||n)
i+='bottom:'+(n.charAt?(n+';'):(n+'px;'));

if(o===0||o)
i+='right:'+(o.charAt?(o+';'):(o+'px;'));

if(p===0||p)
i+='z-index:'+p+';';

i+='position:absolute';
return i;};


e.exports=g;});

/** js/renderer/renderClassSet.js */
__d("renderer-renderClassSet",[],function(a,b,c,d,e,f){






















function g(h,i){
var j='',
k;
if(Array.isArray(h)){
for(var l=0;l<h.length;l++){
j+=g(h[l],i);
i=i||!!j;}}else 


for(k in h)
if(h[k]){
if(i)
j+=' ';

j+=k;
i=true;}



return j;}


e.exports=g;});

/** js/react/core/ReactDOMGeneration.js */
__d("ReactDOMGeneration",["ReactBrowserUtils","ReactDOMAttributes","ReactDOMUtils","ReactEvent","fallbackSerializePosInfo","keyOf","renderer-renderClassSet"],function(a,b,c,d,e,f){








var g=b('ReactBrowserUtils'),
h=b('ReactDOMAttributes'),
i=b('ReactDOMUtils'),
j=b('ReactEvent'),

k=b('fallbackSerializePosInfo'),
l=b('keyOf'),

m=j.registrationNames,
n=h.allTagAttrPieces,
o=h.customAttrRegexp,
p=g.escapeTextForBrowser,
q=k,
r=j.putListener,
s=b('renderer-renderClassSet'),
t=i.serializeInlineStyle,

u=l({classSet:null}),
v=l({className:null}),
w=l({style:null}),
x=l({posInfo:null}),








y=




















{handleGenMarkupDOMGeneration:function(){
var aa,
ba=this.props,
ca='',
da='',
ea=null,
fa=null;
for(aa in ba){
if(!ba.hasOwnProperty(aa))
continue;

var ga=ba[aa];
if(ga===null||typeof ga==='undefined')
continue;


if(aa===u){
ea=p(s(ga));}else
if(aa===v){
fa=p(ga);}else
if(n[aa]){
ca+=n[aa]+p(ga)+"'";}else
if(aa===w){
da+=p(t(ga));}else
if(aa===x){
da+=p(q(ga));}else
if(m[aa]){
r(this._rootDomId,aa,ga);}else
if(o.test(aa))
ca+=aa+"='"+p(ga)+"'";}



if(ea||fa){
var ha=ea?
(fa?ea+' '+fa:ea):
fa;
ca+=' class="'+ha+'"';}


if(da)
ca+=' style="'+da+'"';

ca+=' id="'+this._rootDomId+'">';
if(ba.content){
ca+=p(ba.content);}else
if(ba.dangerouslySetInnerHtml)
ca+=ba.dangerouslySetInnerHtml.__html;

return ca;}},










z=

{ReactNativeComponentGenerationMixin:y,






setAcceleratedPositioner:function(aa){
q=aa;}};



e.exports=z;});

/** js/react/core/ReactDOMMutation.js */
__d("ReactDOMMutation",["ReactDOMAttributes","ReactDOMUtils","ReactEvent","fallbackSerializePosInfo","keyOf","renderer-renderClassSet"],function(a,b,c,d,e,f){









var g=b('ReactDOMAttributes'),
h=b('ReactDOMUtils'),
i=b('ReactEvent'),

j=b('fallbackSerializePosInfo'),
k=b('keyOf'),

l=i.registrationNames,
m=
g.controlDirectlyNonIdempotent,
n=g.controlSimply,
o=g.controlUsingSetAttr,
p=g.customAttrRegexp,
q=i.putListener,
r=b('renderer-renderClassSet'),
s=h.serializeInlineStyle,
t=j,


u=k({className:null}),
v=k({classSet:null}),
w=g.CONTENT_ACCESSOR_KEY,
x=k({content:null}),
y=k({dangerouslySetInnerHtml:null}),
z=k({posInfo:null}),
aa=k({style:null}),






ba=function(ea){
t=ea;},










ca=













{handleUpdateAllPropsDOMMutation:function(ea){
var fa=this.props,
ga=false,
ha=null,
ia=null,
ja='',
ka='',
la='',
ma;

for(ma in ea){
if(!ea.hasOwnProperty(ma))continue;
var na=ea[ma];
if(ma===v){
ha=ea.classSet;
if(JSON.stringify(fa.classSet)!==
JSON.stringify(ea.classSet))
ga=true;}else

if(ma===u){
ia=ea.className;
if(fa.className!==ea.className)
ga=true;}else

if(ma===aa){
if(JSON.stringify(na)!==JSON.stringify(fa.style))
ka=s(na);}else

if(ma===z){
var oa=na,
pa=fa.posInfo||{};
if(oa&&(oa.l!==pa.l||oa.t!==pa.t||
oa.w!==pa.w||oa.h!==pa.h||
oa.r!==pa.r||oa.b!==pa.b))
la=t(na);}else

if(na!==fa[ma])
if(o[ma]){
this.getDOMNode().setAttribute(ma,na);}else
if(ma===x){
this.getDOMNode()[w]=na;}else
if(n[ma]){
this.getDOMNode()[ma]=na;}else
if(m[ma]){

var qa=this.getDOMNode();
if(qa[ma]!==na)
qa[ma]=na;}else

if(l[ma]){
q(this._rootDomId,ma,na);}else
if(ma===y){
var ra=fa[ma],
sa=na,
ta=
ra&&ra.__html,
ua=
sa&&sa.__html;
if(ta!==ua)




this.getDOMNode().innerHTML=
(ua||'').replace(/^ /g,'&nbsp;');}else

if(p.test(ma))
this.getDOMNode().setAttribute(ma,na);}




if(ga){
var va=ha?r(ha):null;
this.getDOMNode().className=va?
(ia?va+' '+ia:va):
ia;}





if(ka&&!la)
la=t(ea.posInfo);

if(la&&!ka)
ka=s(ea.style);

if(ka||la){
ja+=ka;
ja+=la;
this.getDOMNode().style.cssText=ja;}}},











da=
{setAcceleratedPositioner:ba,
ReactNativeComponentMutationMixin:ca};


e.exports=da;});

/** js/react/core/ReactMultiChild.js */
__d("ReactMultiChild",["ReactComponent","ReactDOMUtils"],function(a,b,c,d,e,f){



var g=b('ReactComponent'),
h=b('ReactDOMUtils'),

i=h.insertNodeAt;









function j(n,o){
return n&&o&&n.constructor===o.constructor;}


function k(n,o){
return n&&!o||
(n&&o&&n.constructor!==o.constructor);}
















var l=
{destroyMultiChild:function(){
var n=this.renderedChildren,
o;
for(o in n){
if(!n.hasOwnProperty(o))
continue;

if(n[o])
n[o].destroy();}


this.renderedChildren=null;},














handleGenMarkupMultiChild:function(n){
var o,
p='',
q=0;
for(o in n){
var r=n[o];
if(r){
r.domIndex=q;
p+=n[o].handleGenMarkup(this._rootDomId+'.'+o);
q++;}}


this.renderedChildren=n;
return p;},







insertMarkupAt:function(n,o){
return !n?0:
h.insertMarkupAt(this.getDOMNode(),n,o);},


enqueueMove:function(n,o,p){
if(o===p)
return n;

if(!n)
n={};

var q=this.getDOMNode();
n[p]=q.childNodes[o];
return n;},











handleUpdateAllPropsMultiChild:function(n){
if(!n&&!this.renderedChildren){
return;}else
if(n&&!this.renderedChildren){
this.renderedChildren={};}else
if(!n&&this.renderedChildren)
n={};

var o,
p=this._rootDomId+'.',
q='',
r=0,
s=0,
t=0,
u;
for(o in n){
if(!n.hasOwnProperty(o))
continue;

var v=this.renderedChildren[o],
w=n[o];
if(j(v,w)){
t+=this.insertMarkupAt(q,s);
q='';
var x=w.props.isStatic;
if(!x)
v.handleUpdateAllProps(w.props);

var y=v.domIndex+t;
u=this.enqueueMove(u,y,r);
v.domIndex=r;
r++;
s=r;}else{

if(v){
this.removeChildByName(o,v);
t--;}

if(w){
this.renderedChildren[o]=w;
q+=w.handleGenMarkup(p+o);
w.domIndex=r;
r++;}}}



t+=this.insertMarkupAt(q,s);
for(o in this.renderedChildren){
if(!this.renderedChildren.hasOwnProperty(o))
continue;

var z=this.renderedChildren[o];
if(k(z,n[o]))
this.removeChildByName(o,z);}


if(u){
var aa,
ba=this.getDOMNode();
for(aa in u){
if(!u.hasOwnProperty(aa))
continue;

i(ba,u[aa],aa);}}},




removeChildByName:function(n,o){
if(g.isValidComponent(o))
o.destroyAndDetachFromDom();

delete this.renderedChildren[n];}},



m=
{ReactMultiChildMixin:l};


e.exports=m;});

/** js/react/utils/mixInto.js */
__d("mixInto",[],function(a,b,c,d,e,f){






var g=function(h,i){
var j;
for(j in i){
if(!i.hasOwnProperty(j))
continue;

h.prototype[j]=i[j];}};



e.exports=g;});

/** js/react/core/ReactTextComponent.js */
__d("ReactTextComponent",["ReactBrowserUtils","ReactDOMAttributes","ReactComponent","mixInto"],function(a,b,c,d,e,f){



var g=b('ReactBrowserUtils'),
h=b('ReactDOMAttributes'),
i=b('ReactComponent'),

j=g.escapeTextForBrowser,
k=b('mixInto'),

l=h.CONTENT_ACCESSOR_KEY,








m=function(n){
this.props=n;};


k(m,i.ReactComponentMixin);







m.prototype.handleUpdateAllProps=function(n){

if(n!==this.props){
this.getDOMNode()[l]=n;
this.props=n;}};



m.prototype.destroy=function(){
};






m.prototype.handleGenMarkup=function(n){
this._rootDomId=n;

return ('<span id="'+n+'">'+
j(this.props)+
'</span>');};




e.exports=m;});

/** js/react/utils/flattenChildren.js */
__d("flattenChildren",["ReactTextComponent"],function(a,b,c,d,e,f){



var g=b('ReactTextComponent'),








h='0',

i=function(k,l,m){
var n,
o;
if(Array.isArray(l)){
for(n=0;n<l.length;n++)
i(k,l[n],m+'['+n+']');}else{


var p=m==='',
q=p?h:m;
if(!l&&l!==0){
k[q]=null;}else
if(l.genMarkupIntoContainer){

k[q]=l;}else{

var r=typeof l;
if(r==='string'||r==='number'){


k[q]=new g(l);}else
if(r==='object')
for(o in l)
if(l.hasOwnProperty(o))
i
(k,
l[o],
m+'{'+o+'}');}}};












function j(k){
if(k===null||k===undefined)
return k;

var l={};
i(l,k,'');
return l;}


e.exports=j;});

/** js/react/core/ReactDOM.js */
__d("ReactDOM",["ReactComponent","ReactDOMGeneration","ReactDOMMutation","ReactErrors","ReactEvent","ReactMultiChild","flattenChildren","mixInto","objMapKeyVal","throwIf"],function(a,b,c,d,e,f){








var g=b('ReactComponent'),
h=b('ReactDOMGeneration'),
i=b('ReactDOMMutation'),
j=b('ReactErrors'),
k=b('ReactEvent'),
l=b('ReactMultiChild'),

m=
h.ReactNativeComponentGenerationMixin,
n=
i.ReactNativeComponentMutationMixin,

o=b('flattenChildren'),
p=b('mixInto'),
q=b('objMapKeyVal'),
r=b('throwIf');
































function s(u,v){
var w='<'+u+' ',
x=v?'':'</'+u+'>',








y=function(ba){
this.props=ba;
this.captureOwnerAtConstruction();},





z=




{handleUpdateAllProps:function(ba){
j.throwIf
(!this._rootDomId,
j.CONTROL_WITHOUT_BACKING_DOM);

this.handleUpdateAllPropsComponent(ba);
this.handleUpdateAllPropsDOMMutation(ba);
this.handleUpdateAllPropsMultiChild(o(ba.children));
this.props=ba;},








handleGenMarkup:function(ba){

this.initializeComponent(ba);
var ca=
w+
this.handleGenMarkupDOMGeneration()+
this.handleGenMarkupMultiChild(o(this.props.children))+
x;

return ca;},






destroy:function(){
this.destroyComponent();
this.destroyMultiChild();
k.deleteAllListeners(this._rootDomId);}};



p(y,g.ReactComponentMixin);
p(y,z);
p(y,m);
p(y,n);
p(y,l.ReactMultiChildMixin);


y.prototype.tagName=u.toUpperCase();






var aa=function(ba){
return new y(ba);};


return aa;}









var t=q
({a:false,
abbr:false,
address:false,
audio:false,
b:false,
br:true,
button:false,
code:false,
col:true,
colgroup:false,
dd:false,
div:false,
section:false,
dl:false,
dt:false,
em:false,
embed:true,
fieldset:false,
form:false,
g:false,
h1:false,
h2:false,
h3:false,
h4:false,
h5:false,
h6:false,
hr:true,
i:false,
iframe:false,
img:true,
input:false,
label:false,
legend:false,
li:false,
line:false,
object:false,
ol:false,
optgroup:false,
option:false,
p:false,
param:true,
pre:false,
select:false,
small:false,
span:false,
strong:false,
svg:false,
table:false,
tbody:false,
td:false,
textarea:false,
tfoot:false,
th:false,
thead:false,
time:false,
title:false,
tr:false,
ul:false,
video:false,
wbr:false},
s);



















e.exports=t;});

/** js/react/core/ReactOwner.js */
__d("ReactOwner",[],function(a,b,c,d,e,f){




































var g=





{attachRef:function(h,i){
var j=this.refs||(this.refs={});
j[h]=i;},






detachRef:function(h){
delete this.refs[h];}};



e.exports=g;});

/** js/react/utils/mergeDeepInto.js */
__d("mergeDeepInto",["keyMirror","mergeHelpers","throwIf"],function(a,b,c,d,e,f){



var g=b('keyMirror'),
h=b('mergeHelpers'),
i=b('throwIf'),

j=h.ArrayStrategies,
k=h.checkArrayStrategy,
l=h.checkMergeArrayArgs,
m=h.checkMergeLevel,
n=h.checkMergeObjectArgs,
o=h.isTerminal,
p=h.normalizeMergeArg,

q=g
({RUN_TIME_ARRAY_MERGE_FAIL:null}),

























































r=function(v,w,x,y){
n(v,w);
m(y);
var z=w?Object.keys(w):[];
for(var aa=0;aa<z.length;aa++){
var ba=z[aa];
t(v,w,ba,x,y);}},











s=function(v,w,x,y){
l(v,w);
m(y);

var z=Math.max(v.length,w.length);
for(var aa=0;aa<z;aa++)
t(v,w,aa,x,y);},













t=function(v,w,x,y,z){
var aa=w[x],
ba=w.hasOwnProperty(x),
ca=ba&&o(aa),
da=ba&&Array.isArray(aa),
ea=
ba&&!da&&!da,

fa=v[x],
ga=v.hasOwnProperty(x),
ha=ga&&o(fa),
ia=ga&&Array.isArray(fa),
ja=
ga&&!ia&&!ia;

if(ha){
if(ca){
v[x]=aa;}else
if(da){
v[x]=[];
s(v[x],aa,y,z+1);}else
if(ea){
v[x]={};
r(v[x],aa,y,z+1);}else
if(!ba)
v[x]=fa;}else

if(ia){
if(ca){
v[x]=aa;}else
if(da){
i
(!j[y],
h.ERRORS.RUN_TIME_ARRAY_MERGE_FAIL);


if(y===j.Clobber)
fa.length=0;

s(fa,aa,y,z+1);}else
if(ea){
v[x]={};
r(v[x],aa,y,z+1);}else 
!ba;}else


if(ja){
if(ca){
v[x]=aa;}else
if(da){
v[x]=[];
s(v[x],aa,y,z+1);}else
if(ea){
r(fa,aa,y,z+1);}else 
!ba;}else


if(!ga)
if(ca){
v[x]=aa;}else
if(da){
v[x]=[];
s(v[x],aa,y,z+1);}else
if(ea){
v[x]={};
r(v[x],aa,y,z+1);}else 
!ba;},



































u=function(v,w,x){
var y=p(w);
k(x);
r(v,y,x,0);};


e.exports=u;});

/** js/react/utils/mergeInto.js */
__d("mergeInto",["mergeHelpers"],function(a,b,c,d,e,f){



var g=b('mergeHelpers'),

h=g.checkMergeObjectArgs,
i=g.normalizeMergeArg,







j=function(k,l){
var m=i(l),
n;
h(k,m);
for(n in m){
if(!m.hasOwnProperty(n))
continue;

k[n]=m[n];}};



e.exports=j;});

/** js/react/core/ReactCompositeComponent.js */
__d("ReactCompositeComponent",["ReactComponent","ReactDOMTransaction","ReactDOMUtils","ReactErrors","ReactOnDOMReady","ReactOwner","keyOf","mergeDeepInto","mergeHelpers","mergeInto","mixInto"],function(a,b,c,d,e,f){



var g=b('ReactComponent'),
h=b('ReactDOMTransaction'),
i=b('ReactDOMUtils'),
j=b('ReactErrors'),
k=b('ReactOnDOMReady'),
l=b('ReactOwner'),

m=b('keyOf'),
n=b('mergeDeepInto'),
o=b('mergeHelpers'),
p=b('mergeInto'),
q=b('mixInto'),

r=i.insertMarkupAt,
s=o.isTerminal,
t=Array.prototype.slice,






























































u=







{render:function(){

},








handleUpdateAllProps:function(w){
this.handleUpdateAllPropsComponent(w);
if(this.propTrigger){
var x=this.propTrigger(w);
if(x)
p(this.state,x);}


if(this.needsRedraw&&!this.needsRedraw(w))
return;

this.props=w;
this.handleReconcile();},









initializeCompositeComponent:function(w){
if(this.getInitialState)
this.state=this.getInitialState();




this.onDomReady&&k.enqueue(this,this.onDomReady);},










handleGenMarkup:function(w){
this.initializeComponent(w);
this.initializeCompositeComponent(w);
g.currentlyConstructingOwner=this;
var x=this.getAllRenderResults(),
y=this.handleGenMarkupResults(x);
g.currentlyConstructingOwner=null;
g.validateReactComponentInstance(y);
this.renderedChild=y;
return y.handleGenMarkup(w);},


getAllRenderResults:function(){
return this.render();},


handleGenMarkupResults:function(w){
return w;},






destroy:function(){
this.destroyComponent();

if(this.destructor)
this.destructor();

this.renderedChild.destroy();
this.renderedChild=null;
if(this.refs)
this.refs=null;},














justUpdateState:function(w){
h.perform(function(){
p(this.state,w);},
this);},






justUpdateStateDeep:function(w){
h.perform(function(){
n(this.state,w);},
this);},











updateState:function(w){
h.perform(function(){
p(this.state,w);
this.handleReconcile();},
this);
return true;},





updateStateDeep:function(w){
h.perform(function(){
n(this.state,w);
this.handleReconcile();},
this);
return true;},









createStateUpdater:function(w){
var x=this;
if(!w)
return w;

return function(){
x.updateState(w);};},












stateUpdater:function(w){
var x=this;
if(!w)
return w;

return (typeof w==='function')?
function(){x.updateState(w.apply(x,arguments));}:
function(){x.updateState(w);};},




















stateValueForwarder:function(w){
var x=this;
return function(y){
var z=m(w),
aa={};
if(z){
aa[z]=y;
x.updateState(aa);}};},










stateUpdaterCurry:function(w){
var x=this,
y=t.call(arguments,1);
return function(){
x.updateState(w.apply(x,y.concat(t.call(arguments))));};},










reconcile:function(){
h.perform(this.handleReconcile,this);},










handleReconcile:function(){
g.currentlyConstructingOwner=this;
var w=this.getAllRenderResults();
g.currentlyConstructingOwner=null;
var x=this.reconcileResults(w);
g.validateReactComponentInstance(x);
if(!x.props.isStatic){
var y=this.renderedChild;
if(y.constructor===x.constructor){
y.handleUpdateAllProps(x.props);}else{

var z=x.handleGenMarkup(this._rootDomId),
aa=y.getDOMNode(),
ba=aa.parentNode;
y.destroyAndDetachFromDom();
r(ba,z,0);
this.renderedChild=x;}}},




reconcileResults:function(w){
return w;}},









v=








{createComponentConstructor:function(w){
var x=w.mixins,
y=function(aa){
this.props=aa||{};
this.captureOwnerAtConstruction();};

q(y,g.ReactComponentMixin);
q(y,u);
q(y,l);

if(x){
var z;
for(z=0;z<x.length;z++)
q(y,x[z]);}


q(y,w);
j.throwIf(!y.prototype.render,j.CLASS_SPEC);
return y;},















createComponent:function(w){
var x=v.createComponentConstructor(w),
y=function(z){
return new x(z);};

y.componentConstructor=x;
y.originalSpec=w;
return y;},


ReactCompositeComponentMixin:u};




e.exports=v;});

/** js/react/core/React.js */
__d("React",["ReactCompositeComponent","ReactMount"],function(a,b,c,d,e,f){



var g=b('ReactCompositeComponent'),
h=b('ReactMount'),

i=
{initializeTouchEvents:function(j){
h.useTouchEvents=j;},

createComponent:g.createComponent,
constructAndRenderComponent:h.constructAndRenderComponent,
renderComponent:h.renderComponent,
renderOrUpdateComponent:h.renderOrUpdateComponent,
destroyAndReleaseReactRootNode:h.destroyAndReleaseReactRootNode};


e.exports=i;});

/** js/components/NumberFormat/NumberFormat.js */
__d("NumberFormat",["Env"],function(a,b,c,d,e,f){



var g=b('Env'),

h=/(\d{3})(?=\d)/g,
i=10000,

j=function(l){
return (''+l).split('').reverse().join('');},


k=
{formatIntegerWithDelimiter:function(l,m){


if((g.locale=='nb_NO'||g.locale=='nn_NO')&&
(Math.abs(l)<i))
return l.toString();



var n=j(l);


return j
(n.replace(h,'$1'+m));}};




e.exports=k;});

/** js/clientufi/models/UFIConstants.js */
__d("UFIConstants",[],function(a,b,c,d,e,f){




var g=
{COMMENT_LIKE:'fa-type:comment-like',
COMMENT_SET_SPAM:'fa-type:mark-spam',
DELETE_COMMENT:'fa-type:delete-comment',
LIVE_DELETE_COMMENT:'fa-type:live-delete-comment',
LIKE_ACTION:'fa-type:like',
REMOVE_PREVIEW:'fa-type:remove-preview',
CONFIRM_COMMENT_REMOVAL:'fa-type:confirm-remove',
TRANSLATE_COMMENT:'fa-type:translate-comment',


UNDO_DELETE_COMMENT:'fa-type:undo-delete-comment'},



h=
{DELETED:'status:deleted',
SPAM:'status:spam',
SPAM_DISPLAY:'status:spam-display',


LIVE_DELETED:'status:live-deleted',
FAILED_ADD:'status:failed-add',
FAILED_EDIT:'status:failed-edit',
PENDING_EDIT:'status:pending-edit',
PENDING_UNDO_DELETE:'status:pending-undo-delete'},



i=
{MOBILE:1,
SMS:3,
EMAIL:4},



j=
{PROFILE:0,
NEWS_FEED:1,
OBJECT:2,
MOBILE:3,
EMAIL:4,
PROFILE_APROVAL:10,
TICKER:12,
NONE:13,
INTERN:14,
ADS:15},



k=
{UNKNOWN:0,
INITIAL_SERVER:1,
LIVE_SEND:2,
USER_ACTION:3,

ENDPOINT_LIKE:10,
ENDPOINT_COMMENT_LIKE:11,
ENDPOINT_ADD_COMMENT:12,
ENDPOINT_EDIT_COMMENT:13,
ENDPOINT_DELETE_COMMENT:14,
ENDPOINT_UNDO_DELETE_COMMENT:15,
ENDPOINT_COMMENT_SPAM:16,
ENDPOINT_REMOVE_PREVIEW:17,
ENDPOINT_ID_COMMENT_FETCH:18,
ENDPOINT_COMMENT_FETCH:19,
ENDPOINT_TRANSLATE_COMMENT:20,
ENDPOINT_BAN:21},



l=50,

m=.6,
n=420,
o=5,



p=80;

e.exports=
{UFIActionType:g,
UFIStatus:h,
UFISourceType:i,
UFIFeedbackSourceType:j,
UFIPayloadSourceType:k,
defaultPageSize:l,
commentTruncationLength:n,
commentTruncationPercent:m,
commentTruncationMaxLines:o,
attachmentTruncationLength:p};});

/** js/components/UFI/UFIBlingBox.js */
__d("UFIBlingBox",["ReactDOM","NumberFormat","React","UFIConstants","copyProperties","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('NumberFormat'),
i=b('React'),
j=b('UFIConstants'),

k=b('copyProperties'),
l=b('tx'),

m=i.createComponent
({render:function(){
var o=[],
p='';

if(this.props.likes){
o.push
(n
({count:this.props.likes,
classSet:{mls:o.length>0},
iconClassName:"UFIBlingBoxLikeIcon",
contextArgs:this.props.contextArgs}));



p+=(this.props.likes==1)?
"1 like":
l._("{count} likes",{count:this.props.likes});

p+=' ';}


if(this.props.comments){
o.push
(n
({count:this.props.comments,
classSet:{mls:o.length>0},
iconClassName:"UFIBlingBoxCommentIcon",
contextArgs:this.props.contextArgs}));



p+=(this.props.comments==1)?
"1 comment":
l._("{count} comments",{count:this.props.comments});

p+=' ';}


if(this.props.reshares){
o.push
(n
({count:this.props.reshares,
classSet:{mls:o.length>0},
iconClassName:"UFIBlingBoxReshareIcon",
contextArgs:this.props.contextArgs}));



p+=(this.props.reshares==1)?
"1 share":
l._("{count} shares",{count:this.props.reshares});}


var q=
g.a
({classSet:{UFIBlingBox:true,uiBlingBox:true,feedbackBling:true},
href:this.props.permalink,
'data-ft':this.props['data-ft'],
'aria-label':p,children:
o});




if(this.props.comments<j.defaultPageSize){
q.props.onClick=this.props.onClick;


q.props.rel='ignore';}


return q;}}),



n=i.createComponent
({render:function(){
var o=
{UFIBlingBoxSprite:true};


o[this.props.iconClassName]=true;

k(o,this.props.classSet);

var p=h.formatIntegerWithDelimiter
(this.props.count,
this.props.contextArgs.numberdelimiter||',');



return (g.span({children:
[g.i({classSet:o}),
g.span({classSet:{UFIBlingBoxText:true},children:
p})]}));}});






e.exports=m;});

/** js/clientufi/models/UFICentralUpdates.js */
__d("UFICentralUpdates",["Arbiter","ChannelConstants","LiveTimer","ShortProfiles","UFIConstants","copyProperties","tx"],function(a,b,c,d,e,f){



var g=b('Arbiter'),
h=b('ChannelConstants'),
i=b('LiveTimer'),
j=b('ShortProfiles'),
k=b('UFIConstants'),

l=b('copyProperties'),
m=b('tx'),

n=0,
o={},
p={},
q={},
r={},
s=[];

g.subscribe
(h.getArbiterType('live-data'),
function(x,y){
if(y&&y.obj){
var z=y.obj,




aa=z.comments||[];
aa.forEach(function(ba){
ba.timestamp.text="a few seconds ago";});


w.handleUpdate
(k.UFIPayloadSourceType.LIVE_SEND,
z);}});





function t(){
if(!n){
var x=q,
y=o,
z=p,
aa=r;

q={};
o={};
p={};
r={};

if(Object.keys(x).length)
v('feedback-id-changed',x);


if(Object.keys(y).length)
v('feedback-updated',y);


if(Object.keys(z).length)
v('comments-updated',z);


if(Object.keys(aa).length)
v('instance-updated',aa);


s.pop();}}



function u(){
if(s.length){
return s[s.length-1];}else 



return k.UFIPayloadSourceType.UNKNOWN;}



function v(event,x){
w.inform(event,
{updates:x,
payloadSource:u()});}
































var w=l(new g(),
{handleUpdate:function(x,y){
if(Object.keys(y).length)
this.synchronizeInforms(function(){
s.push(x);

var z=l
({payloadsource:u()},
y);


this.inform('update-feedback',z);
this.inform('update-comment-lists',z);
this.inform('update-comments',z);
this.inform('update-actions',z);


(y.profiles||[]).forEach(function(aa){
j.set(aa.id,aa);});



if(y.servertime)
i.restart(y.servertime);}.

bind(this));},



didUpdateFeedback:function(x){
o[x]=true;
t();},


didUpdateComment:function(x){
p[x]=true;
t();},


didUpdateFeedbackID:function(x,y){
q[x]=y;
t();},


didUpdateInstanceState:function(x,y){
if(!r[x])
r[x]={};


r[x][y]=true;

t();},


synchronizeInforms:function(x){
n++;

try{x();}catch(
y){

throw y;}finally{

n--;
t();}}});




e.exports=w;});

/** js/react/utils/ImmutableObject.js */
__d("ImmutableObject",["keyMirror","merge","mergeInto","mergeHelpers","throwIf"],function(a,b,c,d,e,f){



var g=b('keyMirror'),
h=b('merge'),
i=b('mergeInto'),
j=b('mergeHelpers'),
k=b('throwIf'),

l=j.checkMergeObjectArgs,
m=j.isTerminal,

















n,
o;
































































n=g({INVALID_MAP_SET_ARG:null});

o=function(q){
i(this,q);};


o.set=function(q,r){
k
(!(q instanceof o),
n.INVALID_MAP_SET_ARG);

var s=new o(q);
i(s,r);
return s;};







o.setField=function(q,r,s){
var t={};
t[r]=s;
return o.set(q,t);};







o.setDeep=function(q,r){
k
(!(q instanceof o),
n.INVALID_MAP_SET_ARG);

return p(q,r);};


function p(q,r){
l(q,r);
var s={},


t=Object.keys(q);
for(var u=0;u<t.length;u++){
var v=t[u];
if(!r.hasOwnProperty(v)){
s[v]=q[v];}else
if(m(q[v])||m(r[v])){
s[v]=r[v];}else 

s[v]=p(q[v],r[v]);}




var w=Object.keys(r);
for(u=0;u<w.length;u++){
var x=w[u];
if(q.hasOwnProperty(x))
continue;

s[x]=r[x];}


return (q instanceof o||r instanceof o)?
new o(s):
s;}


e.exports=o;});

/** js/mercury/models/MercuryServerDispatcher.js */
__d("MercuryServerDispatcher",["AsyncRequest","FBAjaxRequest","Env","JSLogger","Run","areObjectsEqual","copyProperties","debounceAcrossTransitions"],function(a,b,c,d,e,f){


var g=b('AsyncRequest'),
h=b('FBAjaxRequest'),
i=b('Env'),
j=b('JSLogger'),
k=b('Run'),

l=b('areObjectsEqual'),
m=b('copyProperties'),
n=b('debounceAcrossTransitions'),

o={},

p=j.create('mercury_dispatcher'),

q=false,

r=
{IMMEDIATE:'immediate',
IDEMPOTENT:'idempotent',
BATCH_SUCCESSIVE:'batch-successive',
BATCH_SUCCESSIVE_UNIQUE:'batch-successive-unique',
BATCH_SUCCESSIVE_PIGGYBACK_ON_ERROR:'batch-successive-piggyback-retry',
BATCH_DEFERRED_MULTI:'batch-deferred-multi',
BATCH_CONDITIONAL:'batch-conditional',

registerEndpoints:function(v){
for(var w in v){
var x=v[w];
o[w]=new s(w,x);}},



trySend:function(v,w,x){
o[v].trySend(w,x);}};



function s(v,w){
var x=w.mode||r.IMMEDIATE;

switch(x){
case r.IMMEDIATE:
case r.IDEMPOTENT:
case r.BATCH_SUCCESSIVE:
case r.BATCH_SUCCESSIVE_UNIQUE:
case r.BATCH_SUCCESSIVE_PIGGYBACK_ON_ERROR:
case r.BATCH_DEFERRED_MULTI:
case r.BATCH_CONDITIONAL:
break;

default:throw new Error('Invalid MercuryServerDispatcher mode '+x);
}

this._endpoint=v;
this._mode=x;

this._combineData=w.batch_function;
this._combineDataIf=w.batch_if;
this._batchSizeLimit=w.batch_size_limit;
this._batches=[];

this._handler=w.handler;

this._errorHandler=w.error_handler;
this._transportErrorHandler=
w.transport_error_handler||w.error_handler;
this._connectionRetries=w.connection_retries||0;
this._timeoutHandler=w.timeout_handler;
this._timeout=w.timeout;
this._serverDialogCancelHandler=
w.server_dialog_cancel_handler||w.error_handler;

this._deferredSend=n(this._batchSend,0,this);

if(this._batchSizeLimit)
k.onUnload(function(){
p.bump
('unload_batches_count_'+u(this._batches.length));}.

bind(this));}



m(s.prototype,
{_inFlight:0,
_handler:null,
_errorHandler:null,
_transportErrorHandler:null,
_timeoutHandler:null,
_timeout:null,
_serverDialogCancelHandler:null,
_combineData:null,













trySend:function(v,w){
if(q)
return;


if(typeof v=='undefined')
v=null;


var x=w||this._mode;
if(x==r.IMMEDIATE){
this._send(v);}else
if(x==r.IDEMPOTENT){
if(!this._inFlight)
this._send(v);}else

if(x==r.BATCH_SUCCESSIVE||
x==r.BATCH_SUCCESSIVE_UNIQUE){
if(!this._inFlight){
this._send(v);}else 

this._batchData(v);}else

if(x==r.BATCH_CONDITIONAL){





var y=this._batches[0]&&this._batches[0].getData();
if(this._inFlight&&
(this._combineDataIf(this._pendingRequestData,v)||
this._combineDataIf(y,v))){
this._batchData(v);}else 

this._send(v);}else

if(x==r.BATCH_DEFERRED_MULTI){
this._batchData(v);
this._deferredSend();}else
if(x==r.BATCH_SUCCESSIVE_PIGGYBACK_ON_ERROR){


this._batchData(v);
if(!this._inFlight)
this._batchSend();}},




_send:function(v){
this._inFlight++;
this._pendingRequestData=m({},v);

p.log('send',{endpoint:this._endpoint,
data:v,
inflight_count:this._inFlight});

var w=null;
if(i.worker_context){


w=new h('POST',this._endpoint,v);
w.onError=function(x){
x.getPayload=function(){
return x.errorText;};

x.getRequest=function(){
var y=x;
x.getData=function(){
return v;};

return y;};

x.getError=function(){
return x.errorText;};

x.getErrorDescription=function(){
return x.errorText;};

x.isTransient=function(){
return false;};


this._handleError(x);}.
bind(this);

w.onJSON=function(x){
x.getPayload=function(){
return x.json;};

this._handleResponse(x);}.
bind(this);
w.send();}else{

w=new g(this._endpoint).
setData(v).
setOption('retries',this._connectionRetries).
setHandler(this._handleResponse.bind(this)).
setErrorHandler(this._handleError.bind(this)).
setTransportErrorHandler(this._handleTransportError.bind(this)).
setServerDialogCancelHandler(this._handleServerDialogCancel.bind(this)).
setAllowCrossPageTransition(true);

if(this._timeout&&this._timeoutHandler)
w.setTimeoutHandler
(this._timeout,
this._handleTimeout.bind(this));


w.send();}},



_batchData:function(v,w){
if(this._mode==r.BATCH_SUCCESSIVE_UNIQUE&&
typeof this._pendingRequestData!='undefined'&&
l(v,this._pendingRequestData)){



return;}else{

var x=this._batches.length-1;
if(x>=0&&
!this._hasReachedBatchLimit(this._batches[x])){

w?
this._batches[x].combineWithOlder(v,this._combineData):
this._batches[x].combineWith(v,this._combineData);}else{



this._batches.push(new t(v));

p.bump
('batches_count_'+u(this._batches.length));}



p.debug('batch',
{endpoint:this._endpoint,
batches:this._batches,
batch_limit:this._batchSizeLimit});}},




_hasReachedBatchLimit:function(v){
return this._batchSizeLimit&&
v.getSize()>=this._batchSizeLimit;},


_batchSend:function(){
if(this._batches[0]){
this._send(this._batches[0].getData());
this._batches.shift();}},



_handleResponse:function(v){
this._inFlight--;
p.log('response',{endpoint:this._endpoint,
inflight_count:this._inFlight});

var w=v.getPayload();
q=w&&w.kill_chat;
if(q)
p.log('killswitch_enabled',
{endpoint:this._endpoint,inflight_count:this._inFlight});


if(w&&w.error_payload){
if(this._errorHandler)
this._errorHandler(v);}else 






this._handler&&this._handler(w);


if(this._mode==r.BATCH_SUCCESSIVE||
this._mode==r.BATCH_SUCCESSIVE_UNIQUE||
this._mode==r.BATCH_SUCCESSIVE_PIGGYBACK_ON_ERROR||
this._mode==r.BATCH_CONDITIONAL)
this._batchSend();


delete this._pendingRequestData;},


_postErrorHandler:function(){
p.error('error',{endpoint:this._endpoint,
inflight_count:this._inFlight-1});
this._inFlight--;

var v=this._mode;
if(v==r.BATCH_SUCCESSIVE||
v==r.BATCH_SUCCESSIVE_UNIQUE||
v==r.BATCH_CONDITIONAL){
this._batchSend();}else
if(v==r.BATCH_SUCCESSIVE_PIGGYBACK_ON_ERROR)



if(this._batches[0]){
this._batchData(this._pendingRequestData,true);
this._batchSend();}else 

this._batchData(this._pendingRequestData,true);



delete this._pendingRequestData;},


_handleError:function(v){
this._errorHandler&&this._errorHandler(v);
this._postErrorHandler();},


_handleTransportError:function(v){
this._transportErrorHandler&&this._transportErrorHandler(v);
this._postErrorHandler();},


_handleTimeout:function(v){
this._timeoutHandler&&this._timeoutHandler(v);
this._postErrorHandler();},


_handleServerDialogCancel:function(v){
this._serverDialogCancelHandler&&
this._serverDialogCancelHandler(v);
this._postErrorHandler();}});




function t(v){
this._data=v;
this._size=1;}


m(t.prototype,
{getData:function(){
return this._data;},


getSize:function(){
return this._size;},


combineWith:function(v,w){
this._data=w(this._data,v);
this._size++;},


combineWithOlder:function(v,w){
this._data=w(v,this._data);
this._size++;}});



function u(v){

if(v===1){
return 'equals1';}else
if(v>=2&&v<=3){
return 'between2and3';}else 

return 'over4';}



e.exports=r;});

/** js/modules/randomInt/randomInt.js */
__d("randomInt",[],function(a,b,c,d,e,f){












function g(h,i){
if(arguments.length===1){
i=h;
h=0;}











var j=this.random||Math.random;
return Math.floor(h+j()*(i-h));}


e.exports=g;});

/** js/clientufi/models/UFIClientIDs.js */
__d("UFIClientIDs",["randomInt"],function(a,b,c,d,e,f){



var g=b('randomInt'),

h={},

i=
{getNewClientID:function(){
var j=Date.now(),
k=j+':'+(g(0,4294967295)+1);


h[k]=true;
return k;},


isExistingClientID:function(j){
return !!h[j];}};



e.exports=i;});

/** js/clientufi/models/UFIFeedbackTargets.js */
__d("UFIFeedbackTargets",["copyProperties","KeyedCallbackManager","UFICentralUpdates","UFIClientIDs","UFIConstants"],function(a,b,c,d,e,f){



var g=b('copyProperties'),
h=b('KeyedCallbackManager'),
i=b('UFICentralUpdates'),
j=b('UFIClientIDs'),
k=b('UFIConstants'),



l=new h();

function m(s){
var t={};
s.forEach(function(u){


var v=g({},u);
delete v.commentlist;
delete v.commentcount;

t[u.entidentifier]=v;
i.didUpdateFeedback(u.entidentifier);});



l.addResourcesAndExecute(t);}


function n(s){
for(var t=0;t<s.length;t++){
var u=s[t];
switch(u.actiontype){
case k.UFIActionType.LIKE_ACTION:
p(u);
break;}}}




function o(s){
for(var t=0;t<s.length;t++){
var u=s[t];
if(u.orig_ftentidentifier)
q(u.orig_ftentidentifier,u.ftentidentifier);}}




function p(s){


if(s.orig_entidentifier)
q(s.orig_entidentifier,s.entidentifier);




var t=l.getResource(s.entidentifier);

if(t){

s.hasviewerliked=!!s.hasviewerliked;




if(s.clientid&&
j.isExistingClientID(s.clientid)&&
s.hasviewerliked!=t.hasviewerliked)
return;


t.likecount=s.likecount||0;
t.likesentences=s.likesentences;



if(s.actorid==t.actorforpost){
t.hasviewerliked=s.hasviewerliked;}else
if(s.hasviewerliked!=t.hasviewerliked){

t.likesentences=
{current:s.likesentences.alternate,
alternate:s.likesentences.current};


if(t.hasviewerliked){
t.likecount++;}else 

t.likecount--;}




if(s.actorid!=t.actorforpost)
t.likesentences.isunseen=true;


m([t]);}}



function q(s,t){


var u=l.getResource(s);

if(u){


l.setResource(s,null);

u.entidentifier=t;
l.setResource(t,u);


i.didUpdateFeedbackID(s,t);}}



var r=
{getFeedbackTarget:function(s,t){
var u=
l.executeOrEnqueue(s,t),

v=l.getUnavailableResources(u);

if(!v.length)

return;}};






i.subscribe('update-feedback',function(s,t){
var u=t.feedbacktargets;

if(u&&u.length)
m(u);});



i.subscribe('update-actions',function(s,t){
if(t.actions&&t.actions.length)
n(t.actions);});



i.subscribe('update-comments',function(s,t){
if(t.comments&&t.comments.length)
o(t.comments);});



e.exports=r;});

/** js/clientufi/models/UFIInstanceState.js */
__d("UFIInstanceState",["UFICentralUpdates"],function(a,b,c,d,e,f){



var g=b('UFICentralUpdates'),



h={};

function i(k){
if(!h[k])
h[k]={};}



var j=
{getKeyForInstance:function(k,l){
i(k);

return h[k][l];},


updateState:function(k,l,m){
i(k);

h[k][l]=m;
g.didUpdateInstanceState(k,l);},


updateStateField:function(k,l,m,n){
var o=this.getKeyForInstance(k,l)||{};

o[m]=n;
this.updateState(k,l,o);}};



e.exports=j;});

/** js/clientufi/models/UFIComments.js */
__d("UFIComments",["ImmutableObject","JSLogger","KeyedCallbackManager","MercuryServerDispatcher","UFICentralUpdates","UFIClientIDs","UFIConstants","UFIFeedbackTargets","UFIInstanceState","URI","keyMirror","merge","randomInt","throwIf"],function(a,b,c,d,e,f){




var g=b('ImmutableObject'),
h=b('JSLogger'),
i=b('KeyedCallbackManager'),
j=b('MercuryServerDispatcher'),
k=b('UFICentralUpdates'),
l=b('UFIClientIDs'),
m=b('UFIConstants'),
n=b('UFIFeedbackTargets'),
o=b('UFIInstanceState'),
p=b('URI'),

q=b('keyMirror'),
r=b('merge'),
s=b('randomInt'),
t=b('throwIf'),

u=q({INVALID_COMMENT_TYPE:null}),








v=h.create('UFIComments'),



w={},



x={},


y={},

z={},




aa={},




ba='unavailable_comment_key';

function ca(wa){
return wa in aa?aa[wa]:wa;}


function da(wa){
if(!x[wa])
x[wa]=new i();


return x[wa];}


function ea(wa){
if(x[wa])
x[wa].reset();}



function fa(wa,xa){
wa.forEach(function(ya){
var za=ya.ftentidentifier,



ab=ya.parentcommentid||za;

n.getFeedbackTarget(za,function(bb){


var cb=ya.clientid,
db=false,
eb=r({},ya);
if(cb){
delete eb.clientid;
db=l.isExistingClientID(cb);
if(db&&aa[cb])
return;}





var fb=m.UFIPayloadSourceType;
if((xa===fb.LIVE_SEND)||
(xa===fb.USER_ACTION)||
(xa===fb.ENDPOINT_ADD_COMMENT)||
(xa===fb.ENDPOINT_EDIT_COMMENT))
eb.isunseen=true;

if(xa===fb.ENDPOINT_COMMENT_FETCH||
xa===fb.ENDPOINT_ID_COMMENT_FETCH)
eb.fromfetch=true;





var gb=da(ab),
hb=gb.getAllResources(),
ib={};
for(var jb in hb){
var kb=hb[jb];
ib[kb]=jb;}



if(db){


if(w[cb].ufiinstanceid)
o.updateStateField
(w[cb].ufiinstanceid,
'locallycomposed',
ya.id,
true);




aa[cb]=ya.id;
w[ya.id]=w[cb];
delete w[cb];
k.didUpdateComment(cb);


if(cb in ib){


ib[ya.id]=ib[cb];


var lb=ib[cb];
gb.setResource(lb,ya.id);}}





if(!ib[ya.id]){
var mb=y[ab]||0;
ib[ya.id]=mb;
y[ab]=mb+1;
ma(ab);


gb.setResource(mb,ya.id);}



var nb=ib[ya.id],
ob=y[ab];

eb.replycount=
(y[ya.id]||0)-
(z[ya.id]||0);


var pb=
Math.floor((ob-nb-1)/m.defaultPageSize)*
m.defaultPageSize;

eb.permalink=p(bb.permalink).addQueryData
({comment_id:ya.legacyid,
offset:pb,
total_comments:ob}).
toString();


va.setComment
(ya.id,
new g(eb));

k.didUpdateComment(ya.id);
k.didUpdateFeedback(za);});});}




function ga(wa){
for(var xa=0;xa<wa.length;xa++){
var ya=wa[xa];
switch(ya.actiontype){
case m.UFIActionType.COMMENT_LIKE:
ja(ya);
break;
case m.UFIActionType.DELETE_COMMENT:
na(ya);
break;
case m.UFIActionType.LIVE_DELETE_COMMENT:
oa(ya);
break;
case m.UFIActionType.UNDO_DELETE_COMMENT:
pa(ya);
break;
case m.UFIActionType.REMOVE_PREVIEW:
qa(ya);
break;
case m.UFIActionType.COMMENT_SET_SPAM:
ra(ya);
break;
case m.UFIActionType.CONFIRM_COMMENT_REMOVAL:
sa(ya);
break;
case m.UFIActionType.TRANSLATE_COMMENT:
ka(ya);
break;}}}




function ha(wa){

for(var xa in wa){
var ya=wa[xa],

za=ya.range,
ab=ya.values;

if(!za){

v.error('nullrange',{target:xa,commentList:ya});
continue;}









var bb={};

for(var cb=0;cb<za.length;cb++)
bb[za.offset+cb]=ab[cb]||ba;



da(xa).addResourcesAndExecute(bb);



if(ya.count!==undefined){
y[xa]=ya.count;
z[xa]=0;}




var db=ya.ftentidentifier||xa;
k.didUpdateFeedback(db);}}



function ia(wa){
wa.forEach(function(xa){

y[xa.entidentifier]=xa.commentcount;

z[xa.entidentifier]=0;

k.didUpdateFeedback(xa.entidentifier);});}



function ja(wa){
var xa=va.getComment(wa.commentid);
if(xa){
var ya={},

za=
wa.clientid&&l.isExistingClientID(wa.clientid);

if(!za){

ya.hasviewerliked=wa.viewerliked;
ya.likecount=wa.likecount;}





ya.likeconfirmhash=s(0,1024);
ua(wa.commentid,ya);}}



function ka(wa){
var xa=wa.commentid,
ya=va.getComment(wa.commentid);
if(ya)
ua(xa,{translatedtext:wa.translatedtext});}








function la(wa){
var xa=
{reportLink:wa.reportLink,
commenterIsFOF:wa.commenterIsFOF,
userIsMinor:wa.userIsMinor};

if(wa.undoData)
xa.undoData=wa.undoData;

return xa;}


function ma(wa,xa){
if(wa){
if(xa!==undefined){
var ya=(z[wa]||0)+(xa?1:-1);
z[wa]=Math.max(ya,0);}


var za=va.getComment(wa);
if(za){
var ab=
{replycount:va.getDisplayedCommentCount(wa)};

ua(wa,ab);}}}




function na(wa){

var xa=va.getComment(wa.commentid);





if(xa.status!==m.UFIStatus.DELETED){
var ya=xa.parentcommentid||xa.ftentidentifier;
ma(ya,true);}

ta(xa,m.UFIStatus.DELETED);}


function oa(wa){

var xa=va.getComment(wa.commentid);




if(xa&&xa.status!==m.UFIStatus.DELETED)
ta
(xa,
m.UFIStatus.LIVE_DELETED);}




function pa(wa){

var xa=va.getComment(wa.commentid);

if(xa.status===m.UFIStatus.DELETED){
var ya=xa.parentcommentid||xa.ftentidentifier;
ma(ya,false);}

ta
(xa,
m.UFIStatus.PENDING_UNDO_DELETE);}



function qa(wa){
ua(wa.commentid,{attachment:null});}







function ra(wa){
var xa=va.getComment(wa.commentid),
ya=wa.shouldHideAsSpam?
m.UFIStatus.SPAM_DISPLAY:null;

ta(xa,ya);}


function sa(wa){
ua(wa.commentid,la(wa));}


function ta(wa,xa){
ua(wa.id,
{priorstatus:wa.status,
status:xa});}



function ua(wa,xa){
var ya=
va.getComment(wa)||new g({});
va.setComment
(wa,
g.set(ya,xa));

k.didUpdateComment(ya.id);
k.didUpdateFeedback(ya.ftentidentifier);}


var va=
{getComments:function(wa){
var xa={};
for(var ya=0;ya<wa.length;ya++)
xa[wa[ya]]=va.getComment(wa[ya]);


return xa;},


getComment:function(wa){
return w[ca(wa)];},


setComment:function(wa,xa){






w[ca(wa)]=xa;},







resetFeedbackTarget:function(wa){
var xa=da(wa),
ya=xa.getAllResources();
for(var za in ya){
var ab=ya[za];
delete w[ca(ab)];}

ea(wa);},







getCommentsInRange:function(wa,xa,ya,za){
var ab=da(wa),
bb=null;

n.getFeedbackTarget
(wa,
function(cb){

var db=[];
for(var eb=0;eb<xa.length;eb++)
db.push(xa.offset+eb);


bb=ab.executeOrEnqueue
(db,
function(kb){



var lb=[],
mb=xa.offset,
nb=xa.offset+xa.length-1;

for(var ob=0;ob<xa.length;ob++){



var pb=cb.isranked?
nb-ob:mb+ob;
if(kb[pb]!=ba){
var qb=this.getComment(kb[pb]);
if(qb)
lb.push(qb);}}



za(lb);}.
bind(this));


var fb=ab.getUnavailableResources(bb);
if(fb.length){


ab.unsubscribe(bb);


var gb=Math.min.apply(Math,fb),
hb=Math.max.apply(Math,fb),

ib=gb,
jb=hb-gb+1;


j.trySend('/ajax/ufi/comment_fetch.php',
{ft_ent_identifier:cb.entidentifier,
viewas:ya,
source:null,
offset:ib,
length:jb});}}.


bind(this));


return bb;},


getRepliesInRanges:function(wa,xa,ya){
var za={},
ab={},
bb={},
cb=false;

n.getFeedbackTarget
(wa,
function(db){
for(var eb in xa){
var fb=da(eb),
gb=xa[eb],

hb=[];
for(var ib=0;ib<gb.length;ib++)
hb.push(gb.offset+ib);


za[eb]=fb.executeOrEnqueue
(hb,
function(sb){



var tb=[];
for(var ub=0;ub<gb.length;ub++){
var vb=gb.offset+ub;
if(sb[vb]!=ba){
var wb=this.getComment(sb[vb]);
if(wb)
tb.push(wb);}}



ab[eb]=tb;}.
bind(this));


bb[eb]=
fb.getUnavailableResources(za[eb]);

if(bb[eb].length){


cb=true;



fb.unsubscribe(za[eb]);}}



if(!cb){
ya(ab);}else{

var jb=[],
kb=[],
lb=[];

for(var mb in bb){
var nb=bb[mb];
if(nb.length){

var ob=Math.min.apply(Math,nb),
pb=Math.max.apply(Math,nb),

qb=ob,
rb=pb-ob+1;

jb.push(mb);
kb.push(qb);
lb.push(rb);}}




j.trySend('/ajax/ufi/reply_fetch.php',
{ft_ent_identifier:db.entidentifier,
parent_comment_ids:jb,
source:null,
offsets:kb,
lengths:lb});}}.


bind(this));


return za;},


getCommentCount:function(wa){
return y[wa]||0;},


getDeletedCount:function(wa){
return z[wa]||0;},


getDisplayedCommentCount:function(wa){
return (y[wa]||0)-
(z[wa]||0);}};



j.registerEndpoints
({'/ajax/ufi/comment_fetch.php':
{mode:j.IMMEDIATE,
handler:
k.handleUpdate.bind
(k,
m.UFIPayloadSourceType.ENDPOINT_COMMENT_FETCH)},


'/ajax/ufi/reply_fetch.php':
{mode:j.IMMEDIATE,
handler:
k.handleUpdate.bind
(k,
m.UFIPayloadSourceType.ENDPOINT_COMMENT_FETCH)}});




k.subscribe('update-comments',function(wa,xa){
if(xa.comments&&xa.comments.length)
fa(xa.comments,xa.payloadsource);});



k.subscribe('update-actions',function(wa,xa){
if(xa.actions&&xa.actions.length)
ga(xa.actions);});



k.subscribe('update-comment-lists',function(wa,xa){
var ya=xa.commentlists;

if(ya&&Object.keys(ya).length)
ha(ya);});



k.subscribe('update-feedback',function(wa,xa){
var ya=xa.feedbacktargets;

if(ya&&ya.length)
ia(ya);});



e.exports=va;});

/** js/clientufi/models/UFITrackingNodes.js */
__d("UFITrackingNodes",[],function(a,b,c,d,e,f){



var g=

{types:
{USER_NAME:2,
LIKE_LINK:5,
UNLIKE_LINK:6,
SHARE_LINK:17,
USER_MESSAGE:18,
SOURCE:21,
BLINGBOX:22,
VIEW_ALL_COMMENTS:24,
COMMENT:25,
COMMENT_LINK:26,
SMALL_ACTOR_PHOTO:27,
ADD_COMMENT_BOX:34,
UFI:36},



TYPE_TO_CHAR_SHIFT_VAL:57,




encodeTrackingInfo:function(h,i){

var j=String.fromCharCode
(h+g.TYPE_TO_CHAR_SHIFT_VAL);




if(i)
j+=String.fromCharCode(48+Math.min(i,10)-1);


return j;},



decodeTrackingInfo:function(h){
return h.charCodeAt(0)-g.TYPE_TO_CHAR_SHIFT_VAL;},


getTrackingInfo:function(h,i){
return '{"tn":"'+g.encodeTrackingInfo(h,i)+'"}';}};



e.exports=g;});

/** js/components/UFI/UFILikeLink.js */
__d("UFILikeLink",["ReactDOM","React","UFITrackingNodes","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('React'),
i=b('UFITrackingNodes'),

j=b('tx'),

k=h.createComponent
({render:function(){
var l=this.props.likeAction?"Like":"Unlike",

m=i.getTrackingInfo
(this.props.likeAction?
i.types.LIKE_LINK:
i.types.UNLIKE_LINK),


n=this.props.likeAction?
"Like this item":
"Stop liking this item";


return (g.a
({className:"UFILikeLink",
href:"#",
role:"button",
'aria-live':"polite",
title:n,
onClick:this.props.onClick,
'data-ft':m,children:
l}));}});





e.exports=k;});

/** js/clientufi/models/UFIUserActions.js */
__d("UFIUserActions",["AsyncResponse","ImmutableObject","JSLogger","Nectar","UFICentralUpdates","UFIClientIDs","UFIComments","UFIConstants","UFIFeedbackTargets","MercuryServerDispatcher","collectDataAttributes","copyProperties","tx"],function(a,b,c,d,e,f){



var g=b('AsyncResponse'),
h=b('ImmutableObject'),
i=b('JSLogger'),
j=b('Nectar'),
k=b('UFICentralUpdates'),
l=b('UFIClientIDs'),
m=b('UFIComments'),
n=b('UFIConstants'),
o=b('UFIFeedbackTargets'),
p=b('MercuryServerDispatcher'),

q=b('collectDataAttributes'),
r=b('copyProperties'),
s=b('tx'),

t=i.create('UFIUserActions'),


u=
{BAN:'ban',
UNDO_BAN:'undo_ban'},


v=


{changeCommentLike:function(ha,ia,ja){
var ka=m.getComment(ha);
if(ka.hasviewerliked!=ia){
var la=w(ja.target),
ma=ia?1:-1,
na=
{commentid:ha,
actiontype:n.UFIActionType.COMMENT_LIKE,
viewerliked:ia,
likecount:ka.likecount+ma};




k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[na]});


p.trySend('/ajax/ufi/comment_like.php',r
({comment_id:ha,
legacy_id:ka.legacyid,
like_action:ia,
ft_ent_identifier:ka.ftentidentifier,
source:ja.source,
client_id:l.getNewClientID()},
la));}},















addComment:
function(ha,
ia,
ja,
ka){
o.getFeedbackTarget(ha,function(la){
var ma=w(ka.target),
na=l.getNewClientID();

if(!la.actorforpost)

return;




var oa=
{ftentidentifier:ha,
body:{text:ia},
author:la.actorforpost,
id:na,
islocal:true,
ufiinstanceid:ka.ufiinstanceid,
likecount:0,
hasviewerliked:false,
parentcommentid:ka.replyid,
timestamp:
{time:Date.now(),
text:"a few seconds ago"}};



k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{comments:[oa]});


var pa=null;
if(ka.replyid)
pa=(m.getComment(ka.replyid)).fbid;


p.trySend('/ajax/ufi/add_comment.php',r
({ft_ent_identifier:la.entidentifier,
comment_text:ja,
source:ka.source,
client_id:na,
reply_fbid:pa,
parent_comment_id:ka.replyid,
timeline_log_data:ka.timelinelogdata,
rootid:ka.rootid},
ma));});},



editComment:function(ha,ia,ja,ka){
var la=w(ka.target),
ma=m.getComment(ha);


ma=h.set(ma,
{status:n.UFIStatus.PENDING_EDIT,
body:{text:ia},
timestamp:
{time:Date.now(),
text:"a few seconds ago",
original:ma.timestamp.time},

editnux:null,
attachment:null});


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{comments:[ma]});


p.trySend('/ajax/ufi/edit_comment.php',r
({ft_ent_identifier:ma.ftentidentifier,
comment_text:ja,
source:ka.source,
comment_id:ma.id,
parent_comment_id:ma.parentcommentid},
la));},


translateComment:function(ha,ia){
p.trySend('/ajax/ufi/translate_comment.php',
{ft_ent_identifier:ha.ftentidentifier,
comment_ids:[ha.id],
source:ia.source});},





setHideAsSpam:function(ha,ia,ja){
var ka=w(ja.target),
la=m.getComment(ha),
ma=
{commentid:ha,
actiontype:n.UFIActionType.COMMENT_SET_SPAM,
shouldHideAsSpam:ia};


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[ma]});


p.trySend('/ajax/ufi/comment_spam.php',r
({comment_id:ha,
spam_action:ia,
ft_ent_identifier:la.ftentidentifier,
source:ja.source},
ka));},


removeComment:function(ha,ia){
var ja=w(ia.target),
ka=m.getComment(ha),

la=
{actiontype:n.UFIActionType.DELETE_COMMENT,
commentid:ha,
oneclick:ia.oneclick};


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[la]});


p.trySend('/ajax/ufi/delete_comment.php',r
({comment_id:ka.id,
comment_legacyid:ka.legacyid,
ft_ent_identifier:ka.ftentidentifier,
one_click:ia.oneclick,
source:ia.source,
client_id:l.getNewClientID(),
timeline_log_data:ia.timelinelogdata},
ja));},


undoRemoveComment:function(ha,ia,ja){
var ka=m.getComment(ha);


if(!ka.undoData){
t.error('noundodata',{comment:ha});
return;}


var la=w(ja.target),
ma=
{actiontype:n.UFIActionType.UNDO_DELETE_COMMENT,
commentid:ha};


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[ma]});


var na=ka.undoData;
na.page_admin=ia;

var oa=r(la,na);
p.trySend
('/ajax/ufi/undo_delete_comment.php',
oa);},



banUser:function(ha,ia,ja,ka){
var la=ja?u.BAN:u.UNDO_BAN;

p.trySend('/ajax/ufi/ban_user.php',
{page_id:ia,
commenter_id:ha.author,
action:la,
comment_id:ha.id,
client_side:true});},



changeLike:function(ha,ia,ja){
o.getFeedbackTarget(ha,function(ka){
var la=w(ja.target);

if(ka.hasviewerliked!==ia){
var ma=ia?1:-1,
na=
{actiontype:n.UFIActionType.LIKE_ACTION,
actorid:ka.actorforpost,
hasviewerliked:ia,
likecount:ka.likecount+ma,
entidentifier:ha,
likesentences:
{current:ka.likesentences.alternate,
alternate:ka.likesentences.current}};



k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[na]});


p.trySend('/ajax/ufi/like.php',r
({like_action:ia,
ft_ent_identifier:ha,
source:ja.source,
client_id:l.getNewClientID(),
rootid:ja.rootid},
la));}});},




fetchSpamComments:
function(ha,
ia,
ja,
ka){

p.trySend('/ajax/ufi/id_comment_fetch.php',
{ft_ent_identifier:ha,
viewas:ka,
comment_ids:ia,
parent_comment_id:ja,
source:null});},



removePreview:function(ha,ia){
var ja=w(ia.target),
ka=
{commentid:ha.id,
actiontype:n.UFIActionType.REMOVE_PREVIEW};



k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[ka]});


p.trySend('/ajax/ufi/remove_preview.php',r
({comment_id:ha.id,
ft_ent_identifier:ha.ftentidentifier,
source:ia.source},
ja));}};



function w(ha){
if(!ha)
return {ft:{}};


var ia=
{ft:q(ha,['ft']).ft};

j.addModuleData(ia,ha);

return ia;}


function x(ha){
var ia=ha.request.data;

g.defaultErrorHandler(ha);


var ja=ia.client_id||ia.comment_id,
ka=m.getComment(ja),


la=(ka.status===n.UFIStatus.PENDING_EDIT)?
n.UFIStatus.FAILED_EDIT:
n.UFIStatus.FAILED_ADD;
ka=h.setDeep(ka,
{status:la,
allowRetry:y(ha),
body:{mentionstext:ia.comment_text}});


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{comments:[ka]});}



function y(ha){
var ia=ha.getError();


if(ia===1404074)
return false;



if(ha.silentError)
return true;




if(ia===1357012||
ia===1357006)
return false;


return true;}


function z(ha){
var ia=ha.request.data,

ja=ia.comment_id,
ka=m.getComment(ja);


ka=h.set(ka,
{status:ka.priorstatus||null,
priorstatus:undefined});


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{comments:[ka]});}



function aa(ha){
var ia=ha.request.data,

ja=ia.comment_id,
ka=m.getComment(ja);

if(ia.like_action===ka.hasviewerliked){

var la=ka.hasviewerliked?-1:1,
ma=
{commentid:ja,
actiontype:n.UFIActionType.COMMENT_LIKE,
viewerliked:!ka.hasviewerliked,
likecount:ka.likecount+la};


k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[ma]});}



g.defaultErrorHandler(ha);}


function ba(ha){
var ia=ha.request.data,
ja=ia.ft_ent_identifier;

o.getFeedbackTarget(ja,function(ka){
if(ka.hasviewerliked===ia.like_action){
var la=ka.hasviewerliked?-1:1,
ma=
{actiontype:n.UFIActionType.LIKE_ACTION,
actorid:ka.actorforpost,
hasviewerliked:!ka.hasviewerliked,
likecount:ka.likecount+la,
entidentifier:ja,
likesentences:
{current:ka.likesentences.alternate,
alternate:ka.likesentences.current}};



k.handleUpdate
(n.UFIPayloadSourceType.USER_ACTION,
{actions:[ma]});}});




g.defaultErrorHandler(ha);}


var ca=function(ha){
return k.handleUpdate.bind(k,ha);},

da=n.UFIPayloadSourceType;

p.registerEndpoints
({'/ajax/ufi/comment_like.php':
{mode:p.BATCH_CONDITIONAL,
handler:ca(da.ENDPOINT_COMMENT_LIKE),
error_handler:aa,
batch_if:ea,
batch_function:ga},

'/ajax/ufi/comment_spam.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_COMMENT_SPAM),
error_handler:z},

'/ajax/ufi/add_comment.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_ADD_COMMENT),
error_handler:x},

'/ajax/ufi/delete_comment.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_DELETE_COMMENT),
error_handler:z},

'/ajax/ufi/undo_delete_comment.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_UNDO_DELETE_COMMENT),
error_handler:z},

'/ajax/ufi/ban_user.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_BAN)},

'/ajax/ufi/edit_comment.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_EDIT_COMMENT),
error_handler:x},

'/ajax/ufi/like.php':
{mode:p.BATCH_CONDITIONAL,
handler:ca(da.ENDPOINT_LIKE),
error_handler:ba,
batch_if:fa,
batch_function:ga},

'/ajax/ufi/id_comment_fetch.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_ID_COMMENT_FETCH)},

'/ajax/ufi/remove_preview.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_REMOVE_PREVIEW)},

'/ajax/ufi/translate_comment.php':
{mode:p.IMMEDIATE,
handler:ca(da.ENDPOINT_TRANSLATE_COMMENT)}});



function ea(ha,ia){
return ha&&
ha.ft_ent_identifier==ia.ft_ent_identifier&&
ha.comment_id==ia.comment_id;}


function fa(ha,ia){
return ha&&
ha.ft_ent_identifier==ia.ft_ent_identifier;}



function ga(ha,ia){
return ia;}


e.exports=v;});

/** js/clientufi/controllers/UFIActionLinkController.js */
__d("UFIActionLinkController",["ReactDOM","Arbiter","CSS","DOMQuery","Parent","React","UFIBlingBox","UFICentralUpdates","UFIComments","UFILikeLink","UFIFeedbackTargets","UFITrackingNodes","UFIUserActions","copyProperties"],function(a,b,c,d,e,f){




var g=b('Arbiter'),
h=b('CSS'),
i=b('DOMQuery'),
j=b('Parent'),
k=b('React'),
l=b('UFIBlingBox'),
m=b('UFICentralUpdates'),
n=b('UFIComments'),
o=b('UFILikeLink'),
p=b('UFIFeedbackTargets'),
q=b('UFITrackingNodes'),
r=b('UFIUserActions'),

s=b('copyProperties');






function t(v,w,x){

if(this._root)
throw new Error
('UFIActionLinkController attempted to initialize when a root was'+
' already present');




var y=i.scry(v,w)[0];
if(y){


var z=document.createElement('span');
y.parentNode.replaceChild(z,y);





z.appendChild(y);

if(typeof x==="function")
x(z);}else 




var aa=g.subscribe
('PhotoSnowlift.DATA_CHANGE',
function(){
g.unsubscribe(aa);
t(v,w,x);},

g.SUBSCRIBE_NEW);}




var u=function(v,w,x){
this._id=w.ftentidentifier;
this._source=w.source;

this._contextArgs=w;

this._ufiRoot=v;

this._attemptInitializeBling();
if(x.viewercanlike)
this._attemptInitializeLike();



m.subscribe('feedback-updated',function(y,z){
var aa=z.updates;
if(this._id in aa)
this.render();}.

bind(this));

m.subscribe('feedback-id-changed',function(y,z){
var aa=z.updates;
if(this._id in aa)
this._id=aa[this._id];}.

bind(this));};


s(u.prototype,
{_attemptInitializeBling:function(){
t(this._ufiRoot,'^form .uiBlingBox',function(v){
this._blingRoot=v;



if(this._dataReady)
this._renderBling();}.

bind(this));},


_attemptInitializeLike:function(){
t(this._ufiRoot,'^form .like_link',function(v){
this._likeRoot=v;



if(this._dataReady)
this._renderLike();}.

bind(this));},


render:function(){
this._dataReady=true;
this._renderBling();
this._renderLike();},


_renderBling:function(){
if(this._blingRoot)
p.getFeedbackTarget(this._id,function(v){
var w=function(event){
var z=j.byTag(event.target,"form");
h.toggleClass(z,"collapsed_comments");
h.toggleClass(z,"hidden_add_comment");

event.preventDefault();}.
bind(this),

x=
q.getTrackingInfo(q.types.BLINGBOX),

y=
l
({likes:v.likecount,
comments:n.getDisplayedCommentCount(this._id),
reshares:v.sharecount,
permalink:v.permalink,
contextArgs:this._contextArgs,
onClick:w,
'data-ft':x});


this._blingBox=
k.renderOrUpdateComponent(y,this._blingRoot);}.
bind(this));},



_renderLike:function(){
if(this._likeRoot)
p.getFeedbackTarget(this._id,function(v){
var w=!v.hasviewerliked,
x=function(event){
r.changeLike
(this._id,
w,

{source:this._source,
target:event.target,
rootid:this._contextArgs.rootid});


event.preventDefault();}.
bind(this),

y=
o
({onClick:x,
likeAction:w});


this._likeLink=
k.renderOrUpdateComponent(y,this._likeRoot);}.
bind(this));}});




e.exports=u;});

/** js/ui/xhp/form/mentions/MentionsInputUtils.js */
__d("MentionsInputUtils",[],function(a,b,c,d,e,f){



var g=





{generateDataFromTextWithEntities:function(h){
var i=h.text,
j={};
(h.ranges||[]).forEach(function(k){
var l=k.entities[0];

if(!l.external)
j[l.id]=i.substr(k.offset,k.length);});



return {flattened:i,
mention_data:j};}};




e.exports=g;});

/** js/components/Layout/Layout.js */
__d("Layout",["keyMirror"],function(a,b,c,d,e,f){



var g=b('keyMirror'),

h=
{small:true,
medium:true,
large:true,
none:true},


i=
{small:true,
medium:true,
large:true,
huge:true},


j=
{none:true,
medium:true,
light:true,
dark:true},


k=
{dark:true,
inverted:true,
standard:true},


l=
{top:true,
middle:true,
bottom:true},


m=
{left:true,
center:true,
right:true},


n=
{horizontal:true,
vertical:true},


o=
{toTop:true,
toBottom:true},







p=
{spacing:g(h),
size:g(i),
boldness:g(j),
appearance:g(k),
direction:g(n),
vAlign:g(l),
hAlign:g(m),
ScrollDirection:g(o)};


e.exports=p;});

/** js/react/utils/bindNoArgs.js */
__d("bindNoArgs",[],function(a,b,c,d,e,f){


var g=function(h,i){
if(!h)
return null;

return function(){
return h.call(i);};};



e.exports=g;});

/** js/react/utils/curryOnly.js */
__d("curryOnly",[],function(a,b,c,d,e,f){










var g=function(h,i,j){
if(!h)
return null;

return function(){
return h.call(j,i);};};



e.exports=g;});

/** js/react/utils/keys.js */
__d("reactKeys",[],function(a,b,c,d,e,f){






var g=function(h){
var i=[],j;
for(j in h)
if(h.hasOwnProperty(j))
i.push(j);


return i;};


e.exports=g;});

/** js/react/utils/mergeDeep.js */
__d("mergeDeep",["mergeHelpers","mergeDeepInto"],function(a,b,c,d,e,f){



var g=b('mergeHelpers'),
h=b('mergeDeepInto'),

i=g.checkMergeLevel,
j=g.checkArrayStrategy,
k=g.checkMergeObjectArgs,
l=g.isTerminal,
m=g.normalizeMergeArg,









n=function(o,p,q){
var r=m(o),
s=m(p);
k(r,s);
j(q);
var t={};





h(t,r,q);
h(t,s,q);
return t;};



e.exports=n;});

/** js/react/core/ReactUtils.js */
__d("ReactUtils",["bindNoArgs","curryOnly","keyMirror","keyOf","reactKeys","merge","mergeDeep","mergeInto","mixInto","objMapKeyVal"],function(a,b,c,d,e,f){



var g=b('bindNoArgs'),
h=b('curryOnly'),
i=b('keyMirror'),
j=b('keyOf'),
k=b('reactKeys'),
l=b('merge'),
m=b('mergeDeep'),
n=b('mergeInto'),
o=b('mixInto'),
p=b('objMapKeyVal');

f.bindNoArgs=g;
f.curryOnly=h;
f.keyMirror=i;
f.keyOf=j;
f.keys=k;
f.merge=l;
f.mergeDeep=m;
f.mergeInto=n;
f.mixInto=o;
f.objMapKeyVal=p;});

/** js/components/LeftRight/LeftRight.js */
__d("LeftRight",["ReactDOM","React","ReactErrors","ReactUtils"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('React'),
i=b('ReactErrors'),
j=b('ReactUtils'),





k=j.keyMirror
({left:true,
right:true,
both:true});


function l(n){

i.throwIf
(!n.children||
n.children.length<1||
n.children.length>2,
"LeftRight component must have one or two children.");}






var m=h.createComponent
({render:function(){
l(this.props);
var n=this.props.direction||k.both,





o=
[{clearfix:true},
this.props.classSet],

p=
{lfloat:n===k.left||n===k.both},

q=
{rfloat:n===k.right||n===k.both},







r=
g.div({classSet:p,children:
this.props.children[0]}),


s=(this.props.children.length<2)?null:
g.div({classSet:q,children:
this.props.children[1]}),


t=(n===k.right&&s)?
[s,r]:
[r,s],

u=
g.div({classSet:o,children:t});








u.props=j.merge(this.props,u.props);
return u;}});



m.DIRECTION=k;

e.exports=m;});

/** js/components/ImageBlock/ImageBlock.js */
__d("ImageBlock",["ReactDOM","Layout","LeftRight","React","ReactUtils","ReactErrors","cx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('Layout'),
i=b('LeftRight'),
j=b('React'),
k=b('ReactUtils'),
l=b('ReactErrors'),

m=b('cx'),


n=h.spacing;

function o(s){
l.throwIf
(!s.children||
s.children.length>3||
s.children.length<1,
"ImageBlock requires two or three children.");}







function p(s){
var t=
{img:true};

t._8o=true;
t._8r=s===n.small;
t._8s=s===n.medium;
t._8t=s===n.large;
return t;}







function q(s,t,u){
s.props.classSet=
[p(t),
s.props.classSet,
u];}







var r=j.createComponent
({render:function(){
o(this.props);
var s=this.props.children[0],
t=this.props.children[1],
u=this.props.children[2],
v=this.props.spacing||n.small;




q(s,v,this.props.imageClassSet);

var w=this.props.contentClassSet||{};
w._42ef=true;
w._8u=
v===n.small;

if(s.tagName=='IMG'){
if(s.props.alt===undefined)
s.props.alt='';}else

if((s.tagName=='A'||s.tagName=='LINK')&&
s.props.tabIndex===undefined&&
s.props.title===undefined&&
s.props['aria-label']===undefined){
s.props.tabIndex='-1';
s.props['aria-hidden']='true';}


var x;
if(!u){
x=
g.div({classSet:w,children:
t});}else 


x=
i
({classSet:w,
direction:i.DIRECTION.right,children:
[t,
u]});



var y=
i
({classSet:this.props.classSet,
direction:i.DIRECTION.left,children:
[s,
x]});







y.props=k.merge(this.props,y.props);
return y;}});



e.exports=r;});

/** js/components/ReactLegacyMentionsInput/ReactLegacyMentionsInput.js */
__d("ReactLegacyMentionsInput",["ReactDOM","PlaceholderListener","Bootloader","Event","Keys","React"],function(a,b,c,d,e,f){var g=b('ReactDOM');





b('PlaceholderListener');

var h=b('Bootloader'),
i=b('Event'),
j=b('Keys'),
k=b('React'),

l=k.createComponent

({onDomReady:function(m){
this.props.initialData&&this._initializeTextarea(m);},


hasEnteredText:function(){
return !!(this._mentionsInput&&this._mentionsInput.getValue().trim());},




_handleKeydown:function(event){
var m=event.nativeEvent,

n=this.props.onEnterSubmit,
o=i.getKeyCode(m)==j.RETURN&&
!i.$E(m).getModifiers().any,
p=this._mentionsInput&&
this._mentionsInput.getTypeahead().getView().getSelection();

if(n&&o&&!p){
var q=event.target,
r=q.value&&q.value.trim();
if(r||this.props.acceptEmptyInput){
var s={visibleValue:r,encodedValue:r};
if(this._mentionsInput){
s.encodedValue=this._mentionsInput.getRawValue().trim();
this._mentionsInput.reset({flattened:''});}

n(s,event);}

event.preventDefault();}},



_handleFocus:function(){
this.props.onFocus&&this.props.onFocus();
this._initializeTextarea(this.refs.root.getDOMNode());},


_handleBlur:function(){
this.props.onBlur&&this.props.onBlur();},


_initializeTextarea:function(m){
if(this._mentionsInput||this._bootloadingMentions)return;
this._bootloadingMentions=true;

h.loadModules
(['CompactTypeaheadRenderer',
'ContextualTypeaheadView',
'InputSelection',
'MentionsInput',
'TextAreaControl',
'Typeahead',
'TypeaheadAreaCore',
'TypeaheadBestName',
'TypeaheadHoistFriends',
'TypingDetector'],

function(n,
o,
p,
q,
r,
s,
t,
u,
v,
w){

var x=this.refs.textarea.getDOMNode();
new r(x);

if(this.props.onTypingStateChange){
var y=new w(x);
y.init();
y.subscribe('change',this.props.onTypingStateChange);}


var z={autoSelect:true,renderer:n};

if(this.props.viewOptionsTypeObjects)
z.typeObjects=this.props.viewOptionsTypeObjects;


if(this.props.viewOptionsTypeObjectsOrder)
z.typeObjectsOrder=this.props.viewOptionsTypeObjectsOrder;


var aa=new s
(this.props.datasource,
{ctor:o,options:z},
{ctor:t},
this.refs.typeahead.getDOMNode());

aa.init([u,v]);

this._mentionsInput=new q(m,aa,x,{});
this._mentionsInput.init({max:6},this.props.initialData);
if(this.props.initialData)
p.set(x,x.value.length);


this._bootloadingMentions=false;}.
bind(this));},


focus:function(){


try{this.refs.textarea.getDOMNode().focus();}catch(
m){
}},


render:function(){
var m=
{textInput:true,
mentionsTextarea:true,
uiTextareaAutogrow:true,
uiTextareaNoResize:true,
UFIAddCommentInput:true,
DOMControl_placeholder:true};



return (g.div
({ref:"root",
className:"uiMentionsInput textBoxContainer ReactLegacyMentionsInput",children:
[g.div({className:"highlighter",children:
g.div({children:g.span({className:"highlighterContent hidden_elem"})})}),

g.div({ref:"typeahead",className:"uiTypeahead mentionsTypeahead",children:
g.div({className:"wrap",children:
[g.input({type:"hidden",autocomplete:"off",className:"hiddenInput"}),
g.div({className:"innerWrap",children:
g.textarea
({ref:"textarea",
name:"add_comment_text",
classSet:m,
title:this.props.placeholder,
content:this.props.placeholder,
placeholder:this.props.placeholder,
onFocus:this._handleFocus.bind(this),
onBlur:this._handleBlur.bind(this),
onKeyDown:this._handleKeydown.bind(this)})})]})}),




g.input
({type:"hidden",
autocomplete:"off",
className:"mentionsHidden",
value:""})]}));}});







e.exports=l;});

/** js/components/UFI/UFIClassSets.js */
__d("UFIClassSets",["cx"],function(a,b,c,d,e,f){




var g=b('cx'),

h=
{img:true,
UFIActorImage:true};

h._rx=true;

var i=
{UFIRow:true},


j=
{UFIUnseenItem:true};


e.exports=
{ROW:i,
ACTOR_IMAGE:h,
UNSEEN_ITEM:j};});

/** js/components/UFI/UFIAddComment.js */
__d("UFIAddComment",["ReactDOM","Event","ImageBlock","Keys","React","ReactLegacyMentionsInput","UFIClassSets","UFITrackingNodes","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),








h=b('Event'),

i=b('ImageBlock'),
j=b('Keys'),
k=b('React'),
l=b('ReactLegacyMentionsInput'),
m=b('UFIClassSets'),
n=b('UFITrackingNodes'),

o=b('tx'),


p="Write a comment...",
q="Write a reply...",

r=
{UFICommentTip:true,
fcg:true,
fss:true},


s={UFITextReplyDimensions:true},

t=k.createComponent
({getInitialState:function(){

return {isCommenting:false};},



_onKeyDown:function(event){
if(this.props.isEditing&&
h.getKeyCode(event.nativeEvent)===j.ESC)
this.props.onCancel();},



_blur:function(){
if(this.refs.mentionsinput&&this.refs.mentionsinput.hasEnteredText())


return;


this.updateState({isCommenting:false});},


focus:function(){
if(this.refs&&this.refs.mentionsinput)
this.refs.mentionsinput.focus();},



render:function(){

var u=
!this.props.contextArgs.collapseaddcomment||
this.state.isCommenting,

v=null;
if(this.props.isEditing){
v=
g.span({classSet:r,children:
"Press Esc to cancel."});}else

if(this.props.showSendOnEnterTip)
v=
g.span({classSet:r,children:
"Press Enter to post."});



var w=
n.getTrackingInfo(n.types.ADD_COMMENT_BOX),

x=
[m.ACTOR_IMAGE,
{hidden_elem:!u}],


y=
g.img
({classSet:x,
src:this.props.viewerActor.thumbSrc});

if(this.props.contextArgs.entstream)
y=
g.div({classSet:{UFIReplyActorPhotoWrapper:true},children:
y});



var z=
[m.ROW,
{UFIAddComment:true,noDisplay:this.props.hide}],


aa=
{UFIMentionsInputWrap:true},


ba=!!this.props.replyCommentID?
q:
p,

ca=this.props.contextArgs.entstream?
this._blur.bind(this):
null,

da=this.props.contextArgs.viewoptionstypeobjects,
ea=
this.props.contextArgs.viewoptionstypeobjectsorder;


return (g.li
({classSet:z,
onKeyDown:this._onKeyDown.bind(this),
'data-ft':w,children:
i
({classSet:aa,
imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[y,
g.div({children:
[l
({initialData:this.props.initialData,
placeholder:ba,
ref:"mentionsinput",
wrapperClassSet:s,
datasource:this.props.mentionsDataSource,
acceptEmptyInput:this.props.isEditing,
onEnterSubmit:this.props.onCommentSubmit,
onFocus:this.createStateUpdater({isCommenting:true}),
viewOptionsTypeObjects:da,
viewOptionsTypeObjectsOrder:ea,
onBlur:ca,
onTypingStateChange:this.props.onTypingStateChange}),

v]})]})}));}});







e.exports=t;});

/** js/clientufi/controllers/UFIAddCommentController.js */
__d("UFIAddCommentController",["ReactDOM","Arbiter","copyProperties","MentionsInputUtils","Parent","UFIAddComment","React","ShortProfiles","UFICentralUpdates","UFIComments","UFIFeedbackTargets","UFIInstanceState","UFIUserActions"],function(a,b,c,d,e,f){





var g=b('Arbiter'),
h=b('copyProperties'),
i=b('MentionsInputUtils'),
j=b('Parent'),
k=b('UFIAddComment'),
l=b('React'),
m=b('ShortProfiles'),
n=b('UFICentralUpdates'),
o=b('UFIComments'),
p=b('UFIFeedbackTargets'),
q=b('UFIInstanceState'),
r=b('UFIUserActions');













function s
(t,u,v,w){
this.id=u;
this._ufiInstanceID=w.instanceid;
this._contextArgs=w;
this._replyCommentID=v;

if(t){
this.root=t;
if(!this._contextArgs.rootid)
this._contextArgs.rootid=t.id;

this.render();

n.subscribe('instance-updated',function(x,y){
var z=y.updates;
if(this._ufiInstanceID in z)
this.render();}.

bind(this));}


n.subscribe('feedback-id-changed',function(x,y){
var z=y.updates;
if(this.id in z)
this.id=z[this.id];}.

bind(this));}


h(s.prototype,
{_onCommentSubmit:function(t,event){
r.addComment
(this.id,
t.visibleValue,
t.encodedValue,

{source:this._contextArgs.source,
ufiinstanceid:this._ufiInstanceID,
target:event.target,
replyid:this._replyCommentID,
timelinelogdata:this._contextArgs.timelinelogdata,
rootid:this._contextArgs.rootid});



p.getFeedbackTarget(this.id,function(u){



if(u.isranked&&this._replyCommentID===null)
q.updateState
(this._ufiInstanceID,
'scrolloninsert',
true);




var v=j.byTag(this.root,'form');
if(v)
g.inform
('ufi/comment',

{form:v,
isranked:u.isranked});}.



bind(this));

return false;},


_onTypingStateChange:function(t,u){


},



renderAddComment:
function(t,
u,
v,
w){
var x=
this._contextArgs.logtyping?
this._onTypingStateChange.bind(this):
null,

y=null,



z=
q.getKeyForInstance(this._ufiInstanceID,'isediting')&&
!this._replyCommentID;


return (k
({hide:z,
replyCommentID:this._replyCommentID,
viewerActor:t,
initialData:y,
ref:w,
onCommentSubmit:this._onCommentSubmit.bind(this),
mentionsDataSource:u,
onTypingStateChange:x,
showSendOnEnterTip:v,
source:this._contextArgs.source,
contextArgs:this._contextArgs}));},




renderEditComment:
function(t,
u,
v,
w,
x){

var y=o.getComment(u),

z=
i.generateDataFromTextWithEntities(y.body);


return (k
({viewerActor:t,
initialData:z,
onCommentSubmit:w,
onCancel:x,
mentionsDataSource:v,
source:this._contextArgs.source,
contextArgs:this._contextArgs,
isEditing:true}));},






render:function(){
if(!this.root)
throw new Error('render called on UFIAddCommentController with no root');


p.getFeedbackTarget(this.id,function(t){
if(t.cancomment&&t.actorforpost)
m.get(t.actorforpost,function(u){
var v=this.renderAddComment
(u,
t.mentionsdatasource,
t.showsendonentertip);




this._addComment=
l.renderOrUpdateComponent(v,this.root);}.
bind(this));}.

bind(this));}});



e.exports=s;});

/** js/components/ReactLegacyScrollableArea/ReactLegacyScrollableArea.js */
__d("ReactLegacyScrollableArea",["ReactDOM","Scrollable","Bootloader","React","Style"],function(a,b,c,d,e,f){var g=b('ReactDOM');




b('Scrollable');

var h=b('Bootloader'),
i=b('React'),
j=b('Style'),

k={uiScrollableArea:true,native:true},
l={uiScrollableAreaWrap:true,scrollable:true},
m={uiScrollableAreaBody:true},
n={uiScrollableAreaContent:true},

o=i.createComponent
({render:function(){
var p=
{height:this.props.height?this.props.height+'px':'auto'};


return (g.div({classSet:k,ref:"root",style:p,children:
g.div({classSet:l,children:
g.div({classSet:m,ref:"body",children:
g.div({classSet:n,children:
this.props.children})})})}));},







onDomReady:function(){
h.loadModules
(['ScrollableArea'],
this._loadScrollableArea.bind(this));},



_loadScrollableArea:function(p){
this._area=p.fromNative(this.refs.root.getDOMNode(),
{fade:this.props.fade,
persistent:this.props.persistent});


var q=this.refs.body.getDOMNode();




j.set(q,'width',this.props.width+'px');

this.props.onScroll&&this._area.subscribe('scroll',this.props.onScroll);}});



e.exports=o;});

/** js/components/CloseButton/CloseButton.js */
__d("CloseButton",["ReactDOM","Layout","React","ReactUtils"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('Layout'),
i=b('React'),
j=b('ReactUtils'),
















k=i.createComponent

({render:function(){
var l=this.props,

m=l.size||h.size.medium,
n=l.appearance||h.appearance.normal,


o=m===h.size.small,
p=m===h.size.huge,
q=n===h.appearance.dark,
r=n===h.appearance.inverted,





s=
{uiCloseButton:true,
uiCloseButtonSmall:o,
uiCloseButtonHuge:p,
uiCloseButtonSmallDark:o&&q,
uiCloseButtonSmallInverted:o&&r,
uiCloseButtonDark:!o&&q,
uiCloseButtonInverted:!o&&r},


t=[s,l.classSet],

u=
(g.a
({href:"#",
role:"button",
'aria-label':l.tooltip,
'data-hover':l.tooltip&&'tooltip',
'data-tooltip-alignh':l.tooltip&&'center',
classSet:t}));











u.props=j.merge(l,u.props);
return u;}});




e.exports=k;});

/** js/components/Hovercard/HovercardLink.js */
__d("HovercardLink",["URI"],function(a,b,c,d,e,f){



var g=b('URI'),

h=



{getBaseURI:function(){
return g('/ajax/hovercard/hovercard.php');},


constructEndpoint:function(i,j){
var k=new g(h.getBaseURI()).
setQueryData({id:i.id});



if(i.weakreference&&j){
var l=
{group_id:j};


k.addQueryData({extragetparams:JSON.stringify(l)});}


return k;}};



e.exports=h;});

/** js/components/Link/Link.js */
__d("Link",["ReactDOM","React","UntrustedLink","$","mergeInto"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('React'),
i=b('UntrustedLink'),

j=b('$'),
k=b('mergeInto'),

l=h.createComponent

({_installLinkshimOnMouseDown:function(event){
var m=this.props.href;
if(m.shimhash)
i.bootstrap(j(this._rootDomId),m.shimhash);

this.props.onMouseDown&&this.props.onMouseDown(event);},


render:function(){
var m=this.props.href,






n=g.a({});
k(n.props,this.props);

if(m){
n.props.href=m.url;

var o=!!m.shimhash;
if(o){
n.props.rel=n.props.rel?
(n.props.rel+' nofollow'):
'nofollow';

n.props.onMouseDown=this._installLinkshimOnMouseDown.bind(this);}}



return n;}});



e.exports=l;});

/** js/components/Hovercard/HovercardLinkInterpolator.js */
__d("HovercardLinkInterpolator",["ReactDOM","HovercardLink","Link","cx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('HovercardLink'),
i=b('Link'),

j=b('cx');

function k(l,m,n,o){
var p=m.entities[0],


q=n||(p.external?'_blank':null),

r;
if(p.weakreference){
var s={};
s["_1kx-"]=true;

r=
i({classSet:s,href:p,target:q,children:
[g.i({classSet:{UFIWeakReferenceIcon:true}}),
l]});}else 


r=i({href:p,content:l,target:q});


if(!p.external)

r.props['data-hovercard']=
h.constructEndpoint(p,o).toString();


return r;}


e.exports=k;});

/** js/components/LinkButton/LinkButton.js */
__d("LinkButton",["ReactDOM"],function(a,b,c,d,e,f){var g=b('ReactDOM'),







h=function(i){
var j=i.name&&i.value?
i.name+'['+encodeURIComponent(i.value)+']':
null;


return (g.label
({classSet:
{uiLinkButton:true,
uiLinkButtonSubtle:i.subtle,
async_throbber:i.showSaving},
children:
g.input
({type:i.inputType||'button',
name:j,
value:i.label,
classSet:{stat_elem:i.showSaving}})}));};





e.exports=h;});

/** js/components/ProfileBrowser/ProfileBrowserLink.js */
__d("ProfileBrowserLink",["URI"],function(a,b,c,d,e,f){



var g=b('URI'),

h='/ajax/browser/dialog/',
i='/browse/',

j=function(l,m,n){
return new g(l+m).
setQueryData(n);},


k=
{constructPageURI:function(l,m){
return j(i,l,m);},


constructDialogURI:function(l,m){
return j(h,l,m);}};



e.exports=k;});

/** js/components/ProfileBrowser/ProfileBrowserTypes.js */
__d("ProfileBrowserTypes",[],function(a,b,c,d,e,f){



var g=

{LIKES:'likes',
GROUP_MESSAGE_VIEWERS:'group_message_viewers',
MUTUAL_FRIENDS:'mutual_friends'};


e.exports=g;});

/** js/components/Timestamp/Timestamp.js */
__d("Timestamp",["ReactDOM","LiveTimer","React"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('LiveTimer'),
i=b('React'),

j=i.createComponent
({render:function(){
var k=
h.renderRelativeTimeToServer(this.props.time),
l=k.text;
if(!l)
l=this.props.text;


var m={livetimestamp:true};
if(this.props.className)
m[this.props.className]=true;



return (g.abbr
({classSet:m,
title:this.props.verbose,
'data-utime':this.props.time,
content:l}));}});





e.exports=j;});

/** js/modules/emoticons/EmoteTypes.js */
__d("EmoteTypes",[],function(a,b,c,d,e,f){


f.TEXT='text';
f.EMOTE='emote';
f.EMOTE_FBID='emote_fbid';});

/** js/modules/emoticons/EmoticonsList.js */
__d("EmoticonsList",[],function(a,b,c,d,e,f){















e.exports=
{emotes:
{":)":"smile",
":-)":"smile",
":]":"smile",
"=)":"smile",
":(":"frown",
":-(":"frown",
":[":"frown",
"=(":"frown",
":P":"tongue",
":-P":"tongue",
":-p":"tongue",
":p":"tongue",
"=P":"tongue",
"=D":"grin",
":-D":"grin",
":D":"grin",
":o":"gasp",
":-O":"gasp",
":O":"gasp",
":-o":"gasp",
";)":"wink",
";-)":"wink",
"8)":"glasses",
"8-)":"glasses",
"B)":"glasses",
"B-)":"glasses",
"B|":"sunglasses",
"8-|":"sunglasses",
"8|":"sunglasses",
"B-|":"sunglasses",
">:(":"grumpy",
">:-(":"grumpy",
":/":"unsure",
":-/":"unsure",
":\\":"unsure",
":-\\":"unsure",
":'(":"cry",
"3:)":"devil",
"3:-)":"devil",
"O:)":"angel",
"O:-)":"angel",
":*":"kiss",
":-*":"kiss",
"<3":"heart",
"&lt;3":"heart",
"♥":"heart",
"^_^":"kiki",
"-_-":"squint",
"o.O":"confused",
"O.o":"confused_rev",
">:o":"upset",
">:O":"upset",
">:-O":"upset",
">:-o":"upset",
">_<":"upset",
">.<":"upset",
":v":"pacman",
":|]":"robot",
":3":"colonthree",
"<(\")":"penguin",
":putnam:":"putnam",
"(^^^)":"shark",
"(y)":"like",
":like:":"like",
"(Y)":"like",
":poop:":"poop",
":gregor:":"poop"},

symbols:
{smile:":)",
frown:":(",
tongue:":P",
grin:"=D",
gasp:":o",
wink:";)",
glasses:"8)",
sunglasses:"B|",
grumpy:">:(",
unsure:":/",
cry:":'(",
devil:"3:)",
angel:"O:)",
kiss:":*",
heart:"<3",
kiki:"^_^",
squint:"-_-",
confused:"o.O",
confused_rev:"O.o",
upset:">:o",
pacman:":v",
robot:":|]",
colonthree:":3",
penguin:"<(\")",
putnam:":putnam:",
shark:"(^^^)",
like:"(y)",
poop:":poop:"},

regexp:/(?:^|[\s'".])(:\)|:\-\)|:\]|=\)|:\(|:\-\(|:\[|=\(|:P|:\-P|:\-p|:p|=P|=D|:\-D|:D|:o|:\-O|:O|:\-o|;\)|;\-\)|8\)|8\-\)|B\)|B\-\)|B\||8\-\||8\||B\-\||>:\(|>:\-\(|:\/|:\-\/|:\\|:\-\\|:'\(|3:\)|3:\-\)|O:\)|O:\-\)|:\*|:\-\*|<3|&lt;3|\u2665|\^_\^|\-_\-|o\.O|O\.o|>:o|>:O|>:\-O|>:\-o|>_<|>\.<|:v|:\|\]|:3|<\("\)|:putnam:|\(\^\^\^\)|\(y\)|:like:|\(Y\)|:poop:|:gregor:)(?:[\s'".,!?]|<br>|$)/};});

/** js/modules/emoticons/createEmoteTokenizer.js */
__d("createEmoteTokenizer",["EmoteTypes"],function(a,b,c,d,e,f){



var g=b('EmoteTypes'),
h=40;

function i(j){
return function(k){
var l=k,
m=[],
n=h;
while(n--){
var o=j.regexp.exec(l);
if(!o||!o.length)
break;


var p=o[1],
q=l.indexOf(p),


r=l.substring(0,q);
if(r)
m.push
({type:g.TEXT,
text:r});



var s=j.emotes[p];
if(s){
m.push
({type:g.EMOTE,
text:p,
emote:s});}else 


m.push
({type:g.TEXT,
text:p});



l=l.substring(q+p.length);}


if(l)
m.push
({type:g.TEXT,
text:l});



return m;};}



e.exports=i;});

/** js/modules/emoticons/emoteFBIDTokenizer.js */
__d("emoteFBIDTokenizer",["EmoteTypes"],function(a,b,c,d,e,f){



var g=b('EmoteTypes'),

h=/\[\[([a-z\d\.]+)\]\]/gi;
function i(j){
return j.split(h).map(function(k,l){
if(l%2===0){

return {type:g.TEXT,
text:k};}else 



return {type:g.EMOTE_FBID,
text:'[['+k+']]',
value:k};});}





e.exports=i;});

/** js/modules/Emote.js */
__d("Emote",["DOM","EmoteTypes","EmoticonsList","createEmoteTokenizer","emoteFBIDTokenizer","flattenArray","htmlize"],function(a,b,c,d,e,f){



var g=b('DOM'),
h=b('EmoteTypes'),
i=b('EmoticonsList'),

j=b('createEmoteTokenizer'),
k=b('emoteFBIDTokenizer'),
l=b('flattenArray'),
m=b('htmlize'),

n=j(i),

o=e.exports={};
o.htmlEmoteWithoutFBID=function(p,q){
if(typeof q!='function')
q=m;


return l(n(p).map(function(r){
if(r.type===h.TEXT){
return q(r.text);}else
if(r.type===h.EMOTE)

return ['<span class="emoticon_text" aria-hidden="true">',
r.text,
'</span>',
g.create('span',{},
g.create('span',
{className:'emoticon emoticon_'+r.emote})).

innerHTML];})).


join('');};


o.htmlEmote=function(p,q){
if(typeof q!='function')
q=m;


return l(k(p).map(function(r){
if(r.type===h.TEXT){
return o.htmlEmoteWithoutFBID(r.text,q);}else
if(r.type===h.EMOTE_FBID)

return ['<span class="emoticon_text" aria-hidden="true">',
r.text,
'</span>',
g.create('span',{},
g.create('img',
{alt:r.text,
className:'emoticon emoticon_custom',
src:window.location.protocol+'//graph.facebook.com/'+
encodeURIComponent(r.value)+'/picture'})).

innerHTML];})).


join('');};});

/** js/modules/SupportedEmoji.js */
__d("SupportedEmoji",["cx"],function(a,b,c,d,e,f){

























var g=b('cx');

e.exports=
{utf16Regex:/[\u203C\u2049\u2100-\u21FF\u2300-\u27FF\u2900-\u29FF\u2B00-\u2BFF\u3000-\u30FF\u3200-\u32FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDEFF]/,

emoji:
{127744:"_2b_",
127746:"_2c0",
127754:"_2c1",
127769:"_2c2",
127775:"_2c3",
127793:"_2c4",
127796:"_2c5",
127797:"_2c6",
127799:"_2c7",
127800:"_2c8",
127801:"_2c9",
127802:"_2ca",
127803:"_2cb",
127806:"_2cc",
127808:"_2cd",
127809:"_2ce",
127810:"_2cf",
127811:"_2cg",
127818:"_2ch",
127822:"_2ci",
127827:"_2cj",
127828:"_2ck",
127864:"_2cl",
127866:"_2cm",
127873:"_2cn",
127875:"_2co",
127876:"_2cp",
127877:"_2cq",
127880:"_2cr",
127881:"_2cs",
127885:"_2ct",
127886:"_2cu",
127887:"_2cv",
127888:"_2cw",
127891:"_2cx",
127925:"_2cy",
127926:"_2cz",
127932:"_2c-",
128013:"_2c_",
128014:"_2d0",
128017:"_2d1",
128018:"_2d2",
128020:"_2d3",
128023:"_2d4",
128024:"_2d5",
128025:"_2d6",
128026:"_2d7",
128027:"_2d8",
128031:"_2d9",
128032:"_2da",
128033:"_2db",
128037:"_2dc",
128038:"_2dd",
128039:"_2de",
128040:"_2df",
128041:"_2dg",
128043:"_2dh",
128044:"_2di",
128045:"_2dj",
128046:"_2dk",
128047:"_2dl",
128048:"_2dm",
128049:"_2dn",
128051:"_2do",
128052:"_2dp",
128053:"_2dq",
128054:"_491",
128055:"_2dr",
128056:"_2ds",
128057:"_2dt",
128058:"_2du",
128059:"_2dv",
128062:"_2dw",
128064:"_2dx",
128066:"_2dy",
128067:"_2dz",
128068:"_2d-",
128069:"_2d_",
128070:"_2e0",
128071:"_2e1",
128072:"_2e2",
128073:"_2e3",
128074:"_2e4",
128075:"_2e5",
128076:"_2e6",
128077:"_2e7",
128078:"_2e8",
128079:"_2e9",
128080:"_2ea",
128102:"_2eb",
128103:"_2ec",
128104:"_2ed",
128105:"_2ee",
128107:"_2ef",
128110:"_2eg",
128111:"_2eh",
128113:"_2ei",
128114:"_2ej",
128115:"_2ek",
128116:"_2el",
128117:"_2em",
128118:"_2en",
128119:"_2eo",
128120:"_2ep",
128123:"_2eq",
128124:"_2er",
128125:"_2es",
128126:"_2et",
128127:"_2eu",
128128:"_2ev",
128130:"_2ew",
128131:"_2ex",
128133:"_2ey",
128139:"_2ez",
128143:"_2e-",
128144:"_2e_",
128145:"_2f0",
128147:"_2f1",
128148:"_2f2",
128150:"_2f3",
128151:"_2f4",
128152:"_2f5",
128153:"_2f6",
128154:"_2f7",
128155:"_2f8",
128156:"_2f9",
128157:"_2fa",
128162:"_2fb",
128164:"_2fc",
128166:"_2fd",
128168:"_2fe",
128169:"_2ff",
128170:"_2fg",
128187:"_2fh",
128189:"_2fi",
128190:"_2fj",
128191:"_2fk",
128192:"_2fl",
128222:"_2fm",
128224:"_2fn",
128241:"_2fo",
128242:"_2fp",
128250:"_2fq",
128276:"_2fr",
128293:"_492",
128513:"_2fs",
128514:"_2ft",
128515:"_2fu",
128516:"_2fv",
128518:"_2fw",
128521:"_2fx",
128523:"_2fy",
128524:"_2fz",
128525:"_2f-",
128527:"_2f_",
128530:"_2g0",
128531:"_2g1",
128532:"_2g2",
128534:"_2g3",
128536:"_2g4",
128538:"_2g5",
128540:"_2g6",
128541:"_2g7",
128542:"_2g8",
128544:"_2g9",
128545:"_2ga",
128546:"_2gb",
128547:"_2gc",
128548:"_2gd",
128549:"_2ge",
128552:"_2gf",
128553:"_2gg",
128554:"_2gh",
128555:"_2gi",
128557:"_2gj",
128560:"_2gk",
128561:"_2gl",
128562:"_2gm",
128563:"_2gn",
128565:"_2go",
128567:"_2gp",
128568:"_2gq",
128569:"_2gr",
128570:"_2gs",
128571:"_2gt",
128572:"_2gu",
128573:"_2gv",
128575:"_2gw",
128576:"_2gx",
128587:"_2gy",
128588:"_2gz",
128589:"_2g-",
128591:"_2g_",
9757:"_2h0",
9786:"_2h1",
9889:"_2h2",
9924:"_2h3",
9994:"_2h4",
9995:"_2h5",
9996:"_2h6",
9728:"_2h7",
9729:"_2h8",
9748:"_2h9",
9749:"_2ha",
10024:"_2hb",
10084:"_2hc"}};});

/** js/modules/Utf16.js */
__d("Utf16",[],function(a,b,c,d,e,f){



var g=




{decode:function(h){
switch(h.length){
case 1:
return h.charCodeAt(0);
case 2:
return 65536|
((h.charCodeAt(0)-55296)*1024)|
(h.charCodeAt(1)-56320);}},







encode:function(h){
if(h<65536){
return String.fromCharCode(h);}else 

return String.fromCharCode(55296+((h-65536)>>10))+
String.fromCharCode(56320+(h%1024));}};




e.exports=g;});

/** js/modules/Emoji.js */
__d("Emoji",["cx","DOM","Emote","SupportedEmoji","htmlize","Utf16"],function(a,b,c,d,e,f){





var g=b('cx'),
h=b('DOM'),
i=b('Emote'),
j=b('SupportedEmoji'),
k=b('htmlize'),
l=b('Utf16'),

m=40,

n=e.exports=
{htmlEmojiAndEmote:function(o,p){
return n.htmlEmoji(o,function(q){
return i.htmlEmote(q,p);});},



htmlEmoji:function(o,p){
if(typeof p!='function')
p=k;


var q=o,
r=[],
s=m;
while(s--){
var t=j.utf16Regex.exec(q);
if(!t||!t.length)
break;

var u=t[0],
v=q.indexOf(u);
r.push(p(q.substring(0,v)));

var w=l.decode(u);

if(j.emoji[w]){
var x="_1az _1a-"+' '+
j.emoji[w],
y=h.create('span',{className:x});


r.push(h.create('span',{},y).innerHTML);}else 

r.push(p(u));


q=q.substring(v+u.length);}


r.push(p(q));

return r.join('');}};});

/** js/components/ReactTextWithEmoticons/ReactTextWithEmoticons.js */
__d("ReactTextWithEmoticons",["ReactDOM","Emoji","Emote","React"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('Emoji'),
i=b('Emote'),
j=b('React'),

k=j.createComponent
({render:function(){
if(!this.props.renderEmoticons&&!this.props.renderEmoji)
return g.span({content:this.props.text});


var l;
if(this.props.renderEmoticons&&this.props.renderEmoji){
l=h.htmlEmoji(this.props.text,i.htmlEmoteWithoutFBID);}else
if(this.props.renderEmoticons){
l=i.htmlEmoteWithoutFBID(this.props.text);}else 

l=h.htmlEmoji(this.props.text);


return g.span({dangerouslySetInnerHtml:{__html:l}});}});



e.exports=k;});

/** js/components/ReactTextWithEntities/ReactTextWithEntities.js */
__d("ReactTextWithEntities",["ReactDOM","Link","React","ReactTextWithEmoticons"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('Link'),
i=b('React'),
j=b('ReactTextWithEmoticons');




function k(q){
return (q).replace(/<3\b|&hearts;/g,'\u2665');}





function l(q,r){

return (h({href:r.entities[0],children:
[q]}));}







function m(q,r){
return q.offset-r.offset;}


function n(q){
return !!q;}





var o=/(\r\n|[\r\n])/,















p=i.createComponent






({_formatStandardText:function(q){
var r=q.split(o),
s=[];


for(var t=0;t<r.length;t++){
var u=r[t];
if(u)
if(o.test(u)){
s.push(g.br({}));}else
if(this.props.renderEmoticons||this.props.renderEmoji){
s.push
(j
({text:u,
renderEmoticons:this.props.renderEmoticons,
renderEmoji:this.props.renderEmoji}));}else 



s.push(k(u));}



return s;},


render:function(){
var q=0,
r=this.props.ranges,
s=this.props.aggregatedRanges,
t=this.props.text,

u=null;


if(r){
u=s?
r.concat(s):r.slice();}else
if(s)
u=s.slice();

if(u)
u.sort(m);


var v=[],
w=u?u.length:0;
for(var x=0,y=w;x<y;x++){
var z=u[x];
if(z.offset<q)
continue;


if(z.offset>q)
v=v.concat
(this._formatStandardText(t.substring(q,z.offset)));



var aa=t.substr(z.offset,z.length);
v=v.concat
([this.props.interpolator?
this.props.interpolator(aa,z):
l(aa,z)]);


q=z.offset+z.length;}


if(t.length>q)
v=
v.concat(this._formatStandardText(t.substr(q)));

return g.span({classSet:this.props.classSet,children:v});}});



e.exports=p;});

/** js/components/SeeMore/SeeMore.js */
__d("SeeMore",["ReactDOM","React","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('React'),
i=b('tx'),

j="...",
k="See More",
l=
{SeeMoreLink:true,
fss:true},



m=h.createComponent
({getInitialState:function(){

return {isCollapsed:true};},



render:function(){
var n=this.state.isCollapsed,

o=!n?null:g.span({content:j}),
p=this.props.children[0],
q=n?null:g.span({children:this.props.children[1]}),
r=!n?null:
g.a
({classSet:l,
onClick:this.createStateUpdater({isCollapsed:false}),
content:k,
href:"#",
role:"button"});



return (g.span({classSet:this.props.classSet,children:
[p,
o,
r,
q]}));}});





e.exports=m;});

/** js/components/TruncatedTextWithEntities/TruncatedTextWithEntities.js */
__d("TruncatedTextWithEntities",["ReactDOM","React","ReactTextWithEntities","SeeMore"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('React'),
i=b('ReactTextWithEntities'),
j=b('SeeMore');







function k(o,p){
var q=o.offset+o.length;
return p>o.offset&&p<q;}









function l(o,p){
for(var q=0;q<o.length;q++){
var r=o[q];
if(k(r,p))

return r.offset;}


return p;}









var m=function(o,p,q){
var r=[],
s=[],
t=l(p,q);
for(var u=0;u<p.length;u++){
var v=p[u];
if(v.offset<t){
r.push(v);}else 

s.push
({offset:v.offset-t,
length:v.length,
entities:v.entities});}




return {first:
{ranges:r,
text:o.substr(0,t)},

second:
{ranges:s,
text:o.substr(t)}};},

















n=h.createComponent
({render:function(){
var o=this.props.maxLines,
p=this.props.maxLength,
q=this.props.truncationPercent||.6,
r=Math.floor(q*p),
s=this.props.text||'',
t=this.props.ranges||[],

u=s.split('\n'),
v=u.length-1,

w=p&&s.length>p,
x=o&&v>o;
if(x)
r=Math.min
(u.slice(0,o).join('\n').length,
r);




if(w||x){
var y=
m(s,t,r);

return (g.span({'data-ft':this.props['data-ft'],dir:this.props.dir,children:
j({classSet:this.props.classSet,children:
[i
({interpolator:this.props.interpolator,
ranges:y.first.ranges,
text:y.first.text,
renderEmoticons:this.props.renderEmoticons,
renderEmoji:this.props.renderEmoji}),

i
({interpolator:this.props.interpolator,
ranges:y.second.ranges,
text:y.second.text,
renderEmoticons:this.props.renderEmoticons,
renderEmoji:this.props.renderEmoji})]})}));}else 






return (g.span({'data-ft':this.props['data-ft'],dir:this.props.dir,children:
i
({classSet:this.props.classSet,
interpolator:this.props.interpolator,
ranges:t,
text:s,
renderEmoticons:this.props.renderEmoticons,
renderEmoji:this.props.renderEmoji})}));}});







e.exports=n;});

/** js/components/UFI/UFIReplyLink.js */
__d("UFIReplyLink",["ReactDOM","React","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('React'),

i=b('tx'),

j=h.createComponent
({render:function(){

return (g.a
({href:"#",
onClick:this.props.onClick,children:
"Reply"}));}});





e.exports=j;});

/** js/components/UFI/UFISpamCount.js */
__d("UFISpamCount",["UFISpamCountImpl"],function(a,b,c,d,e,f){



























e.exports=b('UFISpamCountImpl').module||
{enabled:false};});

/** js/components/UFI/UFIComment.js */
__d("UFIComment",["ReactDOM","function-extensions","AbstractEvent","Bootloader","CloseButton","Env","Focus","HovercardLink","HovercardLinkInterpolator","ImageBlock","Layout","LinkButton","ProfileBrowserLink","ProfileBrowserTypes","React","ReactUtils","Timestamp","TruncatedTextWithEntities","UFIClassSets","UFIConstants","UFIInstanceState","UFIReplyLink","UFISpamCount","UFITrackingNodes","URI","tx","UFIConfig"],function(a,b,c,d,e,f){var g=b('ReactDOM');











b('function-extensions');

var h=b('AbstractEvent'),
i=b('Bootloader'),
j=b('CloseButton'),
k=b('Env'),
l=b('Focus'),
m=b('HovercardLink'),
n=b('HovercardLinkInterpolator'),
o=b('ImageBlock'),
p=b('Layout'),
q=b('LinkButton'),
r=b('ProfileBrowserLink'),
s=b('ProfileBrowserTypes'),
t=b('React'),
u=b('ReactUtils'),
v=b('Timestamp'),
w=b('TruncatedTextWithEntities'),
x=b('UFIClassSets'),
y=b('UFIConstants'),
z=b('UFIInstanceState'),
aa=b('UFIReplyLink'),
ba=b('UFISpamCount'),
ca=y.UFIStatus,
da=b('UFITrackingNodes'),
ea=b('URI'),

fa=b('tx'),

ga=b('UFIConfig'),

ha=' \u00b7 ',

ia={UFICommentBody:true},
ja={UFICommentActorName:true},
ka={UFICommentNotSpamLink:true},

la=u.keyMirror
({edit:true,
hide:true,
remove:true}),


ma=
{UFICommentActions:true,
fsm:true,
fwn:true,
fcg:true},


na={UFIFailureMessage:true},
oa={UFIFailureMessageIcon:true},
pa={UFITranslateLink:true},
qa={UFITranslatedText:true},
ra={UFICommentLikeButton:true},
sa={UFICommentLikeIcon:true},

ta={uiLinkSubtle:true},
ua={stat_elem:true},
va={pls:true},
wa={fcg:true},


xa=27,















ya=null,

za=function(hb,ib){
var jb=new ea('/ajax/like/tooltip.php').
setQueryData
({comment_fbid:hb.fbid,
comment_from:hb.author,
cache_buster:hb.likeconfirmhash||0});


if(ib)
jb.addQueryData({viewas:ib});


return jb;},


ab=function(hb){
var ib=hb.status;
return ib===ca.FAILED_ADD||ib===ca.FAILED_EDIT;};







function bb(hb){
return hb.commenterIsFOF!==undefined&&
hb.userIsMinor!==undefined&&
hb.reportLink!==undefined;}





var cb=t.createComponent
({render:function(){
var hb=this.props.comment,
ib=hb.likecount||0,

jb=s.LIKES,
kb={id:hb.fbid},

lb=za(this.props.comment,this.props.viewas),

mb=g.i({classSet:sa}),
nb=g.span({content:ib});


return (g.a
({classSet:ra,
href:"#",
role:"button",
rel:"dialog",
'data-hover':"tooltip",
'data-tooltip-alignh':"center",
'data-tooltip-uri':lb.toString(),
ajaxify:r.constructDialogURI(jb,kb).toString(),
href:r.constructPageURI(jb,kb).toString(),children:
[mb,
nb]}));}}),









db=t.createComponent

({render:function(){
var hb=this.props,
ib=hb.comment,
jb=hb.feedback,
kb=hb.markedAsSpamHere,
lb=ib.status===ca.SPAM_DISPLAY,
mb=this.props.showReplyLink,

nb,
ob,
pb,
qb,
rb,
sb,




tb=
!ib.islocal&&
ib.status!==ca.LIVE_DELETED;

if(tb){
if(lb&&!kb){
if(hb.viewerCanMarkNotSpam)
nb=
g.a
({onClick:hb.onMarkAsNotSpam,
classSet:ka,
content:"Not Spam",
href:"#",
role:"button"});}else{



if(jb.viewercanlike){
var ub=
da.getTrackingInfo
(ib.hasviewerliked?
da.types.UNLIKE_LINK:
da.types.LIKE_LINK),


vb=ib.hasviewerliked?
"Unlike this comment":
"Like this comment";

ob=
g.a
({href:"#",
role:"button",
onClick:hb.onCommentLikeToggle,
'data-ft':ub,
title:vb,
content:ib.hasviewerliked?"Unlike":"Like"});}


if(jb.isthreaded&&jb.cancomment&&mb)
rb=
aa
({comment:ib,
onClick:hb.onCommentReply,
contextArgs:hb.contextArgs});


if(ib.likecount>0)
pb=
cb
({comment:ib,
viewas:this.props.viewas,
contextArgs:this.props.contextArgs});


if(ib.spamcount&&ba.enabled)
qb=ba({count:ib.spamcount});}


if(ib.attachment&&ib.canremove)

sb=
g.a
({onClick:hb.onPreviewRemove,
content:"Remove Preview",
href:"#",
role:"button"});}




var wb=
eb
({comment:ib,
onRetrySubmit:hb.onRetrySubmit,
showPermalink:hb.showPermalink}),


xb;
if(hb.contextArgs.entstream){
xb=
[wb,
ob,
pb,
rb,
qb,
nb,
sb];}else

if(jb.isthreaded){
xb=
[ob,
rb,
nb,
sb,
pb,
qb,
wb];}else 


xb=
[wb,
ob,
pb,
qb,
rb,
nb,
sb];



var yb=[];
for(var zb=0;zb<xb.length;zb++)
if(xb[zb]){
yb.push(ha);
yb.push(xb[zb]);}


yb.shift();


return (g.div({classSet:ma,children:
yb}));}}),






eb=t.createComponent
({render:function(){
var hb=this.props.comment,

ib=this.props.onRetrySubmit,

jb,
kb;

if(ab(hb)){
jb=
[g.span({classSet:na,children:
[g.i({classSet:oa}),
"Unable to post comment."]}),

hb.allowRetry&&ib?
[' ',
g.a({onClick:ib,href:"#",role:"button",children:
"Try Again"})]:

null];}else{


var lb=this.props.showPermalink?hb.permalink:null,
mb=
da.getTrackingInfo(da.types.SOURCE),

nb=
g.a
({classSet:ta,
href:lb,
'data-ft':mb,children:
v
({time:hb.timestamp.time,
text:hb.timestamp.text,
verbose:hb.timestamp.verbose})}),


ob;
switch(hb.source){
case y.UFISourceType.MOBILE:
ob=
g.a
({classSet:ta,
href:new ea('/mobile/').setSubdomain('www').toString(),
content:"mobile"});

break;
case y.UFISourceType.SMS:
ob=
g.a
({classSet:ta,
href:new ea('/mobile/?v=texts').setSubdomain('www').toString(),
content:"text message"});

break;
case y.UFISourceType.EMAIL:
ob=
q
({subtle:true,
label:"email",
inputType:"submit",
name:"email_explain",
value:true,
classSet:ua});

break;}


kb=ob?
fa._("{time} via {source}",{time:nb,source:ob}):
nb;}


var pb=null;
if(hb.timestamp.original){
var qb=new ea('/ajax/edits/browser/comment').
addQueryData({comment_token:hb.id}).
toString();

pb=
[ha,
g.a
({ref:"EditLink",
href:"#",
role:"button",
rel:"dialog",
className:"uiLinkSubtle",
ajaxify:qb,
'data-hover':"tooltip",
title:"Show edit history",
content:"Edited"})];}






return (g.span({children:
[kb,
jb,
pb]}));},




propTrigger:function(hb){
var ib=this.props.comment,
jb=hb.comment;

if(!ib.editnux&&!!jb.editnux)
i.loadModules(['ContextualDialogX'],
function(kb){
var lb=new kb();
lb.init(jb.editnux).
setContext(this.refs.EditLink.getDOMNode()).
setWidth(300).
setPosition('below').
show();}.
bind(this));}}),





fb=t.createComponent
({render:function(){
var hb=this.props.topMutualFriend,
ib=this.props.otherMutualCount,
jb=this.props.commentAuthor,

kb=
m.constructEndpoint(hb).toString(),
lb=
g.a
({href:hb.uri,
content:hb.name,
'data-hovercard':kb}),




mb=jb.name.length+hb.name.length,

nb;
if(ib===0){
nb=fa._("Friends with {name}",{name:lb});}else
if(mb<xa){
var ob;
if(ib==1){
ob="1 other";}else 

ob=
fa._("{count} others",{count:ib});


nb=fa._("Friends with {name} and {others}",
{name:lb,
others:this.getOthersLink(ob,jb,hb)});}else{


var pb=fa._("{count} mutual friends",
{count:ib+1});


nb=this.getOthersLink(pb,jb);}



return (g.span({classSet:{UFICommentSocialContext:true},children:
[ha,
nb]}));},




getOthersLink:function(hb,ib,jb){
var kb=s.MUTUAL_FRIENDS,
lb={uid:ib.id},

mb=new ea('/ajax/mutual_friends/tooltip.php').
setQueryData({friend_id:ib.id});

if(jb)
mb.addQueryData({exclude_id:jb.id});


var nb=
r.constructDialogURI(kb,lb).toString();


return (g.a
({rel:"dialog",
'data-hover':"tooltip",
'data-tooltip-alignh':"center",
'data-tooltip-uri':mb.toString(),
ajaxify:nb,
href:r.constructPageURI(kb,lb).toString(),children:
hb}));}}),








gb=t.createComponent
({getInitialState:function(){

return {isHighlighting:this.props.comment.highlightcomment,
wasHighlighted:this.props.comment.highlightcomment,
markedAsSpamHere:false,
oneClickRemovedHere:false,
isInlinePageDeleted:false,
isInlineBanned:false};},



_onHideAsSpam:function(event){
this.props.onHideAsSpam(event);
this.updateState({markedAsSpamHere:true});},


_onMarkAsNotSpam:function(event){
this.props.onMarkAsNotSpam(event);
this.updateState({markedAsSpamHere:false});},


_onDeleteSpam:function(event){
this.props.onOneClickRemove(event);
this.updateState({isInlinePageDeleted:true});},


_onUndoDeleteSpam:function(event){
this.props.onUndoOneClickRemove(event);
this.updateState({isInlinePageDeleted:false});},


_onInlineBan:function(event){
this.props.onInlineBan(event);
this.updateState({isInlineBanned:true});},


_onUndoInlineBan:function(event){
this.props.onUndoInlineBan(event);
this.updateState({isInlineBanned:false});},






_onOneClickRemove:function(event){
this.props.onOneClickRemove(event);
this.updateState({oneClickRemovedHere:true});},


_onUndoOneClickRemove:function(event){
this.props.onUndoOneClickRemove(event);
this.updateState({oneClickRemovedHere:false});},


_onAction:function(event,hb){
if(hb===la.remove){
this.props.onRemove(event);}else
if(hb===la.edit){
this.props.onEdit(event);}else
if(hb===la.hide)
this._onHideAsSpam(event);},



_createRemoveReportMenu:function(event){
if(this._removeReportMenu)return;
var hb=
[{label:"Delete Comment...",value:la.remove},
{label:"Hide Comment",value:la.hide}],





ib=h.persistentCloneOf(event),
jb=ib.target;

i.loadModules(['UFILegacyUtils'],function(kb){
this._removeReportMenu=kb.createCommentMenu
(jb,
hb,
this._onAction.bind(this,ib));}.

bind(this));},


_createEditDeleteMenu:function(event){
var hb=h.persistentCloneOf(event);
if(this._editDeleteMenu)return;
var ib=
[{label:"Edit...",value:la.edit},
{label:"Delete...",value:la.remove}];


i.loadModules(['UFILegacyUtils'],function(jb){
this._editDeleteMenu=jb.createCommentMenu
(hb.target,
ib,
this._onAction.bind(this,hb));}.

bind(this));},


_renderCloseButton:function(){
var hb=this.props.comment,
ib=this.props.feedback,

jb=null,
kb=null,
lb=false;

if(hb.canremove&&!this.props.hideAsSpamForPageAdmin){
if(this.props.viewerIsAuthor){
if(hb.canedit){

kb="Edit or Delete";
jb=this._createEditDeleteMenu.bind(this);
lb=true;}else{


kb="Remove";
jb=this.props.onRemove;}}else

if(ib.canremoveall)
if(this.props.showRemoveReportMenu){

kb="Remove or Report";
jb=this._createRemoveReportMenu.bind(this);}else{


kb="Remove";
jb=this._onOneClickRemove.bind(this);}}else


if(hb.canreport){

kb="Hide as Spam";
jb=this._onHideAsSpam.bind(this);}


var mb=
{UFICommentCloseButton:true,
UFIEditButton:lb,

hdn:jb===null};


return (j
({onClick:jb,
tooltip:kb,
classSet:mb}));},





onDomReady:function(hb){
var ib=this.props.comment.ufiinstanceid,
jb=z.getKeyForInstance
(ib,
'scrolloninsert');

if(this.state.isHighlighting||jb){
i.loadModules
(['UFIScrollHighlight'],
function(lb){



lb.actOn.curry(hb).defer();});


this.updateState({isHighlighting:false});}


var kb=z.getKeyForInstance
(ib,
'autofocus');

if(kb){
l.setWithoutOutline(this.refs.AuthorName.getDOMNode());
z.updateState
(ib,
'autofocus',
false);}},












needsRedraw:function(hb){

return (hb.comment!==this.props.comment||
hb.showReplyLink!==this.props.showReplyLink||
hb.showReplies!==this.props.showReplies);},








render:function(){
var hb=this.props.comment,
ib=this.props.feedback,
jb=hb.status===ca.DELETED,
kb=hb.status===ca.LIVE_DELETED,
lb=hb.status===ca.SPAM_DISPLAY,
mb=hb.status===ca.PENDING_UNDO_DELETE,
nb=this.state.markedAsSpamHere,
ob=this.state.oneClickRemovedHere,
pb=this.state.isInlinePageDeleted,
qb=this.props.hideAsSpamForPageAdmin,
rb=this.state.isInlineBanned,





sb=bb(hb),


tb=!hb.status&&(hb.isunseen||hb.islocal);


if(!hb.status&&ib.lastseentime){
var ub=hb.timestamp.original||hb.timestamp.time;



tb=tb||ub>ib.lastseentime;}




var vb=this.props.contextArgs.markedcomment;
if(vb&&vb==hb.legacyid)
tb=true;




var wb=null;

if(sb)
if(ya){
var xb,yb=null;

if(qb){
wb=rb?
this._onUndoInlineBan.bind(this):
this._onInlineBan.bind(this);

if(pb){


yb=this._onUndoDeleteSpam.bind(this);
var zb=
g.a({href:"#",content:"Undo",onClick:yb});
xb=fa._("You've deleted this comment so no one can see it. {undo}.",{undo:zb});}else
if(nb)


xb=this.getPageAdminNotice();}else

if(nb){


xb="This comment has been hidden as spam.";
yb=this._onMarkAsNotSpam.bind(this);}else
if(ob){


xb="This comment has been removed.";
yb=this._onUndoOneClickRemove.bind(this);}




if(xb)

return (g.li({classSet:x.ROW,children:
ya
({notice:xb,
comment:this.props.comment,
authorProfiles:this.props.authorProfiles,
onUndo:yb,
onBanAction:wb,
isInlineBanned:rb,
hideAsSpamForPageAdmin:qb})}));}else 





i.loadModules(['UFICommentRemovalControls'],
function(bc){

ya=bc;


this.updateState.bind(this,{}).defer();}.
bind(this));






var ac=
[x.ROW,

{UFIComment:true,
UFICommentFailed:ab(hb),
UFITranslucentComment:
jb||kb||lb||mb,
highlightComment:this.state.isHighlighting,
noDisplay:jb&&!ob,
UFILastComment:this.props.isLast,
UFIAuthorReply:this.props.isAuthorReply,
UFIPartialBorder:this.props.hasPartialBorder}];



if(tb)
ac.push(x.UNSEEN_ITEM);


return (g.li({classSet:ac,'data-ft':this.props['data-ft'],children:
this.renderComment()}));},




getPageAdminNotice:function(){
var hb=
g.a
({href:"#",
role:"button",
content:"Undo this",
onClick:this._onMarkAsNotSpam.bind(this)}),


ib=
g.a
({href:"#",
role:"button",
content:"delete this comment",
onClick:this._onDeleteSpam.bind(this)}),


jb=
fa._("You've hidden this comment so only the person who wrote it and their friends can see it. {undoThis} or {deleteThisComment}.",
{undoThis:hb,
deleteThisComment:ib});


return jb;},


renderComment:function(){
var hb=this.props,
ib=hb.comment,
jb=hb.feedback,
kb=hb.authorProfiles[ib.author],
lb=ib.status===ca.SPAM_DISPLAY,
mb=ib.status===ca.LIVE_DELETED,
nb=!(lb||mb),










ob=
jb.canremoveall||ib.hiddenbyviewer,


pb=null,
qb=null;
if(!hb.isLocallyComposed&&
!this.state.wasHighlighted&&
!ib.fromfetch){
qb=y.commentTruncationLength;
pb=y.commentTruncationMaxLines;}


var rb;
if(ib.attachment)
rb=
g.div
({isStatic:true,
dangerouslySetInnerHtml:ib.attachment.markup});



var sb=da.getTrackingInfo
(da.types.SMALL_ACTOR_PHOTO),

tb=
da.getTrackingInfo(da.types.USER_NAME),
ub=
da.getTrackingInfo(da.types.USER_MESSAGE),

vb=
{UFICommentContent:true},


wb=null,
xb=null;
if(ib.istranslatable&&(ib.translatedtext===undefined))
wb=
g.a
({href:"#",
role:"button",
title:"Translate this comment",
classSet:pa,
onClick:hb.onCommentTranslate,
content:"See Translation"});



if(ib.translatedtext){
var yb=new ea('http://bing.com/translator').
addQueryData({text:ib.body.text});

xb=
g.span({classSet:qa,children:
[ib.translatedtext,
g.span({classSet:va,children:
["(",g.a
({href:yb.toString(),
classSet:wa,
content:"Translated by Bing"}),
")"]})]});}




var zb;
if(k.rtl&&ib.body.dir==='ltr'){
zb='rtl';}else
if(!k.rtl&&ib.body.dir==='rtl')
zb='ltr';

var ac=m.constructEndpoint(kb).toString(),
bc=
g.a
({ref:"AuthorName",
classSet:ja,
href:kb.uri,
content:kb.name,
'data-hovercard':ac,
'data-ft':tb,
dir:zb}),


cc=function(hc,ic){
return n
(hc,
ic,
'_blank',
jb.grouporeventid);},


dc=
w
({classSet:ia,
interpolator:cc,
ranges:ib.body.ranges,
text:ib.body.text,
truncationPercent:y.commentTruncationPercent,
maxLength:qb,
maxLines:pb,
renderEmoticons:ga.renderEmoticons,
renderEmoji:ga.renderEmoji,
'data-ft':ub,
dir:ib.body.dir}),


ec;
if(ib.socialcontext){
var fc=ib.socialcontext,

gc=
fb
({topMutualFriend:hb.authorProfiles[fc.topmutualid],
otherMutualCount:fc.othermutualcount,
commentAuthor:kb});


ec=
[bc,gc,g.div({children:dc})];}else 

ec=[bc,' ',dc];



return (o
({spacing:p.spacing.medium,
imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[g.a
({href:kb.uri,
'data-hovercard':ac,
'data-ft':sb,children:
g.img
({src:kb.thumbSrc,
classSet:x.ACTOR_IMAGE,
alt:""})}),


g.div({children:
[g.div({classSet:vb,children:
[ec,
wb,
xb,
rb]}),

db
({comment:ib,
feedback:jb,
onBlingBoxClick:hb.onBlingBoxClick,
onCommentLikeToggle:hb.onCommentLikeToggle,
onCommentReply:hb.onCommentReply,
onPreviewRemove:hb.onPreviewRemove,
onRetrySubmit:hb.onRetrySubmit,
onMarkAsNotSpam:this._onMarkAsNotSpam.bind(this),
viewerCanMarkNotSpam:ob,
viewas:hb.contextArgs.viewas,
showPermalink:hb.showPermalink,
showReplyLink:hb.showReplyLink,
showReplies:hb.showReplies,
contextArgs:hb.contextArgs,
markedAsSpamHere:this.state.markedAsSpamHere})]}),


nb?this._renderCloseButton():null]}));}});





e.exports=gb;});

/** js/components/UFI/UFIContainer.js */
__d("UFIContainer",["ReactDOM","React","UFITrackingNodes"],function(a,b,c,d,e,f){var g=b('ReactDOM'),







h=b('React'),
i=b('UFITrackingNodes'),





j=h.createComponent
({render:function(){
var k=null;
if(this.props.hasNub)
k=
g.li({classSet:{UFIArrow:true},children:
g.i({})});



var l=
{UFIList:!this.props.isReplyList,
UFIReplyList:this.props.isReplyList,
UFITranslucentReplyList:this.props.isParentLiveDeleted};



return (g.ul
({classSet:l,
'data-ft':i.getTrackingInfo(i.types.UFI),children:
[k,
this.props.children]}));}});





e.exports=j;});

/** js/components/UFI/UFILikeSentenceText.js */
__d("UFILikeSentenceText",["ReactDOM","HovercardLinkInterpolator","ProfileBrowserLink","ProfileBrowserTypes","React","ReactTextWithEntities","URI"],function(a,b,c,d,e,f){var g=b('ReactDOM'),




h=b('HovercardLinkInterpolator'),
i=b('ProfileBrowserLink'),
j=b('ProfileBrowserTypes'),
k=b('React'),
l=b('ReactTextWithEntities'),
m=b('URI');












function n(p,q,r,s){
if(s.count!=null){
var t=j.LIKES,
u={id:p.targetfbid},

v=[];
for(var w=0;w<q.length;w++)

if(!q[w].count)
v.push(q[w].entities[0].id);



var x=new m('/ajax/like/tooltip.php').
setQueryData
({comment_fbid:p.targetfbid,
comment_from:p.actorforpost,


seen_user_fbids:v.length?v:true});



return (g.a
({rel:"dialog",
ajaxify:i.constructDialogURI(t,u).toString(),
href:i.constructPageURI(t,u).toString(),
'data-hover':"tooltip",
'data-tooltip-alignh':"center",
'data-tooltip-uri':x.toString(),children:
r}));}else 



return h(r,s);}



var o=k.createComponent
({render:function(){
var p=this.props.feedback,
q=this.props.likeSentenceData,

r=n.bind
(null,p,q.ranges);



return (l
({interpolator:r,
ranges:q.ranges,
aggregatedRanges:q.aggregatedranges,
text:q.text}));}});





e.exports=o;});

/** js/components/UFI/UFILikeSentence.js */
__d("UFILikeSentence",["ReactDOM","ImageBlock","LeftRight","ProfileBrowserLink","ProfileBrowserTypes","React","UFIClassSets","UFILikeSentenceText","URI","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),






h=b('ImageBlock'),
i=b('LeftRight'),
j=b('ProfileBrowserLink'),
k=b('ProfileBrowserTypes'),
l=b('React'),
m=b('UFIClassSets'),
n=b('UFILikeSentenceText'),
o=b('URI'),

p=b('tx'),

q=l.createComponent
({render:function(){
var r=this.props.feedback,
s=r.likesentences.current,
t=this.props.contextArgs.entstream,

u=[m.ROW,{UFILikeSentence:true}];
if(r.likesentences.isunseen)
u.push(m.UNSEEN_ITEM);


var v=null,
w=null;
if(s.text)
w=
n
({feedback:r,
likeSentenceData:s});



if(w&&!t){
v=g.i({classSet:{UFILikeIcon:true}});

if(r.viewercanlike&&!r.hasviewerliked)
v=
g.a
({classSet:{UFILikeThumb:true},
href:"#",
tabIndex:"-1",
title:"Like this item",
onClick:this.props.onTargetLikeToggle,children:
v});}




var x=null;
if(r.seencount>0&&!t){

var y=k.GROUP_MESSAGE_VIEWERS,
z={id:r.targetfbid},

aa=j.constructDialogURI(y,z),
ba=j.constructPageURI(y,z),

ca=new o('/ajax/ufi/seen_tooltip.php').
setQueryData
({ft_ent_identifier:r.entidentifier,
displayed_count:r.seencount}),


da=r.seenbyall?
"Seen by everyone":
p._("Seen by {count}",{count:r.seencount});

x=
g.a
({rel:"dialog",
ajaxify:aa.toString(),
href:ba.toString(),
tabindex:"-1",
'data-hover':"tooltip",
'data-tooltip-alignh':"left",
'data-tooltip-uri':ca.toString(),
classSet:
{UFISeenCount:true,
UFISeenCountRight:!!s.text},
children:
[g.span({classSet:{UFISeenCountIcon:true}}),
da]});}



var ea=null;
if(v&&w){
ea=
h
({imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[v,
w,
x]});}else

if(w&&t){
ea=
i({children:
[w,
x]});}else 


ea=x;



return (g.li({classSet:u,children:
ea}));}});





e.exports=q;});

/** js/components/UFI/UFIPager.js */
__d("UFIPager",["ReactDOM","ImageBlock","React","UFIClassSets"],function(a,b,c,d,e,f){var g=b('ReactDOM'),






h=b('ImageBlock'),
i=b('React'),
j=b('UFIClassSets'),

k=i.createComponent
({onPagerClick:function(l){
!this.props.isLoading&&
this.props.onPagerClick&&
this.props.onPagerClick();

l.nativeEvent.prevent();},

render:function(){
var l=this.onPagerClick.bind(this),
m=
{ufiPagerLoading:this.props.isLoading},


n=
[j.ROW,

{UFIPagerRow:true}];


if(this.props.isUnseen)
n.push(j.UNSEEN_ITEM);



return (g.li({classSet:n,'data-ft':this.props['data-ft'],children:
h
({imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[g.a
({classSet:{UFIPagerIcon:true},
onClick:l,
href:"#",
role:"button"}),

g.a
({classSet:{UFIPagerLink:true},
onClick:l,
href:"#",
role:"button",children:
g.span({classSet:m,children:
this.props.pagerLabel})}),


g.span({className:"fcg",children:
this.props.countSentence})]})}));}});







e.exports=k;});

/** js/components/UFI/UFIReplySocialSentence.js */
__d("UFIReplySocialSentence",["ReactDOM","React","ImageBlock","UFIClassSets","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),






h=b('React'),

i=b('ImageBlock'),
j=b('UFIClassSets'),

k=b('tx'),

l=' \u00b7 ',

m=h.createComponent
({render:function(){
var n=
{UFIReplySocialSentenceLoading:this.props.isLoading},


o=
[j.ROW,

{UFIReplySocialSentenceRow:true}],



p=this.props.replies>1?
k._("{count} Replies",{count:this.props.replies}):
"1 Reply",

q,
r;
if(this.props.author&&!this.props.isExpanded){
q=
g.img
({src:this.props.author.thumbSrc,
classSet:j.ACTOR_IMAGE,
alt:""});

r=
[k._("{author} replied",{author:this.props.author.name}),
l,
p];}else{


q=
g.i
({classSet:
{UFIPagerIcon:!this.props.isExpanded,
UFICollapseIcon:this.props.isExpanded}});


r=p;}



return (g.li({classSet:o,'data-ft':this.props['data-ft'],children:
g.a
({classSet:{UFICommentLink:true},
onClick:this.props.onClick,
href:"#",
role:"button",children:
i
({imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[q,
g.span
({classSet:n,children:
r})]})})}));}});








e.exports=m;});

/** js/components/UFI/UFIShareRow.js */
__d("UFIShareRow",["ReactDOM","ImageBlock","NumberFormat","React","UFIClassSets","URI","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('ImageBlock'),
i=b('NumberFormat'),
j=b('React'),
k=b('UFIClassSets'),
l=b('URI'),

m=b('tx'),

n=j.createComponent
({render:function(){
var o=
new l('/ajax/shares/view').setQueryData
({target_fbid:this.props.targetID}),


p=
new l('/shares/view').setSubdomain('www').setQueryData
({id:this.props.targetID}),


q;
if(this.props.shareCount>1){
var r=i.formatIntegerWithDelimiter
(this.props.shareCount,
this.props.contextArgs.numberdelimiter||',');

q=m._("{count} shares",{count:r});}else 

q="1 share";



return (g.li({classSet:k.ROW,children:
h
({imageClassSet:{UFIImageBlockImage:true},
contentClassSet:{UFIImageBlockContent:true},children:
[g.a
({className:"UFIShareIcon",
rel:"dialog",
ajaxify:o.toString(),
href:p.toString()}),

g.a
({className:"UFIShareLink",
rel:"dialog",
ajaxify:o.toString(),
href:p.toString(),children:
q})]})}));}});







e.exports=n;});

/** js/components/UFI/UFISpamPlaceholder.js */
__d("UFISpamPlaceholder",["ReactDOM","React","UFIClassSets","tx"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('React'),
i=b('UFIClassSets'),

j=b('tx'),


k=h.createComponent
({render:function(){
var l=
{UFISpamCommentWrapper:true,
UFISpamCommentLoading:this.props.isLoading};



return (g.li({classSet:i.ROW,children:
g.a
({href:"#",
role:"button",
classSet:{UFISpamCommentLink:true},
onClick:this.props.onClick,children:
g.span
({'data-hover':"tooltip",
'data-tooltip-alignh':"center",
'aria-label':j._("{count} hidden",{count:this.props.numHidden}),
classSet:l,children:
g.i({classSet:{placeholderIcon:true}})})})}));}});







e.exports=k;});

/** js/components/UFI/UFI.js */
__d("UFI",["ReactDOM","NumberFormat","React","ReactLegacyScrollableArea","UFIAddCommentController","UFIComment","UFIConstants","UFIContainer","UFIInstanceState","UFILikeSentence","UFIPager","UFIReplySocialSentence","UFIShareRow","UFISpamPlaceholder","UFITrackingNodes","isEmpty","tx","copyProperties"],function(a,b,c,d,e,f){var g=b('ReactDOM'),





h=b('NumberFormat'),
i=b('React'),
j=b('ReactLegacyScrollableArea'),
k=b('UFIAddCommentController'),
l=b('UFIComment'),
m=b('UFIConstants'),
n=b('UFIContainer'),
o=b('UFIInstanceState'),
p=b('UFILikeSentence'),
q=b('UFIPager'),
r=b('UFIReplySocialSentence'),
s=b('UFIShareRow'),
t=b('UFISpamPlaceholder'),
u=b('UFITrackingNodes'),

v=b('isEmpty'),
w=b('tx'),
x=b('copyProperties'),






y=i.createComponent
({getInitialState:function(){

return {requestRanges:x({},this.props.availableRanges),
instanceShowRepliesMap:{},
loadingSpamIDs:{},
isActiveLoading:false};},



propTrigger:function(z){


if(this.state.isActiveLoading){


var aa=this.props.availableRanges[this.props.id],
ba=z.availableRanges[this.props.id];
if(aa.offset!=ba.offset||
aa.length!=ba.length){
var ca=
(ba.offset<aa.offset)?0:aa.length;
if(ca<z.availableComments.length){
var da=z.availableComments[ca].ufiinstanceid;
o.updateState(da,'autofocus',true);}}


return {isActiveLoading:false};}},



render:function(){
var z=this.props,
aa=z.feedback,
ba=z.contextArgs,

ca=z.source!=m.UFIFeedbackSourceType.ADS,

da=
(!v(aa.likesentences.current)||
(aa.seencount>0&&!ba.entstream))&&
ca,

ea=null;
if(da)
ea=
p
({contextArgs:ba,
feedback:aa,
onTargetLikeToggle:z.onTargetLikeToggle});



var fa=
z.availableComments&&z.availableComments.length&&ca,

ga=null;
if(fa)
ga=this.renderCommentMap
(z.availableComments,
z.availableRanges[z.id].offset);



var ha=null,


ia=aa.cancomment;
if(ia&&ba.showaddcomment&&aa.actorforpost){
var ja=new k
(null,
z.id,
null,
ba),


ka=z.authorProfiles[aa.actorforpost];
ha=ja.renderAddComment
(ka,
aa.mentionsdatasource,
aa.showsendonentertip);}



var la=null,
ma=
ba.showshares&&aa.sharecount&&ca;
if(ma&&!ba.entstream)
la=
s
({targetID:aa.targetfbid,
shareCount:aa.sharecount,
contextArgs:ba});



var na=this.renderPagers(),


oa=
da||ma||fa||ia,

pa=[na.topPager,ga,na.bottomPager];
if(ba.scrollcomments&&ba.scrollwidth)
pa=
g.li({children:
j({width:ba.scrollwidth,children:
[g.ul({children:
pa})]})});






return (n({hasNub:ba.shownub&&oa,children:
[ea,
la,
pa,
ha]}));},




renderCommentMap:function(z,aa){
var ba=this.props,

ca={},
da=z.length;

if(!da)
return ca;


var ea=z[0].parentcommentid,
fa=ba.feedback.actorid,

ga=[],
ha=function(){
if(ga.length>0){
var ra=function(sa,ta){

this.state.loadingSpamIDs[sa[0]]=true;
this.updateState({});

ba.onSpamFetch(sa,ta);}.
bind(this,ga,ea);

ca['spam'+ga[0]]=
t
({onClick:ra,
numHidden:ga.length,
isLoading:!!this.state.loadingSpamIDs[ga[0]]});


ga=[];}}.

bind(this),


ia=ba.instanceid,
ja=
o.getKeyForInstance(ia,'editcommentid'),



ka=!!z[0].parentcommentid,

la=null;
for(var ma=0;ma<da;ma++)
if(z[ma].status==m.UFIStatus.SPAM){
ga.push(z[ma].id);}else{

ha();


var na=
Math.max(ba.loggingOffset-ma-aa,0),

oa=z[ma],



pa=oa.author===fa,

qa;
if(oa.id==ja){
qa=this.renderEditCommentBox(oa);}else{

qa=this.renderComment
(oa,
na);


qa.props.isLast=ma===da-1;
qa.props.isAuthorReply=pa;


qa.props.hasPartialBorder=
ka&&
ma!==0&&
la===pa;



if(!ka)
qa.props.showReplyLink=true;}



ca['comment'+oa.id]=qa;

if(oa.status!==m.UFIStatus.DELETED)
ca['replies'+oa.id]=
this.renderReplyContainer(oa);




la=pa;}



ha();

return ca;},


renderReplyContainer:function(z){
var aa=this.props,



ba=aa.repliesMap&&
aa.repliesMap[z.id]&&
this._shouldShowCommentReplies(z.id),




ca;
if(z.replycount&&aa.showReplySocialSentenceMap[z.id]){
var da=this._shouldShowCommentReplies(z.id)&&
(this.isLoadingPrev(z.id)||
this.isLoadingNext(z.id)),
ea=z.replyauthors&&
z.replyauthors.length&&
z.replyauthors[0]&&
aa.authorProfiles[z.replyauthors[0]];
ca=
r
({author:ea,
replies:z.replycount,
onClick:this.onToggleReplies.bind(this,z),
isLoading:da,
isExpanded:ba});}





var fa,
ga,
ha,
ia;
if(ba){
var ja=this.renderPagers(z.id);
fa=ja.topPager;
ha=ja.bottomPager;
ga=this.renderCommentMap
(aa.repliesMap[z.id],
aa.availableRanges[z.id].offset);


if(aa.feedback.cancomment)
ia=this.renderReplyComposer(z);}





var ka;
if(ca||
fa||
ga||
ha||
ia){

var la=
z.status===m.UFIStatus.LIVE_DELETED;
ka=
n
({isParentLiveDeleted:la,
isReplyList:true,children:
[ca,
fa,
ga,
ha,
ia]});}



return ka;},









renderReplyComposer:function(z){
var aa=this.props;


return (new k
(null,
aa.id,
z.id,
aa.contextArgs)).

renderAddComment
(aa.authorProfiles[aa.feedback.actorforpost],
aa.feedback.mentionsdatasource,
false,
'replycomposer-'+z.id);},



renderEditCommentBox:function(z){
var aa=new k
(null,
this.props.id,
null,
{}),


ba=aa.renderEditComment
(this.props.authorProfiles[this.props.feedback.actorforpost],
z.id,
this.props.feedback.mentionsdatasource,
this.props.onEditAttempt.bind(null,z),
this.props.onCancelEdit);


return ba;},


_shouldShowCommentReplies:function(z){
if(this.state.instanceShowRepliesMap[z]!==undefined){
return this.state.instanceShowRepliesMap[z];}else
if(this.props.showRepliesMap[z])
return this.props.showRepliesMap[z];


return false;},


renderComment:function(z,aa){
var ba=this.props,
ca=ba.feedback,
da=ca.actorforpost===z.author,

ea=o.getKeyForInstance
(this.props.instanceid,
'locallycomposed'),

fa=z.islocal||
ea&&ea[z.id],




ga=
ca.showremovemenu||(ca.viewerid===z.author),



ha=
ca.canremoveall&&ca.isownerpage&&!da,

ia=
ba.source!=m.UFIFeedbackSourceType.INTERN,

ja=u.getTrackingInfo
(u.types.COMMENT,aa),


ka=!!z.parentcommentid,

la=this._shouldShowCommentReplies(z.id);



return (l
({comment:z,
authorProfiles:this.props.authorProfiles,
viewerIsAuthor:da,
feedback:ca,
'data-ft':ja,
contextArgs:this.props.contextArgs,
hideAsSpamForPageAdmin:ha,
isLocallyComposed:fa,
isReply:ka,
showPermalink:ia,
showRemoveReportMenu:ga,
showReplies:la,
onCommentLikeToggle:ba.onCommentLikeToggle.bind(null,z),
onCommentReply:this.onCommentReply.bind(this,z),
onCommentTranslate:ba.onCommentTranslate.bind(null,z),
onEdit:ba.onCommentEdit.bind(null,z),
onHideAsSpam:ba.onCommentHideAsSpam.bind(null,z),
onInlineBan:ba.onCommentInlineBan.bind(null,z),
onMarkAsNotSpam:ba.onCommentMarkAsNotSpam.bind(null,z),
onOneClickRemove:ba.onCommentOneClickRemove.bind(null,z),
onPreviewRemove:ba.onPreviewRemove.bind(null,z),
onRemove:ba.onCommentRemove.bind(null,z),
onRetrySubmit:ba.onRetrySubmit.bind(null,z),
onUndoInlineBan:ba.onCommentUndoInlineBan.bind(null,z),
onUndoOneClickRemove:ba.onCommentUndoOneClickRemove.bind(null,z)}));},




_setShowRepliesMapState:function(z,aa){
var ba=this.state.instanceShowRepliesMap;
ba[z]=aa;

this.updateState({instanceShowRepliesMap:ba});},


onToggleReplies:function(z){
var aa=!this._shouldShowCommentReplies(z.id);
this._setShowRepliesMapState(z.id,aa);

var ba=
this.state.requestRanges[z.id].length-
this.props.deletedCounts[z.id];
if(aa&&ba===0){
var ca=this.props.commentCounts[z.id],
da=Math.min(ca,this.props.pageSize);

this.onPage
(z.id,
{offset:ca-da,length:da});}},




onPage:function(z,aa){
var ba=this.state.requestRanges;
ba[z]=aa;
this.updateState
({requestRanges:ba,
isActiveLoading:true});

this.props.onChangeRange(z,aa);},


isLoadingPrev:function(z){
var aa=this.props;
z=z||aa.id;
if(!this.state.requestRanges[z])
this.state.requestRanges[z]=aa.availableRanges[z];

var ba=this.state.requestRanges[z].offset,
ca=aa.availableRanges[z].offset;

return ba<ca;},


isLoadingNext:function(z){
var aa=this.props;
z=z||aa.id;
if(!this.state.requestRanges[z])
this.state.requestRanges[z]=aa.availableRanges[z];

var ba=this.state.requestRanges[z].offset,
ca=this.state.requestRanges[z].length,
da=aa.availableRanges[z].offset,
ea=aa.availableRanges[z].length;

return ba+ca>da+ea;},


renderPagers:function(z){
var aa=this.props;
z=z||aa.id;
var ba=aa.availableRanges[z].offset,
ca=aa.availableRanges[z].length,
da=aa.deletedCounts[z],

ea=aa.commentCounts[z],

fa=ea-da,
ga=ca-da,
ha=aa.contextArgs.numberdelimiter||',',
ia=z!==aa.id,

ja=
{topPager:null,
bottomPager:null};


if(aa.source==m.UFIFeedbackSourceType.ADS)

return ja;


var ka=this.isLoadingPrev(z),
la=this.isLoadingNext(z);


if(ca==ea)
return ja;






var ma=(ba+ca)==ea;

if((ea<aa.pageSize&&ma)||ga===0){
var na=Math.min(ea,aa.pageSize),

oa=
this.onPage.bind
(this,
z,
{offset:ea-na,length:na}),


pa;
if(fa==1){
pa=ia?"View 1 reply":"View 1 comment";}else{

var qa=h.formatIntegerWithDelimiter
(fa,ha);

pa=ia?
w._("View all {count} replies",{count:qa}):
w._("View all {count} comments",{count:qa});}


var ra=u.getTrackingInfo
(u.types.VIEW_ALL_COMMENTS),


sa=
q
({isUnseen:aa.feedback.hasunseencollapsed,
isLoading:ka,
pagerLabel:pa,
onPagerClick:oa,
'data-ft':ra});


if(aa.feedback.isranked&&!ia){
ja.bottomPager=sa;}else 

ja.topPager=sa;


return ja;}






if(ba>0){


var ta=Math.max(ba-aa.pageSize,0),
na=ba+ca-ta,

ua=
this.onPage.bind(this,z,{offset:ta,length:na}),

va=h.formatIntegerWithDelimiter
(ga,ha),


wa=h.formatIntegerWithDelimiter
(fa,ha),


xa=w._("{countshown} of {totalcount}",
{countshown:va,totalcount:wa});


if(aa.feedback.isranked&&!ia){


ja.bottomPager=
q
({isLoading:ka,
pagerLabel:"View more comments",
onPagerClick:ua,
countSentence:xa});}else{




var ya=ia?
"View previous replies":
"View previous comments";
ja.topPager=
q
({isLoading:ka,
pagerLabel:ya,
onPagerClick:ua,
countSentence:xa});}}








if(ba+ca<ea){


var za=Math.min
(ca+aa.pageSize,
ea-ba),


ab=this.onPage.bind
(this,
z,
{offset:ba,length:za});


if(aa.feedback.isranked&&!ia){


ja.topPager=
q
({isLoading:la,
pagerLabel:"View previous comments",
onPagerClick:ab});}else{




var bb=ia?
"View more replies":
"View more comments";
ja.bottomPager=
q
({isLoading:la,
pagerLabel:bb,
onPagerClick:ab});}}




return ja;},











onCommentReply:function(z){



var aa=z.parentcommentid||z.id;





if(!this._shouldShowCommentReplies(aa))
this.onToggleReplies(z);



if(this.refs&&this.refs['replycomposer-'+aa])
this.refs['replycomposer-'+aa].focus();}});




e.exports=y;});

/** js/clientufi/controllers/UFIController.js */
__d("UFIController",["ReactDOM","Arbiter","Bootloader","CSS","DOM","DOMQuery","ImmutableObject","LayerRemoveOnHide","LiveTimer","Parent","React","ReactMount","ShortProfiles","UFI","UFIActionLinkController","UFICentralUpdates","UFIComments","UFIConstants","UFIFeedbackTargets","UFIInstanceState","UFIUserActions","URI","copyProperties","isEmpty","tx","UFICommentTemplates"],function(a,b,c,d,e,f){





var g=b('Arbiter'),
h=b('Bootloader'),
i=b('CSS'),
j=b('DOM'),
k=b('DOMQuery'),
l=b('ImmutableObject'),
m=b('LayerRemoveOnHide'),
n=b('LiveTimer'),
o=b('Parent'),
p=b('React'),
q=b('ReactMount'),
r=b('ShortProfiles'),
s=b('UFI'),
t=b('UFIActionLinkController'),
u=b('UFICentralUpdates'),
v=b('UFIComments'),
w=b('UFIConstants'),
x=b('UFIFeedbackTargets'),
y=b('UFIInstanceState'),
z=b('UFIUserActions'),
aa=b('URI'),

ba=b('copyProperties'),
ca=b('isEmpty'),
da=b('tx'),

ea=b('UFICommentTemplates'),






fa=
function(ia,ja,ka,la){

var ma=ia.offset+ia.length===ja;


return {offset:ia.offset,
length:(ma&&ga(la))?
ka-ia.offset:ia.length};},



ga=function(ia){
return ia==w.UFIPayloadSourceType.USER_ACTION||
ia==w.UFIPayloadSourceType.LIVE_SEND;};


function ha(ia,ja,ka){
this.root=ia;
this.id=ja.ftentidentifier;
this.source=ja.source;
this._ufiInstanceID=ja.instanceid;









this._contextArgs=ja;
this._contextArgs.rootid=this.root.id;

this._verifiedCommentsExpanded=false;

var la=ka.feedbacktargets[0];
this.actionLink=new t
(ia,
this._contextArgs,
la);







var ma=ka.commentlists[this.id];
this.commentcounts={};
this.deletedcounts={};
this.ranges={};
this.repliesMap={};
this.showRepliesMap={};
this.showReplySocialSentenceMap={};

this.commentcounts[this.id]=v.getCommentCount(this.id);
this.deletedcounts[this.id]=0;
this.ranges[this.id]=ba({},ma.range);

for(var na=0;na<ma.values.length;na++){
var oa=ma.values[na],
pa=ka.commentlists[oa];
if(pa){
this.commentcounts[oa]=v.getCommentCount(oa);
this.deletedcounts[oa]=0;
this.ranges[oa]=ba({},pa.range);}}


this.ranges=new l(this.ranges);






this._loggingOffset=null;


this._ufi=null;


this.ufiCentralUpdatesSubscriptions=
[u.subscribe('feedback-updated',function(qa,ra){
var sa=ra.updates;
if(this.id in sa)
this.fetchAndUpdate(this.render.bind(this),ra.payloadSource);}.

bind(this)),

u.subscribe('feedback-id-changed',function(qa,ra){
var sa=ra.updates;
if(this.id in sa)
this.id=sa[this.id];}.

bind(this)),

u.subscribe('instance-updated',function(qa,ra){
var sa=ra.updates;
if(this._ufiInstanceID in sa){
var ta=sa[this._ufiInstanceID];




if(ta.editcommentid)
this.render(ra.payloadSource);}}.


bind(this)),

u.subscribe('update-comment-lists',function(qa,ra){
var sa=ra.commentlists;

if(sa&&Object.keys(sa).length){
var ta={};
for(var ua in sa)




if(!this.ranges[ua])
ta[ua]=sa[ua].range;


this.ranges=l.set
(this.ranges,
ta);}}.


bind(this))];


this.clearPageletSubscription=g.subscribe
('ajaxpipe/clear_pagelet',
this.onPageletDestroy.bind(this));


this.clearPageSubscription=g.subscribe
('ufi/clear_page',
this._onDestroy.bind(this));



u.handleUpdate
(w.UFIPayloadSourceType.INITIAL_SERVER,
ka);




if(this._contextArgs.viewas)
this.viewasUFICleanSubscription=g.subscribe
('pre_page_transition',
function(qa,ra){
if(this._contextArgs.viewas!==aa(ra.to).getQueryData('viewas'))
v.resetFeedbackTarget(this.id);}.

bind(this));



h.loadModules(['ScrollAwareDOM'],function(qa){
q.scrollMonitor=qa.monitor;});}



ba(ha.prototype,
{_getParentForm:function(){
if(!this._form)
this._form=o.byTag(this.root,'form');



return this._form;},


_onTargetLikeToggle:function(event){
var ia=!this.feedback.hasviewerliked;
z.changeLike
(this.id,
ia,

{source:this.source,
target:event.target,
rootid:this._contextArgs.rootid});


event.preventDefault();},


_onCommentLikeToggle:function(ia,event){
var ja=!ia.hasviewerliked;
z.changeCommentLike
(ia.id,
ja,
{source:this.source,target:event.target});},



_onCommentEdit:function(ia){


y.updateState(this._ufiInstanceID,'isediting',true);


y.updateState
(this._ufiInstanceID,'editcommentid',ia.id);},



_onEditAttempt:function(ia,ja,event){
if(!ja.visibleValue){

this._onCommentRemove(ia,event);}else 

z.editComment
(ia.id,
ja.visibleValue,
ja.encodedValue,
{source:this._contextArgs.source,target:event.target});



y.updateStateField
(this._ufiInstanceID,
'locallycomposed',
ia.id,
true);


this._onEditReset();},


_onEditReset:function(){
y.updateState(this._ufiInstanceID,'isediting',false);
y.updateState(this._ufiInstanceID,'editcommentid',null);},


_onCommentRemove:function(ia,event){
var ja=ea[':fb:ufi:hide-dialog-template'].build();
j.setContent(ja.getNode('body'),"Are you sure you want to delete this comment?");
j.setContent(ja.getNode('title'),"Delete Comment");

h.loadModules(['DialogX'],function(ka){
var la=new ka
({modal:true,
width:465,
addedBehaviors:[m]},
ja.getRoot());

la.subscribe('confirm',function(){
z.removeComment(ia.id,
{source:this.source,
oneclick:false,
target:event.target,
timelinelogdata:this._contextArgs.timelinelogdata});

la.hide();}.
bind(this));

la.show();}.
bind(this));},


_onCommentOneClickRemove:function(ia,event){
z.removeComment(ia.id,
{source:this.source,
oneclick:true,
target:event.target,
timelinelogdata:this._contextArgs.timelinelogdata});},



_onCommentUndoOneClickRemove:function(ia,event){
var ja=
this.feedback.canremoveall&&
this.feedback.isownerpage&&
this.feedback.actorforpost!==this.authorProfiles[ia.author];

z.undoRemoveComment(ia.id,ja,
{source:this.source,
target:event.target});},



_onCommentHideAsSpam:function(ia,event){
z.setHideAsSpam(ia.id,true,
{source:this.source,
target:event.target});},



_onCommentMarkAsNotSpam:function(ia,event){
z.setHideAsSpam(ia.id,false,
{source:this.source,
target:event.target});},



_onCommentTranslate:function(ia,event){
z.translateComment(ia,
{source:this.source,
target:event.target});},



_onCommentInlineBanChange:function(ia,ja,event){
z.banUser(ia,this.feedback.ownerid,ja,
{source:this.source,
target:event.target});},



_onCommentInlineBan:function(ia,event){
this._onCommentInlineBanChange(ia,true,event);},


_onCommentUndoInlineBan:function(ia,event){
this._onCommentInlineBanChange(ia,false,event);},


_fetchSpamComments:function(ia,ja){
z.fetchSpamComments
(this.id,
ia,
ja,
this._contextArgs.viewas);},



_removePreview:function(ia,event){
z.removePreview(ia,
{source:this.source,
target:event.target});},



_retrySubmit:function(ia){
h.loadModules(['UFIRetryActions'],function(ja){
ja.retrySubmit(ia,{source:this.source});}.
bind(this));},





_ensureCommentsExpanded:function(){

if(this._verifiedCommentsExpanded)
return;


var ia=o.byTag(this.root,'form');
if(ia){
i.removeClass(ia,'collapsed_comments');
this._verifiedCommentsExpanded=true;}},



render:function(ia){



var ja=
this.comments.length||!ca(this.feedback.likesentences.current);



if(ja&&ga(ia))
this._ensureCommentsExpanded();




if(this._loggingOffset===null)
this._loggingOffset=
this.ranges[this.id].offset+this.comments.length-1;


var ka=
s
({feedback:this.feedback,
id:this.id,
onTargetLikeToggle:this._onTargetLikeToggle.bind(this),
onCommentLikeToggle:this._onCommentLikeToggle.bind(this),
onCommentRemove:this._onCommentRemove.bind(this),
onCommentHideAsSpam:this._onCommentHideAsSpam.bind(this),
onCommentMarkAsNotSpam:this._onCommentMarkAsNotSpam.bind(this),
onCommentEdit:this._onCommentEdit.bind(this),
onCommentOneClickRemove:this._onCommentOneClickRemove.bind(this),
onCommentUndoOneClickRemove:this._onCommentUndoOneClickRemove.bind(this),
onCommentTranslate:this._onCommentTranslate.bind(this),
onCommentInlineBan:this._onCommentInlineBan.bind(this),
onCommentUndoInlineBan:this._onCommentUndoInlineBan.bind(this),
onEditAttempt:this._onEditAttempt.bind(this),
onCancelEdit:this._onEditReset.bind(this),
onChangeRange:this._changeRange.bind(this),
onSpamFetch:this._fetchSpamComments.bind(this),
onPreviewRemove:this._removePreview.bind(this),
onRetrySubmit:this._retrySubmit.bind(this),
contextArgs:this._contextArgs,
repliesMap:this.repliesMap,
showRepliesMap:this.showRepliesMap,
showReplySocialSentenceMap:this.showReplySocialSentenceMap,
commentCounts:this.commentcounts,
deletedCounts:this.deletedcounts,
availableComments:this.comments,
source:this.source,
availableRanges:this.ranges,
pageSize:w.defaultPageSize,
authorProfiles:this.authorProfiles,
instanceid:this._ufiInstanceID,
loggingOffset:this._loggingOffset});



this._ufi=p.renderOrUpdateComponent(ka,this.root);
n.updateTimeStamps();


if(this._getParentForm())
g.inform('ufi/changed',{form:this._getParentForm()});},



fetchAndUpdate:function(ia,ja){
x.getFeedbackTarget(this.id,function(ka){
var la=v.getCommentCount(this.id),
ma=fa
(this.ranges[this.id],
this.commentcounts[this.id],
la,
ja);


v.getCommentsInRange
(this.id,
ma,
this._contextArgs.viewas,
function(na){

var oa=[],
pa={},
qa={};

if(ka.actorforpost)
oa.push(ka.actorforpost);

for(var ra=0;ra<na.length;ra++){
if(na[ra].author)
oa.push(na[ra].author);


if(na[ra].socialcontext)
oa.push(na[ra].socialcontext.topmutualid);


if(na[ra].replyauthors&&
na[ra].replyauthors.length)
for(var sa=0;sa<na[ra].length;sa++)
oa.push(na[ra].replyauthors[sa]);






if(ka.isthreaded){
var ta=na[ra].id,
ua=v.getCommentCount(ta),
va;
if(this.ranges[ta]){
va=fa
(this.ranges[ta],
this.commentcounts[ta],
ua,
ja);}else 








va=
{offset:0,
length:Math.min(ua,2)};



pa[ta]=va;
qa[ta]=ua;}}



v.getRepliesInRanges
(this.id,
pa,
function(wa){

for(var xa=0;xa<na.length;xa++){
var ya=na[xa].id,
za=wa[ya]||[];
for(var ab=0;ab<za.length;ab++){
if(za[ab].author)
oa.push(za[ab].author);


if(za[ab].socialcontext)
oa.push
(za[ab].socialcontext.topmutualid);}}





r.getMulti
(oa,
function(bb){
this.authorProfiles=bb;
this.feedback=ka;
this.commentcounts[this.id]=la;
this.deletedcounts[this.id]=
v.getDeletedCount(this.id);
this.comments=na;


var cb={};
cb[this.id]=ma;

for(var db=0;db<na.length;db++){
var eb=na[db].id,
fb=pa[eb];
this.repliesMap[eb]=wa[eb];
cb[eb]=fb;
this.commentcounts[eb]=qa[eb];
this.deletedcounts[eb]=
v.getDeletedCount(eb);

this.showRepliesMap[eb]=
fb&&fb.length>0;
if(this.showReplySocialSentenceMap[eb]===
undefined)
this.showReplySocialSentenceMap[eb]=
!this.showRepliesMap[eb];}


this.ranges=l.set(this.ranges,cb);

ia(ja);

if(ja==
w.UFIPayloadSourceType.
ENDPOINT_COMMENT_FETCH)

g.inform('CommentUFI.Pager');}.

bind(this));}.

bind(this));}.

bind(this));}.

bind(this));},



_changeRange:function(ia,ja){
var ka={};
ka[ia]=ja;
this.ranges=l.set(this.ranges,ka);
this.fetchAndUpdate
(this.render.bind(this),w.UFIPayloadSourceType.USER_ACTION);},









onPageletDestroy:function(ia,ja){
if(k.contains(ja.pagelet_id,this.root))
this._onDestroy();},



_onDestroy:function(){
p.destroyAndReleaseReactRootNode(this.root);
this.ufiCentralUpdatesSubscriptions.forEach
(u.unsubscribe.bind(u));

g.unsubscribe(this.clearPageletSubscription);
g.unsubscribe(this.clearPageSubscription);
this.viewasUFICleanSubscription&&
g.unsubscribe(this.viewasUFICleanSubscription);}});




e.exports=ha;});

/** js/modules/TypeaheadUtil.js */
__d("TypeaheadUtil",["function-extensions"],function(a,b,c,d,e,f){



b('function-extensions');











var g=/[ ]+/g,
h=/[^ ]+/g,
i=/[.,+*?$|#{}()\^\-\[\]\\\/!@%'"~=<>_:;\u2010\u2011\u2012\u2013\u2014\u2015\u30fb\uff1a]/g,


j={},
k=
{a:"\u0430 \u00e0 \u00e1 \u00e2 \u00e3 \u00e4 \u00e5",
b:"\u0431",
c:"\u0446 \u00e7 \u010d",
d:"\u0434 \u00f0 \u010f \u0111",
e:"\u044d \u0435 \u00e8 \u00e9 \u00ea \u00eb \u011b",
f:"\u0444",
g:"\u0433 \u011f",
h:"\u0445 \u0127",
i:"\u0438 \u00ec \u00ed \u00ee \u00ef \u0131",
j:"\u0439",
k:"\u043a \u0138",
l:"\u043b \u013e \u013a \u0140 \u0142",
m:"\u043c",
n:"\u043d \u00f1 \u0148 \u0149 \u014b",
o:"\u043e \u00f8 \u00f6 \u00f5 \u00f4 \u00f3 \u00f2",
p:"\u043f",
r:"\u0440 \u0159 \u0155",
s:"\u0441 \u015f \u0161 \u017f",
t:"\u0442 \u0165 \u0167 \u00fe",
u:"\u0443 \u044e \u00fc \u00fb \u00fa \u00f9 \u016f",
v:"\u0432",
y:"\u044b \u00ff \u00fd",
z:"\u0437 \u017e",
ae:"\u00e6",
oe:"\u0153",
ts:"\u0446",
ch:"\u0447",
ij:"\u0133",
sh:"\u0448",
ss:"\u00df",
ya:"\u044f"};


for(var l in k){
var m=k[l].split(' ');
for(var n=0;n<m.length;n++)
j[m[n]]=l;}




var o={};


function p(v){
return v?v.replace(i,' '):'';}



function q(v){
v=(''+v).toLowerCase();
var w='',
x='';
for(var y=v.length;y--;){
x=v.charAt(y);
w=(j[x]||x)+w;}

return w.replace(g,' ');}



function r(v){
var w=[],
x=h.exec(v);

while(x){
x=x[0];
w.push(x);
x=h.exec(v);}

return w;}





function s(v,w){
v=''+v;
if(!o.hasOwnProperty(v)){
var x=q(v),
y=p(x);
o[v]=
{value:v,
flatValue:x,
tokens:r(y),
isPrefixQuery:y&&y[y.length-1]!=' '};}




if(w&&typeof o[v].sortedTokens=='undefined'){
o[v].sortedTokens=o[v].tokens.slice();
o[v].sortedTokens.sort(function(z,aa){
return aa.length-z.length;});}


return o[v];}


function t(v,w,x){

var y=s(w,v=='prefix'),
z=v=='prefix'?y.sortedTokens:
y.tokens,
aa=s(x).tokens,

ba={},
ca=
y.isPrefixQuery&&v=='query'?
z.length-1:null,


da=function(ea,fa){
for(var ga=0;ga<aa.length;++ga){
var ha=aa[ga];
if(!ba[ga]&&
(ha==ea||
((v=='query'&&fa===ca||
v=='prefix')&&
ha.indexOf(ea)===0)))
return (ba[ga]=true);}


return false;};


return z.length&&z.every(da);}












var u=
{flatten:q,
parse:s,
isExactMatch:t.curry('exact'),
isQueryMatch:t.curry('query'),
isPrefixMatch:t.curry('prefix')};









































e.exports=u;});

/** js/modules/DataSource.js */
__d("DataSource",["array-extensions","ArbiterMixin","AsyncRequest","TypeaheadUtil","copyProperties","createArrayFrom","createObjectFrom","emptyFunction"],function(a,b,c,d,e,f){



b('array-extensions');

var g=b('ArbiterMixin'),
h=b('AsyncRequest'),
i=b('TypeaheadUtil'),

j=b('copyProperties'),
k=b('createArrayFrom'),
l=b('createObjectFrom'),
m=b('emptyFunction');


























































function n(o){
this._maxResults=o.maxResults||10;

this.token=o.token;
this.queryData=o.queryData||{};
this.queryEndpoint=o.queryEndpoint||'';
this.bootstrapData=o.bootstrapData||{};
this.bootstrapEndpoint=o.bootstrapEndpoint||'';
this._exclusions=o.exclusions||[];
this._indexedFields=o.indexedFields||['text','tokens'];
this._titleFields=o.titleFields||[];
this._alwaysPrefixMatch=o.alwaysPrefixMatch||false;
this._deduplicationKey=o.deduplicationKey||null;
this._enabledQueryCache=o.enabledQueryCache||true;
this._queryExactMatch=o.queryExactMatch||false;
this._minExactMatchLength=4;
this._filters=[];}


j(n.prototype,g,



{events:['bootstrap','query','respond'],





init:function(){
this.init=m;
this._fields=l(this._indexedFields);
this._activeQueries=0;
this.dirty();},







dirty:function(){
this.value='';
this._bootstrapped=false;
this._bootstrapping=false;

this._data={};
this.localCache={};
this.queryCache={};
this.inform('dirty',{});
return this;},







bootstrap:function(){
if(this._bootstrapped)return;
this.bootstrapWithoutToken();
this._bootstrapped=true;
this._bootstrapping=true;
this.inform('bootstrap',{bootstrapping:true});},


bootstrapWithoutToken:function(){
this.fetch(this.bootstrapEndpoint,this.bootstrapData,
{bootstrap:true,
token:this.token});},



bootstrapWithToken:function(){
var o=j({},this.bootstrapData);
o.token=this.token;
this.fetch(this.bootstrapEndpoint,o,
{bootstrap:true,
replaceCache:true});},





















query:function(o,p,q,r){
this.inform('beforeQuery',{value:o,
local_only:p,
exclusions:q,
time_waited:r});

if(!this._enabledQueryCache)
this.queryCache={};


var s=this.buildUids(o,[],q),
t=this.respond(o,s);

this.value=o;
this.inform('query',{value:o,results:t});

var u=i.parse(o).flatValue;
if(p||
!u||
!this.queryEndpoint||
this.getQueryCache().hasOwnProperty(u)||
!this.shouldFetchMoreResults(t))
return false;


this.inform('queryEndpoint',{value:o});

this.fetch
(this.queryEndpoint,
this.getQueryData(o,s),
{value:o,exclusions:q});


return true;},


shouldFetchMoreResults:function(o){
return o.length<this._maxResults;},












getQueryData:function(o,p){
var q=j({value:o},this.queryData||{});
p=p||[];
if(p.length)
q.existing_ids=p.join(',');

if(this._bootstrapping)

q.bsp=true;

return q;},










setQueryData:function(o,p){
if(p)
this.queryData={};

j(this.queryData,o);
return this;},










setBootstrapData:function(o,p){
if(p)
this.bootstrapData={};

j(this.bootstrapData,o);
return this;},








getExclusions:function(){
return k(this._exclusions);},














setExclusions:function(o){
this._exclusions=o||[];},












addFilter:function(o){
var p=this._filters;
p.push(o);

return {remove:function(){
p.splice(p.indexOf(o),1);}};},







clearFilters:function(){
this._filters=[];},














respond:function(o,p,q){
var r=this.buildData(p);
this.inform('respond',
{value:o,
results:r,
isAsync:!!q});

return r;},






asyncErrorHandler:m,










fetch:function(o,p,q){
if(!o)return;
var r=new h().
setURI(o).
setData(p).
setMethod('GET').
setReadOnly(true).
setHandler(function(s){
this.fetchHandler(s,q||{});}.
bind(this));

if(o===this.queryEndpoint)

r.setFinallyHandler(function(){
this._activeQueries--;
if(!this._activeQueries)
this.inform('activity',{activity:false});}.

bind(this));


r.setErrorHandler(this.asyncErrorHandler);

this.inform('beforeFetch',{request:r,fetch_context:q});

r.send();

if(o===this.queryEndpoint){
if(!this._activeQueries)
this.inform('activity',{activity:true});

this._activeQueries++;}},











fetchHandler:function(o,p){
var q=p.value,
r=p.exclusions;

if(!q&&p.replaceCache)

this.localCache={};

this.inform('buildQueryCache',{});
this.addEntries(o.getPayload().entries,q);
this.inform('fetchComplete',
{response:o,
value:q,
fetch_context:p});



var s=(!q&&this.value)?this.value:q;
this.respond(s,this.buildUids(s,[],r),true);


if(!q){
if(this._bootstrapping){
this._bootstrapping=false;
this.inform('bootstrap',{bootstrapping:false});}

if(p.token&&
o.getPayload().token!==p.token)
this.bootstrapWithToken();}},












addEntries:function(o,p){
var q=this.processEntries
(k(o||[]),
p),

r=this.buildUids(p,q);

if(p){
var s=this.getQueryCache();
s[i.parse(p).flatValue]=r;}else 

this.fillCache(r);},













processEntries:function(o,p){
return o.map(function(q,r){
var s=(q.uid=q.uid+''),
t=this.getEntry(s);
if(!t){
t=q;
t.query=p;
this.setEntry(s,t);}else 

j(t,q);


t.index===undefined&&(t.index=r);
return s;},
this);},







getAllEntries:function(){
return this._data||{};},








getEntry:function(o){
return this._data[o]||null;},









setEntry:function(o,p){
this._data[o]=p;},










fillCache:function(o){
var p=this.localCache;

o.forEach(function(q){
var r=this.getEntry(q);
if(!r)return;
r.bootstrapped=true;
var s=i.parse(this.getTextToIndex(r)).tokens;
for(var t=0,u=s.length;t<u;++t){
var v=s[t];
if(!p.hasOwnProperty(v))
p[v]={};

p[v][q]=true;}},

this);},











getTextToIndex:function(o){
if(o.textToIndex&&!o.needs_update)
return o.textToIndex;


o.needs_update=false;
o.textToIndex=this.getTextToIndexFromFields(o,this._indexedFields);
return o.textToIndex;},


getTextToIndexFromFields:function(o,p){
var q=[];
for(var r=0;r<p.length;++r){
var s=o[p[r]];
if(s)
q.push(s.join?s.join(' '):s);}


return q.join(' ');},













mergeUids:function(o,p,q,r){
this.inform('mergeUids',
{local_uids:o,
query_uids:p,
new_uids:q,
value:r});


var s=function(t,u){
var v=this.getEntry(t),
w=this.getEntry(u);


if(v.extended_match!==w.extended_match)
return v.extended_match?1:-1;






if(v.index!==w.index)
return v.index-w.index;



if(v.text.length!==w.text.length)
return v.text.length-w.text.length;

return v.uid<w.uid;}.
bind(this);

this._checkExtendedMatch(r,o);
return this.deduplicateByKey
(o.sort(s).concat(p,q));},






_checkExtendedMatch:function(o,p){
var q=this._alwaysPrefixMatch?
i.isPrefixMatch:
i.isQueryMatch;

for(var r=0;r<p.length;++r){
var s=this.getEntry(p[r]);
s.extended_match=s.tokens?!q(o,s.text):false;}},
















buildUids:function(o,p,q){
if(!p)
p=[];


if(!o)
return p;


if(!q)
q=[];


var r=this.buildCacheResults(o,this.localCache),
s=this.buildQueryResults(o),
t=this.mergeUids(r,s,p,o),
u=l(q.concat(this._exclusions)),

v=t.filter(function(w){
if(u.hasOwnProperty(w)||!this.getEntry(w))
return false;

for(var x=0;x<this._filters.length;++x)
if(!this._filters[x](this.getEntry(w),o))
return false;


return (u[w]=true);},
this);
return this.uidsIncludingExact(o,v,u);},

















uidsIncludingExact:function(o,p,q){
var r=p.length;

if(o.length<this._minExactMatchLength||r<=this._maxResults)
return p;


for(var s=0;s<r;++s){
var t=this.getEntry(p[s]);
t.text_lower||(t.text_lower=t.text.toLowerCase());
if(t.text_lower===i.parse(o).flatValue){

if(s>=this._maxResults){
var u=p.splice(s,1);
p.splice(this._maxResults-1,0,u);}

break;}}



return p;},











buildData:function(o){
var p=[],
q=Math.min(o.length,this._maxResults);
for(var r=0;r<q;++r)
p.push(this.getEntry(o[r]));

return p;},












findQueryCache:function(o){
var p=0,
q=null,
r=this.getQueryCache();

if(this._queryExactMatch)
return r[o]||[];


for(var s in r)
if(o.indexOf(s)===0&&s.length>p){
p=s.length;
q=s;}


return r[q]||[];},







buildQueryResults:function(o){
var p=i.parse(o).flatValue,
q=this.findQueryCache(p);


if(this.getQueryCache().hasOwnProperty(p))
return q;

return this.filterQueryResults(o,q);},








filterQueryResults:function(o,p){
var q=this._alwaysPrefixMatch?
i.isPrefixMatch:
i.isQueryMatch;
return p.filter(function(r){
return q(o,this.getTextToIndex(this.getEntry(r)));},
this);},
















buildCacheResults:function(o,p){
var q=i.parse(o,this._alwaysPrefixMatch),
r=this._alwaysPrefixMatch?
q.sortedTokens:
q.tokens,
s=r.length,
t=q.isPrefixQuery?s-1:null,
u={},
v={},
w={},
x=[],
y=false,
z={},
aa=0;

for(var ba=0;ba<s;++ba){
var ca=r[ba];

if(!z.hasOwnProperty(ca)){
aa++;
z[ca]=true;}else 

continue;


for(var da in p)


if((!u.hasOwnProperty(da)&&da===ca)||
((this._alwaysPrefixMatch||t===ba)&&
da.indexOf(ca)===0)){

if(da===ca){
if(v.hasOwnProperty(da))
y=true;

u[da]=true;}else{

if(u.hasOwnProperty(da)||
v.hasOwnProperty(da))
y=true;

v[da]=true;}


for(var ea in p[da])
if(ba===0||(w.hasOwnProperty(ea)&&
w[ea]==aa-1))
w[ea]=aa;}}







for(var fa in w)
if(w[fa]==aa)
x.push(fa);




if(y||aa<s)
x=this.filterQueryResults(o,x);


if(this._titleFields&&this._titleFields.length>0)
x=this.filterNonTitleMatchQueryResults(o,x);

return x;},








filterNonTitleMatchQueryResults:function(o,p){
return p.filter(function(q){
var r=i.parse(o),
s=r.tokens.length;
if(s===0)
return true;

var t=this.getTitleTerms(this.getEntry(q)),

u=r.tokens[0];
return ((s===1)||this._alwaysPrefixMatch)?
i.isPrefixMatch(u,t):
i.isQueryMatch(u,t);},
this);},


getTitleTerms:function(o){
if(!o.titleToIndex)
o.titleToIndex=this.getTextToIndexFromFields(o,this._titleFields);

return o.titleToIndex;},


deduplicateByKey:function(o){
if(!this._deduplicationKey)
return o;


var p=l
(o.map(this._getDeduplicationKey.bind(this)),
o);

return o.filter
(function(q){
return p[this._getDeduplicationKey(q)]==q;}.
bind(this));},



_getDeduplicationKey:function(o){
var p=this.getEntry(o);
return p[this._deduplicationKey]||'__'+o+'__';},


getQueryCache:function(){
return this.queryCache;},


setMaxResults:function(o){
this._maxResults=o;
this.value&&this.respond(this.value,this.buildUids(this.value));},


updateToken:function(o){
this.token=o;
this.dirty();
return this;}});




e.exports=n;});

/** js/modules/MultiBootstrapDataSource.js */
__d("MultiBootstrapDataSource",["Class","DataSource"],function(a,b,c,d,e,f){



var g=b('Class'),
h=b('DataSource');

function i(j){
this._bootstrapEndpoints=j.bootstrapEndpoints;
this.parent.construct(this,j);}


g.extend(i,h);

i.prototype.bootstrapWithoutToken=function(){
for(var j=0;j<this._bootstrapEndpoints.length;j++)
this.fetch
(this._bootstrapEndpoints[j].endpoint,
this._bootstrapEndpoints[j].data||{},
{bootstrap:true});};




e.exports=i;});

/** js/modules/XHPTemplate.js */
__d("XHPTemplate",["DataStore","DOM","HTML","copyProperties"],function(a,b,c,d,e,f){




var g=b('DataStore'),
h=b('DOM'),
i=b('HTML'),

j=b('copyProperties');

function k(m){
this._model=m;}


j(k.prototype,




{render:function(){

if(i.isHTML(this._model))
this._model=h.setContent
(document.createDocumentFragment(),
this._model)[
0];

return this._model.cloneNode(true);},


build:function(){
return new l(this.render());}});




j(k,







{getNode:function(m,n){
return k.getNodes(m)[n];},







getNodes:function(m){
var n=g.get(m,'XHPTemplate:nodes');
if(!n){
n={};

var o=h.scry(m,'[data-jsid]');
o.push(m);
var p=o.length;
while(p--){
var q=o[p];
n[q.getAttribute('data-jsid')]=q;
q.removeAttribute('data-jsid');}

g.set(m,'XHPTemplate:nodes',n);}

return n;}});





function l(m){
this._root=m;
this._populateNodes();}


j(l.prototype,

{_populateNodes:function(){
this._nodes={};
this._leaves={};
var m=this._root.getElementsByTagName('*');
for(var n=0,o=m.length;n<o;n++){
var p=m[n],
q=p.getAttribute('data-jsid');
if(q){
p.removeAttribute('data-jsid');
this._nodes[q]=p;
this._leaves[q]=!p.childNodes.length;}}},




getRoot:function(){
return this._root;},


getNode:function(m){
return this._nodes[m];},


setNodeProperty:function(m,n,o){
this.getNode(m)[n]=o;
return this;},


setNodeContent:function(m,n){
if(!this._leaves[m])
throw new Error("Can't setContent on non-leaf node: "+m);

h.setContent(this.getNode(m),n);
return this;}});




e.exports=k;});
