text: if (self.CavalryLogger) { CavalryLogger.start_js(["nfp3H"]); }
  
  __d('FantaReducersSharePreview',['Bootloader','FantaMessageActions','FantaTabActions','FantaTypeSharePreview','immutable','ifRequired','setImmediate'],(function a(b,c,d,e,f,g){'use strict';var h=c('FantaMessageActions').Types,i=c('FantaTabActions').Types,j='scraperLastPermissiveMatch';function k(r,s){switch(s.type){case h.COMPOSER_TEXT_UPDATE:var t=s.message,u=s.threadID;r=l(r,t,u);}return r;}function l(r,s,t){c('ifRequired')('URLMatcher',function(u){c('ifRequired')('DataStore',function(v){if(s.length===0){v.remove(t,j);}else{if(!r.mercury.tabContents.get(t))return r;if(!u.trigger(s+' ')){var w=u.match(s),x=u.permissiveMatch(s);if(x&&x!==v.get(t,j)){v.set(t,j,x);r=r.mergeIn(['mercury','tabContents',t,'sharePreview'],{params:null,type:null,uri:w||x});}}}});},function(){c('Bootloader').loadModules(["URLMatcher","DataStore"],function(u,v){if(s.length>0)c('setImmediate')(function(){c('FantaMessageActions').composerTextUpdate(t,s);});},'FantaReducersSharePreview');});return r;}function m(r,s){switch(s.type){case h.LINK_PREVIEW:var t=s.uri,u=s.tabID;if(!r.mercury.tabContents.get(u))return r;r=r.mergeIn(['mercury','tabContents',u,'sharePreview'],{params:null,type:null,uri:t});}return r;}function n(r,s){switch(s.type){case h.LOADED_SHARE_DATA:var t=s.attachmentData,u=s.tabID,v=t.share_data;if(!r.mercury.tabContents.get(u))return r;r=r.mergeIn(['mercury','tabContents',u,'sharePreview'],{isLoading:false,params:c('immutable').Map({data:v.share_params}),type:v.share_type});}return r;}function o(r,s){switch(s.type){case h.LOADING_SHARE_DATA:var t=s.tabID;if(!r.mercury.tabContents.get(t))return r;r=r.mergeIn(['mercury','tabContents',t,'sharePreview'],{isLoading:true,params:null,type:null});}return r;}function p(r,s){switch(s.type){case i.CLOSE_ALL_TABS:var t=r.tabGroup.tabs.keys();for(var u=t,v=Array.isArray(u),w=0,u=v?u:u[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var x;if(v){if(w>=u.length)break;x=u[w++];}else{w=u.next();if(w.done)break;x=w.value;}var y=x;r=q(r,y);}break;case i.CLOSE_TAB:case i.CLOSE_AND_TAB_NEXT:case h.REMOVE_SHARE_PREVIEW:var z=s.tabID;r=q(r,z);}return r;}function q(r,s){if(!r.mercury.tabContents.get(s))return r;return r.setIn(['mercury','tabContents',s,'sharePreview'],new (c('FantaTypeSharePreview'))());}f.exports={closeTab:p,composerTextUpdate:k,linkPreview:m,loadedShareData:n,loadingShareData:o};}),null);