diff --git a/README.md b/README.md index 0b2f6fb6..64b8e0f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Speedtest Tracker -[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.7.2-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE) +[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.7.3-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE) This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results. diff --git a/app/Events/SpeedtestFailedEvent.php b/app/Events/SpeedtestFailedEvent.php new file mode 100644 index 00000000..ad854edd --- /dev/null +++ b/app/Events/SpeedtestFailedEvent.php @@ -0,0 +1,36 @@ +getMessage()); + $test = false; } - return (isset($test)) ? $test : false; + if(!$test) { + Speedtest::create([ + 'ping' => 0, + 'upload' => 0, + 'download' => 0, + 'failed' => true, + 'scheduled' => $scheduled, + ]); + } + + if(!isset($test) || $test == false) { + return false; + } + + return $test; } /** @@ -83,6 +99,7 @@ class SpeedtestHelper { $t = Carbon::now()->subDay(); $s = Speedtest::select(DB::raw('AVG(ping) as ping, AVG(download) as download, AVG(upload) as upload')) ->where('created_at', '>=', $t) + ->where('failed', false) ->first() ->toArray(); diff --git a/app/Jobs/SpeedtestJob.php b/app/Jobs/SpeedtestJob.php index a34b91c6..b1669ff7 100644 --- a/app/Jobs/SpeedtestJob.php +++ b/app/Jobs/SpeedtestJob.php @@ -3,12 +3,14 @@ namespace App\Jobs; use App\Events\SpeedtestCompleteEvent; +use App\Events\SpeedtestFailedEvent; use App\Helpers\SpeedtestHelper; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Log; class SpeedtestJob implements ShouldQueue { @@ -35,7 +37,13 @@ class SpeedtestJob implements ShouldQueue { $output = SpeedtestHelper::output(); $speedtest = SpeedtestHelper::runSpeedtest($output, $this->scheduled); - event(new SpeedtestCompleteEvent($speedtest)); + Log::info($speedtest); + if($speedtest == false) { + Log::info('speedtest == false'); + event(new SpeedtestFailedEvent()); + } else { + event(new SpeedtestCompleteEvent($speedtest)); + } return $speedtest; } } diff --git a/app/Listeners/SpeedtestFailedListener.php b/app/Listeners/SpeedtestFailedListener.php new file mode 100644 index 00000000..0a0ae6cc --- /dev/null +++ b/app/Listeners/SpeedtestFailedListener.php @@ -0,0 +1,54 @@ +notify(new SpeedtestFailedSlack()); + } catch(Exception $e) { + Log::notice('Your sleck webhook is invalid'); + Log::notice($e); + } + } + + if(env('TELEGRAM_BOT_TOKEN') && env('TELEGRAM_CHAT_ID')) { + try { + Notification::route(TelegramChannel::class, env('TELEGRAM_CHAT_ID')) + ->notify(new SpeedtestFailedTelegram()); + } catch(Exception $e) { + Log::notice('Your telegram settings are invalid'); + Log::notice($e); + } + } + } +} diff --git a/app/Notifications/SpeedtestFailedSlack.php b/app/Notifications/SpeedtestFailedSlack.php new file mode 100644 index 00000000..cafb08ce --- /dev/null +++ b/app/Notifications/SpeedtestFailedSlack.php @@ -0,0 +1,53 @@ +error() + ->attachment(function ($attachment) { + $attachment->title('Failed speedtest') + ->content('Something went wrong running your speedtest'); + }); + } +} diff --git a/app/Notifications/SpeedtestFailedTelegram.php b/app/Notifications/SpeedtestFailedTelegram.php new file mode 100644 index 00000000..a521e28e --- /dev/null +++ b/app/Notifications/SpeedtestFailedTelegram.php @@ -0,0 +1,47 @@ +to(env('TELEGRAM_CHAT_ID')) + ->content($msg) + ->options(['parse_mode' => 'Markdown']); + } +} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 77a07a2a..e34e5a20 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -3,8 +3,10 @@ namespace App\Providers; use App\Events\SpeedtestCompleteEvent; +use App\Events\SpeedtestFailedEvent; use App\Events\SpeedtestOverviewEvent; use App\Listeners\SpeedtestCompleteListener; +use App\Listeners\SpeedtestFailedListener; use App\Listeners\SpeedtestOverviewListener; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; @@ -28,6 +30,9 @@ class EventServiceProvider extends ServiceProvider SpeedtestOverviewEvent::class => [ SpeedtestOverviewListener::class ], + SpeedtestFailedEvent::class => [ + SpeedtestFailedListener::class + ], ]; /** diff --git a/app/Speedtest.php b/app/Speedtest.php index 8e5ecfb7..f0bc85ad 100644 --- a/app/Speedtest.php +++ b/app/Speedtest.php @@ -21,6 +21,7 @@ class Speedtest extends Model 'server_host', 'url', 'scheduled', + 'failed', ]; protected $table = 'speedtests'; diff --git a/changelog.json b/changelog.json index c8b74416..50b2c591 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,14 @@ { + "1.7.3": [ + { + "description": "Updated dependencies", + "link": "" + }, + { + "description": "Added notifications and logging of failed tests", + "link": "" + } + ], "1.7.2": [ { "description": "Updated UI for speedtest info", diff --git a/config/speedtest.php b/config/speedtest.php index c417b256..04b3dd6c 100644 --- a/config/speedtest.php +++ b/config/speedtest.php @@ -7,7 +7,7 @@ return [ |-------------------------------------------------------------------------- */ - 'version' => '1.7.2', + 'version' => '1.7.3', /* |-------------------------------------------------------------------------- diff --git a/database/migrations/2020_07_03_095049_update_speedtest_add_failed_column.php b/database/migrations/2020_07_03_095049_update_speedtest_add_failed_column.php new file mode 100644 index 00000000..ffedc9f7 --- /dev/null +++ b/database/migrations/2020_07_03_095049_update_speedtest_add_failed_column.php @@ -0,0 +1,32 @@ +boolean('failed')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('speedtests', function($table) { + $table->dropColumn('failed'); + }); + } +} diff --git a/public/js/app.js b/public/js/app.js index 7c78a58f..9a9382be 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.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 a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));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=221)}([function(e,t,n){"use strict";e.exports=n(242)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([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,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},B={};function U(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(B[e]=a),t&&(B[t[0]]=function(){return I(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function V(e,t){return e.isValid()?(t=q(t,e.localeData()),W[t]=W[t]||function(e){var t,n,r,a=e.match(F);for(t=0,n=a.length;t=0&&z.test(e);)e=e.replace(z,r),z.lastIndex=0,n-=1;return e}var $=/\d/,J=/\d\d/,G=/\d{3}/,K=/\d{4}/,Q=/[+-]?\d{6}/,X=/\d\d?/,Z=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[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,ue={};function ce(e,t,n){ue[e]=Y(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=x(e)}),n=0;n68?1900:2e3)};var ve,be=we("FullYear",!0);function we(e,t){return function(n){return null!=n?(xe(this,e,n),a.updateOffset(this,t),this):Me(this,e)}}function Me(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xe(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(),ke(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function ke(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}ve=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(s=new Date(e+400,t,n,r,a,i,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,a,i,o),s}function Ae(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 He(e,t,n){var r=7+t-n;return-(7+Ae(e,0,r).getUTCDay()-t)%7+r-1}function Ne(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+He(e,r,a);return s<=0?o=ge(i=e-1)+s:s>ge(e)?(i=e+1,o=s-ge(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Re(e,t,n){var r,a,i=He(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ie(a=e.year()-1,t,n):o>Ie(e.year(),t,n)?(r=o-Ie(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ie(e,t,n){var r=He(e,t,n),a=He(e+1,t,n);return(ge(e)-r+a)/7}function Fe(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",X),ce("ww",X,J),ce("W",X),ce("WW",X,J),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=x(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",X),ce("e",X),ce("E",X),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:p(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=x(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ue(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._shortWeekdaysParse,o))||-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,o))||-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,o))||-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._shortWeekdaysParse,o))?a:null}var Ve=le,qe=le,$e=le;function Je(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),l.push(i),u.push(r),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),l[t]=fe(l[t]),u[t]=fe(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("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ge(){return this.hours()%12||12}function Ke(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ge),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ge.apply(this)+I(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ge.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+I(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),P("hour","h"),R("hour",13),ce("a",Qe),ce("A",Qe),ce("H",X),ce("h",X),ce("k",X),ce("HH",X,J),ce("hh",X,J),ce("kk",X,J),ce("hmm",Z),ce("hmmss",ee),ce("Hmm",Z),ce("Hmmss",ee),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=x(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=x(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=x(e.substr(0,r)),t[4]=x(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=x(e.substr(0,r)),t[4]=x(e.substr(r,2)),t[5]=x(e.substr(a)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=x(e.substr(0,r)),t[4]=x(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=x(e.substr(0,r)),t[4]=x(e.substr(r,2)),t[5]=x(e.substr(a))}));var Xe,Ze=we("Hours",!0),et={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:Te,monthsShort:De,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Be,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Xe._abbr,n(256)("./"+t),it(r)}catch(e){}return tt[t]}function it(e,t){var n;return e&&((n=s(t)?st(e):ot(e,t))?Xe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function ot(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])E("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=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new j(O(r,t)),nt[e]&&nt[e].forEach((function(e){ot(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!i(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i0;){if(r=at(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&k(a,n,!0)>=t-1)break;t--}i++}return Xe}(e)}function lt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>ke(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,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function ut(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,r,i,o,s=[];if(!e._d){for(r=function(e){var t=new Date(a.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,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=ut(t.GG,e._a[0],Re(Lt(),1,4).year),r=ut(t.W,1),((a=ut(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Re(Lt(),i,o);n=ut(t.gg,e._a[0],u.year),r=ut(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}r<1||r>Ie(n,i,o)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Ne(n,r,a,i,o),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=ut(e._a[0],r[0]),(e._dayOfYear>ge(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Ae(o,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]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[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?Ae:Pe).apply(null,s),i=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!==i&&(p(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)?)?$/,ft=/^\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)?/,pt=[["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}/]],mt=[["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;function gt(e){var t,n,r,a,i,o,s=e._i,l=dt.exec(s)||ft.exec(s);if(l){for(p(e).iso=!0,t=0,n=pt.length;t0&&p(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(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),ct(e),lt(e)}else wt(e);else gt(e)}function xt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(lt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,a,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e:_()}));function St(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Lt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){U(0,[e,e.length],0,t)}function nn(e,t,n,r,a){var i;return null==e?Re(this,r,a).year:(t>(i=Ie(e,r,a))&&(t=i),rn.call(this,e,t,n,r,a))}function rn(e,t,n,r,a){var i=Ne(e,t,n,r,a),o=Ae(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",X,J),ce("gg",X,J),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Q),ce("ggggg",re,Q),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=x(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),P("quarter","Q"),R("quarter",7),ce("Q",$),pe("Q",(function(e,t){t[1]=3*(x(e)-1)})),U("D",["DD",2],"Do","date"),P("date","D"),R("date",9),ce("D",X),ce("DD",X,J),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=x(e.match(X)[0])}));var an=we("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",te),ce("DDDD",G),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=x(e)})),U("m",["mm",2],0,"minute"),P("minute","m"),R("minute",14),ce("m",X),ce("mm",X,J),pe(["m","mm"],4);var on=we("Minutes",!1);U("s",["ss",2],0,"second"),P("second","s"),R("second",15),ce("s",X),ce("ss",X,J),pe(["s","ss"],5);var sn,ln=we("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),R("millisecond",16),ce("S",te,$),ce("SS",te,J),ce("SSS",te,G),sn="SSSS";sn.length<=9;sn+="S")ce(sn,ae);function un(e,t){t[6]=x(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")pe(sn,un);var cn=we("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var dn=b.prototype;function fn(e){return e}dn.add=qt,dn.calendar=function(e,t){var n=e||Lt(),r=Ht(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(Y(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Lt(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=A(t)){case"year":i=Jt(this,r)/12;break;case"month":i=Jt(this,r);break;case"quarter":i=Jt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:M(i)},dn.endOf=function(e){var t;if(void 0===(e=A(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Zt;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-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Lt(),e)},dn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Lt(),e)},dn.get=function(e){return Y(this[e=A(e)])?this[e]():this},dn.invalidAt=function(){return p(this).overflow},dn.isAfter=function(e,t){var n=w(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=A(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Y(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(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",a=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},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=be,dn.isLeapYear=function(){return ye(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.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=Ye,dn.daysInMonth=function(){return ke(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=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Ie(this.year(),1,4)},dn.date=an,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=Ze,dn.minute=dn.minutes=on,dn.second=dn.seconds=ln,dn.millisecond=dn.milliseconds=cn,dn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=At(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Nt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Vt(this,zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Nt(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(Nt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=At(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Lt(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=Rt,dn.isUTC=Rt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=T("dates accessor is deprecated. Use date instead.",an),dn.months=T("months accessor is deprecated. Use month instead",Ye),dn.years=T("years accessor is deprecated. Use year instead",be),dn.zone=T("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=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=xt(e))._a){var t=e._isUTC?h(e._a):Lt(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=j.prototype;function pn(e,t,n,r){var a=st(),i=h().set(r,t);return a[n](i,e)}function mn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=pn(e,r,n,"month");return a}function _n(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var a,i=st(),o=e?i._week.dow:0;if(null!=n)return pn(t,(n+o)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=pn(t,(a+o)%7,r,"day");return s}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Y(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=fn,hn.postformat=fn,hn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return Y(a)?a(e,t,n,r):a.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return Y(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)Y(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||Le).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[Le.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return Se.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.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")||Ce.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ce.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Re(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?Fe(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?Fe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?Fe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Ue.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.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")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),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===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=T("moment.lang is deprecated. Use moment.locale instead.",it),a.langData=T("moment.langData is deprecated. Use moment.localeData instead.",st);var gn=Math.abs;function yn(e,t,n,r){var a=zt(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function vn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function wn(e){return 146097*e/4800}function Mn(e){return function(){return this.as(e)}}var xn=Mn("ms"),kn=Mn("s"),Ln=Mn("m"),Tn=Mn("h"),Dn=Mn("d"),Sn=Mn("w"),En=Mn("M"),Yn=Mn("Q"),On=Mn("y");function jn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Cn=jn("milliseconds"),Pn=jn("seconds"),An=jn("minutes"),Hn=jn("hours"),Nn=jn("days"),Rn=jn("months"),In=jn("years"),Fn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function Wn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Bn=Math.abs;function Un(e){return(e>0)-(e<0)||+e}function Vn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Bn(this._milliseconds)/1e3,r=Bn(this._days),a=Bn(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var i=M(a/12),o=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=Un(this._months)!==Un(d)?"-":"",p=Un(this._days)!==Un(d)?"-":"",m=Un(this._milliseconds)!==Un(d)?"-":"";return f+"P"+(i?h+i+"Y":"")+(o?h+o+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var qn=Yt.prototype;return qn.isValid=function(){return this._isValid},qn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},qn.add=function(e,t){return yn(this,e,t,1)},qn.subtract=function(e,t){return yn(this,e,t,-1)},qn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=A(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+bn(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)}},qn.asMilliseconds=xn,qn.asSeconds=kn,qn.asMinutes=Ln,qn.asHours=Tn,qn.asDays=Dn,qn.asWeeks=Sn,qn.asMonths=En,qn.asQuarters=Yn,qn.asYears=On,qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},qn._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*vn(wn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=M(i/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,o+=M(n/24),a=M(bn(o)),s+=a,o-=vn(wn(a)),r=M(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},qn.clone=function(){return zt(this)},qn.get=function(e){return e=A(e),this.isValid()?this[e+"s"]():NaN},qn.milliseconds=Cn,qn.seconds=Pn,qn.minutes=An,qn.hours=Hn,qn.days=Nn,qn.weeks=function(){return M(this.days()/7)},qn.months=Rn,qn.years=In,qn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=zt(e).abs(),a=Fn(r.as("s")),i=Fn(r.as("m")),o=Fn(r.as("h")),s=Fn(r.as("d")),l=Fn(r.as("M")),u=Fn(r.as("y")),c=a<=zn.ss&&["s",a]||a0,c[4]=n,Wn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},qn.toISOString=Vn,qn.toString=Vn,qn.toJSON=Vn,qn.locale=Gt,qn.localeData=Qt,qn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vn),qn.lang=Kt,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(x(e))})),a.version="2.24.0",t=Lt,a.fn=dn,a.min=function(){var e=[].slice.call(arguments,0);return St("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return St("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=h,a.unix=function(e){return Lt(1e3*e)},a.months=function(e,t){return mn(e,t,"months")},a.isDate=u,a.locale=it,a.invalid=_,a.duration=zt,a.isMoment=w,a.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},a.parseZone=function(){return Lt.apply(null,arguments).parseZone()},a.localeData=st,a.isDuration=Ot,a.monthsShort=function(e,t){return mn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},a.defineLocale=ot,a.updateLocale=function(e,t){if(null!=t){var n,r,a=et;null!=(r=at(e))&&(a=r._config),t=O(a,t),(n=new j(t)).parentLocale=tt[e],tt[e]=n,it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return D(tt)},a.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},a.normalizeUnits=A,a.relativeTimeRounding=function(e){return void 0===e?Fn:"function"==typeof e&&(Fn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},a.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"},a.prototype=dn,a.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"},a}()}).call(this,n(27)(e))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(246)()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t1&&(a-=1)),[360*a,100*i,100*u]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-a)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-a-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var r=n[e];if(r)return r;var a,i,o,s=1/0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=(i=e,o=u,Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)+Math.pow(i[2]-o[2],2));c.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,n,r,a,i,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[i=255*l,i,i];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(r=o+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[u]=255*i;return a},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,a=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=i<=1?i:2-i,[t,100*(0===r?2*a/(i+a):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,a=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,a){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){var t,n,r,a=e[0],i=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-i)*o,n=i*s,[a,100*(n=(n/=(t=(2-i)*s)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,a,i,o,s,l=e[0]/360,u=e[1]/100,c=e[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),a=u+r*((n=1-c)-u),t){default:case 6:case 0:i=n,o=a,s=u;break;case 1:i=a,o=n,s=u;break;case 2:i=u,o=n,s=a;break;case 3:i=u,o=a,s=n;break;case 4:i=a,o=u,s=n;break;case 5:i=n,o=u,s=a}return[255*i,255*o,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},a.xyz.rgb=function(e){var t,n,r,a=e[0]/100,i=e[1]/100,o=e[2]/100;return n=-.9689*a+1.8758*i+.0415*o,r=.0557*a+-.204*i+1.057*o,t=(t=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,a=e[0];t=e[1]/500+(n=(a+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],a=e[2];return(t=360*Math.atan2(a,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+a*a),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255,i=Math.max(Math.max(n,r),a),o=Math.min(Math.min(n,r),a),s=i-o;return t=s<=0?0:i===n?(r-a)/s%6:i===r?2+(a-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,a=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var a,i=[0,0,0],o=t%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return a=(1-n)*r,[255*(n*i[0]+a),255*(n*i[1]+a),255*(n*i[2]+a)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,a=0;a1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,a=0;a1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:c,getHsla:d,getRgb:function(e){var t=c(e);return t&&t.slice(0,3)},getHsl:function(e){var t=d(e);return t&&t.slice(0,3)},getHwb:f,getAlpha:function(e){var t=c(e);return t||(t=d(e))||(t=f(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+g(e[0])+g(e[1])+g(e[2])+(t>=0&&t<1?g(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?h(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:h,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return p(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+a+"%)"},percentaString:p,hslString:function(e,t){return t<1||e[3]&&e[3]<1?m(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return y[e.slice(0,3)]}};function c(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(r){a=(r=r[1])[3];for(var i=0;in?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,a=2*r-1,i=this.alpha()-n.alpha(),o=((a*i==-1?a:(a+i)/(1+a*i))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new b,r=this.values,a=n.values;for(var i in r)r.hasOwnProperty(i)&&(e=r[i],"[object Array]"===(t={}.toString.call(e))?a[i]=e.slice(0):"[object Number]"===t?a[i]=e:console.error("unexpected color value:",e));return n}},b.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},b.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},b.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r=0;a--)t.call(n,e[a],a);else for(a=0;a=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-L.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*L.easeInBounce(2*e):.5*L.easeOutBounce(2*e-1)+.5}},T={effects:L};k.easingEffects=L;var D=Math.PI,S=D/180,E=2*D,Y=D/2,O=D/4,j=2*D/3,C={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,a,i){if(i){var o=Math.min(i,a/2,r/2),s=t+o,l=n+o,u=t+r-o,c=n+a-o;e.moveTo(t,l),st.left-1e-6&&e.xt.top-1e-6&&e.y0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,a=this.animations,i=0;i=n?(z.callback(e.onAnimationComplete,[e],t),t.animating=!1,a.splice(i,1)):++i}},X=z.options.resolve,Z=["push","pop","shift","splice","unshift"];function ee(e,t){var n=e._chartjs;if(n){var r=n.listeners,a=r.indexOf(t);-1!==a&&r.splice(a,1),r.length>0||(Z.forEach((function(t){delete e[t]})),delete e._chartjs)}}var te=function(e,t){this.initialize(e,t)};z.extend(te.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),a=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||a.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ee(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],a=n.data;for(e=0,t=r.length;en&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;na?(i=a/t.innerRadius,e.arc(o,s,t.innerRadius-a,r+i,n-i,!0)):e.arc(o,s,a,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function ie(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var a,i=n.endAngle;for(r&&(n.endAngle=n.startAngle+re,ae(e,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=re,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+re,n.startAngle,!0),a=0;as;)a-=re;for(;a=o&&a<=s,u=i>=n.innerRadius&&i<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/re)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+re,t.beginPath(),t.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),e=0;ee.x&&(t=ge(t,"left","right")):e.basen?n:r,r:l.right||a<0?0:a>t?t:a,b:l.bottom||i<0?0:i>n?n:i,l:l.left||o<0?0:o>t?t:o}}function ve(e,t,n){var r=null===t,a=null===n,i=!(!e||r&&a)&&_e(e);return i&&(r||t>=i.left&&t<=i.right)&&(a||n>=i.top&&n<=i.bottom)}H._set("global",{elements:{rectangle:{backgroundColor:pe,borderColor:pe,borderSkipped:"bottom",borderWidth:0}}});var be=J.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=_e(e),n=t.right-t.left,r=t.bottom-t.top,a=ye(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+a.l,y:t.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b}}}(t),r=n.outer,a=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===a.w&&r.h===a.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(a.x,a.y,a.w,a.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ve(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return me(n)?ve(n,e,null):ve(n,null,t)},inXRange:function(e){return ve(this._view,e,null)},inYRange:function(e){return ve(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return me(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return me(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),we={},Me=oe,xe=ue,ke=he,Le=be;we.Arc=Me,we.Line=xe,we.Point=ke,we.Rectangle=Le;var Te=z._deprecated,De=z.valueOrDefault;function Se(e,t,n){var r,a,i=n.barThickness,o=t.stackCount,s=t.pixels[e],l=z.isNullOrUndef(i)?function(e,t){var n,r,a,i,o=e._length;for(a=1,i=t.length;a0?Math.min(o,Math.abs(r-n)):o,n=r;return o}(t.scale,t.pixels):-1;return z.isNullOrUndef(i)?(r=l*n.categoryPercentage,a=n.barPercentage):(r=i*o,a=1),{chunk:r/o,ratio:a,start:s-r/2}}H._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),H._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ee=ne.extend({dataElementType:we.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;ne.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Te("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Te("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Te("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Te("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Te("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t=0&&m.min>=0?m.min:m.max,b=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=p.length;if(g||void 0===g&&void 0!==y)for(r=0;r=0&&u.max>=0?u.max:u.min,(m.min<0&&i<0||m.max>=0&&i>0)&&(v+=i));return o=d.getPixelForValue(v),l=(s=d.getPixelForValue(v+b))-o,void 0!==_&&Math.abs(l)<_&&(l=_,s=b>=0&&!f||b<0&&f?o-_:o+_),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,r){var a="flex"===r.barThickness?function(e,t,n){var r,a=t.pixels,i=a[e],o=e>0?a[e-1]:null,s=e=Pe?-Ae:y<-Pe?Ae:0)+_,b=Math.cos(y),w=Math.sin(y),M=Math.cos(v),x=Math.sin(v),k=y<=0&&v>=0||v>=Ae,L=y<=He&&v>=He||v>=Ae+He,T=y<=-He&&v>=-He||v>=Pe+He,D=y===-Pe||v>=Pe?-1:Math.min(b,b*m,M,M*m),S=T?-1:Math.min(w,w*m,x,x*m),E=k?1:Math.max(b,b*m,M,M*m),Y=L?1:Math.max(w,w*m,x,x*m);u=(E-D)/2,c=(Y-S)/2,d=-(E+D)/2,f=-(Y+S)/2}for(r=0,a=p.length;r0&&!isNaN(e)?Ae*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,a,i,o,s,l,u=0,c=this.chart;if(!e)for(t=0,n=c.data.datasets.length;t(u=s>u?s:u)?l:u);return u},setHoverStyle:function(e){var t=e._model,n=e._options,r=z.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ce(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ce(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ce(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n0&&ze(l[e-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),e0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return rt(e,t,{intersect:!1})},point:function(e,t){return et(e,Xe(t,e))},nearest:function(e,t,n){var r=Xe(t,e);n.axis=n.axis||"xy";var a=nt(n.axis);return tt(e,r,n.intersect,a)},x:function(e,t,n){var r=Xe(t,e),a=[],i=!1;return Ze(e,(function(e){e.inXRange(r.x)&&a.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a},y:function(e,t,n){var r=Xe(t,e),a=[],i=!1;return Ze(e,(function(e){e.inYRange(r.y)&&a.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a}}},it=z.extend;function ot(e,t){return z.where(e,(function(e){return e.pos===t}))}function st(e,t){return e.sort((function(e,n){var r=t?n:e,a=t?e:n;return r.weight===a.weight?r.index-a.index:r.weight-a.weight}))}function lt(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ut(e,t,n){var r,a,i=n.box,o=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?i.height:i.width,e[n.pos]+=n.size,i.getPadding){var s=i.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(r=t.outerWidth-lt(o,e,"left","right"),a=t.outerHeight-lt(o,e,"top","bottom"),r!==e.w||a!==e.h)return e.w=r,e.h=a,n.horizontal?r!==e.w:a!==e.h}function ct(e,t){var n=t.maxPadding;function r(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function dt(e,t,n){var r,a,i,o,s,l,u=[];for(r=0,a=e.length;r div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&ht.default||ht,_t=["animationstart","webkitAnimationStart"],gt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function yt(e,t){var n=z.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var vt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function bt(e,t,n){e.addEventListener(t,n,vt)}function wt(e,t,n){e.removeEventListener(t,n,vt)}function Mt(e,t,n,r,a){return{type:e,chart:t,native:a||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function xt(e){var t=document.createElement("div");return t.className=e||"",t}function kt(e,t,n){var r,a,i,o,s=e.$chartjs||(e.$chartjs={}),l=s.resizer=function(e){var t=xt("chartjs-size-monitor"),n=xt("chartjs-size-monitor-expand"),r=xt("chartjs-size-monitor-shrink");n.appendChild(xt()),r.appendChild(xt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var a=function(){t._reset(),e()};return bt(n,"scroll",a.bind(n,"expand")),bt(r,"scroll",a.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,a=r?r.clientWidth:0;t(Mt("resize",n)),r&&r.clientWidth0){var i=e[0];i.label?n=i.label:i.xLabel?n=i.xLabel:a>0&&i.index-1?e.split("\n"):e}function Ht(e){var t=H.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Ot(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Ot(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Ot(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Ot(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Ot(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Ot(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Ot(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Ot(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Ot(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Nt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Rt(e){return Pt([],At(e))}var It=J.extend({initialize:function(){this._model=Ht(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),a=n.title.apply(e,arguments),i=n.afterTitle.apply(e,arguments),o=[];return o=Pt(o,At(r)),o=Pt(o,At(a)),o=Pt(o,At(i))},getBeforeBody:function(){return Rt(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,a=[];return z.each(e,(function(e){var i={before:[],lines:[],after:[]};Pt(i.before,At(r.beforeLabel.call(n,e,t))),Pt(i.lines,r.label.call(n,e,t)),Pt(i.after,At(r.afterLabel.call(n,e,t))),a.push(i)})),a},getAfterBody:function(){return Rt(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),a=t.afterFooter.apply(e,arguments),i=[];return i=Pt(i,At(n)),i=Pt(i,At(r)),i=Pt(i,At(a))},update:function(e){var t,n,r,a,i,o,s,l,u,c,d=this,f=d._options,h=d._model,p=d._model=Ht(f),m=d._active,_=d._data,g={xAlign:h.xAlign,yAlign:h.yAlign},y={x:h.x,y:h.y},v={width:h.width,height:h.height},b={x:h.caretX,y:h.caretY};if(m.length){p.opacity=1;var w=[],M=[];b=Ct[f.position].call(d,m,d._eventPosition);var x=[];for(t=0,n=m.length;tr.width&&(a=r.width-t.width),a<0&&(a=0)),"top"===c?i+=d:i-="bottom"===c?t.height+d:t.height/2,"center"===c?"left"===u?a+=d:"right"===u&&(a-=d):"left"===u?a-=f:"right"===u&&(a+=f),{x:a,y:i}}(p,v,g=function(e,t){var n,r,a,i,o,s=e._model,l=e._chart,u=e._chart.chartArea,c="center",d="center";s.yl.height-t.height&&(d="bottom");var f=(u.left+u.right)/2,h=(u.top+u.bottom)/2;"center"===d?(n=function(e){return e<=f},r=function(e){return e>f}):(n=function(e){return e<=t.width/2},r=function(e){return e>=l.width-t.width/2}),a=function(e){return e+t.width+s.caretSize+s.caretPadding>l.width},i=function(e){return e-t.width-s.caretSize-s.caretPadding<0},o=function(e){return e<=h?"top":"bottom"},n(s.x)?(c="left",a(s.x)&&(c="center",d=o(s.y))):r(s.x)&&(c="right",i(s.x)&&(c="center",d=o(s.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:d}}(this,v),d._chart)}else p.opacity=0;return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=y.x,p.y=y.y,p.width=v.width,p.height=v.height,p.caretX=b.x,p.caretY=b.y,d._model=p,e&&f.custom&&f.custom.call(d,p),d},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,a=this.getCaretPosition(e,t,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(e,t,n){var r,a,i,o,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,f=n.yAlign,h=e.x,p=e.y,m=t.width,_=t.height;if("center"===f)s=p+_/2,"left"===d?(a=(r=h)-u,i=r,o=s+u,l=s-u):(a=(r=h+m)+u,i=r,o=s-u,l=s+u);else if("left"===d?(r=(a=h+c+u)-u,i=a+u):"right"===d?(r=(a=h+m-c-u)-u,i=a+u):(r=(a=n.caretX)-u,i=a+u),"top"===f)s=(o=p)-u,l=o;else{s=(o=p+_)+u,l=o;var g=i;i=r,r=g}return{x1:r,x2:a,x3:i,y1:o,y2:s,y3:l}},drawTitle:function(e,t,n){var r,a,i,o=t.title,s=o.length;if(s){var l=jt(t.rtl,t.x,t.width);for(e.x=Nt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,a=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=z.fontString(r,t._titleFontStyle,t._titleFontFamily),i=0;i0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},a=Math.abs(t.opacity<.001)?0:t.opacity,i=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&i&&(e.save(),e.globalAlpha=a,this.drawBackground(r,t,e,n),r.y+=t.yPadding,z.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),z.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!z.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),Ft=Ct,zt=It;zt.positioners=Ft;var Wt=z.valueOrDefault;function Bt(){return z.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var a,i,o,s=n[e].length;for(t[e]||(t[e]=[]),a=0;a=t[e].length&&t[e].push({}),!t[e][a].type||o.type&&o.type!==t[e][a].type?z.merge(t[e][a],[Yt.getScaleDefaults(i),o]):z.merge(t[e][a],o)}else z._merger(e,t,n,r)}})}function Ut(){return z.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){var a=t[e]||{},i=n[e];"scales"===e?t[e]=Bt(a,i):"scale"===e?t[e]=z.merge(a,[Yt.getScaleDefaults(i.type),i]):z._merger(e,t,n,r)}})}function Vt(e){var t=e.options;z.each(e.scales,(function(t){pt.removeBox(e,t)})),t=Ut(H.global,H[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function qt(e,t,n){var r,a=function(e){return e.id===r};do{r=t+n++}while(z.findIndex(e,a)>=0);return r}function $t(e){return"top"===e||"bottom"===e}function Jt(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}H._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Gt=function(e,t){return this.construct(e,t),this};z.extend(Gt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Ut(H.global,H[e.type],e.options||{}),e}(t);var r=St.acquireContext(e,t),a=r&&r.canvas,i=a&&a.height,o=a&&a.width;n.id=z.uid(),n.ctx=r,n.canvas=a,n.config=t,n.width=o,n.height=i,n.aspectRatio=i?o/i:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Gt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Et.notify(e,"beforeInit"),z.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Et.notify(e,"afterInit"),e},clear:function(){return z.canvas.clear(this),this},stop:function(){return Q.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,a=n.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(z.getMaximumWidth(r))),o=Math.max(0,Math.floor(a?i/a:z.getMaximumHeight(r)));if((t.width!==i||t.height!==o)&&(r.width=t.width=i,r.height=t.height=o,r.style.width=i+"px",r.style.height=o+"px",z.retinaScale(t,n.devicePixelRatio),!e)){var s={width:i,height:o};Et.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;z.each(t.xAxes,(function(e,n){e.id||(e.id=qt(t.xAxes,"x-axis-",n))})),z.each(t.yAxes,(function(e,n){e.id||(e.id=qt(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],a=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),z.each(r,(function(t){var r=t.options,i=r.id,o=Wt(r.type,t.dtype);$t(r.position)!==$t(t.dposition)&&(r.position=t.dposition),a[i]=!0;var s=null;if(i in n&&n[i].type===o)(s=n[i]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=Yt.getScaleConstructor(o);if(!l)return;s=new l({id:i,type:o,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),z.each(a,(function(e,t){e||delete n[t]})),e.scales=n,Yt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],a=n.data.datasets;for(e=0,t=a.length;e=0;--n)this.drawDataset(t[n],e);Et.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Et.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Et.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Et.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Et.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return at.modes.single(this,e)},getElementsAtEvent:function(e){return at.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return at.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=at.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return at.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var a=z.log10(Math.abs(r)),i="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=z.log10(Math.abs(e)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),i=e.toFixed(l)}else i="0";return i},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(z.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},tn=z.isArray,nn=z.isNullOrUndef,rn=z.valueOrDefault,an=z.valueAtIndexOrDefault;function on(e,t,n){var r,a=e.getTicks().length,i=Math.min(t,a-1),o=e.getPixelForTick(i),s=e._startPixel,l=e._endPixel;if(!(n&&(r=1===a?Math.max(o-s,l-o):0===t?(e.getPixelForTick(1)-o)/2:(o-e.getPixelForTick(i-1))/2,(o+=il+1e-6)))return o}function sn(e,t,n,r){var a,i,o,s,l,u,c,d,f,h,p,m,_,g=n.length,y=[],v=[],b=[];for(a=0;at){for(n=0;n=f||c<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(a=l.offset?s.maxWidth/c:r/(c-1))&&(a=r/(c-(l.offset?.5:1)),i=s.maxHeight-ln(l.gridLines)-u.padding-un(l.scaleLabel),o=Math.sqrt(t*t+n*n),h=z.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/a,1)),Math.asin(Math.min(i/o,1))-Math.asin(n/o))),h=Math.max(d,Math.min(f,h))),s.labelRotation=h)},afterCalculateTickRotation:function(){z.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){z.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,a=r.ticks,i=r.scaleLabel,o=r.gridLines,s=e._isVisible(),l="bottom"===r.position,u=e.isHorizontal();if(u?t.width=e.maxWidth:s&&(t.width=ln(o)+un(i)),u?s&&(t.height=ln(o)+un(i)):t.height=e.maxHeight,a.display&&s){var c=dn(a),d=e._getLabelSizes(),f=d.first,h=d.last,p=d.widest,m=d.highest,_=.4*c.minor.lineHeight,g=a.padding;if(u){var y=0!==e.labelRotation,v=z.toRadians(e.labelRotation),b=Math.cos(v),w=Math.sin(v),M=w*p.width+b*(m.height-(y?m.offset:0))+(y?0:_);t.height=Math.min(e.maxHeight,t.height+M+g);var x,k,L=e.getPixelForTick(0)-e.left,T=e.right-e.getPixelForTick(e.getTicks().length-1);y?(x=l?b*f.width+w*f.offset:w*(f.height-f.offset),k=l?w*(h.height-h.offset):b*h.width+w*h.offset):(x=f.width/2,k=h.width/2),e.paddingLeft=Math.max((x-L)*e.width/(e.width-L),0)+3,e.paddingRight=Math.max((k-T)*e.width/(e.width-T),0)+3}else{var D=a.mirror?0:p.width+g+_;t.width=Math.min(e.maxWidth,t.width+D),e.paddingTop=f.height/2,e.paddingBottom=h.height/2}}e.handleMargins(),u?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){z.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(nn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,a=this;for(a.ticks=e.map((function(e){return e.value})),a.beforeTickToLabelConversion(),t=a.convertTicksToLabels(e)||a.ticks,a.afterTickToLabelConversion(),n=0,r=e.length;nn-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,a,i=this.options.ticks,o=this._length,s=i.maxTicksLimit||o/this._tickSize()+1,l=i.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;ts)return function(e,t,n){var r,a,i=0,o=t[0];for(n=Math.ceil(n),r=0;ru)return i;return Math.max(u,1)}(l,e,0,s),u>0){for(t=0,n=u-1;t1?(d-c)/(u-1):null,hn(e,r,z.isNullOrUndef(a)?0:c-a,c),hn(e,r,d,z.isNullOrUndef(a)?e.length:d+a),fn(e)}return hn(e,r),fn(e)},_tickSize:function(){var e=this.options.ticks,t=z.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),a=this._getLabelSizes(),i=e.autoSkipPadding||0,o=a?a.widest.width+i:0,s=a?a.highest.height+i:0;return this.isHorizontal()?s*n>o*r?o/n:s/r:s*r=0&&(o=e),void 0!==i&&(e=n.indexOf(i))>=0&&(s=e),t.minIndex=o,t.maxIndex=s,t.min=n[o],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;mn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,a,i,o=this;return _n(t)||_n(n)||(e=o.chart.data.datasets[n].data[t]),_n(e)||(r=o.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(a=o._getLabels(),e=z.valueOrDefault(r,e),t=-1!==(i=a.indexOf(e))?i:t,isNaN(t)&&(t=e)),o.getPixelForDecimal((t-o._startValue)/o._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),yn={position:"bottom"};gn._defaults=yn;var vn=z.noop,bn=z.isNullOrUndef,wn=mn.extend({getRightValue:function(e){return"string"==typeof e?+e:mn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=z.sign(e.min),r=z.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var a=void 0!==t.min||void 0!==t.suggestedMin,i=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),a!==i&&e.min>=e.max&&(a?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:vn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:z.valueOrDefault(t.fixedStepSize,t.stepSize)},a=e.ticks=function(e,t){var n,r,a,i,o=[],s=e.stepSize,l=s||1,u=e.maxTicks-1,c=e.min,d=e.max,f=e.precision,h=t.min,p=t.max,m=z.niceNum((p-h)/u/l)*l;if(m<1e-14&&bn(c)&&bn(d))return[h,p];(i=Math.ceil(p/m)-Math.floor(h/m))>u&&(m=z.niceNum(i*m/u/l)*l),s||bn(f)?n=Math.pow(10,z._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),r=Math.floor(h/m)*m,a=Math.ceil(p/m)*m,s&&(!bn(c)&&z.almostWhole(c/m,m/1e3)&&(r=c),!bn(d)&&z.almostWhole(d/m,m/1e3)&&(a=d)),i=(a-r)/m,i=z.almostEquals(i,Math.round(i),m/1e3)?Math.round(i):Math.ceil(i),r=Math.round(r*n)/n,a=Math.round(a*n)/n,o.push(bn(c)?r:c);for(var _=1;_t.length-1?null:this.getPixelForValue(t[e])}}),Tn=Mn;Ln._defaults=Tn;var Dn=z.valueOrDefault,Sn=z.math.log10,En={position:"left",ticks:{callback:en.formatters.logarithmic}};function Yn(e,t){return z.isFinite(e)&&e>=0?e:t}var On=mn.extend({determineDataLimits:function(){var e,t,n,r,a,i,o=this,s=o.options,l=o.chart,u=l.data.datasets,c=o.isHorizontal();function d(e){return c?e.xAxisID===o.id:e.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var f=s.stacked;if(void 0===f)for(e=0;e0){var t=z.min(e),n=z.max(e);o.min=Math.min(o.min,t),o.max=Math.max(o.max,n)}}))}else for(e=0;e0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Sn(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:Yn(t.min),max:Yn(t.max)},a=e.ticks=function(e,t){var n,r,a=[],i=Dn(e.min,Math.pow(10,Math.floor(Sn(t.min)))),o=Math.floor(Sn(t.max)),s=Math.ceil(t.max/Math.pow(10,o));0===i?(n=Math.floor(Sn(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),a.push(i),i=r*Math.pow(10,n)):(n=Math.floor(Sn(i)),r=Math.floor(i/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(i),10==++r&&(r=1,l=++n>=0?1:l),i=Math.round(r*Math.pow(10,n)*l)/l}while(nt.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Sn(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;mn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Dn(e.options.ticks.fontSize,H.global.defaultFontSize)/e._length),e._startValue=Sn(t),e._valueOffset=n,e._valueRange=(Sn(e.max)-Sn(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(Sn(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),jn=En;On._defaults=jn;var Cn=z.valueOrDefault,Pn=z.valueAtIndexOrDefault,An=z.options.resolve,Hn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:en.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Nn(e){var t=e.ticks;return t.display&&e.display?Cn(t.fontSize,H.global.defaultFontSize)+2*t.backdropPaddingY:0}function Rn(e,t,n,r,a){return e===r||e===a?{start:t-n/2,end:t+n/2}:ea?{start:t-n,end:t}:{start:t,end:t+n}}function In(e){return 0===e||180===e?"center":e<180?"left":"right"}function Fn(e,t,n,r){var a,i,o=n.y+r/2;if(z.isArray(t))for(a=0,i=t.length;a270||e<90)&&(n.y-=t.h)}function Wn(e){return z.isNumber(e)?e:0}var Bn=wn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Nn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;z.each(t.data.datasets,(function(a,i){if(t.isDatasetVisible(i)){var o=t.getDatasetMeta(i);z.each(a.data,(function(t,a){var i=+e.getRightValue(t);isNaN(i)||o.data[a].hidden||(n=Math.min(i,n),r=Math.max(i,r))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Nn(this.options))},convertTicksToLabels:function(){var e=this;wn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=z.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,a=z.options._parseFont(e.options.pointLabels),i={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=a.string,e._pointLabelSizes=[];var s,l,u,c=e.chart.data.labels.length;for(t=0;ti.r&&(i.r=h.end,o.r=d),p.starti.b&&(i.b=p.end,o.b=d)}e.setReductions(e.drawingArea,i,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,a=t.l/Math.sin(n.l),i=Math.max(t.r-r.width,0)/Math.sin(n.r),o=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);a=Wn(a),i=Wn(i),o=Wn(o),s=Wn(s),r.drawingArea=Math.min(Math.floor(e-(a+i)/2),Math.floor(e-(o+s)/2)),r.setCenterPoint(a,i,o,s)},setCenterPoint:function(e,t,n,r){var a=this,i=a.width-t-a.drawingArea,o=e+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-r-a.drawingArea;a.xCenter=Math.floor((o+i)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(z.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,a=r.ctx,i=r.options,o=i.gridLines,s=i.angleLines,l=Cn(s.lineWidth,o.lineWidth),u=Cn(s.color,o.color);if(i.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,a=Nn(n),i=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),o=z.options._parseFont(r);t.save(),t.font=o.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=e.getPointPosition(s,i+l+5),c=Pn(r.fontColor,s,H.global.defaultFontColor);t.fillStyle=c;var d=e.getIndexAngle(s),f=z.toDegrees(d);t.textAlign=In(f),zn(f,e._pointLabelSizes[s],u),Fn(t,e.pointLabels[s],u,o.lineHeight)}t.restore()}(r),o.display&&z.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var a,i=e.ctx,o=t.circular,s=e.chart.data.labels.length,l=Pn(t.color,r-1),u=Pn(t.lineWidth,r-1);if((o||s)&&l&&u){if(i.save(),i.strokeStyle=l,i.lineWidth=u,i.setLineDash&&(i.setLineDash(t.borderDash||[]),i.lineDashOffset=t.borderDashOffset||0),i.beginPath(),o)i.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{a=e.getPointPosition(0,n),i.moveTo(a.x,a.y);for(var c=1;c=0;e--)t=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),a.beginPath(),a.moveTo(r.xCenter,r.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,a,i=e.getIndexAngle(0),o=z.options._parseFont(n),s=Cn(n.fontColor,H.global.defaultFontColor);t.save(),t.font=o.string,t.translate(e.xCenter,e.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",z.each(e.ticks,(function(i,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=t.measureText(i).width,t.fillStyle=n.backdropColor,t.fillRect(-a/2-n.backdropPaddingX,-r-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(i,0,-r))})),t.restore()}},_drawTitle:z.noop}),Un=Hn;Bn._defaults=Un;var Vn=z._deprecated,qn=z.options.resolve,$n=z.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Gn=Number.MAX_SAFE_INTEGER||9007199254740991,Kn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Qn=Object.keys(Kn);function Xn(e,t){return e-t}function Zn(e){return z.valueOrDefault(e.time.min,e.ticks.min)}function er(e){return z.valueOrDefault(e.time.max,e.ticks.max)}function tr(e,t,n,r){var a=function(e,t,n){for(var r,a,i,o=0,s=e.length-1;o>=0&&o<=s;){if(a=e[(r=o+s>>1)-1]||null,i=e[r],!a)return{lo:null,hi:i};if(i[t]n))return{lo:a,hi:i};s=r-1}}return{lo:i,hi:null}}(e,t,n),i=a.lo?a.hi?a.lo:e[e.length-2]:e[0],o=a.lo?a.hi?a.hi:e[e.length-1]:e[1],s=o[t]-i[t],l=s?(n-i[t])/s:0,u=(o[r]-i[r])*l;return i[r]+u}function nr(e,t){var n=e._adapter,r=e.options.time,a=r.parser,i=a||r.format,o=t;return"function"==typeof a&&(o=a(o)),z.isFinite(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null!==o?+o:(a||"function"!=typeof i||(o=i(t),z.isFinite(o)||(o=n.parse(o))),o)}function rr(e,t){if(z.isNullOrUndef(t))return null;var n=e.options.time,r=nr(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function ar(e,t,n,r){var a,i,o,s=Qn.length;for(a=Qn.indexOf(e);a=0&&(t[i].major=!0);return t}(e,i,o,n):i}var or=mn.extend({initialize:function(){this.mergeTicksOptions(),mn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new Zt._date(t.adapters.date);return Vn("time scale",n.format,"time.format","time.parser"),Vn("time scale",n.min,"time.min","ticks.min"),Vn("time scale",n.max,"time.max","ticks.max"),z.mergeIf(n.displayFormats,r.formats()),mn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),mn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,a,i,o,s=this,l=s.chart,u=s._adapter,c=s.options,d=c.time.unit||"day",f=Gn,h=Jn,p=[],m=[],_=[],g=s._getLabels();for(e=0,n=g.length;e1?function(e){var t,n,r,a={},i=[];for(t=0,n=e.length;t1e5*u)throw t+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=d;a=a&&n<=i&&c.push(n);return r.min=a,r.max=i,r._unit=l.unit||(s.autoSkip?ar(l.minUnit,r.min,r.max,d):function(e,t,n,r,a){var i,o;for(i=Qn.length-1;i>=Qn.indexOf(n);i--)if(o=Qn[i],Kn[o].common&&e._adapter.diff(a,r,o)>=t-1)return o;return Qn[n?Qn.indexOf(n):0]}(r,c.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=Qn.indexOf(e)+1,n=Qn.length;tt&&s=0&&e0?s:1}}),sr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};or._defaults=sr;var lr={category:gn,linear:Ln,logarithmic:On,radialLinear:Bn,time:or},ur={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Zt._date.override("function"==typeof e?{_id:"moment",formats:function(){return ur},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),H._set("global",{plugins:{filler:{propagate:!0}}});var cr={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),a=r&&n.isDatasetVisible(t)&&r.dataset._children||[],i=a.length||0;return i?function(e,t){return t=n)&&r;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function fr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,a,i,o=e.el._scale,s=o.options,l=o.chart.data.labels.length,u=e.fill,c=[];if(!l)return null;for(t=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,t),a=0;a0;--i)z.canvas.lineTo(e,n[i],n[i-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),i=a-1;i>0;--i)e.arc(o,s,l,n[i].angle,n[i-1].angle,!0)}}function gr(e,t,n,r,a,i){var o,s,l,u,c,d,f,h,p=t.length,m=r.spanGaps,_=[],g=[],y=0,v=0;for(e.beginPath(),o=0,s=p;o=0;--n)(t=l[n].$filler)&&t.visible&&(a=(r=t.el)._view,i=r._children||[],o=t.mapper,s=a.backgroundColor||H.global.defaultColor,o&&s&&i.length&&(z.canvas.clipArea(u,e.chartArea),gr(u,i,o,a,s,r._loop),z.canvas.unclipArea(u)))}},vr=z.rtl.getRtlAdapter,br=z.noop,wr=z.valueOrDefault;function Mr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}H._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,a=r.getDatasetMeta(n);a.hidden=null===a.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:a.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,a=document.createElement("ul"),i=e.data.datasets;for(a.setAttribute("class",e.id+"-legend"),t=0,n=i.length;tl.width)&&(d+=o+n.padding,c[c.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:o},c[c.length-1]+=r+n.padding})),l.height+=d}else{var f=n.padding,h=e.columnWidths=[],p=e.columnHeights=[],m=n.padding,_=0,g=0;z.each(e.legendItems,(function(e,t){var r=Mr(n,o)+o/2+a.measureText(e.text).width;t>0&&g+o+2*f>l.height&&(m+=_+n.padding,h.push(_),p.push(g),_=0,g=0),_=Math.max(_,r),g+=o+f,s[t]={left:0,top:0,width:r,height:o}})),m+=_,h.push(_),p.push(g),l.width+=m}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:br,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=H.global,a=r.defaultColor,i=r.elements.line,o=e.height,s=e.columnHeights,l=e.width,u=e.lineWidths;if(t.display){var c,d=vr(t.rtl,e.left,e.minSize.width),f=e.ctx,h=wr(n.fontColor,r.defaultFontColor),p=z.options._parseFont(n),m=p.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=h,f.fillStyle=h,f.font=p.string;var _=Mr(n,m),g=e.legendHitBoxes,y=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},v=e.isHorizontal();c=v?{x:e.left+y(l,u[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+y(o,s[0]),line:0},z.rtl.overrideTextDirection(e.ctx,t.textDirection);var b=m+n.padding;z.each(e.legendItems,(function(t,r){var h=f.measureText(t.text).width,p=_+m/2+h,w=c.x,M=c.y;d.setWidth(e.minSize.width),v?r>0&&w+p+n.padding>e.left+e.minSize.width&&(M=c.y+=b,c.line++,w=c.x=e.left+y(l,u[c.line])):r>0&&M+b>e.top+e.minSize.height&&(w=c.x=w+e.columnWidths[c.line]+n.padding,c.line++,M=c.y=e.top+y(o,s[c.line]));var x=d.x(w);!function(e,t,r){if(!(isNaN(_)||_<=0)){f.save();var o=wr(r.lineWidth,i.borderWidth);if(f.fillStyle=wr(r.fillStyle,a),f.lineCap=wr(r.lineCap,i.borderCapStyle),f.lineDashOffset=wr(r.lineDashOffset,i.borderDashOffset),f.lineJoin=wr(r.lineJoin,i.borderJoinStyle),f.lineWidth=o,f.strokeStyle=wr(r.strokeStyle,a),f.setLineDash&&f.setLineDash(wr(r.lineDash,i.borderDash)),n&&n.usePointStyle){var s=_*Math.SQRT2/2,l=d.xPlus(e,_/2),u=t+m/2;z.canvas.drawPoint(f,r.pointStyle,s,l,u,r.rotation)}else f.fillRect(d.leftForLtr(e,_),t,_,m),0!==o&&f.strokeRect(d.leftForLtr(e,_),t,_,m);f.restore()}}(x,M,t),g[r].left=d.leftForLtr(x,g[r].width),g[r].top=M,function(e,t,n,r){var a=m/2,i=d.xPlus(e,_+a),o=t+a;f.fillText(n.text,i,o),n.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(i,o),f.lineTo(d.xPlus(i,r),o),f.stroke())}(x,M,t,h),v?c.x+=p+n.padding:c.y+=b})),z.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,a,i=this;if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)for(a=i.legendHitBoxes,n=0;n=(r=a[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return i.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,a="mouseup"===e.type?"click":e.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===a?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function kr(e,t){var n=new xr({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.legend=n}var Lr={id:"legend",_element:xr,beforeInit:function(e){var t=e.options.legend;t&&kr(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(z.mergeIf(t,H.global.legend),n?(pt.configure(e,n,t),n.options=t):kr(e,t)):n&&(pt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},Tr=z.noop;H._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Dr=J.extend({initialize:function(e){z.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Tr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Tr,beforeSetDimensions:Tr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Tr,beforeBuildLabels:Tr,buildLabels:Tr,afterBuildLabels:Tr,beforeFit:Tr,fit:function(){var e,t=this,n=t.options,r=t.minSize={},a=t.isHorizontal();n.display?(e=(z.isArray(n.text)?n.text.length:1)*z.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=a?t.maxWidth:e,t.height=r.height=a?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Tr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,a,i,o=z.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,c=e.top,d=e.left,f=e.bottom,h=e.right;t.fillStyle=z.valueOrDefault(n.fontColor,H.global.defaultFontColor),t.font=o.string,e.isHorizontal()?(a=d+(h-d)/2,i=c+l,r=h-d):(a="left"===n.position?d+l:h-l,i=c+(f-c)/2,r=f-c,u=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(a,i),t.rotate(u),t.textAlign="center",t.textBaseline="middle";var p=n.text;if(z.isArray(p))for(var m=0,_=0;_=0;r--){var a=e[r];if(t(a))return a}},z.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},z.almostEquals=function(e,t,n){return Math.abs(e-t)=e},z.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},z.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},z.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},z.toRadians=function(e){return e*(Math.PI/180)},z.toDegrees=function(e){return e*(180/Math.PI)},z._decimalPlaces=function(e){if(z.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},z.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,a=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:a}},z.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},z.aliasPixel=function(e){return e%2==0?0:.5},z._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,a=n/2;return Math.round((t-a)*r)/r+a},z.splineCurve=function(e,t,n,r){var a=e.skip?t:e,i=t,o=n.skip?t:n,s=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=r*(u=isNaN(u)?0:u),f=r*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(o.x-a.x),y:i.y-d*(o.y-a.y)},next:{x:i.x+f*(o.x-a.x),y:i.y+f*(o.y-a.y)}}},z.EPSILON=Number.EPSILON||1e-14,z.splineCurveMonotone=function(e){var t,n,r,a,i,o,s,l,u,c=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=c.length;for(t=0;t0?c[t-1]:null,(a=t0?c[t-1]:null,a=t=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},z.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},z.niceNum=function(e,t){var n=Math.floor(z.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},z.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},z.getRelativePosition=function(e,t){var n,r,a=e.originalEvent||e,i=e.target||e.srcElement,o=i.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=a.clientX,r=a.clientY);var l=parseFloat(z.getStyle(i,"padding-left")),u=parseFloat(z.getStyle(i,"padding-top")),c=parseFloat(z.getStyle(i,"padding-right")),d=parseFloat(z.getStyle(i,"padding-bottom")),f=o.right-o.left-l-c,h=o.bottom-o.top-u-d;return{x:n=Math.round((n-o.left-l)/f*i.width/t.currentDevicePixelRatio),y:r=Math.round((r-o.top-u)/h*i.height/t.currentDevicePixelRatio)}},z.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},z.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},z._calculatePadding=function(e,t,n){return(t=z.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},z._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},z.getMaximumWidth=function(e){var t=z._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-z._calculatePadding(t,"padding-left",n)-z._calculatePadding(t,"padding-right",n),a=z.getConstraintWidth(e);return isNaN(a)?r:Math.min(r,a)},z.getMaximumHeight=function(e){var t=z._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-z._calculatePadding(t,"padding-top",n)-z._calculatePadding(t,"padding-bottom",n),a=z.getConstraintHeight(e);return isNaN(a)?r:Math.min(r,a)},z.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},z.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,a=e.height,i=e.width;r.height=a*n,r.width=i*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=a+"px",r.style.width=i+"px")}},z.fontString=function(e,t,n){return t+" "+e+"px "+n},z.longestText=function(e,t,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(a=r.data={},i=r.garbageCollect=[],r.font=t),e.font=t;var o,s,l,u,c,d=0,f=n.length;for(o=0;on.length){for(o=0;or&&(r=i),r},z.numberOfLabelLines=function(e){var t=1;return z.each(e,(function(e){z.isArray(e)&&e.length>t&&(t=e.length)})),t},z.color=M?function(e){return e instanceof CanvasGradient&&(e=H.global.defaultColor),M(e)}:function(e){return console.error("Color.js not found!"),e},z.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:z.color(e).saturate(.5).darken(.1).rgbString()}}(),Kt._adapters=Zt,Kt.Animation=K,Kt.animationService=Q,Kt.controllers=Qe,Kt.DatasetController=ne,Kt.defaults=H,Kt.Element=J,Kt.elements=we,Kt.Interaction=at,Kt.layouts=pt,Kt.platform=St,Kt.plugins=Et,Kt.Scale=mn,Kt.scaleService=Yt,Kt.Ticks=en,Kt.Tooltip=zt,Kt.helpers.each(lr,(function(e,t){Kt.scaleService.registerScaleType(t,e,e._defaults)})),Er)Er.hasOwnProperty(Cr)&&Kt.plugins.register(Er[Cr]);Kt.platform.initialize();var Pr=Kt;return"undefined"!=typeof window&&(window.Chart=Kt),Kt.Chart=Kt,Kt.Legend=Er.legend._element,Kt.Title=Er.title._element,Kt.pluginService=Kt.plugins,Kt.PluginBase=Kt.Element.extend({}),Kt.canvasHelpers=Kt.helpers.canvas,Kt.layoutService=Kt.layouts,Kt.LinearScaleBase=wn,Kt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Kt[e]=function(t,n){return new Kt(t,Kt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),Pr}(function(){try{return n(2)}catch(e){}}())},function(e,t,n){var r=n(40);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(30),a=n(269),i=n(270),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?a(e):i(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,i,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,i,o,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";t.a=function(e,t,n,r){var a=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,a),n.__once&&e.removeEventListener(t,n.__once,a)}},function(e,t,n){"use strict";function r(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=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){var r=n(258),a=n(259),i=n(260),o=n(261),s=n(262);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(16),a=n(49),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(o.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(21),a=n(22);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},function(e,t,n){"use strict";(function(e){var r=n(0),a=n.n(r),i=n(9),o=n(4),s=n.n(o),l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var c=a.a.createContext||function(e,t){var n,a,o,c="__create-react-context-"+(l[o="__global_unique_id__"]=(l[o]||0)+1)+"__",d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=u(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[c]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((i=r)===(o=a)?0!==i||1/i==1/o:i!=i&&o!=o)?n=0:(n="function"==typeof t?t(r,a):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,o},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[c]=s.a.object.isRequired,n);var f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[c]&&this.context[c].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[c]&&this.context[c].off(this.onUpdate)},r.getValue=function(){return this.context[c]?this.context[c].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return f.contextTypes=((a={})[c]=s.a.object,a),{Provider:d,Consumer:f}};t.a=c}).call(this,n(26))},function(e,t,n){var r=n(248);e.exports=h,e.exports.parse=i,e.exports.compile=function(e,t){return s(i(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,o=0,s="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],f=n[1],h=n.index;if(s+=e.slice(o,h),o=h+d.length,f)s+=f[1];else{var p=e[o],m=n[2],_=n[3],g=n[4],y=n[5],v=n[6],b=n[7];s&&(r.push(s),s="");var w=null!=m&&null!=p&&p!==m,M="+"===v||"*"===v,x="?"===v||"*"===v,k=n[2]||c,L=g||y;r.push({name:_||i++,prefix:m||"",delimiter:k,optional:x,repeat:M,partial:w,asterisk:!!b,pattern:L?u(L):b?".*":"[^"+l(k)+"]+?"})}}return o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=void 0!==e&&e.env&&"production",v=function(e){function t(){m(this,t);var n=_(this,e.call(this));return n.handleOnClick=function(e){var t=n.chartInstance,r=n.props,a=r.getDatasetAtEvent,i=r.getElementAtEvent,o=r.getElementsAtEvent,s=r.onElementsClick;a&&a(t.getDatasetAtEvent(e),e),i&&i(t.getElementAtEvent(e),e),o&&o(t.getElementsAtEvent(e),e),s&&s(t.getElementsAtEvent(e),e)},n.ref=function(e){n.element=e},n.chartInstance=void 0,n}return g(t,e),t.prototype.componentDidMount=function(){this.renderChart()},t.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.destroyChart(),void this.renderChart();this.updateChart()},t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=(t.redraw,t.type),r=t.options,a=t.plugins,i=t.legend,o=t.height,s=t.width;if(!0===e.redraw)return!0;if(o!==e.height||s!==e.width)return!0;if(n!==e.type)return!0;if(!c()(i,e.legend))return!0;if(!c()(r,e.options))return!0;var l=this.transformDataProp(e);return!c()(this.shadowDataProp,l)||!c()(a,e.plugins)},t.prototype.componentWillUnmount=function(){this.destroyChart()},t.prototype.transformDataProp=function(e){var t=e.data;return"function"==typeof t?t(this.element):t},t.prototype.memoizeDataProps=function(){if(this.props.data){var e=this.transformDataProp(this.props);return this.shadowDataProp=h({},e,{datasets:e.datasets&&e.datasets.map((function(e){return h({},e)}))}),this.saveCurrentDatasets(),e}},t.prototype.checkDatasets=function(e){var n="production"!==y&&"prod"!==y,r=this.props.datasetKeyProvider!==t.getLabelAsKey,a=e.length>1;if(n&&a&&!r){var i=!1;e.forEach((function(e){e.label||(i=!0)})),i&&console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may provide a "datasetKeyProvider" as a prop that returns a unique key.')}},t.prototype.getCurrentDatasets=function(){return this.chartInstance&&this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[]},t.prototype.saveCurrentDatasets=function(){var e=this;this.datasets=this.datasets||{},this.getCurrentDatasets().forEach((function(t){e.datasets[e.props.datasetKeyProvider(t)]=t}))},t.prototype.updateChart=function(){var e=this,t=this.props.options,n=this.memoizeDataProps(this.props);if(this.chartInstance){t&&(this.chartInstance.options=l.a.helpers.configMerge(this.chartInstance.options,t));var r=this.getCurrentDatasets(),a=n.datasets||[];this.checkDatasets(r);var i=f()(r,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=a.map((function(t){var n=i[e.props.datasetKeyProvider(t)];if(n&&n.type===t.type&&t.data){n.data.splice(t.data.length),t.data.forEach((function(e,r){n.data[r]=t.data[r]}));t.data;var r=p(t,["data"]);return h({},n,r)}return t}));n.datasets;var o=p(n,["datasets"]);this.chartInstance.config.data=h({},this.chartInstance.config.data,o),this.chartInstance.update()}},t.prototype.renderChart=function(){var e=this.props,n=e.options,r=e.legend,a=e.type,i=e.plugins,o=this.element,s=this.memoizeDataProps();void 0===r||c()(t.defaultProps.legend,r)||(n.legend=r),this.chartInstance=new l.a(o,{type:a,data:s,options:n,plugins:i})},t.prototype.destroyChart=function(){if(this.chartInstance){this.saveCurrentDatasets();var e=Object.values(this.datasets);this.chartInstance.config.data.datasets=e,this.chartInstance.destroy()}},t.prototype.render=function(){var e=this.props,t=e.height,n=e.width,r=e.id;return a.a.createElement("canvas",{ref:this.ref,height:t,width:n,id:r,onClick:this.handleOnClick})},t}(a.a.Component);v.getLabelAsKey=function(e){return e.label},v.propTypes={data:o.a.oneOfType([o.a.object,o.a.func]).isRequired,getDatasetAtEvent:o.a.func,getElementAtEvent:o.a.func,getElementsAtEvent:o.a.func,height:o.a.number,legend:o.a.object,onElementsClick:o.a.func,options:o.a.object,plugins:o.a.arrayOf(o.a.object),redraw:o.a.bool,type:function(e,t,n){if(!l.a.controllers[e[t]])return new Error("Invalid chart type `"+e[t]+"` supplied to `"+n+"`.")},width:o.a.number,datasetKeyProvider:o.a.func},v.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:v.getLabelAsKey};(function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"doughnut"}))}})(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"pie"}))}}(a.a.Component);var b=function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}return g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"line"}))},t}(a.a.Component);(function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"bar"}))}})(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"horizontalBar"}))}}(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"radar"}))}}(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"polarArea"}))}}(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"bubble"}))}}(a.a.Component),function(e){function t(){return m(this,t),_(this,e.apply(this,arguments))}g(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v,h({},this.props,{ref:function(t){return e.chartInstance=t&&t.chartInstance},type:"scatter"}))}}(a.a.Component),l.a.defaults}).call(this,n(60))},function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(1),a=n(3),i=n(0),o=n(36);var s=function(e){var t=Object(o.a)();return[e[0],Object(i.useCallback)((function(n){if(t())return e[1](n)}),[t,e[1]])]},l=n(218),u={position:"absolute",top:"0",left:"0",opacity:"0",pointerEvents:"none"},c={};function d(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}t.a=function(e,t,n){var o,d=void 0===n?{}:n,f=d.enabled,h=void 0===f||f,p=d.placement,m=void 0===p?"bottom":p,_=d.strategy,g=void 0===_?"absolute":_,y=d.eventsEnabled,v=void 0===y||y,b=d.modifiers,w=Object(a.a)(d,["enabled","placement","strategy","eventsEnabled","modifiers"]),M=Object(i.useRef)(),x=Object(i.useCallback)((function(){M.current&&M.current.update()}),[]),k=s(Object(i.useState)({placement:m,scheduleUpdate:x,outOfBoundaries:!1,styles:u,arrowStyles:c})),L=k[0],T=k[1],D=Object(i.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"afterWrite",requires:["computeStyles"],fn:function(e){var t,n,a;T({scheduleUpdate:x,outOfBoundaries:!!(null==(t=e.state.modifiersData.hide)?void 0:t.isReferenceHidden),placement:e.state.placement,styles:Object(r.a)({},null==(n=e.state.styles)?void 0:n.popper),arrowStyles:Object(r.a)({},null==(a=e.state.styles)?void 0:a.arrow),state:e.state})}}}),[x,T]),S=(void 0===(o=b)&&(o={}),Array.isArray(o)?o:Object.keys(o).map((function(e){return o[e].name=e,o[e]}))),E=S.find((function(e){return"eventListeners"===e.name}));return!E&&v&&(S=[].concat(S,[E={name:"eventListeners",enabled:!0}])),Object(i.useEffect)((function(){x()}),[L.placement,x]),Object(i.useEffect)((function(){M.current&&h&&M.current.setOptions({placement:m,strategy:g,modifiers:[].concat(S,[D])})}),[g,m,E.enabled,D,h]),Object(i.useEffect)((function(){if(h&&null!=e&&null!=t)return M.current=Object(l.a)(e,t,Object(r.a)({},w,{placement:m,strategy:g,modifiers:[].concat(S,[D])})),function(){null!=M.current&&(M.current.destroy(),M.current=void 0,T((function(e){return Object(r.a)({},e,{styles:u,arrowStyles:c})})))}}),[h,e,t]),L}},function(e,t,n){"use strict";n.r(t),function(e){var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();var a=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(n+a+r)?e:l(s(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var c=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?c:10===e?d:c||d}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,a=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(a,0);var o,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||r.contains(a))return"BODY"===(s=(o=l).nodeName)||"HTML"!==s&&h(o.firstElementChild)!==o?h(l):l;var u=p(e);return u.host?m(u.host,t):m(e,p(t).host)}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=_(t,"top"),a=_(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=a*i,e.right+=a*i,e}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function v(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:v("Height",t,n,r),width:v("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),a="HTML"===t.nodeName,i=T(e),s=T(t),u=l(e),c=o(t),d=parseFloat(c.borderTopWidth),h=parseFloat(c.borderLeftWidth);n&&a&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=L({top:i.top-s.top-d,left:i.left-s.left-h,width:i.width,height:i.height});if(p.marginTop=0,p.marginLeft=0,!r&&a){var m=parseFloat(c.marginTop),_=parseFloat(c.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=h-_,p.right-=h-_,p.marginTop=m,p.marginLeft=_}return(r&&!n?t.contains(u):t===u&&"BODY"!==u.nodeName)&&(p=g(p,t)),p}function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=D(e,n),a=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:_(n),s=t?0:_(n,"left"),l={top:o-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:a,height:i};return L(l)}function E(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var n=s(e);return!!n&&E(n)}function Y(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function O(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},o=a?Y(e):m(e,u(t));if("viewport"===r)i=S(o,a);else{var c=void 0;"scrollParent"===r?"BODY"===(c=l(s(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===r?e.ownerDocument.documentElement:r;var d=D(c,o,a);if("HTML"!==c.nodeName||E(o))i=d;else{var f=b(e.ownerDocument),h=f.height,p=f.width;i.top+=d.top-d.marginTop,i.bottom=h+d.top,i.left+=d.left-d.marginLeft,i.right=p+d.left}}var _="number"==typeof(n=n||0);return i.left+=_?n:n.left||0,i.top+=_?n:n.top||0,i.right-=_?n:n.right||0,i.bottom-=_?n:n.bottom||0,i}function j(e){return e.width*e.height}function C(e,t,n,r,a){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=O(n,r,i,a),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map((function(e){return k({key:e},s[e],{area:j(s[e])})})).sort((function(e,t){return t.area-e.area})),u=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=u.length>0?u[0].key:l[0].key,d=e.split("-")[1];return c+(d?"-"+d:"")}function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=r?Y(t):m(t,u(n));return D(n,a,r)}function A(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function H(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function N(e,t,n){n=n.split("-")[0];var r=A(e),a={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),o=i?"top":"left",s=i?"left":"top",l=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[l]/2-r[l]/2,a[s]=n===s?t[s]-r[u]:t[H(s)],a}function R(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function I(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=R(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=L(t.offsets.popper),t.offsets.reference=L(t.offsets.reference),t=n(t,e))})),t}function F(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=C(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=N(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=I(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function z(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function W(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(e),r=Z.slice(n+1).concat(Z.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ae(e,t,n,r){var a=[0,0],i=-1!==["right","left"].indexOf(r),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=o.indexOf(R(o,(function(e){return-1!==e.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return(u=u.map((function(e,r){var a=(1===r?!i:i)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=r}return L(s)[t]/100*i}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(e,a,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){J(n)&&(a[t]+=n*("-"===e[r-1]?-1:1))}))})),a}var ie={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var a=e.offsets,i=a.reference,o=a.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:x({},l,i[l]),end:x({},l,i[l]+i[u]-o[u])};e.offsets.popper=k({},o,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,a=e.offsets,i=a.popper,o=a.reference,s=r.split("-")[0],l=void 0;return l=J(+n)?[+n,0]:ae(n,i,o,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=W("transform"),a=e.instance.popper.style,i=a.top,o=a.left,s=a[r];a.top="",a.left="",a[r]="";var l=O(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);a.top=i,a.left=o,a[r]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,d={primary:function(e){var n=c[e];return c[e]l[e]&&!t.escapeWithReference&&(r=Math.min(c[n],l[e]-("right"===e?c.width:c.height))),x({},n,r)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=k({},c,d[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=-1!==["top","bottom"].indexOf(a),s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[l]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var a=e.placement.split("-")[0],i=e.offsets,s=i.popper,l=i.reference,u=-1!==["left","right"].indexOf(a),c=u?"height":"width",d=u?"Top":"Left",f=d.toLowerCase(),h=u?"left":"top",p=u?"bottom":"right",m=A(r)[c];l[p]-ms[p]&&(e.offsets.popper[f]+=l[f]+m-s[p]),e.offsets.popper=L(e.offsets.popper);var _=l[f]+l[c]/2-m/2,g=o(e.instance.popper),y=parseFloat(g["margin"+d]),v=parseFloat(g["border"+d+"Width"]),b=_-e.offsets.popper[f]-y-v;return b=Math.max(Math.min(s[c]-m,b),0),e.arrowElement=r,e.offsets.arrow=(x(n={},f,Math.round(b)),x(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(z(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],a=H(r),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case te:o=[r,a];break;case ne:o=ee(r);break;case re:o=ee(r,!0);break;default:o=t.behavior}return o.forEach((function(s,l){if(r!==s||o.length===l+1)return e;r=e.placement.split("-")[0],a=H(r);var u=e.offsets.popper,c=e.offsets.reference,d=Math.floor,f="left"===r&&d(u.right)>d(c.left)||"right"===r&&d(u.left)d(c.top)||"bottom"===r&&d(u.top)d(n.right),m=d(u.top)d(n.bottom),g="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&_,y=-1!==["top","bottom"].indexOf(r),v=!!t.flipVariations&&(y&&"start"===i&&h||y&&"end"===i&&p||!y&&"start"===i&&m||!y&&"end"===i&&_),b=!!t.flipVariationsByContent&&(y&&"start"===i&&p||y&&"end"===i&&h||!y&&"start"===i&&_||!y&&"end"===i&&m),w=v||b;(f||g||w)&&(e.flipped=!0,(f||g)&&(r=o[l+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=k({},e.offsets.popper,N(e.instance.popper,e.offsets.reference,e.placement)),e=I(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,a=r.popper,i=r.reference,o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return a[o?"left":"top"]=i[n]-(s?a[o?"width":"height"]:0),e.placement=H(t),e.offsets.popper=L(a),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=R(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=k({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=k({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return k({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return M(e,[{key:"update",value:function(){return F.call(this)}},{key:"destroy",value:function(){return B.call(this)}},{key:"enableEventListeners",value:function(){return q.call(this)}},{key:"disableEventListeners",value:function(){return $.call(this)}}]),e}();oe.Utils=("undefined"!=typeof window?window:e).PopperUtils,oe.placements=X,oe.Defaults=ie,t.default=oe}.call(this,n(26))},function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,a){"use strict";var i=[],o=Object.getPrototypeOf,s=i.slice,l=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},u=i.push,c=i.indexOf,d={},f=d.toString,h=d.hasOwnProperty,p=h.toString,m=p.call(Object),_={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},v=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,a,i=(n=n||v).createElement("script");if(i.text=e,t)for(r in b)(a=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,a);n.head.appendChild(i).parentNode.removeChild(i)}function M(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var x=function(e,t){return new x.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=M(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}x.fn=x.prototype={jquery:"3.5.1",constructor:x,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+N+")"+N+"*"),V=new RegExp(N+"|>"),q=new RegExp(F),$=new RegExp("^"+R+"$"),J={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+N+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},oe=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{C.apply(Y=P.call(w.childNodes),w.childNodes),Y[w.childNodes.length].nodeType}catch(e){C={apply:Y.length?function(e,t){j.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,a){var i,s,u,c,d,p,g,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!a&&(f(t),t=t||h,m)){if(11!==w&&(d=Z.exec(e)))if(i=d[1]){if(9===w){if(!(u=t.getElementById(i)))return r;if(u.id===i)return r.push(u),r}else if(y&&(u=y.getElementById(i))&&v(t,u)&&u.id===i)return r.push(u),r}else{if(d[2])return C.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return C.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!D[e+" "]&&(!_||!_.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===w&&(V.test(e)||U.test(e))){for((y=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ae):t.setAttribute("id",c=b)),s=(p=o(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+ve(p[s]);g=p.join(",")}try{return C.apply(r,y.querySelectorAll(g)),r}catch(t){D(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return l(e.replace(W,"$1"),t,r,a)}function le(){var e=[];return function t(n,a){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=a}}function ue(e){return e[b]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),a=n.length;a--;)r.attrHandle[n[a]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function _e(e){return ue((function(t){return t=+t,ue((function(n,r){for(var a,i=e([],n.length,t),o=i.length;o--;)n[a=i[o]]&&(n[a]=!(r[a]=n[a]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,a,o=e?e.ownerDocument||e:w;return o!=h&&9===o.nodeType&&o.documentElement?(p=(h=o).documentElement,m=!i(h),w!=h&&(a=h.defaultView)&&a.top!==a&&(a.addEventListener?a.addEventListener("unload",ie,!1):a.attachEvent&&a.attachEvent("onunload",ie)),n.scope=ce((function(e){return p.appendChild(e).appendChild(h.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=b,!h.getElementsByName||!h.getElementsByName(b).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,a,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(a=t.getElementsByName(e),r=0;i=a[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],a=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[a++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},g=[],_=[],(n.qsa=X.test(h.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+N+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+N+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+b+"-]").length||_.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\["+N+"*name"+N+"*="+N+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+N+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=X.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",F)})),_=_.length&&new RegExp(_.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(p.compareDocumentPosition),v=t||X.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==h||e.ownerDocument==w&&v(w,e)?-1:t==h||t.ownerDocument==w&&v(w,t)?1:c?A(c,e)-A(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,a=e.parentNode,i=t.parentNode,o=[e],s=[t];if(!a||!i)return e==h?-1:t==h?1:a?-1:i?1:c?A(c,e)-A(c,t):0;if(a===i)return fe(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?fe(o[r],s[r]):o[r]==w?-1:s[r]==w?1:0},h):h},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&m&&!D[t+" "]&&(!g||!g.test(t))&&(!_||!_.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){D(t,!0)}return se(t,h,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=h&&f(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=h&&f(e);var a=r.attrHandle[t.toLowerCase()],i=a&&E.call(r.attrHandle,t.toLowerCase())?a(e,t,!m):void 0;return void 0!==i?i:n.attributes||!m?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,ae)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],a=0,i=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(S),d){for(;t=e[i++];)t===e[i]&&(a=r.push(i));for(;a--;)e.splice(r[a],1)}return c=null,e},a=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ue,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return J.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+N+")"+e+"("+N+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var a=se.attr(r,e);return null==a?"!="===t:!t||(a+="","="===t?a===n:"!="===t?a!==n:"^="===t?n&&0===a.indexOf(n):"*="===t?n&&a.indexOf(n)>-1:"$="===t?n&&a.slice(-n.length)===n:"~="===t?(" "+a.replace(z," ")+" ").indexOf(n)>-1:"|="===t&&(a===n||a.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,a){var i="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,h,p,m=i!==o?"nextSibling":"previousSibling",_=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!l&&!s,v=!1;if(_){if(i){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?_.firstChild:_.lastChild],o&&y){for(v=(h=(u=(c=(d=(f=_)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===M&&u[1])&&u[2],f=h&&_.childNodes[h];f=++h&&f&&f[m]||(v=h=0)||p.pop();)if(1===f.nodeType&&++v&&f===t){c[e]=[M,h,v];break}}else if(y&&(v=h=(u=(c=(d=(f=t)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===M&&u[1]),!1===v)for(;(f=++h&&f&&f[m]||(v=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++v||(y&&((c=(d=f[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[M,v]),f!==t)););return(v-=a)===r||v%r==0&&v/r>=0}}},PSEUDO:function(e,t){var n,a=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[b]?a(t):a.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var r,i=a(e,t),o=i.length;o--;)e[r=A(e,i[o])]=!(n[r]=i[o])})):function(e){return a(e,0,n)}):a}},pseudos:{not:ue((function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[b]?ue((function(e,t,n,a){for(var i,o=r(e,null,a,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))})):function(e,a,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||a(t)).indexOf(e)>-1}})),lang:ue((function(e){return $.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:_e((function(){return[0]})),last:_e((function(e,t){return[t-1]})),eq:_e((function(e,t,n){return[n<0?n+t:n]})),even:_e((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:_e((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function Me(e,t,n,r,a){for(var i,o=[],s=0,l=e.length,u=null!=t;s-1&&(i[u]=!(o[u]=d))}}else g=Me(g===o?g.splice(p,g.length):g),a?a(null,o,g,l):C.apply(o,g)}))}function ke(e){for(var t,n,a,i=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],l=o?1:0,c=be((function(e){return e===t}),s,!0),d=be((function(e){return A(t,e)>-1}),s,!0),f=[function(e,n,r){var a=!o&&(r||n!==u)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,a}];l1&&we(f),l>1&&ve(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(W,"$1"),n,l0,a=e.length>0,i=function(i,o,s,l,c){var d,p,_,g=0,y="0",v=i&&[],b=[],w=u,x=i||a&&r.find.TAG("*",c),k=M+=null==w?1:Math.random()||.1,L=x.length;for(c&&(u=o==h||o||c);y!==L&&null!=(d=x[y]);y++){if(a&&d){for(p=0,o||d.ownerDocument==h||(f(d),s=!m);_=e[p++];)if(_(d,o||h,s)){l.push(d);break}c&&(M=k)}n&&((d=!_&&d)&&g--,i&&v.push(d))}if(g+=y,n&&y!==g){for(p=0;_=t[p++];)_(v,b,o,s);if(i){if(g>0)for(;y--;)v[y]||b[y]||(b[y]=O.call(l));b=Me(b)}C.apply(l,b),c&&!i&&b.length>0&&g+t.length>1&&se.uniqueSort(l)}return c&&(M=k,u=w),v};return n?ue(i):i}(i,a))).selector=e}return s},l=se.select=function(e,t,n,a){var i,l,u,c,d,f="function"==typeof e&&e,h=!a&&o(e=f.selector||e);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(i=J.needsContext.test(e)?0:l.length;i--&&(u=l[i],!r.relative[c=u.type]);)if((d=r.find[c])&&(a=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ge(t.parentNode)||t))){if(l.splice(i,1),!(e=a.length&&ve(l)))return C.apply(n,a),n;break}}return(f||s(e,h))(a,t,!m,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(S).join("")===b,n.detectDuplicates=!!d,f(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(H,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);x.find=L,x.expr=L.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=L.uniqueSort,x.text=L.getText,x.isXMLDoc=L.isXML,x.contains=L.contains,x.escapeSelector=L.escape;var T=function(e,t,n){for(var r=[],a=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(a&&x(e).is(n))break;r.push(e)}return r},D=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},S=x.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var Y=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return g(t)?x.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?x.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?x.grep(e,(function(e){return c.call(t,e)>-1!==n})):x.filter(t,e,n)}x.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,(function(e){return 1===e.nodeType})))},x.fn.extend({find:function(e){var t,n,r=this.length,a=this;if("string"!=typeof e)return this.pushStack(x(e).filter((function(){for(t=0;t1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(O(this,e||[],!1))},not:function(e){return this.pushStack(O(this,e||[],!0))},is:function(e){return!!O(this,"string"==typeof e&&S.test(e)?x(e):e||[],!1).length}});var j,C=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var r,a;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:C.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),Y.test(r[1])&&x.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(a=v.getElementById(r[2]))&&(this[0]=a,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,j=x(v);var P=/^(?:parents|prev(?:Until|All))/,A={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&x.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?x.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?c.call(x(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return D((e.parentNode||{}).firstChild,e)},children:function(e){return D(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},(function(e,t){x.fn[e]=function(n,r){var a=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(a=x.filter(r,a)),this.length>1&&(A[e]||x.uniqueSort(a),P.test(e)&&a.reverse()),this.pushStack(a)}}));var N=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function F(e,t,n,r){var a;try{e&&g(a=e.promise)?a.call(e).done(t).fail(n):e&&g(a=e.then)?a.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(N)||[],(function(e,n){t[n]=!0})),t}(e):x.extend({},e);var t,n,r,a,i=[],o=[],s=-1,l=function(){for(a=a||e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?x.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return a=o=[],i=n="",this},disabled:function(){return!i},lock:function(){return a=o=[],n||t||(i=n=""),this},locked:function(){return!!a},fireWith:function(e,n){return a||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},x.extend({Deferred:function(e){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return x.Deferred((function(n){x.each(t,(function(t,r){var a=g(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=a&&a.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,a?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,a){var i=0;function o(e,t,r,a){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=i&&(r!==I&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(x.Deferred.getStackHook&&(c.stackTrace=x.Deferred.getStackHook()),n.setTimeout(c))}}return x.Deferred((function(n){t[0][3].add(o(0,n,g(a)?a:R,n.notifyWith)),t[1][3].add(o(0,n,g(e)?e:R)),t[2][3].add(o(0,n,g(r)?r:I))})).promise()},promise:function(e){return null!=e?x.extend(e,a):a}},i={};return x.each(t,(function(e,n){var o=n[2],s=n[5];a[n[1]]=o.add,s&&o.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=o.fireWith})),a.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),a=s.call(arguments),i=x.Deferred(),o=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,a)}};if(t<=1&&(F(e,i.done(o(n)).resolve,i.reject,!t),"pending"===i.state()||g(a[n]&&a[n].then)))return i.then();for(;n--;)F(a[n],o(n),i.reject);return i.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&z.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},x.readyException=function(e){n.setTimeout((function(){throw e}))};var W=x.Deferred();function B(){v.removeEventListener("DOMContentLoaded",B),n.removeEventListener("load",B),x.ready()}x.fn.ready=function(e){return W.then(e).catch((function(e){x.readyException(e)})),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||W.resolveWith(v,[x]))}}),x.ready.then=W.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?n.setTimeout(x.ready):(v.addEventListener("DOMContentLoaded",B),n.addEventListener("load",B));var U=function(e,t,n,r,a,i,o){var s=0,l=e.length,u=null==n;if("object"===M(n))for(s in a=!0,n)U(e,t,s,n[s],!0,i,o);else if(void 0!==r&&(a=!0,g(r)||(o=!0),u&&(o?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(x(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){X.remove(this,e)}))}}),x.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,a=n.shift(),i=x._queueHooks(e,t);"inprogress"===a&&(a=n.shift(),r--),a&&("fx"===t&&n.unshift("inprogress"),delete i.stop,a.call(e,(function(){x.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:x.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i;he=v.createDocumentFragment().appendChild(v.createElement("div")),(pe=v.createElement("input")).setAttribute("type","radio"),pe.setAttribute("checked","checked"),pe.setAttribute("name","t"),he.appendChild(pe),_.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",_.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",_.option=!!he.lastChild;var ye={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?x.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n",""]);var we=/<|&#?\w+;/;function Me(e,t,n,r,a){for(var i,o,s,l,u,c,d=t.createDocumentFragment(),f=[],h=0,p=e.length;h-1)a&&a.push(i);else if(u=oe(i),o=ve(d.appendChild(i),"script"),u&&be(o),n)for(c=0;i=o[c++];)ge.test(i.type||"")&&n.push(i);return d}var xe=/^key/,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Le=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function De(){return!1}function Se(e,t){return e===function(){try{return v.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,a,i){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],i);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=De;else if(!a)return e;return 1===i&&(o=a,(a=function(e){return x().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=x.guid++)),e.each((function(){x.event.add(this,t,a,r,n)}))}function Ye(e,t,n){n?(Q.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var r,a,i=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),Q.set(this,t,i),r=n(this,t),this[t](),i!==(a=Q.get(this,t))||r?Q.set(this,t,!1):a={},i!==a)return e.stopImmediatePropagation(),e.preventDefault(),a.value}else i.length&&(Q.set(this,t,{value:x.event.trigger(x.extend(i[0],x.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&x.event.add(e,t,Te)}x.event={global:{},add:function(e,t,n,r,a){var i,o,s,l,u,c,d,f,h,p,m,_=Q.get(e);if(G(e))for(n.handler&&(n=(i=n).handler,a=i.selector),a&&x.find.matchesSelector(ie,a),n.guid||(n.guid=x.guid++),(l=_.events)||(l=_.events=Object.create(null)),(o=_.handle)||(o=_.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(N)||[""]).length;u--;)h=m=(s=Le.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=x.event.special[h]||{},h=(a?d.delegateType:d.bindType)||h,d=x.event.special[h]||{},c=x.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:p.join(".")},i),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,o)||e.addEventListener&&e.addEventListener(h,o)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),a?f.splice(f.delegateCount++,0,c):f.push(c),x.event.global[h]=!0)},remove:function(e,t,n,r,a){var i,o,s,l,u,c,d,f,h,p,m,_=Q.hasData(e)&&Q.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(N)||[""]).length;u--;)if(h=m=(s=Le.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=x.event.special[h]||{},f=l[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=i=f.length;i--;)c=f[i],!a&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(i,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));o&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,_.handle)||x.removeEvent(e,h,_.handle),delete l[h])}else for(h in l)x.event.remove(e,h+t[u],n,r,!0);x.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,a,i,o,s=new Array(arguments.length),l=x.event.fix(e),u=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=x.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(i=[],o={},n=0;n-1:x.find(a,this,null,[u]).length),o[a]&&i.push(r);i.length&&s.push({elem:u,handlers:i})}return u=this,l\s*$/g;function Pe(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Ae(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ne(e,t){var n,r,a,i,o,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(a in Q.remove(t,"handle events"),s)for(n=0,r=s[a].length;n1&&"string"==typeof p&&!_.checkClone&&je.test(p))return e.each((function(a){var i=e.eq(a);m&&(t[0]=p.call(this,a,i.html())),Ie(i,t,n,r)}));if(f&&(i=(a=Me(t,e[0].ownerDocument,!1,e,r)).firstChild,1===a.childNodes.length&&(a=i),i||r)){for(s=(o=x.map(ve(a,"script"),Ae)).length;d0&&be(o,!l&&ve(e,"script")),s},cleanData:function(e){for(var t,n,r,a=x.event.special,i=0;void 0!==(n=e[i]);i++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)a[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),x.fn.extend({detach:function(e){return Fe(this,e,!0)},remove:function(e){return Fe(this,e)},text:function(e){return U(this,(function(e){return void 0===e?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ie(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)}))},prepend:function(){return Ie(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return x.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ye[(_e.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n3,ie.removeChild(e)),s}}))}();var $e=["Webkit","Moz","ms"],Je=v.createElement("div").style,Ge={};function Ke(e){var t=x.cssProps[e]||Ge[e];return t||(e in Je?e:Ge[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=$e.length;n--;)if((e=$e[n]+t)in Je)return e}(e)||e)}var Qe=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,a,i){var o="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(l+=x.css(e,n+ae[o],!0,a)),r?("content"===n&&(l-=x.css(e,"padding"+ae[o],!0,a)),"margin"!==n&&(l-=x.css(e,"border"+ae[o]+"Width",!0,a))):(l+=x.css(e,"padding"+ae[o],!0,a),"padding"!==n?l+=x.css(e,"border"+ae[o]+"Width",!0,a):s+=x.css(e,"border"+ae[o]+"Width",!0,a));return!r&&i>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))||0),l}function rt(e,t,n){var r=We(e),a=(!_.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,r),i=a,o=Ve(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(ze.test(o)){if(!n)return o;o="auto"}return(!_.boxSizingReliable()&&a||!_.reliableTrDimensions()&&E(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===x.css(e,"display",!1,r))&&e.getClientRects().length&&(a="border-box"===x.css(e,"boxSizing",!1,r),(i=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+nt(e,t,n||(a?"border":"content"),i,r,o)+"px"}function at(e,t,n,r,a){return new at.prototype.init(e,t,n,r,a)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ve(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,i,o,s=J(t),l=Xe.test(t),u=e.style;if(l||(t=Ke(s)),o=x.cssHooks[t]||x.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(a=o.get(e,!1,r))?a:u[t];"string"===(i=typeof n)&&(a=re.exec(n))&&a[1]&&(n=ue(e,t,a),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=a&&a[3]||(x.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var a,i,o,s=J(t);return Xe.test(t)||(t=Ke(s)),(o=x.cssHooks[t]||x.cssHooks[s])&&"get"in o&&(a=o.get(e,!0,n)),void 0===a&&(a=Ve(e,t,r)),"normal"===a&&t in et&&(a=et[t]),""===n||n?(i=parseFloat(a),!0===n||isFinite(i)?i||0:a):a}}),x.each(["height","width"],(function(e,t){x.cssHooks[t]={get:function(e,n,r){if(n)return!Qe.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Be(e,Ze,(function(){return rt(e,t,r)}))},set:function(e,n,r){var a,i=We(e),o=!_.scrollboxSize()&&"absolute"===i.position,s=(o||r)&&"border-box"===x.css(e,"boxSizing",!1,i),l=r?nt(e,t,r,s,i):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-nt(e,t,"border",!1,i)-.5)),l&&(a=re.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),tt(0,n,l)}}})),x.cssHooks.marginLeft=qe(_.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ve(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(e,t){x.cssHooks[e+t]={expand:function(n){for(var r=0,a={},i="string"==typeof n?n.split(" "):[n];r<4;r++)a[e+ae[r]+t]=i[r]||i[r-2]||i[0];return a}},"margin"!==e&&(x.cssHooks[e+t].set=tt)})),x.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var r,a,i={},o=0;if(Array.isArray(t)){for(r=We(e),a=t.length;o1)}}),x.Tween=at,at.prototype={constructor:at,init:function(e,t,n,r,a,i){this.elem=e,this.prop=n,this.easing=a||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(x.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Ke(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=at.prototype.init,x.fx.step={};var it,ot,st=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ut(){ot&&(!1===v.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ut):n.setTimeout(ut,x.fx.interval),x.fx.tick())}function ct(){return n.setTimeout((function(){it=void 0})),it=Date.now()}function dt(e,t){var n,r=0,a={height:e};for(t=t?1:0;r<4;r+=2-t)a["margin"+(n=ae[r])]=a["padding"+n]=e;return t&&(a.opacity=a.width=e),a}function ft(e,t,n){for(var r,a=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),i=0,o=a.length;i1)},removeAttr:function(e){return this.each((function(){x.removeAttr(this,e)}))}}),x.extend({attr:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?x.prop(e,t,n):(1===i&&x.isXMLDoc(e)||(a=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:(e.setAttribute(t,n+""),n):a&&"get"in a&&null!==(r=a.get(e,t))?r:null==(r=x.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,a=t&&t.match(N);if(a&&1===e.nodeType)for(;n=a[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=mt[t]||x.find.attr;mt[t]=function(e,t,r){var a,i,o=t.toLowerCase();return r||(i=mt[o],mt[o]=a,a=null!=n(e,t,r)?o:null,mt[o]=i),a}}));var _t=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(N)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(N)||[]}x.fn.extend({prop:function(e,t){return U(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[x.propFix[e]||e]}))}}),x.extend({prop:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&x.isXMLDoc(e)||(t=x.propFix[t]||t,a=x.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:e[t]=n:a&&"get"in a&&null!==(r=a.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):_t.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(e){var t,n,r,a,i,o,s,l=0;if(g(e))return this.each((function(t){x(this).addClass(e.call(this,t,vt(this)))}));if((t=bt(e)).length)for(;n=this[l++];)if(a=vt(n),r=1===n.nodeType&&" "+yt(a)+" "){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a!==(s=yt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,a,i,o,s,l=0;if(g(e))return this.each((function(t){x(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[l++];)if(a=vt(n),r=1===n.nodeType&&" "+yt(a)+" "){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a!==(s=yt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each((function(n){x(this).toggleClass(e.call(this,n,vt(this),t),t)})):this.each((function(){var t,a,i,o;if(r)for(a=0,i=x(this),o=bt(e);t=o[a++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=vt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+yt(vt(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;x.fn.extend({val:function(e){var t,n,r,a=this[0];return arguments.length?(r=g(e),this.each((function(n){var a;1===this.nodeType&&(null==(a=r?e.call(this,n,x(this).val()):e)?a="":"number"==typeof a?a+="":Array.isArray(a)&&(a=x.map(a,(function(e){return null==e?"":e+""}))),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))}))):a?(t=x.valHooks[a.type]||x.valHooks[a.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:"string"==typeof(n=a.value)?n.replace(wt,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:yt(x.text(e))}},select:{get:function(e){var t,n,r,a=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?i+1:a.length;for(r=i<0?l:o?i:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},_.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),_.focusin="onfocusin"in n;var Mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(e,t,r,a){var i,o,s,l,u,c,d,f,p=[r||v],m=h.call(e,"type")?e.type:e,_=h.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=r=r||v,3!==r.nodeType&&8!==r.nodeType&&!Mt.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(_=m.split("."),m=_.shift(),_.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[x.expando]?e:new x.Event(m,"object"==typeof e&&e)).isTrigger=a?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:x.makeArray(t,[e]),d=x.event.special[m]||{},a||!d.trigger||!1!==d.trigger.apply(r,t))){if(!a&&!d.noBubble&&!y(r)){for(l=d.delegateType||m,Mt.test(l+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(r.ownerDocument||v)&&p.push(s.defaultView||s.parentWindow||n)}for(i=0;(o=p[i++])&&!e.isPropagationStopped();)f=o,e.type=i>1?l:d.bindType||m,(c=(Q.get(o,"events")||Object.create(null))[e.type]&&Q.get(o,"handle"))&&c.apply(o,t),(c=u&&o[u])&&c.apply&&G(o)&&(e.result=c.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,a||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!G(r)||u&&g(r[m])&&!y(r)&&((s=r[u])&&(r[u]=null),x.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,xt),r[m](),e.isPropagationStopped()&&f.removeEventListener(m,xt),x.event.triggered=void 0,s&&(r[u]=s)),e.result}},simulate:function(e,t,n){var r=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(r,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each((function(){x.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}}),_.focusin||x.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t);a||r.addEventListener(e,n,!0),Q.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t)-1;a?Q.access(r,t,a):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var kt=n.location,Lt={guid:Date.now()},Tt=/\?/;x.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),t};var Dt=/\[\]$/,St=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Yt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var a;if(Array.isArray(t))x.each(t,(function(t,a){n||Dt.test(e)?r(e,a):Ot(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,n,r)}));else if(n||"object"!==M(t))r(e,t);else for(a in t)Ot(e+"["+a+"]",t[a],n,r)}x.param=function(e,t){var n,r=[],a=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,(function(){a(this.name,this.value)}));else for(n in e)Ot(n,e[n],t,a);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&Yt.test(this.nodeName)&&!Et.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,(function(e){return{name:t.name,value:e.replace(St,"\r\n")}})):{name:t.name,value:n.replace(St,"\r\n")}})).get()}});var jt=/%20/g,Ct=/#.*$/,Pt=/([?&])_=[^&]*/,At=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Nt=/^\/\//,Rt={},It={},Ft="*/".concat("*"),zt=v.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,a=0,i=t.toLowerCase().match(N)||[];if(g(n))for(;r=i[a++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var a={},i=e===It;function o(s){var l;return a[s]=!0,x.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||i||a[u]?i?!(l=u):void 0:(t.dataTypes.unshift(u),o(u),!1)})),l}return o(t.dataTypes[0])||!a["*"]&&o("*")}function Ut(e,t){var n,r,a=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((a[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}zt.href=kt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,x.ajaxSettings),t):Ut(x.ajaxSettings,e)},ajaxPrefilter:Wt(Rt),ajaxTransport:Wt(It),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,a,i,o,s,l,u,c,d,f,h=x.ajaxSetup({},t),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?x(p):x.event,_=x.Deferred(),g=x.Callbacks("once memory"),y=h.statusCode||{},b={},w={},M="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(u){if(!o)for(o={};t=At.exec(i);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?i:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||M;return r&&r.abort(t),L(0,t),this}};if(_.promise(k),h.url=((e||h.url||kt.href)+"").replace(Nt,kt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(N)||[""],null==h.crossDomain){l=v.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=zt.protocol+"//"+zt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),Bt(Rt,h,t,k),u)return k;for(d in(c=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ht.test(h.type),a=h.url.replace(Ct,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(jt,"+")):(f=h.url.slice(a.length),h.data&&(h.processData||"string"==typeof h.data)&&(a+=(Tt.test(a)?"&":"?")+h.data,delete h.data),!1===h.cache&&(a=a.replace(Pt,"$1"),f=(Tt.test(a)?"&":"?")+"_="+Lt.guid+++f),h.url=a+f),h.ifModified&&(x.lastModified[a]&&k.setRequestHeader("If-Modified-Since",x.lastModified[a]),x.etag[a]&&k.setRequestHeader("If-None-Match",x.etag[a])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ft+"; q=0.01":""):h.accepts["*"]),h.headers)k.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,k,h)||u))return k.abort();if(M="abort",g.add(h.complete),k.done(h.success),k.fail(h.error),r=Bt(It,h,t,k)){if(k.readyState=1,c&&m.trigger("ajaxSend",[k,h]),u)return k;h.async&&h.timeout>0&&(s=n.setTimeout((function(){k.abort("timeout")}),h.timeout));try{u=!1,r.send(b,L)}catch(e){if(u)throw e;L(-1,e)}}else L(-1,"No Transport");function L(e,t,o,l){var d,f,v,b,w,M=t;u||(u=!0,s&&n.clearTimeout(s),r=void 0,i=l||"",k.readyState=e>0?4:0,d=e>=200&&e<300||304===e,o&&(b=function(e,t,n){for(var r,a,i,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)i=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){i=a;break}o||(o=a)}i=i||o}if(i)return i!==l[0]&&l.unshift(i),n[i]}(h,k,o)),!d&&x.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),b=function(e,t,n,r){var a,i,o,s,l,u={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=c.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(o=u[l+" "+i]||u["* "+i]))for(a in u)if((s=a.split(" "))[1]===i&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[a]:!0!==u[a]&&(i=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}(h,b,k,d),d?(h.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(x.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(x.etag[a]=w)),204===e||"HEAD"===h.type?M="nocontent":304===e?M="notmodified":(M=b.state,f=b.data,d=!(v=b.error))):(v=M,!e&&M||(M="error",e<0&&(e=0))),k.status=e,k.statusText=(t||M)+"",d?_.resolveWith(p,[f,M,k]):_.rejectWith(p,[k,M,v]),k.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[k,h,d?f:v]),g.fireWith(p,[k,M]),c&&(m.trigger("ajaxComplete",[k,h]),--x.active||x.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],(function(e,t){x[t]=function(e,n,r,a){return g(n)&&(a=a||r,r=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:a,data:n,success:r},x.isPlainObject(e)&&e))}})),x.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){x(this).wrapInner(e.call(this,t))})):this.each((function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){x(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},qt=x.ajaxSettings.xhr();_.cors=!!qt&&"withCredentials"in qt,_.ajax=qt=!!qt,x.ajaxTransport((function(e){var t,r;if(_.cors||qt&&!e.crossDomain)return{send:function(a,i){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(o,a[o]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),x.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),x.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,a){t=x("