text: /*!
   * Sherlock
   * Copyright (c) 2016 Neil Gupta
   * Version 1.3.4
   */
  var Sherlock=function(){var a={rangeSplitters:/(\bto\b|\-|\b(?:un)?till?\b|\bthrough\b|\bthru\b|\band\b|\bends?\b)/g,months:"\\b(jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:tember)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\\b",days:"\\b(?:(?:(?:on )?the )(?=\\d\\d?(?:st|nd|rd|th)))?([1-2]\\d|3[0-1]|0?[1-9])(?:st|nd|rd|th)?(?:,|\\b)",years:"\\b(20\\d{2}|\\d{2}[6-9]\\d)\\b",shortForm:/\b(0?[1-9]|1[0-2])\/([1-2]\d|3[0-1]|0?[1-9])\/?(\d{2,4})?\b/,weekdays:/(?:(next|last) (?:week (?:on )?)?)?\b(sun|mon|tue(?:s)?|wed(?:nes)?|thurs|fri|sat(?:ur)?)(?:day)?\b/,relativeDateStr:"((?:next|last|this) (?:week|month|year)|tom(?:orrow)?|tmrw|tod(?:ay)?|(?:right )?now|tonight|day after (?:tom(?:orrow)?|tmrw)|yest(?:erday)?|day before yest(?:erday)?)",inRelativeDateStr:"(\\d{1,4}|a) (day|week|month|year)s? ?(ago|old)?",inRelativeTime:/\b(\d{1,2} ?|a |an )(h(?:our)?|m(?:in(?:ute)?)?)s? ?(ago|old)?\b/,inMilliTime:/\b(\d+) ?(s(?:ec(?:ond)?)?|ms|millisecond)s? ?(ago|old)?\b/,midtime:/(?:@ ?)?\b(?:at )?(dawn|morn(?:ing)?|noon|afternoon|evening|night|midnight)\b/,internationalTime:/\b(?:(0[0-9]|1[3-9]|2[0-3]):?([0-5]\d))\b/,explicitTime:/(?:@ ?)?\b(?:at |from )?(1[0-2]|[1-2]?[1-9])(?::?([0-5]\d))? ?([ap]\.?m?\.?)?(?:o'clock)?\b/,more_than_comparator:/((?:more|greater|older|newer) than|after|before)/i,less_than_comparator:/((?:less|fewer) than)/i,fillerWords:/ (from|is|was|at|on|for|in|due(?! date)|(?:un)?till?)\b/,fillerWords2:/ (was|is|due(?! date))\b/},b=null,c=function(){return b?new Date(b.getTime()):new Date},d=function(a){return"undefined"!=typeof Watson&&Watson.config?Watson.config[a]:null},e=function(a,b,c){var d={},e=!1,h=!1,j=i.strToNum(a);return(e=g(j,b,c))&&(j=j.replace(new RegExp(e),""),a=a.replace(new RegExp(i.numToStr(e)),"")),(h=f(j,b,c))&&(a=a.replace(new RegExp(i.numToStr(h)),"")),d.eventTitle=a,d.isAllDay=!(!e||h||e.match(/^(?:right )?now$|^tonight$/)),d.isValidDate=!(!e&&!h),d},f=function(b,c,d){var e,h,i,j,f=0,g=!1;if(e=b.match(new RegExp(a.explicitTime.source,"g")))if(e=e.sort(function(a,b){var c=a.trim().length,d=b.trim().length;return a.match(/(?:a|p).?m.?/)&&(c+=20),b.match(/(?:a|p).?m.?/)&&(d+=20),d-c})[0].trim(),e.length<=2&&b.trim().length>2)f=0;else{f=e.length,e=e.match(a.explicitTime);var k=parseInt(e[1]),l=e[2]||0,m=e[3];m?(0===m.indexOf("p")&&12!=k?k+=12:0===m.indexOf("a")&&12==k&&(k=0),f+=20):12>k&&(7>k||k<=c.getHours())&&(k+=12),h=k,i=l,j=!!m,g=e[0]}var n=function(){return g&&(c.setHours(h,i,0),c.hasMeridian=j),g};if(!(4>f))return n();if(e=b.match(a.inRelativeTime))switch(isNaN(e[1])&&(e[1]=1),e[3]&&(e[1]=-1*parseInt(e[1])),e[2].substring(0,1)){case"h":return c.setHours(c.getHours()+parseInt(e[1])),e[0];case"m":return c.setMinutes(c.getMinutes()+parseInt(e[1])),e[0];default:return n()}else if(e=b.match(a.inMilliTime))switch(e[3]&&(e[1]=-1*parseInt(e[1])),e[2].substring(0,1)){case"s":return c.setSeconds(c.getSeconds()+parseInt(e[1])),e[0];case"m":return c.setMilliseconds(c.getMilliseconds()+parseInt(e[1])),e[0];default:return n()}else{if(!(e=b.match(a.midtime)))return(e=b.match(a.internationalTime))?(c.setHours(e[1],e[2],0),c.hasMeridian=!0,e[0]):n();switch(e[1]){case"dawn":return c.setHours(5,0,0),c.hasMeridian=!0,e[0];case"morn":case"morning":return c.setHours(8,0,0),c.hasMeridian=!0,e[0];case"noon":return c.setHours(12,0,0),c.hasMeridian=!0,e[0];case"afternoon":return c.setHours(14,0,0),c.hasMeridian=!0,e[0];case"evening":return c.setHours(19,0,0),c.hasMeridian=!0,e[0];case"night":return c.setHours(21,0,0),c.hasMeridian=!0,e[0];case"midnight":return c.setHours(0,0,0),c.hasMeridian=!0,e[0];default:return n()}}},g=function(b,c,d){var e;if(e=b.match(a.monthDay))return e[3]?(c.setFullYear(e[3],i.changeMonth(e[1]),e[2]),c.hasYear=!0):c.setMonth(i.changeMonth(e[1]),e[2]),e[0];if(e=b.match(a.dayMonth))return e[3]?(c.setFullYear(e[3],i.changeMonth(e[2]),e[1]),c.hasYear=!0):c.setMonth(i.changeMonth(e[2]),e[1]),e[0];if(e=b.match(a.shortForm)){var f=e[3],g=null;return f&&(g=parseInt(f)),g&&f.length<4&&(g+=g>50?1900:2e3),g?(c.setFullYear(g,e[1]-1,e[2]),c.hasYear=!0):c.setMonth(e[1]-1,e[2]),e[0]}if(!(e=b.match(a.weekdays))){if(e=b.match(a.inRelativeDateFromRelativeDate))return i.relativeDateMatcher(e[4],c)&&i.inRelativeDateMatcher(e[1],e[2],e[3],c)?e[0]:!1;if(e=b.match(a.relativeDate))return i.relativeDateMatcher(e[1],c)?e[0]:!1;if(e=b.match(a.inRelativeDate))return i.inRelativeDateMatcher(e[1],e[2],e[3],c)?e[0]:!1;if(e=b.match(new RegExp(a.days,"g"))){if(e=e.sort(function(a,b){return b.trim().length-a.trim().length})[0].trim(),0!==e.indexOf("on")&&(0!==e.indexOf("the")||-1===e.indexOf(",",e.length-1))&&-1===b.indexOf(e,b.length-e.length-1)||(!d||!d.isAllDay)&&e.length<=2)return!1;e=e.match(a.daysOnly);var h=c.getMonth(),j=e[1];return j<c.getDate()&&h++,c.setMonth(h,j),e[0]}return!1}switch(e[2].substr(0,3)){case"sun":return i.changeDay(c,0,e[1]),e[0];case"mon":return i.changeDay(c,1,e[1]),e[0];case"tue":return i.changeDay(c,2,e[1]),e[0];case"wed":return i.changeDay(c,3,e[1]),e[0];case"thu":return i.changeDay(c,4,e[1]),e[0];case"fri":return i.changeDay(c,5,e[1]),e[0];case"sat":return i.changeDay(c,6,e[1]),e[0];default:return!1}},h=function(b,d,e,f,g){var h=c();d?b>d&&d>h&&i.isSameDay(b,d)&&i.isSameDay(b,h)?b.hasMeridian?b.setDate(b.getDate()-1):(b.setHours(b.getHours()-12),b>d&&b.setHours(b.getHours()-12)):b>d?d.setDate(b.getDate()+1):h>d&&-1===f.indexOf(" was ")&&i.monthDiff(d,h)>=3&&!d.hasYear&&!b.hasYear&&(d.setFullYear(d.getFullYear()+1),b.setFullYear(b.getFullYear()+1)):b&&(h>=b&&!b.hasYear&&!f.match(/was|ago|old\b/)&&(i.isSameDay(b,h)&&!e?b.hasMeridian||b.getHours()<19?b.setDate(b.getDate()+1):(b.setHours(b.getHours()+12),h>=b&&(b.setHours(b.getHours()-12),b.setDate(b.getDate()+1))):i.monthDiff(b,h)>=3&&b.setFullYear(b.getFullYear()+1)),g.eventTitle.match(a.more_than_comparator)?(h>=b&&(!i.isSameDay(b,h)||f.match(/ago|old\b/))&&!g.eventTitle.match(/after|newer/i)||g.eventTitle.match(/older|before/i)?(g.endDate=new Date(b.getTime()),g.startDate=new Date(1900,0,1,0,0,0,0)):g.endDate=new Date(3e3,0,1,0,0,0,0),g.eventTitle=g.eventTitle.replace(a.more_than_comparator,"")):g.eventTitle.match(a.less_than_comparator)&&(h>=b?i.isSameDay(b,h)&&!f.match(/ago|old\b/)?(g.endDate=new Date(b.getTime()),g.startDate=new Date(1900,0,1,0,0,0,0)):g.endDate=new Date(h.getTime()):(g.endDate=new Date(b.getTime()),g.startDate=new Date(h.getTime())),g.eventTitle=g.eventTitle.replace(a.less_than_comparator,"")))},i={relativeDateMatcher:function(a,b){var d=c();switch(a){case"next week":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()+7),b.hasYear=!0,!0;case"next month":return b.setFullYear(d.getFullYear(),d.getMonth()+1,d.getDate()),b.hasYear=!0,!0;case"next year":return b.setFullYear(d.getFullYear()+1,d.getMonth(),d.getDate()),b.hasYear=!0,!0;case"last week":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()-7),b.hasYear=!0,!0;case"last month":return b.setFullYear(d.getFullYear(),d.getMonth()-1,d.getDate()),b.hasYear=!0,!0;case"last year":return b.setFullYear(d.getFullYear()-1,d.getMonth(),d.getDate()),b.hasYear=!0,!0;case"tom":case"tmrw":case"tomorrow":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()+1),b.hasYear=!0,!0;case"day after tom":case"day after tmrw":case"day after tomorrow":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()+2),b.hasYear=!0,!0;case"this week":case"this month":case"this year":case"tod":case"today":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),b.hasYear=!0,!0;case"now":case"right now":case"tonight":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),b.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),0),"tonight"===a&&b.getHours()<21&&b.setHours(21,0,0,0),b.hasMeridian=!0,b.hasYear=!0,!0;case"yest":case"yesterday":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()-1),b.hasYear=!0,!0;case"day before yest":case"day before yesterday":return b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()-2),b.hasYear=!0,!0;default:return!1}},inRelativeDateMatcher:function(a,b,c,d){switch(a=isNaN(a)?1:parseInt(a),c&&(a=-1*a),b){case"day":return d.setDate(d.getDate()+a),d.hasYear=!0,!0;case"week":return d.setDate(d.getDate()+7*a),d.hasYear=!0,!0;case"month":return d.setMonth(d.getMonth()+a),d.hasYear=!0,!0;case"year":return d.setFullYear(d.getFullYear()+a),d.hasYear=!0,!0;default:return!1}},changeMonth:function(a){return this.monthToInt[a.substr(0,3)]},changeDay:function(a,b,c){var d=7-a.getDay()+b;(d>7&&void 0===c||"last"===c)&&(d-=7),d>=0&&"last"===c&&(d-=7),a.setDate(a.getDate()+d)},monthDiff:function(a,b){var c;return c=12*(b.getFullYear()-a.getFullYear()),c-=a.getMonth()+1,c+=b.getMonth()+1,0>=c?0:c},escapeRegExp:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isSameDay:function(a,b){return a.getMonth()===b.getMonth()&&a.getDate()===b.getDate()&&a.getFullYear()===b.getFullYear()},monthToInt:{jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},wordsToInt:{one:1,first:1,two:2,second:2,three:3,third:3,four:4,fourth:4,five:5,fifth:5,six:6,sixth:6,seven:7,seventh:7,eight:8,eighth:8,nine:9,ninth:9,ten:10,tenth:10},intToWords:["one|first","two|second","three|third","four|fourth","five|fifth","six|sixth","seven|seventh","eight|eighth","nine|ninth","ten|tenth"],strToNum:function(b){return b.replace(a.digit,function(a){var b=i.wordsToInt[a];return-1!==a.indexOf("th",a.length-2)?b+="th":-1!==a.indexOf("st",a.length-2)?b+="st":-1!==a.indexOf("nd",a.length-2)?b+="nd":-1!==a.indexOf("rd",a.length-2)&&(b+="rd"),b})},numToStr:function(a){return a.replace(/((?:[1-9]|10)(?:st|nd|rd|th)?)/g,function(a){return"(?:"+a+"|"+i.intToWords[parseInt(a)-1]+")"})}};return a.monthDay=new RegExp(a.months+" "+a.days+"(?: "+a.years+")?"),a.dayMonth=new RegExp(a.days+"(?: (?:day )?of)? "+a.months+"(?: "+a.years+")?"),a.daysOnly=new RegExp(a.days),a.digit=new RegExp("\\b("+i.intToWords.join("|")+")\\b","g"),a.relativeDate=new RegExp("\\b"+a.relativeDateStr+"\\b"),a.inRelativeDate=new RegExp("\\b"+a.inRelativeDateStr+"\\b"),a.inRelativeDateFromRelativeDate=new RegExp("\\b"+a.inRelativeDateStr+" from "+a.relativeDateStr+"\\b"),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),{parse:function(b){null===b&&(b="");var f=c(),g="undefined"!=typeof Watson?Watson.preprocess(b):[b,{}],b=g[0],j=g[1],k=d("disableRanges")?[b.toLowerCase()]:b.toLowerCase().split(a.rangeSplitters);for(a.rangeSplitters.lastIndex=0,f.setMilliseconds(0);!j.startDate&&(null!==(g=e(k[0],f,null))&&(g.isAllDay&&f.setHours(0,0,0),j.isAllDay=g.isAllDay,j.eventTitle=g.eventTitle,j.startDate=g.isValidDate?f:null),!j.startDate&&k.length>=3);){for(var l=[k[0]+k[1]+k[2]],m=3;m<k.length;m++)l.push(k[m]);k=l}for(;!j.endDate;)if(k.length>1&&(f=new Date(f.getTime()),null!==(g=e(k[2],f,j))&&(j.isAllDay&&f.setHours(0,0,0),g.eventTitle.length>j.eventTitle.length&&(j.eventTitle=g.eventTitle),j.endDate=g.isValidDate?f:null)),!j.endDate){if(!(k.length>=4)){j.endDate=null;break}for(var l=[k[0],k[1],k[2]+k[3]+k[4]],m=5;m<k.length;m++)l.push(k[m]);k=l}if(h(j.startDate,j.endDate,j.isAllDay,b,j),j.eventTitle){var n=d("disableRanges")?a.fillerWords2:a.fillerWords;j.eventTitle=j.eventTitle.split(n)[0].trim(),j.eventTitle=j.eventTitle.replace(/(?:^| )(?:\.|-$|by$|in$|at$|from$|on$|starts?$|for$|(?:un)?till?$|!|,|;)+/g,"").replace(/ +/g," ").trim();var o=b.match(new RegExp(i.escapeRegExp(j.eventTitle),"i"));o&&(j.eventTitle=o[0].replace(/ +/g," ").trim(),""==j.eventTitle&&(j.eventTitle=null))}else j.eventTitle=null;return"undefined"!=typeof Watson&&Watson.postprocess(j),j},_setNow:function(a){b=a}}}();"function"==typeof define&&define.amd?define(Sherlock):"undefined"!=typeof module&&module.exports&&(module.exports=Sherlock);