(function(n,t){"use strict";function i(n,i,r){var u=r.baseHref(),f=n[0];return function(n,r,e){var s,o;e=e||{};o=e.expires;s=t.isDefined(e.path)?e.path:u;t.isUndefined(r)&&(o="Thu, 01 Jan 1970 00:00:00 GMT",r="");t.isString(o)&&(o=new Date(o));r=encodeURIComponent(n)+"="+encodeURIComponent(r);r=r+(s?";path="+s:"")+(e.domain?";domain="+e.domain:"");r+=o?";expires="+o.toUTCString():"";r+=e.secure?";secure":"";e=r.length+1;4096<e&&i.warn("Cookie '"+n+"' possibly not set or overflowed because it was too large ("+e+" > 4096 bytes)!");f.cookie=r}}t.module("ngCookies",["ng"]).info({angularVersion:"1.6.3"}).provider("$cookies",[function(){var n=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(i,r){return{get:function(n){return i()[n]},getObject:function(n){return(n=this.get(n))?t.fromJson(n):n},getAll:function(){return i()},put:function(i,u,f){r(i,u,f?t.extend({},n,f):n)},putObject:function(n,i,r){this.put(n,t.toJson(i),r)},remove:function(i,u){r(i,void 0,u?t.extend({},n,u):n)}}}]}]);t.module("ngCookies").factory("$cookieStore",["$cookies",function(n){return{get:function(t){return n.getObject(t)},put:function(t,i){n.putObject(t,i)},remove:function(t){n.remove(t)}}}]);i.$inject=["$document","$log","$browser"];t.module("ngCookies").provider("$$cookieWriter",function(){this.$get=i})})(window,window.angular);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function t(){return we.apply(null,arguments)}function bo(n){we=n}function tt(n){return n instanceof Array||"[object Array]"===Object.prototype.toString.call(n)}function si(n){return null!=n&&"[object Object]"===Object.prototype.toString.call(n)}function ko(n){for(var t in n)return!1;return!0}function p(n){return void 0===n}function dt(n){return"number"==typeof n||"[object Number]"===Object.prototype.toString.call(n)}function bi(n){return n instanceof Date||"[object Date]"===Object.prototype.toString.call(n)}function rf(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function l(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function vt(n,t){for(var i in t)l(t,i)&&(n[i]=t[i]);return l(t,"toString")&&(n.toString=t.toString),l(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ut(n,t,i,r){return te(n,t,i,r,!0).utc()}function go(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function u(n){return null==n._pf&&(n._pf=go()),n._pf}function yr(n){if(null==n._isValid){var t=u(n),r=oy.call(t.parsedDateParts,function(n){return null!=n}),i=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(n._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(n))return i;n._isValid=i}return n._isValid}function ki(n){var t=ut(NaN);return null!=n?vt(u(t),n):u(t).userInvalidated=!0,t}function pr(n,t){var i,r,f;if(p(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),p(t._i)||(n._i=t._i),p(t._f)||(n._f=t._f),p(t._l)||(n._l=t._l),p(t._strict)||(n._strict=t._strict),p(t._tzm)||(n._tzm=t._tzm),p(t._isUTC)||(n._isUTC=t._isUTC),p(t._offset)||(n._offset=t._offset),p(t._pf)||(n._pf=u(t)),p(t._locale)||(n._locale=t._locale),lu.length>0)for(i=0;i<lu.length;i++)r=lu[i],f=t[r],p(f)||(n[r]=f);return n}function hi(n){pr(this,n);this._d=new Date(null!=n._d?n._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));au===!1&&(au=!0,t.updateOffset(this),au=!1)}function yt(n){return n instanceof hi||null!=n&&null!=n._isAMomentObject}function d(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function f(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=d(t)),i}function uf(n,t,i){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),u=0,r=0;r<e;r++)(i&&n[r]!==t[r]||!i&&f(n[r])!==f(t[r]))&&u++;return u+o}function ff(n){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function g(n,i){var r=!0;return vt(function(){var u,e,f,o;if(null!=t.deprecationHandler&&t.deprecationHandler(null,n),r){for(e=[],f=0;f<arguments.length;f++){if(u="","object"==typeof arguments[f]){u+="\n["+f+"] ";for(o in arguments[0])u+=o+": "+arguments[0][o]+", ";u=u.slice(0,-2)}else u=arguments[f];e.push(u)}ff(n+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack);r=!1}return i.apply(this,arguments)},i)}function ef(n,i){null!=t.deprecationHandler&&t.deprecationHandler(n,i);ke[n]||(ff(i),ke[n]=!0)}function ft(n){return n instanceof Function||"[object Function]"===Object.prototype.toString.call(n)}function ns(n){var t;for(var i in n)t=n[i],ft(t)?this[i]=t:this["_"+i]=t;this._config=n;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function of(n,t){var i,r=vt({},n);for(i in t)l(t,i)&&(si(n[i])&&si(t[i])?(r[i]={},vt(r[i],n[i]),vt(r[i],t[i])):null!=t[i]?r[i]=t[i]:delete r[i]);for(i in n)l(n,i)&&!l(t,i)&&si(n[i])&&(r[i]=vt({},r[i]));return r}function wr(n){null!=n&&this.set(n)}function ts(n,t,i){var r=this._calendar[n]||this._calendar.sameElse;return ft(r)?r.call(t,i):r}function is(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function rs(){return this._invalidDate}function us(n){return this._ordinal.replace("%d",n)}function fs(n,t,i,r){var u=this._relativeTime[i];return ft(u)?u(n,t,i,r):u.replace(/%d/i,n)}function es(n,t){var i=this._relativeTime[n>0?"future":"past"];return ft(i)?i(t):i.replace(/%s/i,t)}function w(n,t){var i=n.toLowerCase();vi[i]=vi[i+"s"]=vi[t]=n}function nt(n){if("string"==typeof n)return vi[n]||vi[n.toLowerCase()]}function br(n){var i,t,r={};for(t in n)l(n,t)&&(i=nt(t),i&&(r[i]=n[t]));return r}function b(n,t){no[n]=t}function os(n){var t=[];for(var i in n)t.push({unit:i,priority:no[i]});return t.sort(function(n,t){return n.priority-t.priority}),t}function ui(n,i){return function(r){return null!=r?(sf(this,n,r),t.updateOffset(this,i),this):di(this,n)}}function di(n,t){return n.isValid()?n._d["get"+(n._isUTC?"UTC":"")+t]():NaN}function sf(n,t,i){n.isValid()&&n._d["set"+(n._isUTC?"UTC":"")+t](i)}function ss(n){return n=nt(n),ft(this[n])?this[n]():this}function hs(n,t){if("object"==typeof n){n=br(n);for(var r=os(n),i=0;i<r.length;i++)this[r[i].unit](n[r[i].unit])}else if(n=nt(n),ft(this[n]))return this[n](t);return this}function ht(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u=r;"string"==typeof r&&(u=function(){return this[r]()});n&&(oi[n]=u);t&&(oi[t[0]]=function(){return ht(u.apply(this,arguments),t[1],t[2])});i&&(oi[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function cs(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ls(n){for(var t=n.match(to),i=0,r=t.length;i<r;i++)t[i]=oi[t[i]]?oi[t[i]]:cs(t[i]);return function(i){for(var f="",u=0;u<r;u++)f+=ft(t[u])?t[u].call(i,n):t[u];return f}}function kr(n,t){return n.isValid()?(t=hf(t,n.localeData()),vu[t]=vu[t]||ls(t),vu[t](n)):n.localeData().invalidDate()}function hf(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(er.lastIndex=0;i>=0&&er.test(n);)n=n.replace(er,r),er.lastIndex=0,i-=1;return n}function i(n,t,i){wu[n]=ft(t)?t:function(n){return n&&i?i:t}}function as(n,t){return l(wu,n)?wu[n](t._strict,t._locale):new RegExp(vs(n))}function vs(n){return gt(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}))}function gt(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(n,t){var i,r=t;for("string"==typeof n&&(n=[n]),dt(t)&&(r=function(n,i){i[t]=f(n)}),i=0;i<n.length;i++)bu[n[i]]=r}function ci(n,t){s(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function ys(n,t,i){null!=t&&l(bu,n)&&bu[n](t,i._a,i,n)}function dr(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function ps(n,t){return n?tt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||eo).test(t)?"format":"standalone"][n.month()]:tt(this._months)?this._months:this._months.standalone}function ws(n,t){return n?tt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[eo.test(t)?"format":"standalone"][n.month()]:tt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function bs(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)e=ut([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?"MMM"===t?(r=y.call(this._shortMonthsParse,f),r!==-1?r:null):(r=y.call(this._longMonthsParse,f),r!==-1?r:null):"MMM"===t?(r=y.call(this._shortMonthsParse,f),r!==-1?r:(r=y.call(this._longMonthsParse,f),r!==-1?r:null)):(r=y.call(this._longMonthsParse,f),r!==-1?r:(r=y.call(this._shortMonthsParse,f),r!==-1?r:null))}function ks(n,t,i){var r,u,f;if(this._monthsParseExact)return bs.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=ut([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[r].test(n))||i&&"MMM"===t&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function cf(n,t){var i;if(!n.isValid())return n;if("string"==typeof t)if(/^\d+$/.test(t))t=f(t);else if(t=n.localeData().monthsParse(t),!dt(t))return n;return i=Math.min(n.date(),dr(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n}function lf(n){return null!=n?(cf(this,n),t.updateOffset(this,!0),this):di(this,"Month")}function ds(){return dr(this.year(),this.month())}function gs(n){return this._monthsParseExact?(l(this,"_monthsRegex")||af.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=yy),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function nh(n){return this._monthsParseExact?(l(this,"_monthsRegex")||af.call(this),n?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=py),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function af(){function f(n,t){return t.length-n.length}for(var i,r=[],u=[],t=[],n=0;n<12;n++)i=ut([2e3,n]),r.push(this.monthsShort(i,"")),u.push(this.months(i,"")),t.push(this.months(i,"")),t.push(this.monthsShort(i,""));for(r.sort(f),u.sort(f),t.sort(f),n=0;n<12;n++)r[n]=gt(r[n]),u[n]=gt(u[n]);for(n=0;n<24;n++)t[n]=gt(t[n]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+u.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function li(n){return vf(n)?366:365}function vf(n){return n%4==0&&n%100!=0||n%400==0}function th(){return vf(this.year())}function ih(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return n<100&&n>=0&&isFinite(o.getFullYear())&&o.setFullYear(n),o}function gi(n){var t=new Date(Date.UTC.apply(null,arguments));return n<100&&n>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n),t}function nr(n,t,i){var r=7+t-i,u=(7+gi(n,0,r).getUTCDay()-t)%7;return-u+r-1}function yf(n,t,i,r,u){var f,o,s=(7+i-r)%7,h=nr(n,r,u),e=1+7*(t-1)+s+h;return e<=0?(f=n-1,o=li(f)+e):e>li(n)?(f=n+1,o=e-li(n)):(f=n,o=e),{year:f,dayOfYear:o}}function ai(n,t,i){var f,r,e=nr(n.year(),t,i),u=Math.floor((n.dayOfYear()-e-1)/7)+1;return u<1?(r=n.year()-1,f=u+ni(r,t,i)):u>ni(n.year(),t,i)?(f=u-ni(n.year(),t,i),r=n.year()+1):(r=n.year(),f=u),{week:f,year:r}}function ni(n,t,i){var r=nr(n,t,i),u=nr(n+1,t,i);return(li(n)-r+u)/7}function rh(n){return ai(n,this._week.dow,this._week.doy).week}function uh(){return this._week.dow}function fh(){return this._week.doy}function eh(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")}function oh(n){var t=ai(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")}function sh(n,t){return"string"!=typeof n?n:isNaN(n)?(n=t.weekdaysParse(n),"number"==typeof n?n:null):parseInt(n,10)}function hh(n,t){return"string"==typeof n?t.weekdaysParse(n)%7||7:isNaN(n)?null:n}function ch(n,t){return n?tt(this._weekdays)?this._weekdays[n.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][n.day()]:tt(this._weekdays)?this._weekdays:this._weekdays.standalone}function lh(n){return n?this._weekdaysShort[n.day()]:this._weekdaysShort}function ah(n){return n?this._weekdaysMin[n.day()]:this._weekdaysMin}function vh(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)e=ut([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?"dddd"===t?(r=y.call(this._weekdaysParse,u),r!==-1?r:null):"ddd"===t?(r=y.call(this._shortWeekdaysParse,u),r!==-1?r:null):(r=y.call(this._minWeekdaysParse,u),r!==-1?r:null):"dddd"===t?(r=y.call(this._weekdaysParse,u),r!==-1?r:(r=y.call(this._shortWeekdaysParse,u),r!==-1?r:(r=y.call(this._minWeekdaysParse,u),r!==-1?r:null))):"ddd"===t?(r=y.call(this._shortWeekdaysParse,u),r!==-1?r:(r=y.call(this._weekdaysParse,u),r!==-1?r:(r=y.call(this._minWeekdaysParse,u),r!==-1?r:null))):(r=y.call(this._minWeekdaysParse,u),r!==-1?r:(r=y.call(this._weekdaysParse,u),r!==-1?r:(r=y.call(this._shortWeekdaysParse,u),r!==-1?r:null)))}function yh(n,t,i){var r,u,f;if(this._weekdaysParseExact)return vh.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if((u=ut([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[r].test(n))||i&&"ddd"===t&&this._shortWeekdaysParse[r].test(n)||i&&"dd"===t&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r}function ph(n){if(!this.isValid())return null!=n?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=sh(n,this.localeData()),this.add(n-t,"d")):t}function wh(n){if(!this.isValid())return null!=n?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")}function bh(n){if(!this.isValid())return null!=n?this:NaN;if(null!=n){var t=hh(n,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function kh(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||gr.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=dy),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function dh(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||gr.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=gy),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function gh(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||gr.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=np),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function gr(){function u(n,t){return t.length-n.length}for(var f,e,o,s,h=[],i=[],r=[],t=[],n=0;n<7;n++)f=ut([2e3,1]).day(n),e=this.weekdaysMin(f,""),o=this.weekdaysShort(f,""),s=this.weekdays(f,""),h.push(e),i.push(o),r.push(s),t.push(e),t.push(o),t.push(s);for(h.sort(u),i.sort(u),r.sort(u),t.sort(u),n=0;n<7;n++)i[n]=gt(i[n]),r[n]=gt(r[n]),t[n]=gt(t[n]);this._weekdaysRegex=new RegExp("^("+t.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+h.join("|")+")","i")}function nu(){return this.hours()%12||12}function nc(){return this.hours()||24}function pf(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function wf(n,t){return t._meridiemParse}function tc(n){return"p"===(n+"").toLowerCase().charAt(0)}function ic(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function bf(n){return n?n.toLowerCase().replace("_","-"):n}function rc(n){for(var i,t,f,r,u=0;u<n.length;){for(r=bf(n[u]).split("-"),i=r.length,t=bf(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=kf(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&uf(r,t,!0)>=i-1)break;i--}u++}return null}function kf(n){var t=null;if(!a[n]&&"undefined"!=typeof module&&module&&module.exports)try{t=ar._abbr;require("./locale/"+n);fi(t)}catch(n){}return a[n]}function fi(n,t){var i;return n&&(i=p(t)?pt(n):tu(n,t),i&&(ar=i)),ar._abbr}function tu(n,t){if(null!==t){var i=so;if(t.abbr=n,null!=a[n])ef("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=a[n]._config;else if(null!=t.parentLocale){if(null==a[t.parentLocale])return pi[t.parentLocale]||(pi[t.parentLocale]=[]),pi[t.parentLocale].push({name:n,config:t}),null;i=a[t.parentLocale]._config}return a[n]=new wr(of(i,t)),pi[n]&&pi[n].forEach(function(n){tu(n.name,n.config)}),fi(n),a[n]}return delete a[n],null}function uc(n,t){if(null!=t){var i,r=so;null!=a[n]&&(r=a[n]._config);t=of(r,t);i=new wr(t);i.parentLocale=a[n];a[n]=i;fi(n)}else null!=a[n]&&(null!=a[n].parentLocale?a[n]=a[n].parentLocale:null!=a[n]&&delete a[n]);return a[n]}function pt(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return ar;if(!tt(n)){if(t=kf(n))return t;n=[n]}return rc(n)}function fc(){return sy(a)}function iu(n){var i,t=n._a;return t&&u(n).overflow===-2&&(i=t[ct]<0||t[ct]>11?ct:t[ot]<1||t[ot]>dr(t[it],t[ct])?ot:t[v]<0||t[v]>24||24===t[v]&&(0!==t[rt]||0!==t[lt]||0!==t[ri])?v:t[rt]<0||t[rt]>59?rt:t[lt]<0||t[lt]>59?lt:t[ri]<0||t[ri]>999?ri:-1,u(n)._overflowDayOfYear&&(i<it||i>ot)&&(i=ot),u(n)._overflowWeeks&&i===-1&&(i=cy),u(n)._overflowWeekday&&i===-1&&(i=ly),u(n).overflow=i),n}function df(n){var t,r,o,e,f,s,h=n._i,i=ip.exec(h)||rp.exec(h);if(i){for(u(n).iso=!0,t=0,r=vr.length;t<r;t++)if(vr[t][1].exec(i[1])){e=vr[t][0];o=vr[t][2]!==!1;break}if(null==e)return void(n._isValid=!1);if(i[3]){for(t=0,r=du.length;t<r;t++)if(du[t][1].exec(i[3])){f=(i[2]||" ")+du[t][0];break}if(null==f)return void(n._isValid=!1)}if(!o&&null!=f)return void(n._isValid=!1);if(i[4]){if(!up.exec(i[4]))return void(n._isValid=!1);s="Z"}n._f=e+(f||"")+(s||"");tr(n)}else n._isValid=!1}function gf(n){var f,t,e,o,s,h,i,r,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},l,a;if(f=n._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),t=ep.exec(f)){if((e=t[1]?"ddd"+(5===t[1].length?", ":" "):"",o="D MMM "+(t[2].length>10?"YYYY ":"YY "),s="HH:mm"+(t[4]?":ss":""),t[1])&&(l=new Date(t[2]),a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()],t[1].substr(0,3)!==a))return u(n).weekdayMismatch=!0,void(n._isValid=!1);switch(t[5].length){case 2:0===r?i=" +0000":(r="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(t[5][1].toUpperCase())-12,i=(r<0?" -":" +")+(""+r).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:i=c[t[5]];break;default:i=c[" GMT"]}t[5]=i;n._i=t.splice(1).join("");h=" ZZ";n._f=e+o+s+h;tr(n);u(n).rfc2822=!0}else n._isValid=!1}function ec(n){var i=fp.exec(n._i);return null!==i?void(n._d=new Date(+i[1])):(df(n),void(n._isValid===!1&&(delete n._isValid,gf(n),n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n)))))}function ei(n,t,i){return null!=n?n:null!=t?t:i}function oc(n){var i=new Date(t.now());return n._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function ru(n){var t,i,r,f,e=[];if(!n._d){for(r=oc(n),n._w&&null==n._a[ot]&&null==n._a[ct]&&sc(n),null!=n._dayOfYear&&(f=ei(n._a[it],r[it]),(n._dayOfYear>li(f)||0===n._dayOfYear)&&(u(n)._overflowDayOfYear=!0),i=gi(f,0,n._dayOfYear),n._a[ct]=i.getUTCMonth(),n._a[ot]=i.getUTCDate()),t=0;t<3&&null==n._a[t];++t)n._a[t]=e[t]=r[t];for(;t<7;t++)n._a[t]=e[t]=null==n._a[t]?2===t?1:0:n._a[t];24===n._a[v]&&0===n._a[rt]&&0===n._a[lt]&&0===n._a[ri]&&(n._nextDay=!0,n._a[v]=0);n._d=(n._useUTC?gi:ih).apply(null,e);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[v]=24)}}function sc(n){var t,o,f,i,r,e,h,s,l;(t=n._w,null!=t.GG||null!=t.W||null!=t.E)?(r=1,e=4,o=ei(t.GG,n._a[it],ai(c(),1,4).year),f=ei(t.W,1),i=ei(t.E,1),(i<1||i>7)&&(s=!0)):(r=n._locale._week.dow,e=n._locale._week.doy,l=ai(c(),r,e),o=ei(t.gg,n._a[it],l.year),f=ei(t.w,l.week),null!=t.d?(i=t.d,(i<0||i>6)&&(s=!0)):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(s=!0)):i=r);f<1||f>ni(o,r,e)?u(n)._overflowWeeks=!0:null!=s?u(n)._overflowWeekday=!0:(h=yf(o,f,i,r,e),n._a[it]=h.year,n._dayOfYear=h.dayOfYear)}function tr(n){if(n._f===t.ISO_8601)return void df(n);if(n._f===t.RFC_2822)return void gf(n);n._a=[];u(n).empty=!0;for(var i,f,s,r=""+n._i,c=r.length,h=0,o=hf(n._f,n._locale).match(to)||[],e=0;e<o.length;e++)f=o[e],i=(r.match(as(f,n))||[])[0],i&&(s=r.substr(0,r.indexOf(i)),s.length>0&&u(n).unusedInput.push(s),r=r.slice(r.indexOf(i)+i.length),h+=i.length),oi[f]?(i?u(n).empty=!1:u(n).unusedTokens.push(f),ys(f,i,n)):n._strict&&!i&&u(n).unusedTokens.push(f);u(n).charsLeftOver=c-h;r.length>0&&u(n).unusedInput.push(r);n._a[v]<=12&&u(n).bigHour===!0&&n._a[v]>0&&(u(n).bigHour=void 0);u(n).parsedDateParts=n._a.slice(0);u(n).meridiem=n._meridiem;n._a[v]=hc(n._locale,n._a[v],n._meridiem);ru(n);iu(n)}function hc(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):null!=n.isPM?(r=n.isPM(i),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function cc(n){var t,e,f,r,i;if(0===n._f.length)return u(n).invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=pr({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._f=n._f[r],tr(t),yr(t)&&(i+=u(t).charsLeftOver,i+=10*u(t).unusedTokens.length,u(t).score=i,(null==f||i<f)&&(f=i,e=t));vt(n,e||t)}function lc(n){if(!n._d){var t=br(n._i);n._a=rf([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)});ru(n)}}function ac(n){var t=new hi(iu(ne(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function ne(n){var t=n._i,i=n._f;return n._locale=n._locale||pt(n._l),null===t||void 0===i&&""===t?ki({nullInput:!0}):("string"==typeof t&&(n._i=t=n._locale.preparse(t)),yt(t)?new hi(iu(t)):(bi(t)?n._d=t:tt(i)?cc(n):i?tr(n):vc(n),yr(n)||(n._d=null),n))}function vc(n){var i=n._i;p(i)?n._d=new Date(t.now()):bi(i)?n._d=new Date(i.valueOf()):"string"==typeof i?ec(n):tt(i)?(n._a=rf(i.slice(0),function(n){return parseInt(n,10)}),ru(n)):si(i)?lc(n):dt(i)?n._d=new Date(i):t.createFromInputFallback(n)}function te(n,t,i,r,u){var f={};return i!==!0&&i!==!1||(r=i,i=void 0),(si(n)&&ko(n)||tt(n)&&0===n.length)&&(n=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,ac(f)}function c(n,t,i,r){return te(n,t,i,r,!1)}function ie(n,t){var r,i;if(1===t.length&&tt(t[0])&&(t=t[0]),!t.length)return c();for(r=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][n](r)||(r=t[i]);return r}function yc(){var n=[].slice.call(arguments,0);return ie("isBefore",n)}function pc(){var n=[].slice.call(arguments,0);return ie("isAfter",n)}function wc(n){var i,r,t;for(i in n)if(wi.indexOf(i)===-1||null!=n[i]&&isNaN(n[i]))return!1;for(r=!1,t=0;t<wi.length;++t)if(n[wi[t]]){if(r)return!1;parseFloat(n[wi[t]])!==f(n[wi[t]])&&(r=!0)}return!0}function bc(){return this._isValid}function kc(){return et(NaN)}function ir(n){var t=br(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._isValid=wc(t);this._milliseconds=+c+1e3*h+6e4*s+36e5*o;this._days=+e+7*f;this._months=+u+3*r+12*i;this._data={};this._locale=pt();this._bubble()}function uu(n){return n instanceof ir}function fu(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function re(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+ht(~~(n/60),2)+t+ht(~~n%60,2)})}function eu(n,t){var i=(t||"").match(n);if(null===i)return null;var e=i[i.length-1]||[],r=(e+"").match(ho)||["-",0,0],u=+(60*r[1])+f(r[2]);return 0===u?0:"+"===r[0]?u:-u}function ou(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(yt(n)||bi(n)?n.valueOf():c(n).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+u),t.updateOffset(r,!1),r):c(n).local()}function su(n){return 15*-Math.round(n._d.getTimezoneOffset()/15)}function dc(n,i,r){var u,f=this._offset||0;if(!this.isValid())return null!=n?this:NaN;if(null!=n){if("string"==typeof n){if(n=eu(lr,n),null===n)return this}else Math.abs(n)<16&&!r&&(n=60*n);return!this._isUTC&&i&&(u=su(this)),this._offset=n,this._isUTC=!0,null!=u&&this.add(u,"m"),f!==n&&(!i||this._changeInProgress?oe(this,et(n-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?f:su(this)}function gc(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function nl(n){return this.utcOffset(0,n)}function tl(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(su(this),"m")),this}function il(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var n=eu(hy,this._i);null!=n?this.utcOffset(n):this.utcOffset(0,!0)}return this}function rl(n){return!!this.isValid()&&(n=n?c(n).utcOffset():0,(this.utcOffset()-n)%60==0)}function ul(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function fl(){var n,t;return p(this._isDSTShifted)?(n={},(pr(n,this),n=ne(n),n._a)?(t=n._isUTC?ut(n._a):c(n._a),this._isDSTShifted=this.isValid()&&uf(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted):this._isDSTShifted}function el(){return!!this.isValid()&&!this._isUTC}function ol(){return!!this.isValid()&&this._isUTC}function ue(){return!!this.isValid()&&this._isUTC&&0===this._offset}function et(n,t){var u,e,o,i=n,r=null;return uu(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:dt(n)?(i={},t?i[t]=n:i.milliseconds=n):(r=co.exec(n))?(u="-"===r[1]?-1:1,i={y:0,d:f(r[ot])*u,h:f(r[v])*u,m:f(r[rt])*u,s:f(r[lt])*u,ms:f(fu(1e3*r[ri]))*u}):(r=lo.exec(n))?(u="-"===r[1]?-1:1,i={y:ti(r[2],u),M:ti(r[3],u),w:ti(r[4],u),d:ti(r[5],u),h:ti(r[6],u),m:ti(r[7],u),s:ti(r[8],u)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=sl(c(i.from),c(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),e=new ir(i),uu(n)&&l(n,"_locale")&&(e._locale=n._locale),e}function ti(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function fe(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function sl(n,t){var i;return n.isValid()&&t.isValid()?(t=ou(t,n),n.isBefore(t)?i=fe(n,t):(i=fe(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ee(n,t){return function(i,r){var u,f;return null===r||isNaN(+r)||(ef(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=i,i=r,r=f),i="string"==typeof i?+i:i,u=et(i,r),oe(this,u,n),this}}function oe(n,i,r,u){var o=i._milliseconds,f=fu(i._days),e=fu(i._months);n.isValid()&&(u=null==u||u,o&&n._d.setTime(n._d.valueOf()+o*r),f&&sf(n,"Date",di(n,"Date")+f*r),e&&cf(n,di(n,"Month")+e*r),u&&t.updateOffset(n,f||e))}function hl(n,t){var i=n.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function cl(n,i){var u=n||c(),f=ou(u,this).startOf("day"),r=t.calendarFormat(this,f)||"sameElse",e=i&&(ft(i[r])?i[r].call(this,u):i[r]);return this.format(e||this.localeData().calendar(r,this,c(u)))}function ll(){return new hi(this)}function al(n,t){var i=yt(n)?n:c(n);return!(!this.isValid()||!i.isValid())&&(t=nt(p(t)?"millisecond":t),"millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())}function vl(n,t){var i=yt(n)?n:c(n);return!(!this.isValid()||!i.isValid())&&(t=nt(p(t)?"millisecond":t),"millisecond"===t?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())}function yl(n,t,i,r){return r=r||"()",("("===r[0]?this.isAfter(n,i):!this.isBefore(n,i))&&(")"===r[1]?this.isBefore(t,i):!this.isAfter(t,i))}function pl(n,t){var i,r=yt(n)?n:c(n);return!(!this.isValid()||!r.isValid())&&(t=nt(t||"millisecond"),"millisecond"===t?this.valueOf()===r.valueOf():(i=r.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))}function wl(n,t){return this.isSame(n,t)||this.isAfter(n,t)}function bl(n,t){return this.isSame(n,t)||this.isBefore(n,t)}function kl(n,t,i){var f,e,r,u;return this.isValid()?(f=ou(n,this),f.isValid()?(e=6e4*(f.utcOffset()-this.utcOffset()),t=nt(t),"year"===t||"month"===t||"quarter"===t?(u=dl(this,f),"quarter"===t?u/=3:"year"===t&&(u/=12)):(r=this-f,u="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-e)/864e5:"week"===t?(r-e)/6048e5:r),i?u:d(u)):NaN):NaN}function dl(n,t){var r,f,u=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(u,"months");return t-i<0?(r=n.clone().add(u-1,"months"),f=(t-i)/(i-r)):(r=n.clone().add(u+1,"months"),f=(t-i)/(r-i)),-(u+f)||0}function gl(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function na(){if(!this.isValid())return null;var n=this.clone().utc();return n.year()<0||n.year()>9999?kr(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):ft(Date.prototype.toISOString)?this.toDate().toISOString():kr(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ta(){var n,t;if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";n="moment";t="";this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var i="["+n+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",u=t+'[")]';return this.format(i+r+"-MM-DD[T]HH:mm:ss.SSS"+u)}function ia(n){n||(n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=kr(this,n);return this.localeData().postformat(i)}function ra(n,t){return this.isValid()&&(yt(n)&&n.isValid()||c(n).isValid())?et({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ua(n){return this.from(c(),n)}function fa(n,t){return this.isValid()&&(yt(n)&&n.isValid()||c(n).isValid())?et({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ea(n){return this.to(c(),n)}function se(n){var t;return void 0===n?this._locale._abbr:(t=pt(n),null!=t&&(this._locale=t),this)}function he(){return this._locale}function oa(n){switch(n=nt(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n&&this.weekday(0),"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this}function sa(n){return n=nt(n),void 0===n||"millisecond"===n?this:("date"===n&&(n="day"),this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms"))}function ha(){return this._d.valueOf()-6e4*(this._offset||0)}function ca(){return Math.floor(this.valueOf()/1e3)}function la(){return new Date(this.valueOf())}function aa(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function va(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function ya(){return this.isValid()?this.toISOString():null}function pa(){return yr(this)}function wa(){return vt({},u(this))}function ba(){return u(this).overflow}function ka(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function rr(n,t){r(0,[n,n.length],0,t)}function da(n){return ce.call(this,n,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function ga(n){return ce.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function nv(){return ni(this.year(),1,4)}function tv(){var n=this.localeData()._week;return ni(this.year(),n.dow,n.doy)}function ce(n,t,i,r,u){var f;return null==n?ai(this,r,u).year:(f=ni(n,r,u),t>f&&(t=f),iv.call(this,n,t,i,r,u))}function iv(n,t,i,r,u){var e=yf(n,t,i,r,u),f=gi(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}function rv(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)}function uv(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==n?t:this.add(n-t,"d")}function fv(n,t){t[ri]=f(1e3*("0."+n))}function ev(){return this._isUTC?"UTC":""}function ov(){return this._isUTC?"Coordinated Universal Time":""}function sv(n){return c(1e3*n)}function hv(){return c.apply(null,arguments).parseZone()}function le(n){return n}function ur(n,t,i,r){var u=pt(),f=ut().set(r,t);return u[i](f,n)}function ae(n,t,i){if(dt(n)&&(t=n,n=void 0),n=n||"",null!=t)return ur(n,t,i,"month");for(var u=[],r=0;r<12;r++)u[r]=ur(n,r,i,"month");return u}function hu(n,t,i,r){var o,f,u,e;if("boolean"==typeof n?(dt(t)&&(i=t,t=void 0),t=t||""):(t=n,i=t,n=!1,dt(t)&&(i=t,t=void 0),t=t||""),o=pt(),f=n?o._week.dow:0,null!=i)return ur(t,(i+f)%7,r,"day");for(e=[],u=0;u<7;u++)e[u]=ur(t,(u+f)%7,r,"day");return e}function cv(n,t){return ae(n,t,"months")}function lv(n,t){return ae(n,t,"monthsShort")}function av(n,t,i){return hu(n,t,i,"weekdays")}function vv(n,t,i){return hu(n,t,i,"weekdaysShort")}function yv(n,t,i){return hu(n,t,i,"weekdaysMin")}function pv(){var n=this._data;return this._milliseconds=at(this._milliseconds),this._days=at(this._days),this._months=at(this._months),n.milliseconds=at(n.milliseconds),n.seconds=at(n.seconds),n.minutes=at(n.minutes),n.hours=at(n.hours),n.months=at(n.months),n.years=at(n.years),this}function ve(n,t,i,r){var u=et(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function wv(n,t){return ve(this,n,t,1)}function bv(n,t){return ve(this,n,t,-1)}function ye(n){return n<0?Math.floor(n):Math.ceil(n)}function kv(){var u,f,e,s,o,r=this._milliseconds,n=this._days,t=this._months,i=this._data;return r>=0&&n>=0&&t>=0||r<=0&&n<=0&&t<=0||(r+=864e5*ye(cu(t)+n),n=0,t=0),i.milliseconds=r%1e3,u=d(r/1e3),i.seconds=u%60,f=d(u/60),i.minutes=f%60,e=d(f/60),i.hours=e%24,n+=d(e/24),o=d(pe(n)),t+=o,n-=ye(cu(o)),s=d(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function pe(n){return 4800*n/146097}function cu(n){return 146097*n/4800}function dv(n){if(!this.isValid())return NaN;var t,r,i=this._milliseconds;if(n=nt(n),"month"===n||"year"===n)return t=this._days+i/864e5,r=this._months+pe(t),"month"===n?r:r/12;switch(t=this._days+Math.round(cu(this._months)),n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+n);}}function gv(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*f(this._months/12):NaN}function wt(n){return function(){return this.as(n)}}function ny(n){return n=nt(n),this.isValid()?this[n+"s"]():NaN}function ii(n){return function(){return this.isValid()?this._data[n]:NaN}}function ty(){return d(this.days()/7)}function iy(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function ry(n,t,i){var r=et(n).abs(),u=kt(r.as("s")),e=kt(r.as("m")),o=kt(r.as("h")),s=kt(r.as("d")),h=kt(r.as("M")),c=kt(r.as("y")),f=u<=st.ss&&["s",u]||u<st.s&&["ss",u]||e<=1&&["m"]||e<st.m&&["mm",e]||o<=1&&["h"]||o<st.h&&["hh",o]||s<=1&&["d"]||s<st.d&&["dd",s]||h<=1&&["M"]||h<st.M&&["MM",h]||c<=1&&["y"]||["yy",c];return f[2]=t,f[3]=+n>0,f[4]=i,iy.apply(null,f)}function uy(n){return void 0===n?kt:"function"==typeof n&&(kt=n,!0)}function fy(n,t){return void 0!==st[n]&&(void 0===t?st[n]:(st[n]=t,"s"===n&&(st.ss=t-1),!0))}function ey(n){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=ry(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function fr(){if(!this.isValid())return this.localeData().invalidDate();var n,e,o,t=tf(this._milliseconds)/1e3,a=tf(this._days),i=tf(this._months);n=d(t/60);e=d(n/60);t%=60;n%=60;o=d(i/12);i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(l<0?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}var we,be,de,y,ku,oo,ho,co,lo,ao,vo,gu,nf,yo,po,bt,wo,n,o;be=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;t<r;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};var oy=be,lu=t.momentProperties=[],au=!1,ke={};t.suppressDeprecationWarnings=!1;t.deprecationHandler=null;de=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)l(n,t)&&i.push(t);return i};var ge,sy=de,vi={},no={},to=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,er=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,vu={},oi={},io=/\d/,k=/\d\d/,ro=/\d{3}/,yu=/\d{4}/,or=/[+-]?\d{6}/,h=/\d\d?/,uo=/\d\d\d\d?/,fo=/\d\d\d\d\d\d?/,sr=/\d{1,3}/,pu=/\d{1,4}/,hr=/[+-]?\d{1,6}/,cr=/[+-]?\d+/,hy=/Z|[+-]\d\d:?\d\d/gi,lr=/Z|[+-]\d\d(?::?\d\d)?/gi,yi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,wu={},bu={},it=0,ct=1,ot=2,v=3,rt=4,lt=5,ri=6,cy=7,ly=8;ge=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};y=ge;r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});w("month","M");b("month",8);i("M",h);i("MM",h,k);i("MMM",function(n,t){return t.monthsShortRegex(n)});i("MMMM",function(n,t){return t.monthsRegex(n)});s(["M","MM"],function(n,t){t[ct]=f(n)-1});s(["MMM","MMMM"],function(n,t,i,r){var f=i._locale.monthsParse(n,r,i._strict);null!=f?t[ct]=f:u(i).invalidMonth=n});var eo=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ay="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),vy="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yy=yi,py=yi;r("Y",0,0,function(){var n=this.year();return n<=9999?""+n:"+"+n});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");w("year","y");b("year",1);i("Y",cr);i("YY",h,k);i("YYYY",pu,yu);i("YYYYY",hr,or);i("YYYYYY",hr,or);s(["YYYYY","YYYYYY"],it);s("YYYY",function(n,i){i[it]=2===n.length?t.parseTwoDigitYear(n):f(n)});s("YY",function(n,i){i[it]=t.parseTwoDigitYear(n)});s("Y",function(n,t){t[it]=parseInt(n,10)});t.parseTwoDigitYear=function(n){return f(n)+(f(n)>68?1900:2e3)};ku=ui("FullYear",!0);r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");w("week","w");w("isoWeek","W");b("week",5);b("isoWeek",5);i("w",h);i("ww",h,k);i("W",h);i("WW",h,k);ci(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=f(n)});oo={dow:0,doy:6};r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");w("day","d");w("weekday","e");w("isoWeekday","E");b("day",11);b("weekday",11);b("isoWeekday",11);i("d",h);i("e",h);i("E",h);i("dd",function(n,t){return t.weekdaysMinRegex(n)});i("ddd",function(n,t){return t.weekdaysShortRegex(n)});i("dddd",function(n,t){return t.weekdaysRegex(n)});ci(["dd","ddd","dddd"],function(n,t,i,r){var f=i._locale.weekdaysParse(n,r,i._strict);null!=f?t.d=f:u(i).invalidWeekday=n});ci(["d","e","E"],function(n,t,i,r){t[r]=f(n)});var wy="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),by="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ky="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dy=yi,gy=yi,np=yi;r("H",["HH",2],0,"hour");r("h",["hh",2],0,nu);r("k",["kk",2],0,nc);r("hmm",0,0,function(){return""+nu.apply(this)+ht(this.minutes(),2)});r("hmmss",0,0,function(){return""+nu.apply(this)+ht(this.minutes(),2)+ht(this.seconds(),2)});r("Hmm",0,0,function(){return""+this.hours()+ht(this.minutes(),2)});r("Hmmss",0,0,function(){return""+this.hours()+ht(this.minutes(),2)+ht(this.seconds(),2)});pf("a",!0);pf("A",!1);w("hour","h");b("hour",13);i("a",wf);i("A",wf);i("H",h);i("h",h);i("k",h);i("HH",h,k);i("hh",h,k);i("kk",h,k);i("hmm",uo);i("hmmss",fo);i("Hmm",uo);i("Hmmss",fo);s(["H","HH"],v);s(["k","kk"],function(n,t){var i=f(n);t[v]=24===i?0:i});s(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});s(["h","hh"],function(n,t,i){t[v]=f(n);u(i).bigHour=!0});s("hmm",function(n,t,i){var r=n.length-2;t[v]=f(n.substr(0,r));t[rt]=f(n.substr(r));u(i).bigHour=!0});s("hmmss",function(n,t,i){var r=n.length-4,e=n.length-2;t[v]=f(n.substr(0,r));t[rt]=f(n.substr(r,2));t[lt]=f(n.substr(e));u(i).bigHour=!0});s("Hmm",function(n,t){var i=n.length-2;t[v]=f(n.substr(0,i));t[rt]=f(n.substr(i))});s("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[v]=f(n.substr(0,i));t[rt]=f(n.substr(i,2));t[lt]=f(n.substr(r))});var ar,tp=ui("Hours",!0),so={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ay,monthsShort:vy,week:oo,weekdays:wy,weekdaysMin:ky,weekdaysShort:by,meridiemParse:/[ap]\.?m?\.?/i},a={},pi={},ip=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rp=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,up=/Z|[+-]\d\d(?::?\d\d)?/,vr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],du=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fp=/^\/?Date\((\-?\d+)/i,ep=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;t.createFromInputFallback=g("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});t.ISO_8601=function(){};t.RFC_2822=function(){};var op=g("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=c.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:ki()}),sp=g("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=c.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:ki()}),hp=function(){return Date.now?Date.now():+new Date},wi=["year","quarter","month","week","day","hour","minute","second","millisecond"];for(re("Z",":"),re("ZZ",""),i("Z",lr),i("ZZ",lr),s(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=eu(lr,n)}),ho=/([\+\-]|\d\d)/gi,t.updateOffset=function(){},co=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,lo=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/,et.fn=ir.prototype,et.invalid=kc,ao=ee(1,"add"),vo=ee(-1,"subtract"),t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",gu=g("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return void 0===n?this.localeData():this.locale(n)}),r(0,["gg",2],0,function(){return this.weekYear()%100}),r(0,["GG",2],0,function(){return this.isoWeekYear()%100}),rr("gggg","weekYear"),rr("ggggg","weekYear"),rr("GGGG","isoWeekYear"),rr("GGGGG","isoWeekYear"),w("weekYear","gg"),w("isoWeekYear","GG"),b("weekYear",1),b("isoWeekYear",1),i("G",cr),i("g",cr),i("GG",h,k),i("gg",h,k),i("GGGG",pu,yu),i("gggg",pu,yu),i("GGGGG",hr,or),i("ggggg",hr,or),ci(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=f(n)}),ci(["gg","GG"],function(n,i,r,u){i[u]=t.parseTwoDigitYear(n)}),r("Q",0,"Qo","quarter"),w("quarter","Q"),b("quarter",7),i("Q",io),s("Q",function(n,t){t[ct]=3*(f(n)-1)}),r("D",["DD",2],"Do","date"),w("date","D"),b("date",9),i("D",h),i("DD",h,k),i("Do",function(n,t){return n?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),s(["D","DD"],ot),s("Do",function(n,t){t[ot]=f(n.match(h)[0],10)}),nf=ui("Date",!0),r("DDD",["DDDD",3],"DDDo","dayOfYear"),w("dayOfYear","DDD"),b("dayOfYear",4),i("DDD",sr),i("DDDD",ro),s(["DDD","DDDD"],function(n,t,i){i._dayOfYear=f(n)}),r("m",["mm",2],0,"minute"),w("minute","m"),b("minute",14),i("m",h),i("mm",h,k),s(["m","mm"],rt),yo=ui("Minutes",!1),r("s",["ss",2],0,"second"),w("second","s"),b("second",15),i("s",h),i("ss",h,k),s(["s","ss"],lt),po=ui("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return 10*this.millisecond()}),r(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),r(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),r(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),r(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),r(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),w("millisecond","ms"),b("millisecond",16),i("S",sr,io),i("SS",sr,k),i("SSS",sr,ro),bt="SSSS";bt.length<=9;bt+="S")i(bt,/\d+/);for(bt="S";bt.length<=9;bt+="S")s(bt,fv);wo=ui("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=hi.prototype;n.add=ao;n.calendar=cl;n.clone=ll;n.diff=kl;n.endOf=sa;n.format=ia;n.from=ra;n.fromNow=ua;n.to=fa;n.toNow=ea;n.get=ss;n.invalidAt=ba;n.isAfter=al;n.isBefore=vl;n.isBetween=yl;n.isSame=pl;n.isSameOrAfter=wl;n.isSameOrBefore=bl;n.isValid=pa;n.lang=gu;n.locale=se;n.localeData=he;n.max=sp;n.min=op;n.parsingFlags=wa;n.set=hs;n.startOf=oa;n.subtract=vo;n.toArray=aa;n.toObject=va;n.toDate=la;n.toISOString=na;n.inspect=ta;n.toJSON=ya;n.toString=gl;n.unix=ca;n.valueOf=ha;n.creationData=ka;n.year=ku;n.isLeapYear=th;n.weekYear=da;n.isoWeekYear=ga;n.quarter=n.quarters=rv;n.month=lf;n.daysInMonth=ds;n.week=n.weeks=eh;n.isoWeek=n.isoWeeks=oh;n.weeksInYear=tv;n.isoWeeksInYear=nv;n.date=nf;n.day=n.days=ph;n.weekday=wh;n.isoWeekday=bh;n.dayOfYear=uv;n.hour=n.hours=tp;n.minute=n.minutes=yo;n.second=n.seconds=po;n.millisecond=n.milliseconds=wo;n.utcOffset=dc;n.utc=nl;n.local=tl;n.parseZone=il;n.hasAlignedHourOffset=rl;n.isDST=ul;n.isLocal=el;n.isUtcOffset=ol;n.isUtc=ue;n.isUTC=ue;n.zoneAbbr=ev;n.zoneName=ov;n.dates=g("dates accessor is deprecated. Use date instead.",nf);n.months=g("months accessor is deprecated. Use month instead",lf);n.years=g("years accessor is deprecated. Use year instead",ku);n.zone=g("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gc);n.isDSTShifted=g("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",fl);o=wr.prototype;o.calendar=ts;o.longDateFormat=is;o.invalidDate=rs;o.ordinal=us;o.preparse=le;o.postformat=le;o.relativeTime=fs;o.pastFuture=es;o.set=ns;o.months=ps;o.monthsShort=ws;o.monthsParse=ks;o.monthsRegex=nh;o.monthsShortRegex=gs;o.week=rh;o.firstDayOfYear=fh;o.firstDayOfWeek=uh;o.weekdays=ch;o.weekdaysMin=ah;o.weekdaysShort=lh;o.weekdaysParse=yh;o.weekdaysRegex=kh;o.weekdaysShortRegex=dh;o.weekdaysMinRegex=gh;o.isPM=tc;o.meridiem=ic;fi("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=1===f(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i}});t.lang=g("moment.lang is deprecated. Use moment.locale instead.",fi);t.langData=g("moment.langData is deprecated. Use moment.localeData instead.",pt);var at=Math.abs,cp=wt("ms"),lp=wt("s"),ap=wt("m"),vp=wt("h"),yp=wt("d"),pp=wt("w"),wp=wt("M"),bp=wt("y"),kp=ii("milliseconds"),dp=ii("seconds"),gp=ii("minutes"),nw=ii("hours"),tw=ii("days"),iw=ii("months"),rw=ii("years"),kt=Math.round,st={ss:44,s:45,m:45,h:22,d:26,M:11},tf=Math.abs,e=ir.prototype;return e.isValid=bc,e.abs=pv,e.add=wv,e.subtract=bv,e.as=dv,e.asMilliseconds=cp,e.asSeconds=lp,e.asMinutes=ap,e.asHours=vp,e.asDays=yp,e.asWeeks=pp,e.asMonths=wp,e.asYears=bp,e.valueOf=gv,e._bubble=kv,e.get=ny,e.milliseconds=kp,e.seconds=dp,e.minutes=gp,e.hours=nw,e.days=tw,e.weeks=ty,e.months=iw,e.years=rw,e.humanize=ey,e.toISOString=fr,e.toString=fr,e.toJSON=fr,e.locale=se,e.localeData=he,e.toIsoString=g("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fr),e.lang=gu,r("X",0,0,"unix"),r("x",0,0,"valueOf"),i("x",cr),i("X",/[+-]?\d+(\.\d{1,3})?/),s("X",function(n,t,i){i._d=new Date(1e3*parseFloat(n,10))}),s("x",function(n,t,i){i._d=new Date(f(n))}),t.version="2.18.1",bo(c),t.fn=n,t.min=yc,t.max=pc,t.now=hp,t.utc=ut,t.unix=sv,t.months=cv,t.isDate=bi,t.locale=fi,t.invalid=ki,t.duration=et,t.isMoment=yt,t.weekdays=av,t.parseZone=hv,t.localeData=pt,t.isDuration=uu,t.monthsShort=lv,t.weekdaysMin=yv,t.defineLocale=tu,t.updateLocale=uc,t.locales=fc,t.weekdaysShort=vv,t.normalizeUnits=nt,t.relativeTimeRounding=uy,t.relativeTimeThreshold=fy,t.calendarFormat=hl,t.prototype=n,t});angular.module("tasteatlas").value("EntityTypes",{DISH:1,INGREDIENT:2,RESTAURANT:3,ARTICLE:5,DISH_RESTAURANT:11,EVENT:14,RECIPE:18,RECIPE_VARIATION:18,TOP_LIST_ARTICLE:17,PRODUCT:21,PRODUCT_MAKER:20});angular.module("tasteatlas").value("RegionLevels",{Undefined:-1,District:0,City:1,RegionCapitalCity:2,CapitalCity:3,MicroRegion:4,Region:5,RegionGroup:6,Country:7,CountryGroup:8,Continent:9});angular.module("tasteatlas").service("MiscellaneousHelper",function(){var n=this;this.about="about";this.sitemap="sitemap";this.terms="terms";this.privacy="privacy";this.validators={email:/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i};this.StarInfoMobile=function(n){this.values=[{first:1,firstDescription:"Cancel your rating",second:2,secondDescription:"I hate it",isTapped:!1,currentClass:n[0]},{first:3,firstDescription:"Very bad",second:4,secondDescription:"I don't like it",isTapped:!1,currentClass:n[0]},{first:5,firstDescription:"I don't quite like it",second:6,secondDescription:"Average",isTapped:!1,currentClass:n[0]},{first:7,firstDescription:"I like it",second:8,secondDescription:"More than ok",isTapped:!1,currentClass:n[0]},{first:9,firstDescription:"I like it a lot",second:10,secondDescription:"I love it",isTapped:!1,currentClass:n[0]}]};this.StarInfoDesktop=function(){this.values=[{value:1,description:"Cancel your rating"},{value:2,description:"I hate it"},{value:3,description:"Very bad"},{value:4,description:"I don't like it"},{value:5,description:"I don't quite like it"},{value:6,description:"Average"},{value:7,description:"I like it"},{value:8,description:"More than ok"},{value:9,description:"I like it a lot"},{value:10,description:"I love it"}]}});angular.module("tasteatlas").service("DecodeTokenHelper",[function(){function n(n){var r=n.split("."),t;if(r.length!==3)throw new Error("JWT must have 3 parts");if(t=i(r[1]),!t)throw new Error("Cannot decode the token");return angular.fromJson(t)}function i(n){var t=n.replace("-","+").replace("_","/");return JSON.parse(e(t))}function t(t){var r=n(t),i;return typeof r.exp=="undefined"?null:(i=new Date(0),i.setUTCSeconds(r.exp),i)}function r(n){var i=_decodeJwtToken(n),t;return typeof i.nbf=="undefined"?null:(t=new Date(0),t.setUTCSeconds(i.nbf),t)}function u(n,i){var r=t(n);return(i=i||0,r===null)?!1:!(r.valueOf()>(new Date).valueOf()+i*1e3)}function f(n){return new Date(parseInt(n))}function e(n){return decodeURIComponent(Array.prototype.map.call(atob(n),function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var o=this;this.decodeJwtToken=n;this.getTokenExpirationDate=t;this.getTokenNotBeforeDate=r;this.isTokenExpired=u;this.parseJsonDate=f}]);angular.module("tasteatlas").factory("AuthorizationInterceptorFactory",["$q","$injector","$cookies","$timeout","Tokens",function(n,t,i,r,u){var f={},o,h=function(n){n.headers=n.headers||{};var t=i.get(u.jwtTokenKey);return t&&!n.isAnonymous&&(n.headers.Authorization="Bearer "+t),n},e=function(r){var o=n.defer(),h,c;return console.log(o),h=t.get("AccountService"),r.status===401?(f.responseError=null,c=i.get(u.refreshTokenKey),c===undefined?h.anonymous().then(function(){f.responseError=e;s(r.config,o)}).catch(function(){o.reject(r)}):h.refreshToken(c).then(function(){f.responseError=e;s(r.config,o)}).catch(function(){h.anonymous().then(function(){f.responseError=e;s(r.config,o)}).catch(function(){o.reject(r)})})):(f.responseError=e,o.reject(r)),o.promise},s=function(n,i){o=o||t.get("$http");o(n).then(function(n){i.resolve(n)}).catch(function(n){i.reject(n)})};return f.request=h,f.responseError=e,f}]);angular.module("tasteatlas").service("TokenFactory",["$cookies","$timeout","DecodeTokenHelper","AccountService","UserSubjectService","Tokens",function(n,t,i,r,u,f){function o(){var f=n.get(e._jwtTokenKey),s=n.get(e._refreshTokenKey),o;if(s===undefined){if(o=!1,f){var h=i.getTokenExpirationDate(f),c=moment(),l=moment(h).diff(c,"minutes");l<5&&(o=!0)}if(f===undefined||o)return new Promise(function(n){r.anonymous().then(function(){n(e.TOKEN_FACTORY_SUCCESS)})})}return f===undefined?new Promise(function(n){r.refreshToken(s).then(function(){n(e.TOKEN_FACTORY_SUCCESS)}).catch(function(t){t.status===401&&r.anonymous().then(function(){n(e.TOKEN_FACTORY_SUCCESS)})})}):t(function(){var n=i.decodeJwtToken(f),t={userid:n.nameid,username:n.unique_name,roles:n.role,firstname:n.FirstName,lastname:n.LastName,image:n.ProfilePicture,urlLink:n.UrlLink};u.dispatch(t)}).then(function(){return new Promise(function(n){n(e.TOKEN_FACTORY_SUCCESS)})})}var e=this;this._jwtTokenKey=f.jwtTokenKey;this._refreshTokenKey=f.refreshTokenKey;this.TOKEN_FACTORY_SUCCESS="TOKEN_FACTORY_SUCCESS";this.TOKEN_FACTORY_ERROR="TOKEN_FACTORY_ERROR";this.initTokenFactory=o;this.refreshIfSoonToExpire=function(){return new Promise(function(t){var f=n.get(e._jwtTokenKey),u=n.get(e._refreshTokenKey);if(!f&&u)return r.refreshToken(u).then(function(n){t(n)});if(u){var o=i.getTokenExpirationDate(f),s=moment(),h=moment(o).diff(s,"minutes");return r.refreshToken(u).then(function(n){t(n)})}r.anonymous().then(function(){t(e.TOKEN_FACTORY_SUCCESS)})})}}]);angular.module("tasteatlas").service("UserLocationFactory",["GlobalStatusService","MeService","$cookies",function(n,t,i){function u(){i.remove(r.userLocationCookieName)}function f(){var u=i.get(r.userLocationCookieName);return u?(n.setUserLocation(u),new Promise(function(n){n(u)})):t.getUserLocation().then(function(t){u=t.data;var f=new Date,e=new Date(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours()+1);return i.put(r.userLocationCookieName,u,{expires:e}),n.setUserLocation(u),new Promise(function(n){n(u)})})}var r=this;r.initUserLocationFactory=f;r.clearCountryCookie=u;r.userLocationCookieName="usr_cntry"}]);angular.module("tasteatlas").constant("Tokens",{jwtTokenKey:"ta_ath_tk",refreshTokenKey:"ta_ath_rf"});angular.module("tasteatlas").service("UserSubjectService",[function(){var n=this;this._observers=[];this._state={userid:"",username:"",roles:[],firstname:"",lastname:"",image:"",urlLink:""};this.subscribe=function(t){n._observers.push(t)};this.unsubscribe=function(t){n._observers=n._observers.filter(function(n){return n!==t})};this.dispatch=function(t){n._state=t;for(var i=0;i<n._observers.length;i++)n._observers[i](t)};this.getUserId=function(){return n._state.userid};this.getUser=function(){return n._state};this.isInAnonymousRole=function(){return n._state.userid==="0"?!0:!1}}]);angular.module("tasteatlas").component("tokenRefresherIframe",{bindings:{},templateUrl:"/content/scripts/app/shared/security/tokenrefresheriframe/tokenrefresheriframe.html",controller:"token-refresher-iframe-controller"}).controller("token-refresher-iframe-controller",["$cookies","$interval","AccountService","Tokens",function(n,t,i,r){function f(){var e=n.get(r.jwtTokenKey),f=n.get(r.refreshTokenKey);e===undefined&&(f!==undefined?i.refreshToken(f).then(function(){console.log("token refreshed")}).catch(function(){t.cancel(u);alert("Error while refreshing session");window.parent.location.reload()}):(t.cancel(u),alert("Session expired"),window.parent.location.reload()))}var u;this.$onInit=function(){f();u=t(f,5e3)}}]);angular.module("tasteatlas").service("UserCacheService",["$q","$rootScope","$filter","ProfileService","UserSubjectService","$timeout",function(n,t,i,r,u,f){function o(n,t){if(!e.myLists||!e.myLists.UserWannaTries||e.myLists.UserWannaTries[n].length===0)return null;var i=e.myLists.UserWannaTries[n].find(function(n){return n.Id===t});return i?i:null}function l(n,t){var i=e.myLists.UserWannaTries[n].indexOf(t);i>-1&&e.myLists.UserWannaTries[n].splice(i,1)}function s(n,t){if(!e.myLists||!e.myLists.UserFavoriteFood||e.myLists.UserFavoriteFood[n].length===0)return null;var i=e.myLists.UserFavoriteFood[n].find(function(n){return n.Id===t});return i?i:null}function h(n){return e.myLists.UserFavoriteFood[n]}function c(){f(function(){t.userCacheServiceInitialized=!0})}var e=this;this.commentIds={DishCommentList:[],EventCommentList:[],IngredientCommentList:[],DishRestaurantCommentList:[],RecipeVariationCommentList:[],ProductCommentList:[],ProductMakerCommentList:[]};this.myLists={UserComments:{DishCommentList:[],EventCommentList:[],IngredientCommentList:[],DishRestaurantCommentList:[],RecipeVariationCommentList:[],ProductCommentList:[],ProductMakerCommentList:[]},UserFavoriteFood:{FavoriteDishList:[],FavoriteIngredientList:[],FavoriteRecipeVariationList:[],FavoriteProductList:[],FavoriteProductMakerList:[]},UserWannaTries:{WannaTryDishList:[],WannaTryIngredientList:[],WannaTryRecipeVariationList:[],WannaVisitRestaurantList:[],WannaTryProductList:[],WannaTryProductMakerList:[]}};this.USER_CACHE_SUCCESS="USER_CACHE_SUCCESS";this.USER_CACHE_FAIL="USER_CACHE_FAIL";this.initUserCacheService=function(){var t=u.getUserId(),n;if(!t||t==="0")return c(),e.USER_CACHE_FAIL;if(n=e.getItemWithExpiration("myLists"),n)e.myLists=n,e.commentIds=e.myLists.UserComments,c();else return r.GetMyLists().then(function(n){return e.myLists=n.data,e.commentIds=e.myLists.UserComments,e.setItemWithExpiration("myLists",e.myLists,18e4),c(),e.USER_CACHE_SUCCESS}).catch(function(){return c(),e.USER_CACHE_FAIL})};this.refreshMyLists=function(){return r.GetMyLists().then(function(n){e.myLists=n.data;e.commentIds=e.myLists.UserComments;e.setItemWithExpiration("myLists",e.myLists,18e4)}).catch(function(n){console.log(n)})};this.setItemWithExpiration=function(n,t,i){var r=new Date,u={value:t,expiration:r.getTime()+i};localStorage.setItem(n,JSON.stringify(u))};this.getItemWithExpiration=function(n){var i=localStorage.getItem(n),t,r;return i?(t=JSON.parse(i),r=new Date,r.getTime()>t.expiration)?(localStorage.removeItem(n),null):t.value:null};this.clearStorageByKey=function(n){localStorage.removeItem(n)};this.getIngredientCommentById=function(n){if(!e.commentIds||e.commentIds.IngredientCommentList.length===0)return null;return e.commentIds.IngredientCommentList.find(function(t){return t.Id===n})};this.getDishCommentById=function(n){if(!e.commentIds||e.commentIds.DishCommentList.length===0)return null;return e.commentIds.DishCommentList.find(function(t){return t.Id===n})};this.getEventCommentById=function(n){if(!e.commentIds||e.commentIds.EventCommentList.length===0)return null;return e.commentIds.EventCommentList.find(function(t){return t.Id===n})};this.getRecipeVariationCommentById=function(n){if(!e.commentIds||e.commentIds.RecipeVariationCommentList.length===0)return null;var t=e.commentIds.RecipeVariationCommentList.find(function(t){return t.Id===n});return t?t:null};this.getProductCommentById=function(n){if(!e.commentIds||e.commentIds.ProductCommentList.length===0)return null;var t=e.commentIds.ProductCommentList.find(function(t){return t.Id===n});return t?t:null};this.getProductMakerCommentById=function(n){if(!e.commentIds||e.commentIds.ProductMakerCommentList.length===0)return null;var t=e.commentIds.ProductMakerCommentList.find(function(t){return t.Id===n});return t?t:null};this.getDishWannaTry=function(n){return o("WannaTryDishList",n)};this.getWannaVisitRestaurant=function(n){return o("WannaVisitRestaurantList",n)};this.getIngredientWannaTry=function(n){return o("WannaTryIngredientList",n)};this.getRecipeWannaTry=function(n){return o("WannaTryRecipeVariationList",n)};this.getProductWannaTry=function(n){return o("WannaTryProductList",n)};this.getProductMakerWannaTry=function(n){return o("WannaTryProductMakerList",n)};this.setDishWannaTry=function(n,t,i){e.myLists.UserWannaTries.WannaTryDishList.push({Id:n,EntityTypeEnum:t,WannaTryEnum:i})};this.setRestaurantWannaVisit=function(n,t,i){e.myLists.UserWannaTries.WannaVisitRestaurantList.push({Id:n,EntityTypeEnum:t,WannaTryEnum:i})};this.setIngredientWannaTry=function(n,t,i){e.myLists.UserWannaTries.WannaTryIngredientList.push({Id:n,EntityTypeEnum:t,WannaTryEnum:i})};this.setRecipeWannaTry=function(n,t,i){e.myLists.UserWannaTries.WannaTryRecipeVariationList.push({Id:n,EntityTypeEnum:t,WannaTryEnum:i})};this.removeDishWannaTry=function(n){l("WannaTryDishList",n)};this.removeRestaurantWannaVisit=function(n){l("WannaVisitRestaurantList",n)};this.removeIngredientWannaTry=function(n){l("WannaTryIngredientList",n)};this.removeRecipeWannaTry=function(n){l("WannaTryRecipeVariationList",n)};this.getFavoriteDish=function(n){return s("FavoriteDishList",n)};this.getFavoriteIngredient=function(n){return s("FavoriteIngredientList",n)};this.getFavoriteRecipe=function(n){return s("FavoriteRecipeVariationList",n)};this.getFavoriteProduct=function(n){return s("FavoriteProductList",n)};this.getFavoriteProductMaker=function(n){return s("FavoriteProductMakerList",n)};this.getFavoriteDishes=function(){return h("FavoriteDishList")};this.getFavoriteIngredients=function(){return h("FavoriteIngredientList")};this.getFavoriteRecipes=function(){return h("FavoriteRecipeVariationList")};this.getFavoriteProduct=function(){return h("FavoriteProductList")};this.getFavoriteProductMaker=function(){return h("FavoriteProductMakerList")};this.getFavoriteEvent=function(n){if(!e.myLists||!e.myLists.UserComments.EventCommentList||e.myLists.UserComments.EventCommentList.length===0)return null;return e.myLists.UserComments.EventCommentList.find(function(t){return t.Id===n})};this.getRestaurantDishCommentById=function(n,t){if(!e.myLists||!e.myLists.UserComments.DishRestaurantCommentList||e.myLists.UserComments.DishRestaurantCommentList.length===0)return null;return e.myLists.UserComments.DishRestaurantCommentList.find(function(i){return i.DishId===n&&i.RestaurantId===t})};this.getAllRestaurantComments=function(n){return!e.myLists||!e.myLists.UserComments.DishRestaurantCommentList?[]:e.myLists.UserComments.DishRestaurantCommentList.length===0?[]:i("filter")(e.myLists.UserComments.DishRestaurantCommentList,function(t){return t.RestaurantId===n})};this.isRestaurantCommented=function(n){if(!e.myLists||!e.myLists.UserComments.DishRestaurantCommentList||e.myLists.UserComments.DishRestaurantCommentList.length===0)return null;var t=e.myLists.UserComments.DishRestaurantCommentList.find(function(t){return t.RestaurantId===n});return!!t}}]);angular.module("tasteatlas").service("AccountService",["$http","UserSubjectService","DecodeTokenHelper","$q",function(n,t,i,r){function f(n){if(n&&n.status===200){var u=n.data.access_token,r=i.decodeJwtToken(u),f={userid:r.nameid,username:r.unique_name,roles:r.role,firstname:r.FirstName,lastname:r.LastName,image:r.ProfilePicture,urlLink:r.UrlLink};return t.dispatch(f),u}}this.url="account";this.login=function(t){return n({method:"POST",url:this.url+"/LoginAjax",data:t}).then(function(n){return n.data})};this.signOut=function(){return n({method:"POST",url:this.url+"/SignOut",isAnonymous:!0})};this.register=function(t){return n({method:"POST",url:this.url+"/RegisterAjax",data:t}).then(function(n){return n.data})};var u=null;this.anonymous=function(){if(u)return u.promise;u=r.defer();var t=n({method:"POST",url:this.url+"/Anonymous",isAnonymous:!0});return t.then(function(n){u.resolve(f(n));u=null},function(n){u.reject(n);u=null}),u.promise};this.refreshToken=function(t){var i=n({method:"POST",url:this.url+"/RefreshToken",isAnonymous:!0,data:{refresh_token:t}});return i.then(f)};this.sendResetEmail=function(t){return n({method:"POST",url:this.url+"/SendResetPasswordToken",data:t,isAnonymous:!0})};this.resetPassword=function(t){return n({method:"POST",url:this.url+"/ResetPassword",data:t,isAnonymous:!0})};this.submitMissingFacebookEmail=function(t){return n({method:"POST",url:this.url+"/SubmitMissingFacebookEmail",data:t,isAnonymous:!0})}}]);angular.module("tasteatlas").service("ProfileService",["$http",function(n){var t=this;this.url="api/v2/me/";this.urlV3Me="api/v3/me/";this.urlV3Profile="/api/v3/profile/";this.GetShareImageUrl=function(t,i,r){return n({method:"GET",url:this.urlV3Profile+"getshareimageurl?userUrllink="+t+"&userId="+i+"&userListType="+r})};this.GetRandomQuid=function(){return n({method:"GET",url:this.urlV3Profile+"getrandomguid"})};this.GetProfileListByType=function(t,i,r,u){return n({method:"GET",url:this.urlV3Profile+"getlist?userId="+t+"&userListType="+i+"&skip="+r+"&take="+u})};this.AddListItem=function(t,i,r,u,f){var e={userListType:t,userId:i,entityId:r,entityTypeEnum:u,entityId2:f};return n({method:"POST",url:this.urlV3Me+"listmanipulation/add",data:e})};this.AddDishesInRestaurants=function(t){return n({method:"POST",url:this.urlV3Me+"listmanipulation/dishesinrestaurants/add",data:t})};this.UpdateItemsPosition=function(t){return n({method:"POST",url:this.urlV3Me+"listmanipulation/update",data:t})};this.DeleteListItem=function(t,i,r){return n({method:"DELETE",url:this.urlV3Me+"listmanipulation?userListType="+t+"&userId="+i+"&id="+r})};this.GetProfileDetails=function(t){return n({method:"GET",url:this.urlV3Profile+"details?userId="+t})};this.UpdateProfileDetails=function(t,i){return n({method:"POST",url:this.url+t+"/update",data:i})};this.UploadProfileImage=function(t){var i=new FormData;return i.append("file",t),n({method:"POST",url:this.url+"uploadprofileimage",data:i,headers:{"Content-Type":undefined}})};this.GetProfileMapResults=function(t){return n({method:"GET",url:this.url+t+"/map"})};this.GetUserDishComments=function(t,i){return n({method:"GET",url:this.url+t+"/comments/dish",params:i})};this.GetUserIngredientComments=function(t,i){return n({method:"GET",url:this.url+t+"/comments/ingredient",params:i})};this.GetUserDishRestaurantComments=function(t,i){return n({method:"GET",url:this.url+t+"/comments/dishrestaurant",params:i})};this.AddFavoriteFood=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/food/add",data:i})};this.UpdateFavoriteFood=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/food/update",data:i})};this.DeleteFavoriteFood=function(t,i){return n({method:"DELETE",url:this.url+t+"/favorite/food/delete/"+i})};this.AddFavoriteCouisine=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/couisine/add",data:i})};this.UpdateFavoriteCouisine=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/couisine/update",data:i})};this.DeleteFavoriteCouisine=function(t,i){return n({method:"DELETE",url:this.url+t+"/favorite/couisine/delete/"+i})};this.AddFavoriteDishRestaurant=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/dishrestaurant/add",data:i})};this.UpdateFavoriteDishRestaurants=function(t,i){return n({method:"POST",url:this.url+t+"/favorite/dishrestaurant/update",data:i})};this.DeleteFavoriteDishRestaurant=function(t,i){return n({method:"DELETE",url:this.url+t+"/favorite/dishrestaurant/delete/"+i})};this.GetMyLists=function(){return n({method:"GET",url:this.url+"/mylists"})};this.AddWannaTry=function(t,i){return n({method:"GET",url:this.url+"/addwannatry/?entityId="+t+"&entityTypeEnum="+i})};this.RemoveWannaTry=function(t,i){return n({method:"GET",url:this.url+"/removewannatry/?entityId="+t+"&entityTypeEnum="+i})};this.AddOrUpdateFavorite=function(t,i,r){return n({method:"GET",url:this.url+"/addorupdatefavorite/?entityId="+t+"&entityTypeEnum="+i+"&order="+r})};this.RemoveFavorite=function(t,i){return n({method:"GET",url:this.url+"/removefavorite/?entityId="+t+"&entityTypeEnum="+i})};this.GetTriedFood=function(n,t,i,r){return i===1?this.GetTriedDishes(n,t):this.GetTriedIngredients(n,t,r)};this.GetTriedDishes=function(t,i){return n({method:"GET",url:this.url+"/trieddishes",params:{regionMaterializedPath:t,groupMaterializedPath:i}})};this.GetTriedIngredients=function(t,i,r){return n({method:"GET",url:this.url+"/triedingredients",params:{regionMaterializedPath:t,groupMaterializedPath:i,isBeverage:r}})};this.getTriedFoodById=function(n,t){return n===1?this.getTriedDishesById({dishId:t}):n===21?this.getTriedProductsById({productid:t}):this.getTriedIngredientsById({ingredientId:t})};this.getTriedDishesById=function(t){return n({method:"GET",url:this.url+"/trieddishes",params:t})};this.getTriedIngredientsById=function(t){return n({method:"GET",url:this.url+"/triedingredients",params:t})};this.getTriedProductsById=function(t){return n({method:"GET",url:this.url+"/triedproducts",params:t})};this.getTriedProductMakersById=function(t){return n({method:"GET",url:this.url+"/triedproductmakers",params:t})}}]);angular.module("tasteatlas").service("DishService",["$http",function(n){this.url="api/v2/dishes/";this.urlV3="api/v3/dish/";this.autocompleteUrlV3="api/v3/autocomplete/";this.GetUserListAutocomplete=function(t,i){return n({method:"GET",url:this.autocompleteUrlV3+"getuserlistautocomplete?query="+t+"&userListAutocompleteType="+i})};this.searchItemsByType=function(t,i){return n({method:"GET",url:this.autocompleteUrlV3+"getautocompletebytype?query="+t+"&userListType="+i})};this.getRandomDish=function(){return n({method:"GET",url:this.url+"random"})};this.getDishReviews=function(t,i){return n({method:"GET",url:this.url+t+"/review",params:i})};this.GetDishTypes=function(t,i){return n({method:"GET",url:this.url+t+"/types?order="+i})};this.searchDishes=function(t){return n({method:"GET",url:this.url+"search",params:{query:t}})};this.searchFood=function(t){return n({method:"GET",url:this.url+"search/food",params:{query:t}})};this.exploreDishes=function(t,i){return n({method:"GET",url:this.url+t+"/explore",params:i})};this.getUserDishComment=function(t){return n({method:"GET",url:this.url+t+"/usercomment"})};this.filterDishRestaurants=function(t,i){return n({method:"GET",url:this.url+t+"/restaurants",params:i})};this.getNearbyDishRestaurants=function(t,i){return n({method:"GET",url:this.url+t+"/nearbyrestaurants",params:i})};this.GetDishPairs=function(t){return n({method:"GET",url:this.url+t+"/pairs"})};this.GetDishPartOf=function(t,i){return n({method:"GET",url:this.url+t+"/partof",params:i})};this.GetDishEvents=function(t,i){return n({method:"GET",url:this.url+t+"/events",params:i})};this.getDishRating=function(t){return n({method:"GET",url:this.url+t+"/rating"})};this.addToFavorites=function(t){return n({method:"POST",url:this.url+t+"/addtofavorites"})};this.getSimilarDishes=function(t){return n({method:"GET",url:this.url+t+"/similardishes"})};this.getSimilarDishesInRegion=function(t){return n({method:"GET",url:this.url+"/similardishesinregion",params:t})};this.getDishFoodIngredients=function(t){return n({method:"GET",url:this.url+t+"/foodingredients"})};this.getSiblings=function(t,i){return n({method:"GET",url:this.url+t+"/siblings",params:i})};this.getMainRecipeVariationSimpleDetails=function(t){return n({method:"GET",url:this.url+t+"/mainvariationbasic",cache:!0})};this.getRecipeVariations=function(t){return n({method:"GET",url:this.url+t+"/recipevariations",cache:!0})};this.getDishOverview=function(t){return n({method:"GET",url:this.urlV3+"/"+t+"/overview"})};this.getMainRecipeVariationSimpleDetails=function(t){return n({method:"GET",url:this.url+t+"/mainvariationbasic",cache:!0})};this.getRecipeVariations=function(t){return n({method:"GET",url:this.url+t+"/recipevariations",cache:!0})}}]);angular.module("tasteatlas").service("IngredientService",["$http",function(n){this.url="api/v2/ingredients/";this.urlV3="api/v3/ingredient/";this.getIngredientReviews=function(t,i){return n({method:"GET",url:this.url+t+"/review",params:i})};this.filterIngredientShops=function(t,i){return n({method:"GET",url:this.url+t+"/shops",params:i,cache:!0})};this.getIngredientShopLocations=function(t){return n({method:"GET",url:this.url+t+"/shoplocations"})};this.exploreIngredients=function(t,i){return n({method:"GET",url:this.url+t+"/explore",params:i})};this.getUserIngredientComment=function(t){return n({method:"GET",url:this.url+t+"/usercomment"})};this.GetIngredientTypes=function(t,i){return n({method:"GET",url:this.url+t+"/types?order="+i})};this.GetIngredientPairs=function(t){return n({method:"GET",url:this.url+t+"/pairs"})};this.GetIngredientPartOf=function(t,i){return n({method:"GET",url:this.url+t+"/partof",params:i})};this.GetIngredientEvents=function(t,i){return n({method:"GET",url:this.url+t+"/events",params:i})};this.getIngredientRating=function(t){return n({method:"GET",url:this.url+t+"/rating"})};this.addToFavorites=function(t){return n({method:"POST",url:this.url+t+"/addtofavorites"})};this.getSimilarIngredients=function(t){return n({method:"GET",url:this.url+t+"/similaringredients"})};this.getSimilarIngredientsInRegion=function(t){return n({method:"GET",url:this.url+"/similaringredientsinregion",params:t})};this.getIngredientFoodIngredients=function(t){return n({method:"GET",url:this.url+t+"/foodingredients"})};this.getSiblings=function(t,i){return n({method:"GET",url:this.url+t+"/siblings",params:i})};this.getMainRecipeVariationSimpleDetails=function(t){return n({method:"GET",url:this.url+t+"/mainvariationbasic",cache:!0})};this.getRecipeVariations=function(t){return n({method:"GET",url:this.url+t+"/recipevariations",cache:!0})};this.getIngredientOverview=function(t){return n({method:"GET",url:this.urlV3+"/"+t+"/overview"})};this.getMainRecipeVariationSimpleDetails=function(t){return n({method:"GET",url:this.url+t+"/mainvariationbasic",cache:!0})};this.getRecipeVariations=function(t){return n({method:"GET",url:this.url+t+"/recipevariations",cache:!0})}}]);angular.module("tasteatlas").service("CommentService",["$q","$http","UserCacheService",function(n,t,i){function r(n,i){return t({method:"POST",url:this.url+"/"+n+"/vote/"+i})}function u(r,u){var f=t({method:"POST",url:this.url+"/"+r,data:u});return n(function(n,t){f.then(function(t){return i.refreshMyLists().then(function(){n(t)})}).catch(function(n){t(n)})})}function f(r,u){var f=t({method:"POST",url:this.url+"/updaterating/"+r,data:u});return n(function(n,t){f.then(function(t){return i.refreshMyLists().then(function(){n(t)})}).catch(function(n){t(n)})})}function e(r){var u=t({method:"DELETE",url:this.url+"/"+r});return n(function(n,t){u.then(function(t){return i.refreshMyLists().then(function(){n(t)})}).catch(function(n){t(n)})})}function o(r){var u=t({method:"POST",url:this.url,data:r});return n(function(n,t){u.then(function(t){return i.refreshMyLists().then(function(){n(t)})}).catch(function(n){t(n)})})}function s(n){return t({method:"post",url:this.url+"/suggestion",data:n})}function h(n){return t({method:"post",url:this.url+"/information",data:n})}function c(n){return t({method:"post",url:this.url+"/report",data:n})}function l(r){var u=t({method:"GET",url:this.url,params:r});return n(function(n,t){u.then(function(t){return i.refreshMyLists().then(function(){n(t)})}).catch(function(n){t(n)})})}function a(n){return t({method:"GET",url:this.articleUrl+"/"+n+"/comments?page=0&pageSize=5"})}function v(n,i){return t({method:"GET",url:this.articleUrl+"/"+n+"/comments?page=0&pageSize="+i})}function y(n){return t({method:"POST",url:this.url+"/exists",data:n})}function p(n){var u,f,i;n=n||{};var r=n.files||[],e=n.xhruploadprogress,o=n.xhrprogress,s=undefined;for(o&&(s={progress:o}),u=undefined,e&&(u={progress:e}),f=new FormData,i=0;i<r.length;i++){var h="file["+i+"]",c=r[i],l=r[i].name||h;f.append(h,c,l)}return t({method:"POST",url:"/api/v2/comments/images/upload",data:f,transformRequest:angular.identity,headers:{"Content-Type":undefined},eventHandlers:s,uploadEventHandlers:u}).then(function(n){return n.data})}this.url="api/v2/comments";this.topListUrl="api/v2/toplistarticles";this.articleUrl="api/v3/article";this.productUrl="api/v3/product";this.productMakerUrl="api/v3/productmaker";this.commentsPost=o;this.getArticleComments=a;this.loadMoreArticleComments=v;this.suggestionPost=s;this.informationPost=h;this.errorPost=c;this.commentExists=y;this.getComment=l;this.imagesUpload=p;this.updateContent=u;this.updateRating=f;this.deleteComment=e;this.vote=r;this.getTopListArticleComments=function(n){return t({method:"GET",url:this.topListUrl+"/"+n+"/comments?page=0&pageSize=5"})};this.loadMoreTopListArticleComments=function(n,i){return t({method:"GET",url:this.topListUrl+"/"+n+"/reviews?page=0&pageSize="+i})};this.getProductCriticComments=function(n,i){return t({method:"GET",url:this.productUrl+"/"+n+"/reviews?page=0&pageSize="+i})};this.loadMoreProductCriticComments=function(n,i){return t({method:"GET",url:this.productUrl+"/"+n+"/reviews?page=0&pageSize="+i})};this.getProductComments=function(n,i){return t({method:"GET",url:this.productUrl+"/"+n+"/comments?page=0&pageSize="+i})};this.loadMoreProductComments=function(n,i){return t({method:"GET",url:this.productUrl+"/"+n+"/comments?page=0&pageSize="+i})};this.userProductComment=function(n){return t({method:"GET",url:this.productUrl+"/"+n+"/usercomment"})};this.userProductMakerComments=function(n){return t({method:"GET",url:this.productMakerUrl+"/"+n+"/usercomment"})};this.getProductMakerComments=function(n,i){return t({method:"GET",url:this.productMakerUrl+"/"+n+"/comments?page=0&pageSize="+i})};this.loadMoreProductMakerComments=function(n,i){return t({method:"GET",url:this.productMakerUrl+"/"+n+"/comments?page=0&pageSize="+i})};this.getProductMakerCriticComments=function(n,i){return t({method:"GET",url:this.productMakerUrl+"/"+n+"/reviews?page=0&pageSize="+i})};this.loadMoreProductMakerCriticComments=function(n,i){return t({method:"GET",url:this.productMakerUrl+"/"+n+"/reviews?page=0&pageSize="+i})}}]);angular.module("tasteatlas").value("TopListArticleListRanges",{0:"",1:"Top10",2:"Top50",3:"Top100"});angular.module("tasteatlas").service("TopListArticleSharedService",["RegionLevels",function(n){function f(n){var t=n.split("Top");return n.indexOf("Top")>-1&&t[1]?"Top "+t[1]:n}var t=this,u={TopListArticleType:null},i=[35,37],r;i.nationalDishesInCity=35;i.localFoodInCity=37;this.typeOfArticleEnum=38;this.varietyArticleEnum=39;this.recipeArticleEnums=[40,41,42,43,44,45,46,47,48,49,50,51];this.ingredientArticleEnums=[52,53,54,55,56,57,58,59,60];r=[];r.push(this.typeOfArticleEnum);r.push(this.varietyArticleEnum);r=r.concat(this.recipeArticleEnums);r=r.concat(this.ingredientArticleEnums);this.setData=function(n,t){u[n]=t};this.getCityArticleEnums=function(){return i};this.topListArticleTitlePrefixes={0:"",1:"Traditional ",2:"Local "};this.getTopListType=function(n){return[1,2,3,4,5,6,19,22,23,24,25,39,40,43,44,49].includes(n)?"best rated":[7,8,9,10,11,12,26,27,28,29,38,41,45,46,50,55,56,57].includes(n)?"most popular":[13,14,15,16,17,18,21,30,31,32,33,42,47,48,51].includes(n)?"worst rated":""};this.getTopListTypeForBadge=function(n){var r=t.getTopListType(n);return!r&&i.includes(n)&&(r="best"),r};this.getTopListFoodType=function(n){return[3,4,9,10,15,16,37].includes(n)?"food":[1,2,7,8,13,14,24,25,28,29,32,33,35].includes(n)?"dish":""};this.getSpecialArticleTypes=function(n,t){return[19,20,21].includes(n)?t.beverage:[22,23,26,27,30,31].includes(n)?t.product:[24,25,28,29,32,33].includes(n)?t.dish:""};this.getMapLink=function(){return this.details.CurrentArticle.Region&&this.group.UrlLink?this.details.CurrentArticle.Region.UrlLink+"/"+this.group.UrlLink:this.group.UrlLink?this.group.UrlLink:this.details.CurrentArticle.Region.UrlLink};this.getViewMapEntity=function(){var t=this.details.CurrentArticle.Region,i=t&&(t.RegionAdjective||t.CountryAdjective);return t&&i&&this.group.PluralName?i+" "+this.group.PluralName:t&&t.RegionName&&this.group.PluralName?this.group.PluralName+" in "+t.RegionName:t&&t.CountryName&&t.RegionLevel>n.Undefined&&t.RegionLevel<=n.CapitalCity?t.CountryName:t?t.RegionName:"World "+this.group.PluralName};this.createViewMapText=function(){return"View "+t.getViewMapEntity.apply(this)+" "+t.getMapOrListText.apply(this)};this.getMapOrListText=function(){var n="List and Map";return this.details.CurrentArticle.Region&&!this.group.UrlLink&&(n="Map"),n};this.createTitlePartsV2=function(n){var t=n.Title.split("||");return{top:t[0],middle:t[1],bottom:t[2]}};this.findTopListCount=function(n){var i=this.TopListArticleListRanges[n.TopListArticleListRange]==="Top10"&&n.CurrentItemCount&&n.CurrentItemCount<10,r=[t.typeOfArticleEnum,t.varietyArticleEnum].includes(n.TopListArticleType);return i||r?"Top "+n.CurrentItemCount:f(this.TopListArticleListRanges[n.TopListArticleListRange])};this.createNextTitleParts=function(n){var i=t.createTitlePartsV2(n);return{top:t.getListRange.apply(this,[n.TopListArticleListRange]),middle:i.middle+" "+(i.bottom||""),bottom:""}};this.createRandomArticleTitlePartsV2=function(n){var t=n.Title.split("||");return{top:t[0],bottom:t[1]+" "+(t[2]||"")}};this.getFoodType=function(n,r){var u=t.getSpecialArticleTypes(r.TopListArticleType,{beverage:"beverages",dish:"dishes",product:"food products"}),f=t.getTitlePrefix(r),e,o,s;return r.TopListArticleType===i.nationalDishesInCity?(e={specialType:"food products & drinks",normalType:"dishes & drinks",drinks:"drinks",dishes:"dishes"},t.getFoodTypeForRegionLevel.apply(this,[r,n,f,u,e])):r.TopListArticleType===i.localFoodInCity?(o={specialType:"foods & drinks",normalType:"foods & drinks",drinks:"drinks",dishes:"foods"},t.getFoodTypeForRegionLevel.apply(this,[r,n,f,u,o])):(s={specialType:"food products & beverages",normalType:"foods & beverages",drinks:"drinks",dishes:"foods"},t.getFoodTypeForRegionLevel.apply(this,[r,n,f,u,s]))};this.getFoodTypeForRegionLevel=function(n,t,i,r,u){return t.PluralName?i+t.PluralName.toLowerCase():n.HasBeverage&&n.HasFood?i+(r?u.specialType:u.normalType):n.HasBeverage&&!n.HasFood?i+u.drinks:r?i+r:i+u.dishes};this.getTitlePrefix=function(n){var r="";return(n.Region&&!n.Region.RegionAdjective||i.includes(n.TopListArticleType))&&(r=t.topListArticleTitlePrefixes[n.TopListArticleTitlePrefix]),n.SourceRegionAdjective&&(r=n.SourceRegionAdjective+" "),r};this.getListRange=function(n){return this.TopListArticleListRanges[n]==="Top10"?"(10-1)":this.TopListArticleListRanges[n]==="Top50"?"(50-11)":this.TopListArticleListRanges[n]==="Top100"?"(100-51)":""};this.headerTitleVisible=function(){var i=!!this.details.CurrentArticle.Region,r=t.getTopListType(this.details.CurrentArticle.TopListArticleType)==="worst rated";return!i||r?!1:this.details.CurrentArticle.Region.RegionLevel>n.Undefined?!0:!1};this.getWhereToEatTitle=function(t,r){var f=r&&r.RegionLevel===n.Country,e=i.includes(u.TopListArticleType);return e||f?"Where to eat the best "+t+" in "+r.RegionName:"Where to eat the best "+t+" in the world"};this.getPreTitle=function(){var n="eat",t=this.details.CurrentArticle.HasBeverage,r=this.details.CurrentArticle.HasFood;return(t&&!r&&(n="drink"),t&&r&&(n="eat & drink"),i.nationalDishesInCity===u.TopListArticleType)?"What to "+n+" in "+this.details.CurrentArticle.Region.RegionName+"? Where to "+n+" in "+this.details.CurrentArticle.Region.RegionName+"?":"What to "+n+" in "+(this.details.CurrentArticle.Region.RegionPrefix||"")+" "+this.details.CurrentArticle.Region.RegionName+"?"};this.getSummaryText=function(){return this.details.CurrentArticle.TopListArticleType===i.nationalDishesInCity?"The best traditional "+(this.details.CurrentArticle.SourceRegionAdjective||"")+" dishes in "+this.details.CurrentArticle.Region.RegionName+" and the best authentic restaurants that make them, recommended by industry professionals.":""};this.isToplistArticleV2=function(n){return r.includes(n)};this.findMapTitle=function(){var t=this.details.CurrentArticle.DishGroup||this.details.CurrentArticle.IngredientGroup||{},i,n;return this.details.CurrentArticle.Region?(i=this.details.CurrentArticle.Region.RegionAdjective||this.details.CurrentArticle.Region.CountryAdjective,n=t.PluralName||"Food",this.details.CurrentArticle.IngredientGroup&&this.details.CurrentArticle.IngredientGroup.UrlLink==="beverages"&&(n="Beverages"),{bottom:i+" "+n}):{bottom:t.PluralName||""}};this.overrideValidScoreCountBestWorstRated=function(n){var i=t.getTopListType(n.CurrentArticle.TopListArticleType),r=i==="best rated",u=i==="worst rated";(r||u)&&angular.forEach(n.Items,function(n){n.ValidScoreCount<5&&(n.ValidScoreCount=5)})};this.getRecipeTime=function(n,t){return n?n+" h "+(t?t+" min":""):t+" min"};this.isMostPopularArticleWorldCountry=function(i,r){var e=t.getTopListType(i),u=!r,f=!1;return u||(f=r.RegionLevel===n.Country),e==="most popular"&&(u||f)};this.getDescriptionChunkNumber=function(n,i){return t.isMostPopularArticleWorldCountry(n,i)?2:1}}]);angular.module("tasteatlas").service("RatingCardService",["TopListArticleSharedService","$filter",function(n){function i(n,t){return"linear-gradient(to right, "+n+" "+t+", #f3f3f3 "+t+");"}function t(n,t){var i=n||"2px";return{"border-top":i+" solid "+t.top,"border-right":i+" solid "+t.right,"border-bottom":i+" solid "+t.bottom,"border-left":i+" solid "+t.left}}function f(t){var i=n.getCityArticleEnums();return t===i.nationalDishesInCity?"local dish":t===i.localFoodInCity?"local food":n.getSpecialArticleTypes(t,{beverage:"beverage",dish:"dish",product:"food product"})}function r(t){var i=n.getTopListFoodType(t.TopListArticleType);return t.GroupName&&(i=t.GroupName),i||(i=f(t.TopListArticleType)),t.RegionAdjective?t.RegionAdjective+" "+i:t.RegionName?i+" in "+t.RegionName:i+" in the world"}function u(t){var i=t.GroupName||t.GroupEntityName;return n.recipeArticleEnums.includes(t.TopListArticleType)&&(i+=" recipe"),n.typeOfArticleEnum===t.TopListArticleType&&(i=" type of "+i),n.varietyArticleEnum===t.TopListArticleType&&(i=" variety of "+i),t.RegionAdjective?t.RegionAdjective+" "+i:t.RegionName?i+" in "+t.RegionName:i}var e=this;this.getBars=function(n){var t=n.LikePercentage+"%",r=n.IndifferentPercentage+"%",u=n.DislikePercentage+"%";return{like:{level:i("#95db94",t),value:t},indifferent:{level:i("#e2e3e2",r),value:r},dontlike:{level:i("#f8533d",u),value:u}}};this.getSummaryCircle=function(n,i){if(n){var r=n.PercentageTried;return r?r<=25?t(i,{top:"#e2e3e2",right:"#f8533d",bottom:"#e2e3e2",left:"#e2e3e2"}):r<=50?t(i,{top:"#e2e3e2",right:"#f8533d",bottom:"#f8533d",left:"#e2e3e2"}):r<=75?t(i,{top:"#e2e3e2",right:"#f8533d",bottom:"#f8533d",left:"#f8533d"}):t(i,{top:"#f8533d",right:"#f8533d",bottom:"#f8533d",left:"#f8533d"}):t(i,{top:"#e2e3e2",right:"#e2e3e2",bottom:"#e2e3e2",left:"#e2e3e2"})}};this.getBadge=function(t){var f=n.getTopListTypeForBadge(t.TopListArticleType),i;return n.isToplistArticleV2(t.TopListArticleType)?{position:"#"+t.TopListItemPlace,text:f+" "+u(t)}:(i={position:"#"+t.TopListItemPlace,text:f+" "},i.text+=r(t),i)};this.getBadgeExpanded=function(t){var i=n.getTopListTypeForBadge(t.TopListArticleType);return n.isToplistArticleV2(t.TopListArticleType)?{position:"#"+t.TopListItemPlace+" "+i,text:u(t)}:{position:"#"+t.TopListItemPlace+" "+i,text:r(t)}};this.getFoodType=function(n,t){return n?"beverages":t===1?"dishes":"food products"};this.getRateItText=function(){var n=this.foodDetails;return n&&n.IsDrink?"Rate it":"Ate it? Rate it"}}]);angular.module("tasteatlas").service("CommentHelper",["$q","$timeout","CommentService","UserSubjectService",function(n,t,i,r){function e(){u.error="";u.isError=!1}function f(t){var f=this,e=t.photos||[],r=e.filter(function(n){return n&&n.file}).map(function(n){return n.file.photo=n,n.file}),u;return r.length?r.length>5?n.reject(CommentHelper.createException(CommentHelper.PhotoNumberExceded)):(u=function(n){return s.call(f,n)},i.imagesUpload({files:r,xhruploadprogress:u}).then(function(n){var i,t,u,f;for(n=n||[],i=[],t=0;t<r.length;t++)u=r[t].photo,f=n[t],u.uploadedUrl=f,i.push(u);return i})):n.resolve([])}function o(n){var t=this.data.rating,r=n||[],u=this.data.content,f=this.data.entityType,e=this.data.entityId,o=this.data.entityId2;return i.commentsPost({entityType:f,entityId:e,entityId2:o,content:u,score:t,photos:r})}function s(n){this.uploadPercentageCompleted=n.loaded/n.total*100}var u=this;this.steps=["Regular","Login","Vote","Voted","Thanks","Restaurant"];this.starClasses=["icon icon--star icon--star-empty","icon icon--star icon--star-half","icon icon--star icon--star-full"];this.starRange=[2,4,6,8,10];this.recalculateRatingForView=function(n){if(n===undefined)return 0;return u.toFixed(n/2,1)};this.triggerFilePicker=function(n){n?angular.element(n).siblings(".ta-file-upload").trigger("click"):angular.element(".ta-file-upload").trigger("click")};this.Unexpected="Unexpected";this.PhotoNumberExceded="PhotoNumberExceded";this.ResetStarInfoEvent="ResetStarInfoEvent";this.createException=function(n){switch(n){case"Unexpected":return{ExceptionInformation:"Unexpected",ExceptionName:"CommentException",ExceptionType:"Unexpected"};case"PhotoNumberExceded":return{ExceptionInformation:"Can't upload more than 5 photos.",ExceptionName:"CommentException",ExceptionType:"PhotoNumberExceded"};default:return{ExceptionInformation:"Unexpected",ExceptionName:"CommentException",ExceptionType:"Unexpected"}}};this.isCommentValid=function(n){return n===undefined?!1:n.content!==""?!0:!1};this.isRateValid=function(n){return n===undefined?!1:n.rating>1?!0:!1};this.determineCommentStage=function(n,t){return n===!1&&t===!0?"rate":n===!0&&t===!1?"comment":n===!0&&t===!0?"rate&comment":(console.log("Could not determine comment type"),null)};this.toFixed=function(n,t){return(+(Math.round(+(n+"e"+t))+"e"+-t)).toFixed(t)};this.onVoteChange=function(n){(e(),n!==undefined)&&(this.data.rating=n,this.isRateValid=u.isRateValid(this.data),this.commentStage=u.determineCommentStage(this.isCommentValid,this.isRateValid))};this.updateComment=function(n){var t=this,r=this.data.photos||[],u=r.filter(function(n){return n.isUploaded!==!0}),e=r.filter(function(n){return n.isUploaded===!0});this.submitting=!0;f({photos:u}).then(function(n){var r=(n||[]).map(function(n){return{url:n.uploadedUrl,isUploaded:!1}}),u=e.concat(r);return i.updateContent(t.userCommentStatus.comment.CommentId,{content:t.data.content,rating:t.data.rating,Photos:u})}).then(n)};this.submit=function(n,t){var r=this,i;(!this.submitting||this.isRateValid)&&(this.submitting=!0,i=this.data.photos||[],f.call(this,{photos:i}).then(function(n){var t=(n||[]).map(function(n){return{url:n.uploadedUrl}});return o.call(r,t)}).then(n).catch(t))};this.closeModal=function(n){n&&(n.preventDefault(),n.stopPropagation());var t=this.current;u.resetDataToDefaults.call(this);t===this.Login?this.current=this.Login:t===this.Vote?this.current=this.Login:t===this.Voted?this.current=this.Voted:t===this.VotedIngredient?this.current=this.VotedIngredient:t===this.Thanks?this.current=this.Voted:t===this.Restaurant&&(this.current=this.Voted);this.onCloseCommentProcess()};this.resetDataToDefaults=function(){this.userCommentStatus.isCommented===!0&&(this.isThanksVisible=!0);this.submitting=!1;this.isValid=!1;this.data.rating="";this.data.content="";this.data.photos=[]};this.exit=function(){this.onCloseCommentProcess()};this.yes=function(){this.current=this.Restaurant};this.onRegularClick=function(){var n=r.isInAnonymousRole();this.current=n?this.Login:this.Vote};this.determineRedirect=function(){this.current=this.mainPageType===this.Dish?this.Voted:this.Thanks}}]);angular.module("tasteatlas").value("constants",{cdnHost:"https://cdn.tasteatlas.com"});angular.module("tasteatlas").directive("clickOutside",["$document","$timeout",function(n,t){return{link:function(i,r,u){var f=function(n){var t=u.exclude&&n.target.className.includes(u.exclude),f=$(r).has(n.target).length>0,e=r[0]===n.target,o=f||e;o||t||i.$apply(u.clickOutside)};t(function(){n.bind("mousedown",f)});r.on("$destroy",function(){n.unbind("mousedown",f)})}}}])