if (self.CavalryLogger) { CavalryLogger.start_js_script(document.currentScript); } __d("LegacyMentionsInput.react",["cx","Bootloader","Event","FocusListener","Keys","ReactDOM","TypeaheadMetricsConfig","prop-types","react"],(function(a,b,c,d,e,f,g){var h;b("FocusListener");var i=h||(h=b("react"));a=function(a){"use strict";babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g=d?d:c}b("Style").set(this.input,"width",c+"px");this.inform("resize");b("Arbiter").inform("reflow")};d.getToken=function(a){return this.unique[a]||null};d.getTokens=function(){return this.tokens||[]};d.getTokenElements=function(){return b("DOMQuery").scry(this.tokenarea,"span.uiToken")};d.getTokenElementFromTarget=function(a){return b("Parent").byClass(a,"uiToken")};d.getTokenFromElement=function(a){return b("DataStore").get(a,"Token")};d.getTokenValues=function(){return!this.tokens?[]:this.tokens.map(function(a){return a.getValue()})};d.getFirstToken=function(){return this.tokens[0]||null};d.getLastToken=function(){return this.tokens[this.tokens.length-1]||null};d.hasMaxTokens=function(){return this.maxTokens&&this.maxTokens<=this.tokens.length};d.createToken=function(a,c){var d=this.getToken(this._tokenKey(a));d||(d=a.weak_reference?new(b("WeakToken"))(a,this.paramName):new(b("Token"))(a,this.paramName));c&&d.setElement(c);return d};d.addToken=function(a,c){if(this.hasMaxTokens())return;var d=this._tokenKey(a.getInfo());if(d in this.unique)return;this.unique[d]=a;this.tokens.push(a);this.insertToken(a);this.updateTokenarea();this.inform("addToken",a);this.inform("addTokenWithQuery",{token:a,query:c});this.inform("changeTokens");b("Arbiter").inform("Form/change",{node:this.element})};d.insertToken=function(a){b("DOM").appendContent(this.tokenarea,a.getElement())};d.removeToken=function(a){if(!a)return;var c=this.tokens.indexOf(a);if(c<0)return;this.tokens.splice(this.tokens.indexOf(a),1);delete this.unique[this._tokenKey(a.getInfo())];b("DOM").remove(a.getElement());this.updateTokenarea();this.inform("removeToken",a);this.inform("changeTokens");b("Arbiter").inform("Form/change",{node:this.element})};d.removeAllTokens=function(){this.reset(),this.inform("changeTokens"),this.inform("removeAllTokens")};d.updateTokenarea=function(){var a=this.typeahead.getCore(),c=this.getTokenValues();this.excludeDuplicates&&(this._exclusions||(this._exclusions=a.getExclusions()),a.setExclusions(c.concat(this._exclusions)));a.setEnabled(!this.hasMaxTokens());this.updateTokenareaVisibility();this.updatePlaceholder();this.inform("resize");b("Arbiter").inform("reflow")};d.updateTokenareaVisibility=function(){b("CSS").conditionShow(this.tokenarea,this.tokens.length!==0)};d._tokenKey=function(a){return a.uid+(a.freeform?":":"")};d._getWidthOffset=function(){if(this._widthOffset===null){var a=this.input.clientWidth,c=b("Style").getFloat(this.input,"width");a==c?this._widthOffset=b("Style").getFloat(this.input,"paddingLeft")+b("Style").getFloat(this.input,"paddingRight"):this._widthOffset=0}return this._widthOffset};d._getMetrics=function(){this._metrics||(this._metrics=new(b("TextMetrics"))(this.input,this.inline));return this._metrics};d._getIsInDOM=function(){return this._isInDOM||(this._isInDOM=b("DOMQuery").contains(document.body,this.input))};c.getInstance=function(a){a=b("Parent").byClass(a,"uiTokenizer");return a?b("DataStore").get(a,"Tokenizer"):null};c.init=function(a,b){a.init(b.tokenarea,b.param_name,b.initial_info,b.options)};return c}(b("mixin")(b("ArbiterMixin")));Object.assign(a.prototype,{inline:!1,maxTokens:null,excludeDuplicates:!0,placeholder:"",_widthOffset:null,_metrics:null});e.exports=a}),null); __d("PhotoTagApproval",["Arbiter","CSS","DOM","Event","Parent","PhotosConst","ge"],(function(a,b,c,d,e,f){a=function(){"use strict";function a(a){var c=this;this.viewer=a;this.units=[];this.currentUnit=0;var d=a.getVersionConst();d==b("PhotosConst").VIEWER_SNOWLIFT?this._root=b("ge")("fbPhotoSnowliftTagApproval"):this._root=b("ge")("fbPhotoPageTagApproval");b("Arbiter").subscribe(a.getEventString("DATA_CHANGE"),this.restartTagApproval.bind(this));b("Arbiter").subscribe("PhotoTagApproval.PENDING_TAG_PHOTO_CLICK",this.pendingTagPhotoClick.bind(this));b("Event").listen(this._root,"click",this.handleClick.bind(this));b("Event").listen(this._root,"mousemove",function(a){c.hiliteCurrentPendingTag(),b("Event").kill(a)});this.restartTagApproval()}var c=a.prototype;c.handleClick=function(a){a=a.getTarget();if(b("CSS").hasClass(a,"nextPager")&&b("CSS").hasClass(a,"enabled"))this.showNextUnit();else if(b("CSS").hasClass(a,"prevPager")&&b("CSS").hasClass(a,"enabled"))this.showPrevUnit();else if(b("Parent").byClass(a,"fbPhotoApprovalPendingButtons")){var c=this.units[this.currentUnit];c=this.getTagNameID(c);if(c){a=b("Parent").byClass(a,"approve");b("Arbiter").inform("PhotoTagApproval.UPDATE_TAG_BOX",{id:c,approve:a,version:this.viewer.getVersionConst()})}setTimeout(this.removeSelectedUnit.bind(this),0)}return!0};c.loadUnits=function(a){this.units=b("DOM").scry(this._root,"div.fbPhotoApprovalUnit"),this.units.length?(b("CSS").show(this._root),this.showUnit(a),b("CSS").conditionClass(this._root,"hidePagers",this.units.length==1)):(b("CSS").hide(this._root),b("Arbiter").inform("PhotoTagApproval.HILITE_TAG",{tag:null,version:this.viewer.getVersionConst()}))};c.restartTagApproval=function(){this.loadUnits(0)};c.pendingTagPhotoClick=function(a,c){if(c.version!==b("PhotosConst").VIEWER_PERMALINK&&c.version!==b("PhotosConst").VIEWER_SNOWLIFT)return!0;a="approve:"+c.id;for(var c=0;c0);c.conditionClass(b("DOM").find(this._root,"a.nextPager"),"enabled",this.currentUnitthis.HUGE_FACE_THRESH&&a.rect.h()>this.HUGE_FACE_THRESH&&(d*=this.HUGE_FACE_SHRINK_FACTOR);var e=this.getFaceboxSuggestionFromFaceboxElem(a.node);if(e){var f=this.version===b("PhotosConst").VIEWER_PERMALINK?b("FaceboxSourceConstants").PERMALINK_DISMISS:b("FaceboxSourceConstants").SNOWLIFT_DISMISS;this.addSuggestionToTagger(a,e);this._sendFaceboxSuggestionLogSignal(e.getAttribute("data-id"),f,a.id)}else this.removeSuggestionFromTagger();this.isSpherical||this.addTagFromPosition(c,d);return c};c.getFaceboxSuggestionFromFaceboxElem=function(a){return b("DOM").scry(a,"._570u")[0]};c.addSuggestionToTagger=function(a,c){this.removeSuggestionFromTagger();b("CSS").addClass(this.tagger,"suggestionActive");var d=b("DOM").find(this.tagger,".typeaheadContainer");c=c.cloneNode(!0);this.stripReactID(c);b("DOM").appendContent(d,c);this.setupFaceboxSuggestionHandlers(a,c)};c.stripReactID=function(a){a.removeAttribute("data-reactid");for(var b=0;be.y+c.y*f?(b("CSS").addClass(this.tagger,"fbPhotoTaggerFlipped"),d.addTypeaheadFlip("fbPhotoTaggerFlipped"),a.x>e.x+c.x*1/2?this.flipRules("fbPhotoTaggerRight","fbPhotoTaggerLeft",d):this.flipRules("fbPhotoTaggerLeft","fbPhotoTaggerRight",d)):(b("CSS").removeClass(this.tagger,"fbPhotoTaggerFlipped"),b("CSS").removeClass(this.tagger,"fbPhotoTaggerLeft"),b("CSS").removeClass(this.tagger,"fbPhotoTaggerRight"),d.removeTypeaheadFlip("fbPhotoTaggerFlipped"),d.removeTypeaheadFlip("fbPhotoTaggerLeft"),d.removeTypeaheadFlip("fbPhotoTaggerRight"));(!this.taggingMode||this.currentTextbox===null)&&this.ufi&&this.currentFacebox===null?this.showTaggerUFI():this.showTagger();this.taggingMode?this._sendWaterfallLogSignal(b("PhotosTaggingWaterfall").TAG_FACE):this._sendWaterfallLogSignal(b("PhotosTaggingWaterfall").HOVER_TAG_FACE)};c.flipRules=function(a,c,d){b("CSS").addClass(this.tagger,a),b("CSS").removeClass(this.tagger,c),d.addTypeaheadFlip(a),d.removeTypeaheadFlip(c)};c.calcTaggerPosition=function(a,c,d,e){e=e||d;var f=b("Vector").getElementPosition(a);a=b("Vector").getElementDimensions(a);var g=new(b("Vector"))(d/2,e/2),h=c.sub(f);for(var i in{x:1,y:1}){if(c[i]f[i]+a[i])return null;var j=i==="x"?d:e;h[i]0&&c.push({node:d[0],id:a,rect:this.tagRects[a]})}this.showTagIfCommentAdded()}this.updateRevokedFaceboxes();this.faceboxes.sort(function(a,b){return a.rect.getCenter().x-b.rect.getCenter().x});if(this.currentFacebox){d=this.currentFacebox.rect.getCenter();this.setCurrentFacebox(this.findNearestFacebox(d));b("CSS").addClass(this.currentFacebox.node,"active")}this.requestFaceboxNextTag&&(this.addNextTagFromFacebox(1),this.requestFaceboxNextTag=!1)};c.getFacebox=function(a){for(var b=0;b0&&b("CSS").addClass(c[0],"resultsPresent");return a.prototype.show.call(this)};d.hide=function(){var c=b("DOM").scry(this.context,".typeaheadBackdrop");c.length>0&&b("CSS").removeClass(c[0],"resultsPresent");return a.prototype.hide.call(this)};d.render=function(b,c,d){this.autoSelect=this.origAutoSelect&&b.length,this.disableAutoSelect=b.length===0,c=c.concat(this.getAdditionalResults()),a.prototype.render.call(this,b,c,d)};d.getItems=function(){var b=a.prototype.getItems.call(this);(!this.value||this.hasResultsWithEmptyInput)&&b.shift();this.userEd&&b.shift();return b};d.getSuggestions=function(){return this.suggestions};d.setSuggestions=function(a){this.suggestions=a?a.map(String):[],this.visible=!!this.suggestions.length};d.addSuggestion=function(a){this.suggestions.unshift(a)};d.addTypeaheadFlip=function(a){b("CSS").addClass(this.element,a)};d.removeTypeaheadFlip=function(a){b("CSS").removeClass(this.element,a)};d.getContext=function(){var c=b("Parent").byClass(this.element,"typeaheadContainer");if(c)return c;else return a.prototype.getContext.call(this)};d.getAdditionalResults=function(){return[]};return c}(b("ContextualTypeaheadView"));e.exports=a}),null); __d("FreeformTokenizerBehavior",["Event","Input","Keys"],(function(a,b,c,d,e,f){function a(a,c){var d=c.matcher&&new RegExp(c.matcher,"i"),e=c.splitter&&new RegExp(c.splitter),f=c.tokenize_on_blur!==!1,g=c.tokenize_on_paste!==!1,h=c.split_on_check===!0,i=c.select_on_comma!==!1,j=c.select_on_space===!0,k=c.never_submit===!0;function l(c){var f=b("Input").getValue(a.getInput()).trim();e&&c&&c.type=="paste"?f=f.split(e):e&&h?f=f.split(e):f=[f];var g=!1;for(var i=0;ithis.$1){a=this.$2.shift();this.$3-=a.length}};b.reset=function(){this.$3=0,this.$2=[]};return a}();e.exports=a}),null); __d("TypeaheadMetrics",["AsyncRequest","Event","QueriesHistory","emptyFunction"],(function(a,b,c,d,e,f){var g=1e3;a=function(){"use strict";function a(a){this.extraData={},Object.assign(this,a)}var c=a.prototype;c.init=function(a){this.init=b("emptyFunction"),this._initImpl(a)};c._initImpl=function(a){this.core=a.getCore(),this.view=a.getView(),this.data=a.getData(),this.queriesHistory=new(b("QueriesHistory"))(g),this.stats={},this.sessionActive=!1,this._sessionStartEvents=[],this._sessionEndEvents=[],this._reset(),this.initEvents()};c._reset=function(){this.log=[],this.stats={},this.avgStats={},this.sessionActive=!1,this._setSid(Math.floor(Date.now()*Math.random())),this.request_ids=[],this.lastNotBackspacedQuery="",this.queriesHistory.reset(),this._logEvent("session_started",{})};c._logEvent=function(a,b){a={type:a,data:b,time:Date.now()};this.log.push(a)};c._setSid=function(a){this.sid=a,typeof this.data.queryData==="object"&&this.data.queryData!==null?this.data.queryData.sid=this.sid:this.data.setQueryData({sid:this.sid}),typeof this.data.bootstrapData==="object"&&this.data.bootstrapData!==null?this.data.bootstrapData.sid=this.sid:this.data.setBootstrapData({sid:this.sid})};c.resetWithData=function(a){this.init=b("emptyFunction"),this._initImpl(a)};c.resetWithDataBeforeSessionEnd=function(a){var c=this.sessionActive;this.init=b("emptyFunction");this._initImpl(a);this.sessionActive=c};c.recordSelect=function(a){var b=a.selected;b.uid==null?this.recordStat("selected_id","SELECT_NULL"):this.recordStat("selected_id",b.uid);this.recordStat("selected_type",b.type);this.recordStat("selected_score",b.score);this.recordStat("selected_original_id",b.original_id);this.recordStat("place_id",b.place_id);this.recordStat("client_time",b.client_time);this.recordStat("selected_position",a.index);this.recordStat("selected_with_mouse",a.clicked?1:0);this.recordStat("selected_query",a.query);this._sessionEnd()};c.bindSessionStart=function(a,b,c){var d=this;if(c)for(var c=0;c:(":"grumpy",">:-(":"grumpy",":/":"unsure",":-/":"unsure",":\\":"unsure",":-\\":"unsure","=/":"unsure","=\\":"unsure",":'(":"cry",":'-(":"cry",":\u2019(":"cry",":\u2019-(":"cry","3:)":"devil","3:-)":"devil","O:)":"angel","O:-)":"angel","0:)":"angel","0:-)":"angel",":*":"kiss",":-*":"kiss",";-*":"winkkiss",";*":"winkkiss","<3":"heart","<3":"heart","\u2665":"heart","^_^":"kiki","^~^":"kiki","-_-":"expressionless",":-|":"squint",":|":"squint",">:o":"upset",">:O":"upset",">:-O":"upset",">:-o":"upset",">_<":"persevere",">.<":"persevere",'<(")':"penguin",O_O:"flushface",o_o:"flushface","0_0":"flushface",T_T:"crying","T-T":"crying",ToT:"crying","T.T":"crying","-3-":"flushkiss","'-_-":"sweating","\u2019-_-":"sweating","(y)":"like",":like:":"like","(Y)":"like",":+1:":"thumbsup","(n)":"dislike","(N)":"dislike"};b={slightsmile:"1f642",smile:"1f60a",frown:"1f61e",winktongue:"1f61c",dog:"1f436",poop:"1f4a9",transflag:"1f3f3_200d_26a7",tongue:"1f61b",slightgrin:"1f600",grin:"1f603",gasp:"1f62e",wink:"1f609",glasses:"1f60e",grumpy:"1f620",unsure:"1f615",cry:"1f622",devil:"1f608",angel:"1f607",kiss:"1f617",winkkiss:"1f618",heart:"2764",kiki:"1f60a",expressionless:"1f611",squint:"1f610",upset:"1f620",persevere:"1f623",penguin:"1f427",flushface:"1f633",crying:"1f62d",flushkiss:"1f61a",sweating:"1f613",like:"f0000",thumbsup:"1f44d",dislike:"1f44e"};c={slightsmile:":)",smile:"=)",frown:":(",winktongue:";-P",dog:":dog:",poop:":poop:",transflag:":trans:",tongue:":P",slightgrin:":D",grin:"=D",gasp:":o",wink:";)",glasses:"8-)",grumpy:">:(",unsure:":/",cry:":'(",devil:"3:)",angel:"O:)",kiss:":*",winkkiss:";*",heart:"<3",kiki:"^_^",expressionless:"-_-",squint:":-|",upset:">:o",persevere:">_<",penguin:'<(")',flushface:"O_O",crying:"T_T",flushkiss:"-3-",sweating:"'-_-",like:"(y)",thumbsup:":+1:",dislike:"(n)"};d=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>\.<|<\(\"\)(?!\))|O_O|o_o|0_0|T_T|T\-T|ToT|T\.T|\-3\-|\'\-_\-|\u2019\-_\-|\(y\)(?!\))|:like:|\(Y\)(?!\))|:\+1:(?!\))|\(n\)(?!\))|\(N\)(?!\)))(?:[\s\'\".,!?]|
|$)/;f.names=a;f.emote2emojis=b;f.symbols=c;f.regexp=d;f.noncapturingRegexp=e}),66); __d("TransformTextToDOMMixin",["flattenArray","isElementNode"],(function(a,b,c,d,e,f){var g=3;a={transform:function(a,c){return b("flattenArray")(a.map(function(a){if(!b("isElementNode")(a)){var d=a,e=[],f=this.MAX_ITEMS||g;while(f--){var h=c?[d].concat(c):[d];h=this.match.apply(this,h);if(!h)break;e.push(d.substring(0,h.startIndex));e.push(h.element);d=d.substring(h.endIndex)}d&&e.push(d);return e}return a}.bind(this)))},params:function(){for(var a=arguments.length,b=new Array(a),c=0;c