1(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"3/ER":function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=i&&i.exports===a?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n("3UD+")(t))},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);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}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},J1oZ:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("tk/3"),a=n("JIr8"),i=n("lJxs"),o=n("AytR"),s=n("fXoL"),l=n("FXLl"),c=n("PM8p");let u=(()=>{class t{constructor(t,e,n){this.http=t,this.baseService=e,this.chiNhanhService=n,this.listThoiVus=null}add(t){return this.clearCache(),Object.keys(t).forEach(e=>null===t[e]?delete t[e]:""),this.http.post(`${o.a.apiUrl}/api/thoi-vu/create`,t).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}update(t){return this.clearCache(),this.http.put(`${o.a.apiUrl}/api/thoi-vu/update`,t).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}getDetail(t){return this.http.get(`${o.a.apiUrl}/api/thoi-vu/detail/${t}`).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}delete(t){return this.clearCache(),this.http.delete(o.a.apiUrl+"/api/thoi-vu/delete?listId="+t).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}getAll(t=null){return null==this.listThoiVus?this.http.get(`${o.a.apiUrl}/api/thoi-vu/getall`).pipe(Object(i.a)(e=>e.filter(e=>{var n;return null==t||""==t||(null===(n=e.ten)||void 0===n?void 0:n.includes(t))})),Object(a.a)(t=>this.baseService.handleError(t))):this.listThoiVus.pipe(Object(i.a)(e=>e.filter(e=>{var n;return null==t||""==t||(null===(n=e.ten)||void 0===n?void 0:n.includes(t))})))}getByThoiGian(t){const e=(new r.g).set("thoiGian",null!=t?t:"");return this.http.get(`${o.a.apiUrl}/api/thoi-vu/get-by-thoi-gian`,{params:e}).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}getPaging(t,e,n,i){const s=(new r.g).set("pageIndex",t.toString()).set("pageSize",e.toString()).set("keyword",n).set("maVung",null!=i?i:"");return this.http.get(`${o.a.apiUrl}/api/thoi-vu/paging`,{params:s}).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}clearCache(){this.listThoiVus=null}getByVung(t=null){const e=(new r.g).set("listVung",null!=t?t:"");return this.http.get(`${o.a.apiUrl}/api/thoi-vu/get-by-vung`,{params:e}).pipe(Object(i.a)(t=>t),Object(a.a)(t=>this.baseService.handleError(t)))}getAllByThoiGianVung(t,e){return this.http.get(`${o.a.apiUrl}/api/thoi-vu/getall-by-thoi-gian-vung?thoiGian=${t}&maVung=${e}`).pipe(Object(a.a)(t=>this.baseService.handleError(t)))}}return t.\u0275fac=function(e){return new(e||t)(s.bc(r.c),s.bc(l.a),s.bc(c.a))},t.\u0275prov=s.Nb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},JA5x:function(t,e,n){"use strict";n.d(e,"a",function(){return z}),n.d(e,"b",function(){return L});var r=n("mrSG"),a=n("fXoL"),i=n("/KA4"),o=n("cH1L"),s=n("2Suw"),l=n("XNiG"),c=n("1G5W"),u=n("ofXK"),d=n("pdGh");function h(t,e){1&t&&a.mc(0)}const f=["*"];function g(t,e){if(1&t&&(a.Vb(0),a.Kc(1),a.Ub()),2&t){const t=a.hc(3);a.Db(1),a.Lc(t.nzTitle)}}function p(t,e){if(1&t&&(a.Xb(0,"div",11),a.Ic(1,g,2,1,"ng-container",12),a.Wb()),2&t){const t=a.hc(2);a.Db(1),a.oc("nzStringTemplateOutlet",t.nzTitle)}}function b(t,e){if(1&t&&(a.Vb(0),a.Kc(1),a.Ub()),2&t){const t=a.hc(3);a.Db(1),a.Lc(t.nzExtra)}}function v(t,e){if(1&t&&(a.Xb(0,"div",13),a.Ic(1,b,2,1,"ng-container",12),a.Wb()),2&t){const t=a.hc(2);a.Db(1),a.oc("nzStringTemplateOutlet",t.nzExtra)}}function m(t,e){}function y(t,e){if(1&t&&(a.Vb(0),a.Ic(1,m,0,0,"ng-template",14),a.Ub()),2&t){const t=a.hc(2);a.Db(1),a.oc("ngTemplateOutlet",t.listOfNzCardTabComponent.template)}}function x(t,e){if(1&t&&(a.Xb(0,"div",6),a.Xb(1,"div",7),a.Ic(2,p,2,1,"div",8),a.Ic(3,v,2,1,"div",9),a.Wb(),a.Ic(4,y,2,1,"ng-container",10),a.Wb()),2&t){const t=a.hc();a.Db(2),a.oc("ngIf",t.nzTitle),a.Db(1),a.oc("ngIf",t.nzExtra),a.Db(1),a.oc("ngIf",t.listOfNzCardTabComponent)}}function _(t,e){}function w(t,e){if(1&t&&(a.Xb(0,"div",15),a.Ic(1,_,0,0,"ng-template",14),a.Wb()),2&t){const t=a.hc();a.Db(1),a.oc("ngTemplateOutlet",t.nzCover)}}function k(t,e){1&t&&(a.Vb(0),a.mc(1),a.Ub())}function M(t,e){1&t&&a.Sb(0,"nz-card-loading")}function C(t,e){}
1function S(t,e){if(1&t&&(a.Xb(0,"li"),a.Xb(1,"span"),a.Ic(2,C,0,0,"ng-template",14),a.Wb(),a.Wb()),2&t){const t=e.$implicit,n=a.hc(2);a.Fc("width",100/n.nzActions.length,"%"),a.Db(2),a.oc("ngTemplateOutlet",t)}}function A(t,e){if(1&t&&(a.Xb(0,"ul",16),a.Ic(1,S,3,3,"li",17),a.Wb()),2&t){const t=a.hc();a.Db(1),a.oc("ngForOf",t.nzActions)}}function D(t,e){1&t&&(a.Xb(0,"div",4),a.Sb(1,"div",5),a.Wb()),2&t&&a.oc("ngClass",e.$implicit)}function O(t,e){if(1&t&&(a.Xb(0,"div",2),a.Ic(1,D,2,1,"div",3),a.Wb()),2&t){const t=e.$implicit;a.Db(1),a.oc("ngForOf",t)}}let P=(()=>{class t{constructor(t){this.elementRef=t,this.nzHoverable=!0,this.elementRef.nativeElement.classList.add("ant-card-grid")}}return t.\u0275fac=function(e){return new(e||t)(a.Rb(a.l))},t.\u0275dir=a.Mb({type:t,selectors:[["","nz-card-grid",""]],hostVars:2,hostBindings:function(t,e){2&t&&a.Jb("ant-card-hoverable",e.nzHoverable)},inputs:{nzHoverable:"nzHoverable"},exportAs:["nzCardGrid"]}),Object(r.b)([Object(i.a)(),Object(r.c)("design:type",Object)],t.prototype,"nzHoverable",void 0),t})(),T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Lb({type:t,selectors:[["nz-card-tab"]],viewQuery:function(t,e){if(1&t&&a.Pc(a.N,3),2&t){let t;a.wc(t=a.fc())&&(e.template=t.first)}},exportAs:["nzCardTab"],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.Ic(0,h,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})();const I="card";let z=(()=>{class t{constructor(t,e,n,r){this.nzConfigService=t,this.cdr=e,this.elementRef=n,this.directionality=r,this._nzModuleName=I,this.nzBordered=!0,this.nzBorderless=!1,this.nzLoading=!1,this.nzHoverable=!1,this.nzBodyStyle=null,this.nzActions=[],this.nzType=null,this.nzSize="default",this.dir="ltr",this.destroy$=new l.a,this.elementRef.nativeElement.classList.add("ant-card"),this.nzConfigService.getConfigChangeEventForComponent(I).pipe(Object(c.a)(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){var t;null===(t=this.directionality.change)||void 0===t||t.pipe(Object(c.a)(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return t.\u0275fac=function(e){return new(e||t)(a.Rb(s.b),a.Rb(a.h),a.Rb(a.l),a.Rb(o.c,8))},t.\u0275cmp=a.Lb({type:t,selectors:[["nz-card"]],contentQueries:function(t,e,n){if(1&t&&(a.Kb(n,T,1),a.Kb(n,P,0)),2&t){let t;a.wc(t=a.fc())&&(e.listOfNzCardTabComponent=t.first),a.wc(t=a.fc())&&(e.listOfNzCardGridDirective=t)}},hostVars:16,hostBindings:function(t,e){2&t&&a.Jb("ant-card-loading",e.nzLoading)("ant-card-bordered",!1===e.nzBorderless&&e.nzBordered)("ant-card-hoverable",e.nzHoverable)("ant-card-small","small"===e.nzSize)("ant-card-contain-grid",e.listOfNzCardGridDirective&&e.listOfNzCardGridDirective.length)("ant-card-type-inner","inner"===e.nzType)("ant-card-contain-tabs",!!e.listOfNzCardTabComponent)("ant-card-rtl","rtl"===e.dir)},inputs:{nzBordered:"nzBordered",nzBorderless:"nzBorderless",nzLoading:"nzLoading",nzHoverable:"nzHoverable",nzBodyStyle:"nzBodyStyle",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzCover:"nzCover",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:f,decls:7,vars:6,consts:[["class","ant-card-head",4,"ngIf"],["class","ant-card-cover",4,"ngIf"],[1,"ant-card-body",3,"ngStyle"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["class","ant-card-actions",4,"ngIf"],[1,"ant-card-head"],[1,"ant-card-head-wrapper"],["class","ant-card-head-title",4,"ngIf"],["class","ant-card-extra",4,"ngIf"],[4,"ngIf"],[1,"ant-card-head-title"],[4,"nzStringTemplateOutlet"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[1,"ant-card-cover"],[1,"ant-card-actions"],[3,"width",4,"ngFor","ngForOf"]],template:function(t,e){if(1&t&&(a.nc(),a.Ic(0,x,5,3,"div",0),a.Ic(1,w,2,1,"div",1),a.Xb(2,"div",2),a.Ic(3,k,2,0,"ng-container",3),a.Ic(4,M,1,0,"ng-template",null,4,a.Jc),a.Wb(),a.Ic(6,A,2,1,"ul",5)),2&t){const t=a.xc(5);a.oc("ngIf",e.nzTitle||e.nzExtra||e.listOfNzCardTabComponent),a.Db(1),a.oc("ngIf",e.nzCover),a.Db(1),a.oc("ngStyle",e.nzBodyStyle),a.Db(1),a.oc("ngIf",!e.nzLoading)("ngIfElse",t),a.Db(3),a.oc("ngIf",e.nzActions.length)}},directives:function(){return[u.n,u.o,d.b,u.s,F,u.m]},encapsulation:2,changeDetection:0}
1),Object(r.b)([Object(s.c)(),Object(i.a)(),Object(r.c)("design:type",Boolean)],t.prototype,"nzBordered",void 0),Object(r.b)([Object(s.c)(),Object(i.a)(),Object(r.c)("design:type",Boolean)],t.prototype,"nzBorderless",void 0),Object(r.b)([Object(i.a)(),Object(r.c)("design:type",Object)],t.prototype,"nzLoading",void 0),Object(r.b)([Object(s.c)(),Object(i.a)(),Object(r.c)("design:type",Boolean)],t.prototype,"nzHoverable",void 0),Object(r.b)([Object(s.c)(),Object(r.c)("design:type",String)],t.prototype,"nzSize",void 0),t})(),F=(()=>{class t{constructor(t){this.elementRef=t,this.listOfLoading=[["ant-col-22"],["ant-col-8","ant-col-15"],["ant-col-6","ant-col-18"],["ant-col-13","ant-col-9"],["ant-col-4","ant-col-3","ant-col-16"],["ant-col-8","ant-col-6","ant-col-8"]],this.elementRef.nativeElement.classList.add("ant-card-loading-content")}}return t.\u0275fac=function(e){return new(e||t)(a.Rb(a.l))},t.\u0275cmp=a.Lb({type:t,selectors:[["nz-card-loading"]],exportAs:["nzCardLoading"],decls:2,vars:1,consts:[[1,"ant-card-loading-content"],["class","ant-row","style","margin-left: -4px; margin-right: -4px;",4,"ngFor","ngForOf"],[1,"ant-row",2,"margin-left","-4px","margin-right","-4px"],["style","padding-left: 4px; padding-right: 4px;",3,"ngClass",4,"ngFor","ngForOf"],[2,"padding-left","4px","padding-right","4px",3,"ngClass"],[1,"ant-card-loading-block"]],template:function(t,e){1&t&&(a.Xb(0,"div",0),a.Ic(1,O,2,1,"div",1),a.Wb()),2&t&&(a.Db(1),a.oc("ngForOf",e.listOfLoading))},directives:[u.m,u.l],encapsulation:2,changeDetection:0}),t})(),L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.Pb({type:t}),t.\u0275inj=a.Ob({imports:[[u.c,d.a],o.a]}),t})()},"Ju5/":function(t,e,n){"use strict";var r=n("XqMk"),a="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||a||Function("return this")();e.a=i},L3Qv:function(t,e,n){"use strict";e.a=function(){return!1}},LPYB:function(t,e,n){"use strict";n.d(e,"a",function(){return ve}),n.d(e,"b",function(){return me});var r=n("fXoL"),a=n("2Vo4"),i=function(t,e){return t===e||t!=t&&e!=e},o=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1},s=Array.prototype.splice;function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=function(){this.__data__=[],this.size=0},l.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():s.call(e,n,1),--this.size,0))},l.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},l.prototype.has=function(t){return o(this.__data__,t)>-1},l.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var c,u=l,d=n("Ju5/"),h=d.a.Symbol,f=Object.prototype,g=f.hasOwnProperty,p=f.toString,b=h?h.toStringTag:void 0,v=Object.prototype.toString,m=h?h.toStringTag:void 0,y=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":m&&m in Object(t)?function(t){var e=g.call(t,b),n=t[b];try{t[b]=void 0;var r=!0}catch(i){}var a=p.call(t);return r&&(e?t[b]=n:delete t[b]),a}(t):function(t){return v.call(t)}(t)},x=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},_=function(t){if(!x(t))return!1;var e=y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},w=d.a["__core-js_shared__"],k=(c=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",M=Function.prototype.toString,C=function(t){if(null!=t){try{return M.call(t)}catch(e){}try{return t+""}catch(e){}}return""},S=/^\[object .+?Constructor\]$/,A=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!x(t)||(e=t,k&&k in e))&&(_(t)?A:S).test(C(t));var e}(n)?n:void 0},O=D(d.a,"Map"),P=D(Object,"create"),T=Object.prototype.hasOwnProperty,I=Object.prototype.hasOwnProperty;function z(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}z.prototype.clear=function(){this.__data__=P?P(null):{},this.size=0},z.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},z.prototype.get=function(t){var e=this.__data__;if(P){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return T.call(e,t)?e[t]:void 0},z.prototype.has=function(t){var e=this.__data__;return P?void 0!==e[t]:I.call(e,t)},z.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=P&&void 0===e?"__lodash_hash_undefined__":e,this};var F=z,L=function(t,e){var n,r,a=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof e?"string":"hash"]:a.map};function j(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}j.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new(O||u),string:new F}},j.prototype.delete=function(t){var e=L(this,t).delete(t);return this.size-=e?1:0,e},j.prototype.get=function(t){return L(this,t).get(t)},j.prototype.has=function(t){return L(this,t).has(t)},j.prototype.set=function(t,e){var n=L(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var R=j;function B(t){var e=this.__data__=new u(t);this.size=e.size}B.prototype.clear=function(){this.__data__=new u,this.size=0},B.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},B.prototype.get=function(t){return this.__data__.get(t)},B.prototype.has=function(t){return this.__data__.has(t)},B.prototype.set=function(t,e){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!O||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new R(r)}return n.set(t,e),this.size=n.size,this};var E=B,N=function(){try{var t=D(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),W=function(t,e,n){"__proto__"==e&&N?N(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},V=Object.prototype.hasOwnProperty,H=function(t,e,n){var r=t[e];V.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||W(t,e,n)},U=function(t,e,n,r){var a=!n;n||(n={});for(var i=-1,o=e.length;++i<o;
1){var s=e[i],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),a?W(n,s,l):H(n,s,l)}return n},$=function(t){return null!=t&&"object"==typeof t},q=function(t){return $(t)&&"[object Arguments]"==y(t)},Y=Object.prototype,X=Y.hasOwnProperty,G=Y.propertyIsEnumerable,J=q(function(){return arguments}())?q:function(t){return $(t)&&X.call(t,"callee")&&!G.call(t,"callee")},K=Array.isArray,Z=n("WOAq"),Q=/^(?:0|[1-9]\d*)$/,tt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Q.test(t))&&t>-1&&t%1==0&&t<e},et=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},nt={};nt["[object Float32Array]"]=nt["[object Float64Array]"]=nt["[object Int8Array]"]=nt["[object Int16Array]"]=nt["[object Int32Array]"]=nt["[object Uint8Array]"]=nt["[object Uint8ClampedArray]"]=nt["[object Uint16Array]"]=nt["[object Uint32Array]"]=!0,nt["[object Arguments]"]=nt["[object Array]"]=nt["[object ArrayBuffer]"]=nt["[object Boolean]"]=nt["[object DataView]"]=nt["[object Date]"]=nt["[object Error]"]=nt["[object Function]"]=nt["[object Map]"]=nt["[object Number]"]=nt["[object Object]"]=nt["[object RegExp]"]=nt["[object Set]"]=nt["[object String]"]=nt["[object WeakMap]"]=!1;var rt=function(t){return function(e){return t(e)}},at=n("xutz"),it=at.a&&at.a.isTypedArray,ot=it?rt(it):function(t){return $(t)&&et(t.length)&&!!nt[y(t)]},st=Object.prototype.hasOwnProperty,lt=function(t,e){var n=K(t),r=!n&&J(t),a=!n&&!r&&Object(Z.a)(t),i=!n&&!r&&!a&&ot(t),o=n||r||a||i,s=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var c in t)!e&&!st.call(t,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||tt(c,l))||s.push(c);return s},ct=Object.prototype,ut=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ct)},dt=function(t,e){return function(n){return t(e(n))}},ht=dt(Object.keys,Object),ft=Object.prototype.hasOwnProperty,gt=function(t){return null!=t&&et(t.length)&&!_(t)},pt=function(t){return gt(t)?lt(t):function(t){if(!ut(t))return ht(t);var e=[];for(var n in Object(t))ft.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)},bt=Object.prototype.hasOwnProperty,vt=function(t){return gt(t)?lt(t,!0):function(t){if(!x(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ut(t),n=[];for(var r in t)("constructor"!=r||!e&&bt.call(t,r))&&n.push(r);return n}(t)},mt=n("3/ER"),yt=function(){return[]},xt=Object.prototype.propertyIsEnumerable,_t=Object.getOwnPropertySymbols,wt=_t?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var r=-1,a=null==e?0:e.length,i=0,o=[];++r<a;){var s=e[r];xt.call(t,s)&&(o[i++]=s)}return o}(_t(t)))}:yt,kt=function(t,e){for(var n=-1,r=e.length,a=t.length;++n<r;)t[a+n]=e[n];return t},Mt=dt(Object.getPrototypeOf,Object),Ct=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)kt(e,wt(t)),t=Mt(t);return e}:yt,St=function(t,e,n){var r=e(t);return K(t)?r:kt(r,n(t))},At=function(t){return St(t,pt,wt)},Dt=function(t){return St(t,vt,Ct)},Ot=D(d.a,"DataView"),Pt=D(d.a,"Promise"),Tt=D(d.a,"Set"),It=D(d.a,"WeakMap"),zt="[object Map]",Ft="[object Promise]",Lt="[object Set]",jt="[object WeakMap]",Rt="[object DataView]",Bt=C(Ot),Et=C(O),Nt=C(Pt),Wt=C(Tt),Vt=C(It),Ht=y;(Ot&&Ht(new Ot(new ArrayBuffer(1)))!=Rt||O&&Ht(new O)!=zt||Pt&&Ht(Pt.resolve())!=Ft||Tt&&Ht(new Tt)!=Lt||It&&Ht(new It)!=jt)&&(Ht=function(t){var e=y(t),n="[object Object]"==e?t.constructor:void 0,r=n?C(n):"";if(r)switch(r){case Bt:return Rt;case Et:return zt;case Nt:return Ft;case Wt:return Lt;case Vt:return jt}return e});var Ut=Ht,$t=Object.prototype.hasOwnProperty,qt=d.a.Uint8Array,Yt=function(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e},Xt=/\w*$/,Gt=h?h.prototype:void 0,Jt=Gt?Gt.valueOf:void 0,Kt=Object.create,Zt=function(){function t(){}return function(e){if(!x(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Qt=at.a&&at.a.isMap,te=Qt?rt(Qt):function(t){return $(t)&&"[object Map]"==Ut(t)},ee=at.a&&at.a.isSet,ne=ee?rt(ee):function(t){return $(t)&&"[object Set]"==Ut(t)}
1,re="[object Arguments]",ae="[object Function]",ie={};ie[re]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object DataView]"]=ie["[object Boolean]"]=ie["[object Date]"]=ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object Symbol]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Error]"]=ie[ae]=ie["[object WeakMap]"]=!1;var oe=function t(e,n,r,a,i,o){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=i?r(e,a,i,o):r(e)),void 0!==s)return s;if(!x(e))return e;var d=K(e);if(d){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$t.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(e,s)}else{var h=Ut(e),f=h==ae||"[object GeneratorFunction]"==h;if(Object(Z.a)(e))return Object(mt.a)(e,l);if("[object Object]"==h||h==re||f&&!i){if(s=c||f?{}:function(t){return"function"!=typeof t.constructor||ut(t)?{}:Zt(Mt(t))}(e),!l)return c?function(t,e){return U(t,Ct(t),e)}(e,function(t,e){return t&&U(e,vt(e),t)}(s,e)):function(t,e){return U(t,wt(t),e)}(e,function(t,e){return t&&U(e,pt(e),t)}(s,e))}else{if(!ie[h])return i?e:{};s=function(t,e,n){var r,a,i=t.constructor;switch(e){case"[object ArrayBuffer]":return Yt(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var n=e?Yt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var n=e?Yt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,n);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return(a=new(r=t).constructor(r.source,Xt.exec(r))).lastIndex=r.lastIndex,a;case"[object Set]":return new i;case"[object Symbol]":return Jt?Object(Jt.call(t)):{}}}(e,h,l)}}o||(o=new E);var g=o.get(e);if(g)return g;o.set(e,s),ne(e)?e.forEach(function(a){s.add(t(a,n,r,a,e,o))}):te(e)&&e.forEach(function(a,i){s.set(i,t(a,n,r,i,e,o))});var p=d?void 0:(u?c?Dt:At:c?vt:pt)(e);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n););}(p||e,function(a,i){p&&(a=e[i=a]),H(s,i,t(a,n,r,i,e,o))}),s},se=n("MO+k");const le=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]];function ce(t,e){return"rgba("+t.concat(e).join(",")+")"}function ue(t,e){return Math.floor(Math.random()*(e-t+1))+t}function de(t){return{backgroundColor:t.map(t=>ce(t,.6)),borderColor:t.map(()=>
1"#fff"),pointBackgroundColor:t.map(t=>ce(t,1)),pointBorderColor:t.map(()=>"#fff"),pointHoverBackgroundColor:t.map(t=>ce(t,1)),pointHoverBorderColor:t.map(t=>ce(t,1))}}function he(){return[ue(0,255),ue(0,255),ue(0,255)]}function fe(t){return le[t]||he()}function ge(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=le[n]||he();return e}let pe=(()=>{class t{constructor(){this.pColorschemesOptions={},this.colorschemesOptions=new a.a({})}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Nb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const be={Default:0,Update:1,Refresh:2};be[be.Default]="Default",be[be.Update]="Update",be[be.Refresh]="Refresh";let ve=(()=>{class t{constructor(t,e){this.element=t,this.themeService=e,this.options={},this.chartClick=new r.n,this.chartHover=new r.n,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}static registerPlugin(t){se.pluginService.register(t)}static unregisterPlugin(t){se.pluginService.unregister(t)}ngOnInit(){this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(t=>this.themeChanged(t)))}themeChanged(t){this.refresh()}ngDoCheck(){if(!this.chart)return;let t=be.Default;const e=e=>{t=e>t?e:t};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,e(be.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,e(be.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,e(be.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,e(be.Update)),this.datasets&&this.datasets.filter((t,e)=>t.data!==this.old.datasetsDataObjects[e]).length&&(this.old.datasetsDataObjects=this.datasets.map(t=>t.data),e(be.Update)),this.datasets&&this.datasets.filter((t,e)=>t.data.length!==this.old.datasetsDataLengths[e]).length&&(this.old.datasetsDataLengths=this.datasets.map(t=>t.data.length),e(be.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),e(be.Update)),this.colors&&this.colors.filter((t,e)=>!this.colorsEqual(t,this.old.colors[e])).length&&(this.old.colors=this.colors.map(t=>this.copyColor(t)),this.updateColors(),e(be.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,e(be.Update)),this.labels&&this.labels.filter((t,e)=>!this.labelsEqual(t,this.old.labels[e])).length&&(this.old.labels=this.labels.map(t=>this.copyLabel(t)),e(be.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,e(be.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,e(be.Refresh)),t){case be.Default:break;case be.Update:this.update();break;case be.Refresh:this.refresh()}}copyLabel(t){return Array.isArray(t)?[...t]:t}labelsEqual(t,e){return Array.isArray(t)===Array.isArray(e)&&(Array.isArray(t)||t===e)&&(!Array.isArray(t)||t.length===e.length)&&(!Array.isArray(t)||0===t.filter((t,n)=>t!==e[n]).length)}copyColor(t){return{backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderColor:t.borderColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,pointBorderColor:t.pointBorderColor,pointBackgroun
1dColor:t.pointBackgroundColor,pointBorderWidth:t.pointBorderWidth,pointRadius:t.pointRadius,pointHoverRadius:t.pointHoverRadius,pointHitRadius:t.pointHitRadius,pointHoverBackgroundColor:t.pointHoverBackgroundColor,pointHoverBorderColor:t.pointHoverBorderColor,pointHoverBorderWidth:t.pointHoverBorderWidth,pointStyle:t.pointStyle,hoverBackgroundColor:t.hoverBackgroundColor,hoverBorderColor:t.hoverBorderColor,hoverBorderWidth:t.hoverBorderWidth}}colorsEqual(t,e){return!t==!e&&(!t||t.backgroundColor===e.backgroundColor&&t.borderWidth===e.borderWidth&&t.borderColor===e.borderColor&&t.borderCapStyle===e.borderCapStyle&&t.borderDash===e.borderDash&&t.borderDashOffset===e.borderDashOffset&&t.borderJoinStyle===e.borderJoinStyle&&t.pointBorderColor===e.pointBorderColor&&t.pointBackgroundColor===e.pointBackgroundColor&&t.pointBorderWidth===e.pointBorderWidth&&t.pointRadius===e.pointRadius&&t.pointHoverRadius===e.pointHoverRadius&&t.pointHitRadius===e.pointHitRadius&&t.pointHoverBackgroundColor===e.pointHoverBackgroundColor&&t.pointHoverBorderColor===e.pointHoverBorderColor&&t.pointHoverBorderWidth===e.pointHoverBorderWidth&&t.pointStyle===e.pointStyle&&t.hoverBackgroundColor===e.hoverBackgroundColor&&t.hoverBorderColor===e.hoverBorderColor&&t.hoverBorderWidth===e.hoverBorderWidth)}updateColors(){this.datasets.forEach((t,e)=>{this.colors&&this.colors[e]?Object.assign(t,this.colors[e]):Object.assign(t,function(t,e,n){if("pie"===t||"doughnut"===t)return de(ge(n));if("polarArea"===t)return{backgroundColor:(r=ge(n)).map(t=>ce(t,.6)),borderColor:r.map(t=>ce(t,1)),hoverBackgroundColor:r.map(t=>ce(t,.8)),hoverBorderColor:r.map(t=>ce(t,1))};var r;if("line"===t||"radar"===t)return function(t){return{backgroundColor:ce(t,.4),borderColor:ce(t,1),pointBackgroun
1dColor:ce(t,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:ce(t,.8)}}(fe(e));if("bar"===t||"horizontalBar"===t)return function(t){return{backgroundColor:ce(t,.6),borderColor:ce(t,1),hoverBackgroundColor:ce(t,.8),hoverBorderColor:ce(t,1)}}(fe(e));if("bubble"===t)return de(ge(n));if("scatter"===t)return de(ge(n));throw new Error(`getColors - Unsupported chart type ${t}`)}(this.chartType,e,t.data.length),Object.assign({},t))})}ngOnChanges(t){let e=be.Default;const n=t=>{e=t>e?t:e};switch(t.hasOwnProperty("data")&&t.data.currentValue&&(this.propagateDataToDatasets(t.data.currentValue),n(be.Update)),t.hasOwnProperty("datasets")&&t.datasets.currentValue&&(this.propagateDatasetsToData(t.datasets.currentValue),n(be.Update)),t.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=t.labels.currentValue),n(be.Update)),t.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=t.legend.currentValue,this.chart.generateLegend()),n(be.Update)),t.hasOwnProperty("options")&&n(be.Refresh),e){case be.Update:this.update();break;case be.Refresh:case be.Default:this.refresh()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe())}update(t){if(this.chart)return this.chart.update(t)}hideDataset(t,e){this.chart.getDatasetMeta(t).hidden=e,this.chart.update()}isDatasetHidden(t){return this.chart.getDatasetMeta(t).hidden}toBase64Image(){return this.chart.toBase64Image()}getChartConfiguration(){const t=this.getDatasets(),e=Object.assign({},this.options);!1===this.legend&&(e.legend={display:!1}),e.hover=e.hover||{},e.hover.onHover||(e.hover.onHover=(t,e)=>{e&&!e.length||this.chartHover.emit({event:t,active:e})}),e.onClick||(e.onClick=(t,e)=>{this.chartClick.emit({event:t,active:e})});const n=this.smartMerge(e,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:t},plugins:this.plugins,options:n}}getChartBuilder(t){const e=this.getChartConfiguration();return new se.Chart(t,e)}smartMerge(t,e,n=0){if(0===n&&(t=oe(t,5)),Object.keys(e).forEach(r=>{if(Array.isArray(e[r])){const a=t[r];a&&a.forEach(t=>{this.smartMerge(t,e[r][0],n+1)})}else"object"==typeof e[r]?(r in t||(t[r]={}),this.smartMerge(t[r],e[r],n+1)):t[r]=e[r]}),0===n)return t}isMultiLineLabel(t){return Array.isArray(t)}joinLabel(t){return t?this.isMultiLineLabel(t)?t.join(" "):t:null}propagateDatasetsToData(t){this.data=this.datasets.map(t=>t.data),this.chart&&(this.chart.data.datasets=t),this.updateColors()}propagateDataToDatasets(t){this.isMultiDataSet(t)?this.datasets&&t.length===this.datasets.length?this.datasets.forEach((e,n)=>{e.data=t[n]}):(this.datasets=t.map((t,e)=>({data:t,label:this.joinLabel(this.labels[e])||`Label ${e}`})),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0]||(this.datasets[0]={}),this.datasets[0].data=t,this.datasets.splice(1)):(this.datasets=[{data:t}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}isMultiDataSet(t){return Array.isArray(t[0])}getDatasets(){if(!this.datasets&&!this.data)throw new Error(`ng-charts configuration error, data or datasets field are required to render chart ${this.chartType}`);return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}refresh(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}return t.\u0275fac=function(e){return new(e||t)(r.Rb(r.l),r.Rb(pe))},t.\u0275dir=r.Mb({type:t,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[r.Bb]}),t})(),me=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Pb({type:t}),t.\u0275inj=r.Ob({imports:[[]]}),t})()},"MO+k":function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={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],ol
vendor: 13,214 bytes, line 1
1ive:[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]},n=function(t,n){return function(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in a)if(a.hasOwnProperty(i)){if(!("channels"in a[i]))throw new Error("missing channels property: "+i);if(!("labels"in a[i]))throw new Error("missing channel labels property: "+i);if(a[i].labels.length!==a[i].channels)throw new Error("channel and label counts mismatch: "+i);var o=a[i].channels,s=a[i].labels;delete a[i].channels,delete a[i].labels,Object.defineProperty(a[i],"channels",{value:o}),Object.defineProperty(a[i],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,r=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(r,a,i),s=Math.max(r,a,i),l=s-o;return s===o?e=0:r===s?e=(a-i)/l:a===s?e=2+(i-r)/l:i===s&&(e=4+(r-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,r,a,i,o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),d=function(t){return(c-t)/6/u+.5};return 0===u?a=i=0:(i=u/c,e=d(o),n=d(s),r=d(l),o===c?a=r-n:s===c?a=1/3+e-r:l===c&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*c]},a.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-r,1-a)))/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var r=n[t];if(r)return r;var a,i,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var c=(i=t,o=e[l],Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)+Math.pow(i[2]-o[2],2));c<s&&(s=c,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/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*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],r=e[1],i=e[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(t){var e,n,r,a,i,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(r=o+1/3*-(c-1))<0&&r++,r>1&&r--,a[c]=255*(i=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e);return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,a=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=i<=1?i:2-i,[e,100*(0===r?2*a/(i+a):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),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(t){var e,n,r,a=t[0],i=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return r=(2-i)*o,n=i*s,[a,100*(n=(n/=(e=(2-i)*s)<=1?e:2-e)||0),100*(r/=2)]},a.hwb.rgb=function(t){var e,n,r,a,i,o,s,l=t[0]/360,c=t[1]/100,u=t[2]/100,d=c+u;switch(d>1&&(c/=d,u/=d),r=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(r=1-r),a=c+r*((n=1-u)-c),e){default:case 6:case 0:i=n,o=a,s=c;break;case 1:i=a,o=n,s=c;break;case 2:i=c,o=n,s=a;break;case 3:i=c,o=a,s=n;break;case 4:i=a,o=c,s=n;break;case 5:i=n,o=c,s=a}return[255*i,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-r)+r)),255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},a.xyz.rgb=function(t){var e,n,r,a=t[0]/100,i=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*i+.0415*o,r=.0557*a+-.204*i+1.057*o,e=(e=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,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*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(t){var e,n,r;e=t[1]/500+(n=(t[0]+16)/116),r=n-t[2]/200;var a=Math.pow(n,3),i=Math.pow(e,3),o=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},a.lab.lch=function(t){var e,n=t[0],r=t[1],a=t[2];return(e=360*Math.atan2(a,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+a*a),e]},a.lch.lab=function(t){var e,n=t[1];return e=t[2]/360*2*Math.PI,[t[0],n*Math.cos(e),n*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:a.rgb.hsv(t)[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(e/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(t){var e,n=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.max(Math.max(n,r),a),o=Math.min(Math.min(n,r),a),s=i-o;return e=s<=0?0:i===n?(r-a)/s%6:i===r?2+(a-n)/s:4+(n-r)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e,n=t[1]/100,r=t[2]/100,a=0;return(e=r<.5?2*n*r:2*n*(1-r))<1&&(a=(r-.5*e)/(1-e)),[t[0],100*e,100*a]},a.hsv.hcg=function(t){var e=t[2]/100,n=t[1]/100*e,r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},a.hcg.rgb=function(t){var e=t[1]/100,n=t[2]/100;if(0===e)return[255*n,255*n,255*n];var r,a=[0,0,0],i=t[0]/360%1*6,o=i%1,s=1-o;switch(Math.floor(i)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return[255*(e*a[0]+(r=(1-e)*n)),255*(e*a[1]+r),255*(e*a[2]+r)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=1-t[2]/100,n=e-t[1]/100,r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(n={exports:{}}),n.exports}();function r(t,e){return function(n){return e(t(n))}}function a(t,e){for(var a=[e[t].parent,t],i=n[e[t].parent][t],o=e[t].parent;e[o].parent;)a.unshift(e[o].parent),i=r(n[e[o].parent][o],i),o=e[o].parent;return i.conversion=a,i}var i={};Object.keys(n).forEach(function(t){i[t]={},Object.defineProperty(i[t],"channels",{value:n[t].channels}),Object.defineProperty(i[t],"labels",{value:n[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(n),r=e.length,a=0;a<r;a++)t[e[a]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length;)for(var a=r.pop(),i=Object.keys(n[a]),o=i.length,s=0;s<o;s++){var l=i[s],c=e[l];-1===c.distance&&(c.distance=e[a].distance+1,c.parent=a,r.unshift(l))}return e}(t),r={},i=Object.keys(e),o=i.length,s=0;s<o;s++){var l=i[s];null!==e[l].parent&&(r[l]=a(l,e))}return r}(t);Object.keys(e).forEach(function(n){var r=e[n];i[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var r=n.length,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(r),i[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)})});var o=i,s={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],ol
vendor: 19,956 bytes, line 1
1ive:[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]},l={getRgba:c,getHsla:u,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=u(t);return e&&e.slice(0,3)},getHwb:d,getAlpha:function(t){var e=c(t);return e||(e=u(t))||(e=d(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?h(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:h,percentString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:f,hslString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:g,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return v[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],n=1,r=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(r){a=(r=r[1])[3];for(var i=0;i<e.length;i++)e[i]=parseInt(r[i]+r[i],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(r=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=r[2],r=r[1],i=0;i<e.length;i++)e[i]=parseInt(r.slice(2*i,2*i+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(r=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(i=0;i<e.length;i++)e[i]=parseInt(r[i+1]);n=parseFloat(r[4])}else if(r=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(i=0;i<e.length;i++)e[i]=Math.round(2.55*parseFloat(r[i+1]));n=parseFloat(r[4])}else if(r=t.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(e=s[r[1]]))return}for(i=0;i<e.length;i++)e[i]=p(e[i],0,255);return n=n||0==n?p(n,0,1):1,e[3]=n,e}}function u(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[p(parseInt(e[1]),0,360),p(parseFloat(e[2]),0,100),p(parseFloat(e[3]),0,100),p(isNaN(n)?1:n,0,1)]}}}function d(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[p(parseInt(e[1]),0,360),p(parseFloat(e[2]),0,100),p(parseFloat(e[3]),0,100),p(isNaN(n)?1:n,0,1)]}}}function h(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function f(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(t,e,n){return Math.min(Math.max(e,t),n)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var v={};for(var m in s)v[s[m]]=m;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=l.getRgba(t))?this.setValues("rgb",e):(e=l.getHsla(t))?this.setValues("hsl",e):(e=l.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return l.hexString(this.values.rgb)},rgbString:function(){return l.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return l.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return l.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return l.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return l.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return l.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return l.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var r=t[n]/255;e[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,r=t,a=void 0===e?.5:e,i=2*a-1,o=n.alpha()-r.alpha(),s=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue()).alpha(n.alpha()*a+r.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,r=this.values,a=n.values;for(var i in r)r.hasOwnProperty(i)&&("[object Array]"===(e={}.toString.call(t=r[i]))?a[i]=t.slice(0):"[object Number]"===e?a[i]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},r=0;r<t.length;r++)n[t.charAt(r)]=e[t][r];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,r,a=this.values,i=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[i[t][0]]){var c=i[t];for(n=0;n<t.length;n++)a[t][n]=e[c[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)r=Math.max(0,Math.min(s[t][n],a[t][n])),a[t][n]=Math.round(r);for(var u in i)u!==t&&(a[u]=o[t][u](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var r=this.values[t];return void 0===n?r[e]:(n===r[e]||(r[e]=n,this.setValues(t,r)),this)},"undefined"!=typeof window&&(window.Color=y);var x=y;function _(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,k={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return k.valueOrDefault(k.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,r){var a,i,o;if(k.isArray(t))if(i=t.length,r)for(a=i-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<i;a++)e.call(n,t[a],a);else if(k.isObject(t))for(i=(o=Object.keys(t)).length,a=0;a<i;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,r,a,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=e[n],(a=t[n])instanceof Array&&i instanceof Array){if(!k.arrayEquals(a,i))return!1}else if(a!==i)return!1;return!0},clone:function(t){if(k.isArray(t))return t.map(k.clone);if(k.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),r=n.length,a=0;a<r;++a)e[n[a]]=k.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,r){if(_(t)){var a=e[t],i=n[t];k.isObject(a)&&k.isObject(i)?k.merge(a,i,r):e[t]=k.clone(i)}},_mergerIf:function(t,e,n){if(_(t)){var r=e[t],a=n[t];k.isObject(r)&&k.isObject(a)?k.mergeIf(r,a):e.hasOwnProperty(t)||(e[t]=k.clone(a))}},merge:function(t,e,n){var r,a,i,o,s,l=k.isArray(e)?e:[e],c=l.length;if(!k.isObject(t))return t;for(r=(n=n||{}).merger||k._merger,a=0;a<c;++a)if(k.isObject(e=l[a]))for(s=0,o=(i=Object.keys(e)).length;s<o;++s)r(i[s],t,e,n);return t},mergeIf:function(t,e){return k.merge(t,e,{merger:k._mergerIf})},extend:Object.assign||function(t){return k.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=e.prototype,n.prototype=new r,n.extend=k.inherits,t&&k.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,r){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},M=k;k.callCallback=k.callback,k.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},k.getValueOrDefault=k.valueOrDefault,k.getValueAtIndexOrDefault=k.valueAtIndexOrDefault;var C={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},S={effects:C};M.easingEffects=C;var A=Math.PI,D=A/180,O=2*A,P=A/2,T=A/4,I=2*A/3,z={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,a,i){if(i){var o=Math.min(i,a/2,r/2),s=e+o,l=n+o,c=e+r-o,u=n+a-o;t.moveTo(e,l),s<c&&l<u?(t.arc(s,l,o,-A,-P),t.arc(c,l,o,-P,0),t.arc(c,u,o,0,P),t.arc(s,u,o,P,A)):s<c?(t.moveTo(s,n),t.arc(c,l,o,-P,P),t.arc(s,l,o,P,A+P)):l<u?(t.arc(s,l,o,-A,0),t.arc(s,u,o,0,A)):t.arc(s,l,o,-A,A),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,a)},drawPoint:function(t,e,n,r,a,i){var o,s,l,c,u,d=(i||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(r,a),t.rotate(d),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(r,a,n,0,O),t.closePath();break;case"triangle":t.moveTo(r+Math.sin(d)*n,a-Math.cos(d)*n),d+=I,t.lineTo(r+Math.sin(d)*n,a-Math.cos(d)*n),d+=I,t.lineTo(r+Math.sin(d)*n,a-Math.cos(d)*n),t.closePath();break;case"rectRounded":c=n-(u=.516*n),s=Math.cos(d+T)*c,l=Math.sin(d+T)*c,t.arc(r-s,a-l,u,d-A,d-P),t.arc(r+l,a-s,u,d-P,d),t.arc(r+s,a+l,u,d,d+P),t.arc(r-l,a+s,u,d+P,d+A),t.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*n,t.rect(r-c,a-c,2*c,2*c);break}d+=T;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+l,a-s),t.lineTo(r+s,a+l),t.lineTo(r-l,a+s),t.closePath();break;case"crossRot":d+=T;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s),d+=T,s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l),t.moveTo(r+l,a-s),t.lineTo(r-l,a+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-s,a-l),t.lineTo(r+s,a+l);break;case"dash":t.moveTo(r,a),t.lineTo(r+Math.cos(d)*n,a+Math.sin(d)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,r){var a=n.steppedLine;if(a){if("middle"===a){var i=(e.x+n.x)/2;t.lineTo(i,r?n.y:e.y),t.lineTo(i,r?e.y:n.y)}else"after"===a&&!r||"after"!==a&&r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(r?e.controlPointPreviousX:e.controlPointNextX,r?e.controlPointPreviousY:e.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},F=z;M.clear=z.clear,M.drawRoundedRectangle=function(t){t.beginPath(),z.roundedRect.apply(z,arguments)};var L={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};L._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var j=L,R=M.valueOrDefault,B={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,r,a;return M.isObject(t)?(e=+t.top||0,n=+t.right||0,r=+t.bottom||0,a=+t.left||0):e=n=r=a=+t||0,{top:e,right:n,bottom:r,left:a,height:e+r,width:a+n}},_parseFont:function(t){var e=j.global,n=R(t.fontSize,e.defaultFontSize),r={family:R(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(R(t.lineHeight,e.defaultLineHeight),n),size:n,style:R(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return r.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r},resolve:function(t,e,n,r){var a,i,o,s=!0;for(a=0,i=t.length;a<i;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&M.isArray(o)&&(o=o[n],s=!1),void 0!==o))return r&&!s&&(r.cacheable=!1),o}},E={_factorize:function(t){var e,n=[],r=Math.sqrt(t);for(e=1;e<r;e++)t%e==0&&(n.push(e),n.push(t/e));return r===(0|r)&&n.push(r),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},N=E;M.log10=E.log10;var W=M,V=F,H=B,U=N;W.easing=S,W.canvas=V,W.options=H,W.math=U,W.rtl={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n}
vendor: 1,360 bytes, line 1
1,setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,r;"ltr"!==e&&"rtl"!==e||(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};var $=function(t){W.extend(this,t),this.initialize.apply(this,arguments)};W.extend($.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=W.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,r=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),r||(r=e._start={}),function(t,e,n,r){var a,i,o,s,l,c,u,d,h,f=Object.keys(n);for(a=0,i=f.length;a<i;++a)if(c=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=c),(s=e[o])!==c&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(u=typeof c)==typeof(l=t[o]))if("string"===u){if((d=x(l)).valid&&(h=x(c)).valid){e[o]=h.mix(d,r).rgbString();continue}}
vendor: 4,115 bytes, line 1
1else if(W.isFinite(l)&&W.isFinite(c)){e[o]=l+(c-l)*r;continue}e[o]=c}}(r,a,n,t),e):(e._view=W.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return W.isNumber(this._model.x)&&W.isNumber(this._model.y)}}),$.extend=W.inherits;var q=$,Y=q.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),X=Y;Object.defineProperty(Y.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Y.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),j._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:W.noop,onComplete:W.noop}});var G={animations:[],request:null,addAnimation:function(t,e,n,r){var a,i,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,r||(t.animating=!0),a=0,i=o.length;a<i;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=W.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=W.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,r,a=this.animations,i=0;i<a.length;)e=(t=a[i]).chart,n=t.numSteps,r=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(r,n),W.callback(t.render,[e,t],e),W.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(W.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(i,1)):++i}},J=W.options.resolve,K=["push","pop","shift","splice","unshift"];function Z(t,e){var n=t._chartjs;if(n){var r=n.listeners,a=r.indexOf(e);-1!==a&&r.splice(a,1),r.length>0||(K.forEach(function(e){delete t[e]}),delete t._chartjs)}}var Q=function(t,e){this.initialize(t,e)};W.extend(Q.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,r=n.scales,a=t.getDataset(),i=n.options.scales;null!==e.xAxisID&&e.xAxisID in r&&!a.xAxisID||(e.xAxisID=a.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in r&&!a.yAxisID||(e.yAxisID=a.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_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&&Z(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,r=n.getMeta(),a=n.getDataset().data||[],i=r.data;for(t=0,e=a.length;t<e;++t)i[t]=i[t]||n.createMetaData(t);r.dataset=r.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,r=n.getDataset(),a=r.data||(r.data=[]);n._data!==a&&(n._data&&Z(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}
1),K.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=r.apply(this,e);return W.each(t._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),a}})}))),n._data=a),n.resyncElements()},_configure:function(){var t=this;t._config=W.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&W._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:W.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],r=n.length,a=0;a<r;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,r=0;for(t.dataset&&t.dataset.draw();r<n;++r)e[r].draw()},getStyle:function(t){var e,n=this,r=n.getMeta(),a=r.dataset;return n._configure(),!1!==(e=a&&void 0===t?n._resolveDatasetElementOptions(a||{}):n._resolveDataElementOptions(r.data[t=t||0]||{},t)).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,r,a,i,o=this,s=o.chart,l=o._config,c=t.custom||{},u=s.options.elements[o.datasetElementType.prototype._type]||{},d=o._datasetElementOptions,h={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,r=d.length;n<r;++n)a=d[n],i=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,h[a]=J([c[i],l[i],u[i]],f);return h},_resolveDataElementOptions:function(t,e){var n=this,r=t&&t.custom,a=n._cachedDataOpts;if(a&&!r)return a;var i,o,s,l,c=n.chart,u=n._config,d=c.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},g={chart:c,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!r};if(r=r||{},W.isArray(h))for(o=0,s=h.length;o<s;++o)f[l=h[o]]=J([r[l],u[l],d[l]],g,e,p);else for(o=0,s=(i=Object.keys(h)).length;o<s;++o)f[l=i[o]]=J([r[l],u[h[l]],u[l],d[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){W.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},a=t._model,i=W.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=J([r.hoverBackgroundColor,e.hoverBackgroundColor,i(a.backgroundColor)],void 0,n),a.borderColor=J([r.hoverBorderColor,e.hoverBorderColor,i(a.borderColor)],void 0,n),a.borderWidth=J([r.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,r,a,i,o=this.getMeta().dataset,s={};if(o){for(i=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(r=Object.keys(a)).length;t<e;++t)s[n=r[t]]=i[n],i[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,r=e.data.length,a=n.length;a<r?e.data.splice(a,r-a):a>r&&t.insertElements(r,a-r)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),Q.extend=W.inherits;var tt=Q,et=2*Math.PI;function nt(t,e){var n=e.startAngle,r=e.endAngle,a=e.pixelMargin,i=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-i,r+i),e.innerRadius>a?t.arc(o,s,e.innerRadius-a,r+(i=a/e.innerRadius),n-i,!0):t.arc(o,s,a,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}j._set("global",{elements:{arc:{backgroundColor:j.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var rt=q.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var r=W.getAngleFromPoint(n,{x:t,y:e}),a=r.angle,i=r.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=et;for(;a>s;)a-=et;for(;a<o;)a+=et;return a>=o&&a<=s&&i>=n.innerRadius&&i<=n.outerRadius}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.
vendor: 5,634 bytes, line 1
1innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=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/et)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+et,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%et}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&function(t,e,n){var r="inner"===e.borderAlign;r?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,r){var a,i=n.endAngle;for(r&&(n.endAngle=n.startAngle+et,nt(t,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=et,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+et,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+et),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,r),r&&nt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}(e,n,a),e.restore()}}),at=W.valueOrDefault,it=j.global.defaultColor;j._set("global",{elements:{line:{tension:.4,backgroundColor:it,borderWidth:3,borderColor:it,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ot=q.extend({_type:"line",draw:function(){var t,e,n,r=this,a=r._view,i=r._chart.ctx,o=a.spanGaps,s=r._children.slice(),l=j.global,c=l.elements.line,u=-1,d=r._loop;if(s.length){if(r._loop){for(t=0;t<s.length;++t)if(e=W.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),d=o;break}d&&s.push(s[0])}for(i.save(),i.lineCap=a.borderCapStyle||c.borderCapStyle,i.setLineDash&&i.setLineDash(a.borderDash||c.borderDash),i.lineDashOffset=at(a.borderDashOffset,c.borderDashOffset),i.lineJoin=a.borderJoinStyle||c.borderJoinStyle,i.lineWidth=at(a.borderWidth,c.borderWidth),i.strokeStyle=a.borderColor||l.defaultColor,i.beginPath(),(n=s[0]._view).skip||(i.moveTo(n.x,n.y),u=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===u?W.previousItem(s,t):s[u],n.skip||(u!==t-1&&!o||-1===u?i.moveTo(n.x,n.y):W.canvas.lineTo(i,e._view,n),u=t);d&&i.closePath(),i.stroke(),i.restore()}}}),st=W.valueOrDefault,lt=j.global.defaultColor;function ct(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}j._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:lt,borderColor:lt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ut=q.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ct,inXRange:ct,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,r=e.pointStyle,a=e.rotation,i=e.radius,o=e.x,s=e.y,l=j.global,c=l.defaultColor;e.skip||(void 0===t||W.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||c,n.lineWidth=st(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||c,W.canvas.drawPoint(n,r,i,o,s,a))}}),dt=j.global.defaultColor;function ht(t){return t&&void 0!==t.width}function ft(t){var e,n,r,a,i;return ht(t)?(e=t.x-(i=t.width/2),n=t.x+i,r=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(i=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),r=t.y-i,a=t.y+i),{left:e,top:r,right:n,bottom:a}}function gt(t,e,n){return t===e?n:t===n?e:t}function pt(t,e,n){var r=null===e,a=null===n,i=!(!t||r&&a)&&ft(t);return i&&(r||e>=i.left&&e<=i.right)&&(a||n>=i.top&&n<=i.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:dt,borderColor:dt,borderSkipped:"bottom",borderWidth:0}}});var bt=q.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=ft(t),n=e.right-e.left,r=e.bottom-e.top,a=function(t,e,n){var r,a,i,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=gt(e,"left","right")):t.base<t.y&&(e=gt(e,"bottom","top")),n[e]=!0,n):n}(t);return W.isObject(s)?(r=+s.top||0,a=+s.right||0,i=+s.bottom||0,o=+s.left||0):r=a=i=o=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||a<0?0:a>e?e:a,b:l.bottom||i<0?0:i>n?n:i,l:l.left||o<0?0:o>e?e:o}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b}}}(e),r=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),r.w===a.w&&r.h===a.h||(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore(
vendor: 4,306 bytes, line 1
1))},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return pt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return ht(n)?pt(n,t,null):pt(n,null,e)},inXRange:function(t){return pt(this._view,t,null)},inYRange:function(t){return pt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return ht(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return ht(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),vt={},mt=ot,yt=ut,xt=bt;vt.Arc=rt,vt.Line=mt,vt.Point=yt,vt.Rectangle=xt;var _t=W._deprecated,wt=W.valueOrDefault;j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var kt=tt.extend({dataElementType:vt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;tt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,_t("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),_t("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),_t("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),_t("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),_t("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,r=this,a=r.getMeta().data;for(r._ruler=r.getRuler(),e=0,n=a.length;e<n;++e)r.updateElement(a[e],e,t)},updateElement:function(t,e,n){var r=this,a=r.getMeta(),i=r.getDataset(),o=r._resolveDataElementOptions(t,e);t._xScale=r.getScaleForId(a.xAxisID),t._yScale=r.getScaleForId(a.yAxisID),t._datasetIndex=r.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:i.label,label:r.chart.data.labels[e]},W.isArray(i.data[e])&&(t._model.borderSkipped=null),r._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,r){var a=this,i=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),c=a._ruler||a.getRuler(),u=a.calculateBarValuePixels(a.index,e,r),d=a.calculateBarIndexPixels(a.index,e,c,r);i.horizontal=l,i.base=n?s:u.base,i.x=l?n?s:u.head:d.center,i.y=l?d.center:n?s:u.head,i.height=l?d.size:void 0,i.width=l?void 0:d.size},_getStacks:function(t){var e,n,r=this._getIndexScale(),a=r._getMatchingVisibleMetas(this._type),i=r.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===i||-1===s.indexOf(n.stack)||void 0===i&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r},getRuler:function(){var t,e,n=this,r=n._getIndexScale(),a=[];for(t=0,e=n.getMeta().data.length;t<e;++t)a.push(r.getPixelForValue(null,t,n.index));return{pixels:a,start:r._startPixel,end:r._endPixel,stackCount:n.getStackCount(),scale:r}},calculateBarValuePixels:function(t,e,n){var r,a,i,o,s,l,c,u=this,d=u.chart,h=u._getValueScale(),f=h.isHorizontal(),g=d.data.datasets,p=h._getMatchingVisibleMetas(u._type),b=h._parseValue(g[t].data[e]),v=n.minBarLength,m=h.options.stacked,y=u.getMeta().stack,x=void 0===b.start?0:b.max>=0&&b.min>=0?b.min:b.max,_=void 0===b.start?b.end:b.max>=0&&b.min>=0?b.max-b.min:b.min-b.max,w=p.length;if(m||void 0===m&&void 0!==y)for(r=0;r<w&&(a=p[r]).index!==t;++r)a.stack===y&&(i=void 0===(c=h._parseValue(g[a.index].data[e])).start?c.end:c.min>=0&&c.max>=0?c.max:c.min,(b.min<0&&i<0||b.max>=0&&i>0)&&(x+=i));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+_))-o,void 0!==v&&Math.abs(l)<v&&(l=v,s=_>=0&&!f||_<0&&f?o-v:o+v),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,r){var a="flex"===r.barThickness?function(t,e,n){var r,a=e.pixels,i=a[t],o=t>
vendor: 5,137 bytes, line 1
10?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=i-(null===s?e.end-e.start:s-i)),null===s&&(s=i+i-o),r=i-(i-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:r}}(e,n,r):function(t,e,n){var r,a,i=n.barThickness,o=e.stackCount,s=e.pixels[t],l=W.isNullOrUndef(i)?function(t,e){var n,r,a,i,o=t._length;for(a=1,i=e.length;a<i;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,i=t.getTicks().length;a<i;++a)r=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(r-n)):o,n=r;return o}(e.scale,e.pixels):-1;return W.isNullOrUndef(i)?(r=l*n.categoryPercentage,a=n.barPercentage):(r=i*o,a=1),{chunk:r/o,ratio:a,start:s-r/2}}(e,n,r),i=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*i+a.chunk/2,s=Math.min(wt(r.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),r=t.getMeta().data,a=t.getDataset(),i=r.length,o=0;for(W.canvas.clipArea(e.ctx,e.chartArea);o<i;++o){var s=n._parseValue(a.data[o]);isNaN(s.min)||isNaN(s.max)||r[o].draw()}W.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=W.extend({},tt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,r=t._getValueScale().options;return e.barPercentage=wt(n.barPercentage,e.barPercentage),e.barThickness=wt(n.barThickness,e.barThickness),e.categoryPercentage=wt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=wt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=wt(r.minBarLength,e.minBarLength),e}}),Mt=W.valueOrDefault,Ct=W.options.resolve;j._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var St=tt.extend({dataElementType:vt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta();W.each(n.data,function(n,r){e.updateElement(n,r,t)})},updateElement:function(t,e,n){var r=this,a=r.getMeta(),i=t.custom||{},o=r.getScaleForId(a.xAxisID),s=r.getScaleForId(a.yAxisID),l=r._resolveDataElementOptions(t,e),c=r.getDataset().data[e],u=r.index,d=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof c?c:NaN,e,u),h=n?s.getBasePixel():s.getPixelForValue(c,e,u);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:i.skip||isNaN(d)||isNaN(h),x:d,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,r=W.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Mt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Mt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Mt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,r=n.chart,a=n.getDataset(),i=t.custom||{},o=a.data[e]||{},s=tt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=W.extend({},s)),s.radius=Ct([i.radius,o.r,n._config.radius,r.options.elements.point.radius],l,e),s}}),At=W.valueOrDefault,Dt=Math.PI,Ot=2*Dt,Pt=Dt/2;j._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,r,a=document.createElement("ul"),i=t.data,o=i.datasets,s=i.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&r.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,r){var a=t.getDatasetMeta(0),i=a.controller.getStyle(r);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[r])||a.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var n,r,a,i=e.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(a=o.getDatasetMeta(n)).data[i]&&(a.data[i].hidden=!a.data[i].hidden);o.update()}},cutoutPercentage:50,rotation:-Pt,circumference:Ot,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],r=": "+e.datasets[t.datasetIndex].data[t.index];return W.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var Tt=tt.extend({dataElementType:vt.Arc,linkScales:W.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
1dColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,r=this,a=r.chart,i=a.chartArea,o=a.options,s=1,l=1,c=0,u=0,d=r.getMeta(),h=d.data,f=o.cutoutPercentage/100||0,g=o.circumference,p=r._getRingWeight(r.index);if(g<Ot){var b=o.rotation%Ot,v=(b+=b>=Dt?-Ot:b<-Dt?Ot:0)+g,m=Math.cos(b),y=Math.sin(b),x=Math.cos(v),_=Math.sin(v),w=b<=0&&v>=0||v>=Ot,k=b<=Pt&&v>=Pt||v>=Ot+Pt,M=b<=-Pt&&v>=-Pt||v>=Dt+Pt,C=b===-Dt||v>=Dt?-1:Math.min(m,m*f,x,x*f),S=M?-1:Math.min(y,y*f,_,_*f),A=w?1:Math.max(m,m*f,x,x*f),D=k?1:Math.max(y,y*f,_,_*f);s=(A-C)/2,l=(D-S)/2,c=-(A+C)/2,u=-(D+S)/2}for(e=0,n=h.length;e<n;++e)h[e]._options=r._resolveDataElementOptions(h[e],e);for(a.borderWidth=r.getMaxBorderWidth(),a.outerRadius=Math.max(Math.min((i.right-i.left-a.borderWidth)/s,(i.bottom-i.top-a.borderWidth)/l)/2,0),a.innerRadius=Math.max(a.outerRadius*f,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),a.offsetX=c*a.outerRadius,a.offsetY=u*a.outerRadius,d.total=r.calculateTotal(),r.outerRadius=a.outerRadius-a.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-a.radiusLength*p,0),e=0,n=h.length;e<n;++e)r.updateElement(h[e],e,t)},updateElement:function(t,e,n){var r=this,a=r.chart,i=a.chartArea,o=a.options,s=o.animation,l=(i.left+i.right)/2,c=(i.top+i.bottom)/2,u=o.rotation,d=o.rotation,h=r.getDataset(),f=n&&s.animateRotate||t.hidden?0:r.calculateCircumference(h.data[e])*(o.circumference/Ot),g=t._options||{};W.extend(t,{_datasetIndex:r.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+a.offsetX,y:c+a.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:n&&s.animateScale?0:r.outerRadius,innerRadius:n&&s.animateScale?0:r.innerRadius,label:W.valueAtIndexOrDefault(h.label,e,a.data.labels[e])}});var p=t._model;n&&s.animateRotate||(p.startAngle=0===e?o.rotation:r.getMeta().data[e-1]._model.endAngle,p.endAngle=p.startAngle+p.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),r=0;return W.each(n.data,function(n,a){t=e.data[a],isNaN(t)||n.hidden||(r+=Math.abs(t))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Ot*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,r,a,i,o,s,l,c=0,u=this.chart;if(!t)for(e=0,n=u.data.datasets.length;e<n;++e)if(u.isDatasetVisible(e)){t=(r=u.getDatasetMeta(e)).data,e!==this.index&&(i=r.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],i?(i._configure(),o=i._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(c=(l=o.hoverBorderWidth)>(c=(s=o.borderWidth)>c?s:c)?l:c);return c},setHoverStyle:function(t){var e=t._model,n=t._options,r=W.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=At(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=At(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=At(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(At(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});j._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),j._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var It=kt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),zt=W.valueOrDefault,Ft=W.options.resolve,Lt=W.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},r=n.reverse,a=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:r?i:a,end:r?a:i}}function Rt(t,e,n){var r=n/2,a=jt(t,r),i=jt(e,r);return{top:i.end,right:a.end,bottom:i.start,left:a.start}}function Bt(t){var e,n,r,a;return W.isObject(t)?(e=t.top,n=t.right,r=t.bottom,a=t.left):e=n=r=a=t,{top:e,right:n,bottom:r,left:a}}j._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Et=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
1dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,r=this,a=r.getMeta(),i=a.dataset,o=a.data||[],s=r._config,l=r._showLine=zt(s.showLine,r.chart.options.showLines);for(r._xScale=r.getScaleForId(a.xAxisID),r._yScale=r.getScaleForId(a.yAxisID),l&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=r._yScale,i._datasetIndex=r.index,i._children=o,i._model=r._resolveDatasetElementOptions(i),i.pivot()),e=0,n=o.length;e<n;++e)r.updateElement(o[e],e,t);for(l&&0!==i._model.tension&&r.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var r,a,i=this,o=i.getMeta(),s=t.custom||{},l=i.getDataset(),c=i.index,u=l.data[e],d=i._xScale,h=i._yScale,f=o.dataset._model,g=i._resolveDataElementOptions(t,e);r=d.getPixelForValue("object"==typeof u?u:NaN,e,c),a=n?h.getBasePixel():i.calculatePointY(u,e,c),t._xScale=d,t._yScale=h,t._options=g,t._datasetIndex=c,t._index=e,t._model={x:r,y:a,skip:s.skip||isNaN(r)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:zt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,r=t.custom||{},a=e.chart.options,i=a.elements.line,o=tt.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=zt(n.spanGaps,a.spanGaps),o.tension=zt(n.lineTension,i.tension),o.steppedLine=Ft([r.steppedLine,n.steppedLine,i.stepped]),o.clip=Bt(zt(n.clip,Rt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var r,a,i,o,s,l,c=this.chart,u=this._yScale,d=0,h=0;if(u.options.stacked){for(o=+u.getRightValue(t),l=(s=c._getSortedVisibleDatasetMetas()).length,r=0;r<l&&(a=s[r]).index!==n;++r)"line"===a.type&&a.yAxisID===u.id&&((i=+u.getRightValue(c.data.datasets[a.index].data[e]))<0?h+=i||0:d+=i||0);return u.getPixelForValue(o<0?h+o:d+o)}return u.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,r,a=this.chart,i=this.getMeta(),o=i.dataset._model,s=a.chartArea,l=i.data||[];function c(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===o.cubicInterpolationMode)W.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;
vendor: 4,777 bytes, line 1
1++t)n=l[t]._model,r=W.splineCurve(W.previousItem(l,t)._model,n,W.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Lt(n=l[t]._model,s)&&(t>0&&Lt(l[t-1]._model,s)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=c(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Lt(l[t+1]._model,s)&&(n.controlPointNextX=c(n.controlPointNextX,s.left,s.right),n.controlPointNextY=c(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,n=e.chart,r=e.getMeta(),a=r.data||[],i=n.chartArea,o=n.canvas,s=0,l=a.length;for(e._showLine&&(W.canvas.clipArea(n.ctx,{left:!1===(t=r.dataset._model.clip).left?0:i.left-t.left,right:!1===t.right?o.width:i.right+t.right,top:!1===t.top?0:i.top-t.top,bottom:!1===t.bottom?o.height:i.bottom+t.bottom}),r.dataset.draw(),W.canvas.unclipArea(n.ctx));s<l;++s)a[s].draw(i)},setHoverStyle:function(t){var e=t._model,n=t._options,r=W.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=zt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=zt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=zt(n.hoverBorderWidth,n.borderWidth),e.radius=zt(n.hoverRadius,n.radius)}}),Nt=W.options.resolve;j._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,r,a=document.createElement("ul"),i=t.data,o=i.datasets,s=i.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&r.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,r){var a=t.getDatasetMeta(0),i=a.controller.getStyle(r);return{text:n,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(e.datasets[0].data[r])||a.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var n,r,a,i=e.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(a=o.getDatasetMeta(n)).data[i].hidden=!a.data[i].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Wt=tt.extend({dataElementType:vt.Arc,linkScales:W.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,r,a=this,i=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],c=a._angles=[],u=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=i.data.length;e<n;e++)l[e]=s,r=a._computeAngle(e),c[e]=r,s+=r;for(e=0,n=u.length;e<n;++e)u[e]._options=a._resolveDataElementOptions(u[e],e),a.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,r=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(r.cutoutPercentage?e.outerRadius/100*r.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var r=this,a=r.chart,i=r.getDataset(),o=a.options,s=o.animation,l=a.scale,c=a.data.labels,u=l.xCenter,d=l.yCenter,h=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(i.data[e]),g=r._starts[e],p=g+(t.hidden?0:r._angles[e]),b=s.animateScale?0:l.getDistanceFromCenterForValue(i.data[e]),v=t._options||{};W.extend(t,{_datasetIndex:r.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?b:f,startAngle:n&&s.animateRotate?h:g,endAngle:n&&s.animateRotate?h:p,label:W.valueAtIndexOrDefault(c,e,c[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return W.each(e.data,function(e,r){isNaN(t.data[r])||e.hidden||n++}),n},setHoverStyle:function(t){var e=t._model,n=t._options,r=W.getHoverColor,a=W.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth}
1,e.backgroundColor=a(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,r=e.getDataset(),a=e.getMeta();return isNaN(r.data[t])||a.data[t].hidden?0:Nt([e.chart.options.elements.arc.angle,2*Math.PI/n],{chart:e.chart,dataIndex:t,dataset:r,datasetIndex:e.index},t)}});j._set("pie",W.clone(j.doughnut)),j._set("pie",{cutoutPercentage:0});var Vt=Tt,Ht=W.valueOrDefault;j._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Ut=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,linkScales:W.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,r=this,a=r.getMeta(),i=a.dataset,o=a.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),i._scale=s,i._datasetIndex=r.index,i._children=o,i._loop=!0,i._model=r._resolveDatasetElementOptions(i),i.pivot(),e=0,n=o.length;e<n;++e)r.updateElement(o[e],e,t);for(r.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var r=this,a=t.custom||{},i=r.getDataset(),o=r.chart.scale,s=o.getPointPositionForValue(e,i.data[e]),l=r._resolveDataElementOptions(t,e),c=r.getMeta().dataset._model,u=n?o.xCenter:s.x,d=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=r.index,t._index=e,t._model={x:u,y:d,skip:a.skip||isNaN(u)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Ht(a.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,r=tt.prototype._resolveDatasetElementOptions.apply(t,arguments);return r.spanGaps=Ht(e.spanGaps,n.spanGaps),r.tension=Ht(e.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var t,e,n,r,a=this.getMeta(),i=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;
vendor: 4,495 bytes, line 1
1++t)n=o[t]._model,r=W.splineCurve(W.previousItem(o,t,!0)._model,n,W.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,i.left,i.right),n.controlPointPreviousY=s(r.previous.y,i.top,i.bottom),n.controlPointNextX=s(r.next.x,i.left,i.right),n.controlPointNextY=s(r.next.y,i.top,i.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,r=W.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ht(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Ht(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Ht(n.hoverBorderWidth,n.borderWidth),e.radius=Ht(n.hoverRadius,n.radius)}});j._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),j._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:kt,bubble:St,doughnut:Tt,horizontalBar:It,line:Et,polarArea:Wt,pie:Vt,radar:Ut,scatter:Et};function qt(t,e){return t.native?{x:t.x,y:t.y}:W.getRelativePosition(t,e)}function Yt(t,e){var n,r,a,i,o,s,l=t._getSortedVisibleDatasetMetas();for(r=0,i=l.length;r<i;++r)for(a=0,o=(n=l[r].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function Xt(t,e){var n=[];return Yt(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function Gt(t,e,n,r){var a=Number.POSITIVE_INFINITY,i=[];return Yt(t,function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=r(e,o);s<a?(i=[t],a=s):s===a&&i.push(t)}}),i}function Jt(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){var a=e?Math.abs(t.x-r.x):0,i=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(i,2))}}function Kt(t,e,n){var r=qt(e,t);n.axis=n.axis||"x";var a=Jt(n.axis),i=n.intersect?Xt(t,r):Gt(t,r,!1,a),o=[];return i.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[i[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var Zt={modes:{single:function(t,e){var n=qt(e,t),r=[];return Yt(t,function(t){if(t.inRange(n.x,n.y))return r.push(t),r}),r.slice(0,1)},label:Kt,index:Kt,dataset:function(t,e,n){var r=qt(e,t);n.axis=n.axis||"xy";var a=Jt(n.axis),i=n.intersect?Xt(t,r):Gt(t,r,!1,a);return i.length>0&&(i=t.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(t,e){return Kt(t,e,{intersect:!1})},point:function(t,e){return Xt(t,qt(e,t))},nearest:function(t,e,n){var r=qt(e,t);n.axis=n.axis||"xy";var a=Jt(n.axis);return Gt(t,r,n.intersect,a)},x:function(t,e,n){var r=qt(e,t),a=[],i=!1;return Yt(t,function(t){t.inXRange(r.x)&&a.push(t),t.inRange(r.x,r.y)&&(i=!0)}),n.intersect&&!i&&(a=[]),a},y:function(t,e,n){var r=qt(e,t),a=[],i=!1;return Yt(t,function(t){t.inYRange(r.y)&&a.push(t),t.inRange(r.x,r.y)&&(i=!0)}),n.intersect&&!i&&(a=[]),a}}},Qt=W.extend;function te(t,e){return W.where(t,function(t){return t.pos===e})}function ee(t,e){return t.sort(function(t,n){var r=e?n:t,a=e?t:n;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function ne(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function re(t,e,n){var r,a,i=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?i.height:i.width,t[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=e.outerWidth-ne(o,t,"left","right"),a=e.outerHeight-ne(o,t,"top","bottom"),r!==t.w||a!==t.h){t.w=r,t.h=a;var l=n.horizontal?[r,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ae(t,e){var n,r=e.maxPadding;return n={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach(function(t){n[t]=Math.max(e[t],r[t])}),n}function ie(t,e,n){var r,a,i,o,s,l,c=[];for(r=0,a=t.length;r<a;++r)(o=(i=t[r]).box).update(i.width||e.w,i.height||e.h,ae(i.horizontal,e)),re(e,n,i)&&(l=!0,c.length&&(s=!0)),o.fullWidth||c.push(i);return s&&ie(c,e,n)||l}function oe(t,e,n){var r,a,i,o,s=n.padding,l=e.x,c=e.y;for(r=0,a=t.length;r<a;++r)o=(i=t[r]).box,i.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=c,o.bottom=c+o.height,o.width=o.right-o.left,c=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=c}j._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var se,le={defaults:{}
1,addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var r,a=["fullWidth","position","weight"],i=a.length,o=0;o<i;++o)n.hasOwnProperty(r=a[o])&&(e[r]=n[r])},update:function(t,e,n){if(t){var r=W.options.toPadding((t.options.layout||{}).padding),a=e-r.width,i=n-r.height,o=function(t){var e=function(t){var e,n,r,a=[];for(e=0,n=(t||[]).length;e<n;++e)a.push({index:e,box:r=t[e],pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return a}(t),n=ee(te(e,"left"),!0),r=ee(te(e,"right")),a=ee(te(e,"top"),!0),i=ee(te(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:r.concat(i),chartArea:te(e,"chartArea"),vertical:n.concat(r),horizontal:a.concat(i)}}(t.boxes),s=o.vertical,l=o.horizontal,c=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,vBoxMaxWidth:a/2/s.length,hBoxMaxHeight:i/2}),u=Qt({maxPadding:Qt({},r),w:a,h:i,x:r.left,y:r.top},r);(function(t,e){var n,r,a;for(n=0,r=t.length;n<r;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight})(s.concat(l),c),ie(s,u,c),ie(l,u,c)&&ie(s,u,c),function(t){var e=t.maxPadding;function n(n){var r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(u),oe(o.leftAndTop,u,c),u.x+=u.w,u.y+=u.h,oe(o.rightAndBottom,u,c),t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h},W.each(o.chartArea,function(e){var n=e.box;Qt(n,t.chartArea),n.update(u.w,u.h)})}}},ce=(se=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&se.default||se,ue="chartjs-size-monitor",de="chartjs-render-monitor",he=["animationstart","webkitAnimationStart"],fe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ge(t,e){var n=W.getStyle(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var pe=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function be(t,e,n){t.addEventListener(e,n,pe)}function ve(t,e,n){t.removeEventListener(e,n,pe)}function me(t,e,n,r,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function ye(t){var e=document.createElement("div");return e.className=t||"",e}var xe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t.$chartjs||(t.$chartjs={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(e)),t.appendChild(r)}}(e.host?e:document.head,ce)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,r=t.getAttribute("height"),a=t.getAttribute("width");
1if(t.$chartjs={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var i=ge(t,"width");void 0!==i&&(t.width=i)}if(null===r||""===r)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ge(t,"height");void 0!==i&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e.$chartjs){var n=e.$chartjs.initial;["height","width"].forEach(function(t){var r=n[t];W.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)}),W.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e.$chartjs}},addEventListener:function(t,e,n){var r=t.canvas;if("resize"!==e){var a=n.$chartjs||(n.$chartjs={});be(r,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=fe[t.type]||t.type,r=W.getRelativePosition(t,e);return me(n,e,r.x,r.y,t)}(e,t))})}else!function(t,e,n){var r,a,i,o,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=1e6,n=ye(ue),r=ye(ue+"-expand"),a=ye(ue+"-shrink");r.appendChild(ye()),a.appendChild(ye()),n.appendChild(r),n.appendChild(a),n._reset=function(){r.scrollLeft=e,r.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var i=function(){n._reset(),t()};return be(r,"scroll",i.bind(r,"expand")),be(a,"scroll",i.bind(a,"shrink")),n}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&t.parentNode,a=r?r.clientWidth:0;e(me("resize",n)),r&&r.clientWidth<a&&n.canvas&&e(me("resize",n))}},i=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,i||(i=!0,W.requestAnimFrame.call(window,function(){i=!1,r.apply(a,o)}))}));!function(t,e){var n=t.$chartjs||(t.$chartjs={}),r=n.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};W.each(he,function(e){be(t,e,r)}),n.reflow=!!t.offsetParent,t.classList.add(de)}(t,function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}})}(r,n,t)},removeEventListener:function(t,e,n){var r,a,i,o=t.canvas;if("resize"!==e){var s=((n.$chartjs||{}).proxies||{})[t.id+"_"+e];s&&ve(o,e,s)}else i=(a=(r=o).$chartjs||{}).resizer,delete a.resizer,function(t){var e=t.$chartjs||{},n=e.renderProxy;n&&(W.each(he,function(e){ve(t,e,n)}),delete e.renderProxy),t.classList.remove(de)}(r),i&&i.parentNode&&i.parentNode.removeChild(i)}};W.addEvent=be,W.removeEvent=ve;var _e=W.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},xe._enabled?xe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});j._set("global",{plugins:{}});var we={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var r,a,i,o,s,l=this.descriptors(t),c=l.length;for(r=0;r<c;++r)if("function"==typeof(s=(i=(a=l[r]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(i,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],r=[],a=t&&t.config||{},i=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,a=i[e];!1!==a&&(!0===a&&(a=W.clone(j.global.plugins[e])),n.push(t),r.push({plugin:t,options:a||{}}))}}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},ke={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=W.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?W.merge(Object.create(null),[j.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=W.extend(n.defaults[t],e))},addScalesToLayout:function(t){W.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,le.addBox(t,e)})}},Me=W.valueOrDefault,Ce=W.rtl.getRtlAdapter;j._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackgroun
vendor: 3,901 bytes, line 1
1d:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:W.noop,title:function(t,e){var n="",r=e.labels,a=r?r.length:0;if(t.length>0){var i=t[0];i.label?n=i.label:i.xLabel?n=i.xLabel:a>0&&i.index<a&&(n=r[i.index])}return n},afterTitle:W.noop,beforeBody:W.noop,beforeLabel:W.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),W.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:W.noop,afterBody:W.noop,beforeFooter:W.noop,footer:W.noop,afterFooter:W.noop}}});var Se={average:function(t){if(!t.length)return!1;var e,n,r=0,a=0,i=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();r+=s.x,a+=s.y,++i}}return{x:r/i,y:a/i}},nearest:function(t,e){var n,r,a,i=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){var l=t[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=W.distanceBetweenPoints(e,c);u<s&&(s=u,a=l)}}if(a){var d=a.tooltipPosition();i=d.x,o=d.y}return{x:i,y:o}}};function Ae(t,e){return e&&(W.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function De(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Oe(t){var e=j.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Me(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Me(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Me(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Me(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Me(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Me(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Me(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Me(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Me(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Pe(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Te(t){return Ae([],De(t))}var Ie=q.extend({initialize:function(){this._model=Oe(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),r=e.title.apply(t,arguments),a=e.afterTitle.apply(t,arguments),i=[];return i=Ae(i,De(n)),i=Ae(i,De(r)),Ae(i,De(a))},getBeforeBody:function(){return Te(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,r=n._options.callbacks,a=[];return W.each(t,function(t){var i={before:[],lines:[],after:[]};Ae(i.before,De(r.beforeLabel.call(n,t,e))),Ae(i.lines,r.label.call(n,t,e)),Ae(i.after,De(r.afterLabel.call(n,t,e))),a.push(i)}),a},getAfterBody:function(){return Te(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),i=[];return i=Ae(i,De(n)),i=Ae(i,De(r)),Ae(i,De(a))},update:function(t){var e,n,r,a,i,o,s,l,c,u,d=this,h=d._options,f=d._model,g=d._model=Oe(h),p=d._active,b=d._data,v={xAlign:f.xAlign,yAlign:f.yAlign},m={x:f.x,y:f.y},y={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};
1if(p.length){g.opacity=1;var _=[],w=[];x=Se[h.position].call(d,p,d._eventPosition);var k=[];for(e=0,n=p.length;e<n;++e)k.push((a=void 0,i=void 0,void 0,void 0,l=void 0,c=void 0,u=void 0,a=(r=p[e])._xScale,i=r._yScale||r._scale,o=r._index,c=(l=r._chart.getDatasetMeta(s=r._datasetIndex).controller)._getIndexScale(),u=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:i?i.getLabelForIndex(o,s):"",label:c?""+c.getLabelForIndex(o,s):"",value:u?""+u.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:r._model.x,y:r._model.y}));h.filter&&(k=k.filter(function(t){return h.filter(t,b)})),h.itemSort&&(k=k.sort(function(t,e){return h.itemSort(t,e,b)})),W.each(k,function(t){_.push(h.callbacks.labelColor.call(d,t,d._chart)),w.push(h.callbacks.labelTextColor.call(d,t,d._chart))}),g.title=d.getTitle(k,b),g.beforeBody=d.getBeforeBody(k,b),g.body=d.getBody(k,b),g.afterBody=d.getAfterBody(k,b),g.footer=d.getFooter(k,b),g.x=x.x,g.y=x.y,g.caretPadding=h.caretPadding,g.labelColors=_,g.labelTextColors=w,g.dataPoints=k,m=function(t,e,n,r){var a=t.x,i=t.y,o=t.caretPadding,s=n.xAlign,l=n.yAlign,c=t.caretSize+o,u=t.cornerRadius+o;return"right"===s?a-=e.width:"center"===s&&((a-=e.width/2)+e.width>r.width&&(a=r.width-e.width),a<0&&(a=0)),"top"===l?i+=c:i-="bottom"===l?e.height+c:e.height/2,"center"===l?"left"===s?a+=c:"right"===s&&(a-=c):"left"===s?a-=u:"right"===s&&(a+=u),{x:a,y:i}}(g,y=function(t,e){var n=t._chart.ctx,r=2*e.yPadding,a=0,i=e.body,o=i.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0),s=e.title.length,l=e.footer.length,c=e.titleFontSize,u=e.bodyFontSize,d=e.footerFontSize;r+=s*c,r+=s?(s-1)*e.titleSpacing:0,r+=s?e.titleMarginBottom:0,r+=(o+=e.beforeBody.length+e.afterBody.length)*u,r+=o?(o-1)*e.bodySpacing:0,r+=l?e.footerMarginTop:0,r+=l*d,r+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,n.measureText(t).width+h)};return n.font=W.fontString(c,e._titleFontStyle,e._titleFontFamily),W.each(e.title,f),n.font=W.fontString(u,e._bodyFontStyle,e._bodyFontFamily),W.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?u+2:0,W.each(i,function(t){W.each(t.before,f),W.each(t.lines,f),W.each(t.after,f)}),h=0,n.font=W.fontString(d,e._footerFontStyle,e._footerFontFamily),W.each(e.footer,f),{width:a+=2*e.xPadding,height:r}}(this,g),v=function(t,e){var n,r,a,i,o,s=t._model,l=t._chart,c=t._chart.chartArea,u="center",d="center";s.y<e.height?d="top":s.y>l.height-e.height&&(d="bottom");var h=(c.left+c.right)/2,f=(c.top+c.bottom)/2;"center"===d?(n=function(t){return t<=h},r=function(t){return t>h}):(n=function(t){return t<=e.width/2},r=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},i=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(u="left",a(s.x)&&(u="center",d=o(s.y))):r(s.x)&&(u="right",i(s.x)&&(u="center",d=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:d}}(this,y),d._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=m.x,g.y=m.y,g.width=y.width,g.height=y.height,g.caretX=x.x,g.caretY=x.y,d._model=g,t&&h.custom&&h.custom.call(d,g),d},drawCaret:function(t,e){var n=this._chart.ctx,r=this.getCaretPosition(t,e,this._view);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var r,a,i,o,s,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,b=e.height;if("center"===h)s=g+b/2,"left"===d?(a=(r=f)-c,i=r,o=s+c,l=s-c):(a=(r=f+p)+c,i=r,o=s-c,l=s+c);else if("left"===d?(r=(a=f+u+c)-c,i=a+c):"right"===d?(r=(a=f+p-u-c)-c,i=a+c):(r=(a=n.caretX)-c,i=a+c),"top"===h)s=(o=g)-c,l=o;else{s=(o=g+b)+c,l=o;var v=i;i=r,r=v}return{x1:r,x2:a,x3:i,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var r,a,i,o=e.title,s=o.length;if(s){var l=Ce(e.rtl,e.x,e.width);for(t.x=Pe(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",r=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=W.fontString(r,e._titleFontStyle,e._titleFontFamily),i=0;i<s;++i)n.fillText(o[i],l.x(t.x),t.y+r/2),t.y+=r+a,i+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var r,a,i,o,s,l,c,u,d=e.bodyFontSize,h=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,b=0,v=p?Pe(e,"left"):0,m=Ce(e.rtl,e.x,e.width),y=function(e){n.fillText(e,m.x(t.x+b),t.y+d/2),t.y+=d+h},x=m.textAlign(f);
1for(n.textAlign=f,n.textBaseline="middle",n.font=W.fontString(d,e._bodyFontStyle,e._bodyFontFamily),t.x=Pe(e,x),n.fillStyle=e.bodyFontColor,W.each(e.beforeBody,y),b=p&&"right"!==x?"center"===f?d/2+1:d+2:0,s=0,c=g.length;s<c;++s){for(r=g[s],i=e.labelColors[s],n.fillStyle=a=e.labelTextColors[s],W.each(r.before,y),l=0,u=(o=r.lines).length;l<u;++l){if(p){var _=m.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(m.leftForLtr(_,d),t.y,d,d),n.lineWidth=1,n.strokeStyle=i.borderColor,n.strokeRect(m.leftForLtr(_,d),t.y,d,d),n.fillStyle=i.backgroundColor,n.fillRect(m.leftForLtr(m.xPlus(_,1),d-2),t.y+1,d-2,d-2),n.fillStyle=a}y(o[l])}W.each(r.after,y)}b=0,W.each(e.afterBody,y),t.y-=h},drawFooter:function(t,e,n){var r,a,i=e.footer,o=i.length;if(o){var s=Ce(e.rtl,e.x,e.width);for(t.x=Pe(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",r=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=W.fontString(r,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(i[a],s.x(t.x),t.y+r/2),t.y+=r+e.footerSpacing}},drawBackground:function(t,e,n,r){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,i=e.yAlign,o=t.x,s=t.y,l=r.width,c=r.height,u=e.cornerRadius;n.beginPath(),n.moveTo(o+u,s),"top"===i&&this.drawCaret(t,r),n.lineTo(o+l-u,s),n.quadraticCurveTo(o+l,s,o+l,s+u),"center"===i&&"right"===a&&this.drawCaret(t,r),n.lineTo(o+l,s+c-u),n.quadraticCurveTo(o+l,s+c,o+l-u,s+c),"bottom"===i&&this.drawCaret(t,r),n.lineTo(o+u,s+c),n.quadraticCurveTo(o,s+c,o,s+c-u),"center"===i&&"left"===a&&this.drawCaret(t,r),n.lineTo(o,s+u),n.quadraticCurveTo(o,s,o+u,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},r={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=a,this.drawBackground(r,e,t,n),r.y+=e.yPadding,W.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),W.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,r.mode,r),r.reverse&&n._active.reverse()),(e=!W.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}});Ie.positioners=Se;var ze=W.valueOrDefault;function Fe(){return W.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){if("xAxes"===t||"yAxes"===t){var a,i,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)i=ze((o=n[t][a]).type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),W.merge(e[t][a],!e[t][a].type||o.type&&o.type!==e[t][a].type?[ke.getScaleDefaults(i),o]:o)}else W._merger(t,e,n,r)}})}function Le(){return W.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){var a=e[t]||Object.create(null),i=n[t];"scales"===t?e[t]=Fe(a,i):"scale"===t?e[t]=W.merge(a,[ke.getScaleDefaults(i.type),i]):W._merger(t,e,n,r)}})}function je(t){var e=t.options;W.each(t.scales,function(e){le.removeBox(t,e)}),e=Le(j.global,j[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Re(t,e,n){var r,a=function(t){return t.id===r};do{r=e+n++}while(W.findIndex(t,a)>=0);return r}function Be(t){return"top"===t||"bottom"===t}function Ee(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}j._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 Ne=function(t,e){return this.construct(t,e),this};W.extend(Ne.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Le(j.global,j[t.type],t.options||{}),t}(e);var r=_e.acquireContext(t,e),a=r&&r.canvas,i=a&&a.height,o=a&&a.width;n.id=W.uid(),n.ctx=r,n.canvas=a,n.config=e,n.width=o,n.height=i,n.aspectRatio=i?o/i:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ne.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return we.notify(t,"beforeInit"),W.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),we.notify(t,"afterInit"),t},clear:function(){return W.canvas.clear(this),this},stop:function(){return G.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,r=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,i=Math.max(0,Math.floor(W.getMaximumWidth(r))),o=Math.max(0,Math.floor(a?i/a:W.getMaximumHeight(r)));
vendor: 15,411 bytes, line 1
1if((e.width!==i||e.height!==o)&&(r.width=e.width=i,r.height=e.height=o,r.style.width=i+"px",r.style.height=o+"px",W.retinaScale(e,n.devicePixelRatio),!t)){var s={width:i,height:o};we.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;W.each(e.xAxes,function(t,n){t.id||(t.id=Re(e.xAxes,"x-axis-",n))}),W.each(e.yAxes,function(t,n){t.id||(t.id=Re(e.yAxes,"y-axis-",n))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],a=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(r=r.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&r.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),W.each(r,function(e){var r=e.options,i=r.id,o=ze(r.type,e.dtype);Be(r.position)!==Be(e.dposition)&&(r.position=e.dposition),a[i]=!0;var s=null;if(i in n&&n[i].type===o)(s=n[i]).options=r,s.ctx=t.ctx,s.chart=t;else{var l=ke.getScaleConstructor(o);if(!l)return;s=new l({id:i,type:o,options:r,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),W.each(a,function(t,e){t||delete n[e]}),t.scales=n,ke.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,r=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var i=a[t],o=n.getDatasetMeta(t),s=i.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=i.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),r.push(o.controller)}}return r},resetElements:function(){var t=this;W.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,r=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),je(r),we._invalidate(r),!1!==we.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var a=r.buildOrUpdateControllers();for(e=0,n=r.data.datasets.length;e<n;e++)r.getDatasetMeta(e).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&W.each(a,function(t){t.reset()}),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],we.notify(r,"afterUpdate"),r._layers.sort(Ee("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var t=this;!1!==we.notify(t,"beforeLayout")&&(le.update(this,this.width,this.height),t._layers=[],W.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(t,e){t._idx=e}),we.notify(t,"afterScaleUpdate"),we.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==we.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);we.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),r={meta:n,index:t};!1!==we.notify(e,"beforeDatasetUpdate",[r])&&(n.controller._update(),we.notify(e,"afterDatasetUpdate",[r]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,r=ze(t.duration,n&&n.duration),a=t.lazy;if(!1!==we.notify(e,"beforeRender")){var i=function(t){we.notify(e,"afterRender"),W.callback(n&&n.onComplete,[t],e)};if(n&&r){var o=new X({numSteps:r/16.66,easing:t.easing||n.easing,render:function(t,e){var n=e.currentStep,r=n/e.numSteps;t.draw((0,W.easing.effects[e.easing])(r),r,n)},onAnimationProgress:n.onProgress,onAnimationComplete:i});G.addAnimation(e,o,r,a)}else e.draw(),i(new X({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,r=this;if(r.clear(),W.isNullOrUndef(t)&&(t=1),r.transition(t),!(r.width<=0||r.height<=0)&&!1!==we.notify(r,"beforeDraw",[t])){for(n=r._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(r.chartArea);for(r.drawDatasets(t);e<n.length;++e)n[e].draw(r.chartArea);r._drawTooltip(t),we.notify(r,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,r=(e.data.datasets||[]).length;n<r;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,r=this,a=[];for(e=0,n=(r.data.datasets||[]).length;e<n;++e)t&&!r.isDatasetVisible(e)||a.push(r.getDatasetMeta(e));return a.sort(Ee("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,r=this;if(!1!==we.notify(r,"beforeDatasetsDraw",[t])){for(n=(e=r._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)r.drawDataset(e[n],t);we.notify(r,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==we.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),we.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,r={tooltip:n,easingValue:t};!1!==we.notify(e,"beforeTooltipDraw",[r])&&(n.draw(),we.notify(e,"afterTooltipDraw",[r]))},getElementAtEvent:function(t){return Zt.modes.single(this,t)},getElementsAtEvent:function(t){return Zt.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Zt.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=Zt.modes[e];return"function"==typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return Zt.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var r=n._meta[e.id];return r||(r=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),r},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],r=n._meta&&n._meta[e];r&&(r.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,r=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);r&&(n.unbindEvents(),W.canvas.clear(n),_e.releaseContext(n.ctx),n.canvas=null,n.ctx=null),we.notify(n,"destroy"),delete Ne.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ie({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};W.each(t.options.events,function(r){_e.addEventListener(t,r,n),e[r]=n}),t.options.responsive&&(n=function(){t.resize()},_e.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,W.each(e,function(e,n){_e.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var r,a,i,o=n?"set":"remove";for(a=0,i=t.length;a<i;++a)(r=t[a])&&this.getDatasetMeta(r._datasetIndex).controller[o+"HoverStyle"](r);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==we.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var r=e.handleEvent(t);n&&(r=n._start?n.handleEvent(t):r|n.handleEvent(t)),we.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):r&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,r=n.options||{},a=r.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===t.type?[]:n.getElementsAtEventForMode(t,a.mode,a),W.callback(r.onHover||r.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||r.onClick&&r.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!W.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Ne.instances={};var We=Ne;function Ve(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function He(t){this.options=t||{}}Ne.Controller=Ne,Ne.types={},W.configMerge=Le,W.scaleMerge=Fe,W.extend(He.prototype,{formats:Ve,parse:Ve,format:Ve,add:Ve,diff:Ve,startOf:Ve,endOf:Ve,_create:function(t){return t}}),He.override=function(t){W.extend(He.prototype,t)};var Ue={_date:He},$e={formatters:{values:function(t){return W.isArray(t)?t:""+t},linear:function(t,e,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var a=W.log10(Math.abs(r)),i="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=W.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),i=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),i=t.toFixed(l)}else i="0";return i},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(W.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},qe=W.isArray,Ye=W.isNullOrUndef,Xe=W.valueOrDefault,Ge=W.valueAtIndexOrDefault;function Je(t,e,n){var r,a=t.getTicks().length,i=Math.min(e,a-1),o=t.getPixelForTick(i),s=t._startPixel,l=t._endPixel,c=1e-6;if(!(n&&(r=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(i-1))/2,(o+=i<e?r:-r)<s-c||o>l+c)))return o}function Ke(t){return t.drawTicks?t.tickMarkLength:0}function Ze(t){var e,n;return t.display?(e=W.options._parseFont(t),n=W.options.toPadding(t.padding),e.lineHeight+n.height):0}function Qe(t,e){return W.extend(W.options._parseFont({fontFamily:Xe(e.fontFamily,t.fontFamily),fontSize:Xe(e.fontSize,t.fontSize),fontStyle:Xe(e.fontStyle,t.fontStyle),lineHeight:Xe(e.lineHeight,t.lineHeight)}),{color:W.options.resolve([e.fontColor,t.fontColor,j.global.defaultFontColor])})}function tn(t){var e=Qe(t,t.minor);return{minor:e,major:t.major.enabled?Qe(t,t.major):e}}function en(t){var e,n,r,a=[];for(n=0,r=t.length;n<r;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function nn(t,e,n,r){var a,i,o,s,l=Xe(n,0),c=Math.min(Xe(r,t.length),t.length),u=0;for(e=Math.ceil(e),r&&(e=(a=r-n)/Math.floor(a/e)),s=l;s<0;)u++,s=Math.round(l+u*e);for(i=Math.max(l,0);i<c;i++)o=t[i],i===s?(o._index=i,u++,s=Math.round(l+u*e)):delete o.label}j._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:$e.formatters.values,minor:{},major:{}}});var rn=q.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){W.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var r,a,i,o,s,l=this,c=l.options.ticks,u=c.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=W.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],r=0,a=l.ticks.length;r<a;++r)o.push({value:l.ticks[r],major:!1});return l._ticks=o,i=l._convertTicksToLabels((s=u<o.length)?function(t,e){for(var n=[],r=t.length/e,a=0,i=t.length;a<i;a+=r)n.push(t[Math.floor(a)]);return n}(o,u):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=c.display&&(c.autoSkip||"auto"===c.source)?l._autoSkip(o):o,s&&(i=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=i,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,r=!r),n._startPixel=t,n._endPixel=e,n._reversePixels=r,n._length=e-t},afterUpdate:function(){W.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){W.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){W.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){W.callback(this.options.beforeDataLimits,[this])},determineDataLimits:W.noop,afterDataLimits:function(){W.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){W.callback(this.options.beforeBuildTicks,[this])},buildTicks:W.noop,afterBuildTicks:function(t){var e=this;return qe(t)&&t.length?W.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=W.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){W.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){W.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){W.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,r,a,i,o,s=this,l=s.options,c=l.ticks,u=s.getTicks().length,d=c.minRotation||0,h=c.maxRotation,f=d;!s._isVisible()||!c.display||d>=h||u<=1||!s.isHorizontal()?s.labelRotation=d:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/u:r/(u-1))&&(a=r/(u-(l.offset?.5:1)),i=s.maxHeight-Ke(l.gridLines)-c.padding-Ze(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=W.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(i/o,1))-Math.asin(n/o))),f=Math.max(d,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){W.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){W.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,a=r.ticks,i=r.scaleLabel,o=r.gridLines,s=t._isVisible(),l="bottom"===r.position,c=t.
1isHorizontal();if(c?e.width=t.maxWidth:s&&(e.width=Ke(o)+Ze(i)),c?s&&(e.height=Ke(o)+Ze(i)):e.height=t.maxHeight,a.display&&s){var u=tn(a),d=t._getLabelSizes(),h=d.first,f=d.last,g=d.widest,p=d.highest,b=.4*u.minor.lineHeight,v=a.padding;if(c){var m=0!==t.labelRotation,y=W.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y);e.height=Math.min(t.maxHeight,e.height+(_*g.width+x*(p.height-(m?p.offset:0))+(m?0:b))+v);var w,k,M=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);m?(w=l?x*h.width+_*h.offset:_*(h.height-h.offset),k=l?_*(f.height-f.offset):x*f.width+_*f.offset):(w=h.width/2,k=f.width/2),t.paddingLeft=Math.max((w-M)*t.width/(t.width-M),0)+3,t.paddingRight=Math.max((k-C)*t.width/(t.width-C),0)+3}else e.width=Math.min(t.maxWidth,e.width+(a.mirror?0:g.width+v+b)),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}t.handleMargins(),c?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){W.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(Ye(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,r,a=this;for(a.ticks=t.map(function(t){return t.value}),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,r=t.length;n<r;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=function(t,e,n,r){var a,i,o,s,l,c,u,d,h,f,g,p,b,v=n.length,m=[],y=[],x=[],_=0,w=0;for(a=0;a<v;++a){if(s=n[a].label,t.font=c=(l=n[a].major?e.major:e.minor).string,u=r[c]=r[c]||{data:{},gc:[]},d=l.lineHeight,h=f=0,Ye(s)||qe(s)){if(qe(s))for(i=0,o=s.length;i<o;++i)Ye(g=s[i])||qe(g)||(h=W.measureText(t,u.data,u.gc,h,g),f+=d)}else h=W.measureText(t,u.data,u.gc,h,s),f=d;m.push(h),y.push(f),x.push(d/2),_=Math.max(h,_),w=Math.max(f,w)}function k(t){return{width:m[t]||0,height:y[t]||0,offset:x[t]||0}}return function(t,e){W.each(t,function(t){var n,r=t.gc,a=r.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[r[n]];r.splice(0,a)}})}(r,v),p=m.indexOf(_),b=y.indexOf(w),{first:k(0),last:k(v-1),widest:k(p),highest:k(b)}}(t.ctx,tn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,r,a;return qe(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),r=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),r=t,a=t),{min:r,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:W.noop,getPixelForValue:W.noop,getValueForPixel:W.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,r=e._ticks.length,a=1/Math.max(r-(n?0:1),1);return t<0||t>r-1?null:e.getPixelForDecimal(t*a+(n?a/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,r,a,i=this,o=i.options.ticks,s=o.maxTicksLimit||i._length/i._tickSize()+1,l=o.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;e<n;e++)t[e].major&&r.push(e);return r}(t):[],c=l.length,u=l[0],d=l[c-1];if(c>s)return function(t,e,n){var r,a,i=0,o=e[0];for(n=Math.ceil(n),r=0;r<t.length;r++)a=t[r],r===o?(a._index=r,o=e[++i*n]):delete a.label}(t,l,c/s),en(t);if(r=function(t,e,n,r){var a,i,o,s,l=function(t){var e,n,r=t.length;if(r<2)return!1;for(n=t[0],e=1;e<r;++e)if(t[e]-t[e-1]!==n)return!1;return n}
1(t),c=(e.length-1)/r;if(!l)return Math.max(c,1);for(o=0,s=(a=W.math._factorize(l)).length-1;o<s;o++)if((i=a[o])>c)return i;return Math.max(c,1)}(l,t,0,s),c>0){for(e=0,n=c-1;e<n;e++)nn(t,r,l[e],l[e+1]);return nn(t,r,W.isNullOrUndef(a=c>1?(d-u)/(c-1):null)?0:u-a,u),nn(t,r,d,W.isNullOrUndef(a)?t.length:d+a),en(t)}return nn(t,r),en(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=W.toRadians(t.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),i=t._getLabelSizes(),o=e.autoSkipPadding||0,s=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return t.isHorizontal()?l*r>s*a?s/r:l/a:l*a<s*r?l/r:s/a},_isVisible:function(){var t,e,n,r=this,a=r.chart,i=r.options.display;if("auto"!==i)return!!i;for(t=0,e=a.data.datasets.length;t<e;++t)if(a.isDatasetVisible(t)&&((n=a.getDatasetMeta(t)).xAxisID===r.id||n.yAxisID===r.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,r,a,i,o,s,l,c,u,d,h,f,g,p,b,v,m=this,y=m.chart,x=m.options,_=x.gridLines,w=x.position,k=_.offsetGridLines,M=m.isHorizontal(),C=m._ticksToDraw,S=C.length+(k?1:0),A=Ke(_),D=[],O=_.drawBorder?Ge(_.lineWidth,0,0):0,P=O/2,T=W._alignPixel,I=function(t){return T(y,t,O)};for("top"===w?(e=I(m.bottom),s=m.bottom-A,c=e-P,d=I(t.top)+P,f=t.bottom):"bottom"===w?(e=I(m.top),d=t.top,f=I(t.bottom)-P,s=e+P,c=m.top+A):"left"===w?(e=I(m.right),o=m.right-A,l=e-P,u=I(t.left)+P,h=t.right):(e=I(m.left),u=t.left,h=I(t.right)-P,o=e+P,l=m.left+A),n=0;n<S;++n)Ye((r=C[n]||{}).label)&&n<C.length||(n===m.zeroLineIndex&&x.offset===k?(g=_.zeroLineWidth,p=_.zeroLineColor,b=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=Ge(_.lineWidth,n,1),p=Ge(_.color,n,"rgba(0,0,0,0.1)"),b=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=Je(m,r._index||n,k))&&(i=T(y,a,g),M?o=l=u=h=i:s=c=d=f=i,D.push({tx1:o,ty1:s,tx2:l,ty2:c,x1:u,y1:d,x2:h,y2:f,width:g,color:p,borderDash:b,borderDashOffset:v})));return D.ticksLength=S,D.borderValue=e,D},_computeLabelItems:function(){var t,e,n,r,a,i,o,s,l,c,u,d,h=this,f=h.options,g=f.ticks,p=f.position,b=g.mirror,v=h.isHorizontal(),m=h._ticksToDraw,y=tn(g),x=g.padding,_=Ke(f.gridLines),w=-W.toRadians(h.labelRotation),k=[];for("top"===p?(i=h.bottom-_-x,o=w?"left":"center"):"bottom"===p?(i=h.top+_+x,o=w?"right":"center"):"left"===p?(a=h.right-(b?0:_)-x,o=b?"left":"right"):(a=h.left+(b?0:_)+x,o=b?"right":"left"),t=0,e=m.length;t<e;++t)Ye(r=(n=m[t]).label)||(s=h.getPixelForTick(n._index||t)+g.labelOffset,c=(l=n.major?y.major:y.minor).lineHeight,u=qe(r)?r.length:1,v?(a=s,d="top"===p?((w?1:.5)-u)*c:(w?0:.5)*c):(i=s,d=(1-u)*c/2),k.push({x:a,y:i,rotation:w,label:r,font:l,textOffset:d,textAlign:o}));return k},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var r,a,i,o,s,l=e.ctx,c=e.chart,u=W._alignPixel,d=n.drawBorder?Ge(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(i=0,o=h.length;i<o;++i)a=(s=h[i]).color,(r=s.width)&&a&&(l.save(),l.lineWidth=r,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());
vendor: 9,794 bytes, line 1
1if(d){var f,g,p,b,v=d,m=Ge(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;e.isHorizontal()?(f=u(c,e.left,v)-v/2,g=u(c,e.right,m)+m/2,p=b=y):(p=u(c,e.top,v)-v/2,b=u(c,e.bottom,m)+m/2,f=g=y),l.lineWidth=d,l.strokeStyle=Ge(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,b),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,r,a,i,o,s,l,c=t.ctx,u=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,r=u.length;e<r;++e){if(o=(i=u[e]).font,c.save(),c.translate(i.x,i.y),c.rotate(i.rotation),c.font=o.string,c.fillStyle=o.color,c.textBaseline="middle",c.textAlign=i.textAlign,l=i.textOffset,qe(s=i.label))for(n=0,a=s.length;n<a;++n)c.fillText(""+s[n],0,l),l+=o.lineHeight;else c.fillText(s,0,l);c.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,r=n.scaleLabel;if(r.display){var a,i,o=Xe(r.fontColor,j.global.defaultFontColor),s=W.options._parseFont(r),l=W.options.toPadding(r.padding),c=s.lineHeight/2,u=n.position,d=0;if(t.isHorizontal())a=t.left+t.width/2,i="bottom"===u?t.bottom-c-l.bottom:t.top+c+l.top;else{var h="left"===u;a=h?t.left+c+l.top:t.right-c-l.top,i=t.top+t.height/2,d=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,i),e.rotate(d),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(r.labelString,0,0),e.restore()}},draw:function(t){var e=this;e._isVisible()&&(e._drawGrid(t),e._drawTitle(),e._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,r=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==r&&t.draw===t._draw?[{z:r,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter(function(r){return(!t||r.type===t)&&(n?r.xAxisID===e.id:r.yAxisID===e.id)})}});rn.prototype._draw=rn.prototype.draw;var an=rn,on=W.isNullOrUndef,sn=an.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),r=e.options.ticks,a=r.min,i=r.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==i&&(t=n.indexOf(i))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,r=t.maxIndex;t.ticks=0===n&&r===e.length-1?e:e.slice(n,r+1)},getLabelForIndex:function(t,e){var n=this,r=n.chart;return r.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;an.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var r,a,i,o=this;return on(e)||on(n)||(t=o.chart.data.datasets[n].data[e]),on(t)||(r=o.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=W.valueOrDefault(r,t),e=-1!==(i=a.indexOf(t))?i:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}});sn._defaults={position:"bottom"};var ln=W.isNullOrUndef,cn=an.extend({getRightValue:function(t){return"string"==typeof t?+t:an.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=W.sign(t.min),r=W.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,i=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),a!==i&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,r=n.stepSize,a=n.maxTicksLimit;return r?t=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:W.noop,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:W.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,r,a,i,o=[],s=t.stepSize,l=s||1,c=t.maxTicks-1,u=t.min,d=t.max,h=t.precision,f=e.min,g=e.max,p=W.niceNum((g-f)/c/l)*l;if(p<1e-14&&ln(u)&&ln(d))return[f,g];(i=Math.ceil(g/p)-Math.floor(f/p))>c&&(p=W.niceNum(i*p/c/l)*l),s||ln(h)?n=Math.pow(10,W._decimalPlaces(p)):(n=Math.pow(10,h),p=Math.ceil(p*n)/n),r=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!ln(u)&&W.almostWhole(u/p,p/1e3)&&(r=u),!ln(d)&&W.almostWhole(d/p,p/1e3)&&(a=d)),i=W.almostEquals(i=(a-r)/p,Math.round(i),p/1e3)?Math.round(i):Math.ceil(i),r=Math.round(r*n)/n,a=Math.round(a*n)/n,o.push(ln(u)?r:u);for(var b=1;b<i;++b)o.push(Math.round((r+b*p)*n)/n);return o.push(ln(d)?a:d),o}(r,t);t.handleDirectionalChanges(),t.max=W.max(a),t.min=W.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),an.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),r=e.min,a=e.max;an.prototype._configure.call(e),e.options.offset&&n.length&&(r-=t=(a-r)/Math.max(n.length-1,1)/2,a+=t),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),un={position:"left",ticks:{callback:$e.formatters.linear}};function dn(t,e,n,r){var a,i,o=t.options,s=function(t,e,n){var r=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[r]&&(t[r]={pos:[],neg:[]}),t[r]}(e,o.stacked,n),l=s.pos,c=s.neg,u=r.length;for(a=0;a<u;++a)i=t._parseValue(r[a]),isNaN(i.min)||isNaN(i.max)||n.data[a].hidden||(l[a]=l[a]||0,c[a]=c[a]||0,o.relativePoints?l[a]=100:i.min<0||i.max<0?c[a]+=i.min:l[a]+=i.max)}function hn(t,e,n){var r,a,i=n.length;for(r=0;r<i;++r)a=t._parseValue(n[r]),isNaN(a.min)||isNaN(a.max)||e.data[r].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var fn=cn.extend({determineDataLimits:function(){var t,e,n,r,a=this,i=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=i.stacked,c={},u=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<u;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<u;++t)n=o[(e=s[t]).index].data,l?dn(a,c,e,n):hn(a,e,n);W.each(c,function(t){r=t.pos.concat(t.neg),a.min=Math.min(a.min,W.min(r)),a.max=Math.max(a.max,W.max(r))}),a.min=W.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=W.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=W.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}});fn._defaults=un;var gn=W.valueOrDefault,pn=W.math.log10,bn={position:"left",ticks:{callback:$e.formatters.logarithmic}};function vn(t,e){return W.isFinite(t)&&t>=0?t:e}var mn=an.extend({determineDataLimits:function(){var t,e,n,r,a,i,o=this,s=o.options,l=o.chart,c=l.data.datasets,u=o.isHorizontal();function d(t){return u?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t<c.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e)&&void 0!==e.stack){h=!0;break}if(s.stacked||h){var f={};for(t=0;t<c.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&d(e))for(void 0===f[g]&&(f[g]=[]),a=0,i=(r=c[t].data).length;a<i;a++){var p=f[g];n=o._parseValue(r[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}W.each(f,function(t){if(t.length>0){var e=W.min(t),n=W.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}})}else for(t=0;t<c.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e))for(a=0,i=(r=c[t].data).length;a<i;a++)n=o._parseValue(r[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=W.isFinite(o.min)?o.min:null,o.max=W.isFinite(o.max)?o.max:null,o.minNotZero=W.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=vn(e.min,t.min),t.max=vn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(pn(t.min))-1),t.max=Math.pow(10,Math.floor(pn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(pn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(pn(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(pn(t.max))):1)}
vendor: 5,794 bytes, line 1
1,buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:vn(e.min),max:vn(e.max)},a=t.ticks=function(t,e){var n,r,a=[],i=gn(t.min,Math.pow(10,Math.floor(pn(e.min)))),o=Math.floor(pn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===i?(n=Math.floor(pn(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(i),i=r*Math.pow(10,n)):(n=Math.floor(pn(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(n<o||n===o&&r<s);var c=gn(t.max,i);return a.push(c),a}(r,t);t.max=W.max(a),t.min=W.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),an.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(pn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;an.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=gn(t.options.ticks.fontSize,j.global.defaultFontSize)/t._length),t._startValue=pn(e),t._valueOffset=n,t._valueRange=(pn(t.max)-pn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(pn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}});mn._defaults=bn;var yn=W.valueOrDefault,xn=W.valueAtIndexOrDefault,_n=W.options.resolve,wn={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:$e.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function kn(t){var e=t.ticks;return e.display&&t.display?yn(e.fontSize,j.global.defaultFontSize)+2*e.backdropPaddingY:0}function Mn(t,e,n,r,a){return t===r||t===a?{start:e-n/2,end:e+n/2}:t<r||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Cn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Sn(t,e,n,r){var a,i,o=n.y+r/2;if(W.isArray(e))for(a=0,i=e.length;a<i;++a)t.fillText(e[a],n.x,o),o+=r;else t.fillText(e,n.x,o)}function An(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Dn(t){return W.isNumber(t)?t:0}var On=cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=kn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;W.each(e.data.datasets,function(a,i){if(e.isDatasetVisible(i)){var o=e.getDatasetMeta(i);W.each(a.data,function(e,a){var i=+t.getRightValue(e);isNaN(i)||o.data[a].hidden||(n=Math.min(i,n),r=Math.max(i,r))})}}),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=r===Number.NEGATIVE_INFINITY?0:r,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/kn(this.options))},convertTicksToLabels:function(){var t=this;cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=W.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,r,a=W.options._parseFont(t.options.pointLabels),i={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,c,u=t.chart.data.labels.length;for(e=0;e<u;e++){r=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,n=W.isArray(c=t.pointLabels[e])?{w:W.longestText(s,s.font,c),h:c.length*l}:{w:s.measureText(c).width,h:l},t._pointLabelSizes[e]=n;var d=t.getIndexAngle(e),h=W.toDegrees(d)%360,f=Mn(h,r.x,n.w,0,180),g=Mn(h,r.y,n.h,90,270);f.start<i.l&&(i.l=f.start,o.l=d),f.end>i.r&&(i.r=f.end,o.r=d),g.start<i.t&&(i.t=g.start,o.t=d),g.end>i.b&&(i.b=g.end,o.b=d)}t.setReductions(t.drawingArea,i,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var r=this,a=e.l/Math.sin(n.l),i=Math.max(e.r-r.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);a=Dn(a),i=Dn(i),o=Dn(o),s=Dn(s),r.drawingArea=Math.min(Math.floor(t-(a+i)/2),Math.floor(t-(o+s)/2)),r.setCenterPoint(a,i,o,s)},setCenterPoint:function(t,e,n,r){var a=this,i=n+a.drawingArea,o=a.height-a.paddingTop-r-a.drawingArea;a.xCenter=Math.floor((t+a.drawingArea+(a.width-e-a.drawingArea))/2+a.left),a.yCenter=Math.floor((i+o)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(W.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,r=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(r)*e+n.xCenter,y:Math.sin(r)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,r=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&r<0?r:n>0&&r>0?n:0)}
1,_drawGrid:function(){var t,e,n,r=this,a=r.ctx,i=r.options,o=i.gridLines,s=i.angleLines,l=yn(s.lineWidth,o.lineWidth),c=yn(s.color,o.color);if(i.pointLabels.display&&function(t){var e=t.ctx,n=t.options,r=n.pointLabels,a=kn(n),i=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=W.options._parseFont(r);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=t.getPointPosition(s,i+(0===s?a/2:0)+5),c=xn(r.fontColor,s,j.global.defaultFontColor);e.fillStyle=c;var u=t.getIndexAngle(s),d=W.toDegrees(u);e.textAlign=Cn(d),An(d,t._pointLabelSizes[s],l),Sn(e,t.pointLabels[s],l,o.lineHeight)}e.restore()}(r),o.display&&W.each(r.ticks,function(t,n){0!==n&&(e=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(t,e,n,r){var a,i=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=xn(e.color,r-1),c=xn(e.lineWidth,r-1);if((o||s)&&l&&c){if(i.save(),i.strokeStyle=l,i.lineWidth=c,i.setLineDash&&(i.setLineDash(e.borderDash||[]),i.lineDashOffset=e.borderDashOffset||0),i.beginPath(),o)i.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),i.moveTo(a.x,a.y);for(var u=1;u<s;u++)a=t.getPointPosition(u,n),i.lineTo(a.x,a.y)}i.closePath(),i.stroke(),i.restore()}}(r,o,e,n))}),s.display&&l&&c){for(a.save(),a.lineWidth=l,a.strokeStyle=c,a.setLineDash&&(a.setLineDash(_n([s.borderDash,o.borderDash,[]])),a.lineDashOffset=_n([s.borderDashOffset,o.borderDashOffset,0])),t=r.chart.data.labels.length-1;t>=0;t--)e=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),a.beginPath(),a.moveTo(r.xCenter,r.yCenter),a.lineTo(n.x,n.y),a.stroke();
1a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,a,i=t.getIndexAngle(0),o=W.options._parseFont(n),s=yn(n.fontColor,j.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",W.each(t.ticks,function(i,l){(0!==l||n.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(i).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-r-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(i,0,-r))}),e.restore()}},_drawTitle:W.noop});On._defaults=wn;var Pn=W._deprecated,Tn=W.options.resolve,In=W.valueOrDefault,zn=Number.MIN_SAFE_INTEGER||-9007199254740991,Fn=Number.MAX_SAFE_INTEGER||9007199254740991,Ln={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}},jn=Object.keys(Ln);function Rn(t,e){return t-e}function Bn(t){return W.valueOrDefault(t.time.min,t.ticks.min)}function En(t){return W.valueOrDefault(t.time.max,t.ticks.max)}function Nn(t,e,n,r){var a=function(t,e,n){for(var r,a,i,o=0,s=t.length-1;o>=0&&o<=s;){if(i=t[r=o+s>>1],!(a=t[r-1]||null))return{lo:null,hi:i};if(i[e]<n)o=r+1;else{if(!(a[e]>n))return{lo:a,hi:i};s=r-1}}return{lo:i,hi:null}}(t,e,n),i=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-i[e];return i[r]+(o[r]-i[r])*(s?(n-i[e])/s:0)}function Wn(t,e){var n=t._adapter,r=t.options.time,a=r.parser,i=a||r.format,o=e;return"function"==typeof a&&(o=a(o)),W.isFinite(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null!==o?+o:(a||"function"!=typeof i||(o=i(e),W.isFinite(o)||(o=n.parse(o))),o)}function Vn(t,e){if(W.isNullOrUndef(e))return null;var n=t.options.time,r=Wn(t,t.getRightValue(e));return null===r||n.round&&(r=+t._adapter.startOf(r,n.round)),r}function Hn(t,e,n,r){var a,i,o=jn.length;for(a=jn.indexOf(t);a<o-1;++a)if((i=Ln[jn[a]]).common&&Math.ceil((n-e)/((i.steps?i.steps:Fn)*i.size))<=r)return jn[a];return jn[o-1]}function Un(t,e,n){var r,a,i=[],o={},s=e.length;for(r=0;r<s;++r)o[a=e[r]]=r,i.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,r){var a,i,o=t._adapter,s=+o.startOf(e[0].value,r),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,r))(i=n[a])>=0&&(e[i].major=!0);return e}(t,i,o,n):i}var $n=an.extend({initialize:function(){this.mergeTicksOptions(),an.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),r=t._adapter=new Ue._date(e.adapters.date);return Pn("time scale",n.format,"time.format","time.parser"),Pn("time scale",n.min,"time.min","ticks.min"),Pn("time scale",n.max,"time.max","ticks.max"),W.mergeIf(n.displayFormats,r.formats()),an.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),an.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,r,a,i,o,s=this,l=s.chart,c=s._adapter,u=s.options,d=u.time.unit||"day",h=Fn,f=zn,g=[],p=[],b=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)b.push(Vn(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(W.isObject((a=l.data.datasets[t].data)[0]))for(p[t]=[],e=0,r=a.length;e<r;++e)i=Vn(s,a[e]),g.push(i),p[t][e]=i;else p[t]=b.slice(0),o||(g=g.concat(b),o=!0);else p[t]=[];b.length&&(h=Math.min(h,b[0]),f=Math.max(f,b[b.length-1])),g.length&&(g=n>1?function(t){var e,n,r,a={},i=[];for(e=0,n=t.length;e<n;++e)a[r=t[e]]||(a[r]=!0,i.push(r));return i}(g).sort(Rn):g.sort(Rn),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=Vn(s,Bn(u))||h,f=Vn(s,En(u))||f,h=h===Fn?+c.startOf(Date.now(),d):h,f=f===zn?+c.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:b}},buildTicks:function(){var t,e,n,r=this,a=r.min,i=r.max,o=r.options,s=o.ticks,l=o.time,c=r._timestamps,u=[],d=r.getLabelCapacity(a),h=s.source,f=o.distribution;for(c="data"===h||"auto"===h&&"series"===f?c.data:"labels"===h?c.labels:function(t,e,n,r){var a,i=t._adapter,o=t.options,s=o.time,l=s.unit||Hn(s.minUnit,e,n,r),c=Tn([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,d=e,h=[];if(u&&(d=+i.startOf(d,"isoWeek",u)),d=+i.startOf(d,u?"day":l),i.diff(n,e,l)>1e5*c)throw e+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(a=d;a<n;a=+i.add(a,c,l))h.push(a);return a!==n&&"ticks"!==o.bounds||h.push(a),h}(r,a,i,d),"ticks"===o.bounds&&c.length&&(a=c[0],i=c[c.length-1]),a=Vn(r,Bn(o))||a,i=Vn(r,
vendor: 5,923 bytes, line 1
1En(o))||i,t=0,e=c.length;t<e;++t)(n=c[t])>=a&&n<=i&&u.push(n);return r.min=a,r.max=i,r._unit=l.unit||(s.autoSkip?Hn(l.minUnit,r.min,r.max,d):function(t,e,n,r,a){var i,o;for(i=jn.length-1;i>=jn.indexOf(n);i--)if(Ln[o=jn[i]].common&&t._adapter.diff(a,r,o)>=e-1)return o;return jn[n?jn.indexOf(n):0]}(r,u.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(t){for(var e=jn.indexOf(t)+1,n=jn.length;e<n;++e)if(Ln[jn[e]].common)return jn[e]}(r._unit):void 0,r._table=function(t,e,n,r){if("linear"===r||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,i,o,s,l,c=[],u=[e];for(a=0,i=t.length;a<i;++a)(s=t[a])>e&&s<n&&u.push(s);for(u.push(n),a=0,i=u.length;a<i;++a)l=u[a+1],s=u[a],void 0!==(o=u[a-1])&&void 0!==l&&Math.round((l+o)/2)===s||c.push({time:s,pos:a/(i-1)});return c}(r._timestamps.data,a,i,f),r._offsets=function(t,e,n,r,a){var i,o,s=0,l=0;return a.offset&&e.length&&(i=Nn(t,"time",e[0],"pos"),s=1===e.length?1-i:(Nn(t,"time",e[1],"pos")-i)/2,o=Nn(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-Nn(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,u,0,0,o),s.reverse&&u.reverse(),Un(r,u,r._majorUnit)},getLabelForIndex:function(t,e){var n=this,r=n._adapter,a=n.chart.data,i=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return W.isObject(s)&&(o=n.getRightValue(s)),i.tooltipFormat?r.format(Wn(n,o),i.tooltipFormat):"string"==typeof o?o:r.format(Wn(n,o),i.displayFormats.datetime)},tickFormatFunction:function(t,e,n,r){var a=this,i=a.options,o=i.time.displayFormats,s=a._majorUnit,l=o[s],c=n[e],u=i.ticks,d=s&&l&&c&&c.major,h=a._adapter.format(t,r||(d?l:o[a._unit])),f=d?u.major:u.minor,g=Tn([f.callback,f.userCallback,u.callback,u.userCallback]);return g?g(h,e,n):h},convertTicksToLabels:function(t){var e,n,r=[];for(e=0,n=t.length;e<n;++e)r.push(this.tickFormatFunction(t[e].value,e,t));return r},getPixelForOffset:function(t){var e=this,n=e._offsets,r=Nn(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+r)*n.factor)},getPixelForValue:function(t,e,n){var r=this,a=null;if(void 0!==e&&void 0!==n&&(a=r._timestamps.datasets[n][e]),null===a&&(a=Vn(r,t)),null!==a)return r.getPixelForOffset(a)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._offsets,r=e.getDecimalForPixel(t)/n.factor-n.end,a=Nn(e._table,"pos",r,"time");return e._adapter._create(a)},_getLabelSize:function(t){var e=this,n=e.options.ticks,r=e.ctx.measureText(t).width,a=W.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(a),o=Math.sin(a),s=In(n.fontSize,j.global.defaultFontSize);return{w:r*i+s*o,h:r*o+s*i}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,i=e.tickFormatFunction(t,0,Un(e,[t],e._majorUnit),a),o=e._getLabelSize(i),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}});$n._defaults={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}}};var qn={category:sn,linear:fn,logarithmic:mn,radialLinear:On,time:$n},Yn={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"};Ue._date.override("function"==typeof t?{_id:"moment",formats:function(){return Yn},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,r){return t(e).add(n,r).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(e,n,r){return e=t(e),"isoWeek"===n?e.isoWeekday(r).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var Xn={dataset:function(t){var e=t.fill,n=t.chart,r=n.getDatasetMeta(e),a=r&&n.isDatasetVisible(e)&&r.dataset._children||[],i=a.length||0;return i?function(t,e){return e<i&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,r=e?e.y:null;return W.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===r?t.y:r}}}};function Gn(t,e,n){var r,a=t._model||{},i=a.fill;if(void 0===i&&(i=!!a.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(r=parseFloat(i,10),isFinite(r)&&Math.floor(r)===r)return"-"!==i[0]&&"+"!==i[0]||(r=e+r),!(r===e||r<0||r>=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 Jn(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,r,a,i,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,c=t.fill,u=[];if(!l)return null;for(n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,e=s.ticks.reverse?o.max:o.min),a=0;a<l;++a)i="start"===c||"end"===c?o.getPointPositionForValue(a,"start"===c?e:n):o.getBasePosition(a),s.gridLines.circular&&(i.cx=r.x,i.cy=r.y,i.angle=o.getIndexAngle(a)-Math.PI/2),u.push(i);return u}(t):function(t){var e,n=t.el._model||{},r=t.el._scale||{},a=t.fill,i=null;if(isFinite(a))return null;if("start"===a?i=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===a?i=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:r.getBasePixel&&(i=r.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if(W.isFinite(i))return{x:(e=r.isHorizontal())?i:null,y:e?null:i}}return null}(t)}function Kn(t,e,n){var r,a=t[e].fill,i=[e];if(!n)return a;for(;!1!==a&&-1===i.indexOf(a);){if(!isFinite(a))return a;
vendor: 4,516 bytes, line 1
1if(!(r=t[a]))return!1;if(r.visible)return a;i.push(a),a=r.fill}return!1}function Zn(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),Xn[n](t))}function Qn(t){return t&&!t.skip}function tr(t,e,n,r,a){var i,o,s,l;if(r&&a){for(t.moveTo(e[0].x,e[0].y),i=1;i<r;++i)W.canvas.lineTo(t,e[i-1],e[i]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),i=a-1;i>0;--i)W.canvas.lineTo(t,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)t.arc(o,s,l,n[i].angle,n[i-1].angle,!0)}}function er(t,e,n,r,a,i){var o,s,l,c,u,d,h,f,g=e.length,p=r.spanGaps,b=[],v=[],m=0,y=0;for(t.beginPath(),o=0,s=g;o<s;++o)u=n(c=e[l=o%g]._view,l,r),d=Qn(c),h=Qn(u),i&&void 0===f&&d&&(s=g+(f=o+1)),d&&h?(m=b.push(c),y=v.push(u)):m&&y&&(p?(d&&b.push(c),h&&v.push(u)):(tr(t,b,v,m,y),m=y=0,b=[],v=[]));tr(t,b,v,m,y),t.closePath(),t.fillStyle=a,t.fill()}var nr={id:"filler",afterDatasetsUpdate:function(t,e){var n,r,a,i,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(r=0;r<o;++r)i=null,(a=(n=t.getDatasetMeta(r)).dataset)&&a._model&&a instanceof vt.Line&&(i={visible:t.isDatasetVisible(r),fill:Gn(a,r,o),chart:t,el:a}),n.$filler=i,l.push(i);for(r=0;r<o;++r)(i=l[r])&&(i.fill=Kn(l,r,s),i.boundary=Jn(i),i.mapper=Zn(i))},beforeDatasetsDraw:function(t){var e,n,r,a,i,o,s,l=t._getSortedVisibleDatasetMetas(),c=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(i=(r=e.el)._children||[],s=(a=r._view).backgroundColor||j.global.defaultColor,(o=e.mapper)&&s&&i.length&&(W.canvas.clipArea(c,t.chartArea),er(c,i,o,a,s,r._loop),W.canvas.unclipArea(c)))}},rr=W.rtl.getRtlAdapter,ar=W.noop,ir=W.valueOrDefault;function or(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}j._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.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(t){var e=t.data.datasets,n=t.options.legend||{},r=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(n){var a=n.controller.getStyle(r?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.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(t){var e,n,r,a=document.createElement("ul"),i=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=i.length;e<n;e++)(r=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[e].backgroundColor,i[e].label&&r.appendChild(document.createTextNode(i[e].label));return a.outerHTML}});var sr=q.extend({initialize:function(t){var e=this;W.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:ar,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,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:ar,beforeSetDimensions:ar,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ar,beforeBuildLabels:ar,buildLabels:function(){var t=this,e=t.options.labels||{},n=W.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:ar,beforeFit:ar,fit:function(){var t=this,e=t.options,n=e.labels,r=e.display,a=t.ctx,i=W.options._parseFont(n),o=i.size,s=t.legendHitBoxes=[],l=t.minSize,c=t.isHorizontal();if(c?(l.width=t.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=t.maxHeight),r){if(a.font=i.string,c){var u=t.lineWidths=[0],d=0;a.textAlign="left",a.textBaseline="middle",W.each(t.legendItems,function(t,e){var r=or(n,o)+o/2+a.measureText(t.text).width;(0===e||u[u.length-1]+r+2*n.padding>l.width)&&(d+=o+n.padding,u[u.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:r,height:o},u[u.length-1]+=r+n.padding}),l.height+=d}
1else{var h=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,b=0,v=0;W.each(t.legendItems,function(t,e){var r=or(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*h>l.height&&(p+=b+n.padding,f.push(b),g.push(v),b=0,v=0),b=Math.max(b,r),v+=o+h,s[e]={left:0,top:0,width:r,height:o}}),p+=b,f.push(b),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:ar,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=j.global,a=r.defaultColor,i=r.elements.line,o=t.height,s=t.columnHeights,l=t.width,c=t.lineWidths;if(e.display){var u,d=rr(e.rtl,t.left,t.minSize.width),h=t.ctx,f=ir(n.fontColor,r.defaultFontColor),g=W.options._parseFont(n),p=g.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=g.string;var b=or(n,p),v=t.legendHitBoxes,m=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},y=t.isHorizontal();u=y?{x:t.left+m(l,c[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+m(o,s[0]),line:0},W.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=p+n.padding;W.each(t.legendItems,function(e,r){var f=h.measureText(e.text).width,g=b+p/2+f,_=u.x,w=u.y;d.setWidth(t.minSize.width),y?r>0&&_+g+n.padding>t.left+t.minSize.width&&(w=u.y+=x,u.line++,_=u.x=t.left+m(l,c[u.line])):r>0&&w+x>t.top+t.minSize.height&&(_=u.x=_+t.columnWidths[u.line]+n.padding,u.line++,w=u.y=t.top+m(o,s[u.line]));var k=d.x(_);(function(t,e,r){if(!(isNaN(b)||b<=0)){h.save();var o=ir(r.lineWidth,i.borderWidth);if(h.fillStyle=ir(r.fillStyle,a),h.lineCap=ir(r.lineCap,i.borderCapStyle),h.lineDashOffset=ir(r.lineDashOffset,i.borderDashOffset),h.lineJoin=ir(r.lineJoin,i.borderJoinStyle),h.lineWidth=o,h.strokeStyle=ir(r.strokeStyle,a),h.setLineDash&&h.setLineDash(ir(r.lineDash,i.borderDash)),n&&n.usePointStyle){var s=b*Math.SQRT2/2,l=d.xPlus(t,b/2);W.canvas.drawPoint(h,r.pointStyle,s,l,e+p/2,r.rotation)}else h.fillRect(d.leftForLtr(t,b),e,b,p),0!==o&&h.strokeRect(d.leftForLtr(t,b),e,b,p);h.restore()}})(k,w,e),v[r].left=d.leftForLtr(k,v[r].width),v[r].top=w,function(t,e,n,r){var a=p/2,i=d.xPlus(t,b+a),o=e+a;h.fillText(n.text,i,o),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(i,o),h.lineTo(d.xPlus(i,r),o),h.stroke())}(k,w,e,f),y?u.x+=g+n.padding:u.y+=x}),W.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,r,a,i=this;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(a=i.legendHitBoxes,n=0;n<a.length;++n)if(t>
vendor: 4,288 bytes, line 1
1=(r=a[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return i.legendItems[n];return null},handleEvent:function(t){var e,n=this,r=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&r.onClick&&r.onClick.call(n,t.native,e):(r.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),r.onHover&&e&&r.onHover.call(n,t.native,e))}});function lr(t,e){var n=new sr({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.legend=n}var cr={id:"legend",_element:sr,beforeInit:function(t){var e=t.options.legend;e&&lr(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(W.mergeIf(e,j.global.legend),n?(le.configure(t,n,e),n.options=e):lr(t,e)):n&&(le.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},ur=W.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var dr=q.extend({initialize:function(t){W.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:ur,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,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:ur,beforeSetDimensions:ur,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ur,beforeBuildLabels:ur,buildLabels:ur,afterBuildLabels:ur,beforeFit:ur,fit:function(){var t,e=this,n=e.options,r=e.minSize={},a=e.isHorizontal();n.display?(t=(W.isArray(n.text)?n.text.length:1)*W.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=a?e.maxWidth:t,e.height=r.height=a?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:ur,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r,a,i,o=W.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,c=0,u=t.top,d=t.left,h=t.bottom,f=t.right;e.fillStyle=W.valueOrDefault(n.fontColor,j.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=d+(f-d)/2,i=u+l,r=f-d):(a="left"===n.position?d+l:f-l,i=u+(h-u)/2,r=h-u,c=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,i),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(W.isArray(g))for(var p=0,b=0;b<g.length;++b)e.fillText(g[b],0,p,r),p+=s;else e.fillText(g,0,0,r);e.restore()}}});function hr(t,e){var n=new dr({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.titleBlock=n}var fr={},gr=nr,pr=cr,br={id:"title",_element:dr,beforeInit:function(t){var e=t.options.title;e&&hr(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(W.mergeIf(e,j.global.title),n?(le.configure(t,n,e),n.options=e):hr(t,e)):n&&(le.removeBox(t,n),delete t.titleBlock)}};for(var vr in fr.filler=gr,fr.legend=pr,fr.title=br,We.helpers=W,function(){function t(t,e,n){var r;return"string"==typeof t?(r=parseInt(t,10),-1!==t.indexOf("%")&&(r=r/100*e.parentNode[n])):r=t,r}function e(t){return null!=t&&"none"!==t}function n(n,r,a){var i=document.defaultView,o=W._getParentNode(n),s=i.getComputedStyle(n)[r],l=i.getComputedStyle(o)[r],c=e(s),u=e(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?t(s,n,a):d,u?t(l,o,a):d):"none"}W.where=function(t,e){if(W.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return W.each(t,function(t){e(t)&&n.push(t)}),n},W.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var r=0,a=t.length;r<a;++r)if(e.call(n,t[r],r,t))return r;return-1},W.findNextWhere=function(t,e,n){W.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<t.length;r++){var a=t[r];if(e(a))return a}},W.findPreviousWhere=function(t,e,n){W.isNullOrUndef(n)&&(n=t.length);for(var r=n-1;r>=0;r--){var a=t[r];if(e(a))return a}},W.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)}
vendor: 5,429 bytes, line 1
1,W.almostEquals=function(t,e,n){return Math.abs(t-e)<n},W.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},W.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},W.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},W.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},W.toRadians=function(t){return t*(Math.PI/180)},W.toDegrees=function(t){return t*(180/Math.PI)},W._decimalPlaces=function(t){if(W.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},W.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.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}},W.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},W.aliasPixel=function(t){return t%2==0?0:.5},W._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*r)/r+a},W.splineCurve=function(t,e,n,r){var a=t.skip?e:t,i=e,o=n.skip?e: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)),c=s/(s+l),u=l/(s+l),d=r*(c=isNaN(c)?0:c),h=r*(u=isNaN(u)?0:u);return{previous:{x:i.x-d*(o.x-a.x),y:i.y-d*(o.y-a.y)},next:{x:i.x+h*(o.x-a.x),y:i.y+h*(o.y-a.y)}}},W.EPSILON=Number.EPSILON||1e-14,W.splineCurveMonotone=function(t){var e,n,r,a,i,o,s,l,c,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),d=u.length;for(e=0;e<d;++e)if(!(r=u[e]).model.skip){if(n=e>0?u[e-1]:null,(a=e<d-1?u[e+1]:null)&&!a.model.skip){var h=a.model.x-r.model.x;r.deltaK=0!==h?(a.model.y-r.model.y)/h:0}r.mK=!n||n.model.skip?r.deltaK:!a||a.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?0:(n.deltaK+r.deltaK)/2}for(e=0;e<d-1;++e)a=u[e+1],(r=u[e]).model.skip||a.model.skip||(W.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=a.mK=0:(i=r.mK/r.deltaK,o=a.mK/r.deltaK,(l=Math.pow(i,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),r.mK=i*s*r.deltaK,a.mK=o*s*r.deltaK)));for(e=0;e<d;++e)(r=u[e]).model.skip||(a=e<d-1?u[e+1]:null,(n=e>0?u[e-1]:null)&&!n.model.skip&&(r.model.controlPointPreviousX=r.model.x-(c=(r.model.x-n.model.x)/3),r.model.controlPointPreviousY=r.model.y-c*r.mK),a&&!a.model.skip&&(r.model.controlPointNextX=r.model.x+(c=(a.model.x-r.model.x)/3),r.model.controlPointNextY=r.model.y+c*r.mK))},W.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},W.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},W.niceNum=function(t,e){var n=Math.floor(W.log10(t)),r=t/Math.pow(10,n);return(e?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)},W.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},W.getRelativePosition=function(t,e){var n,r,a=t.originalEvent||t,i=t.target||t.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(W.getStyle(i,"padding-left")),c=parseFloat(W.getStyle(i,"padding-top")),u=parseFloat(W.getStyle(i,"padding-right")),d=parseFloat(W.getStyle(i,"padding-bottom")),h=o.bottom-o.top-c-d;return{x:n=Math.round((n-o.left-l)/(o.right-o.left-l-u)*i.width/e.currentDevicePixelRatio),y:r=Math.round((r-o.top-c)/h*i.height/e.currentDevicePixelRatio)}},W.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},W.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},W._calculatePadding=function(t,e,n){return(e=W.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},W._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},W.getMaximumWidth=function(t){var e=W._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-W._calculatePadding(e,"padding-left",n)-W._calculatePadding(e,"padding-right",n),a=W.getConstraintWidth(t);return isNaN(a)?r:Math.min(r,a)},W.getMaximumHeight=function(t){var e=W._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-W._calculatePadding(e,"padding-top",n)-W._calculatePadding(e,"padding-bottom",n),a=W.getConstraintHeight(t);return isNaN(a)?r:Math.min(r,a)},W.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},W.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=t.canvas,a=t.height,i=t.width;r.height=a*n,r.width=i*n,t.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=a+"px",r.style.width=i+"px")}},W.fontString=function(t,e,n){return e+" "+t+"px "+n},W.longestText=function(t,e,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(a=r.data={},i=r.garbageCollect=[],r.font=e),t.font=e;var o,s,l,c,u,d=0,h=n.length;for(o=0;o<h;o++)if(null!=(c=n[o])&&!0!==W.isArray(c))d=W.measureText(t,a,i,d,c);else if(W.isArray(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||W.isArray(u)||(d=W.measureText(t,a,i,d,u));var f=i.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[i[o]];i.splice(0,f)}return d},W.measureText=function(t,e,n,r,a){var i=e[a];
1return i||(i=e[a]=t.measureText(a).width,n.push(a)),i>r&&(r=i),r},W.numberOfLabelLines=function(t){var e=1;return W.each(t,function(t){W.isArray(t)&&t.length>e&&(e=t.length)}),e},W.color=x?function(t){return t instanceof CanvasGradient&&(t=j.global.defaultColor),x(t)}:function(t){return console.error("Color.js not found!"),t},W.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:W.color(t).saturate(.5).darken(.1).rgbString()}}(),We._adapters=Ue,We.Animation=X,We.animationService=G,We.controllers=$t,We.DatasetController=tt,We.defaults=j,We.Element=q,We.elements=vt,We.Interaction=Zt,We.layouts=le,We.platform=_e,We.plugins=we,We.Scale=an,We.scaleService=ke,We.Ticks=$e,We.Tooltip=Ie,We.helpers.each(qn,function(t,e){We.scaleService.registerScaleType(e,t,t._defaults)}),fr)fr.hasOwnProperty(vr)&&We.plugins.register(fr[vr]);We.platform.initialize();var mr=We;return"undefined"!=typeof window&&(window.Chart=We),We.Chart=We,We.Legend=fr.legend._element,We.Title=fr.title._element,We.pluginService=We.plugins,We.PluginBase=We.Element.extend({}),We.canvasHelpers=We.helpers.canvas,We.layoutService=We.layouts,We.LinearScaleBase=cn,We.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){We[t]=function(e,n){return new We(e,We.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),mr}(function(){try{return n("wd/R")}catch(t){}}())},WOAq:function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),a=n("L3Qv"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i?r.a.Buffer:void 0;e.a=(s?s.isBuffer:void 0)||a.a}).call(this,n("3UD+")(t))},XqMk:function(t,e,n){"use strict";var r="object"==typeof global&&global&&global.Object===Object&&global;e.a=r},qb46:function(t,e,n){t.exports=function(t){"use strict";var e=(t=t&&t.hasOwnProperty("default")?t.default:t).helpers,n=function(){if("undefined"!=typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),r={toTextLines:function(t){var n,r=[];for(t=[].concat(t);t.length;)"string"==typeof(n=t.pop())?r.unshift.apply(r,n.split("\n")):Array.isArray(n)?t.push.apply(t,n):e.isNullOrUndef(t)||r.unshift(""+n);return r},toFontString:function(t){return!t||e.isNullOrUndef(t.size)||e.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family},textSize:function(t,e,n){var r,a=[].concat(e),i=a.length,o=t.font,s=0;for(t.font=n.string,r=0;r<i;++r)s=Math.max(t.measureText(a[r]).width,s);return t.font=o,{height:i*n.lineHeight,width:s}},parseFont:function(n){var a=t.defaults.global,i=e.valueOrDefault(n.size,a.defaultFontSize),o={family:e.valueOrDefault(n.family,a.defaultFontFamily),lineHeight:e.options.toLineHeight(n.lineHeight,i),size:i,style:e.valueOrDefault(n.style,a.defaultFontStyle),weight:e.valueOrDefault(n.weight,null),string:""};return o.string=r.toFontString(o),o},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n,r,a,i,o=t.slice(),s=[];for(n=0,a=e.length;n<a;++n)-1===(r=o.indexOf(i=e[n]))?s.push([i,1]):o.splice(r,1);for(n=0,a=o.length;n<a;++n)s.push([o[n],-1]);return s},rasterize:function(t){return Math.round(t*n)/n}};function a(t,e){var n=e.x,r=e.y;if(null===n)return{x:0,y:-1};if(null===r)return{x:1,y:0};var a=t.x-n,i=t.y-r,o=Math.sqrt(a*a+i*i);return{x:o?a/o:0,y:o?i/o:-1}}function i(t,e,n){var r=0;return t<n.left?r|=1:t>n.right&&(r|=2),e<n.top?r|=8:e>n.bottom&&(r|=4),r}function o(t,e){var n,r,a=e.anchor,o=t;return e.clamp&&(o=function(t,e){for(var n,r,a,o=t.x0,s=t.y0,l=t.x1,c=t.y1,u=i(o,s,e),d=i(l,c,e);u|d&&!(u&d);)8&(n=u||d)?(r=o+(l-o)*(e.top-s)/(c-s),a=e.top):4&n?(r=o+(l-o)*(e.bottom-s)/(c-s),a=e.bottom):2&n?(a=s+(c-s)*(e.right-o)/(l-o),r=e.right):1&
vendor: 4,584 bytes, line 1
1n&&(a=s+(c-s)*(e.left-o)/(l-o),r=e.left),n===u?u=i(o=r,s=a,e):d=i(l=r,c=a,e);return{x0:o,x1:l,y0:s,y1:c}}(o,e.area)),"start"===a?(n=o.x0,r=o.y0):"end"===a?(n=o.x1,r=o.y1):(n=(o.x0+o.x1)/2,r=(o.y0+o.y1)/2),function(t,e,n,r,a){switch(a){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:a*=Math.PI/180,n=Math.cos(a),r=Math.sin(a)}return{x:t,y:e,vx:n,vy:r}}(n,r,t.vx,t.vy,e.align)}var s={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),a=Math.sin(n),i=t.innerRadius,s=t.outerRadius;return o({x0:t.x+r*i,y0:t.y+a*i,x1:t.x+r*s,y1:t.y+a*s,vx:r,vy:a},e)},point:function(t,e){var n=a(t,e.origin),r=n.x*t.radius,i=n.y*t.radius;return o({x0:t.x-r,y0:t.y-i,x1:t.x+r,y1:t.y+i,vx:n.x,vy:n.y},e)},rect:function(t,e){var n=a(t,e.origin),r=t.x,i=t.y,s=0,l=0;return t.horizontal?(r=Math.min(t.x,t.base),s=Math.abs(t.base-t.x)):(i=Math.min(t.y,t.base),l=Math.abs(t.base-t.y)),o({x0:r,y0:i+l,x1:r+s,y1:i,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=a(t,e.origin);return o({x0:t.x,y0:t.y,x1:t.x,y1:t.y,vx:n.x,vy:n.y},e)}},l=t.helpers,c=r.rasterize;function u(t){var e=t._model.horizontal,n=t._scale||e&&t._xScale||t._yScale;if(!n)return null;if(void 0!==n.xCenter&&void 0!==n.yCenter)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e?{x:r,y:null}:{x:null,y:r}}function d(t,e,n){var r=t.shadowBlur,a=n.stroked,i=c(n.x),o=c(n.y),s=c(n.w);a&&t.strokeText(e,i,o,s),n.filled&&(r&&a&&(t.shadowBlur=0),t.fillText(e,i,o,s),r&&a&&(t.shadowBlur=r))}var h=function(t,e,n,r){var a=this;a._config=t,a._index=r,a._model=null,a._rects=null,a._ctx=e,a._el=n};l.extend(h.prototype,{_modelize:function(e,n,a,i){var o,c=this,d=c._index,h=l.options.resolve,f=r.parseFont(h([a.font,{}],i,d)),g=h([a.color,t.defaults.global.defaultFontColor],i,d);return{align:h([a.align,"center"],i,d),anchor:h([a.anchor,"center"],i,d),area:i.chart.chartArea,backgroundColor:h([a.backgroundColor,null],i,d),borderColor:h([a.borderColor,null],i,d),borderRadius:h([a.borderRadius,0],i,d),borderWidth:h([a.borderWidth,0],i,d),clamp:h([a.clamp,!1],i,d),clip:h([a.clip,!1],i,d),color:g,display:e,font:f,lines:n,offset:h([a.offset,0],i,d),opacity:h([a.opacity,1],i,d),origin:u(c._el),padding:l.options.toPadding(h([a.padding,0],i,d)),positioner:(o=c._el,o instanceof t.elements.Arc?s.arc:o instanceof t.elements.Point?s.point:o instanceof t.elements.Rectangle?s.rect:s.fallback),rotation:h([a.rotation,0],i,d)*(Math.PI/180),size:r.textSize(c._ctx,n,f),textAlign:h([a.textAlign,"start"],i,d),textShadowBlur:h([a.textShadowBlur,0],i,d),textShadowColor:h([a.textShadowColor,g],i,d),textStrokeColor:h([a.textStrokeColor,g],i,d),textStrokeWidth:h([a.textStrokeWidth,0],i,d)}},update:function(t){var e,n,a,i=this,o=null,s=null,c=i._index,u=i._config,d=l.options.resolve([u.display,!0],t,c);d&&(n=l.valueOrDefault(l.callback(u.formatter,[e=t.dataset.data[c],t]),e),(a=l.isNullOrUndef(n)?[]:r.toTextLines(n)).length&&(s=function(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,a=t.size.width,i=-a/2,o=-r/2;return{frame:{x:i-n.left-e,y:o-n.top-e,w:a+n.width+2*e,h:r+n.height+2*e},text:{x:i,y:o,w:a,h:r}}}(o=i._modelize(d,a,u,t)))),i._model=o,i._rects=s},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n,a=t.ctx,i=this._model,o=this._rects;this.visible()&&(a.save(),i.clip&&(n=i.area,a.beginPath(),a.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),a.clip()),a.globalAlpha=r.bound(0,i.opacity,1),a.translate(c(e.x),c(e.y)),a.rotate(i.rotation),function(t,e,n){var r=n.backgroundColor,a=n.borderColor,i=n.borderWidth;(r||a&&i)&&(t.beginPath(),l.canvas.roundedRect(t,c(e.x)+i/2,c(e.y)+i/2,c(e.w)-i,c(e.h)-i,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),a&&i&&(t.strokeStyle=a,t.lineWidth=i,t.lineJoin="miter",t.stroke()))}(a,o.frame,i),function(t,e,n,r){var a,i=r.textAlign,o=r.color,s=!!o,l=r.font,c=e.length,u=r.textStrokeColor,h=r.textStrokeWidth,f=u&&h;if(c&&(s||f))for(n=function(t,e,n){var r=n.lineHeight,a=t.w,i=t.x;return"center"===e?i+=a/2:"end"!==e&&"right"!==e||(i+=a),{h:r,w:a,x:i,y:t.y+r/2}}(n,i,l),t.font=l.string,t.textAlign=i,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,s&&(t.fillStyle=o),f&&(t.lineJoin="round",t.lineWidth=h,t.strokeStyle=u),a=0,c=e.length;a<c;++a)d(t,e[a],{stroked:f,filled:s,w:n.w,x:n.x,y:n.y+n.h*a})}
1(a,i.lines,o.text,i),a.restore())}});var f=Number.MIN_SAFE_INTEGER||-9007199254740991,g=Number.MAX_SAFE_INTEGER||9007199254740991;function p(t,e,n){var r=Math.cos(n),a=Math.sin(n),i=e.x,o=e.y;return{x:i+r*(t.x-i)-a*(t.y-o),y:o+a*(t.x-i)+r*(t.y-o)}}function b(t,e){var n,r,a,i=g,o=f,s=e.origin;for(n=0;n<t.length;++n)a=e.vx*((r=t[n]).x-s.x)+e.vy*(r.y-s.y),i=Math.min(i,a),o=Math.max(o,a);return{min:i,max:o}}function v(t,e){var n=e.x-t.x,r=e.y-t.y,a=Math.sqrt(n*n+r*r);return{vx:(e.x-t.x)/a,vy:(e.y-t.y)/a,origin:t,ln:a}}var m=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function y(t,e,n){var r=e.positioner(t,e),a=r.vx,i=r.vy;if(!a&&!i)return{x:r.x,y:r.y};var o=n.w,s=n.h,l=e.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(s/2*Math.sin(l)),u=Math.abs(o/2*Math.sin(l))+Math.abs(s/2*Math.cos(l)),d=1/Math.max(Math.abs(a),Math.abs(i));return c*=a*d,u*=i*d,{x:r.x+(c+=e.offset*a),y:r.y+(u+=e.offset*i)}}t.helpers.extend(m.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=e._rect;return!((t=p(t,e.center(),-e._rotation)).x<n.x-1||t.y<n.y-1||t.x>n.x+n.w+2||t.y>n.y+n.h+2)},intersects:function(t){var e,n,r,a=this._points(),i=t._points(),o=[v(a[0],a[1]),v(a[0],a[3])];for(this._rotation!==t._rotation&&o.push(v(i[0],i[1]),v(i[0],i[3])),e=0;e<o.length;++e)if(n=b(a,o[e]),r=b(i,o[e]),n.max<r.min||r.max<n.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return[p({x:e.x,y:e.y},r,n),p({x:e.x+e.w,y:e.y},r,n),p({x:e.x+e.w,y:e.y+e.h},r,n),p({x:e.x,y:e.y+e.h},r,n)]}});var x={prepare:function(t){var e,n,r,a,i,o=[];for(e=0,r=t.length;e<r;++e)for(n=0,a=t[e].length;n<a;++n)o.push(i=t[e][n]),i.$layout={_box:new m,_hidable:!1,_visible:!0,_set:e,_idx:n};return o.sort(function(t,e){var n=t.$layout,r=e.$layout;return n._idx===r._idx?r._set-n._set:r._idx-n._idx}),this.update(o),o},update:function(t){var e,n,r,a,i,o=!1;for(e=0,n=t.length;e<n;++e)a=(r=t[e]).model(),(i=r.$layout)._hidable=a&&"auto"===a.display,i._visible=r.visible(),o|=i._hidable;o&&function(t){var e,n,r,a,i,o;for(e=0,n=t.length;e<n;++e)(a=(r=t[e]).$layout)._visible&&(i=r.geometry(),o=y(r._el._model,r.model(),i),a._box.update(o,i,r.rotation()));!function(t,e){var n,r,a,i;for(n=t.length-1;n>=0;--n)for(a=t[n].$layout,r=n-1;r>=0&&a._visible;--r)(i=t[r].$layout)._visible&&a._box.intersects(i._box)&&e(a,i)}(t,function(t,e){var n=t._hidable,r=e._hidable;n&&r||r?e._visible=!1:n&&(t._visible=!1)})}(t)},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if((r=t[n].$layout)&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,a,i,o,s;for(n=0,r=e.length;n<r;++n)(i=(a=e[n]).$layout)._visible&&(o=a.geometry(),s=y(a._el._view,a.model(),o),i._box.update(s,o,a.rotation()),a.draw(t,s))}},_=t.helpers,w=t.helpers,k="$default";function M(t,e,n){if(e){var r,a=n.$context,i=n.$groups;e[i._set]&&(r=e[i._set][i._key])&&!0===w.callback(r,[a])&&(t.$datalabels._dirty=!0,n.update(a))}}t.defaults.global.plugins.datalabels={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(t){if(_.isNullOrUndef(t))return null;var e,n,r,a=t;if(_.isObject(t))if(_.isNullOrUndef(t.label))if(_.isNullOrUndef(t.r))for(a="",r=0,n=(e=Object.keys(t)).length;r<n;++r)a+=(0!==r?", ":"")+e[r]+": "+t[e[r]];else a=t.r;else a=t.label;return""+a},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0};var C={id:"datalabels",beforeInit:function(t){t.$datalabels={_actives:[]}},beforeUpdate:function(t){var e=t.$datalabels;e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var r,a,i,o,s,l,c,u,d=e.index,f=t.$datalabels,g=f._datasets[d]=[],p=t.isDatasetVisible(d),b=t.data.datasets[d],v=function(t,e){var n,r,a=t.datalabels,i={},o=[];return!1===a?null:(!0===a&&(a={}),e=w.merge({},[e,a]),n=e.labels||{},r=Object.keys(n),delete e.labels,r.length?r.forEach(function(t){n[t]&&o.push(w.merge
1({},[e,n[t],{_key:t}]))}):o.push(e),i=o.reduce(function(t,e){return w.each(e.listeners||{},function(n,r){t[r]=t[r]||{},t[r][e._key||k]=n}),delete e.listeners,t},{}),{labels:o,listeners:i})}(b,n),m=e.meta.data||[],y=t.ctx;for(y.save(),r=0,i=m.length;r<i;++r)if((c=m[r]).$datalabels=[],p&&c&&!c.hidden&&!c._model.skip)for(a=0,o=v.labels.length;a<o;++a)l=(s=v.labels[a])._key,(u=new h(s,y,c,r)).$groups={_set:d,_key:l||k},u.$context={active:!1,chart:t,dataIndex:r,dataset:b,datasetIndex:d},u.update(u.$context),c.$datalabels.push(u),g.push(u);y.restore(),w.merge(f._listeners,v.listeners,{merger:function(t,n,r){n[t]=n[t]||{},n[t][e.index]=r[t],f._listened=!0}})},afterUpdate:function(t,e){t.$datalabels._labels=x.prepare(t.$datalabels._datasets,e)},afterDatasetsDraw:function(t){x.draw(t,t.$datalabels._labels)},beforeEvent:function(t,e){if(t.$datalabels._listened)switch(e.type){case"mousemove":case"mouseout":!function(t,e){var n,r,a=t.$datalabels,i=a._listeners;if(i.enter||i.leave){if("mousemove"===e.type)r=x.lookup(a._labels,e);else if("mouseout"!==e.type)return;n=a._hovered,a._hovered=r,function(t,e,n,r){var a,i;(n||r)&&(n?r?n!==r&&(i=a=!0):i=!0:a=!0,i&&M(t,e.leave,n),a&&M(t,e.enter,r))}(t,i,n,r)}}(t,e);break;case"click":!function(t,e){var n=t.$datalabels,r=n._listeners.click,a=r&&x.lookup(n._labels,e);a&&M(t,r,a)}(t,e)}},afterEvent:function(e){var n,a,i,o,s,l,c,u=e.$datalabels,d=u._actives,h=u._actives=e.lastActive||[],f=r.arrayDiff(d,h);for(n=0,a=f.length;n<a;++n)if((s=f[n])[1])for(i=0,o=(c=s[0].$datalabels||[]).length;i<o;++i)(l=c[i]).$context.active=1===s[1],l.update(l.$context);(u._dirty||f.length)&&(x.update(u._labels),function(e){if(!e.animating){for(var n=t.animationService.animations,r=0,a=n.length;r<a;++r)if(n[r].chart===e)return;e.render({duration:1,lazy:!0})}}(e)),delete u._dirty}};return t.plugins.register(C),C}(n("MO+k"))},xutz:function(t,e,n){"use strict";(function(t){var r=n("XqMk"),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=i&&i.exports===a&&r.a.process,s=function(){try{return i&&i.require&&i.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();e.a=s}).call(this,n("3UD+")(t))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.