/*!CK:3806685936!*//*1427086756,*/

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

__d("OffersUtil",["DOM","DOMQuery","CSS","Event","AsyncRequest","DataStore","XClaimOfferByAsyncRequestController","XOfferSetNotificationsController","XOfferSendPlatformNotificationController"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();var p={attachHideShowClickListener:function(q,r,s){j.listen(q,'click',function(){var t=h.scry(h.getRootElement(),r),u=h.scry(h.getRootElement(),s);for(var v=0;v<t.length;v++)i.hide(t[v]);for(var w=0;w<u.length;w++)i.show(u[w]);});},attachDeletelLinkClickListener:function(q,r,s,t,u){j.listen(q,'click',function(){new k().setURI(s).setHandler(function(v){var w=v.getPayload();if(w){r.className=t;}else r.className=u;}).send();});},listen:function(q,r){j.listen(q,'click',r.show.bind(r));},showRegistered:function(q,r){j.listen(q,'click',function(){r.show();});},logGoToWebsiteClick:function(q,r){j.listen(q,'click',function(){new k().setURI(r).send();});},saveOffer:function(q){var r=m.getURIBuilder().setString('offer_share_token',q).getURI();new k().setURI(r).send();},attachSetNotificationsClickListener:function(q,r,s,t,u){l.set(q,'notif_state',u);j.listen(q,'click',function(){var v=l.get(q,'notif_state'),w=n.getURIBuilder().setInt('offer',t).setBool('enable',!v).getURI(!v);new k().setURI(w).setHandler(function(x){var y=x.getPayload();if(y){g.setContent(q,r);}else g.setContent(q,s);l.set(q,'notif_state',y);}).send();});},sendPlatformNotification:function(){var q=o.getURIBuilder().getURI();new k().setURI(q).send();}};e.exports=p;},null);