PageSourceSearch

https://www.sportsbettingdime.com/app/plugins/sas-sports-wc/build/255.js?ver=d8d402bbd784c20415e7

js sportsbettingdime.com collected 2026-10-02 03:39:00 UTC 154,461 bytes, 224 lines download raw bytes

1"use strict";(globalThis.webpackChunkswrc_plugin=globalThis.webpackChunkswrc_plugin||[]).push([[255,715],{827:(t,e,s)=>{s.d(e,{G:()=>n});var i=s(695);const n=({options:t,selected:e,callback:s,labelMap:n},o)=>i.x`<div
2    class="${(0,i.b)("flex justify-around border-4 rounded-lg md:rounded border-base-200 bg-base-200",o??null)}">
3    ${t.map((({key:t,value:o})=>{const a=(null==n?void 0:n[o])??t;return i.x`<button
4        data-value="${o}"
5        @click="${s??i.A}"
6        class="${(0,i.b)("flex-1 py-2 px-1 text-sm rounded md:rounded font-bold capitalize bg-base-100",e===o?"text-base-100 bg-base-300":"hover:bg-base-200")}">
7        ${a}
8      </button>`}))}
9  </div>`},715:(t,e,s)=>{s.d(e,{a:()=>E,b:()=>I,c:()=>T,d:()=>P,g:()=>j,h:()=>O,k:()=>S,l:()=>B,m:()=>U,p:()=>C,t:()=>D,u:()=>A,v:()=>F,w:()=>z,x:()=>V});const i=globalThis,n=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let r=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(n&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&a.set(e,t))}return t}toString(){return this.cssText}};const l=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:h,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:u,getOwnPropertySymbols:p,getPrototypeOf:f}=Object,g=globalThis,m=g.trustedTypes,b=m?m.emptyScript:"",x=g.reactiveElementPolyfillSupport,_=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},y=(t,e)=>!h(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),g.litPropertyMetadata??(g.litPropertyMetadata=new WeakMap);class k extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==i?void 0:i.call(this)},set(e){const o=null==i?void 0:i.call(this);n.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...u(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}
9removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(n)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),n=i.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var s;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(void 0!==n&&!0===i.reflect){const o=(void 0!==(null==(s=i.converter)?void 0:s.toAttribute)?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=i.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(s=t.converter)?void 0:s.fromAttribute)?t.converter:v;this._$Em=n,this[n]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??y)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(s)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EC(t,this[t])))),this._$EU()}updated(t){}firstUpdated(t){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[_("elementProperties")]=new Map,k[_("finalized")]=new Map,null==x||x({ReactiveElement:k}),(g.reactiveElementVersions??(g.reactiveElementVersions=[])).push("2.0.4");const S={PENDING:1,COMPLETE:2},M=Symbol();class O{get taskComplete(){return this.t||(1===this.i?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):3===this.i?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){var i;this.p=0,this.i=0,(this._=t).addController(this);const n="object"==typeof e?e:{task:e,args:s};this.v=n.task,this.j=n.args,this.m=n.argsEqual??$,this.k=n.onComplete,this.A=n.onError,this.autoRun=n.autoRun??!0,"initialValue"in n&&(this.u=n.initialValue,this.i=2,this.O=null==(i=this.T)?void 0:i.call(this))}hostUpdate(){!0===this.autoRun&&this.S()}hostUpdated(){"afterUpdate"===this.autoRun&&this.S()}T(){if(void 0===this.j)return;const t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){const t=this.T(),e=this.O;this.O=t,t===e||void 0===t||void 0!==e&&this.m(e,t)||await this.run(t)}async run(t){var e,s,i,n,o;let a,r;t??(t=this.T()),this.O=t,1===this.i?null==(e=this.q)||e.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,"afterUpdate"===this.autoRun?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();const l=++this.p;
9this.q=new AbortController;let h=!1;try{a=await this.v(t,{signal:this.q.signal})}catch(t){h=!0,r=t}if(this.p===l){if(a===M)this.i=0;else{if(!1===h){try{null==(s=this.k)||s.call(this,a)}catch{}this.i=2,null==(i=this.o)||i.call(this,a)}else{try{null==(n=this.A)||n.call(this,r)}catch{}this.i=3,null==(o=this.h)||o.call(this,r)}this.u=a,this.l=r}this._.requestUpdate()}}abort(t){var e;1===this.i&&(null==(e=this.q)||e.abort(t))}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){var e,s,i,n;switch(this.i){case 0:return null==(e=t.initial)?void 0:e.call(t);case 1:return null==(s=t.pending)?void 0:s.call(t);case 2:return null==(i=t.complete)?void 0:i.call(t,this.value);case 3:return null==(n=t.error)?void 0:n.call(t,this.error);default:throw Error("Unexpected status: "+this.i)}}}const $=(t,e)=>t===e||t.length===e.length&&t.every(((t,s)=>!y(t,e[s])));function T(t,e,s=80){return t&&e?`${L.CDN}/team-logos/${encodeURIComponent(s)}px/${encodeURIComponent(t.toLowerCase())}/${encodeURIComponent(e)}.png`:null}function P(t,e="icon-d"){if(t){const s=t.toLowerCase();return`${L.CDN}/partner-asset-library/${s}/${s}-${e}.svg`}return null}function E(t){var e,s,i,n,o,a,r,l,h,c;return!!(null!=(s=null==(e=null==t?void 0:t.odds)?void 0:e.moneyline)&&s.away.american||null!=(a=null==(o=null==(n=null==(i=null==t?void 0:t.odds)?void 0:i.spread)?void 0:n.away)?void 0:o.odds)&&a.american||null!=(c=null==(h=null==(l=null==(r=null==t?void 0:t.odds)?void 0:r.total)?void 0:l.over)?void 0:h.odds)&&c.american)}function D(t){const e=new Date(t);return new Intl.DateTimeFormat("en-US",{year:"2-digit",month:"numeric",day:"numeric"}).format(e)}const C=(t,e)=>t?e+t:"",A=(t,e)=>{let s=t;for(const[t,i]of Object.entries(e))i&&(s=s.replace(`{${t}}`,i));return s};function I(t){let e="SCHEDULED";const s=new Date(t.date);return(new Date).getTime()>s.getTime()&&(e="IN_PROGRESS"),null!=t&&t.stats&&Object.keys(t.stats).length>0&&(e="FINISHED"),e}const R=t=>({ncaaf:"ncaafb",ncaab:"ncaamb"}[t.toLowerCase()]||t.toLowerCase()),L={SPORTS_RADAR:"https://srfeeds.sportsbettingdime.com",CDN:"https://i.elitesportsrn.com/assets",SBD_FUEL:"https://cdn-sde.sbdfuel.com"};function z(t,e){const s=new URLSearchParams({limit:(null==e?void 0:e.limit)??"30",props:(null==e?void 0:e.props)??"",matchups:(null==e?void 0:e.matchups)??"",books:e.books??""}).toString(),i=R(t);return`${L.SBD_FUEL}/gameprops/${i}/list?${s}`}function F(t){const e=R(t);return`${L.SBD_FUEL}/gameprops/${e}/filters`}function j(t,e){const s=e?new URLSearchParams(e).toString():null;return`${L.SPORTS_RADAR}/v2/matchup/${encodeURIComponent(t)}${s?`?${s}`:""}`}function U(t,e,s){const i=s?new URLSearchParams(s).toString():null;return`${L.SPORTS_RADAR}/v2/matchup/${t.toLowerCase()}/identifier/${e}${i?`?${i}`:""}`}function V(t,e,s){const i=s?new URLSearchParams(s).toString():null;return`${L.SPORTS_RADAR}/v2/trends/${t}${e?`/team/${e}`:""}${i?`?${i}`:""}`}function B(t,e){const s={...e,limit:e.limit??"10"},i=e?new URLSearchParams(s).toString():null;return`${L.SPORTS_RADAR}/v2/matchups/${encodeURIComponent(t.toLowerCase())}/scores${i?`?${i}`:""}`}},118:(t,e,s)=>{s.d(e,{s:()=>o});var i=s(695),n=s(369);const o='<svg viewBox="0 0 24 25" preserveAspectRatio="xMidYMid meet" fill="none" xmlns="http://www.w3.org/2000/svg">\n    <path d="m6.292 11.861 8.07-8.07a.997.997 0 0 1 1.409 0l.941.942a.997.997 0 0 1 .002 1.408l-6.396 6.425 6.396 6.425a.996.996 0 0 1-.002 1.408l-.941.941a.997.997 0 0 1-1.41 0l-8.07-8.07a.997.997 0 0 1 0-1.409z" fill="currentColor"/>\n    <mask id="1ur3nkllfa" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="6" y="3" width="12" height="19">\n        <path d="m6.292 11.861 8.07-8.07a.997.997 0 0 1 1.409 0l.941.942a.997.997 0 0 1 .002 1.408l-6.396 6.425 6.396 6.425a.996.996 0 0 1-.002 1.408l-.941.941a.997.997 0 0 1-1.41 0l-8.07-8.07a.997.997 0 0 1 0-1.409z" fill="transparent"/>\n    </mask>\n</svg>\n',{I:a}=i.j,r=()=>document.createComment(""),l=(t,e,s)=>{var i;const n=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=n.insertBefore(r(),o),i=n.insertBefore(r(),o);s=new a(e,i,t,t.options)}else{const e=s._$AB.nextSibling,a=s._$AM,r=a!==t;if(r){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==a._$AU&&s._$AP(e)}if(e!==o||r){let t=s._$AA;
9for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,o),t=e}}}return s},h=(t,e,s=t)=>(t._$AI(e,s),t),c={},d=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},u=(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i},p=(0,n.e)(class extends n.i{constructor(t){if(super(t),t.type!==n.t.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const n=[],o=[];let a=0;for(const e of t)n[a]=i?i(e,a):a,o[a]=s(e,a),a++;return{values:o,keys:n}}render(t,e,s){return this.ct(t,e,s).values}update(t,[e,s,n]){var o;const a=(t=>t._$AH)(t),{values:r,keys:p}=this.ct(e,s,n);if(!Array.isArray(a))return this.ut=p,r;const f=null!==(o=this.ut)&&void 0!==o?o:this.ut=[],g=[];let m,b,x=0,_=a.length-1,v=0,y=r.length-1;for(;x<=_&&v<=y;)if(null===a[x])x++;else if(null===a[_])_--;else if(f[x]===p[v])g[v]=h(a[x],r[v]),x++,v++;else if(f[_]===p[y])g[y]=h(a[_],r[y]),_--,y--;else if(f[x]===p[y])g[y]=h(a[x],r[y]),l(t,g[y+1],a[x]),x++,y--;else if(f[_]===p[v])g[v]=h(a[_],r[v]),l(t,a[x],a[_]),_--,v++;else if(void 0===m&&(m=u(p,v,y),b=u(f,x,_)),m.has(f[x]))if(m.has(f[_])){const e=b.get(p[v]),s=void 0!==e?a[e]:null;if(null===s){const e=l(t,a[x]);h(e,r[v]),g[v]=e}else g[v]=h(s,r[v]),l(t,a[x],s),a[e]=null;v++}else d(a[_]),_--;else d(a[x]),x++;for(;v<=y;){const e=l(t,g[y+1]);h(e,r[v]),g[v++]=e}for(;x<=_;){const t=a[x++];null!==t&&d(t)}return this.ut=p,((t,e=c)=>{t._$AH=e})(t,g),i.T}});var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,m=(t,e,s,i)=>{for(var n,o=i>1?void 0:i?g(e,s):e,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(i?n(e,s,o):n(o))||o);return i&&o&&f(e,s,o),o};const b=(0,i.a)(i.c);let x=class extends(b(i.s)){constructor(){super(...arguments),this._id="",this.onChange=()=>{},this.selected="",this.disabled=!1,this.selectClass="",this.label=null,this.options=[]}_handleChange(t){t.target.blur(),this.onChange(t)}render(){return i.x`<div
10      class="${this.tw((0,i.b)("flex rounded relative group overflow-hidden font-sans-bold font-bold text-sm",this.disabled&&"pointer-events-none"))}">
11      <select
12        aria-label=${t=this.label,t??i.A}
13        ?disabled=${this.disabled}
14        id="${this._id}"
15        @change="${this._handleChange}"
16        class="${this.tw((0,i.b)("cursor-pointer bg-base-100 border border-base-200 w-full font-bold flex-1 peer appearance-none rounded p-2 pr-7",null==this?void 0:this.selectClass))}">
17        ${p(this.options,(t=>t.value),(({value:t,label:e,classes:s})=>i.x`<option
18              class="${s?this.tw(s):i.A}"
19              value="${t}"
20              ?selected=${this.selected===t}>
21              ${e}
22            </option>`))}
23      </select>
24      <span
25        class="${this.tw((0,i.b)("pointer-events-none -rotate-90 transition-transform peer-focus:rotate-90 duration-300 z-10 right-3 absolute w-2.5 h-2.5 self-center",this.disabled?"opacity-50":"opacity-100"))}">
26        ${(0,n.o)(o)}
27      </span>
28    </div>`;var t}};m([(0,i.n)({type:String})],x.prototype,"_id",2),m([(0,i.n)({type:Function})],x.prototype,"onChange",2),m([(0,i.n)({type:String})],x.prototype,"selected",2),m([(0,i.n)({type:Boolean,reflect:!0})],x.prototype,"disabled",2),m([(0,i.n)({type:String,reflect:!0})],x.prototype,"selectClass",2),m([(0,i.n)({type:String,reflect:!0})],x.prototype,"label",2),m([(0,i.n)({type:Array})],x.prototype,"options",2),x=m([(0,i.e)("select-dropdown")],x)},255:(t,e,s)=>{s.r(e),s.d(e,{TeamTrends:()=>xn});var i=s(695),n=s(775),o=s(715),a=s(369),r=s(827),l=s(137);function h(t){return t+.5|0}s(118);const c=(t,e,s)=>Math.max(Math.min(t,s),e);function d(t){return c(h(2.55*t),0,255)}function u(t){return c(h(255*t),0,255)}function p(t){return c(h(t/2.55)/100,0,1)}function f(t){return c(h(100*t),0,100)}const g={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},m=[..."0123456789ABCDEF"],b=t=>m[15&t],x=t=>m[(240&t)>>4]+m[15&t],_=t=>(240&t)>>4==(15&t);const v=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,s){const i=e*Math.min(s,1-s),n=(e,n=(e+t/30)%12)=>s-i*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function w(t,e,s){const i=(i,n=(i+t/60)%6)=>s-s*e*Math.max(Math.min(n,4-n,1),0);return[i(5),i(3),i(1)]}function k(t,e,s){const i=y(t,1,.5);let n;for(e+s>1&&(n=1/(e+s),e*=n,s*=n),n=0;n<3;n++)i[n]*=1-e-s,i[n]+=e;return i}function S(t){const e=t.r/255,s=t.g/255,i=t.b/255,n=Math.max(e,s,i),o=Math.min(e,s,i),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>
vendor: 2,940 bytes, line 28
28.5?h/(2-n-o):h/(n+o),r=function(t,e,s,i,n){return t===n?(e-s)/i+(e<s?6:0):e===n?(s-t)/i+2:(t-e)/i+4}(e,s,i,h,n),r=60*r+.5),[0|r,l||0,a]}function M(t,e,s,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,s,i)).map(u)}function O(t,e,s){return M(y,t,e,s)}function $(t){return(t%360+360)%360}const T={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},P={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let E;const D=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,C=t=>
vendor: 10,989 bytes, line 28
28t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,A=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function I(t,e,s){if(t){let i=S(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*s,0===e?360:1)),i=O(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function R(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=u(t[3]))):(e=R(t,{r:0,g:0,b:0,a:1})).a=u(e.a),e}function z(t){return"r"===t.charAt(0)?function(t){const e=D.exec(t);let s,i,n,o=255;if(e){if(e[7]!==s){const t=+e[7];o=e[8]?d(t):c(255*t,0,255)}return s=+e[1],i=+e[3],n=+e[5],s=255&(e[2]?d(s):c(s,0,255)),i=255&(e[4]?d(i):c(i,0,255)),n=255&(e[6]?d(n):c(n,0,255)),{r:s,g:i,b:n,a:o}}}(t):function(t){const e=v.exec(t);let s,i=255;if(!e)return;e[5]!==s&&(i=e[6]?d(+e[5]):u(+e[5]));const n=$(+e[2]),o=+e[3]/100,a=+e[4]/100;return s="hwb"===e[1]?function(t,e,s){return M(k,t,e,s)}(n,o,a):"hsv"===e[1]?function(t,e,s){return M(w,t,e,s)}(n,o,a):O(n,o,a),{r:s[0],g:s[1],b:s[2],a:i}}(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let s;var i,n,o;"object"===e?s=L(t):"string"===e&&(o=(i=t).length,"#"===i[0]&&(4===o||5===o?n={r:255&17*g[i[1]],g:255&17*g[i[2]],b:255&17*g[i[3]],a:5===o?17*g[i[4]]:255}:7!==o&&9!==o||(n={r:g[i[1]]<<4|g[i[2]],g:g[i[3]]<<4|g[i[4]],b:g[i[5]]<<4|g[i[6]],a:9===o?g[i[7]]<<4|g[i[8]]:255})),s=n||function(t){E||(E=function(){const t={},e=Object.keys(P),s=Object.keys(T);let i,n,o,a,r;for(i=0;i<e.length;i++){for(a=r=e[i],n=0;n<s.length;n++)o=s[n],r=r.replace(o,T[o]);o=parseInt(P[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),E.transparent=[0,0,0,0]);const e=E[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||z(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=R(this._rgb);return t&&(t.a=p(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${p(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?function(t){var e=(t=>_(t.r)&&_(t.g)&&_(t.b)&&_(t.a))(t)?b:x;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=S(t),s=e[0],i=f(e[1]),n=f(e[2]);return t.a<255?`hsla(${s}, ${i}%, ${n}%, ${p(t.a)})`:`hsl(${s}, ${i}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,i=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=s.a-i.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-l,s.r=255&l*s.r+n*i.r+.5,s.g=255&l*s.g+n*i.g+.5,s.b=255&l*s.b+n*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,s){const i=A(p(t.r)),n=A(p(t.g)),o=A(p(t.b));return{r:u(C(i+s*(A(p(e.r))-i))),g:u(C(n+s*(A(p(e.g))-n))),b:u(C(o+s*(A(p(e.b))-o))),a:t.a+s*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=u(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=h(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return I(this._rgb,2,t),this}darken(t){return I(this._rgb,2,-t),this}saturate(t){return I(this._rgb,1,t),this}desaturate(t){return I(this._rgb,1,-t),this}rotate(t){return function(t,e){var s=S(t);s[0]=$(s[0]+e),s=O(s),t.r=s[0],t.g=s[1],t.b=s[2]}(this._rgb,t),this}}const j=(()=>{let t=0;return()=>t++})();function U(t){return null==t}function V(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function B(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function N(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function H(t,e){return N(t)?t:e}function W(t,e){return void 0===t?e:t}function Y(t,e,s){if(t&&"function"==typeof t.call)return t.apply(s,e)}function q(t,e,s,i){let n,o,a;if(V(t))if(o=t.length,i)for(n=o-1;n>=0;n--)e.call(s,t[n],n);else for(n=0;n<o;n++)e.call(s,t[n],n);else if(B(t))for(a=Object.keys(t),o=a.length,n=0;n<o;n++)e.call(s,t[a[n]],a[n])}function X(t,e){let s,i,n,o;if(!t||!e||t.length!==e.length)return!1;for(s=0,i=t.length;s<i;++s)if(n=t[s],o=e[s],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function G(t){if(V(t))return t.map(G);if(B(t)){const e=Object.create(null),s=Object.keys(t),i=s.length;let n=0;for(;n<i;++n)e[s[n]]=G(t[s[n]]);return e}return t}function K(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Z(t,e,s,i){if(!K(t))return;const n=e[t],o=s[t];B(n)&&B(o)?Q(n,o,i):e[t]=G(o)}function Q(t,e,s){const i=V(e)?e:[e],n=i.length;if(!B(t))return t;const o=(s=s||{}).merger||Z;let a;for(let e=0;e<n;++e){if(a=i[e],!B(a))continue;const n=Object.keys(a);for(let e=0,i=n.length;e<i;++e)o(n[e],t,a,s)}return t}function J(t,e){return Q(t,e,{merger:tt})}function tt(t,e,s){if(!K(t))return;const i=e[t],n=s[t];B(i)&&B(n)?J(i,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=G(n))}const et={"":t=>t,x:t=>t.x,y:t=>t.y};function st(t,e){const s=et[e]||(et[e]=function(t){const e=function(t){const e=t.split("."),s=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(s.push(i),i="");return s}(t);return t=>{for(const s of e){if(""===s)break;t=t&&t[s]}return t}}(e));return s(t)}function it(t){return t.charAt(0).toUpperCase()+t.slice(1)}const nt=t=>void 0!==t,ot=t=>"function"==typeof t,at=(t,e)=>{if(t.size!==e.size)return!1;for(const s of t)if(!e.has(s))return!1;return!0},rt=Math.PI,lt=2*rt,ht=lt+rt,ct=Number.POSITIVE_INFINITY,dt=rt/180,ut=rt/2,pt=rt/4,ft=2*rt/3,gt=Math.log10,mt=Math.sign;function bt(t,e,s){return Math.abs(t-e)<s}function xt(t){const e=Math.round(t);t=bt(t,e,t/1e3)?e:t;const s=Math.pow(10,Math.floor(gt(t))),i=t/s;return(i<=1?1:i<=2?2:i<=5?5:10)*s}function _t(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function vt(t){return t*(rt/180)}function yt(t){if(!N(t))return;let e=1,s=0;for(;Math.round(t*e)/e!==t;)e*=10,s++;return s}function wt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kt(t,e){return(t-e+ht)%lt-rt}function St(t){return(t%lt+lt)%lt}function Mt(t,e,s,i){const n=St(t),o=St(e),a=St(s),r=St(o-n),l=St(a-n),h=St(n-o),c=St(n-a);return n===o||n===a||i&&o===a||r>l&&h<c}function Ot(t,e,s){return Math.max(e,Math.min(s,t))}function $t(t,e,s,i=1e-6){return t>=Math.min(e,s)-i&&t<=Math.max(e,s)+i}function Tt(t,e,s){s=s||(s=>t[s]<e);let i,n=t.length-1,o=0;for(;n-o>1;)i=o+n>>1,s(i)?o=i:n=i;return{lo:o,hi:n}}const Pt=(t,e,s,i)=>Tt(t,s,i?i=>{const n=t[i][e];return n<s||n===s&&t[i+1][e]===s}:i=>t[i][e]<s),Et=(t,e,s)=>Tt(t,s,(i=>t[i][e]>=s)),Dt=["push","pop","shift","splice","unshift"];function Ct(t,e){const s=t._chartjs;if(!s)return;const i=s.listeners,n=i.indexOf(e);-1!==n&&i.splice(n,1),i.length>0||(Dt.forEach((e=>{delete t[e]})),delete t._chartjs)}const At="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function It(t,e){let s=[],i=!1;return function(...n){s=n,i||(i=!0,At.call(window,(()=>{i=!1,t.apply(e,s)})))}}const Rt=(t,e,s)=>"start"===t?e:"end"===t?s:(e+s)/2;const Lt=t=>0===t||1===t,zt=(t,e,s)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*lt/s),Ft=(t,e,s)=>Math.pow(2,-10*t)*Math.sin((t-e)*lt/s)+1,jt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ut),easeOutSine:t=>Math.sin(t*ut),easeInOutSine:t=>-.5*(Math.cos(rt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Lt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Lt(t)?t:zt(t,.075,.3),easeOutElastic:t=>Lt(t)?t:Ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return Lt(t)?t:t<.5?.5*zt(2*t,e,.45):.5+.5*Ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let 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:t=>1-jt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,s=2.75;return t<1/s?e*t*t:t<2/s?e*(t-=1.5/s)*t+.75:t<2.5/s?e*(t-=2.25/s)*t+.9375:e*(t-=2.625/s)*t+.984375},easeInOutBounce:t=>t<.5?.5*jt.easeInBounce(2*t):.5*jt.easeOutBounce(2*t-1)+.5};function Ut(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Vt(t){return Ut(t)?t:new F(t)}function Bt(t){return Ut(t)?t:new F(t).saturate(.5).darken(.1).hexString()}const Nt=["x","y","borderWidth","radius","tension"],Ht=["color","borderColor","backgroundColor"],Wt=new Map;function Yt(t,e,s){return function(t,e){e=e||{};const s=t+JSON.stringify(e);let i=Wt.get(s);return i||(i=new Intl.NumberFormat(t,e),Wt.set(s,i)),i}(e,s).format(t)}const qt={values:t=>V(t)?t:""+t,numeric(t,e,s){if(0===t)return"0";const i=this.chart.options.locale;let n,o=t;if(s.length>1){const e=Math.max(Math.abs(s[0].value),Math.abs(s[s.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let s=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(s)>=1&&t!==Math.floor(t)&&(s=t-Math.floor(t)),s}(t,s)}const a=gt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Yt(t,i,l)},logarithmic(t,e,s){if(0===t)return"0";const i=s[e].significand||t/Math.pow(10,Math.floor(gt(t)));return[1,2,3,5,10,15].includes(i)||e>.8*s.length?qt.numeric.call(this,t,e,s):""}};var Xt={formatters:qt};const Gt=Object.create(null),Kt=Object.create(null);function Zt(t,e){if(!e)return t;const s=e.split(".");for(let e=0,i=s.length;e<i;++e){const i=s[e];t=t[i]||(t[i]=Object.create(null))}return t}function Qt(t,e,s){return"string"==typeof e?Q(Zt(t,e),s):Q(Zt(t,""),e)}class Jt{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={}
vendor: 4,164 bytes, line 28
28,this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Kt,t,e)}override(t,e){return Qt(Gt,t,e)}route(t,e,s,i){const n=Zt(this,t),o=Zt(this,s),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[i];return B(t)?Object.assign({},e,t):W(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var te=new Jt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Ht},numbers:{type:"number",properties:Nt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function ee(t,e,s,i,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,s.push(n)),o>i&&(i=o),i}function se(t,e,s){const i=t.currentDevicePixelRatio,n=0!==s?Math.max(s/2,.5):0;return Math.round((e-n)*i)/i+n}function ie(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ne(t,e,s,i){!function(t,e,s,i,n){let o,a,r,l,h,c,d,u;const p=e.pointStyle,f=e.rotation,g=e.radius;let m=(f||0)*dt;if(p&&"object"==typeof p&&(o=p.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(s,i),t.rotate(m),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:n?t.ellipse(s,i,n/2,g,0,0,lt):t.arc(s,i,g,0,lt),t.closePath();break;case"triangle":c=n?n/2:g,t.moveTo(s+Math.sin(m)*c,i-Math.cos(m)*g),m+=ft,t.lineTo(s+Math.sin(m)*c,i-Math.cos(m)*g),m+=ft,t.lineTo(s+Math.sin(m)*c,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":h=.516*g,l=g-h,a=Math.cos(m+pt)*l,d=Math.cos(m+pt)*(n?n/2-h:l),r=Math.sin(m+pt)*l,u=Math.sin(m+pt)*(n?n/2-h:l),t.arc(s-d,i-r,h,m-rt,m-ut),t.arc(s+u,i-a,h,m-ut,m),t.arc(s+d,i+r,h,m,m+ut),t.arc(s-u,i+a,h,m+ut,m+rt),t.closePath();break;
vendor: 12,997 bytes, line 28
28case"rect":if(!f){l=Math.SQRT1_2*g,c=n?n/2:l,t.rect(s-c,i-l,2*c,2*l);break}m+=pt;case"rectRot":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(s-d,i-r),t.lineTo(s+u,i-a),t.lineTo(s+d,i+r),t.lineTo(s-u,i+a),t.closePath();break;case"crossRot":m+=pt;case"cross":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(s-d,i-r),t.lineTo(s+d,i+r),t.moveTo(s+u,i-a),t.lineTo(s-u,i+a);break;case"star":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(s-d,i-r),t.lineTo(s+d,i+r),t.moveTo(s+u,i-a),t.lineTo(s-u,i+a),m+=pt,d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(s-d,i-r),t.lineTo(s+d,i+r),t.moveTo(s+u,i-a),t.lineTo(s-u,i+a);break;case"line":a=n?n/2:Math.cos(m)*g,r=Math.sin(m)*g,t.moveTo(s-a,i-r),t.lineTo(s+a,i+r);break;case"dash":t.moveTo(s,i),t.lineTo(s+Math.cos(m)*(n?n/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}(t,e,s,i,null)}function oe(t,e,s){return s=s||.5,!e||t&&t.x>e.left-s&&t.x<e.right+s&&t.y>e.top-s&&t.y<e.bottom+s}function ae(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function re(t){t.restore()}function le(t,e,s,i,n){if(!e)return t.lineTo(s.x,s.y);if("middle"===n){const i=(e.x+s.x)/2;t.lineTo(i,e.y),t.lineTo(i,s.y)}else"after"===n!=!!i?t.lineTo(e.x,s.y):t.lineTo(s.x,e.y);t.lineTo(s.x,s.y)}function he(t,e,s,i){if(!e)return t.lineTo(s.x,s.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?s.cp2x:s.cp1x,i?s.cp2y:s.cp1y,s.x,s.y)}function ce(t,e,s,i,n){if(n.strikethrough||n.underline){const o=t.measureText(i),a=e-o.actualBoundingBoxLeft,r=e+o.actualBoundingBoxRight,l=s-o.actualBoundingBoxAscent,h=s+o.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(a,c),t.lineTo(r,c),t.stroke()}}function de(t,e){const s=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=s}function ue(t,e,s,i,n,o={}){const a=V(e)?e:[e],r=o.strokeWidth>0&&""!==o.strokeColor;let l,h;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),U(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<a.length;++l)h=a[l],o.backdrop&&de(t,o.backdrop),r&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),U(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,s,i,o.maxWidth)),t.fillText(h,s,i,o.maxWidth),ce(t,s,i,h,o),i+=Number(n.lineHeight);t.restore()}const pe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,fe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ge(t,e){const s=(""+t).match(pe);if(!s||"normal"===s[1])return 1.2*e;switch(t=+s[2],s[3]){case"px":return t;case"%":t/=100}return e*t}function me(t){return function(t,e){const s={},i=B(e),n=i?Object.keys(e):e,o=B(t)?i?s=>W(t[s],t[e[s]]):e=>t[e]:()=>t;for(const t of n)s[t]=+o(t)||0;return s}(t,{top:"y",right:"x",bottom:"y",left:"x"})}function be(t){const e=me(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function xe(t,e){t=t||{},e=e||te.font;let s=W(t.size,e.size);"string"==typeof s&&(s=parseInt(s,10));let i=W(t.style,e.style);i&&!(""+i).match(fe)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:W(t.family,e.family),lineHeight:ge(W(t.lineHeight,e.lineHeight),s),size:s,style:i,weight:W(t.weight,e.weight),string:""};return n.string=function(t){return!t||U(t.size)||U(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function _e(t,e,s,i){let n,o,a,r=!0;for(n=0,o=t.length;n<o;++n)if(a=t[n],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==s&&V(a)&&(a=a[s%a.length],r=!1),void 0!==a))return i&&!r&&(i.cacheable=!1),a}function ve(t,e){return Object.assign(Object.create(t),e)}function ye(t,e=[""],s,i,n=()=>t[0]){const o=s||t;void 0===i&&(i=Ce("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:n,override:s=>ye([s,...t],e,o,i)};return new Proxy(a,{deleteProperty:(e,s)=>(delete e[s],delete e._keys,delete t[0][s],!0),get:(s,i)=>Oe(s,i,(()=>function(t,e,s,i){let n;for(const o of e)if(n=Ce(Se(o,t),s),void 0!==n)return Me(t,n)?Ee(s,i,t,n):n}(i,e,t,s))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ae(t).includes(e),ownKeys:t=>Ae(t),set(t,e,s){const i=t._storage||(t._storage=n());return t[e]=i[e]=s,delete t._keys,!0}})}function we(t,e,s,i){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:s,_stack:new Set,_descriptors:ke(t,i),setContext:e=>we(t,e,s,i),override:n=>we(t.override(n),e,s,i)};return new Proxy(n,{deleteProperty:(e,s)=>(delete e[s],delete t[s],!0),get:(t,e,s)=>Oe(t,e,(()=>function(t,e,s){const{_proxy:i,_context:n,_subProxy:o,_descriptors:a}=t;let r=i[e];return ot(r)&&a.isScriptable(e)&&(r=function(t,e,s,i){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=s;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(o,a||i);return r.delete(t),Me(t,l)&&(l=Ee(n._scopes,n,t,l)),l}(e,r,t,s)),V(r)&&r.length&&(r=function(t,e,s,i){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=s;if(void 0!==o.index&&i(t))return e[o.index%e.length];if(B(e[0])){const s=e,i=n._scopes.filter((t=>t!==s));e=[];for(const l of s){const s=Ee(i,n,t,l);e.push(we(s,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable)),Me(e,r)&&(r=we(r,n,o&&o[e],a)),r}(t,e,s))),getOwnPropertyDescriptor:(e,s)=>e._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,s)=>Reflect.has(t,s),ownKeys:()=>Reflect.ownKeys(t),set:(e,s,i)=>(t[s]=i,delete e[s],!0)})}function ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:s=e.scriptable,_indexable:i=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:s,indexable:i,isScriptable:ot(s)?s:()=>s,isIndexable:ot(i)?i:()=>i}}const Se=(t,e)=>t?t+it(e):e,Me=(t,e)=>B(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Oe(t,e,s){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=s();return t[e]=i,i}function $e(t,e,s){return ot(t)?t(e,s):t}const Te=(t,e)=>!0===t?e:"string"==typeof t?st(e,t):void 0;function Pe(t,e,s,i,n){for(const o of e){const e=Te(s,o);if(e){t.add(e);const o=$e(e._fallback,s,n);if(void 0!==o&&o!==s&&o!==i)return o}else if(!1===e&&void 0!==i&&s!==i)return null}return!1}function Ee(t,e,s,i){const n=e._rootScopes,o=$e(e._fallback,s,i),a=[...t,...n],r=new Set;r.add(i);let l=De(r,a,s,o||s,i);return null!==l&&(void 0===o||o===s||(l=De(r,a,o,l,i),null!==l))&&ye(Array.from(r),[""],n,o,(()=>function(t,e,s){const i=t._getTarget();e in i||(i[e]={});const n=i[e];return V(n)&&B(s)?s:n||{}}(e,s,i)))}function De(t,e,s,i,n){for(;s;)s=Pe(t,e,s,i,n);return s}function Ce(t,e){for(const s of e){if(!s)continue;const e=s[t];if(void 0!==e)return e}}function Ae(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const s of t)for(const t of Object.keys(s).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Ie=Number.EPSILON||1e-14,Re=(t,e)=>e<t.length&&!t[e].skip&&t[e],Le=t=>"x"===t?"y":"x";function ze(t,e,s,i){const n=t.skip?e:t,o=e,a=s.skip?e:s,r=wt(o,n),l=wt(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=i*h,u=i*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Fe(t,e,s){return Math.max(Math.min(t,s),e)}function je(t,e,s,i,n){let o,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const s=Le(e),i=t.length,n=Array(i).fill(0),o=Array(i);let a,r,l,h=Re(t,0);for(a=0;a<i;++a)if(r=l,l=h,h=Re(t,a+1),l){if(h){const t=h[e]-l[e];n[a]=0!==t?(h[s]-l[s])/t:0}o[a]=r?h?mt(n[a-1])!==mt(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}!function(t,e,s){const i=t.length;let n,o,a,r,l,h=Re(t,0);for(let c=0;c<i-1;++c)l=h,h=Re(t,c+1),l&&h&&(bt(e[c],0,Ie)?s[c]=s[c+1]=0:(n=s[c]/e[c],o=s[c+1]/e[c],r=Math.pow(n,2)+Math.pow(o,2),r<=9||(a=3/Math.sqrt(r),s[c]=n*a*e[c],s[c+1]=o*a*e[c])))}(t,n,o),function(t,e,s="x"){const i=Le(s),n=t.length;let o,a,r,l=Re(t,0);for(let h=0;h<n;++h){if(a=r,r=l,l=Re(t,h+1),!r)continue;const n=r[s],c=r[i];a&&(o=(n-a[s])/3,r[`cp1${s}`]=n-o,r[`cp1${i}`]=c-o*e[h]),l&&(o=(l[s]-n)/3,r[`cp2${s}`]=n+o,r[`cp2${i}`]=c+o*e[h])}}(t,o,e)}(t,n);else{let s=i?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)r=t[o],l=ze(s,r,t[Math.min(o+1,a-(i?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,s=r}e.capBezierPoints&&function(t,e){let s,i,n,o,a,r=oe(t[0],e);for(s=0,i=t.length;s<i;++s)a=o,o=r,r=s<i-1&&oe(t[s+1],e),o&&(n=t[s],a&&(n.cp1x=Fe(n.cp1x,e.left,e.right),n.cp1y=Fe(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=Fe(n.cp2x,e.left,e.right),n.cp2y=Fe(n.cp2y,e.top,e.bottom)))}(t,s)}function Ue(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ve(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Be(t,e,s){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[s])):i=t,i}const Ne=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),He=["top","right","bottom","left"];function We(t,e,s){const i={};s=s?"-"+s:"";for(let n=0;n<4;n++){const o=He[n];i[o]=parseFloat(t[e+"-"+o+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Ye(t,e){if("native"in t)return t;const{canvas:s,currentDevicePixelRatio:i}=e,n=Ne(s),o="border-box"===n.boxSizing,a=We(n,"padding"),r=We(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const s=t.touches,i=s&&s.length?s[0]:t,{offsetX:n,offsetY:o}=i;let a,r,l=!1;if(((t,e,s)=>(t>0||e>0)&&(!s||!s.shadowRoot))(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=i.clientX-t.left,r=i.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,s),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:p,height:f}=e;return o&&(p-=a.width+r.width,f-=a.height+r.height),{x:Math.round((l-d)/p*s.width/i),y:Math.round((h-u)/f*s.height/i)}}const qe=t=>Math.round(10*t)/10;function Xe(t,e,s){const i=e||1,n=Math.floor(t.height*i),o=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(s||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=i,a.height=n,a.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ge=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ue()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Ke(t,e){const s=function(t,e){return Ne(t).getPropertyValue(e)}(t,e),i=s&&s.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ze(t,e,s,i){return{x:t.x+s*(e.x-t.x),y:t.y+s*(e.y-t.y)}}function Qe(t,e,s,i){return{x:t.x+s*(e.x-t.x),y:"middle"===i?s<.5?t.y:e.y:"after"===i?s<1?t.y:e.y:s>0?e.y:t.y}}function Je(t,e,s,i){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=Ze(t,n,s),r=Ze(n,o,s),l=Ze(o,e,s),h=Ze(a,r,s),c=Ze(r,l,s);return Ze(h,c,s)}function ts(t){return"angle"===t?{between:Mt,compare:kt,normalize:St}:{between:$t,compare:(t,e)=>t-e,normalize:t=>t}}function es({start:t,end:e,count:s,loop:i,style:n}){return{start:t%s,end:e%s,loop:i&&(e-t+1)%s==0,style:n}}function ss(t,e,s){if(!s)return[t];const{property:i,start:n,end:o}=s,a=e.length,{compare:r,between:l,normalize:h}=ts(i),{start:c,end:d,loop:u,style:p}=function(t,e,s){const{property:i,start:n,end:o}=s,{between:a,normalize:r}=ts(i),l=e.length;let h,c,{start:d,end:u,loop:p}=t;if(p){for(d+=l,u+=l,h=0,c=l;h<c&&a(r(e[d%l][i]),n,o);++h)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:p,style:t.style}}(t,e,s),f=[];let g,m,b,x=!1,_=null;for(let t=c,s=c;t<=d;++t)m=e[t%a],m.skip||(g=h(m[i]),g!==b&&(x=l(g,n,o),null===_&&(x||l(n,b,g)&&0!==r(n,b))&&(_=0===r(g,n)?t:s),null!==_&&(!x||0===r(o,g)||l(o,b,g))&&(f.push(es({start:_,end:t,loop:u,count:a,style:p})),_=null),s=t,b=g));return null!==_&&f.push(es({start:_,end:d,loop:u,count:a,style:p})),f}function is(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ns(t,e){if(!e)return!1;const s=[],i=function(t,e){return Ut(e)?(s.includes(e)||s.push(e),s.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function os(t,e,s){return t.options.clip?t[s]:e[s]}class as{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,i){const n=e.listeners[i],o=e.duration;
vendor: 1,448 bytes, line 28
28n.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(s-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=At.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((s,i)=>{if(!s.running||!s.items.length)return;const n=s.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>s.duration&&(s.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(i.draw(),this._notify(i,s,t,"progress")),n.length||(s.running=!1,this._notify(i,s,t,"complete"),s.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}
vendor: 8,953 bytes, line 28
28var rs=new as;const ls="transparent",hs={boolean:(t,e,s)=>s>.5?e:t,color(t,e,s){const i=Vt(t||ls),n=i.valid&&Vt(e||ls);return n&&n.valid?n.mix(i,s).hexString():e},number:(t,e,s)=>t+(e-t)*s};class cs{constructor(t,e,s,i){const n=e[s];i=_e([t.to,i,n,t.from]);const o=_e([t.from,n,i]);this._active=!0,this._fn=t.fn||hs[t.type||typeof o],this._easing=jt[t.easing]||jt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const i=this._target[this._prop],n=s-this._start,o=this._duration-n;this._start=s,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=_e([t.to,e,i,t.from]),this._from=_e([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,i=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e<s),!this._active)return this._target[i]=a,void this._notify(!0);e<0?this._target[i]=n:(r=e/s%2,r=o&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[i]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,s)=>{t.push({res:e,rej:s})}))}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let t=0;t<s.length;t++)s[t][e]()}}class ds{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!B(t))return;const e=Object.keys(te.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!B(n))return;const o={};for(const t of e)o[t]=n[t];(V(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&s.has(t)||s.set(t,o)}))}))}_animateOptions(t,e){const s=e.options,i=function(t,e){if(!e)return;let s=t.options;if(s)return s.$shared&&(t.options=s=Object.assign({},s,{$shared:!1,$animations:{}})),s;t.options=e}(t,s);if(!i)return[];const n=this._createAnimations(i,s);return s.$shared&&function(t,e){const s=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const n=t[i[e]];n&&n.active()&&s.push(n.wait())}return Promise.all(s)}(t.options.$animations,s).then((()=>{t.options=s}),(()=>{})),n}_createAnimations(t,e){const s=this._properties,i=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=s.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new cs(d,t,l,h),i.push(c)):t[l]=h}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const s=this._createAnimations(t,e);return s.length?(rs.add(this._chart,s),!0):void 0}}function us(t,e){const s=t&&t.options||{},i=s.reverse,n=void 0===s.min?e:0,o=void 0===s.max?e:0;return{start:i?o:n,end:i?n:o}}function ps(t,e){const s=[],i=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=i.length;n<o;++n)s.push(i[n].index);return s}function fs(t,e,s,i={}){const n=t.keys,o="single"===i.mode;let a,r,l,h;if(null===e)return;let c=!1;for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===s){if(c=!0,i.all)continue;break}h=t.values[l],N(h)&&(o||0===e||mt(e)===mt(h))&&(e+=h)}return c||i.all?e:0}function gs(t,e){const s=t&&t.options.stacked;return s||void 0===s&&void 0!==e.stack}function ms(t,e,s){const i=t[e]||(t[e]={});return i[s]||(i[s]={})}function bs(t,e,s,i){for(const n of e.getMatchingVisibleMetas(i).reverse()){const e=t[n.index];if(s&&e>0||!s&&e<0)return n.index}return null}function xs(t,e){const{chart:s,_cachedMeta:i}=t,n=s._stacks||(s._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,h=a.axis,c=function(t,e,s){return`${t.id}.${e.id}.${s.stack||s.type}`}(o,a,i),d=e.length;let u;for(let t=0;t<d;++t){const s=e[t],{[l]:o,[h]:d}=s;u=(s._stacks||(s._stacks={}))[h]=ms(n,c,o),u[r]=d,u._top=bs(u,a,!0,i.type),u._bottom=bs(u,a,!1,i.type),(u._visualValues||(u._visualValues={}))[r]=d}}function _s(t,e){const s=t.scales;return Object.keys(s).filter((t=>s[t].axis===e)).shift()}function vs(t,e){const s=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][s])return;delete e[i][s],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[s]&&delete e[i]._visualValues[s]}}}const ys=t=>"reset"===t||"none"===t,ws=(t,e)=>e?t:Object.assign({},t);class ks{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=gs(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&vs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),i=(t,e,s,i)=>"x"===t?e:"r"===t?i:s,n=e.xAxisID=W(s.xAxisID,_s(t,"x")),o=e.yAxisID=W(s.yAxisID,_s(t,"y")),a=e.rAxisID=W(s.rAxisID,_s(t,"r")),r=e.indexAxis,l=e.iAxisID=i(r,n,o,a),h=e.vAxisID=i(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ct(this._data,this),t._stacked&&vs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(B(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:s,vScale:i}=e,n="x"===s.axis?"x":"y",o="x"===i.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let l,h,c;for(l=0,h=a.length;l<h;++l)c=a[l],r[l]={[n]:c,[o]:t[c]};return r}(e,t)}else if(s!==e){if(s){Ct(s,this);const t=this._cachedMeta;vs(t),t._parsed=[]}e&&Object.isExtensible(e)&&((i=e)._chartjs?i._chartjs.listeners.push(this):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),Dt.forEach((t=>{const e="_onData"+it(t),s=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const n=s.apply(this,t);return i._chartjs.listeners.forEach((s=>{"function"==typeof s[e]&&s[e](...t)})),n}})})))),this._syncList=[],this._data=e}var i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const n=e._stacked;e._stacked=gs(e.vScale,e),e.stack!==s.stack&&(i=!0,vs(e),e.stack=s.stack),this._resyncElements(t),(i||n!==e._stacked)&&(xs(this,e._parsed),e._stacked=gs(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:i}=this,{iScale:n,_stacked:o}=s,a=n.axis;let r,l,h,c=0===t&&e===i.length||s._sorted,d=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=i,s._sorted=!0,h=i;else{h=V(i[t])?this.parseArrayData(s,i,t,e):B(i[t])?this.parseObjectData(s,i,t,e):this.parsePrimitiveData(s,i,t,e);const n=()=>null===l[a]||d&&l[a]<d[a];for(r=0;r<e;++r)s._parsed[r+t]=l=h[r],c&&(n()&&(c=!1),d=l);s._sorted=c}o&&xs(this,h)}parsePrimitiveData(t,e,s,i){const{iScale:n,vScale:o}=t,a=n.axis,r=o.axis,l=n.getLabels(),h=n===o,c=new Array(i);let d,u,p;for(d=0,u=i;d<u;++d)p=d+s,c[d]={[a]:h||n.parse(l[p],p),[r]:o.parse(e[p],p)};return c}parseArrayData(t,e,s,i){const{xScale:n,yScale:o}=t,a=new Array(i);let r,l,h,c;for(r=0,l=i;r<l;++r)h=r+s,c=e[h],a[r]={x:n.parse(c[0],h),y:o.parse(c[1],h)};return a}parseObjectData(t,e,s,i){const{xScale:n,yScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(i);let h,c,d,u;for(h=0,c=i;h<c;++h)d=h+s,u=e[d],l[h]={x:n.parse(st(u,a),d),y:o.parse(st(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const i=this.chart,n=this._cachedMeta,o=e[t.axis];
vendor: 4,152 bytes, line 28
28return fs({keys:ps(i,!0),values:e._stacks[t.axis]._visualValues},o,n.index,{mode:s})}updateRangeFromParsed(t,e,s,i){const n=s[e.axis];let o=null===n?NaN:n;const a=i&&s._stacks[e.axis];i&&a&&(i.values=a,o=fs(i,n,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const s=this._cachedMeta,i=s._parsed,n=s._sorted&&t===s.iScale,o=i.length,a=this._getOtherScale(t),r=((t,e,s)=>t&&!e.hidden&&e._stacked&&{keys:ps(s,!0),values:null})(e,s,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:s,minDefined:i,maxDefined:n}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:n?s:Number.POSITIVE_INFINITY}}(a);let d,u;function p(){u=i[d];const e=u[a.axis];return!N(u[t.axis])||h>e||c<e}for(d=0;d<o&&(p()||(this.updateRangeFromParsed(l,t,u,r),!n));++d);if(n)for(d=o-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let i,n,o;for(i=0,n=e.length;i<n;++i)o=e[i][t.axis],N(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,i=e.vScale,n=this.getParsed(t);return{label:s?""+s.getLabelForValue(n[s.axis]):"",value:i?""+i.getLabelForValue(n[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,s,i,n;return B(t)?(e=t.top,s=t.right,i=t.bottom,n=t.left):e=s=i=n=t,{top:e,right:s,bottom:i,left:n,disabled:!1===t}}(W(this.options.clip,function(t,e,s){if(!1===s)return!1;const i=us(t,s),n=us(e,s);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,i=s.data||[],n=e.chartArea,o=[],a=this._drawStart||0,r=this._drawCount||i.length-a,l=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,n,a,r),h=a;h<a+r;++h){const e=i[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,n))}for(h=0;h<o.length;++h)o[h].draw(t,n)}getStyle(t,e){const s=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const i=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,s){return ve(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:s,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=i.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return ve(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=i,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=s,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const i="active"===e,n=this._cachedDataOpts,o=t+"-"+e,a=n[o],r=this.enableOptionSharing&&nt(s);if(a)return ws(a,r);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=i?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(te.elements[t]),p=l.resolveNamedOptions(d,u,(()=>this.getContext(s,i,e)),c);return p.$shared&&(p.$shared=r,n[o]=Object.freeze(ws(p,r))),p}_resolveAnimations(t,e,s){const i=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==i.options.animation){const i=this.chart.config,n=i.datasetAnimationScopeKeys(this._type,e),o=i.getOptionScopes(this.getDataset(),n);r=i.createResolver(o,this.getContext(t,s,e))}const l=new ds(i,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ys(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),i=this._sharedOptions,n=this.getSharedOptions(s),o=this.includeOptions(e,n)||n!==i;
vendor: 3,389 bytes, line 28
28return this.updateSharedOptions(n,e,s),{sharedOptions:n,includeOptions:o}}updateElement(t,e,s,i){ys(i)?Object.assign(t,s):this._resolveAnimations(e,i).update(t,s)}updateSharedOptions(t,e,s){t&&!ys(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,i){t.active=i;const n=this.getStyle(e,i);this._resolveAnimations(e,s,i).update(t,{options:!i&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[t,e,s]of this._syncList)this[t](e,s);this._syncList=[];const i=s.length,n=e.length,o=Math.min(n,i);o&&this.parse(0,o),n>i?this._insertElements(i,n-i,t):n<i&&this._removeElements(n,i-n)}_insertElements(t,e,s=!0){const i=this._cachedMeta,n=i.data,o=t+e;let a;const r=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;a<o;++a)n[a]=new this.dataElementType;this._parsing&&r(i._parsed),this.parse(t,e),s&&this.updateElements(n,t,e,"reset")}updateElements(t,e,s,i){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(t,e);s._stacked&&vs(s,i)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,i]=t;this[e](s,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Ss(t,e,s,i){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const a=r._reversePixels?Et:Pt;if(!i){const i=a(o,e,s);if(l){const{vScale:e}=n._cachedMeta,{_parsed:s}=t,o=s.slice(0,i.lo+1).reverse().findIndex((t=>!U(t[e.axis])));i.lo-=Math.max(0,o);const a=s.slice(i.hi).findIndex((t=>!U(t[e.axis])));i.hi+=Math.max(0,a)}return i}if(n._sharedOptions){const t=o[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=a(o,e,s-i),n=a(o,e,s+i);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:o.length-1}}function Ms(t,e,s,i,n){const o=t.getSortedVisibleDatasetMetas(),a=s[e];for(let t=0,s=o.length;t<s;++t){const{index:s,data:r}=o[t],{lo:l,hi:h}=Ss(o[t],e,a,n);for(let t=l;t<=h;++t){const e=r[t];e.skip||i(e,s,t)}}}function Os(t,e,s,i,n){const o=[];return n||t.isPointInArea(e)?(Ms(t,s,e,(function(s,a,r){(n||oe(s,t.chartArea,0))&&s.inRange(e.x,e.y,i)&&o.push({element:s,datasetIndex:a,index:r})}),!0),o):o}function $s(t,e,s,i,n,o){return o||t.isPointInArea(e)?"r"!==s||i?function(t,e,s,i,n,o){let a=[];const r=function(t){const e=-1!==t.indexOf("x"),s=-1!==t.indexOf("y");return function(t,i){const n=e?Math.abs(t.x-i.x):0,o=s?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}(s);let l=Number.POSITIVE_INFINITY;return Ms(t,s,e,(function(s,h,c){const d=s.inRange(e.x,e.y,n);if(i&&!d)return;const u=s.getCenterPoint(n);
vendor: 5,562 bytes, line 28
28if(!o&&!t.isPointInArea(u)&&!d)return;const p=r(e,u);p<l?(a=[{element:s,datasetIndex:h,index:c}],l=p):p===l&&a.push({element:s,datasetIndex:h,index:c})})),a}(t,e,s,i,n,o):function(t,e,s,i){let n=[];return Ms(t,s,e,(function(t,s,o){const{startAngle:a,endAngle:r}=t.getProps(["startAngle","endAngle"],i),{angle:l}=function(t,e){const s=e.x-t.x,i=e.y-t.y,n=Math.sqrt(s*s+i*i);let o=Math.atan2(i,s);return o<-.5*rt&&(o+=lt),{angle:o,distance:n}}(t,{x:e.x,y:e.y});Mt(l,a,r)&&n.push({element:t,datasetIndex:s,index:o})})),n}(t,e,s,n):[]}function Ts(t,e,s,i,n){const o=[],a="x"===s?"inXRange":"inYRange";let r=!1;return Ms(t,s,e,((t,i,l)=>{t[a]&&t[a](e[s],n)&&(o.push({element:t,datasetIndex:i,index:l}),r=r||t.inRange(e.x,e.y,n))})),i&&!r?[]:o}var Ps={evaluateInteractionItems:Ms,modes:{index(t,e,s,i){const n=Ye(e,t),o=s.axis||"x",a=s.includeInvisible||!1,r=s.intersect?Os(t,n,o,i,a):$s(t,n,o,!1,i,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,s=t.data[e];s&&!s.skip&&l.push({element:s,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,s,i){const n=Ye(e,t),o=s.axis||"xy",a=s.includeInvisible||!1;let r=s.intersect?Os(t,n,o,i,a):$s(t,n,o,!1,i,a);if(r.length>0){const e=r[0].datasetIndex,s=t.getDatasetMeta(e).data;r=[];for(let t=0;t<s.length;++t)r.push({element:s[t],datasetIndex:e,index:t})}return r},point:(t,e,s,i)=>Os(t,Ye(e,t),s.axis||"xy",i,s.includeInvisible||!1),nearest(t,e,s,i){const n=Ye(e,t),o=s.axis||"xy",a=s.includeInvisible||!1;return $s(t,n,o,s.intersect,i,a)},x:(t,e,s,i)=>Ts(t,Ye(e,t),"x",s.intersect,i),y:(t,e,s,i)=>Ts(t,Ye(e,t),"y",s.intersect,i)}};const Es=["left","top","right","bottom"];function Ds(t,e){return t.filter((t=>t.pos===e))}function Cs(t,e){return t.filter((t=>-1===Es.indexOf(t.pos)&&t.box.axis===e))}function As(t,e){return t.sort(((t,s)=>{const i=e?s:t,n=e?t:s;return i.weight===n.weight?i.index-n.index:i.weight-n.weight}))}function Is(t,e,s,i){return Math.max(t[s],e[s])+Math.max(t[i],e[i])}function Rs(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ls(t,e,s,i){const{pos:n,box:o}=s,a=t.maxPadding;if(!B(n)){s.size&&(t[n]-=s.size);const e=i[s.stack]||{size:0,count:1};e.size=Math.max(e.size,s.horizontal?o.height:o.width),s.size=e.size/e.count,t[n]+=s.size}o.getPadding&&Rs(a,o.getPadding());const r=Math.max(0,e.outerWidth-Is(a,t,"left","right")),l=Math.max(0,e.outerHeight-Is(a,t,"top","bottom")),h=r!==t.w,c=l!==t.h;return t.w=r,t.h=l,s.horizontal?{same:h,other:c}:{same:c,other:h}}function zs(t,e){const s=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],s[t])})),i}(t?["left","right"]:["top","bottom"])}function Fs(t,e,s,i){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;o<a;++o){r=t[o],l=r.box,l.update(r.width||e.w,r.height||e.h,zs(r.horizontal,e));const{same:a,other:d}=Ls(e,s,r,i);h|=a&&n.length,c=c||d,l.fullSize||n.push(r)}return h&&Fs(n,e,s,i)||c}function js(t,e,s,i,n){t.top=s,t.left=e,t.right=e+i,t.bottom=s+n,t.width=i,t.height=n}function Us(t,e,s,i){const n=s.padding;let{x:o,y:a}=e;for(const r of t){const t=r.box,l=i[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/l.weight||1;if(r.horizontal){const i=e.w*h,o=l.size||t.height;nt(l.start)&&(a=l.start),t.fullSize?js(t,n.left,a,s.outerWidth-n.right-n.left,o):js(t,e.left+l.placed,a,i,o),l.start=a,l.placed+=i,a=t.bottom}else{const i=e.h*h,a=l.size||t.width;nt(l.start)&&(o=l.start),t.fullSize?js(t,o,n.top,a,s.outerHeight-n.bottom-n.top):js(t,o,e.top+l.placed,a,i),l.start=o,l.placed+=i,o=t.right}}e.x=o,e.y=a}var Vs={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const s=t.boxes?t.boxes.indexOf(e):-1;-1!==s&&t.boxes.splice(s,1)},configure(t,e,s){e.fullSize=s.fullSize,e.position=s.position,e.weight=s.weight},update(t,e,s,i){if(!t)return;const n=be(t.options.layout.padding),o=Math.max(e-n.width,0),a=Math.max(s-n.height,0),r=function(t){const e=function(t){const e=[];let s,i,n,o,a,r;for(s=0,i=(t||[]).length;s<i;++s)n=t[s],({position:o,options:{stack:a,stackWeight:r=1}}=n),e.push({index:s,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return e}(t),s=As(e.filter((t=>t.box.fullSize)),!0),i=As(Ds(e,"left"),!0),n=As(Ds(e,"right")),o=As(Ds(e,"top"),!0),a=As(Ds(e,"bottom")),r=Cs(e,"x"),l=Cs(e,"y");return{fullSize:s,leftAndTop:i.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ds(e,"chartArea"),vertical:i.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;q(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:s,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);Rs(u,be(i));const p=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),f=function(t,e){const s=function(t){const e={};for(const s of t){const{stack:t,pos:i,stackWeight:n}=s;if(!t||!Es.includes(i))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o<a;++o){r=t[o];const{fullSize:a}=r.box,l=s[r.stack],h=l&&r.stackWeight/l.weight;r.horizontal?(r.width=h?h*i:a&&e.availableWidth,r.height=n):(r.width=i,r.he
vendor: 12,815 bytes, line 28
28ight=h?h*n:a&&e.availableHeight)}return s}(l.concat(h),d);Fs(r.fullSize,p,d,f),Fs(l,p,d,f),Fs(h,p,d,f)&&Fs(l,p,d,f),function(t){const e=t.maxPadding;function s(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=s("top"),t.x+=s("left"),s("right"),s("bottom")}(p),Us(r.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,Us(r.rightAndBottom,p,d,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},q(r.chartArea,(e=>{const s=e.box;Object.assign(s,t.chartArea),s.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Bs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,i){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):s)}}isAttached(t){return!0}updateConfig(t){}}class Ns extends Bs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Hs="$chartjs",Ws={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ys=t=>null===t||""===t,qs=!!Ge&&{passive:!0};function Xs(t,e,s){t&&t.canvas&&t.canvas.removeEventListener(e,s,qs)}function Gs(t,e){for(const s of t)if(s===e||s.contains(e))return!0}function Ks(t,e,s){const i=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const s of t)e=e||Gs(s.addedNodes,i),e=e&&!Gs(s.removedNodes,i);e&&s()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Zs(t,e,s){const i=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const s of t)e=e||Gs(s.removedNodes,i),e=e&&!Gs(s.addedNodes,i);e&&s()}));return n.observe(document,{childList:!0,subtree:!0}),n}const Qs=new Map;let Js=0;function ti(){const t=window.devicePixelRatio;t!==Js&&(Js=t,Qs.forEach(((e,s)=>{s.currentDevicePixelRatio!==t&&e()})))}function ei(t,e,s){const i=t.canvas,n=i&&Ve(i);if(!n)return;const o=It(((t,e)=>{const i=n.clientWidth;s(t,e),i<n.clientWidth&&s()}),window),a=new ResizeObserver((t=>{const e=t[0],s=e.contentRect.width,i=e.contentRect.height;0===s&&0===i||o(s,i)}));return a.observe(n),function(t,e){Qs.size||window.addEventListener("resize",ti),Qs.set(t,e)}(t,o),a}function si(t,e,s){s&&s.disconnect(),"resize"===e&&function(t){Qs.delete(t),Qs.size||window.removeEventListener("resize",ti)}(t)}function ii(t,e,s){const i=t.canvas,n=It((e=>{null!==t.ctx&&s(function(t,e){const s=Ws[t.type]||t.type,{x:i,y:n}=Ye(t,e);return{type:s,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,s){t&&t.addEventListener(e,s,qs)}(i,e,n),n}class ni extends Bs{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(function(t,e){const s=t.style,i=t.getAttribute("height"),n=t.getAttribute("width");if(t[Hs]={initial:{height:i,width:n,style:{display:s.display,height:s.height,width:s.width}}},s.display=s.display||"block",s.boxSizing=s.boxSizing||"border-box",Ys(n)){const e=Ke(t,"width");void 0!==e&&(t.width=e)}if(Ys(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ke(t,"height");void 0!==e&&(t.height=e)}}(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[Hs])return!1;const s=e[Hs].initial;["height","width"].forEach((t=>{const i=s[t];U(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=s.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[Hs],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),n={attach:Ks,detach:Zs,resize:ei}[e]||ii;i[e]=n(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),i=s[e];i&&(({attach:si,detach:si,resize:si}[e]||Xs)(t,e,i),s[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,i){return function(t,e,s,i){const n=Ne(t),o=We(n,"margin"),a=Be(n.maxWidth,t,"clientWidth")||ct,r=Be(n.maxHeight,t,"clientHeight")||ct,l=function(t,e,s){let i,n;if(void 0===e||void 0===s){const o=t&&Ve(t);if(o){const t=o.getBoundingClientRect(),a=Ne(o),r=We(a,"border","width"),l=We(a,"padding");e=t.width-l.width-r.width,s=t.height-l.height-r.height,i=Be(a.maxWidth,o,"clientWidth"),n=Be(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,s=t.clientHeight}return{width:e,height:s,maxWidth:i||ct,maxHeight:n||ct}}(t,e,s);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=We(n,"border","width"),e=We(n,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,i?h/i:c-o.height),h=qe(Math.min(h,a,l.maxWidth)),c=qe(Math.min(c,r,l.maxHeight)),h&&!c&&(c=qe(h/2)),(void 0!==e||void 0!==s)&&i&&l.height&&c>l.height&&(c=l.height,h=qe(Math.floor(c*i))),{width:h,height:c}}(t,e,s,i)}isAttached(t){const e=t&&Ve(t);return!(!e||!e.isConnected)}}class oi{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return _t(this.x)&&_t(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const i={};return t.forEach((t=>{i[t]=s[t]&&s[t].active()?s[t]._to:this[t]})),i}}function ai(t,e,s,i,n){const o=W(i,0),a=Math.min(W(n,t.length),t.length);let r,l,h,c=0;for(s=Math.ceil(s),n&&(r=n-i,s=r/Math.floor(r/s)),h=o;h<0;)c++,h=Math.round(o+c*s);for(l=Math.max(o,0);l<a;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*s))}const ri=(t,e,s)=>"top"===e||"left"===e?t[e]+s:t[e]-s,li=(t,e)=>Math.min(e||t,t);function hi(t,e){const s=[],i=t.length/e,n=t.length;let o=0;for(;o<n;o+=i)s.push(t[Math.floor(o)]);return s}function ci(t,e,s){const i=t.ticks.length,n=Math.min(e,i-1),o=t._startPixel,a=t._endPixel,r=1e-6;let l,h=t.getPixelForTick(n);if(!(s&&(l=1===i?Math.max(h-o,a-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(n-1))/2,h+=n<e?l:-l,h<o-r||h>a+r)))return h}function di(t){return t.drawTicks?t.tickLength:0}function ui(t,e){if(!t.display)return 0;const s=xe(t.font,e),i=be(t.padding);return(V(t.text)?t.text.length:1)*s.lineHeight+i.height}function pi(t,e,s){let i=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(s&&"right"!==e||!s&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class fi extends oi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:i}=this;return t=H(t,Number.POSITIVE_INFINITY),e=H(e,Number.NEGATIVE_INFINITY),s=H(s,Number.POSITIVE_INFINITY),i=H(i,Number.NEGATIVE_INFINITY),{min:H(t,s),max:H(e,i),minDefined:N(t),maxDefined:N(e)}}getMinMax(t){let e,{min:s,max:i,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:s,max:i};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;r<l;++r)e=a[r].controller.getMinMax(this,t),n||(s=Math.min(s,e.min)),o||(i=Math.max(i,e.max));return s=o&&s>i?i:s,i=n&&s>i?s:i,{min:H(s,H(i,s)),max:H(i,H(s,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Y(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:i,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,s){const{min:i,max:n}=t,o=(l=(n-i)/2,"string"==typeof(r=e)&&r.endsWith("%")?parseFloat(r)/100*l:+r),a=(t,e)=>s&&0===t?0:t+e;var r,l;return{min:a(i,-Math.abs(o)),max:a(n,o)}}(this,n,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a<this.ticks.length;this._convertTicksToLabels(r?hi(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(t,e){const s=t.options.ticks,i=function(t){const e=t.options.offset,s=t._tickSize(),i=t._length/s+(e?0:1),n=t._maxLength/s;return Math.floor(Math.min(i,n))}(t),n=Math.min(s.maxTicksLimit||i,i),o=s.major.enabled?function(t){const e=[];let s,i;for(s=0,i=t.length;s<i;s++)t[s].major&&e.push(s);return e}(e):[],a=o.length,r=o[0],l=o[a-1],h=[];if(a>n)return function(t,e,s,i){let n,o=0,a=s[0];for(i=Math.ceil(i),n=0;n<t.length;n++)n===a&&(e.push(t[n]),o++,a=s[o*i])}(e,h,o,a/n),h;const c=function(t,e,s){const i=function(t){const e=t.length;let s,i;if(e<2)return!1;for(i=t[0],s=1;s<e;++s)if(t[s]-t[s-1]!==i)return!1;return i}(t),n=e.length/s;if(!i)return Math.max(n,1);const o=function(t){const e=[],s=Math.sqrt(t);let i;for(i=1;i<s;i++)t%i==0&&(e.push(i),e.push(t/i));return s===(0|s)&&e.push(s),e.sort(((t,e)=>t-e)).pop(),e}(i);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>n)return e}return Math.max(n,1)}(o,e,n);if(a>0){let t,s;const i=a>1?Math.round((l-r)/(a-1)):null;for(ai(e,h,c,U(i)?0:r-i,r),t=0,s=a-1;t<s;t++)ai(e,h,c,o[t],o[t+1]);return ai(e,h,c,l,U(i)?e.length:l+i),h}return ai(e,h,c),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,s=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,s=!s),this._startPixel=t,this._endPixel=e,this._reversePixels=s,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Y(this.options.afterUpdate,[this])}beforeSetDimensions(){Y(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Y(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Y(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Y(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,i,n;for(s=0,i=t.length;s<i;s++)n=t[s],n.label=Y(e.callback,[n.value,s,t],this)}afterTickToLabelConversion(){Y(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Y(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=li(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,n=e.maxRotation;let o,a,r,l=i;if(!this._isVisible()||!e.display||i>=n||s<=1||!this.isHorizontal())return void(this.labelRotation=i);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Ot(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/s:u/(s-1),c+6>o&&(o=u/(s-(t.offset?.5:1)),a=this.maxHeight-di(t.grid)-e.padding-ui(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Math.min(Math.asin(Ot((h.highe
vendor: 13,539 bytes, line 28
28st.height+6)/o,-1,1)),Math.asin(Ot(a/r,-1,1))-Math.asin(Ot(d/r,-1,1)))*(180/rt),l=Math.max(i,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){Y(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Y(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:i,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=ui(i,e.options.font);if(a?(t.width=this.maxWidth,t.height=di(n)+o):(t.height=this.maxHeight,t.width=di(n)+o),s.display&&this.ticks.length){const{first:e,last:i,widest:n,highest:o}=this._getLabelSizes(),r=2*s.padding,l=vt(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=s.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=s.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,i,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,i){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=i*t.width,d=s*e.height):(c=s*t.height,d=i*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let s=e.height/2,i=t.height/2;"start"===n?(s=0,i=t.height):"end"===n&&(s=e.height,i=0),this.paddingTop=s+o,this.paddingBottom=i+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Y(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,s=t.length;e<s;e++)U(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=hi(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:i,_longestTextCache:n}=this,o=[],a=[],r=Math.floor(e/li(e,s));let l,h,c,d,u,p,f,g,m,b,x,_=0,v=0;for(l=0;l<e;l+=r){if(d=t[l].label,u=this._resolveTickFontOptions(l),i.font=p=u.string,f=n[p]=n[p]||{data:{},gc:[]},g=u.lineHeight,m=b=0,U(d)||V(d)){if(V(d))for(h=0,c=d.length;h<c;++h)x=d[h],U(x)||V(x)||(m=ee(i,f.data,f.gc,m,x),b+=g)}else m=ee(i,f.data,f.gc,m,d),b=g;o.push(m),a.push(b),_=Math.max(m,_),v=Math.max(b,v)}!function(t,e){q(t,(t=>{const s=t.gc,i=s.length/2;let n;if(i>e){for(n=0;n<i;++n)delete t.data[s[n]];s.splice(0,i)}}))}(n,e);const y=o.indexOf(_),w=a.indexOf(v),k=t=>({width:o[t]||0,height:a[t]||0});return{first:k(0),last:k(e-1),widest:k(y),highest:k(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ot(this._alignToPixels?se(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=function(t,e,s){return ve(t,{tick:s,index:e,type:"tick"})}(this.getContext(),t,s))}return this.$context||(this.$context=ve(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=vt(this.labelRotation),s=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),n=this._getLabelSizes(),o=t.autoSkipPadding||0,a=n?n.widest.width+o:0,r=n?n.highest.height+o:0;return this.isHorizontal()?r*s>a*i?a/s:r/i:r*i<a*s?r/s:a/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,i=this.options,{grid:n,position:o,border:a}=i,r=n.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),c=di(n),d=[],u=a.setContext(this.getContext()),p=u.display?u.width:0,f=p/2,g=function(t){return se(s,t,p)};let m,b,x,_,v,y,w,k,S,M,O,$;if("top"===o)m=g(this.bottom),y=this.bottom-c,k=m-f,M=g(t.top)+f,$=t.bottom;else if("bottom"===o)m=g(this.top),M=t.top,$=g(t.bottom)-f,y=m+f,k=this.top+c;else if("left"===o)m=g(this.right),v=this.right-c,w=m-f,S=g(t.left)+f,O=t.right;else if("right"===o)m=g(this.left),S=t.left,O=g(t.right)-f,v=m+f,w=this.left+c;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}M=t.top,$=t.bottom,y=m+f,k=y+c}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}v=m-f,w=v-c,S=t.left,O=t.right}const T=W(i.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/T));for(b=0;b<h;b+=P){const t=this.getContext(b),e=n.setContext(t),i=a.setContext(t),o=e.lineWidth,h=e.color,c=i.dash||[],u=i.dashOffset,p=e.tickWidth,f=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;x=ci(this,b,r),void 0!==x&&(_=se(s,x,o),l?v=w=S=O=_:y=k=M=$=_,d.push({tx1:v,ty1:y,tx2:w,ty2:k,x1:S,y1:M,x2:O,y2:$,width:o,color:h,borderDash:c,borderDashOffset:u,tickWidth:p,tickColor:f,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=h,this._borderValue=m,d}_computeLabelItems(t){const e=this.axis,s=this.options,{position:i,ticks:n}=s,o=this.isHorizontal(),a=this.ticks,{align:r,crossAlign:l,padding:h,mirror:c}=n,d=di(s.grid),u=d+h,p=c?-h:u,f=-vt(this.labelRotation),g=[];let m,b,x,_,v,y,w,k,S,M,O,$,T="middle";if("top"===i)y=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===i)y=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,v=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,v=t.x}else if("x"===e){if("center"===i)y=(t.top+t.bottom)/2+u;else if(B(i)){const t=Object.keys(i)[0],e=i[t];y=this.chart.scales[t].getPixelForValue(e)+u}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)v=(t.left+t.right)/2-u;else if(B(i)){const t=Object.keys(i)[0],e=i[t];v=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===r?T="top":"end"===r&&(T="bottom"));const P=this._getLabelSizes();for(m=0,b=a.length;m<b;++m){x=a[m],_=x.label;const t=n.setContext(this.getContext(m));k=this.getPixelForTick(m)+n.labelOffset,S=this._resolveTickFontOptions(m),M=S.lineHeight,O=V(_)?_.length:1;const e=O/2,s=t.color,r=t.textStrokeColor,h=t.textStrokeWidth;let d,u=w;if(o?(v=k,"inner"===w&&(u=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),$="top"===i?"near"===l||0!==f?-O*M+M/2:"center"===l?-P.highest.height/2-e*M+M:-P.highest.height+M/2:"near"===l||0!==f?M/2:"center"===l?P.highest.height/2-e*M:P.highest.height-O*M,c&&($*=-1),0===f||t.showLabelBackdrop||(v+=M/2*Math.sin(f))):(y=k,$=(1-O)*M/2),t.showLabelBackdrop){const e=be(t.backdropPadding),s=P.heights[m],i=P.widths[m];let n=$-e.top,o=0-e.left;switch(T){case"middle":n-=s/2;break;case"bottom":n-=s}switch(w){case"center":o-=i/2;break;case"right":o-=i;break;case"inner":m===b-1?o-=i:m>0&&(o-=i/2)}d={left:o,top:n,width:i+e.width,height:s+e.height,color:t.backdropColor}}g.push({label:_,font:S,textOffset:$,options:{rotation:f,color:s,strokeColor:r,strokeWidth:h,textAlign:u,textBaseline:T,translation:[v,y],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-vt(this.labelRotation))return"top"===t?"left":"right";let s="center";return"start"===e.align?s="left":"end"===e.align?s="right":"inner"===e.align&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:i,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,l;return"left"===e?i?(l=this.right+n,"near"===s?r="left":"center"===s?(r="center",l+=a/2):(r="right",l+=a)):(l=this.right-o,"near"===s?r="right":"center"===s?(r="center",l-=a/2):(r="left",l=this.left)):"right"===e?i?(l=this.left+n,"near"===s?r="right":"center"===s?(r="center",l-=a/2):(r="left",l-=a)):(l=this.left+o,"near"===s?r="left":"center"===s?(r="center",l+=a/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:i,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,i,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex((e=>e.value===t));return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,i)=>{i.width&&i.color&&(s.save(),s.lineWidth=i.width,s.strokeStyle=i.color,s.setLineDash(i.borderDash||[]),s.lineDashOffset=i.borderDashOffset,s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(e.x,e.y),s.stroke(),s.restore())};if(e.display)for(n=0,o=i.length;n<o;++n){const t=i[n];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:i}}=this,n=s.setContext(this.getContext()),o=s.display?n.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,h,c,d;this.isHorizontal()?(l=se(t,this.left,o)-o/2,h=se(t,this.right,a)+a/2,c=d=r):(c=se(t,this.top,o)-o/2,d=se(t,this.bottom,a)+a/2,l=h=r),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,s=this._computeLabelArea();s&&ae(e,s);const i=this.getLabelItems(t);for(const t of i){const s=t.options,i=t.font;ue(e,t.label,0,t.textOffset,i,s)}s&&re(e)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:i}}=this;if(!s.display)return;const n=xe(s.font),o=be(s.padding),a=s.align;let r=n.lineHeight/2;"bottom"===e||"center"===e||B(e)?(r+=o.bottom,V(s.text)&&(r+=n.lineHeight*(s.text.length-1))):r+=o.top;const{titleX:l,titleY:h,maxWidth:c,rotation:d}=function(t,e,s,i){const{top:n,left:o,bottom:a,right:r,chart:l}=t,{chartArea:h,scales:c}=l;let d,u,p,f=0;const g=a-n,m=r-o;if(t.isHorizontal()){if(u=Rt(i,o,r),B(s)){const t=Object.keys(s)[0],i=s[t];p=c[t].getPixelForValue(i)+g-e}else p="center"===s?(h.bottom+h.top)/2+g-e:ri(t,s,e);d=r-o}else{if(B(s)){const t=Object.keys(s)[0],i=s[t];u=c[t].getPixelForValue(i)-m+e}else u="center"===s?(h.left+h.right)/2-m+e:ri(t,s,e);p=Rt(i,a,n),f="left"===s?-ut:ut}return{titleX:u,titleY:p,maxWidth:d,rotation:f}}(this,r,e,a);ue(t,s.text,0,0,n,{color:s.color,maxWidth:c,rotation:d,textAlign:pi(a,e,i),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=W(t.grid&&t.grid.z,-1),i=W(t.border&&t.border.z,0);return this._isVisible()&&this.draw===fi.prototype.draw?[{z:s,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[s]!==this.id||t&&o.type!==t||i.push(o)}return i}_resolveTickFontOptions(t){return xe(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class gi{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;(function(t){return"id"in t&&"defaults"in t})(e)&&(s=this.register(e));const i=this.items,n=t.id,o=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in i||(i[n]=t,function(t,e,s){const i=Q(Object.create(null),[s?te.get(s):{},te.get(e),t.defaults]);te.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((s=>{const i=s.split("."),n=i.pop(),o=[t].concat(i).join("."),a=e[s].split("."),r=a.pop(),l=a.join(".");te.route(o,n,l,r)}))}
vendor: 4,241 bytes, line 28
28(e,t.defaultRoutes),t.descriptors&&te.describe(e,t.descriptors)}(t,o,s),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,i=this.scope;s in e&&delete e[s],i&&s in te[i]&&(delete te[i][s],this.override&&delete Gt[s])}}class mi{constructor(){this.controllers=new gi(ks,"datasets",!0),this.elements=new gi(oi,"elements"),this.plugins=new gi(Object,"plugins"),this.scales=new gi(fi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach((e=>{const i=s||this._getRegistryForType(e);s||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):q(e,(e=>{const i=s||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,s){const i=it(t);Y(s["before"+i],[],s),e[t](s),Y(s["after"+i],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+s+".");return i}}var bi=new mi;class xi{constructor(){this._init=[]}notify(t,e,s,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(n,t,e,s);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,s,i){i=i||{};for(const n of t){const t=n.plugin;if(!1===Y(t[s],[e,i,n.options],t)&&i.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,i=W(s.options&&s.options.plugins,{}),n=function(t){const e={},s=[],i=Object.keys(bi.plugins.items);for(let t=0;t<i.length;t++)s.push(bi.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===s.indexOf(i)&&(s.push(i),e[i.id]=!0)}return{plugins:s,localIds:e}}(s);return!1!==i||e?function(t,{plugins:e,localIds:s},i,n){const o=[],a=t.getContext();for(const r of e){const e=r.id,l=_i(i[e],n);null!==l&&o.push({plugin:r,options:vi(t.config,{plugin:r,local:s[e]},l,a)})}return o}(t,n,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,s),t,"stop"),this._notify(i(s,e),t,"start")}}function _i(t,e){return e||!1!==t?!0===t?{}:t:null}function vi(t,{plugin:e,local:s},i,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(i,o);return s&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yi(t,e){const s=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||s.indexAxis||"x"}function wi(t){if("x"===t||"y"===t||"r"===t)return t}function ki(t,...e){if(wi(t))return t;for(const i of e){const e=i.axis||("top"===(s=i.position)||"bottom"===s?"x":"left"===s||"right"===s?"y":void 0)||t.length>1&&wi(t[0].toLowerCase());if(e)return e}var s;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Si(t,e,s){if(s[e+"AxisID"]===t)return{axis:e}}function Mi(t){const e=t.options||(t.options={});e.plugins=W(e.plugins,{}),e.scales=function(t,e){const s=Gt[t.type]||{scales:{}},i=e.scales||{},n=yi(t.type,e),o=Object.create(null);
vendor: 18,056 bytes, line 28
28return Object.keys(i).forEach((e=>{const a=i[e];if(!B(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=ki(e,a,function(t,e){if(e.data&&e.data.datasets){const s=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(s.length)return Si(t,"x",s[0])||Si(t,"y",s[0])}return{}}(e,t),te.scales[a.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),h=s.scales||{};o[e]=J(Object.create(null),[{axis:r},a,h[r],h[l]])})),t.data.datasets.forEach((s=>{const n=s.type||t.type,a=s.indexAxis||yi(n,e),r=(Gt[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let s=t;return"_index_"===t?s=e:"_value_"===t&&(s="x"===e?"y":"x"),s}(t,a),n=s[e+"AxisID"]||e;o[n]=o[n]||Object.create(null),J(o[n],[{axis:e},i[n],r[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];J(e,[te.scales[e.type],te.scale])})),o}(t,e)}function Oi(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $i=new Map,Ti=new Set;function Pi(t,e){let s=$i.get(t);return s||(s=e(),$i.set(t,s),Ti.add(s)),s}const Ei=(t,e,s)=>{const i=st(e,s);void 0!==i&&t.add(i)};class Di{constructor(t){this._config=function(t){return(t=t||{}).data=Oi(t.data),Mi(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Oi(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Mi(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Pi(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Pi(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Pi(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Pi(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const s=this._scopeCache;let i=s.get(t);return i&&!e||(i=new Map,s.set(t,i)),i}getOptionScopes(t,e,s){const{options:i,type:n}=this,o=this._cachedScopes(t,s),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Ei(r,t,e)))),e.forEach((t=>Ei(r,i,t))),e.forEach((t=>Ei(r,Gt[n]||{},t))),e.forEach((t=>Ei(r,te,t))),e.forEach((t=>Ei(r,Kt,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Ti.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Gt[e]||{},te.datasets[e]||{},{type:e},te,Kt]}resolveNamedOptions(t,e,s,i=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=Ci(this._resolverCache,t,i);let r=o;(function(t,e){const{isScriptable:s,isIndexable:i}=ke(t);for(const n of e){const e=s(n),o=i(n),a=(o||e)&&t[n];if(e&&(ot(a)||Ai(a))||o&&V(a))return!0}return!1})(o,e)&&(n.$shared=!1,r=we(o,s=ot(s)?s():s,this.createResolver(t,s,a)));for(const t of e)n[t]=r[t];return n}createResolver(t,e,s=[""],i){const{resolver:n}=Ci(this._resolverCache,t,s);return B(e)?we(n,e,void 0,i):n}}function Ci(t,e,s){let i=t.get(e);i||(i=new Map,t.set(e,i));const n=s.join();let o=i.get(n);return o||(o={resolver:ye(e,s),subPrefixes:s.filter((t=>!t.toLowerCase().includes("hover")))},i.set(n,o)),o}const Ai=t=>B(t)&&Object.getOwnPropertyNames(t).some((e=>ot(t[e]))),Ii=["top","bottom","left","right","chartArea"];function Ri(t,e){return"top"===t||"bottom"===t||-1===Ii.indexOf(t)&&"x"===e}function Li(t,e){return function(s,i){return s[t]===i[t]?s[e]-i[e]:s[t]-i[t]}}function zi(t){const e=t.chart,s=e.options.animation;e.notifyPlugins("afterRender"),Y(s&&s.onComplete,[t],e)}function Fi(t){const e=t.chart,s=e.options.animation;Y(s&&s.onProgress,[t],e)}function ji(t){return Ue()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ui={},Vi=t=>{const e=ji(t);return Object.values(Ui).filter((t=>t.canvas===e)).pop()};function Bi(t,e,s){const i=Object.keys(t);for(const n of i){const i=+n;if(i>=e){const o=t[n];delete t[n],(s>0||i>e)&&(t[i+s]=o)}}}class Ni{static defaults=te;static instances=Ui;static overrides=Gt;static registry=bi;static version="4.5.0";static getChart=Vi;static register(...t){bi.add(...t),Hi()}static unregister(...t){bi.remove(...t),Hi()}constructor(t,e){const s=this.config=new Di(e),i=ji(t),n=Vi(i);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||function(t){return!Ue()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ns:ni}(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,o.aspectRatio),r=a&&a.canvas,l=r&&r.height,h=r&&r.width;this.id=j(),this.ctx=a,this.canvas=r,this.width=h,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xi,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let s;return function(...i){return e?(clearTimeout(s),s=setTimeout(t,e,i)):t.apply(this,i),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],Ui[this.id]=this,a&&r?(rs.listen(this,"complete",zi),rs.listen(this,"progress",Fi),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:i,_aspectRatio:n}=this;return U(t)?e&&n?n:i?s/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return bi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Xe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ie(this.canvas,this.ctx),this}stop(){return rs.stop(this),this}resize(t,e){rs.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,i=this.canvas,n=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,e,n),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Xe(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Y(s.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){q(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,i=Object.keys(s).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const s=e[t],i=ki(t,s),n="r"===i,o="x"===i;return{options:s,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),q(n,(e=>{const n=e.options,o=n.id,a=ki(o,n),r=W(n.type,e.dtype);void 0!==n.position&&Ri(n.position,a)===Ri(e.dposition)||(n.position=e.dposition),i[o]=!0;let l=null;o in s&&s[o].type===r?l=s[o]:(l=new(bi.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),s[l.id]=l),l.init(n,t)})),q(i,((t,e)=>{t||delete s[e]})),q(s,(t=>{Vs.configure(this,t,t.options),Vs.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort(((t,e)=>t.index-e.index)),s>e){for(let t=e;t<s;++t)this._destroyDatasetMeta(t);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(Li("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,s)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(s)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=e.length;s<i;s++){const i=e[s];let n=this.getDatasetMeta(s);const o=i.type||this.config.type;if(n.type&&n.type!==o&&(this._destroyDatasetMeta(s),n=this.getDatasetMeta(s)),n.type=o,n.indexAxis=i.indexAxis||yi(o,this.options),n.order=i.order||0,n.index=s,n.label=""+i.label,n.visible=this.isDatasetVisible(s),n.controller)n.controller.updateIndex(s),n.controller.linkScales();else{const e=bi.getController(o),{datasetElementType:i,dataElementType:a}=te.datasets[o];Object.assign(e,{dataElementType:bi.getElement(a),datasetElementType:i&&bi.getElement(i)}),n.controller=new e(this,s),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){q(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),s=!i&&-1===n.indexOf(e);e.buildOrUpdateElements(s),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||q(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Li("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){q(this.scales,(t=>{Vs.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);at(e,s)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:n}of e)Bi(t,i,"_removeElements"===s?-n:n)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=s(0);for(let t=1;t<e;t++)if(!at(i,s(t)))return;return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Vs.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],q(this.boxes,(t=>{s&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,ot(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),i={meta:s,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(s.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(rs.has(this)?this.attached&&!rs.running(this)&&rs.start(this):(this.draw(),zi({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let i,n;for(i=0,n=e.length;i<n;++i){const n=e[i];t&&!n.visible||s.push(n)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},i=function(t,e){const s=e._clip;if(s.disabled)return!1;const i=function(t,e){const{xScale:s,yScale:i}=t;return s&&i?{left:os(s,e,"left"),right:os(s,e,"right"),top:os(i,e,"top"),bottom:os(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===s.left?0:i.left-(!0===s.left?0:s.left),right:!1===s.right?t.width:i.right+(!0===s.right?0:s.right),top:!1===s.top?0:i.top-(!0===s.top?0:s.top),bottom:!1===s.bottom?t.height:i.bottom+(!0===s.bottom?0:s.bottom)}}(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(i&&ae(e,i),t.controller.draw(),i&&re(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return oe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,i){const n=Ps.modes[e];return"function"==typeof n?n(this,t,s,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let i=s.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=ve(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return"boolean"==typeof s.hidden?!s.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const i=s?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,i);nt(e)?(n.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),o.update(n,{visible:s}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),rs.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ie(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ui[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(s,i)=>{e.addEventListener(this,s,i),t[s]=i},i=(t,e,s)=>{t.offsetX=e,t.offsetY=s,this._eventHandler(t)};q(this.options.events,(t=>s(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(s,i)=>{e.addEventListener(this,s,i),t[s]=i},i=(s,i)=>{t[s]&&(e.removeEventListener(this,s,i),delete t[s])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",n),s("detach",o)};o=()=>{this.attached=!1,i("resize",n),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){q(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},q(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const i=s?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+i+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map((({datasetIndex:t,index:e})=>{const s=this.getDatasetMeta(t);if(!s)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:s.data[e],index:e}}));!X(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,s){const i=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=s?t:n(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",s,i))return;const n=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(n||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:i=[],options:n}=this,o=e,a=this._getActiveElements(t,i,s,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,s,i){return s&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,s,r);
vendor: 5,839 bytes, line 28
28s&&(this._lastEvent=null,Y(n.onHover,[t,a,this],this),r&&Y(n.onClick,[t,a,this],this));const h=!X(a,i);return(h||e)&&(this._active=a,this._updateHoverStyles(a,i,e)),this._lastEvent=l,h}_getActiveElements(t,e,s,i){if("mouseout"===t.type)return[];if(!s)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,i)}}function Hi(){return q(Ni.instances,(t=>t._plugins.invalidate()))}function Wi(t,e,s=e){t.lineCap=W(s.borderCapStyle,e.borderCapStyle),t.setLineDash(W(s.borderDash,e.borderDash)),t.lineDashOffset=W(s.borderDashOffset,e.borderDashOffset),t.lineJoin=W(s.borderJoinStyle,e.borderJoinStyle),t.lineWidth=W(s.borderWidth,e.borderWidth),t.strokeStyle=W(s.borderColor,e.borderColor)}function Yi(t,e,s){t.lineTo(s.x,s.y)}function qi(t,e,s={}){const i=t.length,{start:n=0,end:o=i-1}=s,{start:a,end:r}=e,l=Math.max(n,a),h=Math.min(o,r),c=n<a&&o<a||n>r&&o>r;return{count:i,start:l,loop:e.loop,ilen:h<l&&!c?i+h-l:h-l}}function Xi(t,e,s,i){const{points:n,options:o}=e,{count:a,start:r,loop:l,ilen:h}=qi(n,s,i),c=function(t){return t.stepped?le:t.tension||"monotone"===t.cubicInterpolationMode?he:Yi}(o);let d,u,p,{move:f=!0,reverse:g}=i||{};for(d=0;d<=h;++d)u=n[(r+(g?h-d:d))%a],u.skip||(f?(t.moveTo(u.x,u.y),f=!1):c(t,p,u,g,o.stepped),p=u);return l&&(u=n[(r+(g?h:0))%a],c(t,p,u,g,o.stepped)),!!l}function Gi(t,e,s,i){const n=e.points,{count:o,start:a,ilen:r}=qi(n,s,i),{move:l=!0,reverse:h}=i||{};let c,d,u,p,f,g,m=0,b=0;const x=t=>(a+(h?r-t:t))%o,_=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,s=d.y,i=0|e;i===u?(s<p?p=s:s>f&&(f=s),m=(b*m+e)/++b):(_(),t.lineTo(e,s),u=i,b=0,p=f=s),g=s}_()}function Ki(t){const e=t.options,s=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||s?Xi:Gi}const Zi="function"==typeof Path2D;function Qi(t,e,s,i){const n=t.options,{[s]:o}=t.getProps([s],i);return Math.abs(e-o)<n.radius+n.hitRadius}function Ji(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}new WeakMap;function tn(t,e,{horizontal:s,minRotation:i}){const n=vt(i),o=(s?Math.sin(n):Math.cos(n))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class en extends fi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return U(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:i,max:n}=this;const o=t=>i=e?i:t,a=t=>n=s?n:t;if(t){const t=mt(i),e=mt(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(i===n){let e=0===n?1:Math.abs(.05*n);a(n+e),t||o(i-e)}this.min=i,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:s,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),s=s||11),s&&(e=Math.min(s,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i=function(t,e){const s=[],{bounds:i,step:n,min:o,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=n||1,p=h-1,{min:f,max:g}=e,m=!U(o),b=!U(a),x=!U(l),_=(g-f)/(c+1);let v,y,w,k,S=xt((g-f)/p/u)*u;if(S<1e-14&&!m&&!b)return[{value:f},{value:g}];k=Math.ceil(g/S)-Math.floor(f/S),k>p&&(S=xt(k*S/p/u)*u),U(r)||(v=Math.pow(10,r),S=Math.ceil(S*v)/v),"ticks"===i?(y=Math.floor(f/S)*S,w=Math.ceil(g/S)*S):(y=f,w=g),m&&b&&n&&function(t,e){const s=Math.round(t);return s-e<=t&&s+e>=t}((a-o)/n,S/1e3)?(k=Math.round(Math.min((a-o)/S,h)),S=(a-o)/k,y=o,w=a):x?(y=m?o:y,w=b?a:w,k=l-1,S=(w-y)/k):(k=(w-y)/S,k=bt(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(yt(S),yt(y));v=Math.pow(10,U(r)?M:r),y=Math.round(y*v)/v,w=Math.round(w*v)/v;let O=0;for(m&&(d&&y!==o?(s.push({value:o}),y<o&&O++,bt(Math.round((y+O*S)*v)/v,o,tn(o,_,t))&&O++):y<o&&O++);O<k;++O){const t=Math.round((y+O*S)*v)/v;if(b&&t>a)break;s.push({value:t})}return b&&d&&w!==a?s.length&&bt(s[s.length-1].value,a,tn(a,_,t))?s[s.length-1].value=a:s.push({value:a}):b&&w!==a||s.push({value:w}),s}({maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,s){let i,n,o;for(i=0,n=t.length;i<n;i++)o=t[i][s],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const i=(s-e)/Math.max(t.length-1,1)/2;e-=i,s+=i}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Yt(t,this.chart.options.locale,this.options.ticks.format)}}class sn extends en{static id="linear";static defaults={ticks:{callback:Xt.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?t:0,this.max=N(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=vt(this.options.ticks.minRotation),i=(t?Math.sin(s):Math.cos(s))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Xt.formatters.logarithmic,Xt.formatters.numeric;
28const nn='<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">\n    <g>\n        <path d="M10.05 12.125a1 1 0 0 1 .78-1.625h3.84a1 1 0 0 1 .78 1.625l-1.92 2.399a1 1 0 0 1-1.56 0l-1.92-2.4z" fill="currentColor"/>\n    </g>\n</svg>\n',on=t=>(100*t).toFixed(2),an=t=>Number((100*t).toFixed(2)).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),rn={RECORD:"record",ROI:"roi"},ln="moneyline",hn="spread",cn="totals",dn={moneyline:"moneylineFor",spread:"atsFor",totals:"over"},un={scales:{y:{beginAtZero:!0,grid:{drawTicks:!0,tickLength:0},ticks:{callback:t=>{const e=Math.round(100*t).toString();return t<0?`-$${e.slice(1)}`:`$${e}`},padding:10},display:!0},x:{grid:{display:!1},ticks:{autoSkipPadding:10,padding:10,maxRotation:0,minRotation:0},display:!0}},maintainAspectRatio:!1,animation:{duration:200,easing:"linear"},plugins:{tooltip:null,legend:null}};const pn=(t,e)=>{let s="";return"moneyline"===e?s=t<=0?"LOSS":1===t?"PUSH":"WIN":"spread"===e?s=t<=0?"LOSS":1===t?"PUSH":"COVER":"totals"===e&&(s=t<=0?"UNDER":1===t?"PUSH":"OVER"),s};function fn(t,e,s){return i.x`<div class="border border-base-200 p-4 flex items-center justify-between gap-6">
29    <div class="flex flex-col">
30      <p class="capitalize font-bold font-sans-bold">${t}</p>
31      <p class="text-base-300">${e}</p>
32    </div>
33    <p class="text-3xl font-bold font-sans-bold">${s}</p>
34  </div>`}var gn=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,bn=(t,e,s,i)=>{for(var n,o=i>1?void 0:i?mn(e,s):e,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(i?n(e,s,o):n(o))||o);return i&&o&&gn(e,s,o),o};Ni.register(class extends ks{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:i=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=function(t,e,s){const i=e.length;let n=0,o=i;if(t._sorted){const{iScale:a,vScale:r,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=a.axis,{min:d,max:u,minDefined:p,maxDefined:f}=a.getUserBounds();if(p){if(n=Math.min(Pt(l,c,d).lo,s?i:Pt(e,c,a.getPixelForValue(d)).lo),h){const t=l.slice(0,n+1).reverse().findIndex((t=>!U(t[r.axis])));n-=Math.max(0,t)}n=Ot(n,0,i-1)}if(f){let t=Math.max(Pt(l,a.axis,u,!0).hi+1,s?0:Pt(e,c,a.getPixelForValue(u),!0).hi+1);if(h){const e=l.slice(t-1).findIndex((t=>!U(t[r.axis])));t+=Math.max(0,e)}o=Ot(t,n,i)-n}else o=i-n}return{start:n,count:o}}(e,i,o);this._drawStart=a,this._drawCount=r,function(t){const{xScale:e,yScale:s,_scaleRanges:i}=t,n={xmin:e.min,xmax:e.max,ymin:s.min,ymax:s.max};if(!i)return t._scaleRanges=n,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==s.min||i.ymax!==s.max;return Object.assign(i,n),o}(e)&&(a=0,r=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!n._decimated,s.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:l},t),this.updateElements(i,a,r,t)}updateElements(t,e,s,i){const n="reset"===i,{iScale:o,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,i),d=o.axis,u=a.axis,{spanGaps:p,segment:f}=this.options,g=_t(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||n||"none"===i,b=e+s,x=t.length;let _=e>0&&this.getParsed(e-1);for(let s=0;s<x;++s){const p=t[s],x=m?p:{};if(s<e||s>=b){x.skip=!0;continue}const v=this.getParsed(s),y=U(v[u]),w=x[d]=o.getPixelForValue(v[d],s),k=x[u]=n||y?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,v,r):v[u],s);x.skip=isNaN(w)||isNaN(k)||y,x.stop=s>0&&Math.abs(v[d]-_[d])>g,f&&(x.parsed=v,x.raw=l.data[s]),c&&(x.options=h||this.resolveDataElementOptions(s,p.active?"active":i)),m||this.updateElement(p,s,x,i),_=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return s;const n=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},class extends oi{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||"monotone"===s.cubicInterpolationMode)&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;je(this._points,s,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const s=t.points,i=t.options.spanGaps,n=s.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,s,i){let n=0,o=e-1;if(s&&!i)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,s&&(o+=n);o>n&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(s,n,o,i);return function(t,e,s,i){return i&&i.setContext&&s?function(t,e,s,i){const n=t._chart.getContext(),o=is(t.o
34ptions),{_datasetIndex:a,options:{spanGaps:r}}=t,l=s.length,h=[];let c=o,d=e[0].start,u=d;function p(t,e,i,n){const o=r?-1:1;if(t!==e){for(t+=l;s[t%l].skip;)t-=o;for(;s[e%l].skip;)e+=o;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:i,style:n}),c=n,d=e%l)}}for(const t of e){d=r?d:t.start;let e,o=s[d%l];for(u=d+1;u<=t.end;u++){const r=s[u%l];e=is(i.setContext(ve(n,{type:"segment",p0:o,p1:r,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),ns(e,c)&&p(d,u-1,t.loop,c),o=r,c=e}d<u-1&&p(d,u-1,t.loop,c)}return h}(t,e,s,i):e}(t,!0===i?[{start:a,end:r,loop:o}]:function(t,e,s,i){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=s;++a){const s=t[a%n];s.skip||s.stop?l.skip||(i=!1,o.push({start:e%n,end:(a-1)%n,loop:i}),e=r=s.stop?a:null):(r=a,l.skip&&(e=a)),l=s}return null!==r&&o.push({start:e%n,end:r%n,loop:i}),o}(s,a,r<a?r+n:r,!!t._fullLoop&&0===a&&r===n-1),s,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,i=t[e],n=this.points,o=function(t,e){const s=[],i=t.segments;for(let n=0;n<i.length;n++){const o=ss(i[n],t.points,e);o.length&&s.push(...o)}return s}(this,{property:e,start:i,end:i});if(!o.length)return;const a=[],r=function(t){return t.stepped?Qe:t.tension||"monotone"===t.cubicInterpolationMode?Je:Ze}(s);let l,h;for(l=0,h=o.length;l<h;++l){const{start:h,end:c}=o[l],d=n[h],u=n[c];if(d===u){a.push(d);continue}const p=r(d,u,Math.abs((i-d[e])/(u[e]-d[e])),s.stepped);p[e]=t[e],a.push(p)}return 1===a.length?a[0]:a}pathSegment(t,e,s){return Ki(this)(t,this,e,s)}path(t,e,s){const i=this.segments,n=Ki(this);let o=this._loop;e=e||0,s=s||this.points.length-e;for(const a of i)o&=n(t,this,a,{start:e,end:e+s-1});return!!o}draw(t,e,s,i){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),function(t,e,s,i){Zi&&!e.options.segment?function(t,e,s,i){let n=e._path;n||(n=e._path=new Path2D,e.path(n,s,i)&&n.closePath()),Wi(t,e.options),t.stroke(n)}(t,e,s,i):function(t,e,s,i){const{segments:n,options:o}=e,a=Ki(e);for(const r of n)Wi(t,o,r.style),t.beginPath(),a(t,e,r,{start:s,end:s+i-1})&&t.closePath(),t.stroke()}(t,e,s,i)}(t,this,s,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}},class extends oi{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const i=this.options,{x:n,y:o}=this.getProps(["x","y"],s);return Math.pow(t-n,2)+Math.pow(e-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return Qi(this,t,"x",e)}inYRange(t,e){return Qi(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const s=this.options;this.skip||s.radius<.1||!oe(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,ne(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}},sn,class extends fi{static id="category";static defaults={ticks:{callback:Ji}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:s,label:i}of e)t[s]===i&&t.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(U(t))return null;const s=this.getLabels();return((t,e)=>null===t?null:Ot(Math.round(t),0,e))(e=isFinite(e)&&s[e]===t?e:function(t,e,s,i){const n=t.indexOf(e);return-1===n?((t,e,s,i)=>("string"==typeof e?(s=t.push(e)-1,i.unshift({index:s,label:e})):isNaN(e)&&(s=null),s))(t,e,s,i):n!==t.lastIndexOf(e)?s:n}(s,t,W(e,t),this._addedLabels),s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(s=0),e||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,i=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return Ji.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}),Ni.defaults.font.family="Lato";let xn=class extends i.s{constructor(){super(...arguments),this.league="",this._situation="all",this._dataViewType="record",this._sortType="spread",this._sortOrder="desc",this._selectedTeamId=null,this._betType=null,this._dataRenderType="chart",this.chartElement=null,this._taskFetchTrendsForLeague=new o.h(this,{task:async([t,e],{signal:s})=>{const i=function(t){const e=t.split("_"),s={};for(let t=0;t<e.length;t++){const i=e[t];i.startsWith("expectation:")&&(s.expectation=i.split(":")[1]),i.startsWith("location:")&&(s.location=i.split(":")[1])}return s}(e);this.validateProps();const n=(0,o.x)(t,null,i);if(n){const t=await(await fetch(n,{signal:s})).json();if(t instanceof Error||"error"in t)throw t;return t}return null},args:()=>[this.league,this._situation]}),this._taskFetchTrendsForTeam=new o.h(this,{task:async([t,e],{signal:s})=>{if(e){const i=(0,o.x)(t,e);if(i){const t=await(await fetch(i,{signal:s})).json();if(t instanceof Error||"error"in t)throw t;return t}}return null},args:()=>[this.league,this._selectedTeamId]}),this._handleChangeSituation=t=>{const e=t.target;this._situation=e.value},this._handleChangeDataRenderType=t=>{const e=t.target.getAttribute("data-value");e&&(this._dataRenderType=e)},this._handleChangeDataViewType=t=>{const e=t.target.value;Object.values(rn).includes(e)&&(this._dataViewType=e)}}disconnectedCallback(){this._destroyChart(),super.disconnectedCallback()}_destroyChart(){this.chartElement&&(this.chartElement.destroy(),this.chartElement=null)}updated(t){super.updated(t),"chart"!==t.get("_dataRenderType")&&this._destroyChart(),this._createChart()}_createChart(){var t;const e=null==(t=this.shadowRoot)?void 0:t.getElementById("test-chart");if(e&&!this.chartElement){const t=e.getContext("2d"),s=this._taskFetchTrendsForTeam.value.slice().reverse();let i=0;const n=`rgb(${getComputedStyle(e).getPropertyValue("--xlmwc-color-base-content")})`,o=[{label:"for",fill:!1,borderColor:n,borderWidth:1.4,hoverBackgroun
34dColor:n,hoverBorderColor:n,pointBackgroundColor:n,pointBorderColor:n,tension:.5,data:[0,...s.map((t=>{const e=t[dn[this._betType]];return i+=e-1,i}))]}];this.chartElement=new Ni(t,{type:"line",options:un,data:{labels:s.map((t=>(0,l.GP)(new Date(t.date),"MMM d"))),datasets:o}})}}_handleSelectTeamId(t){const e=t.target;if("BUTTON"===e.tagName){const t=e.getAttribute("data-team-id"),s=e.getAttribute("data-type");if(this._selectedTeamId===t&&this._betType===s)return this._selectedTeamId=null,void(this._betType=null);t&&s&&(this._betType=s,this._selectedTeamId=t)}}render(){return i.x`
35      <div class="font-sans max-w-screen-xl mx-auto text-base-content">
36        <div
37          class=${(0,i.b)(this._taskFetchTrendsForLeague.status===o.k.COMPLETE||this._taskFetchTrendsForLeague.value?"":"hidden")}>
38          <form class="flex flex-col sm:flex-row sm:items-center flex-wrap gap-2">
39            <label for="situation-select" class="font-bold font-sans-bold hidden sm:block">Display data for</label>
40            <select-dropdown
41              _id="situation-select"
42              .selected="${this._situation}"
43              .options="${[{label:"All Situations",value:"all"},{label:"Home",value:"location:home"},{label:"Away",value:"location:away"},{label:"Favorite",value:"expectation:favorite"},{label:"Underdog",value:"expectation:underdog"},{label:"Home Favorite",value:"location:home_expectation:favorite"},{label:"Home Underdog",value:"location:home_expectation:underdog"},{label:"Away Favorite",value:"location:away_expectation:favorite"},{label:"Away Underdog",value:"location:away_expectation:underdog"}]}"
44              .onChange="${this._handleChangeSituation}">
45            </select-dropdown>
46            <label for="data-view-type-select" class="font-bold font-sans-bold hidden sm:block">as</label>
47            <select-dropdown
48              _id="data-view-type-select"
49              .selected="${this._dataViewType}"
50              .options="${[{label:"Team Records",value:"record"},{label:"Return on Investment %",value:"roi"}]}"
51              .onChange="${this._handleChangeDataViewType}">
52            </select-dropdown>
53          </form>
54          <hr class="border-base-200 mt-6 mb-4" />
55        </div>
56        ${this._taskFetchTrendsForLeague.render({pending:()=>this._renderPendingHtml(),error:()=>i.x`<slot name="no-data"></slot>`,complete:t=>{const e=function(t,e,s,i){const n=(Array.isArray(t)?t:Object.values(t)).sort(((t,s)=>{let n=0;return"record"===i?"totals"===e&&void 0!==t[e].overs&&void 0!==s[e].overs?n=-(t[e].overs-s[e].overs):("moneyline"===e||"spread"===e)&&void 0!==t[e].wins&&void 0!==s[e].wins&&(n=-(t[e].wins-s[e].wins),t[e].wins===s[e].wins&&void 0!==t[e].loses&&void 0!==s[e].loses&&(n=-(s[e].loses-t[e].loses))):"roi"===i&&("totals"===e&&void 0!==t[e].over_roi&&void 0!==s[e].over_roi?n=-(t[e].over_roi-s[e].over_roi):("moneyline"===e||"spread"===e)&&void 0!==t[e].win_roi&&void 0!==s[e].win_roi&&(n=-(t[e].win_roi-s[e].win_roi))),n}));return"desc"===s?n:n.reverse()}(t,this._sortType,this._sortOrder,this._dataViewType),s=function(t){const e={moneylineWinsSum:0,moneylineLosesSum:0,moneylineTiesSum:0,spreadWinsSum:0,spreadLosesSum:0,spreadTiesSum:0,totalOverSum:0,totalUnderSum:0,totalTiesSum:0};return t.map((t=>{e.moneylineWinsSum+=t.moneyline.wins,e.moneylineLosesSum+=t.moneyline.loses,e.moneylineTiesSum+=t.moneyline.ties,e.spreadWinsSum+=t.spread.wins,e.spreadLosesSum+=t.spread.loses,e.spreadTiesSum+=t.spread.ties,e.totalOverSum+=t.totals.overs,e.totalUnderSum+=t.totals.unders,e.totalTiesSum+=t.totals.ties})),e}(e);return i.x`<table class="w-full rounded overflow-hidden text-sm">
57              <thead class="bg-neutral border border-neutral">
58                <tr class="text-base-100">
59                  <th class="w-4 text-left pr-4 pl-3 text-xs font-bold font-sans-bold">#</th>
60                  <th class="md:w-1/4 p-0 py-4 pr-2 text-left font-bold font-sans-bold">Team</th>
61                  <th class="md:w-1/4 p-0">
62                    <button
63                      @click=${this._handleSortTable}
64                      data-sort=${ln}
65                      class="font-bold font-sans-bold px-4 py-3 inline-flex w-full justify-center items-center">
66                      ML
67                      <span
68                        class=${(0,i.b)("flex transition-transform pointer-events-none",this._sortType===ln?"text-base-100":"text-base-300","desc"===this._sortOrder&&this._sortType===ln?"rotate-180":"")}>
69                        ${(0,a.o)(nn)}
70                      </span>
71                    </button>
72                  </th>
73                  <th class="md:w-1/4 p-0">
74                    <button
75                      @click=${this._handleSortTable}
76                      data-sort=${hn}
77                      class="font-bold font-sans-bold px-4 py-3 inline-flex w-full justify-center items-center">
78                      ATS
79                      <span
80                        class=${(0,i.b)("flex transition-transform pointer-events-none",this._sortType===hn?"text-base-100":"text-base-300","desc"===this._sortOrder&&this._sortType===hn?"rotate-180":"")}>
81                        ${(0,a.o)(nn)}
82                      </span>
83                    </button>
84                  </th>
85                  <th class="md:w-1/4 p-0">
86                    <button
87                      @click=${this._handleSortTable}
88                      data-sort=${cn}
89                      class="font-bold font-sans-bold px-4 py-3 inline-flex w-full justify-center items-center">
90                      OU
91                      <span
92                        class=${(0,i.b)("flex transition-transform pointer-events-none",this._sortType===cn?"text-base-100":"text-base-300","desc"===this._sortOrder&&this._sortType===cn?"rotate-180":"")}>
93                        ${(0,a.o)(nn)}
94                      </span>
95                    </button>
96                  </th>
97                </tr>
98              </thead>
99              <tbody>
100                ${e.map(((t,e)=>{const{moneyline:s,spread:n,totals:o,_id:a}=t,h={moneyline:on(s.win_roi),spread:on(n.win_roi),totals:on(o.over_roi)},c={record:{moneyline:`${null==s?void 0:s.wins} - ${null==s?void 0:s.loses} ${0!=(null==s?void 0:s.ties)?"- "+(null==s?void 0:s.ties):""}`,spread:`${n.wins} - ${n.loses} ${0!=n.ties?"- "+n.ties:""}`,totals:`${o.overs} - ${o.unders} ${0!=o.ties?"- "+o.ties:""}`},roi:{moneyline:h.moneyline+"%",spread:h.spread+"%",totals:h.totals+"%"}},d=this._selectedTeamId===a,u=d&&this._betType===ln,p=d&&this._betType===hn,f=d&&this._betType===cn;return i.x`<tr
101                      @click=${this._handleSelectTeamId}
102                      class=${(0,i.b)("border",d?"bg-base-300 text-base-100 border-base-300":"border-base-200")}>
103                      <td class="text-xs pl-3 py-2">${e+1}</td>
104                      <td class="font-bold font-sans-bold py-2 overflow-hidden max-w-[56px] pr-2">${a}</td>
105                      <td class="py-2 text-center">
106                        <button
107                          data-type="${ln}"
108                          data-team-id=${a}
109                          class=${(0,i.b)("w-full border rounded border-base-200 text-sm py-2 px-4 hover:bg-base-200",d&&"bg-base-100",d&&!u&&"hover:text-base-300 text-base-300",u&&"bg-primary border-primary hover:bg-primary hover:text-base-100")}>
110                          ${c[this._dataViewType][ln]}
111                        </button>
112                      </td>
113                      <td class="py-2 px-1 text-center">
114                        <button
115                          data-type="${hn}"
116                          data-team-id=${a}
117                          class=${(0,i.b)("w-full border rounded border-base-200 text-sm py-2 px-4 hover:bg-base-200",d&&"bg-base-100",d&&!p&&"hover:text-base-300 text-base-300",p&&"bg-primary border-primary hover:bg-primary")}>
118                          ${c[this._dataViewType][hn]}
119                        </button>
120                      </td>
121                      <td class="py-2 pr-2 text-center">
122                        <button
123                          data-type="${cn}"
124                          data-team-id=${a}
125                          class=${(0,i.b)("w-full border rounded border-base-200 text-sm py-2 px-4 hover:bg-base-200",d&&"bg-base-100",d&&!f&&"hover:text-base-300 text-base-300",f&&"bg-primary border-primary hover:bg-primary")}>
126                          ${c[this._dataViewType][cn]}
127                        </button>
128                      </td>
129                    </tr>
130                    ${this._selectedTeamId===a?i.x`<tr>
131                          <td colspan="5" class="py-6">
132                            ${this._taskFetchTrendsForTeam.render({pending:()=>i.x`<div class="animate-pulse flex gap-4 flex-col">
133    <div class="w-full h-6 bg-base-200 rounded-md max-w-screen-sm"></div>
134    <div class="w-24 h-10 bg-base-200 rounded-md"></div>
135    <div class="flex gap-4 flex-col md:flex-row">
136      <div class="md:flex-1 bg-base-200 rounded-md h-96"></div>
137      <div class="md:flex-1 gap-4 flex flex-col">
138        <div class="h-20 w-full bg-base-200 rounded-md sm:flex"></div>
139        <div class="h-20 w-full bg-base-200 rounded-md sm:flex"></div>
140        <div class="h-20 w-full bg-base-200 rounded-md sm:flex"></div>
141        <div class="h-20 w-full bg-base-200 rounded-md sm:flex"></div>
142      </div>
143    </div>
144  </div>`,complete:t=>function(t,e,s,n,o,a){const h=null==t?void 0:t[0],c=h.season,d=`${h.team.city} ${h.team.team}`,u=e===cn?"Total":e,p=`${d}: ${u} Results Since ${c}`,f=t.reduce(((t,s)=>t+(s[dn[e]]-1)),0),g=an(f),m=o[e],b=`On ${t.length} ${t.length>1?"Bets":"Bet"}`;return i.x`<div class="@container flex flex-col gap-6">
145    <div class="flex gap-4 flex-col @xl:flex-row @xl:items-center">
146      <p class="text-lg font-bold font-sans-bold capitalize flex-1">${p}</p>
147      ${(0,r.G)({options:[{key:"Chart",value:"chart"},{key:"Table",value:"table"}],selected:n,callback:s},"w-36")}
148    </div>
149    <div class="flex flex-col gap-6 @3xl:flex-row">
150      <div class="relative @3xl:w-3/5">
151        ${"chart"===n?i.x`<canvas height="350" id="test-chart"></canvas>`:i.A}
152        ${"table"===n?function(t,e){const s=t.slice().reverse();let n=0;return i.x`<div class="h-96 overflow-y-scroll overflow-x-hidden">
153    <table class="w-full border-separate border-spacing-0">
154      <thead class="sticky top-0 bg-base-100">
155        <tr class="font-sans-bold">
156          <th class="w-full text-left py-2 border-y border-base-200">Matchup</th>
157          <th class="p-2 pr-3 border-y border-base-200">Payout</th>
158          <th class="p-2 pl-3 border-y border-base-200">Balance</th>
159        </tr>
160      </thead>
161      <tbody>
162        ${s.map((t=>{const{date:s}=t,o=t[dn[e]];n+=o-1;const a=an(o),r=an(n),h=pn(o,e);return i.x`<tr>
163            <td class="py-3 border-b border-base-200">
164              <div>
165                <p class="text-xs text-base-300 flex items-center gap-1">
166                  ${function(t){return i.x`<span
167    class=${(0,i.b)("w-1 h-1 rounded-full flex","WIN"===t||"OVER"===t||"COVER"===t?"bg-success":"","LOSS"===t?"bg-error":"","PUSH"===t||"UNDER"===t?"bg-warning":"")}>
168  </span>`}(h)} ${h}
168 - ${(0,l.GP)(s,"yyyy-MM-dd @ h:mmaaa")}
169                </p>
170                <p>
171                  <span class="font-bold font-sans-bold">${t.team.code}</span> (${t.score}) @
172                  <span class="font-bold font-sans-bold">${t.oponent.code}</span> (${t.oponentScore})
173                </p>
174              </div>
175            </td>
176            <td class="border-b border-base-200 text-center font-bold font-sans-bold">$${a}</td>
177            <td class="border-b border-base-200 text-right px-3">$${r}</td>
178          </tr>`}))}
179      </tbody>
180    </table>
181  </div>`}(t,e):i.A}
182      </div>
183      <div class="flex gap-2 flex-col flex-1">
184        ${fn(`${u} Record`,"All Situations",a.replace(/ /g,""))}
185        ${fn("Return on Investment",b,m+"%")}
186        ${fn("Profit on Investment","$100 Wager on Every Game",`$${g}`)}
187        <slot name="cta"></slot>
188      </div>
189    </div>
190  </div>`}(t,this._betType,this._handleChangeDataRenderType,this._dataRenderType,h,c.record[this._betType])})}
191                          </td>
192                        </tr>`:i.A}`}))}
193              </tbody>
194              <tfoot class="border border-base-200 bg-base-200 text-xs">
195                <tr>
196                  <td colspan="2" class="text-center font-bold font-sans-bold">League</td>
197                  <td class="text-center py-4">
198                    ${`${s.moneylineWinsSum}-${s.moneylineLosesSum}${s.moneylineTiesSum>0?"-"+s.moneylineTiesSum:""}`}
199                  </td>
200                  <td class="text-center py-4">
201                    ${`${s.spreadWinsSum}-${s.spreadLosesSum}${s.spreadTiesSum>0?"-"+s.spreadTiesSum:""}`}
202                  </td>
203                  <td class="text-center py-4">
204                    ${`${s.totalOverSum}-${s.totalUnderSum}${s.totalTiesSum>0?"-"+s.totalTiesSum:""}`}
205                  </td>
206                </tr>
207              </tfoot>
208            </table>`}})}
209      </div>
210    `}_handleSortTable(t){const e=t.target.getAttribute("data-sort");e===this._sortType&&(this._sortOrder="asc"===this._sortOrder?"desc":"asc"),e&&(this._sortType=e)}_renderPendingHtml(){return i.x`<div class="animate-pulse flex flex-col gap-6">
211      <div class="flex flex-col md:flex-row gap-2">
212        <div class="w-full md:w-32 rounded h-8 bg-base-200"></div>
213        <div class="w-full md:w-32 rounded h-8 bg-base-200"></div>
214      </div>
215      <div class="flex flex-col gap-2">
216        <div class="w-full rounded h-20 bg-base-200"></div>
217        <div class="w-full rounded h-8 bg-base-200"></div>
218        <div class="w-full rounded h-12 bg-base-200"></div>
219        <div class="w-full rounded h-8 bg-base-200"></div>
220        <div class="w-full rounded h-12 bg-base-200"></div>
221        <div class="w-full rounded h-8 bg-base-200"></div>
222        <div class="w-full rounded h-12 bg-base-200"></div>
223      </div>
224    </div>`}validateProps(){if(!this.league)throw new Error("Missing property: league")}};bn([(0,i.n)({type:String,reflect:!0})],xn.prototype,"league",2),bn([(0,n.t)()],xn.prototype,"_situation",2),bn([(0,n.t)()],xn.prototype,"_dataViewType",2),bn([(0,n.t)()],xn.prototype,"_sortType",2),bn([(0,n.t)()],xn.prototype,"_sortOrder",2),bn([(0,n.t)()],xn.prototype,"_selectedTeamId",2),bn([(0,n.t)()],xn.prototype,"_betType",2),bn([(0,n.t)()],xn.prototype,"_dataRenderType",2),xn=bn([(0,i.e)("xlmwc-team-trends"),(0,i.a)(i.c)],xn)}}]);

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.