!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(f){f.timeago=function(t){return t instanceof Date?r(t):r("string"==typeof t?f.timeago.parse(t):"number"==typeof t?new Date(t):f.timeago.datetime(t))};var a=f.timeago;f.extend(f.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(n){if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var r=this.settings.strings,t=r.prefixAgo,e=r.suffixAgo;if(this.settings.allowFuture&&n<0&&(t=r.prefixFromNow,e=r.suffixFromNow),!this.settings.allowPast&&0<=n)return this.settings.strings.inPast;var a=Math.abs(n)/1e3,i=a/60,o=i/60,s=o/24,u=s/365;function m(t,e){var a=f.isFunction(t)?t(e,n):t,i=r.numbers&&r.numbers[e]||e;return a.replace(/%d/i,i)}var l=a<45&&m(r.seconds,Math.round(a))||a<90&&m(r.minute,1)||i<45&&m(r.minutes,Math.round(i))||i<90&&m(r.hour,1)||o<24&&m(r.hours,Math.round(o))||o<42&&m(r.day,1)||s<30&&m(r.days,Math.round(s))||s<45&&m(r.month,1)||s<365&&m(r.months,Math.round(s/30))||u<1.5&&m(r.year,1)||m(r.years,Math.round(u)),d=r.wordSeparator||"";return void 0===r.wordSeparator&&(d=" "),f.trim([t,l,e].join(d))},parse:function(t){var e=f.trim(t);return e=(e=(e=(e=(e=e.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2")).replace(/([\+\-]\d\d)$/," $100"),new Date(e)},datetime:function(t){var e=a.isTime(t)?f(t).attr("datetime"):f(t).attr("title");return a.parse(e)},isTime:function(t){return"time"===f(t).get(0).tagName.toLowerCase()}});var i={init:function(){var t=f.proxy(n,this);t();var e=a.settings;0<e.refreshMillis&&(this._timeagoInterval=setInterval(t,e.refreshMillis))},update:function(t){var e=a.parse(t);f(this).data("timeago",{datetime:e}),a.settings.localeTitle&&f(this).attr("title",e.toLocaleString()),n.apply(this)},updateFromDOM:function(){f(this).data("timeago",{datetime:a.parse(a.isTime(this)?f(this).attr("datetime"):f(this).attr("title"))}),n.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};function n(){if(!f.contains(document.documentElement,this))return f(this).timeago("dispose"),this;var t=function(t){if(!(t=f(t)).data("timeago")){t.data("timeago",{datetime:a.datetime(t)});var e=f.trim(t.text());a.settings.localeTitle?t.attr("title",t.data("timeago").datetime.toLocaleString()):!(0<e.length)||a.isTime(t)&&t.attr("title")||t.attr("title",e)}return t.data("timeago")}(this),e=a.settings;return isNaN(t.datetime)||(0==e.cutoff||Math.abs(o(t.datetime))<e.cutoff)&&f(this).text(r(t.datetime)),this}function r(t){return a.inWords(o(t))}function o(t){return(new Date).getTime()-t.getTime()}f.fn.timeago=function(t,e){var a=t?i[t]:i.init;if(!a)throw new Error("Unknown function name '"+t+"' for timeago");return this.each(function(){a.call(this,e)}),this},document.createElement("abbr"),document.createElement("time")});