/*!CK:781775535!*//*1403732231,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["v8axt"]); } __d("FaceboxSourceConstants",[],function(a,b,c,d,e,f){e.exports={SNOWLIFT_SUGGEST:"snowlift_suggest",SNOWLIFT_DISMISS:"photo_snowlift_unit_suggestions",PERMALINK_SUGGEST:"permalink_suggest",PERMALINK_DISMISS:"photo_permalink_suggestions",UPLOADER_SUGGEST:"uploader_suggest",UPLOADER_DISMISS:"album_uploader_suggestions"};},null); __d("PhotoTagApproval",["Arbiter","CSS","DOM","Event","Parent","PhotosConst","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(o){"use strict";this.viewer=o;this.units=[];this.currentUnit=0;var p=o.getVersionConst();if(p==l.VIEWER_SNOWLIFT){this._root=m('fbPhotoSnowliftTagApproval');}else this._root=m('fbPhotoPageTagApproval');g.subscribe(o.getEventString('DATA_CHANGE'),this.restartTagApproval.bind(this));g.subscribe('PhotoTagApproval.PENDING_TAG_PHOTO_CLICK',this.pendingTagPhotoClick.bind(this));j.listen(this._root,'click',this.handleClick.bind(this));j.listen(this._root,'mousemove',function(q){this.hiliteCurrentPendingTag();j.kill(q);}.bind(this));this.restartTagApproval();}n.prototype.handleClick=function(event){"use strict";var o=event.getTarget();if(h.hasClass(o,'nextPager')&&h.hasClass(o,'enabled')){this.showNextUnit();}else if(h.hasClass(o,'prevPager')&&h.hasClass(o,'enabled')){this.showPrevUnit();}else if(k.byClass(o,'fbPhotoApprovalPendingButtons')){var p=this.units[this.currentUnit],q=this.getTagNameID(p);if(q){var r=k.byClass(o,'approve');g.inform('PhotoTagApproval.UPDATE_TAG_BOX',{id:q,approve:r,version:this.viewer.getVersionConst()});}setTimeout(this.removeSelectedUnit.bind(this),0);}return true;};n.prototype.loadUnits=function(o){"use strict";this.units=i.scry(this._root,'div.fbPhotoApprovalUnit');if(this.units.length){h.show(this._root);this.showUnit(o);h.conditionClass(this._root,'hidePagers',this.units.length==1);}else{h.hide(this._root);g.inform('PhotoTagApproval.HILITE_TAG',{tag:null,version:this.viewer.getVersionConst()});}};n.prototype.restartTagApproval=function(){"use strict";this.loadUnits(0);};n.prototype.pendingTagPhotoClick=function(o,p){"use strict";if(p.version!==l.VIEWER_PERMALINK&&p.version!==l.VIEWER_SNOWLIFT)return true;var q='approve:'+p.id;for(var r=0;r0);h.conditionClass(i.find(this._root,'a.nextPager'),'enabled',this.currentUnitthis.HUGE_FACE_THRESH&&da.rect.h()>this.HUGE_FACE_THRESH)ha*=this.HUGE_FACE_SHRINK_FACTOR;var ia=this.getFaceboxSuggestionFromFaceboxElem(da.node);if(ia){var ja=(this.version===q.VIEWER_PERMALINK)?m.PERMALINK_DISMISS:m.SNOWLIFT_DISMISS;this.addSuggestionToTagger(da,ia);this._sendFaceboxSuggestionLogSignal(ia.getAttribute('data-id'),ja);}else this.removeSuggestionFromTagger();this.addTagFromPosition(ga,ha);return ga;};ca.prototype.getFaceboxSuggestionFromFaceboxElem=function(da){"use strict";return j.scry(da,"._570u")[0];};ca.prototype.addSuggestionToTagger=function(da,ea){"use strict";this.removeSuggestionFromTagger();i.addClass(this.tagger,'suggestionActive');var fa=j.find(this.tagger,'.typeaheadContainer'),ga=ea.cloneNode(true);j.appendContent(fa,ga);this.setupFaceboxSuggestionHandlers(da,ga);};ca.prototype.removeSuggestionFromTagger=function(){"use strict";i.removeClass(this.tagger,'suggestionActive');var da=j.scry(this.tagger,'.faceboxSuggestion');da&&da.forEach(function(ea){j.remove(ea);});};ca.prototype.dismissFaceboxSuggestion=function(da,ea,fa,ga){"use strict";new h().setURI('/ajax/dismiss_tag_suggest.php').setMethod('POST').setData({facebox_logs:[{facebox:da,log_data:{photo_owner:fa,tagee:ea,is_first:true}}],closing_source:ga,closing_action:'no'}).setAllowCrossPageTransition(true).send();};ca.prototype.addTagFromFacebox=function(da){"use strict";var ea=this.addTagFromFaceboxDontSave(da),fa=this.viewer.getImage();this.saveClickPosition(fa,ea);};ca.prototype.addTagFromPosition=function(da,ea){"use strict";var fa=this.viewer.getImage(),ga=this.calcTaggerPosition(fa,da,ea);this.calcClickPoint(fa,da);if(!ga){this.hideTagger();return;}ga.setElementPosition(this.tagger);if(this.newTagBox){ga.setElementPosition(this.newTagBox);new v(ea,ea).setElementDimensions(this.newTagBox);}var ha=v.getElementPosition(fa),ia=v.getElementDimensions(fa),ja=this.typeahead.getView();if(da.y>ha.y+ia.y*3/4){i.addClass(this.tagger,'fbPhotoTaggerFlipped');ja.addTypeaheadFlip('fbPhotoTaggerFlipped');if(da.x>ha.x+ia.x*1/2){this.flipRules('fbPhotoTaggerRight','fbPhotoTaggerLeft',ja);}else this.flipRules('fbPhotoTaggerLeft','fbPhotoTaggerRight',ja);}else{i.removeClass(this.tagger,'fbPhotoTaggerFlipped');i.removeClass(this.tagger,'fbPhotoTaggerLeft');i.removeClass(this.tagger,'fbPhotoTaggerRight');ja.removeTypeaheadFlip('fbPhotoTaggerFlipped');ja.removeTypeaheadFlip('fbPhotoTaggerLeft');ja.removeTypeaheadFlip('fbPhotoTaggerRight');}this.showTagger();if(this.taggingMode){this._sendWaterfallLogSignal(r.TAG_FACE);}else this._sendWaterfallLogSignal(r.HOVER_TAG_FACE);};ca.prototype.flipRules=function(da,ea,fa){"use strict";i.addClass(this.tagger,da);i.removeClass(this.tagger,ea);fa.addTypeaheadFlip(da);fa.removeTypeaheadFlip(ea);};ca.prototype.calcTaggerPosition=function(da,ea,fa,ga){"use strict";ga=ga||fa;var ha=v.getElementPosition(da),ia=v.getElementDimensions(da),ja=new v(fa/2,ga/2),ka=ea.sub(ha);for(var la in {x:1,y:1}){if(ea[la]ha[la]+ia[la])return null;var ma=la==='x'?fa:ga;if(ka[la]<(ma/2)){ja[la]=ka[la];}else if(ia[la]=2&&this._uriStack[ma-2]===la)this._uriStack.pop();var na=this.stream.getCursorForURI(ka.getUnqualifiedURI().toString());if(na){var oa=this.stream.getRelativeMovement(na);this.page(oa,true);p.transitionComplete();return true;}return false;};ja.prototype.recacheData=function(ka){"use strict";if(!this.loadingStates.html){var la=this.stream.getCurrentHtml();for(var ma in la){var na=fa(ma);if(na)la[ma]=da(na.childNodes);if(ka!==true&&ma!=='fbPhotoPageHeader')l.empty(ba(ma));}}};ja.prototype.getCurrentPhotoInfo=function(){"use strict";var ka=this.stream.getCurrentImageData();return ka&&ka.info;};ja.prototype.getVideoOnStage=function(){"use strict";var ka=this.stream.getCurrentImageData();return ka&&ka.video;};ja.prototype.switchImage=function(ka,la){"use strict";k.hide(this.image);k.hide(this.errorBox);var ma=this.stream&&this.stream.getCurrentImageData();if(ma){t.addPhotoView(ma.info);if(this._showHover){var na=this.stream.getCurrentExtraData();if(na)v.logImageImpression('permalink',String(this.stream.getCursor()),Object.keys(na.tagRects));}}var oa=l.create('img',{id:'fbPhotoImage',className:'fbPhotoImage',alt:'',src:ka});l.replace(this.image,oa);this.image=oa;if(this.imageLoadListener)this.imageLoadListener.remove();this.imageLoadListener=m.listen(this.image,'load',this.adjustForNewData.bind(this));if(la)this.stream.preloadImages();};ja.prototype.switchVideo=function(ka,la){"use strict";var ma='swf_'+ka;if(la){k.addClass(this.stageWrapper,'showVideo');this.videoStage.id=ka;if(window[ma]&&!fa(ma))window[ma].write(ka);}else{this.videoStage.id='fbPageVideoStage';window[ma].addVariable('video_autoplay',0);l.empty(this.videoStage);k.removeClass(this.stageWrapper,'showVideo');}};ja.prototype.swapData=function(){"use strict";if(this.dataLoadTimer){this.setLoadingState(ja.STATE_HTML,true);clearTimeout(this.dataLoadTimer);this.dataLoadTimer=setTimeout(this.clearTimer.bind(this,true),100);return;}var ka,la=this.stream.getCurrentHtml();if(la){for(var ma in la){ka=fa(ma);ka&&l.setContent(ka,la[ma]);}g.inform('PhotoPermalink.DATA_CHANGE',this.stream.getCurrentImageData().info,g.BEHAVIOR_STATE);if(this.stream.getCurrentExtraData()){g.inform('PhotoPermalink.EXTRA_DATA_CHANGE',this.stream.getCurrentExtraData(),g.BEHAVIOR_STATE);var na=this.stream.getCurrentExtraData();if(na&&na.source!==undefined){this.source=na.source;t.setSource(this.source);}}this.setLoadingState(ja.STATE_HTML,false);this.dataLoadTimer=setTimeout(this.clearTimer.bind(this,false),100);}this.adjustForNewData();};ja.prototype.clearTimer=function(ka){"use strict";this.dataLoadTimer=false;ka&&this.swapData();};ja.prototype.adjustForNewData=function(){"use strict";if(!this.image)return;var ka=l.scry(this.stageWrapper,'div.tagsWrapper')[0],la=aa.getElementDimensions(this.image);if(ka){z.set(ka,'width',la.x+'px');z.set(ka,'height',la.y+'px');}};ja.prototype.fetchInitBucket=function(ka){"use strict";if(!this.stream.isLoaded())return;this.stream.fetch(ka,true);};ja.prototype.addPhotoFbids=function(ka,la,ma){"use strict";var na=this.stream.getCursor()===null;this.stream.attachToFbidsList(ka,la,ma);if(ma&&na)this.page(0);};ja.prototype.attachTagger=function(ka){"use strict";l.appendContent(this.stageActions,ka);};ja.prototype.storeFromData=function(ka){"use strict";var la=this.stream.storeToCache(ka);if('init' in ka){t.setPhotoSet(this.stream.getPhotoSet());t.setLogFbids(true);t.addPhotoView(this.stream.getCurrentImageData().info);if(this._showHover){var ma=this.stream.getCurrentExtraData();if(ma)v.logImageImpression('permalink',String(this.stream.getCursor()),Object.keys(ma.tagRects));}}if('error' in la){this.checkState(ja.STATE_ERROR);return;}if('image' in la)this.checkState(ja.STATE_IMAGE_DATA);if('data' in la)this.checkState(ja.STATE_HTML);if(!this.payloadInitialized&&this.stream.getCurrentExtraData()){this.payloadInitialized=true;g.inform('PhotoPermalink.EXTRA_DATA_CHANGE',this.stream.getCurrentExtraData(),g.BEHAVIOR_STATE);}};ja.prototype.handleServerError=function(ka,la){"use strict";l.setContent(this.errorBox,ka);this.storeFromData(la);};ja.prototype.updateTotalCount=function(ka,la,ma){"use strict";var na=fa('fbPhotoPagePositionAndCount');na&&l.setContent(na,ma);this.stream.setTotalCount(ka);this.stream.setFirstCursorIndex(la);};ja.prototype.buttonListener=function(event){"use strict";var ka=event.getTarget();if(q.byClass(ka,'likeButton')){var la=l.scry(this.feedback,'button.like_link')[0];if(!la)la=l.scry(this.feedback,'a.UFILikeLink')[0];la&&la.click();}else if(q.byClass(ka,'commentButton')){var ma=l.scry(this.feedback,'div.commentBox textarea')[0];if(!ma)ma=l.scry(this.feedback,'li.UFIAddComment textarea')[0];if(ma){ma.focus();this.root.scrollTop=this.root.scrollHeight;}}};ja.prototype.rotateListener=function(event){"use strict";var ka=event.getTarget();if(q.byClass(ka,'rotateRight')){this.rotate('right');}else if(q.byClass(ka,'rotateLeft'))this.rotate('left');};ja.prototype.stageClickListener=function(event){"use strict";var ka=event.getTarget(),la=k.hasClass(ka,'faceBox'),ma=(q.byClass(ka,'fbPhotoTagApprovalBox')||q.byClass(ka,'faceboxSuggestion')||q.byClass(ka,'videoStage')||q.byClass(ka,'tag')||q.byClass(ka,'typeaheadWrapper')||q.byClass(ka,'photoTagTypeahead')||q.byClass(ka,'fbPhotoViewLarger')||la);if(la){if(!this.showingTypeaheadSuggestions){var na=this.getTagger();na.updateWithSuggestions();setTimeout((function(){l.find(na.tagger,'input.textInput').focus();}).bind(this),0);}this.showingTypeaheadSuggestions=!this.showingTypeaheadSuggestions;}if(ma){return true;}else this.goNav(event);};ja.prototype.rotate=function(ka){"use strict";var la=this.stream.getCursor();if(this.getVideoOnStage()){var ma=(ka=='left')?270:90;h.isTruthy(this.videoRotateURI,"Video rotate URI not set.");j.loadModules(["VideoRotate"],function(oa){new oa(la,this.videoRotateURI).motionRotate(ma);}.bind(this));return;}var na=ca({fbid:la,opaquecursor:this.stream.getOpaqueCursor(la),cs_ver:s.VIEWER_PERMALINK},this.stream.getPhotoSetQuery());na[ka]=1;this.setLoadingState(ja.STATE_IMAGE_DATA,true);k.hide(this.image);new i('/ajax/photos/photo/rotate/').setMethod('POST').setAllowCrossPageTransition(true).setReadOnly(false).setData(na).setFinallyHandler(this.rotateComplete.bind(this,la)).send();};ja.prototype.rotateComplete=function(ka,la){"use strict";if(ka==this.stream.getCursor()){this.setLoadingState(ja.STATE_IMAGE_DATA,false);this.switchImage(this.stream.getCurrentImageData().url);this.swapData();}};ja.prototype.mouseOutListener=function(event){"use strict";var ka=event.getTarget(),la=event.getRelatedTarget(),ma=q.byClass(ka,'stageActions'),na=q.byClass(ka,'stageWrapper'),oa=q.byClass(la,'stageActions'),pa=q.byClass(la,'stageWrapper'),qa=q.byClass(la,'uiContextualLayer'),ra=(!pa&&!qa&&(na&&!oa)||(ma&&!pa));if(ra)this.unhiliteAllTags(true);};ja.prototype.mouseMoveListener=function(event){"use strict";var ka=event.getTarget(),la=(q.byClass(ka,'faceboxSuggestion')||q.byClass(ka,'tagPointer')||q.byClass(ka,'typeaheadWrapper')||q.byClass(ka,'photoTagTypeahead')||q.byClass(ka,'arrow'));if(!q.byClass(ka,'stageActions')&&!q.byClass(ka,'stageWrapper')||la)return;this.hiliteTagsOnMouseMove(event);};ja.prototype.unhiliteAllTags=function(ka,event){"use strict";l.scry(this.stageWrapper,'div.tagsWrapper div.hover').forEach(function(ma){if(ka&&k.hasClass(ma,'tagBoxPending'))return;k.removeClass(ma,'hover');});if(ka)return;l.scry(this.stageWrapper,'div.tagsWrapper div.otherActive').forEach(function(ma){k.removeClass(ma,'otherActive');});if(this.unhiliteTimer!==null){clearTimeout(this.unhiliteTimer);this.unhiliteTimer=null;}this.hilitedTag=null;this.showingTypeaheadSuggestions=false;if(!k.hasClass(this.root,'taggingMode')){var la=this.getTagger();if(la){la.hideTagger();la.setCurrentFacebox(null);}}};ja.prototype.getTagger=function(){"use strict";return x.getInstance(s.VIEWER_PERMALINK);};ja.prototype.switchHilitedTags=function(ka,la){"use strict";this.unhiliteAllTags();this.hiliteAllBoxes();var ma=fa(ka);if(ma){this.hilitedTag=ka;if(!k.hasClass(this.root,'taggingMode')&&w.isFacebox(this.hilitedTag)){var na=this.getTagger();if(na){k.addClass(ma,'hover');var oa=na.getFacebox(ka);na.setCurrentFacebox(oa);if(oa)na.addTagFromFacebox(oa);}}else k.addClass(ma,'hover');if(k.hasClass(ma,'tagBoxPending')&&!k.hasClass(ma,'showPendingTagName')&&la===true){l.scry(this.stageWrapper,'div.tagsWrapper div.showPendingTagName').forEach(function(pa){k.removeClass(pa,'showPendingTagName');});k.addClass(ma,'showPendingTagName');}}};ja.prototype.hiliteTagsOnMouseMove=function(event){"use strict";if(!this.stream.getCurrentExtraData()||this.getVideoOnStage())return;if(this.unhiliteTimer!==null)return;var ka=event.getTarget();if(q.byClass(ka,'fbPhotoPageTagApproval')||q.byClass(ka,'tagPointer'))return;var la=q.byClass(ka,'tagBoxPending'),ma=false;if(this.hilitedTag){var na=fa(this.hilitedTag);ma=na&&k.hasClass(na,'tagBoxPending');}var oa=((!this.hilitedTag&&la)||(!ma&&la));if(oa){this.switchHilitedTags(la.id);return;}if(la&&(la.id==this.hilitedTag))return;var pa=250,qa=w.absoluteToNormalizedPosition(this.image,aa.getEventPosition(event)),ra=w.getNearestBox(this.stream.getCurrentExtraData().tagRects,qa);if(!ra){if(!ma){this.unhiliteAllTags();this.reHilitePendingTag();}return;}var sa=null;if(ma){var ta={};ta[this.hilitedTag]=this.stream.getCurrentExtraData().tagRects[this.hilitedTag];sa=w.getNearestBox(ta,qa);}if(sa!==null&&ma)return;if(this.hilitedTag!=ra)if(ma){this.unhiliteTimer=setTimeout(this.unhiliteAllTags.bind(this,false,event),pa);}else{if(this._showHover&&!this._seenTags[ra]){this._seenTags[ra]=true;v.logPivotImpression('permalnk','pivot_impression',ra);}this.switchHilitedTags(ra);}};ja.prototype.updateTagBox=function(ka,la){"use strict";this.unhiliteAllTags();var ma=fa(ka);if(!ma)return;k.addClass(ma,'tagBox');k.addClass(ma,'tagBoxPendingResponse');k.removeClass(ma,'tagBoxPending');k.hide(l.find(ma,'span.tagForm'));if(la){k.show(l.find(ma,'span.tagApproved'));}else k.show(l.find(ma,'span.tagIgnored'));};ja.prototype.reset=function(){"use strict";while(this.pageHandlers&&this.pageHandlers.length)this.pageHandlers.pop().remove();if(this.imageLoadListener){this.imageLoadListener.remove();this.imageLoadListener=null;}n.getInstance().resetHandlers();};ja.prototype.onHiliteTag=function(ka,la){"use strict";if(la.version!=s.VIEWER_PERMALINK)return;var ma=la.tag;if(ma){this.switchHilitedTags(ma,true);}else this.unhiliteAllTags();};ja.prototype.onUpdateTagBox=function(ka,la){"use strict";if(la.version==s.VIEWER_PERMALINK)this.updateTagBox(la.id,la.approve);};ja.prototype.disableAutoRefresh=function(){"use strict";clearTimeout(this.timerId);};ja.prototype.isInVideoEncodingMode=function(){"use strict";return this.encodingMode;};ja.prototype.enableAutoRefresh=function(ka){"use strict";this.encodingMode=true;this.timerId=setTimeout(function(){window.location.reload();},ka);};ja.prototype.setHasLocation=function(ka){"use strict";k.conditionClass(this.root,'hasLocation',ka);};ja.getInstance=function(){"use strict";if(!ja._instance)ja._instance=new ja();return ja._instance;};ja.addPhotoFbids=function(ka,la,ma){"use strict";ja.getInstance().addPhotoFbids(ka,la,ma);};ja.setReachedLeftEnd=function(){"use strict";ja.getInstance().setReachedLeftEnd();};ja.setReachedRightEnd=function(){"use strict";ja.getInstance().setReachedRightEnd();};ja.attachTagger=function(ka){"use strict";ja.getInstance().attachTagger(ka);};ja.disableAjaxPipeForVideo=function(){"use strict";var ka=ja.getInstance();if(ka.stream)ka.stream.setUseAjaxPipe(false);};ja.init=function(ka){"use strict";ja.getInstance().init(ka||{});};ja.recacheData=function(ka){"use strict";ja.getInstance().recacheData(ka);};ja.saveTagsFromPayload=function(ka){"use strict";ja.getInstance().saveTagsFromPayload(ka);};ja.saveTagsFromPayloadDelayed=function(ka){"use strict";setTimeout(ja.saveTagsFromPayload.bind(null,ka),2000);};ja.handleServerError=function(ka,la){"use strict";ja.getInstance().handleServerError(ka,la);};ja.setHasLocation=function(ka){"use strict";ja.getInstance().setHasLocation(ka);};ja.storeFromData=function(ka){"use strict";ja.getInstance().storeFromData(ka);};ja.swapData=function(){"use strict";ja.getInstance().swapData();};ja.updateTotalCount=function(ka,la,ma){"use strict";ja.getInstance().updateTotalCount(ka,la,ma);};ja.isInVideoEncodingMode=function(){"use strict";return ja.getInstance().isInVideoEncodingMode();};ja.disableAutoRefresh=function(){"use strict";ja.getInstance().disableAutoRefresh();};ja.enableAutoRefresh=function(ka){"use strict";ja.getInstance().enableAutoRefresh(ka);};ja.setVideoRotateURI=function(ka){"use strict";ja.getInstance().videoRotateURI=ka;};ca(ja,{STATE_ERROR:'error',STATE_HTML:'html',STATE_IMAGE_DATA:'image',MIN_TAG_DISTANCE:80,_instance:null,touchMarkup:ea});e.exports=ja;},null); __d("PhotoPermalinkTagger",["Arbiter","Event","PhotoPermalink","PhotoTagger","$","copyProperties"],function(a,b,c,d,e,f,g,h,i,j,k,l){for(var m in j)if(j.hasOwnProperty(m))o[m]=j[m];var n=j===null?null:j.prototype;o.prototype=Object.create(n);o.prototype.constructor=o;o.__superConstructor__=j;function o(p){"use strict";j.call(this,i.getInstance(),true);this.photoData=p;}o.prototype.setupHandlers=function(){"use strict";var p=k('imagestage'),q=k('fbPhotoPageTagBoxes');this.handlers=[h.listen(this.clickState,'click',this.addTag.bind(this)),h.listen(p,'click',this.addTag.bind(this)),h.listen(q,'click',this.addTag.bind(this)),h.listen(this.addTagLink,'click',this.checkActions.bind(this)),h.listen(this.overlayActions,'click',this.checkActions.bind(this))];this.subscriptions=[g.subscribe('PhotoPermalink.PAGE',this.restartTagging.bind(this)),g.subscribe('PhotoPermalink.DATA_CHANGE',this.setPhotoData.bind(this)),g.subscribe('PhotoPermalink.EXTRA_DATA_CHANGE',this.setExtraData.bind(this))];this.tokenizer.subscribe('addToken',this.saveTag.bind(this));this.tokenizer.subscribe('removeToken',this.removeTag.bind(this));this.tokenizer.subscribe('markTagAsSpam',this.markTagAsSpam.bind(this));};o.prototype.setDataForTokenizer=function(){"use strict";this.tokenizer.setup(null,this.photoData);return this;};l(o.prototype,{elemNames:{0:{addTagLink:'div.fbPhotosPhotoActions',overlayActions:'div.fbPhotosPhotoButtons'}}});e.exports=o;},null); __d("legacy:PhotoPermalinkTagger",["PhotoPermalinkTagger"],function(a,b,c,d){a.PhotoPermalinkTagger=b('PhotoPermalinkTagger');},3); __d("PhotoPermalinkCropper",["Arbiter","CSS","Dialog","DOM","Event","Keys","Photocrop2","PhotoPermalink","ProfilePicRequestCreator","ProfilePictureFlowLogging","tx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=p.flow.PERMALINK,s={initialize:function(t){this.clickHandlers=[];if(this.photocrop)this.destroy(false);this.photoPermalink=n.getInstance();this.root=this.photoPermalink.getRoot();this.options=t||{};this.registerClickHandler();this.registerEscapeKeyHandler();g.subscribe('PhotoPermalink.PAGE',function(){this.registerClickHandler();this.registerEscapeKeyHandler();this.destroy(false);}.bind(this),g.SUBSCRIBE_NEW);g.subscribe('PhotoTagger.REMOVED_MAKE_PROFILE_PIC_OPTION',this.destroy.bind(this,false));},registerEscapeKeyHandler:function(){k.listen(document.documentElement,'keydown',function(event){if(k.getKeyCode(event)===l.ESC)this.destroy(false);}.bind(this));},registerClickHandler:function(){this.actionLinks=j.find(this.root,'div.fbPhotosPhotoActions');var t=j.scry(this.root,'.startCropping');if(t.length===0)return;for(var u=0;u0)i.addClass(o[0],'resultsPresent');return m.show.call(this);};n.prototype.hide=function(){"use strict";var o=j.scry(this.context,'.typeaheadBackdrop');if(o.length>0)i.removeClass(o[0],'resultsPresent');return m.hide.call(this);};n.prototype.render=function(o,p,q){"use strict";this.autoSelect=this.origAutoSelect&&o.length;this.disableAutoSelect=o.length===0;m.render.call(this,o,p,q);};n.prototype.getItems=function(){"use strict";var o=m.getItems.call(this);if(!this.value)o.shift();if(this.userEd)o.shift();return o;};n.prototype.getSuggestions=function(){"use strict";return this.suggestions;};n.prototype.setSuggestions=function(o){"use strict";this.suggestions=o?o.map(String):[];this.visible=!!this.suggestions.length;};n.prototype.addSuggestion=function(o){"use strict";this.suggestions.unshift(o);};n.prototype.addTypeaheadFlip=function(o){"use strict";i.addClass(this.element,o);};n.prototype.removeTypeaheadFlip=function(o){"use strict";i.removeClass(this.element,o);};n.prototype.getContext=function(){"use strict";var o=k.byClass(this.element,'typeaheadContainer');if(o){return o;}else return m.getContext.call(this);};e.exports=n;},null); __d("HideInlineHelp",["DynamicIconSelector","SelectorDeprecated"],function(a,b,c,d,e,f,g,h){var i=[],j={registerMenu:function(k,l,m){i[k]=l.setValue.bind(l,m);},registerLegacyMenu:function(k,l,m){i[k]=function(){h.setSelected(l,m);g.swapIcon(l);};},registerAsyncPopoverMenu:function(k,l,m){i[k]=function(){var n=l.getMenu();n.setValue(m);};},triggerUndo:function(k){i[k]();}};e.exports=j;},null); __d("FreeformTokenizerBehavior",["Event","Input","Keys"],function(a,b,c,d,e,f,g,h,i){function j(k,l){var m=l.matcher&&new RegExp(l.matcher,'i'),n=l.splitter&&new RegExp(l.splitter),o=l.tokenize_on_blur!==false,p=l.tokenize_on_paste!==false,q=l.split_on_check===true,r=l.select_on_comma!==false,s=l.select_on_space===true,t=l.never_submit===true;function u(event){var v=h.getValue(k.getInput()).trim();if(n&&event&&event.type=='paste'){v=v.split(n);}else if(n&&q){v=v.split(n);}else v=[v];var w=false;for(var x=0;x