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

__d("TextInputControl",["DOMControl","Event","Input","debounce"],(function a(b,c,d,e,f,g){var h,i;h=babelHelpers.inherits(j,c("DOMControl"));i=h&&h.prototype;function j(k){"use strict";i.constructor.call(this,k);var l=this.getRoot(),m=c("debounce")(this.update.bind(this),0);c("Event").listen(l,{input:m,keydown:m,paste:m})}j.prototype.setMaxLength=function(k){"use strict";c("Input").setMaxLength(this.getRoot(),k);return this};j.prototype.getValue=function(){"use strict";return c("Input").getValue(this.getRoot())};j.prototype.isEmpty=function(){"use strict";return c("Input").isEmpty(this.getRoot())};j.prototype.setValue=function(k){"use strict";c("Input").setValue(this.getRoot(),k);this.update();return this};j.prototype.clear=function(){"use strict";return this.setValue("")};j.prototype.setPlaceholderText=function(k){"use strict";c("Input").setPlaceholder(this.getRoot(),k);return this};f.exports=j}),null);
__d("TextAreaControl",["Arbiter","ArbiterMixin","CSS","DOMControl","Event","Style","TextInputControl","TextMetrics","classWithMixins","mixin"],(function a(b,c,d,e,f,g){var h,i;function j(l,m){return c("Style").getFloat(l,m)||0}h=babelHelpers.inherits(k,c("classWithMixins")(c("TextInputControl"),c("mixin")(c("ArbiterMixin"))));i=h&&h.prototype;function k(l){"use strict";i.constructor.call(this,l);this.autogrow=c("CSS").hasClass(l,"uiTextareaAutogrow");this.autogrowWithPlaceholder=c("CSS").hasClass(l,"uiTextareaAutogrowWithPlaceholder");this.width=null;c("Event").listen(l,"focus",this._handleFocus.bind(this))}k.prototype.setAutogrow=function(l){"use strict";this.autogrow=l;return this};k.prototype.onupdate=function(){"use strict";i.onupdate.call(this);this.updateHeight()};k.prototype.updateHeight=function(){"use strict";if(this.autogrow){var l=this.getRoot();if(!this.metrics)this.metrics=new(c("TextMetrics"))(l);if(typeof this.initialHeight==="undefined"){this.isBorderBox=c("Style").get(l,"box-sizing")==="border-box"||c("Style").get(l,"-moz-box-sizing")==="border-box"||c("Style").get(l,"-webkit-box-sizing")==="border-box";this.borderBoxOffset=j(l,"padding-top")+j(l,"padding-bottom")+j(l,"border-top-width")+j(l,"border-bottom-width");this.initialHeight=l.offsetHeight-this.borderBoxOffset}var m=null;if((!l.value||l.value.length===0)&&this.autogrowWithPlaceholder)m=this.metrics.measure(l.placeholder);else m=this.metrics.measure();var n=Math.max(this.initialHeight,m.height);if(this.isBorderBox)n+=this.borderBoxOffset;if(this.maxHeight&&n>this.maxHeight){n=this.maxHeight;c("Arbiter").inform("maxHeightExceeded",{textArea:l})}if(n!==this.height){this.height=n;c("Style").set(l,"height",n+"px");c("Arbiter").inform("reflow");this.inform("resize")}}else if(this.metrics){this.metrics.destroy();this.metrics=null}};k.prototype.resetHeight=function(){"use strict";this.height=-1;this.update()};k.prototype.setMaxHeight=function(l){"use strict";this.maxHeight=l};k.prototype.setAutogrowWithPlaceholder=function(l){"use strict";this.autogrowWithPlacedholder=l};k.prototype._handleFocus=function(){"use strict";this.width=null};k.getInstance=function(l){"use strict";return c("DOMControl").getInstance(l)||new k(l)};f.exports=k}),null);
__d("PluginConnectButtonType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({BLUE_BASE:1,WHITE_BASE:2})}),null);
__d("PluginFlyout",["csx","Arbiter","Button","CSS","DOM","DOMEvent","DOMEventListener","Focus","FormSubmit","Plugin","TextAreaControl"],(function a(b,c,d,e,f,g,h){var i=c("Arbiter").SUBSCRIBE_NEW,j=c("Arbiter").subscribe,k=c("Arbiter").inform,l=function l(n,o){return c("DOMEventListener").add(n,"click",o)};function m(n,o,p){var q=this,r=j(c("Plugin").CONNECT,function(event,s){c("Arbiter").unsubscribe(r);q.init(n,o,p);q.connect(event,s)},i);j(c("Plugin").DIALOG,function(){q.init(n,o,p);q.toggle()},i)}Object.assign(m.prototype,{init:function n(o,p,q){if(this.initialized)return;this.initialized=true;c("DOM").appendContent(o,JSON.parse(q));var r=c("DOM").find(o,"form"),s=c("DOM").find(r,"._56zw"),t=c("DOM").find(r,"._56zx"),u=c("DOM").find(r,"._42x4"),v=c("TextAreaControl").getInstance(u);c("DOMEventListener").add(u,"keyup",function(z){c("Button").setEnabled(s,!!v.getValue())});c("DOMEventListener").add(window,"keydown",function(z){if(z.keyCode===27)x()});c("DOMEventListener").add(r,"submit",function(z){new(c("DOMEvent"))(z).kill();c("FormSubmit").send(r)});var w=p==="tiny"?c("DOM").find(document.body,".pluginPostFlyoutPrompt"):null;this.flyout=o;this.form=r;this.post_button=s;this.prompt=w;var x=this.hide.bind(this),y=this.show.bind(this);l(t,function(z){new(c("DOMEvent"))(z).kill();x()});if(w)l(w,function(z){new(c("DOMEvent"))(z).kill();y()});j(c("Plugin").CONNECT,this.connect.bind(this),i);j(c("Plugin").DISCONNECT,function(){x()},i);j(m.SUCCESS,function(){x();if(w)c("CSS").hide(w)},i);j(c("Plugin").ERROR,function(event,z){if(z.action!=="comment")return;c("DOM").setContent(c("DOM").find(r,"._56zy"),z.content);c("CSS").hide(s)},i)},connect:function n(event,o){if(o.crossFrame)return;if(this.prompt)c("CSS").show(this.prompt);if(!o.story_fbid)this.show()},show:function n(){this.shown=true;c("CSS").show(this.flyout);c("CSS").show(this.post_button);var o=c("DOM").scry(this.form,"._5jjo");if(o)c("Focus").set(o[0]);else c("Focus").set(this.form.comment);k(m.SHOW)},hide:function n(){this.shown=false;c("CSS").hide(this.flyout);k(m.HIDE)},toggle:function n(){if(this.shown)this.hide();else this.show()}});Object.assign(m,{SUCCESS:"platform/plugins/flyout/success",SHOW:"platform/plugins/flyout/show",HIDE:"platform/plugins/flyout/hide",success:function n(){k(m.SUCCESS)}});f.exports=m}),null);
__d("PluginConnectButton",["csx","cx","Arbiter","CSS","DOM","DOMDimensions","DOMEvent","DOMEventListener","Focus","FormSubmit","PlatformWidgetEndpoint","Plugin","PluginConnectButtonType","PluginFlyout","PluginOptin","Style","URI","getElementPosition"],(function a(b,c,d,e,f,g,h,i){var j=c("Arbiter").SUBSCRIBE_NEW,k=c("Arbiter").subscribe,l=function l(n,o){return c("DOMEventListener").add(n,"click",o)};function m(n){this.config=n;this.busy=false;var o=c("DOM").find(n.form,".pluginConnectButton");this.buttons=o;this.node_connected=c("DOM").find(o,".pluginConnectButtonConnected");this.node_disconnected=c("DOM").find(o,".pluginConnectButtonDisconnected");var p=function(r){new(c("DOMEvent"))(r).kill();if(!this.busy){this.submit();this.busy=this.canpersonalize}}.bind(this);l(this.node_disconnected,p);if(n.buttontype===c("PluginConnectButtonType").BLUE_BASE)l(c("DOM").find(o,".pluginButtonX button"),p);else if(n.buttontype===c("PluginConnectButtonType").WHITE_BASE)l(this.node_connected,p);l(this.node_connected,function(r){return c("Arbiter").inform(c("Plugin").DIALOG,r)});var q=this.update.bind(this);k(c("Plugin").CONNECT,q,j);k(c("Plugin").DISCONNECT,q,j);k(c("Plugin").ERROR,this.error.bind(this),j);k("Connect.Unsafe.xd/reposition",this.flip.bind(this));k(c("PluginFlyout").HIDE,this.hideFlyout.bind(this));if(n.autosubmit)setTimeout(this.submit.bind(this),0)}Object.assign(m.prototype,{update:function n(o,event){this.busy=false;var p=this.config;if(event.identifier!==p.identifier)return;var q=o===c("Plugin").CONNECT,r=c("PlatformWidgetEndpoint").plugins(p.plugin);r+="/"+(!q?"connect":"disconnect");c("CSS")[q?"show":"hide"](this.node_connected);c("CSS")[q?"hide":"show"](this.node_disconnected);try{if(document.activeElement.nodeName.toLowerCase()==="button"){var s=q?this.node_connected:this.node_disconnected,t=c("DOM").find(s,"button");t.disabled=false;c("Focus").set(t)}}catch(u){}p.connected=q;p.form.setAttribute("action",r);p.form.setAttribute("ajaxify",r)},error:function n(event,o){this.busy=false;if(o.action in{connect:1,disconnect:1}){c("DOM").setContent(this.buttons,o.content);var p=c("DOM").scry(this.buttons,".confirmButton");if(p.length===1)c("Focus").set(p[0])}},submit:function n(){if(!this.config.canpersonalize)return this.login();c("FormSubmit").send(this.config.form);this.fireStateToggle()},fireStateToggle:function n(){var o=this.config;if(o.connected)c("Plugin").disconnect(o.identifier);else c("Plugin").connect(o.identifier)},login:function n(){var o=this.config.plugin;new(c("PluginOptin"))(o,c("URI").getRequestURI().getQueryData().api_key).addReturnParams({act:"connect"}).addLoginParams({social_plugin_action:this.config.pluginaction,kid_directed_site:this.config.kidDirectedSite}).start()},flip:function n(o,p){var q=c("DOM").scry(document.body,"._4xn8");if(q.length===0)return;else q=q[0];var r=c("DOM").scry(this.config.form,".pluginConnectButtonConnected .pluginButtonIcon"),s=c("Style").get(r[0],"display")!=="none"?r[0]:r[1],t=c("DOM").find(document.body,".pluginConnectButtonLayoutRoot"),u;if(p.type==="reposition"){c("CSS").addClass(t,"_1f8a");c("Style").set(t,"padding-left",450-t.offsetWidth+"px");c("CSS").removeClass(t,"_1f8b");u=c("getElementPosition")(s).x+c("DOMDimensions").getElementDimensions(s).width/2-6}else{c("CSS").addClass(t,"_1f8b");c("Style").set(t,"padding-left","0px");c("CSS").removeClass(t,"_1f8a");u=6}c("Style").set(q,"left",u+"px")},hideFlyout:function n(){c("Focus").set(this.connected?this.node_disconnected:this.node_connected)}});f.exports=m}),null);