!function(){var a,b=window.Messenger;a=window.Messenger=function(){return a._call.apply(this,arguments)},window.Messenger.noConflict=function(){return window.Messenger=b,a}}(),window.Messenger._=function(){if(window._)return window._;var a=Array.prototype,b=Object.prototype,c=Function.prototype,d=(a.push,a.slice),e=(a.concat,b.toString);b.hasOwnProperty;var f=a.forEach,g=(a.map,a.reduce,a.reduceRight,a.filter),h=(a.every,a.some,a.indexOf,a.lastIndexOf,Array.isArray,Object.keys),i=c.bind,j={},k={},l=j.each=j.forEach=function(a,b,c){if(null!=a)if(f&&a.forEach===f)a.forEach(b,c);else if(a.length===+a.length){for(var d=0,e=a.length;e>d;d++)if(b.call(c,a[d],d,a)===k)return}else for(var g in a)if(j.has(a,g)&&b.call(c,a[g],g,a)===k)return};j.result=function(a,b){if(null==a)return null;var c=a[b];return j.isFunction(c)?c.call(a):c},j.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}};var m=0;return j.uniqueId=function(a){var b=++m+"";return a?a+b:b},j.filter=j.select=function(a,b,c){var d=[];return null==a?d:g&&a.filter===g?a.filter(b,c):(l(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)},l(["Arguments","Function","String","Number","Date","RegExp"],function(a){j["is"+a]=function(b){return e.call(b)=="[object "+a+"]"}}),j.defaults=function(a){return l(d.call(arguments,1),function(b){if(b)for(var c in b)null==a[c]&&(a[c]=b[c])}),a},j.extend=function(a){return l(d.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},j.keys=h||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)j.has(a,c)&&(b[b.length]=c);return b},j.bind=function(a,b){if(a.bind===i&&i)return i.apply(a,d.call(arguments,1));var c=d.call(arguments,2);return function(){return a.apply(b,c.concat(d.call(arguments)))}},j.isObject=function(a){return a===Object(a)},j}(),window.Messenger.Events=function(){if(window.Backbone&&Backbone.Events)return Backbone.Events;var a=function(){var a=/\s+/,b=function(b,c,d,e){if(!d)return!0;if("object"==typeof d)for(var f in d)b[c].apply(b,[f,d[f]].concat(e));else{if(!a.test(d))return!0;for(var g=d.split(a),h=0,i=g.length;i>h;h++)b[c].apply(b,[g[h]].concat(e))}},c=function(a,b){var c,d=-1,e=a.length;switch(b.length){case 0:for(;e>++d;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;e>++d;)(c=a[d]).callback.call(c.ctx,b[0]);return;case 2:for(;e>++d;)(c=a[d]).callback.call(c.ctx,b[0],b[1]);return;case 3:for(;e>++d;)(c=a[d]).callback.call(c.ctx,b[0],b[1],b[2]);return;default:for(;e>++d;)(c=a[d]).callback.apply(c.ctx,b)}},d={on:function(a,c,d){if(!b(this,"on",a,[c,d])||!c)return this;this._events||(this._events={});var e=this._events[a]||(this._events[a]=[]);return e.push({callback:c,context:d,ctx:d||this}),this},once:function(a,c,d){if(!b(this,"once",a,[c,d])||!c)return this;var e=this,f=_.once(function(){e.off(a,f),c.apply(this,arguments)});return f._callback=c,this.on(a,f,d),this},off:function(a,c,d){var e,f,g,h,i,j,k,l;if(!this._events||!b(this,"off",a,[c,d]))return this;if(!a&&!c&&!d)return this._events={},this;for(h=a?[a]:_.keys(this._events),i=0,j=h.length;j>i;i++)if(a=h[i],e=this._events[a]){if(g=[],c||d)for(k=0,l=e.length;l>k;k++)f=e[k],(c&&c!==f.callback&&c!==f.callback._callback||d&&d!==f.context)&&g.push(f);this._events[a]=g}return this},trigger:function(a){if(!this._events)return this;var d=Array.prototype.slice.call(arguments,1);if(!b(this,"trigger",a,d))return this;var e=this._events[a],f=this._events.all;return e&&c(e,d),f&&c(f,arguments),this},listenTo:function(a,b,c){var d=this._listeners||(this._listeners={}),e=a._listenerId||(a._listenerId=_.uniqueId("l"));return d[e]=a,a.on(b,"object"==typeof b?this:c,this),this},stopListening:function(a,b,c){var d=this._listeners;if(d){if(a)a.off(b,"object"==typeof b?this:c,this),b||c||delete d[a._listenerId];else{"object"==typeof b&&(c=this);for(var e in d)d[e].off(b,c,this);this._listeners={}}return this}}};return d.bind=d.on,d.unbind=d.off,d};return a()}(),function(){var a,b,c,d,e,f,g,h,i,j,k,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},n=[].slice,o=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};a=jQuery,f=null!=(i=window._)?i:window.Messenger._,d=null!=(j="undefined"!=typeof Backbone&&null!==Backbone?Backbone.Events:void 0)?j:window.Messenger.Events,c=function(){function b(b){a.extend(this,d),f.isObject(b)&&(b.el&&this.setElement(b.el),this.model=b.model),this.initialize.apply(this,arguments)}return b.prototype.setElement=function(b){return this.$el=a(b),this.el=this.$el[0]},b.prototype.delegateEvents=function(a){var b,c,d,e,g,h,i;if(a||(a=f.result(this,"events"))){this.undelegateEvents(),b=/^(\S+)\s*(.*)$/,i=[];for(d in a){if(g=a[d],f.isFunction(g)||(g=this[a[d]]),!g)throw Error('Method "'+a[d]+'" does not exist');e=d.match(b),c=e[1],h=e[2],g=f.bind(g,this),c+=".delegateEvents"+this.cid,i.push(""===h?this.jqon(c,g):this.jqon(c,h,g))}return i}},b.prototype.jqon=function(a,b,c){var d;return null!=this.$el.on?(d=this.$el).on.apply(d,arguments):(null==c&&(c=b,b=void 0),null!=b?this.$el.delegate(b,a,c):this.$el.bind(a,c))},b.prototype.jqoff=function(a){var b;return null!=this.$el.off?(b=this.$el).off.apply(b,arguments):(this.$el.undelegate(),this.$el.unbind(a))},b.prototype.undelegateEvents=function(){return this.jqoff(".delegateEvents"+this.cid)},b.prototype.remove=function(){return this.undelegateEvents(),this.$el.remove()},b}(),g=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return m(c,b),c.prototype.defaults={hideAfter:10,scroll:!0,closeButtonText:"×"},c.prototype.initialize=function(b){return null==b&&(b={}),this.shown=!1,this.rendered=!1,this.messenger=b.messenger,this.options=a.extend({},this.options,b,this.defaults)},c.prototype.show=function(){var a;return this.rendered||this.render(),this.$message.removeClass("messenger-hidden"),a=this.shown,this.shown=!0,a?void 0:this.trigger("show")},c.prototype.hide=function(){var a;return this.rendered?(this.$message.addClass("messenger-hidden"),a=this.shown,this.shown=!1,a?this.trigger("hide"):void 0):void 0},c.prototype.cancel=function(){return this.hide()},c.prototype.update=function(b){var c,d=this;return f.isString(b)&&(b={message:b}),a.extend(this.options,b),this.lastUpdate=new Date,this.rendered=!1,this.events=null!=(c=this.options.events)?c:{},this.render(),this.actionsToEvents(),this.delegateEvents(),this.checkClickable(),this.options.hideAfter?(this.$message.addClass("messenger-will-hide-after"),null!=this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(function(){return d.hide()},1e3*this.options.hideAfter)):this.$message.removeClass("messenger-will-hide-after"),this.options.hideOnNavigate?(this.$message.addClass("messenger-will-hide-on-navigate"),null!=("undefined"!=typeof Backbone&&null!==Backbone?Backbone.history:void 0)&&Backbone.history.on("route",function(){return d.hide()})):this.$message.removeClass("messenger-will-hide-on-navigate"),this.trigger("update",this)},c.prototype.scrollTo=function(){return this.options.scroll?a.scrollTo(this.$el,{duration:400,offset:{left:0,top:-20}}):void 0},c.prototype.timeSinceUpdate=function(){return this.lastUpdate?new Date-this.lastUpdate:null},c.prototype.actionsToEvents=function(){var a,b,c,d,e=this;c=this.options.actions,d=[];for(b in c)a=c[b],d.push(this.events['click [data-action="'+b+'"] a']=function(a){return function(c){return c.preventDefault(),c.stopPropagation(),e.trigger("action:"+b,a,c),a.action.call(e,c,e)}}(a));return d},c.prototype.checkClickable=function(){var a,b,c,d;c=this.events,d=[];for(b in c)a=c[b],d.push("click"===b?this.$message.addClass("messenger-clickable"):void 0);return d},c.prototype.undelegateEvents=function(){var a;return c.__super__.undelegateEvents.apply(this,arguments),null!=(a=this.$message)?a.removeClass("messenger-clickable"):void 0},c.prototype.parseActions=function(){var b,c,d,e,f,g;c=[],f=this.options.actions;for(e in f)b=f[e],d=a.extend({},b),d.name=e,null==(g=d.label)&&(d.label=e),c.push(d);return c},c.prototype.template=function(b){var c,d,e,f,g,h,i,j,k,l,m=this;for(g=a("
"),b.showCloseButton&&(e=a('