From fdcd765ccb60774b5100fe9c31b695897850459d Mon Sep 17 00:00:00 2001 From: Diana Barsan Date: Thu, 12 Dec 2024 14:30:29 +0200 Subject: [PATCH] revert unwanted change --- config/default/app_settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/default/app_settings.json b/config/default/app_settings.json index 7adb15e4c0c..07d76c5b722 100644 --- a/config/default/app_settings.json +++ b/config/default/app_settings.json @@ -359,10 +359,9 @@ "person": true } ], - "contact_summary": "var ContactSummary = {}; !function(e,t){if('object'==typeof exports&&'object'==typeof module)module.exports=t();else if('function'==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)('object'==typeof exports?exports:e)[r]=n[r]}}(ContactSummary,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p='',n(n.s=1)}([function(e,t,n){(function(e){e.exports=function(){'use strict';var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||'[object Array]'===Object.prototype.toString.call(e)}function s(e){return null!=e&&'[object Object]'===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return'number'==typeof e||'[object Number]'===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||'[object Date]'===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?'+':'':'-')+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,b=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var P=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,C={},W={};function F(e,t,n,r){var i=r;'string'==typeof r&&(i=function(){return this[r]()}),e&&(W[e]=i),t&&(W[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),C[t]=C[t]||function(e){var t,n,r,i=e.match(P);for(t=0,n=i.length;t=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var A={D:'date',dates:'date',date:'date',d:'day',days:'day',day:'day',e:'weekday',weekdays:'weekday',weekday:'weekday',E:'isoWeekday',isoweekdays:'isoWeekday',isoweekday:'isoWeekday',DDD:'dayOfYear',dayofyears:'dayOfYear',dayofyear:'dayOfYear',h:'hour',hours:'hour',hour:'hour',ms:'millisecond',milliseconds:'millisecond',millisecond:'millisecond',m:'minute',minutes:'minute',minute:'minute',M:'month',months:'month',month:'month',Q:'quarter',quarters:'quarter',quarter:'quarter',s:'second',seconds:'second',second:'second',gg:'weekYear',weekyears:'weekYear',weekyear:'weekYear',GG:'isoWeekYear',isoweekyears:'isoWeekYear',isoweekyear:'isoWeekYear',w:'week',weeks:'week',week:'week',W:'isoWeek',isoweeks:'isoWeek',isoweek:'isoWeek',y:'year',years:'year',year:'year'};function E(e){return'string'==typeof e?A[e]||A[e.toLowerCase()]:void 0}function L(e){var t,n,r={};for(n in e)a(e,n)&&(t=E(n))&&(r[t]=e[n]);return r}var V,I={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},j=/\\d/,G=/\\d\\d/,Z=/\\d{3}/,z=/\\d{4}/,q=/[+-]?\\d{6}/,$=/\\d\\d?/,B=/\\d\\d\\d\\d?/,J=/\\d\\d\\d\\d\\d\\d?/,Q=/\\d{1,3}/,X=/\\d{1,4}/,K=/[+-]?\\d{1,6}/,ee=/\\d+/,te=/[+-]?\\d+/,ne=/Z|[+-]\\d\\d:?\\d\\d/gi,re=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ie=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,se=/^[1-9]\\d?/,ae=/^([1-9]\\d|\\d)/;function oe(e,t,n){V[e]=O(t)?t:function(e,r){return e&&n?n:t}}function le(e,t){return a(V,e)?V[e](t._strict,t._locale):new RegExp(ue(e.replace('\\\\','').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function ue(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,'\\\\$&')}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}V={};var he={};function fe(e,t){var n,r,i=t;for('string'==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=de(e)}),r=e.length,n=0;n68?1900:2e3)};var ge,ve=we('FullYear',!0);function we(e,t){return function(n){return null!=n?(De(this,e,n),r.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case'Milliseconds':return r?n.getUTCMilliseconds():n.getMilliseconds();case'Seconds':return r?n.getUTCSeconds():n.getSeconds();case'Minutes':return r?n.getUTCMinutes():n.getMinutes();case'Hours':return r?n.getUTCHours():n.getHours();case'Date':return r?n.getUTCDate():n.getDate();case'Day':return r?n.getUTCDay():n.getDay();case'Month':return r?n.getUTCMonth():n.getMonth();case'FullYear':return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function De(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case'Milliseconds':return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case'Seconds':return void(i?r.setUTCSeconds(n):r.setSeconds(n));case'Minutes':return void(i?r.setUTCMinutes(n):r.setMinutes(n));case'Hours':return void(i?r.setUTCHours(n):r.setHours(n));case'Date':return void(i?r.setUTCDate(n):r.setDate(n));case'FullYear':break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||pe(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Me(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?pe(e)?29:28:31-r%7%2}ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function We(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Fe(e,t,n){var r=7+t-n;return-(7+We(e,0,r).getUTCDay()-t)%7+r-1}function Ue(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+Fe(e,r,i);return o<=0?a=ye(s=e-1)+o:o>ye(e)?(s=e+1,a=o-ye(e)):(s=e,a=o),{year:s,dayOfYear:a}}function He(e,t,n){var r,i,s=Fe(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(r=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ae(e,t,n){var r=Fe(e,t,n),i=Fe(e+1,t,n);return(ye(e)-r+i)/7}function Ee(e,t){return e.slice(t,7).concat(e.slice(0,t))}F('w',['ww',2],'wo','week'),F('W',['WW',2],'Wo','isoWeek'),oe('w',$,se),oe('ww',$,G),oe('W',$,se),oe('WW',$,G),_e(['w','ww','W','WW'],(function(e,t,n,r){t[r.substr(0,1)]=de(e)})),F('d',0,'do','day'),F('dd',0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),F('ddd',0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),F('dddd',0,0,(function(e){return this.localeData().weekdays(this,e)})),F('e',0,0,'weekday'),F('E',0,0,'isoWeekday'),oe('d',$),oe('e',$),oe('E',$),oe('dd',(function(e,t){return t.weekdaysMinRegex(e)})),oe('ddd',(function(e,t){return t.weekdaysShortRegex(e)})),oe('dddd',(function(e,t){return t.weekdaysRegex(e)})),_e(['dd','ddd','dddd'],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:_(n).invalidWeekday=e})),_e(['d','e','E'],(function(e,t,n,r){t[r]=de(e)}));var Le='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),Ve='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),Ie='Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),je=ie,Ge=ie,Ze=ie;function ze(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,'').toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,'').toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,'').toLocaleLowerCase();return n?'dddd'===t?-1!==(i=ge.call(this._weekdaysParse,a))?i:null:'ddd'===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:'dddd'===t?-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:'ddd'===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null}function qe(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ue(this.weekdaysMin(n,'')),i=ue(this.weekdaysShort(n,'')),s=ue(this.weekdays(n,'')),a.push(r),o.push(i),l.push(s),u.push(r),u.push(i),u.push(s);a.sort(e),o.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp('^('+u.join('|')+')','i'),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp('^('+l.join('|')+')','i'),this._weekdaysShortStrictRegex=new RegExp('^('+o.join('|')+')','i'),this._weekdaysMinStrictRegex=new RegExp('^('+a.join('|')+')','i')}function $e(){return this.hours()%12||12}function Be(e,t){F(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Je(e,t){return t._meridiemParse}F('H',['HH',2],0,'hour'),F('h',['hh',2],0,$e),F('k',['kk',2],0,(function(){return this.hours()||24})),F('hmm',0,0,(function(){return''+$e.apply(this)+N(this.minutes(),2)})),F('hmmss',0,0,(function(){return''+$e.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),F('Hmm',0,0,(function(){return''+this.hours()+N(this.minutes(),2)})),F('Hmmss',0,0,(function(){return''+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Be('a',!0),Be('A',!1),oe('a',Je),oe('A',Je),oe('H',$,ae),oe('h',$,se),oe('k',$,se),oe('HH',$,G),oe('hh',$,G),oe('kk',$,G),oe('hmm',B),oe('hmmss',J),oe('Hmm',B),oe('Hmmss',J),fe(['H','HH'],3),fe(['k','kk'],(function(e,t,n){var r=de(e);t[3]=24===r?0:r})),fe(['a','A'],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),fe(['h','hh'],(function(e,t,n){t[3]=de(e),_(n).bigHour=!0})),fe('hmm',(function(e,t,n){var r=e.length-2;t[3]=de(e.substr(0,r)),t[4]=de(e.substr(r)),_(n).bigHour=!0})),fe('hmmss',(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=de(e.substr(0,r)),t[4]=de(e.substr(r,2)),t[5]=de(e.substr(i)),_(n).bigHour=!0})),fe('Hmm',(function(e,t,n){var r=e.length-2;t[3]=de(e.substr(0,r)),t[4]=de(e.substr(r))})),fe('Hmmss',(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=de(e.substr(0,r)),t[4]=de(e.substr(r,2)),t[5]=de(e.substr(i))}));var Qe,Xe=we('Hours',!0),Ke={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',w:'a week',ww:'%d weeks',M:'a month',MM:'%d months',y:'a year',yy:'%d years'},months:be,monthsShort:Se,week:{dow:0,doy:6},weekdays:Le,weekdaysMin:Ie,weekdaysShort:Ve,meridiemParse:/[ap]\\.?m?\\.?/i},et={},tt={};function nt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=it(i.slice(0,t).join('-')))return r;if(n&&n.length>=t&&nt(i,n)>=t-1)break;t--}s++}return Qe}(e)}function lt(e){var t,n=e._a;return n&&-2===_(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Me(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,_(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),_(e)._overflowWeeks&&-1===t&&(t=7),_(e)._overflowWeekday&&-1===t&&(t=8),_(e).overflow=t),e}var ut=/^\\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)?)?$/,ct=/^\\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)?)?$/,dt=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ht=[['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}/],['YYYYMM',/\\d{6}/,!1],['YYYY',/\\d{4}/,!1]],ft=[['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/]],_t=/^\\/?Date\\((-?\\d+)/i,mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,pt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,n,r,i,s,a,o=e._i,l=ut.exec(o)||ct.exec(o),u=ht.length,c=ft.length;if(l){for(_(e).iso=!0,t=0,n=u;t7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,u=He(St(),s,a),n=wt(t.gg,e._a[0],u.year),r=wt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>Ae(n,s,a)?_(e)._overflowWeeks=!0:null!=l?_(e)._overflowWeekday=!0:(o=Ue(n,r,i,s,a),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=wt(e._a[0],i[0]),(e._dayOfYear>ye(a)||0===e._dayOfYear)&&(_(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?We:Ce).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(_(e).weekdayMismatch=!0)}}function Dt(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],_(e).empty=!0;var t,n,i,s,a,o,l,u=''+e._i,c=u.length,d=0;for(l=(i=H(e._f,e._locale).match(P)||[]).length,t=0;t0&&_(e).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),d+=n.length),W[s]?(n?_(e).empty=!1:_(e).unusedTokens.push(s),me(s,n,e)):e._strict&&!n&&_(e).unusedTokens.push(s);_(e).charsLeftOver=c-d,u.length>0&&_(e).unusedInput.push(u),e._a[3]<=12&&!0===_(e).bigHour&&e._a[3]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(o=_(e).era)&&(e._a[0]=e._locale.erasConvertYear(o,e._a[0])),kt(e),lt(e)}else vt(e);else yt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||ot(e._l),null===t||void 0===n&&''===t?p({nullInput:!0}):('string'==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(lt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(0===l)return _(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:p()}));function Tt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return St();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function rn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function sn(e,t){return t.erasAbbrRegex(e)}function an(){var e,t,n,r,i,s=[],a=[],o=[],l=[],u=this.eras();for(e=0,t=u.length;e(s=Ae(e,r,i))&&(t=s),un.call(this,e,t,n,r,i))}function un(e,t,n,r,i){var s=Ue(e,t,n,r,i),a=We(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}F('N',0,0,'eraAbbr'),F('NN',0,0,'eraAbbr'),F('NNN',0,0,'eraAbbr'),F('NNNN',0,0,'eraName'),F('NNNNN',0,0,'eraNarrow'),F('y',['y',1],'yo','eraYear'),F('y',['yy',2],0,'eraYear'),F('y',['yyy',3],0,'eraYear'),F('y',['yyyy',4],0,'eraYear'),oe('N',sn),oe('NN',sn),oe('NNN',sn),oe('NNNN',(function(e,t){return t.erasNameRegex(e)})),oe('NNNNN',(function(e,t){return t.erasNarrowRegex(e)})),fe(['N','NN','NNN','NNNN','NNNNN'],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?_(n).era=i:_(n).invalidEra=e})),oe('y',ee),oe('yy',ee),oe('yyy',ee),oe('yyyy',ee),oe('yo',(function(e,t){return t._eraYearOrdinalRegex||ee})),fe(['y','yy','yyy','yyyy'],0),fe(['yo'],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)})),F(0,['gg',2],0,(function(){return this.weekYear()%100})),F(0,['GG',2],0,(function(){return this.isoWeekYear()%100})),on('gggg','weekYear'),on('ggggg','weekYear'),on('GGGG','isoWeekYear'),on('GGGGG','isoWeekYear'),oe('G',te),oe('g',te),oe('GG',$,G),oe('gg',$,G),oe('GGGG',X,z),oe('gggg',X,z),oe('GGGGG',K,q),oe('ggggg',K,q),_e(['gggg','ggggg','GGGG','GGGGG'],(function(e,t,n,r){t[r.substr(0,2)]=de(e)})),_e(['gg','GG'],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),F('Q',0,'Qo','quarter'),oe('Q',j),fe('Q',(function(e,t){t[1]=3*(de(e)-1)})),F('D',['DD',2],'Do','date'),oe('D',$,se),oe('DD',$,G),oe('Do',(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(['D','DD'],2),fe('Do',(function(e,t){t[2]=de(e.match($)[0])}));var cn=we('Date',!0);F('DDD',['DDDD',3],'DDDo','dayOfYear'),oe('DDD',Q),oe('DDDD',Z),fe(['DDD','DDDD'],(function(e,t,n){n._dayOfYear=de(e)})),F('m',['mm',2],0,'minute'),oe('m',$,ae),oe('mm',$,G),fe(['m','mm'],4);var dn=we('Minutes',!1);F('s',['ss',2],0,'second'),oe('s',$,ae),oe('ss',$,G),fe(['s','ss'],5);var hn,fn,_n=we('Seconds',!1);for(F('S',0,0,(function(){return~~(this.millisecond()/100)})),F(0,['SS',2],0,(function(){return~~(this.millisecond()/10)})),F(0,['SSS',3],0,'millisecond'),F(0,['SSSS',4],0,(function(){return 10*this.millisecond()})),F(0,['SSSSS',5],0,(function(){return 100*this.millisecond()})),F(0,['SSSSSS',6],0,(function(){return 1e3*this.millisecond()})),F(0,['SSSSSSS',7],0,(function(){return 1e4*this.millisecond()})),F(0,['SSSSSSSS',8],0,(function(){return 1e5*this.millisecond()})),F(0,['SSSSSSSSS',9],0,(function(){return 1e6*this.millisecond()})),oe('S',Q,j),oe('SS',Q,G),oe('SSS',Q,Z),hn='SSSS';hn.length<=9;hn+='S')oe(hn,ee);function mn(e,t){t[6]=de(1e3*('0.'+e))}for(hn='S';hn.length<=9;hn+='S')fe(hn,mn);fn=we('Milliseconds',!1),F('z',0,0,'zoneAbbr'),F('zz',0,0,'zoneName');var pn=w.prototype;function yn(e){return e}pn.add=zt,pn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Bt(arguments[0])?(e=arguments[0],t=void 0):Jt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||St(),i=Ut(n,this).startOf('day'),s=r.calendarFormat(this,i)||'sameElse',a=t&&(O(t[s])?t[s].call(this,n):t[s]);return this.format(a||this.localeData().calendar(s,this,St(n)))},pn.clone=function(){return new w(this)},pn.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=E(t)){case'year':s=Qt(this,r)/12;break;case'month':s=Qt(this,r);break;case'quarter':s=Qt(this,r)/3;break;case'second':s=(this-r)/1e3;break;case'minute':s=(this-r)/6e4;break;case'hour':s=(this-r)/36e5;break;case'day':s=(this-r-i)/864e5;break;case'week':s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:ce(s)},pn.endOf=function(e){var t,n;if(void 0===(e=E(e))||'millisecond'===e||!this.isValid())return this;switch(n=this._isUTC?rn:nn,e){case'year':t=n(this.year()+1,0,1)-1;break;case'quarter':t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case'month':t=n(this.year(),this.month()+1,1)-1;break;case'week':t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case'isoWeek':t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case'day':case'date':t=n(this.year(),this.month(),this.date()+1)-1;break;case'hour':t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case'minute':t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case'second':t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},pn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||St(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(St(),e)},pn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||St(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(St(),e)},pn.get=function(e){return O(this[e=E(e)])?this[e]():this},pn.invalidAt=function(){return _(this).overflow},pn.isAfter=function(e,t){var n=k(e)?e:St(e);return!(!this.isValid()||!n.isValid())&&('millisecond'===(t=E(t)||'millisecond')?this.valueOf()>n.valueOf():n.valueOf()9999?U(n,t?'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]':'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace('Z',U(n,'Z')):U(n,t?'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]':'YYYY-MM-DD[T]HH:mm:ss.SSSZ')},pn.inspect=function(){if(!this.isValid())return'moment.invalid(/* '+this._i+' */)';var e,t,n,r='moment',i='';return this.isLocal()||(r=0===this.utcOffset()?'moment.utc':'moment.parseZone',i='Z'),e='['+r+'(\"]',t=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY',n=i+'[\")]',this.format(e+t+'-MM-DD[T]HH:mm:ss.SSS'+n)},'undefined'!=typeof Symbol&&null!=Symbol.for&&(pn[Symbol.for('nodejs.util.inspect.custom')]=function(){return'Moment<'+this.format()+'>'}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ')},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?'UTC':''},pn.zoneName=function(){return this._isUTC?'Coordinated Universal Time':''},pn.dates=M('dates accessor is deprecated. Use date instead.',cn),pn.months=M('months accessor is deprecated. Use month instead',Pe),pn.years=M('years accessor is deprecated. Use year instead',ve),pn.zone=M('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',(function(e,t){return null!=e?('string'!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),pn.isDSTShifted=M('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):St(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var gn=x.prototype;function vn(e,t,n,r){var i=ot(),s=f().set(r,t);return i[n](s,e)}function wn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||'',null!=t)return vn(e,t,n,'month');var r,i=[];for(r=0;r<12;r++)i[r]=vn(e,r,n,'month');return i}function kn(e,t,n,r){'boolean'==typeof e?(u(t)&&(n=t,t=void 0),t=t||''):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||'');var i,s=ot(),a=e?s._week.dow:0,o=[];if(null!=n)return vn(t,(n+a)%7,r,'day');for(i=0;i<7;i++)o[i]=vn(t,(i+a)%7,r,'day');return o}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(P).map((function(e){return'MMMM'===e||'MM'===e||'DD'===e||'dddd'===e?e.slice(1):e})).join(''),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace('%d',e)},gn.preparse=yn,gn.postformat=yn,gn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?'future':'past'];return O(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)a(e,n)&&(O(t=e[n])?this[n]=t:this['_'+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+'|'+/\\d{1,2}/.source)},gn.eras=function(e,t){var n,i,s,a=this._eras||ot('en')._eras;for(n=0,i=a.length;n=0)return l[r]},gn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},gn.erasAbbrRegex=function(e){return a(this,'_erasAbbrRegex')||an.call(this),e?this._erasAbbrRegex:this._erasRegex},gn.erasNameRegex=function(e){return a(this,'_erasNameRegex')||an.call(this),e?this._erasNameRegex:this._erasRegex},gn.erasNarrowRegex=function(e){return a(this,'_erasNarrowRegex')||an.call(this),e?this._erasNarrowRegex:this._erasRegex},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ye).test(t)?'format':'standalone'][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ye.test(t)?'format':'standalone'][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return xe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp('^'+this.months(i,'').replace('.','')+'$','i'),this._shortMonthsParse[r]=new RegExp('^'+this.monthsShort(i,'').replace('.','')+'$','i')),n||this._monthsParse[r]||(s='^'+this.months(i,'')+'|^'+this.monthsShort(i,''),this._monthsParse[r]=new RegExp(s.replace('.',''),'i')),n&&'MMMM'===t&&this._longMonthsParse[r].test(e))return r;if(n&&'MMM'===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},gn.monthsRegex=function(e){return this._monthsParseExact?(a(this,'_monthsRegex')||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,'_monthsRegex')||(this._monthsRegex=Te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,'_monthsRegex')||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,'_monthsShortRegex')||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return He(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?'format':'standalone'];return!0===e?Ee(n,this._week.dow):e?n[e.day()]:n},gn.weekdaysMin=function(e){return!0===e?Ee(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return!0===e?Ee(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp('^'+this.weekdays(i,'').replace('.','\\\\.?')+'$','i'),this._shortWeekdaysParse[r]=new RegExp('^'+this.weekdaysShort(i,'').replace('.','\\\\.?')+'$','i'),this._minWeekdaysParse[r]=new RegExp('^'+this.weekdaysMin(i,'').replace('.','\\\\.?')+'$','i')),this._weekdaysParse[r]||(s='^'+this.weekdays(i,'')+'|^'+this.weekdaysShort(i,'')+'|^'+this.weekdaysMin(i,''),this._weekdaysParse[r]=new RegExp(s.replace('.',''),'i')),n&&'dddd'===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&'ddd'===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&'dd'===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,'_weekdaysRegex')||(this._weekdaysRegex=je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,'_weekdaysShortRegex')||(this._weekdaysShortRegex=Ge),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,'_weekdaysMinRegex')||(this._weekdaysMinRegex=Ze),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return'p'===(e+'').toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?'pm':'PM':n?'am':'AM'},st('en',{eras:[{since:'0001-01-01',until:1/0,offset:1,name:'Anno Domini',narrow:'AD',abbr:'AD'},{since:'0000-12-31',until:-1/0,offset:1,name:'Before Christ',narrow:'BC',abbr:'BC'}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===de(e%100/10)?'th':1===t?'st':2===t?'nd':3===t?'rd':'th')}}),r.lang=M('moment.lang is deprecated. Use moment.locale instead.',st),r.langData=M('moment.langData is deprecated. Use moment.localeData instead.',ot);var Dn=Math.abs;function Mn(e,t,n,r){var i=Vt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Sn(e){return 4800*e/146097}function Yn(e){return 146097*e/4800}function On(e){return function(){return this.as(e)}}var Tn=On('ms'),xn=On('s'),Nn=On('m'),Pn=On('h'),Rn=On('d'),Cn=On('w'),Wn=On('M'),Fn=On('Q'),Un=On('y'),Hn=Tn;function An(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=An('milliseconds'),Ln=An('seconds'),Vn=An('minutes'),In=An('hours'),jn=An('days'),Gn=An('months'),Zn=An('years'),zn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $n(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Bn=Math.abs;function Jn(e){return(e>0)-(e<0)||+e}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,l=Bn(this._milliseconds)/1e3,u=Bn(this._days),c=Bn(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(c/12),c%=12,r=l?l.toFixed(3).replace(/\\.?0+$/,''):'',i=d<0?'-':'',s=Jn(this._months)!==Jn(d)?'-':'',a=Jn(this._days)!==Jn(d)?'-':'',o=Jn(this._milliseconds)!==Jn(d)?'-':'',i+'P'+(n?s+n+'Y':'')+(c?s+c+'M':'')+(u?a+u+'D':'')+(t||e||l?'T':'')+(t?o+t+'H':'')+(e?o+e+'M':'')+(l?o+r+'S':'')):'P0D'}var Xn=Nt.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},Xn.add=function(e,t){return Mn(this,e,t,1)},Xn.subtract=function(e,t){return Mn(this,e,t,-1)},Xn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if('month'===(e=E(e))||'quarter'===e||'year'===e)switch(t=this._days+r/864e5,n=this._months+Sn(t),e){case'month':return n;case'quarter':return n/3;case'year':return n/12}else switch(t=this._days+Math.round(Yn(this._months)),e){case'week':return t/7+r/6048e5;case'day':return t+r/864e5;case'hour':return 24*t+r/36e5;case'minute':return 1440*t+r/6e4;case'second':return 86400*t+r/1e3;case'millisecond':return Math.floor(864e5*t)+r;default:throw new Error('Unknown unit '+e)}},Xn.asMilliseconds=Tn,Xn.asSeconds=xn,Xn.asMinutes=Nn,Xn.asHours=Pn,Xn.asDays=Rn,Xn.asWeeks=Cn,Xn.asMonths=Wn,Xn.asQuarters=Fn,Xn.asYears=Un,Xn.valueOf=Hn,Xn._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*bn(Yn(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=ce(s/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,a+=ce(n/24),i=ce(Sn(a)),o+=i,a-=bn(Yn(i)),r=ce(o/12),o%=12,l.days=a,l.months=o,l.years=r,this},Xn.clone=function(){return Vt(this)},Xn.get=function(e){return e=E(e),this.isValid()?this[e+'s']():NaN},Xn.milliseconds=En,Xn.seconds=Ln,Xn.minutes=Vn,Xn.hours=In,Xn.days=jn,Xn.weeks=function(){return ce(this.days()/7)},Xn.months=Gn,Xn.years=Zn,Xn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=qn;return'object'==typeof e&&(t=e,e=!1),'boolean'==typeof e&&(i=e),'object'==typeof t&&(s=Object.assign({},qn,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var i=Vt(e).abs(),s=zn(i.as('s')),a=zn(i.as('m')),o=zn(i.as('h')),l=zn(i.as('d')),u=zn(i.as('M')),c=zn(i.as('w')),d=zn(i.as('y')),h=s<=n.ss&&['s',s]||s0,h[4]=r,$n.apply(null,h)}(this,!i,s,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Xn.toISOString=Qn,Xn.toString=Qn,Xn.toJSON=Qn,Xn.locale=Xt,Xn.localeData=en,Xn.toIsoString=M('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',Qn),Xn.lang=Kt,F('X',0,0,'unix'),F('x',0,0,'valueOf'),oe('x',te),oe('X',/[+-]?\\d+(\\.\\d{1,3})?/),fe('X',(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),fe('x',(function(e,t,n){n._d=new Date(de(e))})),r.version='2.30.1',t=St,r.fn=pn,r.min=function(){var e=[].slice.call(arguments,0);return Tt('isBefore',e)},r.max=function(){var e=[].slice.call(arguments,0);return Tt('isAfter',e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return St(1e3*e)},r.months=function(e,t){return wn(e,t,'months')},r.isDate=c,r.locale=st,r.invalid=p,r.duration=Vt,r.isMoment=k,r.weekdays=function(e,t,n){return kn(e,t,n,'weekdays')},r.parseZone=function(){return St.apply(null,arguments).parseZone()},r.localeData=ot,r.isDuration=Pt,r.monthsShort=function(e,t){return wn(e,t,'monthsShort')},r.weekdaysMin=function(e,t,n){return kn(e,t,n,'weekdaysMin')},r.defineLocale=at,r.updateLocale=function(e,t){if(null!=t){var n,r,i=Ke;null!=et[e]&&null!=et[e].parentLocale?et[e].set(T(et[e]._config,t)):(null!=(r=it(e))&&(i=r._config),t=T(i,t),null==r&&(t.abbr=e),(n=new x(t)).parentLocale=et[e],et[e]=n),st(e)}else null!=et[e]&&(null!=et[e].parentLocale?(et[e]=et[e].parentLocale,e===st()&&st(e)):null!=et[e]&&delete et[e]);return et[e]},r.locales=function(){return b(et)},r.weekdaysShort=function(e,t,n){return kn(e,t,n,'weekdaysShort')},r.normalizeUnits=E,r.relativeTimeRounding=function(e){return void 0===e?zn:'function'==typeof e&&(zn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==qn[e]&&(void 0===t?qn[e]:(qn[e]=t,'s'===e&&(qn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,'days',!0);return n<-6?'sameElse':n<-1?'lastWeek':n<0?'lastDay':n<1?'sameDay':n<2?'nextDay':n<7?'nextWeek':'sameElse'},r.prototype=pn,r.HTML5_FMT={DATETIME_LOCAL:'YYYY-MM-DDTHH:mm',DATETIME_LOCAL_SECONDS:'YYYY-MM-DDTHH:mm:ss',DATETIME_LOCAL_MS:'YYYY-MM-DDTHH:mm:ss.SSS',DATE:'YYYY-MM-DD',TIME:'HH:mm',TIME_SECONDS:'HH:mm:ss',TIME_MS:'HH:mm:ss.SSS',WEEK:'GGGG-[W]WW',MONTH:'YYYY-MM'},r}()}).call(this,n(3)(e))},function(e,t,n){var r=n(2),i=n(5);e.exports=i(r,contact,reports)},function(e,t,n){const r=n(0),i=n(4),{today:s,MAX_DAYS_IN_PREGNANCY:a,isHighRiskPregnancy:o,getNewestReport:l,getSubsequentPregnancyFollowUps:u,getSubsequentDeliveries:c,isAlive:d,isReadyForNewPregnancy:h,isReadyForDelivery:f,isActivePregnancy:_,countANCFacilityVisits:m,getAllRiskFactors:p,getLatestDangerSignsForPregnancy:y,getNextANCVisitDate:g,getMostRecentLMPDateForPregnancy:v,getMostRecentEDDForPregnancy:w,getDeliveryDate:k,getFormArraySubmittedInWindow:D,getRecentANCVisitWithEvent:M,getAllRiskFactorExtra:b,getField:S}=i,Y=contact,O=lineage,T=reports,x={alive:d(Y),muted:!1,show_pregnancy_form:h(Y,T),show_delivery_form:f(Y,T)},N=[{appliesToType:'person',label:'patient_id',value:Y.patient_id,width:4},{appliesToType:'person',label:'contact.age',value:Y.date_of_birth,width:4,filter:'age'},{appliesToType:'person',label:'contact.sex',value:'contact.sex.'+Y.sex,translate:!0,width:4},{appliesToType:'person',label:'person.field.phone',value:Y.phone,width:4},{appliesToType:'person',label:'person.field.alternate_phone',value:Y.phone_alternate,width:4},{appliesToType:'person',label:'External ID',value:Y.external_id,width:4},{appliesToType:'person',label:'contact.parent',value:O,filter:'lineage'},{appliesToType:'!person',label:'contact',value:Y.contact&&Y.contact.name,width:4},{appliesToType:'!person',label:'contact.phone',value:Y.contact&&Y.contact.phone,width:4},{appliesToType:'!person',label:'External ID',value:Y.external_id,width:4},{appliesToType:'!person',appliesIf:function(){return Y.parent&&O[0]},label:'contact.parent',value:O,filter:'lineage'},{appliesToType:'person',label:'contact.notes',value:Y.notes,width:12},{appliesToType:'!person',label:'contact.notes',value:Y.notes,width:12}];Y.short_name&&N.unshift({appliesToType:'person',label:'contact.short_name',value:Y.short_name,width:4});const P=[{label:'contact.profile.pregnancy.active',appliesToType:'report',appliesIf:function(e){return _(Y,T,e)},fields:function(e){const t=[],n=p(T,e),i=b(T,e),a=y(T,e),c=o(T,e),d=l(T,['pregnancy','pregnancy_home_visit']),h=r(d.reported_date),f=v(T,e),_=w(T,e),k=g(T,e),D=f?s.diff(f,'weeks'):null;let Y=S(e,'lmp_approx'),O=e.reported_date;u(T,e).forEach((function(e){e.reported_date>O&&'yes'===S(e,'lmp_updated')&&(O=e.reported_date,S(e,'lmp_method_approx')&&(Y=S(e,'lmp_method_approx')))}));const x=M(T,e,'migrated'),N=M(T,e,'refused'),P=x||N;if(P){const e='clear_all'===S(P,'pregnancy_ended.clear_option');t.push({label:'contact.profile.change_care',value:x?'Migrated out of area':'Refusing care',width:6},{label:'contact.profile.tasks_on_off',value:e?'Off':'On',width:6})}if(t.push({label:'Weeks Pregnant',value:D||0===D?{number:D,approximate:'yes'===Y}:'contact.profile.value.unknown',translate:!D&&0!==D,filter:D||0===D?'weeksPregnant':'',width:6},{label:'contact.profile.edd',value:_?_.valueOf():'contact.profile.value.unknown',translate:!_,filter:_?'simpleDate':'',width:6}),c){let e='';e=!n&&i?i.join(', '):n.length>1||n&&i?'contact.profile.risk.multiple':'contact.profile.danger_sign.'+n[0],t.push({label:'contact.profile.risk.high',value:e,translate:!0,icon:'icon-risk',width:6})}return a.length>0&&t.push({label:'contact.profile.danger_signs.current',value:a.length>1?'contact.profile.danger_sign.multiple':'contact.profile.danger_sign.'+a[0],translate:!0,width:6}),t.push({label:'contact.profile.visit',value:'contact.profile.visits.of',context:{count:m(T,e),total:8},translate:!0,width:6},{label:'contact.profile.last_visited',value:h.valueOf(),filter:'relativeDay',width:6}),k&&k.isSameOrAfter(s)&&t.push({label:'contact.profile.anc.next',value:k.valueOf(),filter:'simpleDate',width:6}),t},modifyContext:function(e,t){let n=S(t,'lmp_date_8601'),r=S(t,'lmp_method_approx'),i=S(t,'hiv_status_known'),s=S(t,'deworming_med_received'),a=S(t,'tt_received');const o=p(T,t),l=b(T,t);let c=S(t,'t_pregnancy_follow_up_date');u(T,t).forEach((function(e){'yes'===S(e,'lmp_updated')&&(n=S(e,'lmp_date_8601'),r=S(e,'lmp_method_approx')),i=S(e,'hiv_status_known'),s=S(e,'deworming_med_received'),a=S(e,'tt_received'),'yes'===S(e,'t_pregnancy_follow_up')&&(c=S(e,'t_pregnancy_follow_up_date'))})),e.lmp_date_8601=n,e.lmp_method_approx=r,e.is_active_pregnancy=!0,e.deworming_med_received=s,e.hiv_tested_past=i,e.tt_received_past=a,e.risk_factor_codes=o.join(' '),e.risk_factor_extra=l.join('; '),e.pregnancy_follow_up_date_recent=c,e.pregnancy_uuid=t._id}},{label:'contact.profile.death.title',appliesToType:'person',appliesIf:function(){return!d(Y)},fields:function(){const e=[];let t,n;const r=l(T,['death_report']);if(r){const e=S(r,'death_details');e&&(t=e.date_of_death,n=e.place_of_death)}else Y.date_of_death&&(t=Y.date_of_death);return e.push({label:'contact.profile.death.date',value:t||'contact.profile.value.unknown',filter:t?'simpleDate':'',translate:!t,width:6},{label:'contact.profile.death.place',value:n||'contact.profile.value.unknown',translate:!0,width:6}),e}},{label:'contact.profile.pregnancy.past',appliesToType:'report',appliesIf:function(e){if('person'!==Y.type)return!1;if('delivery'===e.form)return!0;if('pregnancy'===e.form){if(M(T,e,'abortion')||M(T,e,'miscarriage'))return!0;const t=v(T,e);return t&&s.isSameOrAfter(t.clone().add(42,'weeks'))&&0===c(T,e,a).length}return!1},fields:function(e){const t=[];let n,i,l='',u=0,d=0,h=0;if('delivery'===e.form){const s=r(e.reported_date);n=D(T,['pregnancy'],s.clone().subtract(a,'days').toDate(),s.toDate())[0],S(e,'delivery_outcome')&&(i=k(e),l=S(e,'delivery_outcome.delivery_place'),u=S(e,'delivery_outcome.babies_delivered_num'),d=S(e,'delivery_outcome.babies_deceased_num'),t.push({label:'contact.profile.delivery_date',value:i?i.valueOf():'',filter:'simpleDate',width:6},{label:'contact.profile.delivery_place',value:l,translate:!0,width:6},{label:'contact.profile.delivered_babies',value:u,width:6}))}else if('pregnancy'===e.form){n=e;const o=v(T,n),l=M(T,n,'abortion'),u=M(T,n,'miscarriage');if(l||u){let e='',n=r(0),i=0;l?(e='abortion',n=r(S(l,'pregnancy_ended.abortion_date'))):(e='miscarriage',n=r(S(u,'pregnancy_ended.miscarriage_date'))),i=n.diff(o,'weeks'),t.push({label:'contact.profile.pregnancy.end_early',value:e,translate:!0,width:6},{label:'contact.profile.pregnancy.end_date',value:n.valueOf(),filter:'simpleDate',width:6},{label:'contact.profile.pregnancy.end_weeks',value:i>0?i:'contact.profile.value.unknown',translate:i<=0,width:6})}else o&&s.isSameOrAfter(o.clone().add(42,'weeks'))&&0===c(T,e,a).length&&(i=w(T,e),t.push({label:'contact.profile.delivery_date',value:i?i.valueOf():'contact.profile.value.unknown',filter:'simpleDate',translate:!i,width:6}))}if(d>0&&S(e,'baby_death')){t.push({label:'contact.profile.deceased_babies',value:d,width:6});let n=S(e,'baby_death.baby_death_repeat');n||(n=[]);let r=0;n.forEach((function(e){r>0&&t.push({label:'',value:'',width:6}),t.push({label:'contact.profile.newborn.death_date',value:e.baby_death_date,filter:'simpleDate',width:6},{label:'contact.profile.newborn.death_place',value:e.baby_death_place,translate:!0,width:6},{label:'contact.profile.delivery.stillbirthQ',value:e.stillbirth,translate:!0,width:6}),r++,r===n.length&&t.push({label:'',value:'',width:6})}))}if(n){h=m(T,n),t.push({label:'contact.profile.anc_visit',value:h,width:3});if(o(T,n)){let e='';const r=p(T,n),i=b(T,n);e=!r&&i?i.join(', '):r.length>1||r&&i?'contact.profile.risk.multiple':'contact.profile.danger_sign.'+r[0],t.push({label:'contact.profile.risk.high',value:e,translate:!0,icon:'icon-risk',width:6})}}return t}}];e.exports={context:x,cards:P,fields:N}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,'loaded',{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,'id',{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){const r=n(0),i=r().startOf('day'),s=['pregnancy'],a=['pregnancy_home_visit'],o=['delivery'],l=['pregnancy','pregnancy_home_visit','pregnancy_danger_sign','pregannacy_danger_sign_follow_up'],u=(e,t)=>['fields',...(t||'').split('.')].reduce((e,t)=>{if(void 0!==e)return e[t]},e);function c(e,t,n,r){return e.filter((function(e){return t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r}))}function d(e,t){let n;return e.forEach((function(e){(function(e){return!!(e.form&&e.fields&&e.reported_date)})(e)&&t.includes(e.form)&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n}function h(e){return D(e)&&u(e,'lmp_date_8601')&&r(u(e,'lmp_date_8601'))}function f(e,t){let n=h(t),i=t.reported_date;return T(e,t).forEach((function(e){const t=M(s=e)&&u(s,'lmp_date_8601')&&r(u(s,'lmp_date_8601'));var s;e.reported_date>i&&'yes'===u(e,'lmp_updated')&&(i=e.reported_date,n=t)})),n}function _(e,t){const n=f(e,t);if(n)return n.clone().add(280,'days')}function m(e){return b(e)&&u(e,'delivery_outcome.delivery_date')&&r(u(e,'delivery_outcome.delivery_date'))}function p(e){const t=[];if('yes'===u(e,'t_danger_signs_referral_follow_up')){const n=u(e,'danger_signs');if(n)for(const e in n)'yes'===n[e]&&'r_danger_sign_present'!==e&&t.push(e)}return t}function y(e){const t=[];if(!D(e))return[];if('yes'===u(e,'risk_factors.r_risk_factor_present')){'yes'===u(e,'risk_factors.risk_factors_history.first_pregnancy')&&t.push('first_pregnancy'),'yes'===u(e,'risk_factors.risk_factors_history.previous_miscarriage')&&t.push('previous_miscarriage');const n=u(e,'risk_factors.risk_factors_present.primary_condition'),r=u(e,'risk_factors.risk_factors_present.secondary_condition');n&&t.push(...n.split(' ')),r&&t.push(...r.split(' '))}return t}function g(e,t){const n=y(t);return T(e,t).forEach((function(e){n.push(...function(e){const t=[];if(!M(e))return[];if('yes'===u(e,'anc_visits_hf.risk_factors.r_risk_factor_present')){const n=u(e,'anc_visits_hf.risk_factors.new_risks');n&&t.push(...n.split(' '))}return t}(e))})),n}function v(e){let t;return e&&D(e)?t=u(e,'risk_factors.risk_factors_present.additional_risk'):e&&M(e)&&(t=u(e,'anc_visits_hf.risk_factors.additional_risk')),t}function w(e,t){const n=[],r=v(t);r&&n.push(r);return T(e,t).forEach((function(e){const t=v(e);t&&n.push(t)})),n}function k(e){return e&&!e.date_of_death}function D(e){return e&&s.includes(e.form)}function M(e){return e&&a.includes(e.form)}function b(e){return e&&o.includes(e.form)}function S(e,t,n){if('person'!==e.type||!k(e)||!D(n))return!1;const r=(f(t,n)||n.reported_date)>i.clone().subtract(294,'day'),s=O(t,n,42).length>0,a=function(e,t){return e.filter((function(e){return D(e)&&e.reported_date>t.reported_date}))}(t,n).length>0;return r&&!s&&!a&&!Y(t,n,'abortion')&&!Y(t,n,'miscarriage')}function Y(e,t,n){const r=d(T(e,t),a);if(r&&u(r,'pregnancy_summary.visit_option')===n)return r}function O(e,t,n){return e.filter((function(e){return b(e)&&e.reported_date>t.reported_date&&(!n||e.reported_date>=i.clone().subtract(n,'days'))}))}function T(e,t){let n=h(t);n||(n=r(t.reported_date));return e.filter((function(e){return M(e)&&e.reported_date>t.reported_date&&r(e.reported_date)S(e))},isActivePregnancy:S,countANCFacilityVisits:function(e,t){let n=0;const r=T(e,t);return u(t,'anc_visits_hf.anc_visits_hf_past')&&!isNaN(u(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))&&(n+=parseInt(u(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))),n+=r.reduce((function(e,t){const n=u(t,'anc_visits_hf.anc_visits_hf_past');return n?(e+='yes'===n.last_visit_attended&&1,isNaN(n.visited_hf_count)?e:e+('yes'===n.report_other_visits&&parseInt(n.visited_hf_count))):0}),0),n},knowsHIVStatusInPast3Months:function(e){let t=!1;return c(e,s,i.clone().subtract(3,'months'),i).forEach((function(e){'yes'===u(e,'pregnancy_new_or_current.hiv_status.hiv_status_know')&&(t=!0)})),t},getAllRiskFactors:g,getAllRiskFactorExtra:w,getDangerSignCodes:p,getLatestDangerSignsForPregnancy:function(e,t){if(!t)return[];let n=f(e,t);n||(n=r(t.reported_date));const i=c(e,l,n.toDate(),n.clone().add(294,'days').toDate()),s=[];i.forEach(e=>{M(e)?'yes'===u(e,'pregnancy_summary.visit_option')&&s.push(e):s.push(e)});const a=d(s,l);return a?p(a):[]},getNextANCVisitDate:function(e,t){let n=u(t,'t_pregnancy_follow_up_date'),i=t.reported_date;return T(e,t).forEach((function(e){e.reported_date>i&&u(e,'t_pregnancy_follow_up_date')&&(i=e.reported_date,n=u(e,'t_pregnancy_follow_up_date'))})),r(n)},isReadyForNewPregnancy:function(e,t){if('person'!==e.type)return!1;const n=d(t,s),a=d(t,o);if(!n&&!a)return!0;if(n){if(!a||a.reported_daten.reported_date))return m(a)0&&!r.includes('!'+l))&&(!e.appliesIf||e.appliesIf()))return delete e.appliesToType,delete e.appliesIf,!0}))};return o.forEach((function(e){var t,s,o,c,d=n(e.appliesToType);if(d.includes('report')&&d.length>1)throw new Error('You cannot set appliesToType to an array which includes the type \\'report\\' and another type.');if(d.includes('report'))for(t=0;t0)return;(o=i(e,a))&&u.cards.push(o)}})),u.context=a,u}}])})); return ContactSummary;", + "contact_summary": "var ContactSummary = {}; !function(e,t){if('object'==typeof exports&&'object'==typeof module)module.exports=t();else if('function'==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)('object'==typeof exports?exports:e)[r]=n[r]}}(ContactSummary,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p='',n(n.s=1)}([function(e,t,n){(function(e){e.exports=function(){'use strict';var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||'[object Array]'===Object.prototype.toString.call(e)}function s(e){return null!=e&&'[object Object]'===Object.prototype.toString.call(e)}function a(e){return void 0===e}function o(e){return'number'==typeof e||'[object Number]'===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||'[object Date]'===Object.prototype.toString.call(e)}function u(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0?n?'+':'':'-')+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\\[[^\\[]*\\])|(\\\\)?([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,A=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},I={};function G(e,t,n,r){var i=r;'string'==typeof r&&(i=function(){return this[r]()}),e&&(I[e]=i),t&&(I[t[0]]=function(){return E(i.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function j(e,t){return e.isValid()?(t=Z(t,e.localeData()),V[t]=V[t]||function(e){var t,n,r,i=e.match(L);for(t=0,n=i.length;t=0&&A.test(e);)e=e.replace(A,r),A.lastIndex=0,n-=1;return e}var z=/\\d/,q=/\\d\\d/,$=/\\d{3}/,J=/\\d{4}/,B=/[+-]?\\d{6}/,Q=/\\d\\d?/,X=/\\d\\d\\d\\d?/,K=/\\d\\d\\d\\d\\d\\d?/,ee=/\\d{1,3}/,te=/\\d{1,4}/,ne=/[+-]?\\d{1,6}/,re=/\\d+/,ie=/[+-]?\\d+/,se=/Z|[+-]\\d\\d:?\\d\\d/gi,ae=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,oe=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,le={};function ue(e,t,n){le[e]=x(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(le,e)?le[e](t._strict,t._locale):new RegExp(ce(e.replace('\\\\','').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function ce(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,'\\\\$&')}var he={};function fe(e,t){var n,r=t;for('string'==typeof e&&(e=[e]),o(t)&&(r=function(e,n){n[t]=D(e)}),n=0;n68?1900:2e3)};var ge,ve=we('FullYear',!0);function we(e,t){return function(n){return null!=n?(De(this,e,n),r.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){return e.isValid()?e._d['get'+(e._isUTC?'UTC':'')+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&('FullYear'===t&&ye(e.year())&&1===e.month()&&29===e.date()?e._d['set'+(e._isUTC?'UTC':'')+t](n,e.month(),Me(n,e.month())):e._d['set'+(e._isUTC?'UTC':'')+t](n))}function Me(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ye(e)?29:28:31-r%7%2}ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Fe(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ne(e,t,n){var r=7+t-n;return-(7+Fe(e,0,r).getUTCDay()-t)%7+r-1}function He(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+Ne(e,r,i);return o<=0?a=pe(s=e-1)+o:o>pe(e)?(s=e+1,a=o-pe(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ue(e,t,n){var r,i,s=Ne(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+Ee(i=e.year()-1,t,n):a>Ee(e.year(),t,n)?(r=a-Ee(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ee(e,t,n){var r=Ne(e,t,n),i=Ne(e+1,t,n);return(pe(e)-r+i)/7}function Le(e,t){return e.slice(t,7).concat(e.slice(0,t))}G('w',['ww',2],'wo','week'),G('W',['WW',2],'Wo','isoWeek'),C('week','w'),C('isoWeek','W'),U('week',5),U('isoWeek',5),ue('w',Q),ue('ww',Q,q),ue('W',Q),ue('WW',Q,q),_e(['w','ww','W','WW'],(function(e,t,n,r){t[r.substr(0,1)]=D(e)})),G('d',0,'do','day'),G('dd',0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),G('ddd',0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),G('dddd',0,0,(function(e){return this.localeData().weekdays(this,e)})),G('e',0,0,'weekday'),G('E',0,0,'isoWeekday'),C('day','d'),C('weekday','e'),C('isoWeekday','E'),U('day',11),U('weekday',11),U('isoWeekday',11),ue('d',Q),ue('e',Q),ue('E',Q),ue('dd',(function(e,t){return t.weekdaysMinRegex(e)})),ue('ddd',(function(e,t){return t.weekdaysShortRegex(e)})),ue('dddd',(function(e,t){return t.weekdaysRegex(e)})),_e(['dd','ddd','dddd'],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:f(n).invalidWeekday=e})),_e(['d','e','E'],(function(e,t,n,r){t[r]=D(e)}));var Ae='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),Ve='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),Ie='Su_Mo_Tu_We_Th_Fr_Sa'.split('_');function Ge(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,'').toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,'').toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,'').toLocaleLowerCase();return n?'dddd'===t?-1!==(i=ge.call(this._weekdaysParse,a))?i:null:'ddd'===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:'dddd'===t?-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:'ddd'===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null}var je=oe,Ze=oe,ze=oe;function qe(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,''),i=this.weekdaysShort(n,''),s=this.weekdays(n,''),a.push(r),o.push(i),l.push(s),u.push(r),u.push(i),u.push(s);for(a.sort(e),o.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)o[t]=ce(o[t]),l[t]=ce(l[t]),u[t]=ce(u[t]);this._weekdaysRegex=new RegExp('^('+u.join('|')+')','i'),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp('^('+l.join('|')+')','i'),this._weekdaysShortStrictRegex=new RegExp('^('+o.join('|')+')','i'),this._weekdaysMinStrictRegex=new RegExp('^('+a.join('|')+')','i')}function $e(){return this.hours()%12||12}function Je(e,t){G(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Be(e,t){return t._meridiemParse}G('H',['HH',2],0,'hour'),G('h',['hh',2],0,$e),G('k',['kk',2],0,(function(){return this.hours()||24})),G('hmm',0,0,(function(){return''+$e.apply(this)+E(this.minutes(),2)})),G('hmmss',0,0,(function(){return''+$e.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)})),G('Hmm',0,0,(function(){return''+this.hours()+E(this.minutes(),2)})),G('Hmmss',0,0,(function(){return''+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)})),Je('a',!0),Je('A',!1),C('hour','h'),U('hour',13),ue('a',Be),ue('A',Be),ue('H',Q),ue('h',Q),ue('k',Q),ue('HH',Q,q),ue('hh',Q,q),ue('kk',Q,q),ue('hmm',X),ue('hmmss',K),ue('Hmm',X),ue('Hmmss',K),fe(['H','HH'],3),fe(['k','kk'],(function(e,t,n){var r=D(e);t[3]=24===r?0:r})),fe(['a','A'],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),fe(['h','hh'],(function(e,t,n){t[3]=D(e),f(n).bigHour=!0})),fe('hmm',(function(e,t,n){var r=e.length-2;t[3]=D(e.substr(0,r)),t[4]=D(e.substr(r)),f(n).bigHour=!0})),fe('hmmss',(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=D(e.substr(0,r)),t[4]=D(e.substr(r,2)),t[5]=D(e.substr(i)),f(n).bigHour=!0})),fe('Hmm',(function(e,t,n){var r=e.length-2;t[3]=D(e.substr(0,r)),t[4]=D(e.substr(r))})),fe('Hmmss',(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=D(e.substr(0,r)),t[4]=D(e.substr(r,2)),t[5]=D(e.substr(i))}));var Qe,Xe=we('Hours',!0),Ke={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:be,monthsShort:Ye,week:{dow:0,doy:6},weekdays:Ae,weekdaysMin:Ie,weekdaysShort:Ve,meridiemParse:/[ap]\\.?m?\\.?/i},et={},tt={};function nt(e){return e?e.toLowerCase().replace('_','-'):e}function rt(t){var n=null;if(!et[t]&&void 0!==e&&e&&e.exports)try{n=Qe._abbr,!function(){var e=new Error('Cannot find module \\'undefined\\'');throw e.code='MODULE_NOT_FOUND',e}(),it(n)}catch(e){}return et[t]}function it(e,t){var n;return e&&((n=a(t)?at(e):st(e,t))?Qe=n:'undefined'!=typeof console&&console.warn&&console.warn('Locale '+e+' not found. Did you forget to load it?')),Qe._abbr}function st(e,t){if(null!==t){var n,r=Ke;if(t.abbr=e,null!=et[e])O('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.'),r=et[e]._config;else if(null!=t.parentLocale)if(null!=et[t.parentLocale])r=et[t.parentLocale]._config;else{if(null==(n=rt(t.parentLocale)))return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return et[e]=new W(P(r,t)),tt[e]&&tt[e].forEach((function(e){st(e.name,e.config)})),it(e),et[e]}return delete et[e],null}function at(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qe;if(!i(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s0;){if(r=rt(i.slice(0,t).join('-')))return r;if(n&&n.length>=t&&M(i,n,!0)>=t-1)break;t--}s++}return Qe}(e)}function ot(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Me(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,f(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),f(e)._overflowWeeks&&-1===t&&(t=7),f(e)._overflowWeekday&&-1===t&&(t=8),f(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ut(e){var t,n,i,s,a,o=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,s,a,o,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)s=1,a=4,n=lt(t.GG,e._a[0],Ue(St(),1,4).year),r=lt(t.W,1),((i=lt(t.E,1))<1||i>7)&&(l=!0);else{s=e._locale._week.dow,a=e._locale._week.doy;var u=Ue(St(),s,a);n=lt(t.gg,e._a[0],u.year),r=lt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s}r<1||r>Ee(n,s,a)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(o=He(n,r,i,s,a),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],i[0]),(e._dayOfYear>pe(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Fe(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Fe:Ce).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(f(e).weekdayMismatch=!0)}}var dt=/^\\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)?)?$/,ct=/^\\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)?)?$/,ht=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ft=[['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}/]],_t=[['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/]],mt=/^\\/?Date\\((\\-?\\d+)/i;function pt(e){var t,n,r,i,s,a,o=e._i,l=dt.exec(o)||ct.exec(o);if(l){for(f(e).iso=!0,t=0,n=ft.length;t0&&f(e).unusedInput.push(a),o=o.slice(o.indexOf(n)+n.length),u+=n.length),I[s]?(n?f(e).empty=!1:f(e).unusedTokens.push(s),me(s,n,e)):e._strict&&!n&&f(e).unusedTokens.push(s);f(e).charsLeftOver=l-u,o.length>0&&f(e).unusedInput.push(o),e._a[3]<=12&&!0===f(e).bigHour&&e._a[3]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ut(e),ot(e)}else wt(e);else pt(e)}function Dt(e){var t=e._i,n=e._f;return e._locale=e._locale||at(e._l),null===t||void 0===n&&''===t?m({nullInput:!0}):('string'==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new v(ot(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,i,s;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()}));function Tt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return St();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function Kt(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function en(e,t){G(0,[e,e.length],0,t)}function tn(e,t,n,r,i){var s;return null==e?Ue(this,r,i).year:(t>(s=Ee(e,r,i))&&(t=s),nn.call(this,e,t,n,r,i))}function nn(e,t,n,r,i){var s=He(e,t,n,r,i),a=Fe(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}G(0,['gg',2],0,(function(){return this.weekYear()%100})),G(0,['GG',2],0,(function(){return this.isoWeekYear()%100})),en('gggg','weekYear'),en('ggggg','weekYear'),en('GGGG','isoWeekYear'),en('GGGGG','isoWeekYear'),C('weekYear','gg'),C('isoWeekYear','GG'),U('weekYear',1),U('isoWeekYear',1),ue('G',ie),ue('g',ie),ue('GG',Q,q),ue('gg',Q,q),ue('GGGG',te,J),ue('gggg',te,J),ue('GGGGG',ne,B),ue('ggggg',ne,B),_e(['gggg','ggggg','GGGG','GGGGG'],(function(e,t,n,r){t[r.substr(0,2)]=D(e)})),_e(['gg','GG'],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),G('Q',0,'Qo','quarter'),C('quarter','Q'),U('quarter',7),ue('Q',z),fe('Q',(function(e,t){t[1]=3*(D(e)-1)})),G('D',['DD',2],'Do','date'),C('date','D'),U('date',9),ue('D',Q),ue('DD',Q,q),ue('Do',(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(['D','DD'],2),fe('Do',(function(e,t){t[2]=D(e.match(Q)[0])}));var rn=we('Date',!0);G('DDD',['DDDD',3],'DDDo','dayOfYear'),C('dayOfYear','DDD'),U('dayOfYear',4),ue('DDD',ee),ue('DDDD',$),fe(['DDD','DDDD'],(function(e,t,n){n._dayOfYear=D(e)})),G('m',['mm',2],0,'minute'),C('minute','m'),U('minute',14),ue('m',Q),ue('mm',Q,q),fe(['m','mm'],4);var sn=we('Minutes',!1);G('s',['ss',2],0,'second'),C('second','s'),U('second',15),ue('s',Q),ue('ss',Q,q),fe(['s','ss'],5);var an,on=we('Seconds',!1);for(G('S',0,0,(function(){return~~(this.millisecond()/100)})),G(0,['SS',2],0,(function(){return~~(this.millisecond()/10)})),G(0,['SSS',3],0,'millisecond'),G(0,['SSSS',4],0,(function(){return 10*this.millisecond()})),G(0,['SSSSS',5],0,(function(){return 100*this.millisecond()})),G(0,['SSSSSS',6],0,(function(){return 1e3*this.millisecond()})),G(0,['SSSSSSS',7],0,(function(){return 1e4*this.millisecond()})),G(0,['SSSSSSSS',8],0,(function(){return 1e5*this.millisecond()})),G(0,['SSSSSSSSS',9],0,(function(){return 1e6*this.millisecond()})),C('millisecond','ms'),U('millisecond',16),ue('S',ee,z),ue('SS',ee,q),ue('SSS',ee,$),an='SSSS';an.length<=9;an+='S')ue(an,re);function ln(e,t){t[6]=D(1e3*('0.'+e))}for(an='S';an.length<=9;an+='S')fe(an,ln);var un=we('Milliseconds',!1);G('z',0,0,'zoneAbbr'),G('zz',0,0,'zoneName');var dn=v.prototype;function cn(e){return e}dn.add=Zt,dn.calendar=function(e,t){var n=e||St(),i=Nt(n,this).startOf('day'),s=r.calendarFormat(this,i)||'sameElse',a=t&&(x(t[s])?t[s].call(this,n):t[s]);return this.format(a||this.localeData().calendar(s,this,St(n)))},dn.clone=function(){return new v(this)},dn.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Nt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=F(t)){case'year':s=qt(this,r)/12;break;case'month':s=qt(this,r);break;case'quarter':s=qt(this,r)/3;break;case'second':s=(this-r)/1e3;break;case'minute':s=(this-r)/6e4;break;case'hour':s=(this-r)/36e5;break;case'day':s=(this-r-i)/864e5;break;case'week':s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:k(s)},dn.endOf=function(e){var t;if(void 0===(e=F(e))||'millisecond'===e||!this.isValid())return this;var n=this._isUTC?Kt:Xt;switch(e){case'year':t=n(this.year()+1,0,1)-1;break;case'quarter':t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case'month':t=n(this.year(),this.month()+1,1)-1;break;case'week':t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case'isoWeek':t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case'day':case'date':t=n(this.year(),this.month(),this.date()+1)-1;break;case'hour':t=this._d.valueOf(),t+=36e5-Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case'minute':t=this._d.valueOf(),t+=6e4-Qt(t,6e4)-1;break;case'second':t=this._d.valueOf(),t+=1e3-Qt(t,1e3)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=j(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(St(),e)},dn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(St(),e)},dn.get=function(e){return x(this[e=F(e)])?this[e]():this},dn.invalidAt=function(){return f(this).overflow},dn.isAfter=function(e,t){var n=w(e)?e:St(e);return!(!this.isValid()||!n.isValid())&&('millisecond'===(t=F(t)||'millisecond')?this.valueOf()>n.valueOf():n.valueOf()9999?j(n,t?'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]':'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace('Z',j(n,'Z')):j(n,t?'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]':'YYYY-MM-DD[T]HH:mm:ss.SSSZ')},dn.inspect=function(){if(!this.isValid())return'moment.invalid(/* '+this._i+' */)';var e='moment',t='';this.isLocal()||(e=0===this.utcOffset()?'moment.utc':'moment.parseZone',t='Z');var n='['+e+'(\"]',r=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY',i=t+'[\")]';return this.format(n+r+'-MM-DD[T]HH:mm:ss.SSS'+i)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ')},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=ve,dn.isLeapYear=function(){return ye(this.year())},dn.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=xe,dn.daysInMonth=function(){return Me(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),'d')},dn.isoWeek=dn.isoWeeks=function(e){var t=Ue(this,1,4).week;return null==e?t:this.add(7*(e-t),'d')},dn.weeksInYear=function(){var e=this.localeData()._week;return Ee(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Ee(this.year(),1,4)},dn.date=rn,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return'string'!=typeof e?e:isNaN(e)?'number'==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,'d')):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,'d')},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return'string'==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf('day')-this.clone().startOf('year'))/864e5)+1;return null==e?t:this.add(e-t,'d')},dn.hour=dn.hours=Xe,dn.minute=dn.minutes=sn,dn.second=dn.seconds=on,dn.millisecond=dn.milliseconds=un,dn.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if('string'==typeof e){if(null===(e=Ft(ae,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=Ht(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,'m'),s!==e&&(!t||this._changeInProgress?jt(this,At(e-s,'m'),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:Ht(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),'m')),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if('string'==typeof this._i){var e=Ft(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?St(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Ut,dn.isUTC=Ut,dn.zoneAbbr=function(){return this._isUTC?'UTC':''},dn.zoneName=function(){return this._isUTC?'Coordinated Universal Time':''},dn.dates=b('dates accessor is deprecated. Use date instead.',rn),dn.months=b('months accessor is deprecated. Use month instead',xe),dn.years=b('years accessor is deprecated. Use year instead',ve),dn.zone=b('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',(function(e,t){return null!=e?('string'!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),dn.isDSTShifted=b('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Dt(e))._a){var t=e._isUTC?h(e._a):St(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=W.prototype;function fn(e,t,n,r){var i=at(),s=h().set(r,t);return i[n](s,e)}function _n(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||'',null!=t)return fn(e,t,n,'month');var r,i=[];for(r=0;r<12;r++)i[r]=fn(e,r,n,'month');return i}function mn(e,t,n,r){'boolean'==typeof e?(o(t)&&(n=t,t=void 0),t=t||''):(n=t=e,e=!1,o(t)&&(n=t,t=void 0),t=t||'');var i,s=at(),a=e?s._week.dow:0;if(null!=n)return fn(t,(n+a)%7,r,'day');var l=[];for(i=0;i<7;i++)l[i]=fn(t,(i+a)%7,r,'day');return l}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return x(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace('%d',e)},hn.preparse=cn,hn.postformat=cn,hn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return x(i)?i(e,t,n,r):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?'future':'past'];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this['_'+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+'|'+/\\d{1,2}/.source)},hn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Se).test(t)?'format':'standalone'][e.month()]:i(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Se.test(t)?'format':'standalone'][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Te.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp('^'+this.months(i,'').replace('.','')+'$','i'),this._shortMonthsParse[r]=new RegExp('^'+this.monthsShort(i,'').replace('.','')+'$','i')),n||this._monthsParse[r]||(s='^'+this.months(i,'')+'|^'+this.monthsShort(i,''),this._monthsParse[r]=new RegExp(s.replace('.',''),'i')),n&&'MMMM'===t&&this._longMonthsParse[r].test(e))return r;if(n&&'MMM'===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(d(this,'_monthsRegex')||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,'_monthsRegex')||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,'_monthsRegex')||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,'_monthsShortRegex')||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ue(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?'format':'standalone'];return!0===e?Le(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?Le(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?Le(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp('^'+this.weekdays(i,'').replace('.','\\\\.?')+'$','i'),this._shortWeekdaysParse[r]=new RegExp('^'+this.weekdaysShort(i,'').replace('.','\\\\.?')+'$','i'),this._minWeekdaysParse[r]=new RegExp('^'+this.weekdaysMin(i,'').replace('.','\\\\.?')+'$','i')),this._weekdaysParse[r]||(s='^'+this.weekdays(i,'')+'|^'+this.weekdaysShort(i,'')+'|^'+this.weekdaysMin(i,''),this._weekdaysParse[r]=new RegExp(s.replace('.',''),'i')),n&&'dddd'===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&'ddd'===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&'dd'===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,'_weekdaysRegex')||(this._weekdaysRegex=je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,'_weekdaysShortRegex')||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,'_weekdaysRegex')||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,'_weekdaysMinRegex')||(this._weekdaysMinRegex=ze),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return'p'===(e+'').toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?'pm':'PM':n?'am':'AM'},it('en',{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===D(e%100/10)?'th':1===t?'st':2===t?'nd':3===t?'rd':'th')}}),r.lang=b('moment.lang is deprecated. Use moment.locale instead.',it),r.langData=b('moment.langData is deprecated. Use moment.localeData instead.',at);var pn=Math.abs;function yn(e,t,n,r){var i=At(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function vn(e){return 4800*e/146097}function wn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}var Dn=kn('ms'),Mn=kn('s'),Sn=kn('m'),bn=kn('h'),Yn=kn('d'),Tn=kn('w'),On=kn('M'),xn=kn('Q'),Pn=kn('y');function Wn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Rn=Wn('milliseconds'),Cn=Wn('seconds'),Fn=Wn('minutes'),Nn=Wn('hours'),Hn=Wn('days'),Un=Wn('months'),En=Wn('years'),Ln=Math.round,An={ss:44,s:45,m:45,h:22,d:26,M:11};function Vn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var In=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function jn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=In(this._milliseconds)/1e3,r=In(this._days),i=In(this._months);e=k(n/60),t=k(e/60),n%=60,e%=60;var s=k(i/12),a=i%=12,o=r,l=t,u=e,d=n?n.toFixed(3).replace(/\\.?0+$/,''):'',c=this.asSeconds();if(!c)return'P0D';var h=c<0?'-':'',f=Gn(this._months)!==Gn(c)?'-':'',_=Gn(this._days)!==Gn(c)?'-':'',m=Gn(this._milliseconds)!==Gn(c)?'-':'';return h+'P'+(s?f+s+'Y':'')+(a?f+a+'M':'')+(o?_+o+'D':'')+(l||u||d?'T':'')+(l?m+l+'H':'')+(u?m+u+'M':'')+(d?m+d+'S':'')}var Zn=xt.prototype;return Zn.isValid=function(){return this._isValid},Zn.abs=function(){var e=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),e.milliseconds=pn(e.milliseconds),e.seconds=pn(e.seconds),e.minutes=pn(e.minutes),e.hours=pn(e.hours),e.months=pn(e.months),e.years=pn(e.years),this},Zn.add=function(e,t){return yn(this,e,t,1)},Zn.subtract=function(e,t){return yn(this,e,t,-1)},Zn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if('month'===(e=F(e))||'quarter'===e||'year'===e)switch(t=this._days+r/864e5,n=this._months+vn(t),e){case'month':return n;case'quarter':return n/3;case'year':return n/12}else switch(t=this._days+Math.round(wn(this._months)),e){case'week':return t/7+r/6048e5;case'day':return t+r/864e5;case'hour':return 24*t+r/36e5;case'minute':return 1440*t+r/6e4;case'second':return 86400*t+r/1e3;case'millisecond':return Math.floor(864e5*t)+r;default:throw new Error('Unknown unit '+e)}},Zn.asMilliseconds=Dn,Zn.asSeconds=Mn,Zn.asMinutes=Sn,Zn.asHours=bn,Zn.asDays=Yn,Zn.asWeeks=Tn,Zn.asMonths=On,Zn.asQuarters=xn,Zn.asYears=Pn,Zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*D(this._months/12):NaN},Zn._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*gn(wn(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=k(s/1e3),l.seconds=e%60,t=k(e/60),l.minutes=t%60,n=k(t/60),l.hours=n%24,a+=k(n/24),i=k(vn(a)),o+=i,a-=gn(wn(i)),r=k(o/12),o%=12,l.days=a,l.months=o,l.years=r,this},Zn.clone=function(){return At(this)},Zn.get=function(e){return e=F(e),this.isValid()?this[e+'s']():NaN},Zn.milliseconds=Rn,Zn.seconds=Cn,Zn.minutes=Fn,Zn.hours=Nn,Zn.days=Hn,Zn.weeks=function(){return k(this.days()/7)},Zn.months=Un,Zn.years=En,Zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=At(e).abs(),i=Ln(r.as('s')),s=Ln(r.as('m')),a=Ln(r.as('h')),o=Ln(r.as('d')),l=Ln(r.as('M')),u=Ln(r.as('y')),d=i<=An.ss&&['s',i]||i0,d[4]=n,Vn.apply(null,d)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Zn.toISOString=jn,Zn.toString=jn,Zn.toJSON=jn,Zn.locale=$t,Zn.localeData=Bt,Zn.toIsoString=b('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',jn),Zn.lang=Jt,G('X',0,0,'unix'),G('x',0,0,'valueOf'),ue('x',ie),ue('X',/[+-]?\\d+(\\.\\d{1,3})?/),fe('X',(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),fe('x',(function(e,t,n){n._d=new Date(D(e))})),r.version='2.24.0',t=St,r.fn=dn,r.min=function(){var e=[].slice.call(arguments,0);return Tt('isBefore',e)},r.max=function(){var e=[].slice.call(arguments,0);return Tt('isAfter',e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(e){return St(1e3*e)},r.months=function(e,t){return _n(e,t,'months')},r.isDate=l,r.locale=it,r.invalid=m,r.duration=At,r.isMoment=w,r.weekdays=function(e,t,n){return mn(e,t,n,'weekdays')},r.parseZone=function(){return St.apply(null,arguments).parseZone()},r.localeData=at,r.isDuration=Pt,r.monthsShort=function(e,t){return _n(e,t,'monthsShort')},r.weekdaysMin=function(e,t,n){return mn(e,t,n,'weekdaysMin')},r.defineLocale=st,r.updateLocale=function(e,t){if(null!=t){var n,r,i=Ke;null!=(r=rt(e))&&(i=r._config),t=P(i,t),(n=new W(t)).parentLocale=et[e],et[e]=n,it(e)}else null!=et[e]&&(null!=et[e].parentLocale?et[e]=et[e].parentLocale:null!=et[e]&&delete et[e]);return et[e]},r.locales=function(){return Y(et)},r.weekdaysShort=function(e,t,n){return mn(e,t,n,'weekdaysShort')},r.normalizeUnits=F,r.relativeTimeRounding=function(e){return void 0===e?Ln:'function'==typeof e&&(Ln=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==An[e]&&(void 0===t?An[e]:(An[e]=t,'s'===e&&(An.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,'days',!0);return n<-6?'sameElse':n<-1?'lastWeek':n<0?'lastDay':n<1?'sameDay':n<2?'nextDay':n<7?'nextWeek':'sameElse'},r.prototype=dn,r.HTML5_FMT={DATETIME_LOCAL:'YYYY-MM-DDTHH:mm',DATETIME_LOCAL_SECONDS:'YYYY-MM-DDTHH:mm:ss',DATETIME_LOCAL_MS:'YYYY-MM-DDTHH:mm:ss.SSS',DATE:'YYYY-MM-DD',TIME:'HH:mm',TIME_SECONDS:'HH:mm:ss',TIME_MS:'HH:mm:ss.SSS',WEEK:'GGGG-[W]WW',MONTH:'YYYY-MM'},r}()}).call(this,n(3)(e))},function(e,t,n){var r=n(2),i=n(5);e.exports=i(r,contact,reports)},function(e,t,n){const r=n(0),i=n(4),{today:s,MAX_DAYS_IN_PREGNANCY:a,isHighRiskPregnancy:o,getNewestReport:l,getSubsequentPregnancyFollowUps:u,getSubsequentDeliveries:d,isAlive:c,isReadyForNewPregnancy:h,isReadyForDelivery:f,isActivePregnancy:_,countANCFacilityVisits:m,getAllRiskFactors:p,getLatestDangerSignsForPregnancy:y,getNextANCVisitDate:g,getMostRecentLMPDateForPregnancy:v,getMostRecentEDDForPregnancy:w,getDeliveryDate:k,getFormArraySubmittedInWindow:D,getRecentANCVisitWithEvent:M,getAllRiskFactorExtra:S,getField:b}=i,Y=contact,T=lineage,O=reports,x={alive:c(Y),muted:!1,show_pregnancy_form:h(Y,O),show_delivery_form:f(Y,O)},P=[{appliesToType:'person',label:'patient_id',value:Y.patient_id,width:4},{appliesToType:'person',label:'contact.age',value:Y.date_of_birth,width:4,filter:'age'},{appliesToType:'person',label:'contact.sex',value:'contact.sex.'+Y.sex,translate:!0,width:4},{appliesToType:'person',label:'person.field.phone',value:Y.phone,width:4},{appliesToType:'person',label:'person.field.alternate_phone',value:Y.phone_alternate,width:4},{appliesToType:'person',label:'External ID',value:Y.external_id,width:4},{appliesToType:'person',label:'contact.parent',value:T,filter:'lineage'},{appliesToType:'!person',label:'contact',value:Y.contact&&Y.contact.name,width:4},{appliesToType:'!person',label:'contact.phone',value:Y.contact&&Y.contact.phone,width:4},{appliesToType:'!person',label:'External ID',value:Y.external_id,width:4},{appliesToType:'!person',appliesIf:function(){return Y.parent&&T[0]},label:'contact.parent',value:T,filter:'lineage'},{appliesToType:'person',label:'contact.notes',value:Y.notes,width:12},{appliesToType:'!person',label:'contact.notes',value:Y.notes,width:12}];Y.short_name&&P.unshift({appliesToType:'person',label:'contact.short_name',value:Y.short_name,width:4});const W=[{label:'contact.profile.pregnancy.active',appliesToType:'report',appliesIf:function(e){return _(Y,O,e)},fields:function(e){const t=[],n=p(O,e),i=S(O,e),a=y(O,e),d=o(O,e),c=l(O,['pregnancy','pregnancy_home_visit']),h=r(c.reported_date),f=v(O,e),_=w(O,e),k=g(O,e),D=f?s.diff(f,'weeks'):null;let Y=b(e,'lmp_approx'),T=e.reported_date;u(O,e).forEach((function(e){e.reported_date>T&&'yes'===b(e,'lmp_updated')&&(T=e.reported_date,b(e,'lmp_method_approx')&&(Y=b(e,'lmp_method_approx')))}));const x=M(O,e,'migrated'),P=M(O,e,'refused'),W=x||P;if(W){const e='clear_all'===b(W,'pregnancy_ended.clear_option');t.push({label:'contact.profile.change_care',value:x?'Migrated out of area':'Refusing care',width:6},{label:'contact.profile.tasks_on_off',value:e?'Off':'On',width:6})}if(t.push({label:'Weeks Pregnant',value:D||0===D?{number:D,approximate:'yes'===Y}:'contact.profile.value.unknown',translate:!D&&0!==D,filter:D||0===D?'weeksPregnant':'',width:6},{label:'contact.profile.edd',value:_?_.valueOf():'contact.profile.value.unknown',translate:!_,filter:_?'simpleDate':'',width:6}),d){let e='';e=!n&&i?i.join(', '):n.length>1||n&&i?'contact.profile.risk.multiple':'contact.profile.danger_sign.'+n[0],t.push({label:'contact.profile.risk.high',value:e,translate:!0,icon:'icon-risk',width:6})}return a.length>0&&t.push({label:'contact.profile.danger_signs.current',value:a.length>1?'contact.profile.danger_sign.multiple':'contact.profile.danger_sign.'+a[0],translate:!0,width:6}),t.push({label:'contact.profile.visit',value:'contact.profile.visits.of',context:{count:m(O,e),total:8},translate:!0,width:6},{label:'contact.profile.last_visited',value:h.valueOf(),filter:'relativeDay',width:6}),k&&k.isSameOrAfter(s)&&t.push({label:'contact.profile.anc.next',value:k.valueOf(),filter:'simpleDate',width:6}),t},modifyContext:function(e,t){let n=b(t,'lmp_date_8601'),r=b(t,'lmp_method_approx'),i=b(t,'hiv_status_known'),s=b(t,'deworming_med_received'),a=b(t,'tt_received');const o=p(O,t),l=S(O,t);let d=b(t,'t_pregnancy_follow_up_date');u(O,t).forEach((function(e){'yes'===b(e,'lmp_updated')&&(n=b(e,'lmp_date_8601'),r=b(e,'lmp_method_approx')),i=b(e,'hiv_status_known'),s=b(e,'deworming_med_received'),a=b(e,'tt_received'),'yes'===b(e,'t_pregnancy_follow_up')&&(d=b(e,'t_pregnancy_follow_up_date'))})),e.lmp_date_8601=n,e.lmp_method_approx=r,e.is_active_pregnancy=!0,e.deworming_med_received=s,e.hiv_tested_past=i,e.tt_received_past=a,e.risk_factor_codes=o.join(' '),e.risk_factor_extra=l.join('; '),e.pregnancy_follow_up_date_recent=d,e.pregnancy_uuid=t._id}},{label:'contact.profile.death.title',appliesToType:'person',appliesIf:function(){return!c(Y)},fields:function(){const e=[];let t,n;const r=l(O,['death_report']);if(r){const e=b(r,'death_details');e&&(t=e.date_of_death,n=e.place_of_death)}else Y.date_of_death&&(t=Y.date_of_death);return e.push({label:'contact.profile.death.date',value:t||'contact.profile.value.unknown',filter:t?'simpleDate':'',translate:!t,width:6},{label:'contact.profile.death.place',value:n||'contact.profile.value.unknown',translate:!0,width:6}),e}},{label:'contact.profile.pregnancy.past',appliesToType:'report',appliesIf:function(e){if('person'!==Y.type)return!1;if('delivery'===e.form)return!0;if('pregnancy'===e.form){if(M(O,e,'abortion')||M(O,e,'miscarriage'))return!0;const t=v(O,e);return t&&s.isSameOrAfter(t.clone().add(42,'weeks'))&&0===d(O,e,a).length}return!1},fields:function(e){const t=[];let n,i,l='',u=0,c=0,h=0;if('delivery'===e.form){const s=r(e.reported_date);n=D(O,['pregnancy'],s.clone().subtract(a,'days').toDate(),s.toDate())[0],b(e,'delivery_outcome')&&(i=k(e),l=b(e,'delivery_outcome.delivery_place'),u=b(e,'delivery_outcome.babies_delivered_num'),c=b(e,'delivery_outcome.babies_deceased_num'),t.push({label:'contact.profile.delivery_date',value:i?i.valueOf():'',filter:'simpleDate',width:6},{label:'contact.profile.delivery_place',value:l,translate:!0,width:6},{label:'contact.profile.delivered_babies',value:u,width:6}))}else if('pregnancy'===e.form){n=e;const o=v(O,n),l=M(O,n,'abortion'),u=M(O,n,'miscarriage');if(l||u){let e='',n=r(0),i=0;l?(e='abortion',n=r(b(l,'pregnancy_ended.abortion_date'))):(e='miscarriage',n=r(b(u,'pregnancy_ended.miscarriage_date'))),i=n.diff(o,'weeks'),t.push({label:'contact.profile.pregnancy.end_early',value:e,translate:!0,width:6},{label:'contact.profile.pregnancy.end_date',value:n.valueOf(),filter:'simpleDate',width:6},{label:'contact.profile.pregnancy.end_weeks',value:i>0?i:'contact.profile.value.unknown',translate:i<=0,width:6})}else o&&s.isSameOrAfter(o.clone().add(42,'weeks'))&&0===d(O,e,a).length&&(i=w(O,e),t.push({label:'contact.profile.delivery_date',value:i?i.valueOf():'contact.profile.value.unknown',filter:'simpleDate',translate:!i,width:6}))}if(c>0&&b(e,'baby_death')){t.push({label:'contact.profile.deceased_babies',value:c,width:6});let n=b(e,'baby_death.baby_death_repeat');n||(n=[]);let r=0;n.forEach((function(e){r>0&&t.push({label:'',value:'',width:6}),t.push({label:'contact.profile.newborn.death_date',value:e.baby_death_date,filter:'simpleDate',width:6},{label:'contact.profile.newborn.death_place',value:e.baby_death_place,translate:!0,width:6},{label:'contact.profile.delivery.stillbirthQ',value:e.stillbirth,translate:!0,width:6}),r++,r===n.length&&t.push({label:'',value:'',width:6})}))}if(n){h=m(O,n),t.push({label:'contact.profile.anc_visit',value:h,width:3});if(o(O,n)){let e='';const r=p(O,n),i=S(O,n);e=!r&&i?i.join(', '):r.length>1||r&&i?'contact.profile.risk.multiple':'contact.profile.danger_sign.'+r[0],t.push({label:'contact.profile.risk.high',value:e,translate:!0,icon:'icon-risk',width:6})}}return t}}];e.exports={context:x,cards:W,fields:P}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,'loaded',{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,'id',{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){const r=n(0),i=r().startOf('day'),s=['pregnancy'],a=['pregnancy_home_visit'],o=['delivery'],l=['pregnancy','pregnancy_home_visit','pregnancy_danger_sign','pregannacy_danger_sign_follow_up'],u=(e,t)=>['fields',...(t||'').split('.')].reduce((e,t)=>{if(void 0!==e)return e[t]},e);function d(e,t,n,r){return e.filter((function(e){return t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r}))}function c(e,t){let n;return e.forEach((function(e){(function(e){return!!(e.form&&e.fields&&e.reported_date)})(e)&&t.includes(e.form)&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n}function h(e){return k(e)&&u(e,'lmp_date_8601')&&r(u(e,'lmp_date_8601'))}function f(e,t){let n=h(t),i=t.reported_date;return T(e,t).forEach((function(e){const t=D(s=e)&&u(s,'lmp_date_8601')&&r(u(s,'lmp_date_8601'));var s;e.reported_date>i&&'yes'===u(e,'lmp_updated')&&(i=e.reported_date,n=t)})),n}function _(e,t){const n=f(e,t);if(n)return n.clone().add(280,'days')}function m(e){return M(e)&&u(e,'delivery_outcome.delivery_date')&&r(u(e,'delivery_outcome.delivery_date'))}function p(e){const t=[];if('yes'===u(e,'t_danger_signs_referral_follow_up')){const n=u(e,'danger_signs');if(n)for(const e in n)'yes'===n[e]&&'r_danger_sign_present'!==e&&t.push(e)}return t}function y(e,t){const n=function(e){const t=[];if(!k(e))return[];if('yes'===u(e,'risk_factors.r_risk_factor_present')){'yes'===u(e,'risk_factors.risk_factors_history.first_pregnancy')&&t.push('first_pregnancy'),'yes'===u(e,'risk_factors.risk_factors_history.previous_miscarriage')&&t.push('previous_miscarriage');const n=u(e,'risk_factors.risk_factors_present.primary_condition'),r=u(e,'risk_factors.risk_factors_present.secondary_condition');n?t.push(...n.split(' ')):r&&t.push(...r.split(' '))}return t}(t);return T(e,t).forEach((function(e){n.push(...function(e){const t=[];if(!D(e))return[];if('yes'===u(e,'anc_visits_hf.risk_factors.r_risk_factor_present')){const n=u(e,'anc_visits_hf.risk_factors.new_risks');n&&t.push(...n.split(' '))}return t}(e))})),n}function g(e){let t;return e&&k(e)?t=u(e,'risk_factors.risk_factors_present.additional_risk'):e&&D(e)&&(t=u(e,'anc_visits_hf.risk_factors.additional_risk')),t}function v(e,t){const n=[],r=g(t);r&&n.push(r);return T(e,t).forEach((function(e){const t=g(e);t&&n.push(t)})),n}function w(e){return e&&!e.date_of_death}function k(e){return e&&s.includes(e.form)}function D(e){return e&&a.includes(e.form)}function M(e){return e&&o.includes(e.form)}function S(e,t,n){if('person'!==e.type||!w(e)||!k(n))return!1;const r=(f(t,n)||n.reported_date)>i.clone().subtract(294,'day'),s=Y(t,n,42).length>0,a=function(e,t){return e.filter((function(e){return k(e)&&e.reported_date>t.reported_date}))}(t,n).length>0;return r&&!s&&!a&&!b(t,n,'abortion')&&!b(t,n,'miscarriage')}function b(e,t,n){const r=c(T(e,t),a);if(r&&u(r,'pregnancy_summary.visit_option')===n)return r}function Y(e,t,n){return e.filter((function(e){return M(e)&&e.reported_date>t.reported_date&&(!n||e.reported_date>=i.clone().subtract(n,'days'))}))}function T(e,t){let n=h(t);n||(n=r(t.reported_date));return e.filter((function(e){return D(e)&&e.reported_date>t.reported_date&&r(e.reported_date)S(e))},isActivePregnancy:S,countANCFacilityVisits:function(e,t){let n=0;const r=T(e,t);return u(t,'anc_visits_hf.anc_visits_hf_past')&&!isNaN(u(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))&&(n+=parseInt(u(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))),n+=r.reduce((function(e,t){const n=u(t,'anc_visits_hf.anc_visits_hf_past');return n?(e+='yes'===n.last_visit_attended&&1,isNaN(n.visited_hf_count)?e:e+('yes'===n.report_other_visits&&parseInt(n.visited_hf_count))):0}),0),n},knowsHIVStatusInPast3Months:function(e){let t=!1;return d(e,s,i.clone().subtract(3,'months'),i).forEach((function(e){'yes'===u(e,'pregnancy_new_or_current.hiv_status.hiv_status_know')&&(t=!0)})),t},getAllRiskFactors:y,getAllRiskFactorExtra:v,getDangerSignCodes:p,getLatestDangerSignsForPregnancy:function(e,t){if(!t)return[];let n=f(e,t);n||(n=r(t.reported_date));const i=d(e,l,n.toDate(),n.clone().add(294,'days').toDate()),s=[];i.forEach(e=>{D(e)?'yes'===u(e,'pregnancy_summary.visit_option')&&s.push(e):s.push(e)});const a=c(s,l);return a?p(a):[]},getNextANCVisitDate:function(e,t){let n=u(t,'t_pregnancy_follow_up_date'),i=t.reported_date;return T(e,t).forEach((function(e){e.reported_date>i&&u(e,'t_pregnancy_follow_up_date')&&(i=e.reported_date,n=u(e,'t_pregnancy_follow_up_date'))})),r(n)},isReadyForNewPregnancy:function(e,t){if('person'!==e.type)return!1;const n=c(t,s),a=c(t,o);if(!n&&!a)return!0;if(n){if(!a||a.reported_daten.reported_date))return m(a)0&&!r.includes('!'+l))&&(!e.appliesIf||e.appliesIf()))return delete e.appliesToType,delete e.appliesIf,!0}))};return o.forEach((function(e){var t,s,o,d,c=n(e.appliesToType);if(c.includes('report')&&c.length>1)throw new Error('You cannot set appliesToType to an array which includes the type \\'report\\' and another type.');if(c.includes('report'))for(t=0;t0)return;(o=i(e,a))&&u.cards.push(o)}})),u.context=a,u}}])})); return ContactSummary;", "tasks": { - "rules": "!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p='',n(n.s=2)}([function(e,t){const n=d(Date.now()),r=['pregnancy'],i=['delivery'],o=['pregnancy_home_visit'],a=['pregnancy','pregnancy_home_visit','pregnancy_facility_visit_reminder','pregnancy_danger_sign','pregnancy_danger_sign_follow_up','delivery'];const c=(e,t)=>['fields',...(t||'').split('.')].reduce((e,t)=>{if(void 0!==e)return e[t]},e);function s(e,t){let n;return e.forEach((function(e){t.includes(e.form)&&!e.deleted&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n}function p(e){if(!e)return new Date;const t=e.split(/\\D/),n=new Date(t[0],t[1]-1,t[2]);return function(e){return e instanceof Date&&!isNaN(e)}(n)?n:new Date}function l(e){const t=new Date(e);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(e){if('string'==typeof e){if(''===e)return null;e=p(e)}return l(e).getTime()}function u(e,t){const n=l(new Date(e));return n.setDate(n.getDate()+t),n}function _(e){return r.includes(e.form)}function f(e){return o.includes(e.form)}const y=function(e,t){let n;return e.forEach((function(e){t.includes(e.form)&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n},g=function(e){return _(e)&&d(c(e,'lmp_date_8601'))};function m(e,t){return e.reports.filter((function(e){let n=g(t);return n||(n=t.reported_date),f(e)&&e.reported_date>t.reported_date&&e.reported_dater&&''!==t&&t!==n&&(r=e.reported_date,n=t)})),n}e.exports={today:n,MS_IN_DAY:864e5,MAX_DAYS_IN_PREGNANCY:294,addDays:u,isAlive:function(e){return e&&e.contact&&!e.contact.date_of_death},getTimeForMidnight:l,isFormArraySubmittedInWindow:function(e,t,n,r,i){let o=!1,a=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(o=!0,i&&a++)})),i?a>=i:o},isFormArraySubmittedInWindowExcludingThisReport:function(e,t,n,r,i,o){let a=!1,c=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&e._id!==i._id&&(a=!0,o&&c++)})),o?c>=o:a},getDateMS:d,getDateISOLocal:p,isDeliveryForm:function(e){return i.includes(e.form)},getMostRecentReport:s,getNewestPregnancyTimestamp:function(e){if(!e.contact)return;const t=s(e.reports,'pregnancy');return t?t.reported_date:0},getNewestDeliveryTimestamp:function(e){if(!e.contact)return;const t=s(e.reports,'delivery');return t?t.reported_date:0},getReportsSubmittedInWindow:function(e,t,n,r,i){const o=[];return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(i&&!i(e)||o.push(e))})),o},countReportsSubmittedInWindow:function(e,t,n,r,i){let o=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(i&&!i(e)||o++)})),o},countANCFacilityVisits:function(e,t){let n=0;const r=m(e,t);return c(t,'anc_visits_hf.anc_visits_hf_past')&&!isNaN(c(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))&&(n+=parseInt(c(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))),n+=r.reduce((function(e,t){const n=c(t,'anc_visits_hf.anc_visits_hf_past');return n?(e+='yes'===n.last_visit_attended&&1,isNaN(n.visited_hf_count)?e:e+('yes'===n.report_other_visits&&parseInt(n.visited_hf_count))):0}),0),n},isFacilityDelivery:function(e,t){return!!e&&(1===arguments.length&&(t=e),'yes'===c(t,'facility_delivery'))},getMostRecentLMPDateForPregnancy:v,getNewestReport:y,getSubsequentPregnancyFollowUps:m,isActivePregnancy:function(e,t){if(!_(t))return!1;const r=(v(e,t)||t.reported_date)>n-254016e5,i=function(e,t,r){return e.reports.filter((function(e){return'delivery'===e.form&&e.reported_date>t.reported_date&&(!r||t.reported_date>=n-864e5*r)}))}(e,t,42).length>0,a=function(e,t){return e.reports.filter((function(e){return _(e)&&e.reported_date>t.reported_date}))}(e,t).length>0;return r&&!i&&!a&&!function(e,t){const n=m(e,t),r=y(n,o);return r&&'abortion'===c(r,'pregnancy_summary.visit_option')}(e,t)&&!function(e,t){const n=m(e,t),r=y(n,o);return r&&'miscarriage'===c(r,'pregnancy_summary.visit_option')}(e,t)},getRecentANCVisitWithEvent:function(e,t,n){const r=m(e,t),i=y(r,o);if(i&&c(i,'pregnancy_summary.visit_option')===n)return i},isPregnancyTaskMuted:function(e){const t=y(e.reports,a);return t&&f(t)&&'clear_all'===c(t,'pregnancy_ended.clear_option')},getField:c}},function(e,t){e.exports=function(e){var t={};!function e(t,n){var r=Object.keys(t);for(var i in r){var o=r[i];switch(typeof t[o]){case'object':e(t[o],n);break;case'function':t[o]=t[o].bind(n)}}}(e,t),t.definition=function e(t){var n=Object.assign({},t),r=Object.keys(n);for(var i in r){var o=r[i];if(Array.isArray(n[o])){n[o]=n[o].slice(0);for(var a=0;a({id:'pregnancy-home-visit-week'+e,start:t,end:n,dueDate:function(t,n,r){const i=_(n,r);return f(i||r.reported_date,7*e)}});function h(e,t,n,r){if(t.reported_date=o},resolvedIf:h,actions:[{type:'report',form:'pregnancy_home_visit',label:'Pregnancy home visit'}],events:[...Array(21).keys()].map(e=>v(2*(e+1),6,7))},{name:'anc.facility_reminder',icon:'icon-pregnancy',title:'task.anc.facility_reminder.title',appliesTo:'reports',appliesToType:['pregnancy','pregnancy_home_visit'],appliesIf:function(e,t){return m(t,'t_pregnancy_follow_up_date')},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date),o=f(r,n.end+1).getTime();return p(e.reports,['pregnancy_facility_visit_reminder'],i,o)},actions:[{type:'report',form:'pregnancy_facility_visit_reminder',label:'Pregnancy facility visit reminder',modifyContent:function(e,t,n){e.source_visit_date=m(n,'t_pregnancy_follow_up_date')}}],events:[{id:'pregnancy-facility-visit-reminder',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_pregnancy_follow_up_date'))}}]},{name:'anc.pregnancy_danger_sign_followup',icon:'icon-pregnancy-danger',title:'task.anc.pregnancy_danger_sign_followup.title',appliesTo:'reports',appliesToType:['pregnancy','pregnancy_home_visit','pregnancy_danger_sign','pregnancy_danger_sign_follow_up'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pregnancy_danger_sign_follow_up'],i,o)},actions:[{type:'report',form:'pregnancy_danger_sign_follow_up'}],events:[{id:'pregnancy-danger-sign-follow-up',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]},{name:'anc.delivery',icon:'icon-mother-child',title:'task.anc.delivery.title',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){const n=_(e,t);return n&&f(n,336)>=o&&s(e)},resolvedIf:function(e,t,n,r){if(y(e,t,'abortion')||y(e,t,'miscarriage'))return!0;if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date),o=f(r,n.end+1).getTime();return p(e.reports,['delivery'],i,o)},actions:[{type:'report',form:'delivery'}],events:[{id:'delivery-reminder',start:28,end:42,dueDate:function(e,t,n){return f(_(t,n),i)}}]},{name:'pnc.danger_sign_followup_mother',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_mother.title',appliesTo:'reports',appliesToType:['delivery','pnc_danger_sign_follow_up_mother'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pnc_danger_sign_follow_up_mother'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_mother',modifyContent:function(e,t,n){u(n)?e.delivery_uuid=n._id:e.delivery_uuid=m(n,'inputs.delivery_uuid')}}],events:[{id:'pnc-danger-sign-follow-up-mother',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]},{name:'pnc.danger_sign_followup_baby.from_contact',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_baby.title',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return e.contact&&'yes'===e.contact.t_danger_signs_referral_follow_up&&s(e)},resolvedIf:function(e,t,n,r){const i=Math.max(f(r,-n.start).getTime(),e.contact.reported_date),o=f(r,n.end).getTime();return p(e.reports,['pnc_danger_sign_follow_up_baby'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_baby',modifyContent:function(e,t){e.delivery_uuid=t.contact.created_by_doc}}],events:[{id:'pnc-danger-sign-follow-up-baby',start:3,end:7,dueDate:function(e,t){return l(t.contact.t_danger_signs_referral_follow_up_date)}}]},{name:'pnc.danger_sign_followup_baby.from_report',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_baby.title',appliesTo:'reports',appliesToType:['pnc_danger_sign_follow_up_baby'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pnc_danger_sign_follow_up_baby'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_baby',modifyContent:function(e,t,n){e.delivery_uuid=m(n,'inputs.delivery_uuid')}}],events:[{id:'pnc-danger-sign-follow-up-baby',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]}]},function(e,t,n){const r=n(0),{isAlive:i,getSubsequentPregnancyFollowUps:o,getMostRecentLMPDateForPregnancy:a,isActivePregnancy:c,countANCFacilityVisits:s,getField:p}=r;e.exports=[{id:'deaths-this-month',type:'count',icon:'icon-death-general',goal:0,translation_key:'targets.death_reporting.deaths.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return!i(e)},date:e=>e.contact.date_of_death},{id:'pregnancy-registrations-this-month',type:'count',icon:'icon-pregnancy',goal:20,translation_key:'targets.anc.new_pregnancy_registrations.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){return!!t&&a(e,t)},date:'reported',idType:'contact'},{id:'births-this-month',type:'count',icon:'icon-infant',goal:-1,translation_key:'targets.births.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return e&&e.contact&&e.contact.date_of_birth},date:e=>e.contact.date_of_birth,dhis:{dataElement:'kB0ZBFisE0e'}},{id:'active-pregnancies',type:'count',icon:'icon-pregnancy',goal:-1,translation_key:'targets.anc.active_pregnancies.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){return c(e,t)},date:'now',idType:'contact'},{id:'active-pregnancies-1+-visits',type:'count',icon:'icon-clinic',goal:-1,translation_key:'targets.anc.active_pregnancies_1p_visits.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return s(e,t)>0},date:'now',idType:'contact'},{id:'facility-deliveries',type:'percent',icon:'icon-mother-child',goal:-1,translation_key:'targets.anc.facility_deliveries.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['delivery'],appliesIf:function(e,t){return p(t,'delivery_outcome.delivery_place')},passesIf:function(e,t){return'health_facility'===p(t,'delivery_outcome.delivery_place')},date:'now',idType:'contact',dhis:{dataElement:'e22tIwy1nKR',categoryOptionCombo:'HllvX50cXC0',attributeOptionCombo:'HllvX50cXC0'}},{id:'active-pregnancies-4+-visits',type:'count',icon:'icon-clinic',goal:-1,translation_key:'targets.anc.active_pregnancies_4p_visits.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return s(e,t)>3},date:'now',idType:'contact'},{id:'active-pregnancies-8+-contacts',type:'count',icon:'icon-follow-up',goal:-1,translation_key:'targets.anc.active_pregnancies_8p_contacts.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return 1+(o(e,t).length||0)+(s(e,t)||0)>7},date:'now',idType:'contact'}]},function(e,t,n){var r=n(1),i=n(6);function o(e,t,n,r,i,o){var a;if(e.appliesToType){var c;if('contacts'===e.appliesTo){if(!i.contact)return;c='contact'===i.contact.type?i.contact.contact_type:i.contact.type}else{if(!o)return;c=o.form}if(-1===e.appliesToType.indexOf(c))return}if('scheduled_tasks'===e.appliesTo||!e.appliesIf||e.appliesIf(i,o))if('scheduled_tasks'===e.appliesTo){if(o&&e.appliesIf){if(!o.scheduled_tasks)return;for(a=0;a['fields',...(t||'').split('.')].reduce((e,t)=>{if(void 0!==e)return e[t]},e);function s(e,t){let n;return e.forEach((function(e){t.includes(e.form)&&!e.deleted&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n}function p(e){if(!e)return new Date;const t=e.split(/\\D/),n=new Date(t[0],t[1]-1,t[2]);return function(e){return e instanceof Date&&!isNaN(e)}(n)?n:new Date}function l(e){const t=new Date(e);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(e){if('string'==typeof e){if(''===e)return null;e=p(e)}return l(e).getTime()}function u(e,t){const n=l(new Date(e));return n.setDate(n.getDate()+t),n}function _(e){return r.includes(e.form)}function f(e){return o.includes(e.form)}const y=function(e,t){let n;return e.forEach((function(e){t.includes(e.form)&&(!n||e.reported_date>n.reported_date)&&(n=e)})),n},g=function(e){return _(e)&&d(c(e,'lmp_date_8601'))};function m(e,t){return e.reports.filter((function(e){let n=g(t);return n||(n=t.reported_date),f(e)&&e.reported_date>t.reported_date&&e.reported_dater&&''!==t&&t!==n&&(r=e.reported_date,n=t)})),n}e.exports={today:n,MS_IN_DAY:864e5,MAX_DAYS_IN_PREGNANCY:294,addDays:u,isAlive:function(e){return e&&e.contact&&!e.contact.date_of_death},getTimeForMidnight:l,isFormArraySubmittedInWindow:function(e,t,n,r,i){let o=!1,a=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(o=!0,i&&a++)})),i?a>=i:o},isFormArraySubmittedInWindowExcludingThisReport:function(e,t,n,r,i,o){let a=!1,c=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&e._id!==i._id&&(a=!0,o&&c++)})),o?c>=o:a},getDateMS:d,getDateISOLocal:p,isDeliveryForm:function(e){return i.includes(e.form)},getMostRecentReport:s,getNewestPregnancyTimestamp:function(e){if(!e.contact)return;const t=s(e.reports,'pregnancy');return t?t.reported_date:0},getNewestDeliveryTimestamp:function(e){if(!e.contact)return;const t=s(e.reports,'delivery');return t?t.reported_date:0},getReportsSubmittedInWindow:function(e,t,n,r,i){const o=[];return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(i&&!i(e)||o.push(e))})),o},countReportsSubmittedInWindow:function(e,t,n,r,i){let o=0;return e.forEach((function(e){t.includes(e.form)&&e.reported_date>=n&&e.reported_date<=r&&(i&&!i(e)||o++)})),o},countANCFacilityVisits:function(e,t){let n=0;const r=m(e,t);return c(t,'anc_visits_hf.anc_visits_hf_past')&&!isNaN(c(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))&&(n+=parseInt(c(t,'anc_visits_hf.anc_visits_hf_past.visited_hf_count'))),n+=r.reduce((function(e,t){const n=c(t,'anc_visits_hf.anc_visits_hf_past');return n?(e+='yes'===n.last_visit_attended&&1,isNaN(n.visited_hf_count)?e:e+('yes'===n.report_other_visits&&parseInt(n.visited_hf_count))):0}),0),n},isFacilityDelivery:function(e,t){return!!e&&(1===arguments.length&&(t=e),'yes'===c(t,'facility_delivery'))},getMostRecentLMPDateForPregnancy:v,getNewestReport:y,getSubsequentPregnancyFollowUps:m,isActivePregnancy:function(e,t){if(!_(t))return!1;const r=(v(e,t)||t.reported_date)>n-254016e5,i=function(e,t,r){return e.reports.filter((function(e){return'delivery'===e.form&&e.reported_date>t.reported_date&&(!r||t.reported_date>=n-864e5*r)}))}(e,t,42).length>0,a=function(e,t){return e.reports.filter((function(e){return _(e)&&e.reported_date>t.reported_date}))}(e,t).length>0;return r&&!i&&!a&&!function(e,t){const n=m(e,t),r=y(n,o);return r&&'abortion'===c(r,'pregnancy_summary.visit_option')}(e,t)&&!function(e,t){const n=m(e,t),r=y(n,o);return r&&'miscarriage'===c(r,'pregnancy_summary.visit_option')}(e,t)},getRecentANCVisitWithEvent:function(e,t,n){const r=m(e,t),i=y(r,o);if(i&&c(i,'pregnancy_summary.visit_option')===n)return i},isPregnancyTaskMuted:function(e){const t=y(e.reports,a);return t&&f(t)&&'clear_all'===c(t,'pregnancy_ended.clear_option')},getField:c}},function(e,t){e.exports=function(e){var t={};!function e(t,n){var r=Object.keys(t);for(var i in r){var o=r[i];switch(typeof t[o]){case'object':e(t[o],n);break;case'function':t[o]=t[o].bind(n)}}}(e,t),t.definition=function e(t){var n=Object.assign({},t),r=Object.keys(n);for(var i in r){var o=r[i];if(Array.isArray(n[o])){n[o]=n[o].slice(0);for(var a=0;a({id:'pregnancy-home-visit-week'+e,start:t,end:n,dueDate:function(t,n,r){const i=_(n,r);return f(i||r.reported_date,7*e)}});function h(e,t,n,r){if(t.reported_date=o},resolvedIf:h,actions:[{type:'report',form:'pregnancy_home_visit',label:'Pregnancy home visit'}],events:[...Array(21).keys()].map(e=>v(2*(e+1),6,7))},{name:'anc.facility_reminder',icon:'icon-pregnancy',title:'task.anc.facility_reminder.title',appliesTo:'reports',appliesToType:['pregnancy','pregnancy_home_visit'],appliesIf:function(e,t){return m(t,'t_pregnancy_follow_up_date')},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date),o=f(r,n.end+1).getTime();return p(e.reports,['pregnancy_facility_visit_reminder'],i,o)},actions:[{type:'report',form:'pregnancy_facility_visit_reminder',label:'Pregnancy facility visit reminder',modifyContent:function(e,t,n){e.source_visit_date=m(n,'t_pregnancy_follow_up_date')}}],events:[{id:'pregnancy-facility-visit-reminder',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_pregnancy_follow_up_date'))}}]},{name:'anc.pregnancy_danger_sign_followup',icon:'icon-pregnancy-danger',title:'task.anc.pregnancy_danger_sign_followup.title',appliesTo:'reports',appliesToType:['pregnancy','pregnancy_home_visit','pregnancy_danger_sign','pregnancy_danger_sign_follow_up'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pregnancy_danger_sign_follow_up'],i,o)},actions:[{type:'report',form:'pregnancy_danger_sign_follow_up'}],events:[{id:'pregnancy-danger-sign-follow-up',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]},{name:'anc.delivery',icon:'icon-mother-child',title:'task.anc.delivery.title',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){const n=_(e,t);return n&&f(n,336)>=o&&s(e)},resolvedIf:function(e,t,n,r){if(y(e,t,'abortion')||y(e,t,'miscarriage'))return!0;if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date),o=f(r,n.end+1).getTime();return p(e.reports,['delivery'],i,o)},actions:[{type:'report',form:'delivery'}],events:[{id:'delivery-reminder',start:28,end:42,dueDate:function(e,t,n){return f(_(t,n),i)}}]},{name:'pnc.danger_sign_followup_mother',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_mother.title',appliesTo:'reports',appliesToType:['delivery','pnc_danger_sign_follow_up_mother'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pnc_danger_sign_follow_up_mother'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_mother',modifyContent:function(e,t,n){u(n)?e.delivery_uuid=n._id:e.delivery_uuid=m(n,'inputs.delivery_uuid')}}],events:[{id:'pnc-danger-sign-follow-up-mother',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]},{name:'pnc.danger_sign_followup_baby.from_contact',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_baby.title',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return e.contact&&'yes'===e.contact.t_danger_signs_referral_follow_up&&s(e)},resolvedIf:function(e,t,n,r){const i=Math.max(f(r,-n.start).getTime(),e.contact.reported_date),o=f(r,n.end).getTime();return p(e.reports,['pnc_danger_sign_follow_up_baby'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_baby',modifyContent:function(e,t){e.delivery_uuid=t.contact.created_by_doc}}],events:[{id:'pnc-danger-sign-follow-up-baby',start:3,end:7,dueDate:function(e,t){return l(t.contact.t_danger_signs_referral_follow_up_date)}}]},{name:'pnc.danger_sign_followup_baby.from_report',icon:'icon-follow-up',title:'task.pnc.danger_sign_followup_baby.title',appliesTo:'reports',appliesToType:['pnc_danger_sign_follow_up_baby'],appliesIf:function(e,t){return'yes'===m(t,'t_danger_signs_referral_follow_up')&&s(e)},resolvedIf:function(e,t,n,r){if(g(e))return!0;const i=Math.max(f(r,-n.start).getTime(),t.reported_date+1),o=f(r,n.end+1).getTime();return p(e.reports,['pnc_danger_sign_follow_up_baby'],i,o)},actions:[{type:'report',form:'pnc_danger_sign_follow_up_baby',modifyContent:function(e,t,n){e.delivery_uuid=m(n,'inputs.delivery_uuid')}}],events:[{id:'pnc-danger-sign-follow-up-baby',start:3,end:7,dueDate:function(e,t,n){return l(m(n,'t_danger_signs_referral_follow_up_date'))}}]}]},function(e,t,n){const r=n(0),{isAlive:i,getSubsequentPregnancyFollowUps:o,getMostRecentLMPDateForPregnancy:a,isActivePregnancy:c,countANCFacilityVisits:s,getField:p}=r;e.exports=[{id:'deaths-this-month',type:'count',icon:'icon-death-general',goal:0,translation_key:'targets.death_reporting.deaths.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return!i(e)},date:e=>e.contact.date_of_death},{id:'pregnancy-registrations-this-month',type:'count',icon:'icon-pregnancy',goal:20,translation_key:'targets.anc.new_pregnancy_registrations.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){return!!t&&a(e,t)},date:'reported',idType:'contact'},{id:'births-this-month',type:'count',icon:'icon-infant',goal:-1,translation_key:'targets.births.title',subtitle_translation_key:'targets.this_month.subtitle',appliesTo:'contacts',appliesToType:['person'],appliesIf:function(e){return e&&e.contact&&e.contact.date_of_birth},date:e=>e.contact.date_of_birth,dhis:{dataElement:'kB0ZBFisE0e'}},{id:'active-pregnancies',type:'count',icon:'icon-pregnancy',goal:-1,translation_key:'targets.anc.active_pregnancies.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){return c(e,t)},date:'now',idType:'contact'},{id:'active-pregnancies-1+-visits',type:'count',icon:'icon-clinic',goal:-1,translation_key:'targets.anc.active_pregnancies_1p_visits.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return s(e,t)>0},date:'now',idType:'contact'},{id:'facility-deliveries',type:'percent',icon:'icon-mother-child',goal:-1,translation_key:'targets.anc.facility_deliveries.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['delivery'],appliesIf:function(e,t){return p(t,'delivery_outcome.delivery_place')},passesIf:function(e,t){return'health_facility'===p(t,'delivery_outcome.delivery_place')},date:'now',idType:'contact',dhis:{dataElement:'e22tIwy1nKR',categoryOptionCombo:'HllvX50cXC0',attributeOptionCombo:'HllvX50cXC0'}},{id:'active-pregnancies-4+-visits',type:'count',icon:'icon-clinic',goal:-1,translation_key:'targets.anc.active_pregnancies_4p_visits.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return s(e,t)>3},date:'now',idType:'contact'},{id:'active-pregnancies-8+-contacts',type:'count',icon:'icon-follow-up',goal:-1,translation_key:'targets.anc.active_pregnancies_8p_contacts.title',subtitle_translation_key:'targets.all_time.subtitle',appliesTo:'reports',appliesToType:['pregnancy'],appliesIf:function(e,t){if(!c(e,t))return!1;return 1+(o(e,t).length||0)+(s(e,t)||0)>7},date:'now',idType:'contact'}]},function(e,t,n){var r=n(1),i=n(6);function o(e,t,n,r,i,o){var a;if(e.appliesToType){var c;if('contacts'===e.appliesTo){if(!i.contact)return;c='contact'===i.contact.type?i.contact.contact_type:i.contact.type}else{if(!o)return;c=o.form}if(-1===e.appliesToType.indexOf(c))return}if('scheduled_tasks'===e.appliesTo||!e.appliesIf||e.appliesIf(i,o))if('scheduled_tasks'===e.appliesTo){if(o&&e.appliesIf){if(!o.scheduled_tasks)return;for(a=0;a