cardamon 0.0.9

Cardamon is a tool to help development teams measure the power consumption and carbon emissions of their software.
Documentation
var dd=Object.defineProperty;var hd=(e,t,n)=>t in e?dd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>(hd(e,typeof t!="symbol"?t+"":t,n),n);import{D as oo,E as ud,d as nt,G as fd,o as E,b as N,h as It,t as ft,a as Tt,g as lt,y as it,u as W,A as ro,H as pd,p as Wi,q as Vi,I as Cn,e as O,J as B,c as z,n as ht,F as Ce,i as Rs,K as ls,B as ao,L as Si,M as gd,s as Ci,N as mi,O as md,f as pt,r as se,P as Xo,T as fl,Q as pl,w as lo,R as bd,S as yd,U as xd,V as _d,W as vd,z as wd,j as gl,l as mn,X as kd,_ as co,k as Sd,m as Cd,x as Md,Y as ml,Z as Es,$ as Pd,a0 as Td,a1 as Ds,a2 as bl}from"./index-DSj0Yc62.js";var st=(e=>(e.METRIC="METRIC",e.CHART="CHART",e.TABLE="TABLE",e.CPU_USAGE="CPU_USAGE",e))(st||{});function yl(e,t){return function(){return e.apply(t,arguments)}}const{toString:Od}=Object.prototype,{getPrototypeOf:ho}=Object,Ui=(e=>t=>{const n=Od.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=e=>(e=e.toLowerCase(),t=>Ui(t)===e),qi=e=>t=>typeof t===e,{isArray:Ke}=Array,Mn=qi("undefined");function Ad(e){return e!==null&&!Mn(e)&&e.constructor!==null&&!Mn(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xl=Dt("ArrayBuffer");function Rd(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xl(e.buffer),t}const Ed=qi("string"),St=qi("function"),_l=qi("number"),Yi=e=>e!==null&&typeof e=="object",Dd=e=>e===!0||e===!1,bi=e=>{if(Ui(e)!=="object")return!1;const t=ho(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ld=Dt("Date"),Fd=Dt("File"),zd=Dt("Blob"),Id=Dt("FileList"),$d=e=>Yi(e)&&St(e.pipe),Bd=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=Ui(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},Nd=Dt("URLSearchParams"),[Hd,jd,Wd,Vd]=["ReadableStream","Request","Response","Headers"].map(Dt),Ud=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ke(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let a;for(i=0;i<r;i++)a=o[i],t.call(null,e[a],a,e)}}function vl(e,t){t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const wl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kl=e=>!Mn(e)&&e!==wl;function Ls(){const{caseless:e}=kl(this)&&this||{},t={},n=(i,s)=>{const o=e&&vl(t,s)||s;bi(t[o])&&bi(i)?t[o]=Ls(t[o],i):bi(i)?t[o]=Ls({},i):Ke(i)?t[o]=i.slice():t[o]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Nn(arguments[i],n);return t}const qd=(e,t,n,{allOwnKeys:i}={})=>(Nn(t,(s,o)=>{n&&St(s)?e[o]=yl(s,n):e[o]=s},{allOwnKeys:i}),e),Yd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Xd=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Kd=(e,t,n,i)=>{let s,o,r;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)r=s[o],(!i||i(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&ho(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gd=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},Jd=e=>{if(!e)return null;if(Ke(e))return e;let t=e.length;if(!_l(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zd=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ho(Uint8Array)),Qd=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=i.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},th=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},eh=Dt("HTMLFormElement"),nh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Ko=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ih=Dt("RegExp"),Sl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Nn(n,(s,o)=>{let r;(r=t(s,o,e))!==!1&&(i[o]=r||s)}),Object.defineProperties(e,i)},sh=e=>{Sl(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(St(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},oh=(e,t)=>{const n={},i=s=>{s.forEach(o=>{n[o]=!0})};return Ke(e)?i(e):i(String(e).split(t)),n},rh=()=>{},ah=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,cs="abcdefghijklmnopqrstuvwxyz",Go="0123456789",Cl={DIGIT:Go,ALPHA:cs,ALPHA_DIGIT:cs+cs.toUpperCase()+Go},lh=(e=16,t=Cl.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function ch(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const dh=e=>{const t=new Array(10),n=(i,s)=>{if(Yi(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const o=Ke(i)?[]:{};return Nn(i,(r,a)=>{const l=n(r,s+1);!Mn(l)&&(o[a]=l)}),t[s]=void 0,o}}return i};return n(e,0)},hh=Dt("AsyncFunction"),uh=e=>e&&(Yi(e)||St(e))&&St(e.then)&&St(e.catch),v={isArray:Ke,isArrayBuffer:xl,isBuffer:Ad,isFormData:Bd,isArrayBufferView:Rd,isString:Ed,isNumber:_l,isBoolean:Dd,isObject:Yi,isPlainObject:bi,isReadableStream:Hd,isRequest:jd,isResponse:Wd,isHeaders:Vd,isUndefined:Mn,isDate:Ld,isFile:Fd,isBlob:zd,isRegExp:ih,isFunction:St,isStream:$d,isURLSearchParams:Nd,isTypedArray:Zd,isFileList:Id,forEach:Nn,merge:Ls,extend:qd,trim:Ud,stripBOM:Yd,inherits:Xd,toFlatObject:Kd,kindOf:Ui,kindOfTest:Dt,endsWith:Gd,toArray:Jd,forEachEntry:Qd,matchAll:th,isHTMLForm:eh,hasOwnProperty:Ko,hasOwnProp:Ko,reduceDescriptors:Sl,freezeMethods:sh,toObjectSet:oh,toCamelCase:nh,noop:rh,toFiniteNumber:ah,findKey:vl,global:wl,isContextDefined:kl,ALPHABET:Cl,generateString:lh,isSpecCompliantForm:ch,toJSONObject:dh,isAsyncFn:hh,isThenable:uh};function L(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s)}v.inherits(L,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:v.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ml=L.prototype,Pl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pl[e]={value:e}});Object.defineProperties(L,Pl);Object.defineProperty(Ml,"isAxiosError",{value:!0});L.from=(e,t,n,i,s,o)=>{const r=Object.create(Ml);return v.toFlatObject(e,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),L.call(r,e.message,t,n,i,s),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};const fh=null;function Fs(e){return v.isPlainObject(e)||v.isArray(e)}function Tl(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function Jo(e,t,n){return e?e.concat(t).map(function(s,o){return s=Tl(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function ph(e){return v.isArray(e)&&!e.some(Fs)}const gh=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function Xi(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!v.isUndefined(m[g])});const i=n.metaTokens,s=n.visitor||d,o=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(s))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(v.isDate(p))return p.toISOString();if(!l&&v.isBlob(p))throw new L("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(p)||v.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,g,m){let b=p;if(p&&!m&&typeof p=="object"){if(v.endsWith(g,"{}"))g=i?g:g.slice(0,-2),p=JSON.stringify(p);else if(v.isArray(p)&&ph(p)||(v.isFileList(p)||v.endsWith(g,"[]"))&&(b=v.toArray(p)))return g=Tl(g),b.forEach(function(_,w){!(v.isUndefined(_)||_===null)&&t.append(r===!0?Jo([g],w,o):r===null?g:g+"[]",c(_))}),!1}return Fs(p)?!0:(t.append(Jo(m,g,o),c(p)),!1)}const h=[],u=Object.assign(gh,{defaultVisitor:d,convertValue:c,isVisitable:Fs});function f(p,g){if(!v.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(p),v.forEach(p,function(b,y){(!(v.isUndefined(b)||b===null)&&s.call(t,b,v.isString(y)?y.trim():y,g,u))===!0&&f(b,g?g.concat(y):[y])}),h.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Zo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function uo(e,t){this._pairs=[],e&&Xi(e,this,t)}const Ol=uo.prototype;Ol.append=function(t,n){this._pairs.push([t,n])};Ol.toString=function(t){const n=t?function(i){return t.call(this,i,Zo)}:Zo;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Al(e,t,n){if(!t)return e;const i=n&&n.encode||mh,s=n&&n.serialize;let o;if(s?o=s(t,n):o=v.isURLSearchParams(t)?t.toString():new uo(t,n).toString(i),o){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Qo{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){v.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Rl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bh=typeof URLSearchParams<"u"?URLSearchParams:uo,yh=typeof FormData<"u"?FormData:null,xh=typeof Blob<"u"?Blob:null,_h={isBrowser:!0,classes:{URLSearchParams:bh,FormData:yh,Blob:xh},protocols:["http","https","file","blob","url","data"]},fo=typeof window<"u"&&typeof document<"u",vh=(e=>fo&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),wh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kh=fo&&window.location.href||"http://localhost",Sh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fo,hasStandardBrowserEnv:vh,hasStandardBrowserWebWorkerEnv:wh,origin:kh},Symbol.toStringTag,{value:"Module"})),At={...Sh,..._h};function Ch(e,t){return Xi(e,new At.classes.URLSearchParams,Object.assign({visitor:function(n,i,s,o){return At.isNode&&v.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Mh(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ph(e){const t={},n=Object.keys(e);let i;const s=n.length;let o;for(i=0;i<s;i++)o=n[i],t[o]=e[o];return t}function El(e){function t(n,i,s,o){let r=n[o++];if(r==="__proto__")return!0;const a=Number.isFinite(+r),l=o>=n.length;return r=!r&&v.isArray(s)?s.length:r,l?(v.hasOwnProp(s,r)?s[r]=[s[r],i]:s[r]=i,!a):((!s[r]||!v.isObject(s[r]))&&(s[r]=[]),t(n,i,s[r],o)&&v.isArray(s[r])&&(s[r]=Ph(s[r])),!a)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(i,s)=>{t(Mh(i),s,n,0)}),n}return null}function Th(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Hn={transitional:Rl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,o=v.isObject(t);if(o&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return s?JSON.stringify(El(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ch(t,this.formSerializer).toString();if((a=v.isFileList(t))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Xi(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Th(t)):t}],transformResponse:[function(t){const n=this.transitional||Hn.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(i&&!this.responseType||s)){const r=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?L.from(a,L.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{Hn.headers[e]={}});const Oh=v.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ah=e=>{const t={};let n,i,s;return e&&e.split(`
`).forEach(function(r){s=r.indexOf(":"),n=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!n||t[n]&&Oh[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},tr=Symbol("internals");function tn(e){return e&&String(e).trim().toLowerCase()}function yi(e){return e===!1||e==null?e:v.isArray(e)?e.map(yi):String(e)}function Rh(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const Eh=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ds(e,t,n,i,s){if(v.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!v.isString(t)){if(v.isString(i))return t.indexOf(i)!==-1;if(v.isRegExp(i))return i.test(t)}}function Dh(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Lh(e,t){const n=v.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,o,r){return this[i].call(this,t,s,o,r)},configurable:!0})})}class xt{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function o(a,l,c){const d=tn(l);if(!d)throw new Error("header name must be a non-empty string");const h=v.findKey(s,d);(!h||s[h]===void 0||c===!0||c===void 0&&s[h]!==!1)&&(s[h||l]=yi(a))}const r=(a,l)=>v.forEach(a,(c,d)=>o(c,d,l));if(v.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(v.isString(t)&&(t=t.trim())&&!Eh(t))r(Ah(t),n);else if(v.isHeaders(t))for(const[a,l]of t.entries())o(l,a,i);else t!=null&&o(n,t,i);return this}get(t,n){if(t=tn(t),t){const i=v.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return Rh(s);if(v.isFunction(n))return n.call(this,s,i);if(v.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=tn(t),t){const i=v.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||ds(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function o(r){if(r=tn(r),r){const a=v.findKey(i,r);a&&(!n||ds(i,i[a],a,n))&&(delete i[a],s=!0)}}return v.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const o=n[i];(!t||ds(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,i={};return v.forEach(this,(s,o)=>{const r=v.findKey(i,o);if(r){n[r]=yi(s),delete n[o];return}const a=t?Dh(o):String(o).trim();a!==o&&delete n[o],n[a]=yi(s),i[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return v.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&v.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[tr]=this[tr]={accessors:{}}).accessors,s=this.prototype;function o(r){const a=tn(r);i[a]||(Lh(s,r),i[a]=!0)}return v.isArray(t)?t.forEach(o):o(t),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(xt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});v.freezeMethods(xt);function hs(e,t){const n=this||Hn,i=t||n,s=xt.from(i.headers);let o=i.data;return v.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Dl(e){return!!(e&&e.__CANCEL__)}function Ge(e,t,n){L.call(this,e??"canceled",L.ERR_CANCELED,t,n),this.name="CanceledError"}v.inherits(Ge,L,{__CANCEL__:!0});function Ll(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zh(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=i[o];r||(r=c),n[s]=l,i[s]=c;let h=o,u=0;for(;h!==s;)u+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-r<t)return;const f=d&&c-d;return f?Math.round(u*1e3/f):void 0}}function Ih(e,t){let n=0;const i=1e3/t;let s=null;return function(){const r=this===!0,a=Date.now();if(r||a-n>i)return s&&(clearTimeout(s),s=null),n=a,e.apply(null,arguments);s||(s=setTimeout(()=>(s=null,n=Date.now(),e.apply(null,arguments)),i-(a-n)))}}const Mi=(e,t,n=3)=>{let i=0;const s=zh(50,250);return Ih(o=>{const r=o.loaded,a=o.lengthComputable?o.total:void 0,l=r-i,c=s(l),d=r<=a;i=r;const h={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&d?(a-r)/c:void 0,event:o,lengthComputable:a!=null};h[t?"download":"upload"]=!0,e(h)},n)},$h=At.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function s(o){let r=o;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=s(window.location.href),function(r){const a=v.isString(r)?s(r):r;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}(),Bh=At.hasStandardBrowserEnv?{write(e,t,n,i,s,o){const r=[e+"="+encodeURIComponent(t)];v.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),v.isString(i)&&r.push("path="+i),v.isString(s)&&r.push("domain="+s),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Nh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Hh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fl(e,t){return e&&!Nh(t)?Hh(e,t):t}const er=e=>e instanceof xt?{...e}:e;function Re(e,t){t=t||{};const n={};function i(c,d,h){return v.isPlainObject(c)&&v.isPlainObject(d)?v.merge.call({caseless:h},c,d):v.isPlainObject(d)?v.merge({},d):v.isArray(d)?d.slice():d}function s(c,d,h){if(v.isUndefined(d)){if(!v.isUndefined(c))return i(void 0,c,h)}else return i(c,d,h)}function o(c,d){if(!v.isUndefined(d))return i(void 0,d)}function r(c,d){if(v.isUndefined(d)){if(!v.isUndefined(c))return i(void 0,c)}else return i(void 0,d)}function a(c,d,h){if(h in t)return i(c,d);if(h in e)return i(void 0,c)}const l={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,d)=>s(er(c),er(d),!0)};return v.forEach(Object.keys(Object.assign({},e,t)),function(d){const h=l[d]||s,u=h(e[d],t[d],d);v.isUndefined(u)&&h!==a||(n[d]=u)}),n}const zl=e=>{const t=Re({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:r,auth:a}=t;t.headers=r=xt.from(r),t.url=Al(Fl(t.baseURL,t.url),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(v.isFormData(n)){if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((l=r.getContentType())!==!1){const[c,...d]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...d].join("; "))}}if(At.hasStandardBrowserEnv&&(i&&v.isFunction(i)&&(i=i(t)),i||i!==!1&&$h(t.url))){const c=s&&o&&Bh.read(o);c&&r.set(s,c)}return t},jh=typeof XMLHttpRequest<"u",Wh=jh&&function(e){return new Promise(function(n,i){const s=zl(e);let o=s.data;const r=xt.from(s.headers).normalize();let{responseType:a}=s,l;function c(){s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function h(){if(!d)return;const f=xt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:f,config:e,request:d};Ll(function(b){n(b),c()},function(b){i(b),c()},g),d=null}"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(i(new L("Request aborted",L.ECONNABORTED,s,d)),d=null)},d.onerror=function(){i(new L("Network Error",L.ERR_NETWORK,s,d)),d=null},d.ontimeout=function(){let p=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const g=s.transitional||Rl;s.timeoutErrorMessage&&(p=s.timeoutErrorMessage),i(new L(p,g.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,s,d)),d=null},o===void 0&&r.setContentType(null),"setRequestHeader"in d&&v.forEach(r.toJSON(),function(p,g){d.setRequestHeader(g,p)}),v.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),a&&a!=="json"&&(d.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&d.addEventListener("progress",Mi(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Mi(s.onUploadProgress)),(s.cancelToken||s.signal)&&(l=f=>{d&&(i(!f||f.type?new Ge(null,e,d):f),d.abort(),d=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const u=Fh(s.url);if(u&&At.protocols.indexOf(u)===-1){i(new L("Unsupported protocol "+u+":",L.ERR_BAD_REQUEST,e));return}d.send(o||null)})},Vh=(e,t)=>{let n=new AbortController,i;const s=function(l){if(!i){i=!0,r();const c=l instanceof Error?l:this.reason;n.abort(c instanceof L?c:new Ge(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{s(new L(`timeout ${t} of ms exceeded`,L.ETIMEDOUT))},t);const r=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",s):l.unsubscribe(s))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",s));const{signal:a}=n;return a.unsubscribe=r,[a,()=>{o&&clearTimeout(o),o=null}]},Uh=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},qh=async function*(e,t,n){for await(const i of e)yield*Uh(ArrayBuffer.isView(i)?i:await n(String(i)),t)},nr=(e,t,n,i,s)=>{const o=qh(e,t,s);let r=0;return new ReadableStream({type:"bytes",async pull(a){const{done:l,value:c}=await o.next();if(l){a.close(),i();return}let d=c.byteLength;n&&n(r+=d),a.enqueue(new Uint8Array(c))},cancel(a){return i(a),o.return()}},{highWaterMark:2})},ir=(e,t)=>{const n=e!=null;return i=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:i}))},Ki=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Il=Ki&&typeof ReadableStream=="function",zs=Ki&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Yh=Il&&(()=>{let e=!1;const t=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),sr=64*1024,Is=Il&&!!(()=>{try{return v.isReadableStream(new Response("").body)}catch{}})(),Pi={stream:Is&&(e=>e.body)};Ki&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Pi[t]&&(Pi[t]=v.isFunction(e[t])?n=>n[t]():(n,i)=>{throw new L(`Response type '${t}' is not supported`,L.ERR_NOT_SUPPORT,i)})})})(new Response);const Xh=async e=>{if(e==null)return 0;if(v.isBlob(e))return e.size;if(v.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(v.isArrayBufferView(e))return e.byteLength;if(v.isURLSearchParams(e)&&(e=e+""),v.isString(e))return(await zs(e)).byteLength},Kh=async(e,t)=>{const n=v.toFiniteNumber(e.getContentLength());return n??Xh(t)},Gh=Ki&&(async e=>{let{url:t,method:n,data:i,signal:s,cancelToken:o,timeout:r,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:h="same-origin",fetchOptions:u}=zl(e);c=c?(c+"").toLowerCase():"text";let[f,p]=s||o||r?Vh([s,o],r):[],g,m;const b=()=>{!g&&setTimeout(()=>{f&&f.unsubscribe()}),g=!0};let y;try{if(l&&Yh&&n!=="get"&&n!=="head"&&(y=await Kh(d,i))!==0){let S=new Request(t,{method:"POST",body:i,duplex:"half"}),k;v.isFormData(i)&&(k=S.headers.get("content-type"))&&d.setContentType(k),S.body&&(i=nr(S.body,sr,ir(y,Mi(l)),null,zs))}v.isString(h)||(h=h?"cors":"omit"),m=new Request(t,{...u,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",withCredentials:h});let _=await fetch(m);const w=Is&&(c==="stream"||c==="response");if(Is&&(a||w)){const S={};["status","statusText","headers"].forEach(C=>{S[C]=_[C]});const k=v.toFiniteNumber(_.headers.get("content-length"));_=new Response(nr(_.body,sr,a&&ir(k,Mi(a,!0)),w&&b,zs),S)}c=c||"text";let x=await Pi[v.findKey(Pi,c)||"text"](_,e);return!w&&b(),p&&p(),await new Promise((S,k)=>{Ll(S,k,{data:x,headers:xt.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:m})})}catch(_){throw b(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,e,m),{cause:_.cause||_}):L.from(_,_&&_.code,e,m)}}),$s={http:fh,xhr:Wh,fetch:Gh};v.forEach($s,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const or=e=>`- ${e}`,Jh=e=>v.isFunction(e)||e===null||e===!1,$l={getAdapter:e=>{e=v.isArray(e)?e:[e];const{length:t}=e;let n,i;const s={};for(let o=0;o<t;o++){n=e[o];let r;if(i=n,!Jh(n)&&(i=$s[(r=String(n)).toLowerCase()],i===void 0))throw new L(`Unknown adapter '${r}'`);if(i)break;s[r||"#"+o]=i}if(!i){const o=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let r=t?o.length>1?`since :
`+o.map(or).join(`
`):" "+or(o[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return i},adapters:$s};function us(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ge(null,e)}function rr(e){return us(e),e.headers=xt.from(e.headers),e.data=hs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$l.getAdapter(e.adapter||Hn.adapter)(e).then(function(i){return us(e),i.data=hs.call(e,e.transformResponse,i),i.headers=xt.from(i.headers),i},function(i){return Dl(i)||(us(e),i&&i.response&&(i.response.data=hs.call(e,e.transformResponse,i.response),i.response.headers=xt.from(i.response.headers))),Promise.reject(i)})}const Bl="1.7.2",po={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{po[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const ar={};po.transitional=function(t,n,i){function s(o,r){return"[Axios v"+Bl+"] Transitional option '"+o+"'"+r+(i?". "+i:"")}return(o,r,a)=>{if(t===!1)throw new L(s(r," has been removed"+(n?" in "+n:"")),L.ERR_DEPRECATED);return n&&!ar[r]&&(ar[r]=!0,console.warn(s(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,r,a):!0}};function Zh(e,t,n){if(typeof e!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const o=i[s],r=t[o];if(r){const a=e[o],l=a===void 0||r(a,o,e);if(l!==!0)throw new L("option "+o+" must be "+l,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+o,L.ERR_BAD_OPTION)}}const Bs={assertOptions:Zh,validators:po},Kt=Bs.validators;class Me{constructor(t){this.defaults=t,this.interceptors={request:new Qo,response:new Qo}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
`+o):i.stack=o}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Re(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:o}=n;i!==void 0&&Bs.assertOptions(i,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),s!=null&&(v.isFunction(s)?n.paramsSerializer={serialize:s}:Bs.assertOptions(s,{encode:Kt.function,serialize:Kt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=o&&v.merge(o.common,o[n.method]);o&&v.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=xt.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let d,h=0,u;if(!l){const p=[rr.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),u=p.length,d=Promise.resolve(n);h<u;)d=d.then(p[h++],p[h++]);return d}u=a.length;let f=n;for(h=0;h<u;){const p=a[h++],g=a[h++];try{f=p(f)}catch(m){g.call(this,m);break}}try{d=rr.call(this,f)}catch(p){return Promise.reject(p)}for(h=0,u=c.length;h<u;)d=d.then(c[h++],c[h++]);return d}getUri(t){t=Re(this.defaults,t);const n=Fl(t.baseURL,t.url);return Al(n,t.params,t.paramsSerializer)}}v.forEach(["delete","get","head","options"],function(t){Me.prototype[t]=function(n,i){return this.request(Re(i||{},{method:t,url:n,data:(i||{}).data}))}});v.forEach(["post","put","patch"],function(t){function n(i){return function(o,r,a){return this.request(Re(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Me.prototype[t]=n(),Me.prototype[t+"Form"]=n(!0)});class go{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const i=this;this.promise.then(s=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](s);i._listeners=null}),this.promise.then=s=>{let o;const r=new Promise(a=>{i.subscribe(a),o=a}).then(s);return r.cancel=function(){i.unsubscribe(o)},r},t(function(o,r,a){i.reason||(i.reason=new Ge(o,r,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new go(function(s){t=s}),cancel:t}}}function Qh(e){return function(n){return e.apply(null,n)}}function tu(e){return v.isObject(e)&&e.isAxiosError===!0}const Ns={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ns).forEach(([e,t])=>{Ns[t]=e});function Nl(e){const t=new Me(e),n=yl(Me.prototype.request,t);return v.extend(n,Me.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Nl(Re(e,s))},n}const rt=Nl(Hn);rt.Axios=Me;rt.CanceledError=Ge;rt.CancelToken=go;rt.isCancel=Dl;rt.VERSION=Bl;rt.toFormData=Xi;rt.AxiosError=L;rt.Cancel=rt.CanceledError;rt.all=function(t){return Promise.all(t)};rt.spread=Qh;rt.isAxiosError=tu;rt.mergeConfig=Re;rt.AxiosHeaders=xt;rt.formToJSON=e=>El(v.isHTMLForm(e)?new FormData(e):e);rt.getAdapter=$l.getAdapter;rt.HttpStatusCode=Ns;rt.default=rt;var eu={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const jn=rt.create({baseURL:eu.VITE_API_BASE_URL||"http://localhost:7001",timeout:1e4,headers:{Accept:"applications/json","Content-Type":"application/json"}});jn.interceptors.request.use(e=>e,e=>Promise.reject(e));jn.interceptors.response.use(async e=>{switch(+e.status){case 2e5:case 200:return await Promise.resolve(e);case 401:return await Promise.reject(e);case 404:case 500:case 400:return await Promise.reject("Failed to fetch data");default:return await Promise.reject("Failed to fetch data")}},e=>Promise.reject(e));const nu=async e=>(await jn.get("/api/scenarios",{params:e})).data,iu=async(e,t)=>(await jn.get(`/api/scenarios/${e}`,{params:t})).data,lr=oo("scenarioStore",{state:()=>({scenariosData:{},scenarioDetails:{},loading:!1,error:null}),actions:{async fetchScenarios(e){this.loading=!0,this.error=null;try{const t=await nu(e);this.scenariosData=t}catch{this.error="Failed to fetch scenarios"}finally{setTimeout(()=>{this.loading=!1},100)}},async fetchScenarioDetails(e,t){this.loading=!0,this.error=null;try{const n=await iu(e,t);this.scenarioDetails[e]=n}catch{this.error=`Failed to fetch details for scenario: ${e}`}finally{this.loading=!1}}},getters:{getScenariosData:e=>()=>{var t;return((t=e.scenariosData)==null?void 0:t.scenarios)||null},getScenarioDetails:e=>t=>e.scenarioDetails[t]||null}}),su="data:image/svg+xml,%3csvg%20width='37'%20height='37'%20viewBox='0%200%2037%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9792%204.23926C27.6178%204.23926%2028.1355%204.75693%2028.1355%205.39551V8.86426H31.6042C32.2428%208.86426%2032.7605%209.38193%2032.7605%2010.0205C32.7605%2010.6591%2032.2428%2011.1768%2031.6042%2011.1768H28.1355V14.6455C28.1355%2015.2841%2027.6178%2015.8018%2026.9792%2015.8018C26.3407%2015.8018%2025.823%2015.2841%2025.823%2014.6455V11.1768H22.3542C21.7157%2011.1768%2021.198%2010.6591%2021.198%2010.0205C21.198%209.38193%2021.7157%208.86426%2022.3542%208.86426H25.823V5.39551C25.823%204.75693%2026.3407%204.23926%2026.9792%204.23926Z'%20fill='%231C274C'/%3e%3cpath%20d='M3.08325%2010.0205C3.08325%206.75014%203.08325%205.11496%204.09923%204.09898C5.1152%203.08301%206.75038%203.08301%2010.0208%203.08301C13.2911%203.08301%2014.9263%203.08301%2015.9423%204.09898C16.9583%205.11496%2016.9583%206.75014%2016.9583%2010.0205C16.9583%2013.2909%2016.9583%2014.9261%2015.9423%2015.942C14.9263%2016.958%2013.2911%2016.958%2010.0208%2016.958C6.75038%2016.958%205.1152%2016.958%204.09923%2015.942C3.08325%2014.9261%203.08325%2013.2909%203.08325%2010.0205Z'%20fill='%231C274C'/%3e%3cpath%20d='M20.0417%2026.9795C20.0417%2023.7092%2020.0417%2022.0739%2021.0577%2021.058C22.0737%2020.042%2023.7089%2020.042%2026.9792%2020.042C30.2496%2020.042%2031.8848%2020.042%2032.9008%2021.058C33.9167%2022.0739%2033.9167%2023.7092%2033.9167%2026.9795C33.9167%2030.2498%2033.9167%2031.8851%2032.9008%2032.901C31.8848%2033.917%2030.2496%2033.917%2026.9792%2033.917C23.7089%2033.917%2022.0737%2033.917%2021.0577%2032.901C20.0417%2031.8851%2020.0417%2030.2498%2020.0417%2026.9795Z'%20fill='%231C274C'/%3e%3cpath%20d='M3.08325%2026.9795C3.08325%2023.7092%203.08325%2022.0739%204.09923%2021.058C5.1152%2020.042%206.75038%2020.042%2010.0208%2020.042C13.2911%2020.042%2014.9263%2020.042%2015.9423%2021.058C16.9583%2022.0739%2016.9583%2023.7092%2016.9583%2026.9795C16.9583%2030.2498%2016.9583%2031.8851%2015.9423%2032.901C14.9263%2033.917%2013.2911%2033.917%2010.0208%2033.917C6.75038%2033.917%205.1152%2033.917%204.09923%2032.901C3.08325%2031.8851%203.08325%2030.2498%203.08325%2026.9795Z'%20fill='%231C274C'/%3e%3c/svg%3e",ou="data:image/svg+xml,%3csvg%20width='219'%20height='135'%20viewBox='0%200%20219%20135'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.947266%2026.3093C0.947266%2012.3098%2012.258%200.960938%2026.2104%200.960938H192.789C206.742%200.960938%20218.053%2012.3098%20218.053%2026.3093V108.691C218.053%20122.691%20206.742%20134.04%20192.789%20134.04H26.2104C12.258%20134.04%200.947266%20122.691%200.947266%20108.691V26.3093Z'%20fill='%2382E6AC'/%3e%3c/svg%3e",ru="/assets/co2-metric-card-widget-B41Hu-R3.svg",au="/assets/cpu-metric-card-widget-Dn_ik0PF.svg",lu="/assets/cpu-widget-CpXM1Jkn.svg",cu="/assets/dynamic-chart-widget-DZIqhA8J.svg",du="data:image/svg+xml,%3csvg%20width='219'%20height='135'%20viewBox='0%200%20219%20135'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.947266%2026.3093C0.947266%2012.3098%2012.258%200.960938%2026.2104%200.960938H192.789C206.742%200.960938%20218.053%2012.3098%20218.053%2026.3093V108.691C218.053%20122.691%20206.742%20134.04%20192.789%20134.04H26.2104C12.258%20134.04%200.947266%20122.691%200.947266%20108.691V26.3093Z'%20fill='%2382E6AC'/%3e%3c/svg%3e",hu="/assets/power-metric-card-widget-CJZ82h0T.svg",uu="data:image/svg+xml,%3csvg%20width='8'%20height='7'%20viewBox='0%200%208%207'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%207H7.32864V0L0%207Z'%20fill='white'/%3e%3c/svg%3e",fu="/assets/table-widget-1sVsrNov.svg",Ne=(e,t)=>new URL(Object.assign({"../assets/images/add-widget.svg":su,"../assets/images/card-info.svg":ou,"../assets/images/co2-metric-card-widget.svg":ru,"../assets/images/cpu-metric-card-widget.svg":au,"../assets/images/cpu-widget.svg":lu,"../assets/images/dynamic-chart-widget.svg":cu,"../assets/images/metric-card-widget.svg":du,"../assets/images/power-metric-card-widget.svg":hu,"../assets/images/resize-widget.svg":uu,"../assets/images/table-widget.svg":fu})[`../assets/images/${e}.${t}`],import.meta.url).href,pu=[{id:"1",title:"Avg. CO2 Emission",type:st.METRIC,grid:{w:1,h:2,x:0,y:0},metadata:{key:"CO2",unit:"kg"}},{id:"2",title:"Avg. Power Consumption",type:st.METRIC,grid:{w:1,h:2,x:1,y:0},metadata:{key:"POWER",unit:"kWh"}},{id:"3",title:"Avg. CPU Utilization",type:st.METRIC,grid:{w:1,h:2,x:2,y:0},metadata:{key:"CPU",unit:"%"}},{id:"4",title:"Data Table",type:st.TABLE,grid:{w:6,h:5,x:0,y:2},metadata:{key:"RUNS"}},{id:"5",title:"Dynamic Chart",type:st.CHART,grid:{w:3,h:5,x:0,y:7},metadata:{key:"TOTAL"}},{id:"6",title:"CPU Usage Timeline",type:st.CPU_USAGE,grid:{w:3,h:5,x:3,y:7},metadata:{key:"CPU"}}],gu=[{title:"Dynamic Chart",description:"Select chart types to visualize different metrics.",image:Ne("dynamic-chart-widget","svg"),type:st.CHART,grid:{w:4,h:4},metadata:{key:"TOTAL"}},{title:"Data Table",description:"Display various metrics in a data table format.",image:Ne("table-widget","svg"),type:st.TABLE,grid:{w:6,h:4},metadata:{key:"RUNS"}},{title:"CPU Usage Timeline",description:"Visualize CPU usage metrics in a pie chart format.",image:Ne("cpu-widget","svg"),type:st.CPU_USAGE,grid:{w:1,h:2},metadata:{key:"CPU"}},{title:"Total CO2 Emission",description:"Display key metric values.",image:Ne("co2-metric-card-widget","svg"),type:st.METRIC,grid:{w:1,h:2},metadata:{key:"CO2",unit:"kg"}},{title:"Total Power Consumption",description:"Display key metric values.",image:Ne("power-metric-card-widget","svg"),type:st.METRIC,grid:{w:1,h:2},metadata:{key:"POWER",unit:"kWh"}},{title:"Total CPU Utilization",description:"Display key metric values.",image:Ne("cpu-metric-card-widget","svg"),type:st.METRIC,grid:{w:1,h:2},metadata:{key:"CPU",unit:"%"}}],Hl=oo("widgets",{state:()=>({scenarioWidgets:{},sidebarVisible:!1,currentRunId:null}),actions:{async initializeWidgets(e){var n;if((n=this.scenarioWidgets[e])!=null&&n.length){const s=await lr().getScenarioDetails(e);await this.updateWidgetsData(e,s);return}const t=JSON.parse(JSON.stringify(pu));await this.addWidgets(e,t)},async getAvgMetrics(e){return[{metricType:"CO2",value:e.scenario.avgCo2Emission},{metricType:"POWER",value:e.scenario.avgPowerConsumption},{metricType:"CPU",value:e.scenario.avgCpuUtilization}]},async updateWidgetMetadata(e,t){var n;switch(e.type){case st.METRIC:{const i=await this.getAvgMetrics(t);e.metadata.value=((n=i.find(s=>s.metricType===e.metadata.key))==null?void 0:n.value)||0;break}case st.CHART:{e.metadata.runs=t.scenario.runs||[],e.metadata.scenario=t.scenario||{};break}case st.CPU_USAGE:{e.metadata.runs=t.scenario.runs||[];break}case st.TABLE:{e.metadata.runs=t.scenario.runs||[],e.metadata.pagination=t.pagination||{};break}}},async addWidgets(e,t){const i=await lr().getScenarioDetails(e);this.scenarioWidgets[e]||(this.scenarioWidgets[e]=[]);for(const s of t)await this.updateWidgetMetadata(s,i),this.scenarioWidgets[e].push(s)},async updateWidgetsData(e,t){if(this.scenarioWidgets[e])for(const n of this.scenarioWidgets[e])await this.updateWidgetMetadata(n,t)},async deleteWidget(e,t){this.scenarioWidgets[e]&&(this.scenarioWidgets[e]=this.scenarioWidgets[e].filter(n=>n.id!==t))},async duplicateWidget(e,t){const n=JSON.parse(JSON.stringify(t));n.id=this.getWidgetId(e),await this.addWidgets(e,[n])},updateWidgetsPos(e,t){const n=this.scenarioWidgets[e];n&&t.forEach(i=>{const s=n.find(o=>o.id===i.id);s&&(s.grid.x=i.x,s.grid.y=i.y,s.grid.w=i.w,s.grid.h=i.h)})},setSidebarVisible(e){this.sidebarVisible=e},setCurrentRunId(e){this.currentRunId=e}},getters:{getWidgetId:e=>t=>{let n=0;return e.scenarioWidgets[t]&&(n=Math.max(...e.scenarioWidgets[t].map(i=>parseInt(i.id,10)),0)),(n+1).toString()}}}),mu="/logo-dark.svg",bu="/logo-light.svg";ud({});function yu(){for(var e=0,t,n,i="";e<arguments.length;)(t=arguments[e++])&&(n=jl(t))&&(i&&(i+=" "),i+=n);return i}function jl(e){if(typeof e=="string")return e;for(var t,n="",i=0;i<e.length;i++)e[i]&&(t=jl(e[i]))&&(n&&(n+=" "),n+=t);return n}var mo="-";function xu(e){var t=vu(e),n=e.conflictingClassGroups,i=e.conflictingClassGroupModifiers,s=i===void 0?{}:i;function o(a){var l=a.split(mo);return l[0]===""&&l.length!==1&&l.shift(),Wl(l,t)||_u(a)}function r(a,l){var c=n[a]||[];return l&&s[a]?[].concat(c,s[a]):c}return{getClassGroupId:o,getConflictingClassGroupIds:r}}function Wl(e,t){var r;if(e.length===0)return t.classGroupId;var n=e[0],i=t.nextPart.get(n),s=i?Wl(e.slice(1),i):void 0;if(s)return s;if(t.validators.length!==0){var o=e.join(mo);return(r=t.validators.find(function(a){var l=a.validator;return l(o)}))==null?void 0:r.classGroupId}}var cr=/^\[(.+)\]$/;function _u(e){if(cr.test(e)){var t=cr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function vu(e){var t=e.theme,n=e.prefix,i={nextPart:new Map,validators:[]},s=ku(Object.entries(e.classGroups),n);return s.forEach(function(o){var r=o[0],a=o[1];Hs(a,i,r,t)}),i}function Hs(e,t,n,i){e.forEach(function(s){if(typeof s=="string"){var o=s===""?t:dr(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(wu(s)){Hs(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(function(r){var a=r[0],l=r[1];Hs(l,dr(t,a),n,i)})})}function dr(e,t){var n=e;return t.split(mo).forEach(function(i){n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n}function wu(e){return e.isThemeGetter}function ku(e,t){return t?e.map(function(n){var i=n[0],s=n[1],o=s.map(function(r){return typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(function(a){var l=a[0],c=a[1];return[t+l,c]})):r});return[i,o]}):e}function Su(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,i=new Map;function s(o,r){n.set(o,r),t++,t>e&&(t=0,i=n,n=new Map)}return{get:function(o){var r=n.get(o);if(r!==void 0)return r;if((r=i.get(o))!==void 0)return s(o,r),r},set:function(o,r){n.has(o)?n.set(o,r):s(o,r)}}}var Vl="!";function Cu(e){var t=e.separator||":",n=t.length===1,i=t[0],s=t.length;return function(o){for(var r=[],a=0,l=0,c,d=0;d<o.length;d++){var h=o[d];if(a===0){if(h===i&&(n||o.slice(d,d+s)===t)){r.push(o.slice(l,d)),l=d+s;continue}if(h==="/"){c=d;continue}}h==="["?a++:h==="]"&&a--}var u=r.length===0?o:o.substring(l),f=u.startsWith(Vl),p=f?u.substring(1):u,g=c&&c>l?c-l:void 0;return{modifiers:r,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:g}}}function Mu(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(i){var s=i[0]==="[";s?(t.push.apply(t,n.sort().concat([i])),n=[]):n.push(i)}),t.push.apply(t,n.sort()),t}function Pu(e){return{cache:Su(e.cacheSize),splitModifiers:Cu(e),...xu(e)}}var Tu=/\s+/;function Ou(e,t){var n=t.splitModifiers,i=t.getClassGroupId,s=t.getConflictingClassGroupIds,o=new Set;return e.trim().split(Tu).map(function(r){var a=n(r),l=a.modifiers,c=a.hasImportantModifier,d=a.baseClassName,h=a.maybePostfixModifierPosition,u=i(h?d.substring(0,h):d),f=!!h;if(!u){if(!h)return{isTailwindClass:!1,originalClassName:r};if(u=i(d),!u)return{isTailwindClass:!1,originalClassName:r};f=!1}var p=Mu(l).join(":"),g=c?p+Vl:p;return{isTailwindClass:!0,modifierId:g,classGroupId:u,originalClassName:r,hasPostfixModifier:f}}).reverse().filter(function(r){if(!r.isTailwindClass)return!0;var a=r.modifierId,l=r.classGroupId,c=r.hasPostfixModifier,d=a+l;return o.has(d)?!1:(o.add(d),s(l,c).forEach(function(h){return o.add(a+h)}),!0)}).reverse().map(function(r){return r.originalClassName}).join(" ")}function Au(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i,s,o,r=a;function a(c){var d=t[0],h=t.slice(1),u=h.reduce(function(f,p){return p(f)},d());return i=Pu(u),s=i.cache.get,o=i.cache.set,r=l,l(c)}function l(c){var d=s(c);if(d)return d;var h=Ou(c,i);return o(c,h),h}return function(){return r(yu.apply(null,arguments))}}function G(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var Ul=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ru=/^\d+\/\d+$/,Eu=new Set(["px","full","screen"]),Du=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fu=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Mt(e){return ke(e)||Eu.has(e)||Ru.test(e)||js(e)}function js(e){return ze(e,"length",Hu)}function zu(e){return ze(e,"size",ql)}function Iu(e){return ze(e,"position",ql)}function $u(e){return ze(e,"url",ju)}function Yn(e){return ze(e,"number",ke)}function ke(e){return!Number.isNaN(Number(e))}function Bu(e){return e.endsWith("%")&&ke(e.slice(0,-1))}function en(e){return hr(e)||ze(e,"number",hr)}function $(e){return Ul.test(e)}function nn(){return!0}function Gt(e){return Du.test(e)}function Nu(e){return ze(e,"",Wu)}function ze(e,t,n){var i=Ul.exec(e);return i?i[1]?i[1]===t:n(i[2]):!1}function Hu(e){return Lu.test(e)}function ql(){return!1}function ju(e){return e.startsWith("url(")}function hr(e){return Number.isInteger(Number(e))}function Wu(e){return Fu.test(e)}function Vu(){var e=G("colors"),t=G("spacing"),n=G("blur"),i=G("brightness"),s=G("borderColor"),o=G("borderRadius"),r=G("borderSpacing"),a=G("borderWidth"),l=G("contrast"),c=G("grayscale"),d=G("hueRotate"),h=G("invert"),u=G("gap"),f=G("gradientColorStops"),p=G("gradientColorStopPositions"),g=G("inset"),m=G("margin"),b=G("opacity"),y=G("padding"),_=G("saturate"),w=G("scale"),x=G("sepia"),S=G("skew"),k=G("space"),C=G("translate"),M=function(){return["auto","contain","none"]},A=function(){return["auto","hidden","clip","visible","scroll"]},R=function(){return["auto",$,t]},P=function(){return[$,t]},X=function(){return["",Mt]},U=function(){return["auto",ke,$]},D=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},F=function(){return["solid","dashed","dotted","double","none"]},H=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},dt=function(){return["start","end","center","between","around","evenly","stretch"]},tt=function(){return["","0",$]},Wt=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},Lt=function(){return[ke,Yn]},Ct=function(){return[ke,$]};return{cacheSize:500,theme:{colors:[nn],spacing:[Mt],blur:["none","",Gt,$],brightness:Lt(),borderColor:[e],borderRadius:["none","","full",Gt,$],borderSpacing:P(),borderWidth:X(),contrast:Lt(),grayscale:tt(),hueRotate:Ct(),invert:tt(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Bu,js],inset:R(),margin:R(),opacity:Lt(),padding:P(),saturate:Lt(),scale:Lt(),sepia:tt(),skew:Ct(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[Gt]}],"break-after":[{"break-after":Wt()}],"break-before":[{"break-before":Wt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(D(),[$])}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",en]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:tt()}],shrink:[{shrink:tt()}],order:[{order:["first","last","none",en]}],"grid-cols":[{"grid-cols":[nn]}],"col-start-end":[{col:["auto",{span:["full",en]},$]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[nn]}],"row-start-end":[{row:["auto",{span:[en]},$]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal"].concat(dt())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(dt(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(dt(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",$,t]}],"min-w":[{"min-w":["min","max","fit",$,Mt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Gt]},Gt,$]}],h:[{h:[$,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",$,Mt]}],"max-h":[{"max-h":[$,t,"min","max","fit"]}],"font-size":[{text:["base",Gt,js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yn]}],"font-family":[{font:[nn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",ke,Yn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,Mt]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(F(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Mt]}],"underline-offset":[{"underline-offset":["auto",$,Mt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(D(),[Iu])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$u]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[].concat(F(),["hidden"])}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:F()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:[""].concat(F())}],"outline-offset":[{"outline-offset":[$,Mt]}],"outline-w":[{outline:[Mt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Mt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gt,Nu]}],"shadow-color":[{shadow:[nn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":H()}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gt,$]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:Ct()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:Ct()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[en,$]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mt,Yn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var Pn=Au(Vu);const ur=e=>Pn(e),Gi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};function Uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yl={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var r=typeof o;if(r==="string"||r==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&i.push(a)}}else if(r==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){i.push(o.toString());continue}for(var l in o)t.call(o,l)&&o[l]&&i.push(l)}}}return i.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yl);var qu=Yl.exports;const le=Uu(qu),Yu="inline-flex items-center space-x-1 md:space-x-3",Xu={default:"flex",solid:"flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700"};function Ku(e){const t=z(()=>le(Yu)),n=z(()=>le(Xu[e.solid.value?"solid":"defauilt"]));return{breadcrumbClasses:t,breadcrumbWrapperClasses:n}}const Nv=nt({__name:"FwbBreadcrumb",props:{solid:{type:Boolean,default:!1}},setup(e){const t=e,{breadcrumbClasses:n,breadcrumbWrapperClasses:i}=Ku(Cn(t));return(s,o)=>(E(),N("nav",{class:it(W(i)),"aria-label":"Breadcrumb"},[O("ol",{class:it(W(n))},[B(s.$slots,"default")],2)],2))}}),Gu="ml-1 inline-flex items-center text-sm font-medium dark:text-gray-400",Ju="text-gray-700 hover:text-gray-900 dark:hover:text-white",Zu="text-gray-500";function Qu(e){return{breadcrumbItemClasses:z(()=>le(Gu,e.href.value?Ju:Zu))}}const tf={class:"inline-flex items-center"},ef={key:0,class:"w-6 h-6 text-gray-400 mr-1",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},nf=O("path",{"clip-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","fill-rule":"evenodd"},null,-1),sf=[nf],of={key:0,class:"w-4 h-4 mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},rf=O("path",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"},null,-1),af=[rf],Hv=nt({__name:"FwbBreadcrumbItem",props:{href:{type:String,default:null},home:{type:Boolean,default:!1}},setup(e){const t=e,n=z(()=>t.href?"a":"span"),{breadcrumbItemClasses:i}=Qu(Cn(t));return(s,o)=>(E(),N("li",tf,[B(s.$slots,"arrow-icon",{},()=>[e.home?ht("",!0):(E(),N("svg",ef,sf))]),(E(),Tt(ro(n.value),{class:it(W(i)),href:e.href},{default:lt(()=>[B(s.$slots,"home-icon",{},()=>[e.home?(E(),N("svg",of,af)):ht("",!0)]),B(s.$slots,"default")]),_:3},8,["class","href"]))]))}}),lf={0:"w-0 h-0",.5:"w-0.5 h-0.5",1:"w-1 h-1",1.5:"w-1.5 h-1.5",10:"w-10 h-10",11:"w-11 h-11",12:"w-12 h-12",2:"w-2 h-2",2.5:"w-2.5 h-2.5",3:"w-3 h-3",4:"w-4 h-4",5:"w-5 h-5",6:"w-6 h-6",7:"w-7 h-7",8:"w-8 h-8",9:"w-9 h-9"},cf={blue:"fill-blue-600",gray:"fill-gray-600 dark:fill-gray-300",green:"fill-green-500",pink:"fill-pink-600",purple:"fill-purple-600",red:"fill-red-600",white:"fill-white",yellow:"fill-yellow-400"};function df(e){const t=z(()=>lf[e.size.value]),n=z(()=>cf[e.color.value]),i=z(()=>"text-gray-200 dark:text-gray-600"),s=z(()=>"animate-spin");return{spinnerClasses:z(()=>le(s.value,i.value,n.value,t.value))}}const hf=O("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),uf=O("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),ff=[hf,uf],Xn=nt({__name:"FwbSpinner",props:{color:{default:"blue"},size:{default:"4"}},setup(e){const t=e,{spinnerClasses:n}=df(Cn(t));return(i,s)=>(E(),N("svg",{class:it(W(n)),fill:"none",role:"status",viewBox:"0 0 100 101",xmlns:"http://www.w3.org/2000/svg"},ff,2))}}),fr={default:{default:"text-white bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg dark:bg-blue-600 focus:outline-none dark:focus:ring-blue-800",blue:"text-white bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg dark:bg-blue-600 focus:outline-none dark:focus:ring-blue-800",alternative:"font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600",dark:"text-white bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-800 dark:focus:ring-gray-700 dark:border-gray-700",light:"text-gray-900 bg-white border border-gray-300 focus:outline-none focus:ring-4 focus:ring-gray-200 font-medium rounded-lg dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:focus:ring-gray-700",green:"focus:outline-none text-white bg-green-700 focus:ring-4 focus:ring-green-300 font-medium rounded-lg dark:bg-green-600 dark:focus:ring-green-800",red:"focus:outline-none text-white bg-red-700 focus:ring-4 focus:ring-red-300 font-medium rounded-lg dark:bg-red-600 dark:focus:ring-red-900",yellow:"focus:outline-none text-white bg-yellow-400 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg dark:focus:ring-yellow-900",purple:"focus:outline-none text-white bg-purple-700 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg dark:bg-purple-600 dark:focus:ring-purple-900",pink:"focus:outline-none text-white bg-pink-700 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg dark:bg-pink-600 dark:focus:ring-pink-900"},hover:{default:"hover:bg-blue-800 dark:hover:bg-blue-700",blue:"hover:bg-blue-800 dark:hover:bg-blue-700",alternative:"hover:bg-gray-100 hover:text-blue-700 dark:hover:text-white dark:hover:bg-gray-700",dark:"hover:bg-gray-900 dark:hover:bg-gray-700",light:"hover:bg-gray-100 dark:hover:border-gray-600",green:"hover:bg-green-800 dark:hover:bg-green-700",red:"hover:bg-red-800 dark:hover:bg-red-700",yellow:"hover:bg-yellow-500",purple:"hover:bg-purple-800 dark:hover:bg-purple-700",pink:"hover:bg-pink-800 dark:hover:bg-pink-700"}},pr={default:{dark:"text-gray-900 border border-gray-800 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-sm text-center dark:border-gray-600 dark:text-gray-400 dark:focus:ring-gray-800",default:"text-blue-700 border border-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center dark:border-blue-500 dark:text-blue-500 dark:focus:ring-blue-800",blue:"text-blue-700 border border-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center dark:border-blue-500 dark:text-blue-500 dark:focus:ring-blue-800",green:"text-green-700 border border-green-700 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm text-center dark:border-green-500 dark:text-green-500 dark:focus:ring-green-800",purple:"text-purple-700 border border-purple-700 focus:ring-4 focus:outline-none focus:ring-purple-300 font-medium rounded-lg text-sm text-center dark:border-purple-400 dark:text-purple-400 dark:focus:ring-purple-900",pink:"text-pink-700 border border-pink-700 focus:ring-4 focus:outline-none focus:ring-pink-300 font-medium rounded-lg text-sm text-center dark:border-pink-400 dark:text-pink-400 dark:focus:ring-pink-900",red:"text-red-700 border border-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm text-center dark:border-red-500 dark:text-red-500 dark:focus:ring-red-900",yellow:"text-yellow-400 border border-yellow-400 focus:ring-4 focus:outline-none focus:ring-yellow-300 font-medium rounded-lg text-sm text-center dark:border-yellow-300 dark:text-yellow-300 dark:focus:ring-yellow-900"},hover:{dark:"hover:text-white hover:bg-gray-900 dark:hover:text-white dark:hover:bg-gray-600",default:"hover:text-white hover:bg-blue-800 dark:hover:text-white dark:hover:bg-blue-600",blue:"hover:text-white hover:bg-blue-800 dark:hover:text-white dark:hover:bg-blue-600",green:"hover:text-white hover:bg-green-800 dark:hover:text-white dark:hover:bg-green-600",purple:"hover:text-white hover:bg-purple-800 dark:hover:text-white dark:hover:bg-purple-500",pink:"hover:text-white hover:bg-pink-800 dark:hover:text-white dark:hover:bg-pink-500",red:"hover:text-white hover:bg-red-800 dark:hover:text-white dark:hover:bg-red-600",yellow:"hover:text-white hover:bg-yellow-500 dark:hover:text-white dark:hover:bg-yellow-400"}},gr={hover:{"cyan-blue":"hover:bg-gradient-to-bl","green-blue":"hover:bg-gradient-to-bl","pink-orange":"hover:bg-gradient-to-bl","purple-blue":"hover:bg-gradient-to-bl","purple-pink":"hover:bg-gradient-to-l","red-yellow":"hover:bg-gradient-to-bl","teal-lime":"hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200",blue:"hover:bg-gradient-to-br",cyan:"hover:bg-gradient-to-br",green:"hover:bg-gradient-to-br",lime:"hover:bg-gradient-to-br",pink:"hover:bg-gradient-to-br",purple:"hover:bg-gradient-to-br",red:"hover:bg-gradient-to-br",teal:"hover:bg-gradient-to-br"},default:{"cyan-blue":"text-white bg-gradient-to-r from-cyan-500 to-blue-500 focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg","green-blue":"text-white bg-gradient-to-br from-green-400 to-blue-600 focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800 font-medium rounded-lg","pink-orange":"text-white bg-gradient-to-br from-pink-500 to-orange-400 focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800 font-medium rounded-lg","purple-blue":"text-white bg-gradient-to-br from-purple-600 to-blue-500 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800 font-medium rounded-lg","purple-pink":"text-white bg-gradient-to-r from-purple-500 to-pink-500 focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800 font-medium rounded-lg","red-yellow":"text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400 font-medium rounded-lg","teal-lime":"text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-teal-700 font-medium rounded-lg",blue:"text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800 rounded-lg",cyan:"text-white bg-gradient-to-r from-cyan-500 via-cyan-600 to-cyan-700 focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 rounded-lg",green:"text-white bg-gradient-to-r from-green-500 via-green-600 to-green-700 focus:ring-4 focus:outline-none focus:ring-green-300 dark:focus:ring-green-800 rounded-lg",lime:"text-gray-900 bg-gradient-to-r from-lime-500 via-lime-600 to-lime-700 focus:ring-4 focus:outline-none focus:ring-lime-300 dark:focus:ring-lime-800 rounded-lg",pink:"text-white bg-gradient-to-r from-pink-500 via-pink-600 to-pink-700 focus:ring-4 focus:outline-none focus:ring-pink-300 dark:focus:ring-pink-800 rounded-lg",purple:"text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 focus:ring-4 focus:outline-none focus:ring-purple-300 dark:focus:ring-purple-800 rounded-lg",red:"text-white bg-gradient-to-r from-red-500 via-red-600 to-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 rounded-lg",teal:"text-white bg-gradient-to-r from-teal-500 via-teal-600 to-teal-700 focus:ring-4 focus:outline-none focus:ring-teal-300 dark:focus:ring-teal-800 rounded-lg"}},mr={default:{"cyan-blue":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-cyan-500 to-blue-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-cyan-200 dark:focus:ring-cyan-800","green-blue":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-green-400 to-blue-600 dark:text-white focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800","pink-orange":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-pink-500 to-orange-400 dark:text-white focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800","purple-blue":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800","purple-pink":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-500 to-pink-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800","red-yellow":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-red-200 via-red-300 to-yellow-200 dark:text-white focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400","teal-lime":"relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-teal-300 to-lime-300 dark:text-white focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-lime-800"},hover:{"cyan-blue":"group-hover:from-cyan-500 group-hover:to-blue-500 hover:text-white","green-blue":"group-hover:from-green-400 group-hover:to-blue-600 hover:text-white","pink-orange":"group-hover:from-pink-500 group-hover:to-orange-400 hover:text-white","purple-blue":"group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white","purple-pink":"group-hover:from-purple-500 group-hover:to-pink-500 hover:text-white","red-yellow":"group-hover:from-red-200 group-hover:via-red-300 group-hover:to-yellow-200 dark:hover:text-gray-900","teal-lime":"group-hover:from-teal-300 group-hover:to-lime-300 dark:hover:text-gray-900"}},pf={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-4 py-2",lg:"text-base px-5 py-2.5",xl:"text-base px-6 py-3"},gf={xs:"text-xs p-1",sm:"text-sm p-1.5",md:"text-sm p-2",lg:"text-base p-2.5",xl:"text-base p-3"},br={blue:"shadow-lg shadow-blue-500/50 dark:shadow-lg dark:shadow-blue-800/80",cyan:"shadow-lg shadow-cyan-500/50 dark:shadow-lg dark:shadow-cyan-800/80",green:"shadow-lg shadow-green-500/50 dark:shadow-lg dark:shadow-green-800/80",lime:"shadow-lg shadow-lime-500/50 dark:shadow-lg dark:shadow-lime-800/80",pink:"shadow-lg shadow-pink-500/50 dark:shadow-lg dark:shadow-pink-800/80",purple:"shadow-lg shadow-purple-500/50 dark:shadow-lg dark:shadow-purple-800/80",red:"shadow-lg shadow-red-500/50 dark:shadow-lg dark:shadow-red-800/80",teal:"shadow-lg shadow-teal-500/50 dark:shadow-lg dark:shadow-teal-800/80"},fs=["blue","green","cyan","teal","lime","red","pink","purple"],mf=["alternative","light"];function bf(e){const t=yd(),n=z(()=>e.square.value?gf[e.size.value]:pf[e.size.value]),i=z(()=>{const o=!!e.gradient.value,r=!!e.color.value,a=e.outline.value;let l="",c="";if(o&&a)fs.includes(e.gradient.value)?console.warn(`cannot use outline prop with "${e.gradient.value}" gradient`):(c=mr.default[e.gradient.value],e.disabled.value||(l=mr.hover[e.gradient.value]));else if(o)c=gr.default[e.gradient.value],e.disabled.value||(l=gr.hover[e.gradient.value]);else if(r&&a)if(mf.includes(e.color.value))console.warn(`cannot use outline prop with "${e.color.value}" color`);else{const h=e.color.value;c=pr.default[h],e.disabled.value||(l=pr.hover[h])}else{const h=e.color.value;c=fr.default[h],e.disabled.value||(l=fr.hover[h])}let d="";return e.shadow.value===""?e.gradient.value&&fs.includes(e.gradient.value)&&(d=br[e.gradient.value]):typeof e.shadow.value=="string"&&fs.includes(e.shadow.value)&&(d=br[e.shadow.value]),[c,l,d,e.pill.value&&"!rounded-full",e.disabled.value&&"cursor-not-allowed opacity-50",o&&a?"p-0.5":n.value,(t.prefix||t.suffix||e.loading.value)&&"inline-flex items-center",e.class.value].filter(h=>h).join(" ")}),s=z(()=>e.gradient.value&&e.outline.value?["relative bg-white dark:bg-gray-900 rounded-md inline-flex items-center",n.value,e.disabled.value?"":"group-hover:bg-opacity-0 transition-all ease-in duration-75"].filter(o=>o).join(" "):"");return{wrapperClasses:i.value,spanClasses:s.value}}function yf(e){const t={xs:"2.5",sm:"3",md:"4",lg:"5",xl:"6"},n=z(()=>t[e.size.value]);return{color:z(()=>e.outline.value?e.gradient.value?e.gradient.value.includes("purple")?"purple":e.gradient.value.includes("blue")?"blue":e.gradient.value.includes("pink")?"pink":e.gradient.value.includes("red")?"red":"white":["alternative","dark","light"].includes(e.color.value)?"white":e.color.value==="default"?"blue":e.color.value:"white"),size:n}}const xf={key:0,class:"mr-2"},_f={key:0,class:"mr-2"},vf={key:1,class:"ml-2"},wf={key:1,class:"ml-2"},kf=nt({__name:"FwbButton",props:{class:{default:""},color:{default:"default"},gradient:{default:null},size:{default:"md"},shadow:{default:null},pill:{type:Boolean,default:!1},square:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingPosition:{default:"prefix"},disabled:{type:Boolean,default:!1},href:{default:""},tag:{default:"a"}},setup(e){const t=e,n=z(()=>bf(Cn(t))),i=z(()=>ur(n.value.wrapperClasses)),s=z(()=>ur(n.value.spanClasses)),o=z(()=>t.outline&&t.gradient),r=z(()=>t.loading&&t.loadingPosition==="prefix"),a=z(()=>t.loading&&t.loadingPosition==="suffix"),{color:l,size:c}=yf(Cn(t)),d=t.tag!=="a"?Ci(t.tag):"a",h=t.href?d:"button",u=t.tag==="router-link"||t.tag==="nuxt-link"?"to":"href";return(f,p)=>(E(),Tt(ro(W(h)),pl({class:i.value,[W(u)||""]:f.href,disabled:W(h)==="button"&&f.disabled}),{default:lt(()=>[!o.value&&(f.$slots.prefix||r.value)?(E(),N("div",xf,[r.value?(E(),Tt(Xn,{key:0,color:W(l),size:W(c)},null,8,["color","size"])):B(f.$slots,"prefix",{key:1})])):ht("",!0),O("span",{class:it(s.value)},[o.value&&(f.$slots.prefix||r.value)?(E(),N("span",_f,[r.value?(E(),Tt(Xn,{key:0,color:W(l),size:W(c)},null,8,["color","size"])):B(f.$slots,"prefix",{key:1})])):ht("",!0),B(f.$slots,"default"),o.value&&(f.$slots.suffix||a.value)?(E(),N("span",vf,[a.value?(E(),Tt(Xn,{key:0,color:W(l),size:W(c)},null,8,["color","size"])):B(f.$slots,"suffix",{key:1})])):ht("",!0)],2),!o.value&&(f.$slots.suffix||a.value)?(E(),N("div",wf,[a.value?(E(),Tt(Xn,{key:0,color:W(l),size:W(c)},null,8,["color","size"])):B(f.$slots,"suffix",{key:1})])):ht("",!0)]),_:3},16,["class","disabled"]))}});var yr;const Xl=typeof window<"u",Sf=e=>typeof e=="string",ps=()=>{};Xl&&(yr=window==null?void 0:window.navigator)!=null&&yr.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Cf(e){return typeof e=="function"?e():W(e)}function Mf(e){return e}function Pf(e){return _d()?(vd(e),!0):!1}function dn(e){var t;const n=Cf(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Kl=Xl?window:void 0;function Kn(...e){let t,n,i,s;if(Sf(e[0])?([n,i,s]=e,t=Kl):[t,n,i,s]=e,!t)return ps;let o=ps;const r=lo(()=>dn(t),l=>{o(),l&&(l.addEventListener(n,i,s),o=()=>{l.removeEventListener(n,i,s),o=ps})},{immediate:!0,flush:"post"}),a=()=>{r(),o()};return Pf(a),a}function Tf(e,t,n={}){const{window:i=Kl,ignore:s,capture:o=!0,detectIframe:r=!1}=n;if(!i)return;const a=se(!0);let l;const c=u=>{i.clearTimeout(l);const f=dn(e);!f||f===u.target||u.composedPath().includes(f)||!a.value||t(u)},d=u=>s&&s.some(f=>{const p=dn(f);return p&&(u.target===p||u.composedPath().includes(p))}),h=[Kn(i,"click",c,{passive:!0,capture:o}),Kn(i,"pointerdown",u=>{const f=dn(e);a.value=!!f&&!u.composedPath().includes(f)&&!d(u)},{passive:!0}),Kn(i,"pointerup",u=>{if(u.button===0){const f=u.composedPath();u.composedPath=()=>f,l=i.setTimeout(()=>c(u),50)}},{passive:!0}),r&&Kn(i,"blur",u=>{var f;const p=dn(e);((f=document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(p!=null&&p.contains(document.activeElement))&&t(u)})].filter(Boolean);return()=>h.forEach(u=>u())}const xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r="__vueuse_ssr_handlers__";xr[_r]=xr[_r]||{};var vr;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(vr||(vr={}));var Of=Object.defineProperty,wr=Object.getOwnPropertySymbols,Af=Object.prototype.hasOwnProperty,Rf=Object.prototype.propertyIsEnumerable,kr=(e,t,n)=>t in e?Of(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ef=(e,t)=>{for(var n in t||(t={}))Af.call(t,n)&&kr(e,n,t[n]);if(wr)for(var n of wr(t))Rf.call(t,n)&&kr(e,n,t[n]);return e};const Df={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Ef({linear:Mf},Df);var Lf=typeof global=="object"&&global&&global.Object===Object&&global;const Ff=Lf;var zf=typeof self=="object"&&self&&self.Object===Object&&self,If=Ff||zf||Function("return this")();const bo=If;var $f=bo.Symbol;const ce=$f;var Gl=Object.prototype,Bf=Gl.hasOwnProperty,Nf=Gl.toString,sn=ce?ce.toStringTag:void 0;function Hf(e){var t=Bf.call(e,sn),n=e[sn];try{e[sn]=void 0;var i=!0}catch{}var s=Nf.call(e);return i&&(t?e[sn]=n:delete e[sn]),s}var jf=Object.prototype,Wf=jf.toString;function Vf(e){return Wf.call(e)}var Uf="[object Null]",qf="[object Undefined]",Sr=ce?ce.toStringTag:void 0;function yo(e){return e==null?e===void 0?qf:Uf:Sr&&Sr in Object(e)?Hf(e):Vf(e)}function xo(e){return e!=null&&typeof e=="object"}var Yf="[object Symbol]";function _o(e){return typeof e=="symbol"||xo(e)&&yo(e)==Yf}function Xf(e,t){for(var n=-1,i=e==null?0:e.length,s=Array(i);++n<i;)s[n]=t(e[n],n,e);return s}var Kf=Array.isArray;const Wn=Kf;var Gf=1/0,Cr=ce?ce.prototype:void 0,Mr=Cr?Cr.toString:void 0;function Jl(e){if(typeof e=="string")return e;if(Wn(e))return Xf(e,Jl)+"";if(_o(e))return Mr?Mr.call(e):"";var t=e+"";return t=="0"&&1/e==-Gf?"-0":t}function Ti(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Jf(e){return e}var Zf="[object AsyncFunction]",Qf="[object Function]",tp="[object GeneratorFunction]",ep="[object Proxy]";function np(e){if(!Ti(e))return!1;var t=yo(e);return t==Qf||t==tp||t==Zf||t==ep}var ip=bo["__core-js_shared__"];const gs=ip;var Pr=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sp(e){return!!Pr&&Pr in e}var op=Function.prototype,rp=op.toString;function ap(e){if(e!=null){try{return rp.call(e)}catch{}try{return e+""}catch{}}return""}var lp=/[\\^$.*+?()[\]{}|]/g,cp=/^\[object .+?Constructor\]$/,dp=Function.prototype,hp=Object.prototype,up=dp.toString,fp=hp.hasOwnProperty,pp=RegExp("^"+up.call(fp).replace(lp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gp(e){if(!Ti(e)||sp(e))return!1;var t=np(e)?pp:cp;return t.test(ap(e))}function mp(e,t){return e==null?void 0:e[t]}function vo(e,t){var n=mp(e,t);return gp(n)?n:void 0}function bp(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var yp=800,xp=16,_p=Date.now;function vp(e){var t=0,n=0;return function(){var i=_p(),s=xp-(i-n);if(n=i,s>0){if(++t>=yp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wp(e){return function(){return e}}var kp=function(){try{var e=vo(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Oi=kp;var Sp=Oi?function(e,t){return Oi(e,"toString",{configurable:!0,enumerable:!1,value:wp(t),writable:!0})}:Jf;const Cp=Sp;var Mp=vp(Cp);const Pp=Mp;var Tp=9007199254740991,Op=/^(?:0|[1-9]\d*)$/;function Zl(e,t){var n=typeof e;return t=t??Tp,!!t&&(n=="number"||n!="symbol"&&Op.test(e))&&e>-1&&e%1==0&&e<t}function Ap(e,t,n){t=="__proto__"&&Oi?Oi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ql(e,t){return e===t||e!==e&&t!==t}var Rp=Object.prototype,Ep=Rp.hasOwnProperty;function Dp(e,t,n){var i=e[t];(!(Ep.call(e,t)&&Ql(i,n))||n===void 0&&!(t in e))&&Ap(e,t,n)}var Tr=Math.max;function Lp(e,t,n){return t=Tr(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=Tr(i.length-t,0),r=Array(o);++s<o;)r[s]=i[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=i[s];return a[t]=n(r),bp(e,this,a)}}var Fp=9007199254740991;function zp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fp}var Ip="[object Arguments]";function Or(e){return xo(e)&&yo(e)==Ip}var tc=Object.prototype,$p=tc.hasOwnProperty,Bp=tc.propertyIsEnumerable,Np=Or(function(){return arguments}())?Or:function(e){return xo(e)&&$p.call(e,"callee")&&!Bp.call(e,"callee")};const ec=Np;var Hp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jp=/^\w*$/;function Wp(e,t){if(Wn(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||_o(e)?!0:jp.test(e)||!Hp.test(e)||t!=null&&e in Object(t)}var Vp=vo(Object,"create");const Tn=Vp;function Up(){this.__data__=Tn?Tn(null):{},this.size=0}function qp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yp="__lodash_hash_undefined__",Xp=Object.prototype,Kp=Xp.hasOwnProperty;function Gp(e){var t=this.__data__;if(Tn){var n=t[e];return n===Yp?void 0:n}return Kp.call(t,e)?t[e]:void 0}var Jp=Object.prototype,Zp=Jp.hasOwnProperty;function Qp(e){var t=this.__data__;return Tn?t[e]!==void 0:Zp.call(t,e)}var tg="__lodash_hash_undefined__";function eg(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===void 0?tg:t,this}function Ee(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ee.prototype.clear=Up;Ee.prototype.delete=qp;Ee.prototype.get=Gp;Ee.prototype.has=Qp;Ee.prototype.set=eg;function ng(){this.__data__=[],this.size=0}function Ji(e,t){for(var n=e.length;n--;)if(Ql(e[n][0],t))return n;return-1}var ig=Array.prototype,sg=ig.splice;function og(e){var t=this.__data__,n=Ji(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():sg.call(t,n,1),--this.size,!0}function rg(e){var t=this.__data__,n=Ji(t,e);return n<0?void 0:t[n][1]}function ag(e){return Ji(this.__data__,e)>-1}function lg(e,t){var n=this.__data__,i=Ji(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Je(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=ng;Je.prototype.delete=og;Je.prototype.get=rg;Je.prototype.has=ag;Je.prototype.set=lg;var cg=vo(bo,"Map");const dg=cg;function hg(){this.size=0,this.__data__={hash:new Ee,map:new(dg||Je),string:new Ee}}function ug(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Zi(e,t){var n=e.__data__;return ug(t)?n[typeof t=="string"?"string":"hash"]:n.map}function fg(e){var t=Zi(this,e).delete(e);return this.size-=t?1:0,t}function pg(e){return Zi(this,e).get(e)}function gg(e){return Zi(this,e).has(e)}function mg(e,t){var n=Zi(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Ie(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ie.prototype.clear=hg;Ie.prototype.delete=fg;Ie.prototype.get=pg;Ie.prototype.has=gg;Ie.prototype.set=mg;var bg="Expected a function";function wo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(bg);var n=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=e.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(wo.Cache||Ie),n}wo.Cache=Ie;var yg=500;function xg(e){var t=wo(e,function(i){return n.size===yg&&n.clear(),i}),n=t.cache;return t}var _g=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vg=/\\(\\)?/g,wg=xg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_g,function(n,i,s,o){t.push(s?o.replace(vg,"$1"):i||n)}),t});const kg=wg;function Sg(e){return e==null?"":Jl(e)}function Qi(e,t){return Wn(e)?e:Wp(e,t)?[e]:kg(Sg(e))}var Cg=1/0;function ko(e){if(typeof e=="string"||_o(e))return e;var t=e+"";return t=="0"&&1/e==-Cg?"-0":t}function Mg(e,t){t=Qi(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[ko(t[n++])];return n&&n==i?e:void 0}function Pg(e,t){for(var n=-1,i=t.length,s=e.length;++n<i;)e[s+n]=t[n];return e}var Ar=ce?ce.isConcatSpreadable:void 0;function Tg(e){return Wn(e)||ec(e)||!!(Ar&&e&&e[Ar])}function Og(e,t,n,i,s){var o=-1,r=e.length;for(n||(n=Tg),s||(s=[]);++o<r;){var a=e[o];n(a)?Pg(s,a):s[s.length]=a}return s}function Ag(e){var t=e==null?0:e.length;return t?Og(e):[]}function Rg(e){return Pp(Lp(e,void 0,Ag),e+"")}function Eg(e,t){return e!=null&&t in Object(e)}function Dg(e,t,n){t=Qi(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var r=ko(t[i]);if(!(o=e!=null&&n(e,r)))break;e=e[r]}return o||++i!=s?o:(s=e==null?0:e.length,!!s&&zp(s)&&Zl(r,s)&&(Wn(e)||ec(e)))}function Lg(e,t){return e!=null&&Dg(e,t,Eg)}function Fg(e,t,n,i){if(!Ti(e))return e;t=Qi(t,e);for(var s=-1,o=t.length,r=o-1,a=e;a!=null&&++s<o;){var l=ko(t[s]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(s!=r){var d=a[l];c=void 0,c===void 0&&(c=Ti(d)?d:Zl(t[s+1])?[]:{})}Dp(a,l,c),a=a[l]}return e}function zg(e,t,n){for(var i=-1,s=t.length,o={};++i<s;){var r=t[i],a=Mg(e,r);n(a,r)&&Fg(o,Qi(r,e),a)}return o}function Ig(e,t){return zg(e,t,function(n,i){return Lg(e,i)})}var $g=Rg(function(e,t){return e==null?{}:Ig(e,t)});const Bg=$g;function Ws(e,t=!0,n=[]){return e.forEach(i=>{if(i!==null){if(typeof i!="object"){(typeof i=="string"||typeof i=="number")&&n.push(It(String(i)));return}if(Array.isArray(i)){Ws(i,t,n);return}if(i.type===Ce){if(i.children===null)return;Array.isArray(i.children)&&Ws(i.children,t,n)}else i.type!==xd&&n.push(i)}}),n}function Ng(e,t="default",n=void 0){const i=e[t];if(!i)return console.warn("getFirstSlotVNode",`slot[${t}] is empty`),null;const s=Ws(i(n));return s.length===1?s[0]:(console.warn("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}const Hg={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"]};function jg(e,t){Object.entries(Hg).forEach(([,n])=>{n.forEach(i=>{e.props?e.props=Object.assign({},e.props):e.props={};const s=e.props[i],o=t[i];s?e.props[i]=(...r)=>{s(...r),o(...r)}:e.props[i]=o})})}const Rr=nt({name:"SlotListener",props:{trigger:{type:String,default:"click"}},emits:["click","focus","blur","mouseenter","mouseleave"],setup(e,{emit:t}){return{handleClick:n=>{t("click",n)},handleBlur:n=>{t("blur",n)},handleFocus:n=>{t("focus",n)},handleMouseLeave:n=>{t("mouseleave",n)},handleMouseEnter:n=>{t("mouseenter",n)}}},render(){const{$slots:e}=this,t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},n=Ng(e,"default"),i=[t];return n!=null&&n.props&&i.push(Bg(n.props,"onClick","onMouseenter","onMouseleave","onFocus","onBlur")),n&&jg(n,{onBlur:s=>{i.forEach(o=>{var r;(r=o==null?void 0:o.onBlur)==null||r.call(o,s)})},onFocus:s=>{i.forEach(o=>{var r;(r=o==null?void 0:o.onFocus)==null||r.call(o,s)})},onClick:s=>{i.forEach(o=>{var r;(r=o==null?void 0:o.onClick)==null||r.call(o,s)})},onMouseenter:s=>{i.forEach(o=>{var r;(r=o==null?void 0:o.onMouseenter)==null||r.call(o,s)})},onMouseleave:s=>{i.forEach(o=>{var r;(r=o==null?void 0:o.onMouseleave)==null||r.call(o,s)})}}),n}}),Wg="absolute z-10 bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700",Gn=8,Vg={horizontal:"left-0",vertical:"top-0",horizontal_reverse:"right-0",vertical_reverse:"bottom-0"},Ug={bottom(e){return`bottom: -${e.height+Gn}px;`},left(e){return`left: -${e.width+Gn}px;`},right(e){return`right: -${e.width+Gn}px;`},top(e){return`top: -${e.height+Gn}px;`}};function qg(e){lo(e.visible,i=>{i&&ao(()=>n())});const t=se(""),n=()=>{var s;const i=(s=e.contentRef.value)==null?void 0:s.getBoundingClientRect();if(!i){t.value="";return}t.value=Ug[e.placement.value](i)};return{contentClasses:z(()=>{let i=["top","bottom"].includes(e.placement.value)?"horizontal":"vertical";return e.alignToEnd.value&&(i=`${i}_reverse`),le(Wg,Vg[i])}),contentStyles:t}}const Yg=e=>(Wi("data-v-2d4adfeb"),e=e(),Vi(),e),Xg={class:"inline-flex items-center"},Kg=Yg(()=>O("svg",{class:"w-4 h-4 ml-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[O("path",{d:"M19 9l-7 7-7-7","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),Gg=nt({__name:"FwbDropdown",props:{placement:{default:"bottom"},text:{default:""},transition:{default:""},closeInside:{type:Boolean,default:!1},alignToEnd:{type:Boolean,default:!1}},setup(e){const t=se(!1),n=()=>{s.closeInside&&(t.value=!1)},i=()=>t.value=!t.value,s=e,o={bottom:"to-bottom",left:"to-left",right:"to-right",top:"to-top"},r=z(()=>s.transition===null?o[s.placement]:s.transition),a=se(),l=se(),{contentClasses:c,contentStyles:d}=qg({placement:Xo(s,"placement"),alignToEnd:Xo(s,"alignToEnd"),visible:t,contentRef:a});return Tf(l,()=>{t.value&&(t.value=!1)}),(h,u)=>(E(),N("div",{ref_key:"wrapper",ref:l,class:"inline-flex relative"},[O("div",Xg,[pt(Rr,{onClick:i},{default:lt(()=>[B(h.$slots,"trigger",{},()=>[pt(kf,null,{suffix:lt(()=>[Kg]),default:lt(()=>[It(ft(h.text)+" ",1)]),_:1})],!0)]),_:3})]),pt(fl,{name:r.value},{default:lt(()=>[t.value?(E(),N("div",{key:0,ref_key:"content",ref:a,class:it([W(c)]),style:mi(W(d))},[pt(Rr,{onClick:n},{default:lt(()=>[B(h.$slots,"default",{},void 0,!0)]),_:3})],6)):ht("",!0)]),_:3},8,["name"])],512))}}),Jg=Gi(Gg,[["__scopeId","data-v-2d4adfeb"]]);new Date().getFullYear();const Zg={"aria-label":"Navigation"},Qg={class:"font-semibold text-gray-900 dark:text-white"},tm={class:"font-semibold text-gray-900 dark:text-white"},em={class:"font-semibold text-gray-900 dark:text-white"},nm=["disabled"],im=["disabled"],sm={key:0,stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 20 20","aria-hidden":"true",class:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},om=O("path",{"fill-rule":"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1),rm=[om],am=["disabled","onClick"],lm=["disabled"],cm={key:0,stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 20 20","aria-hidden":"true",class:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},dm=O("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"},null,-1),hm=[dm],um=["disabled"],jv=nt({__name:"FwbPagination",props:{modelValue:{default:1},totalPages:{default:void 0},perPage:{default:10},totalItems:{default:10},layout:{default:"pagination"},showIcons:{type:Boolean,default:!1},sliceLength:{default:2},previousLabel:{default:"Prev"},nextLabel:{default:"Next"},enableFirstAndLastButtons:{type:Boolean,default:!1},showLabels:{type:Boolean,default:!0},large:{type:Boolean,default:!1}},emits:["update:model-value","page-changed"],setup(e,{emit:t}){const n=t,i=e;function s(x){n("update:model-value",x),n("page-changed",x)}function o(){n("update:model-value",i.modelValue-1),n("page-changed",i.modelValue-1)}function r(){n("update:model-value",i.modelValue+1),n("page-changed",i.modelValue+1)}function a(){n("update:model-value",1),n("page-changed",1)}function l(){const x=c.value;n("update:model-value",x),n("page-changed",x)}const c=z(()=>i.totalPages?i.totalPages:Math.ceil(i.totalItems/i.perPage)),d=z(()=>i.modelValue<=1),h=z(()=>i.modelValue>=c.value),u=x=>x===i.modelValue,f=z(()=>{if(i.layout==="navigation")return[];if(i.layout==="table")return[];if(c.value<=i.sliceLength*2+1){const k=[];for(let C=1;C<=c.value;C++)k.push(C);return k}if(i.modelValue<=i.sliceLength){const k=[],C=Math.abs(i.modelValue-i.sliceLength)+i.modelValue+i.sliceLength+1;for(let M=1;M<=C;M++)k.push(M);return k}if(i.modelValue>=c.value-i.sliceLength){const k=[];for(let C=Math.abs(c.value-i.sliceLength*2);C<=c.value;C++)k.push(C);return k}const x=[],S=i.modelValue-i.sliceLength>0?i.modelValue-i.sliceLength:1;for(let k=S;k<i.modelValue+i.sliceLength+1&&!(k>=c.value);k++)x.push(k);return x}),p=z(()=>i.modelValue*i.perPage-i.perPage+1),g=z(()=>{const x=i.modelValue*i.perPage;return i.totalItems&&x>i.totalItems?i.totalItems:x}),m=z(()=>i.totalItems?i.totalItems:c.value*i.perPage),b=z(()=>i.modelValue===1),y=z(()=>i.modelValue===c.value);function _(x){return Pn("flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",x&&"text-blue-600 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:bg-gray-700 dark:text-white",i.large&&"px-4 h-10")}function w(x){const S="flex items-center justify-center first:rounded-l-lg last:rounded-r-lg px-3 h-8 ml-0 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",k="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-white cursor-not-allowed";return Pn(S,x===i.modelValue&&k,i.large&&"px-4 h-10",(x>c.value||x<1)&&k,i.layout==="navigation"&&"first:mr-3",(i.layout==="navigation"||i.layout==="table")&&"rounded-lg",i.layout==="table"&&"border-none text-white hover:text-white bg-gray-800 rounded-none first:rounded-l last:rounded-r hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white")}return(x,S)=>(E(),N("nav",Zg,[x.layout==="table"?(E(),N("div",{key:0,class:it(["text-gray-700 dark:text-gray-400 mb-2",x.large?"text-base":"text-sm"])},[It(" Showing "),O("span",Qg,ft(p.value),1),It(" to "),O("span",tm,ft(g.value),1),It(" of "),O("span",em,ft(m.value),1)],2)):ht("",!0),O("div",{class:it(["inline-flex",x.large&&"text-base h-10"])},[B(x.$slots,"start"),x.enableFirstAndLastButtons?B(x.$slots,"first-button",{key:0},()=>[O("button",{disabled:b.value,class:it(w(1)),onClick:a}," First ",10,nm)]):ht("",!0),B(x.$slots,"prev-button",{disabled:d.value,decreasePage:o},()=>[O("button",{disabled:d.value,class:it(w(x.modelValue-1)),onClick:o},[B(x.$slots,"prev-icon",{},()=>[x.showIcons||x.$slots["prev-icon"]?(E(),N("svg",sm,rm)):ht("",!0)]),x.showLabels?(E(),N(Ce,{key:0},[It(ft(x.previousLabel),1)],64)):ht("",!0)],10,im)]),(E(!0),N(Ce,null,Rs(f.value,k=>B(x.$slots,"page-button",{key:k,page:k,setPage:s,disabled:u(k)},()=>[O("button",{disabled:u(k),class:it(_(k===x.modelValue)),onClick:C=>s(k)},ft(k),11,am)])),128)),B(x.$slots,"next-button",{disabled:h.value,increasePage:r},()=>[O("button",{disabled:h.value,class:it(w(x.modelValue+1)),onClick:r},[x.showLabels?(E(),N(Ce,{key:0},[It(ft(x.nextLabel),1)],64)):ht("",!0),B(x.$slots,"next-icon",{},()=>[x.showIcons||x.$slots["next-icon"]?(E(),N("svg",cm,hm)):ht("",!0)])],10,lm)]),x.enableFirstAndLastButtons?B(x.$slots,"last-button",{key:1},()=>[O("button",{disabled:y.value,class:it(w(c.value)),onClick:l}," Last ",10,um)]):ht("",!0),B(x.$slots,"end")],2)]))}}),fm={class:"relative overflow-x-auto shadow-md sm:rounded-lg"},pm={class:"w-full text-sm text-left text-gray-500 dark:text-gray-400"},Wv=nt({__name:"FwbTable",props:{striped:{type:Boolean,default:!1},stripedColumns:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1}},setup(e){const t=e;return ls("hoverable",t.hoverable),ls("striped",t.striped),ls("stripedColumns",t.stripedColumns),(n,i)=>(E(),N("div",fm,[O("table",pm,[B(n.$slots,"default")])]))}}),gm={};function mm(e,t){return E(),N("tbody",null,[B(e.$slots,"default")])}const Vv=Gi(gm,[["render",mm]]),bm="px-6 py-4 first:font-medium first:text-gray-900 first:dark:text-white first:whitespace-nowrap last:text-right",ym="even:bg-gray-white even:dark:bg-gray-900 odd:dark:bg-gray-800 odd:bg-gray-50";function xm(){const e=Si("stripedColumns");return{tableCellClasses:z(()=>le(bm,{[ym]:e}))}}const Uv=nt({__name:"FwbTableCell",setup(e){const{tableCellClasses:t}=xm();return(n,i)=>(E(),N("td",{class:it(W(t))},[B(n.$slots,"default")],2))}}),_m={},vm={class:"text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400"};function wm(e,t){return E(),N("thead",vm,[O("tr",null,[B(e.$slots,"default")])])}const qv=Gi(_m,[["render",wm]]),km="px-6 py-3 text-xs uppercase",Sm="even:bg-white even:dark:bg-gray-900 odd:dark:bg-gray-800 odd:bg-gray-50";function Cm(){const e=Si("stripedColumns");return{tableHeadCellClasses:z(()=>le(km,{[Sm]:e}))}}const Yv=nt({__name:"FwbTableHeadCell",setup(e){const{tableHeadCellClasses:t}=Cm();return(n,i)=>(E(),N("th",{scope:"col",class:it(W(t))},[B(n.$slots,"default")],2))}}),Mm="bg-white dark:bg-gray-800 [&:not(:last-child)]:border-b [&:not(:last-child)]:dark:border-gray-700",Pm="odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700",Tm="hover:bg-gray-50 dark:hover:bg-gray-600";function Om(){const e=Si("striped"),t=Si("hoverable");return{tableRowClasses:z(()=>le(Mm,{[Tm]:t,[Pm]:e}))}}const Xv=nt({__name:"FwbTableRow",setup(e){const{tableRowClasses:t}=Om();return(n,i)=>(E(),N("tr",{class:it(W(t))},[B(n.$slots,"default")],2))}}),Am=["top","right","bottom","left"],Er=["start","end"],Dr=Am.reduce((e,t)=>e.concat(t,t+"-"+Er[0],t+"-"+Er[1]),[]),On=Math.min,_e=Math.max,Rm={left:"right",right:"left",bottom:"top",top:"bottom"},Em={start:"end",end:"start"};function Vs(e,t,n){return _e(e,On(t,n))}function $e(e,t){return typeof e=="function"?e(t):e}function jt(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function nc(e){return e==="x"?"y":"x"}function So(e){return e==="y"?"height":"width"}function Vn(e){return["top","bottom"].includes(jt(e))?"y":"x"}function Co(e){return nc(Vn(e))}function ic(e,t,n){n===void 0&&(n=!1);const i=Rt(e),s=Co(e),o=So(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Ri(r)),[r,Ri(r)]}function Dm(e){const t=Ri(e);return[Ai(e),t,Ai(t)]}function Ai(e){return e.replace(/start|end/g,t=>Em[t])}function Lm(e,t,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?o:r;default:return[]}}function Fm(e,t,n,i){const s=Rt(e);let o=Lm(jt(e),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Ai)))),o}function Ri(e){return e.replace(/left|right|bottom|top/g,t=>Rm[t])}function zm(e){return{top:0,right:0,bottom:0,left:0,...e}}function sc(e){return typeof e!="number"?zm(e):{top:e,right:e,bottom:e,left:e}}function bn(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Lr(e,t,n){let{reference:i,floating:s}=e;const o=Vn(t),r=Co(t),a=So(r),l=jt(t),c=o==="y",d=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,u=i[a]/2-s[a]/2;let f;switch(l){case"top":f={x:d,y:i.y-s.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:h};break;case"left":f={x:i.x-s.width,y:h};break;default:f={x:i.x,y:i.y}}switch(Rt(t)){case"start":f[r]-=u*(n&&c?-1:1);break;case"end":f[r]+=u*(n&&c?-1:1);break}return f}const Im=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Lr(c,i,l),u=i,f={},p=0;for(let g=0;g<a.length;g++){const{name:m,fn:b}=a[g],{x:y,y:_,data:w,reset:x}=await b({x:d,y:h,initialPlacement:i,placement:u,strategy:s,middlewareData:f,rects:c,platform:r,elements:{reference:e,floating:t}});d=y??d,h=_??h,f={...f,[m]:{...f[m],...w}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(u=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):x.rects),{x:d,y:h}=Lr(c,u,l)),g=-1)}return{x:d,y:h,placement:u,strategy:s,middlewareData:f}};async function ts(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=$e(t,e),p=sc(f),g=a[u?h==="floating"?"reference":"floating":h],m=bn(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b=h==="floating"?{...r.floating,x:i,y:s}:r.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},w=bn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(m.top-w.top+p.top)/_.y,bottom:(w.bottom-m.bottom+p.bottom)/_.y,left:(m.left-w.left+p.left)/_.x,right:(w.right-m.right+p.right)/_.x}}const $m=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:o,platform:r,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=$e(e,t)||{};if(c==null)return{};const h=sc(d),u={x:n,y:i},f=Co(s),p=So(f),g=await r.getDimensions(c),m=f==="y",b=m?"top":"left",y=m?"bottom":"right",_=m?"clientHeight":"clientWidth",w=o.reference[p]+o.reference[f]-u[f]-o.floating[p],x=u[f]-o.reference[f],S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let k=S?S[_]:0;(!k||!await(r.isElement==null?void 0:r.isElement(S)))&&(k=a.floating[_]||o.floating[p]);const C=w/2-x/2,M=k/2-g[p]/2-1,A=On(h[b],M),R=On(h[y],M),P=A,X=k-g[p]-R,U=k/2-g[p]/2+C,D=Vs(P,U,X),F=!l.arrow&&Rt(s)!=null&&U!==D&&o.reference[p]/2-(U<P?A:R)-g[p]/2<0,H=F?U<P?U-P:U-X:0;return{[f]:u[f]+H,data:{[f]:D,centerOffset:U-D-H,...F&&{alignmentOffset:H}},reset:F}}});function Bm(e,t,n){return(e?[...n.filter(i=>Rt(i)===e),...n.filter(i=>Rt(i)!==e)]:n.filter(i=>jt(i)===i)).filter(i=>e?Rt(i)===e||(t?Ai(i)!==i:!1):!0)}const Nm=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s;const{rects:o,middlewareData:r,placement:a,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:h,allowedPlacements:u=Dr,autoAlignment:f=!0,...p}=$e(e,t),g=h!==void 0||u===Dr?Bm(h||null,f,u):u,m=await ts(t,p),b=((n=r.autoPlacement)==null?void 0:n.index)||0,y=g[b];if(y==null)return{};const _=ic(y,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==y)return{reset:{placement:g[0]}};const w=[m[jt(y)],m[_[0]],m[_[1]]],x=[...((i=r.autoPlacement)==null?void 0:i.overflows)||[],{placement:y,overflows:w}],S=g[b+1];if(S)return{data:{index:b+1,overflows:x},reset:{placement:S}};const k=x.map(M=>{const A=Rt(M.placement);return[M.placement,A&&d?M.overflows.slice(0,2).reduce((R,P)=>R+P,0):M.overflows[0],M.overflows]}).sort((M,A)=>M[1]-A[1]),C=((s=k.filter(M=>M[2].slice(0,Rt(M[0])?2:3).every(A=>A<=0))[0])==null?void 0:s[0])||k[0][0];return C!==a?{data:{index:b+1,overflows:x},reset:{placement:C}}:{}}}},Hm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...m}=$e(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=jt(s),y=jt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=u||(y||!g?[Ri(a)]:Dm(a));!u&&p!=="none"&&w.push(...Fm(a,g,p,_));const x=[a,...w],S=await ts(t,m),k=[];let C=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&k.push(S[b]),h){const P=ic(s,r,_);k.push(S[P[0]],S[P[1]])}if(C=[...C,{placement:s,overflows:k}],!k.every(P=>P<=0)){var M,A;const P=(((M=o.flip)==null?void 0:M.index)||0)+1,X=x[P];if(X)return{data:{index:P,overflows:C},reset:{placement:X}};let U=(A=C.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:A.placement;if(!U)switch(f){case"bestFit":{var R;const D=(R=C.map(F=>[F.placement,F.overflows.filter(H=>H>0).reduce((H,dt)=>H+dt,0)]).sort((F,H)=>F[1]-H[1])[0])==null?void 0:R[0];D&&(U=D);break}case"initialPlacement":U=a;break}if(s!==U)return{reset:{placement:U}}}return{}}}};async function jm(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),r=jt(n),a=Rt(n),l=Vn(n)==="y",c=["left","top"].includes(r)?-1:1,d=o&&l?-1:1,h=$e(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*d,y:u*c}:{x:u*c,y:f*d}}const Wm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:o,placement:r,middlewareData:a}=t,l=await jm(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},Vm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:m=>{let{x:b,y}=m;return{x:b,y}}},...l}=$e(e,t),c={x:n,y:i},d=await ts(t,l),h=Vn(jt(s)),u=nc(h);let f=c[u],p=c[h];if(o){const m=u==="y"?"top":"left",b=u==="y"?"bottom":"right",y=f+d[m],_=f-d[b];f=Vs(y,f,_)}if(r){const m=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+d[m],_=p-d[b];p=Vs(y,p,_)}const g=a.fn({...t,[u]:f,[h]:p});return{...g,data:{x:g.x-n,y:g.y-i}}}}},Um=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:s,elements:o}=t,{apply:r=()=>{},...a}=$e(e,t),l=await ts(t,a),c=jt(n),d=Rt(n),h=Vn(n)==="y",{width:u,height:f}=i.floating;let p,g;c==="top"||c==="bottom"?(p=c,g=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(g=c,p=d==="end"?"top":"bottom");const m=f-l[p],b=u-l[g],y=!t.middlewareData.shift;let _=m,w=b;if(h){const S=u-l.left-l.right;w=d||y?On(b,S):S}else{const S=f-l.top-l.bottom;_=d||y?On(m,S):S}if(y&&!d){const S=_e(l.left,0),k=_e(l.right,0),C=_e(l.top,0),M=_e(l.bottom,0);h?w=u-2*(S!==0||k!==0?S+k:_e(l.left,l.right)):_=f-2*(C!==0||M!==0?C+M:_e(l.top,l.bottom))}await r({...t,availableWidth:w,availableHeight:_});const x=await s.getDimensions(o.floating);return u!==x.width||f!==x.height?{reset:{rects:!0}}:{}}}};function wt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bt(e){return wt(e).getComputedStyle(e)}const Fr=Math.min,yn=Math.max,Ei=Math.round;function oc(e){const t=Bt(e);let n=parseFloat(t.width),i=parseFloat(t.height);const s=e.offsetWidth,o=e.offsetHeight,r=Ei(n)!==s||Ei(i)!==o;return r&&(n=s,i=o),{width:n,height:i,fallback:r}}function de(e){return ac(e)?(e.nodeName||"").toLowerCase():""}let Jn;function rc(){if(Jn)return Jn;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Jn=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Jn):navigator.userAgent}function Nt(e){return e instanceof wt(e).HTMLElement}function oe(e){return e instanceof wt(e).Element}function ac(e){return e instanceof wt(e).Node}function zr(e){return typeof ShadowRoot>"u"?!1:e instanceof wt(e).ShadowRoot||e instanceof ShadowRoot}function es(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=Bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function qm(e){return["table","td","th"].includes(de(e))}function Us(e){const t=/firefox/i.test(rc()),n=Bt(e),i=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!i&&i!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(s=>n.willChange.includes(s))||["paint","layout","strict","content"].some(s=>{const o=n.contain;return o!=null&&o.includes(s)})}function lc(){return!/^((?!chrome|android).)*safari/i.test(rc())}function Mo(e){return["html","body","#document"].includes(de(e))}function cc(e){return oe(e)?e:e.contextElement}const dc={x:1,y:1};function Ve(e){const t=cc(e);if(!Nt(t))return dc;const n=t.getBoundingClientRect(),{width:i,height:s,fallback:o}=oc(t);let r=(o?Ei(n.width):n.width)/i,a=(o?Ei(n.height):n.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}function An(e,t,n,i){var s,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=cc(e);let l=dc;t&&(i?oe(i)&&(l=Ve(i)):l=Ve(e));const c=a?wt(a):window,d=!lc()&&n;let h=(r.left+(d&&((s=c.visualViewport)==null?void 0:s.offsetLeft)||0))/l.x,u=(r.top+(d&&((o=c.visualViewport)==null?void 0:o.offsetTop)||0))/l.y,f=r.width/l.x,p=r.height/l.y;if(a){const g=wt(a),m=i&&oe(i)?wt(i):i;let b=g.frameElement;for(;b&&i&&m!==g;){const y=Ve(b),_=b.getBoundingClientRect(),w=getComputedStyle(b);_.x+=(b.clientLeft+parseFloat(w.paddingLeft))*y.x,_.y+=(b.clientTop+parseFloat(w.paddingTop))*y.y,h*=y.x,u*=y.y,f*=y.x,p*=y.y,h+=_.x,u+=_.y,b=wt(b).frameElement}}return{width:f,height:p,top:u,right:h+f,bottom:u+p,left:h,x:h,y:u}}function re(e){return((ac(e)?e.ownerDocument:e.document)||window.document).documentElement}function ns(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function hc(e){return An(re(e)).left+ns(e).scrollLeft}function Rn(e){if(de(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zr(e)&&e.host||re(e);return zr(t)?t.host:t}function uc(e){const t=Rn(e);return Mo(t)?t.ownerDocument.body:Nt(t)&&es(t)?t:uc(t)}function Di(e,t){var n;t===void 0&&(t=[]);const i=uc(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=wt(i);return s?t.concat(o,o.visualViewport||[],es(i)?i:[]):t.concat(i,Di(i))}function Ir(e,t,n){return t==="viewport"?bn(function(i,s){const o=wt(i),r=re(i),a=o.visualViewport;let l=r.clientWidth,c=r.clientHeight,d=0,h=0;if(a){l=a.width,c=a.height;const u=lc();(u||!u&&s==="fixed")&&(d=a.offsetLeft,h=a.offsetTop)}return{width:l,height:c,x:d,y:h}}(e,n)):oe(t)?bn(function(i,s){const o=An(i,!0,s==="fixed"),r=o.top+i.clientTop,a=o.left+i.clientLeft,l=Nt(i)?Ve(i):{x:1,y:1};return{width:i.clientWidth*l.x,height:i.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,n)):bn(function(i){const s=re(i),o=ns(i),r=i.ownerDocument.body,a=yn(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),l=yn(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let c=-o.scrollLeft+hc(i);const d=-o.scrollTop;return Bt(r).direction==="rtl"&&(c+=yn(s.clientWidth,r.clientWidth)-a),{width:a,height:l,x:c,y:d}}(re(e)))}function $r(e){return Nt(e)&&Bt(e).position!=="fixed"?e.offsetParent:null}function Br(e){const t=wt(e);let n=$r(e);for(;n&&qm(n)&&Bt(n).position==="static";)n=$r(n);return n&&(de(n)==="html"||de(n)==="body"&&Bt(n).position==="static"&&!Us(n))?t:n||function(i){let s=Rn(i);for(;Nt(s)&&!Mo(s);){if(Us(s))return s;s=Rn(s)}return null}(e)||t}function Ym(e,t,n){const i=Nt(t),s=re(t),o=An(e,!0,n==="fixed",t);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(i||!i&&n!=="fixed")if((de(t)!=="body"||es(s))&&(r=ns(t)),Nt(t)){const l=An(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else s&&(a.x=hc(s));return{x:o.left+r.scrollLeft-a.x,y:o.top+r.scrollTop-a.y,width:o.width,height:o.height}}const Xm={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const o=n==="clippingAncestors"?function(c,d){const h=d.get(c);if(h)return h;let u=Di(c).filter(m=>oe(m)&&de(m)!=="body"),f=null;const p=Bt(c).position==="fixed";let g=p?Rn(c):c;for(;oe(g)&&!Mo(g);){const m=Bt(g),b=Us(g);(p?b||f:b||m.position!=="static"||!f||!["absolute","fixed"].includes(f.position))?f=m:u=u.filter(y=>y!==g),g=Rn(g)}return d.set(c,u),u}(t,this._c):[].concat(n),r=[...o,i],a=r[0],l=r.reduce((c,d)=>{const h=Ir(t,d,s);return c.top=yn(h.top,c.top),c.right=Fr(h.right,c.right),c.bottom=Fr(h.bottom,c.bottom),c.left=yn(h.left,c.left),c},Ir(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=Nt(n),o=re(n);if(n===o)return t;let r={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&i!=="fixed")&&((de(n)!=="body"||es(o))&&(r=ns(n)),Nt(n))){const c=An(n);a=Ve(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-r.scrollLeft*a.x+l.x,y:t.y*a.y-r.scrollTop*a.y+l.y}},isElement:oe,getDimensions:function(e){return Nt(e)?oc(e):e.getBoundingClientRect()},getOffsetParent:Br,getDocumentElement:re,getScale:Ve,async getElementRects(e){let{reference:t,floating:n,strategy:i}=e;const s=this.getOffsetParent||Br,o=this.getDimensions;return{reference:Ym(t,await s(n),i),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Bt(e).direction==="rtl"},Km=(e,t,n)=>{const i=new Map,s={platform:Xm,...n},o={...s.platform,_c:i};return Im(e,t,{...s,platform:o})},Pe={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function qs(e,t){let n=Pe.themes[e]||{},i;do i=n[t],typeof i>"u"?n.$extend?n=Pe.themes[n.$extend]||{}:(n=null,i=Pe[t]):n=null;while(n);return i}function Gm(e){const t=[e];let n=Pe.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Pe.themes[n.$extend]||{}):n=null;while(n);return t.map(i=>`v-popper--theme-${i}`)}function Nr(e){const t=[e];let n=Pe.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Pe.themes[n.$extend]||{}):n=null;while(n);return t}let qe=!1;if(typeof window<"u"){qe=!1;try{const e=Object.defineProperty({},"passive",{get(){qe=!0}});window.addEventListener("test",null,e)}catch{}}let fc=!1;typeof window<"u"&&typeof navigator<"u"&&(fc=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Jm=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Hr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},jr={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Wr(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function ms(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Ot=[];let ge=null;const Vr={};function Ur(e){let t=Vr[e];return t||(t=Vr[e]=[]),t}let Ys=function(){};typeof window<"u"&&(Ys=window.Element);function j(e){return function(t){return qs(t.theme,e)}}const bs="__floating-vue__popper",pc=()=>nt({name:"VPopper",provide(){return{[bs]:{parentPopper:this}}},inject:{[bs]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:j("disabled")},positioningDisabled:{type:Boolean,default:j("positioningDisabled")},placement:{type:String,default:j("placement"),validator:e=>Jm.includes(e)},delay:{type:[String,Number,Object],default:j("delay")},distance:{type:[Number,String],default:j("distance")},skidding:{type:[Number,String],default:j("skidding")},triggers:{type:Array,default:j("triggers")},showTriggers:{type:[Array,Function],default:j("showTriggers")},hideTriggers:{type:[Array,Function],default:j("hideTriggers")},popperTriggers:{type:Array,default:j("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:j("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:j("popperHideTriggers")},container:{type:[String,Object,Ys,Boolean],default:j("container")},boundary:{type:[String,Ys],default:j("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:j("strategy")},autoHide:{type:[Boolean,Function],default:j("autoHide")},handleResize:{type:Boolean,default:j("handleResize")},instantMove:{type:Boolean,default:j("instantMove")},eagerMount:{type:Boolean,default:j("eagerMount")},popperClass:{type:[String,Array,Object],default:j("popperClass")},computeTransformOrigin:{type:Boolean,default:j("computeTransformOrigin")},autoMinSize:{type:Boolean,default:j("autoMinSize")},autoSize:{type:[Boolean,String],default:j("autoSize")},autoMaxSize:{type:Boolean,default:j("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:j("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:j("preventOverflow")},overflowPadding:{type:[Number,String],default:j("overflowPadding")},arrowPadding:{type:[Number,String],default:j("arrowPadding")},arrowOverflow:{type:Boolean,default:j("arrowOverflow")},flip:{type:Boolean,default:j("flip")},shift:{type:Boolean,default:j("shift")},shiftCrossAxis:{type:Boolean,default:j("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:j("noAutoFocus")},disposeTimeout:{type:Number,default:j("disposeTimeout")}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[bs])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},...["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{}),...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var i,s;(i=this.parentPopper)!=null&&i.lockedChild&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(n||!this.disabled)&&(((s=this.parentPopper)==null?void 0:s.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.$_isDisposed&&(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.$_isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(Wm({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(Nm({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Vm({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Hm({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push($m({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:s,middlewareData:o})=>{let r;const{centerOffset:a}=o.arrow;return i.startsWith("top")||i.startsWith("bottom")?r=Math.abs(a)>s.reference.width/2:r=Math.abs(a)>s.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:s,placement:o,middlewareData:r})=>{var a;if((a=r.autoSize)!=null&&a.skip)return{};let l,c;return o.startsWith("top")||o.startsWith("bottom")?l=s.reference.width:c=s.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Um({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i,availableHeight:s})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const n=await Km(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),ge&&this.instantMove&&ge.instantMove&&ge!==this.parentPopper){ge.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e=null,t=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(ge=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await ms(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Di(this.$_referenceNode),...Di(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),i=n.parentNode.getBoundingClientRect(),s=t.x+t.width/2-(i.left+n.offsetLeft),o=t.y+t.height/2-(i.top+n.offsetTop);this.result.transformOrigin=`${s}px ${o}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<Ot.length;n++)t=Ot[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}Ot.push(this),document.body.classList.add("v-popper--some-open");for(const t of Nr(this.theme))Ur(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await ms(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Wr(Ot,this),Ot.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Nr(this.theme)){const i=Ur(n);Wr(i,this),i.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}ge===this&&(ge=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await ms(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,Hr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Hr,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,jr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],jr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(i=>i.addEventListener(t,n,qe?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,i,s){let o=n;i!=null&&(o=typeof i=="function"?i(o):i),o.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,s)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:i,eventType:s,handler:o}=n;!e||e===s?i.forEach(r=>r.removeEventListener(s,o)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const i=n.getAttribute(e);i&&(n.removeAttribute(e),n.setAttribute(t,i))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const i=e[n];i==null?t.removeAttribute(n):t.setAttribute(n,i)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(xn>=e.left&&xn<=e.right&&_n>=e.top&&_n<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=xn-Zt,i=_n-Qt,s=t.left+t.width/2-Zt+(t.top+t.height/2)-Qt+t.width+t.height,o=Zt+n*s,r=Qt+i*s;return Zn(Zt,Qt,o,r,t.left,t.top,t.left,t.bottom)||Zn(Zt,Qt,o,r,t.left,t.top,t.right,t.top)||Zn(Zt,Qt,o,r,t.right,t.top,t.right,t.bottom)||Zn(Zt,Qt,o,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(fc?(document.addEventListener("touchstart",qr,qe?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",Qm,qe?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",qr,!0),window.addEventListener("click",Zm,!0)),window.addEventListener("resize",n0));function qr(e){for(let t=0;t<Ot.length;t++){const n=Ot[t];try{const i=n.popperNode();n.$_mouseDownContains=i.contains(e.target)}catch{}}}function Zm(e){gc(e)}function Qm(e){gc(e,!0)}function gc(e,t=!1){const n={};for(let i=Ot.length-1;i>=0;i--){const s=Ot[i];try{const o=s.$_containsGlobalTarget=t0(s,e);s.$_pendingHide=!1,requestAnimationFrame(()=>{if(s.$_pendingHide=!1,!n[s.randomId]&&Yr(s,o,e)){if(s.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&o){let a=s.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let r=s.parentPopper;for(;r&&Yr(r,r.$_containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function t0(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function Yr(e,t,n){return n.closeAllPopover||n.closePopover&&t||e0(e,n)&&!t}function e0(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function n0(e){for(let t=0;t<Ot.length;t++)Ot[t].$_computePosition(e)}let Zt=0,Qt=0,xn=0,_n=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{Zt=xn,Qt=_n,xn=e.clientX,_n=e.clientY},qe?{passive:!0}:void 0);function Zn(e,t,n,i,s,o,r,a){const l=((r-s)*(t-o)-(a-o)*(e-s))/((a-o)*(n-e)-(r-s)*(i-t)),c=((n-e)*(t-o)-(i-t)*(e-s))/((a-o)*(n-e)-(r-s)*(i-t));return l>=0&&l<=1&&c>=0&&c<=1}const i0={extends:pc()},Po=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};function s0(e,t,n,i,s,o){return E(),N("div",{ref:"reference",class:it(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[B(e.$slots,"default",pl(bd(e.slotData)))],2)}const o0=Po(i0,[["render",s0]]);function r0(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let xi;function Xs(){Xs.init||(Xs.init=!0,xi=r0()!==-1)}var is={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Xs(),ao(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",xi&&this.$el.appendChild(e),e.data="about:blank",xi||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!xi&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const a0=gd();Wi("data-v-b329ee4c");const l0={class:"resize-observer",tabindex:"-1"};Vi();const c0=a0((e,t,n,i,s,o)=>(E(),Tt("div",l0)));is.render=c0;is.__scopeId="data-v-b329ee4c";is.__file="src/components/ResizeObserver.vue";const mc=(e="theme")=>({computed:{themeClass(){return Gm(this[e])}}}),d0=nt({name:"VPopperContent",components:{ResizeObserver:is},mixins:[mc()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),h0=["id","aria-hidden","tabindex","data-popper-placement"],u0={ref:"inner",class:"v-popper__inner"},f0=O("div",{class:"v-popper__arrow-outer"},null,-1),p0=O("div",{class:"v-popper__arrow-inner"},null,-1),g0=[f0,p0];function m0(e,t,n,i,s,o){const r=Ci("ResizeObserver");return E(),N("div",{id:e.popperId,ref:"popover",class:it(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:mi(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=md(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[O("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),O("div",{class:"v-popper__wrapper",style:mi(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[O("div",u0,[e.mounted?(E(),N(Ce,{key:0},[O("div",null,[B(e.$slots,"default")]),e.handleResize?(E(),Tt(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):ht("",!0)],64)):ht("",!0)],512),O("div",{ref:"arrow",class:"v-popper__arrow-container",style:mi(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},g0,4)],4)],46,h0)}const bc=Po(d0,[["render",m0]]),yc={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},b0=nt({name:"VPopperWrapper",components:{Popper:o0,PopperContent:bc},mixins:[yc,mc("finalTheme")],props:{theme:{type:String,default:null}},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function y0(e,t,n,i,s,o){const r=Ci("PopperContent"),a=Ci("Popper");return E(),Tt(a,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:it([e.themeClass])},{default:lt(({popperId:l,isShown:c,shouldMountContent:d,skipTransition:h,autoHide:u,show:f,hide:p,handleResize:g,onResize:m,classes:b,result:y})=>[B(e.$slots,"default",{shown:c,show:f,hide:p}),pt(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:c,mounted:d,"skip-transition":h,"auto-hide":u,"handle-resize":g,classes:b,result:y,onHide:p,onResize:m},{default:lt(()=>[B(e.$slots,"popper",{shown:c,hide:p})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}const To=Po(b0,[["render",y0]]);({...To});({...To});const x0={...To,name:"VTooltip",vPopperTheme:"tooltip"};nt({name:"VTooltipDirective",components:{Popper:pc(),PopperContent:bc},mixins:[yc],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>qs(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>qs(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(i=>this.onResult(t,i)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const _0=x0,v0={class:"flex items-start"},w0=nt({__name:"FwbTooltip",props:{placement:{default:"top"},theme:{default:"dark"},trigger:{default:"hover"}},setup(e){const t=e,n=z(()=>({light:"tooltip-light",dark:"tooltip-dark"})[t.theme]);return(i,s)=>(E(),N("div",v0,[pt(W(_0),{placement:i.placement,triggers:[i.trigger],theme:n.value,"auto-hide":""},{popper:lt(()=>[B(i.$slots,"content",{},void 0,!0)]),default:lt(()=>[B(i.$slots,"trigger",{},void 0,!0)]),_:3},8,["placement","triggers","theme"])]))}}),k0=Gi(w0,[["__scopeId","data-v-a61fcf97"]]),S0=async()=>(await jn.get("/api/database_url")).data,C0=oo("databaseStore",{state:()=>({databaseEndpoint:"",loading:!1,error:null}),actions:{async fetchDatabaseEndpoint(){if(!this.databaseEndpoint){this.loading=!0,this.error=null;try{const e=await S0();this.databaseEndpoint=e}catch{this.error="Failed to fetch database endpoint"}finally{this.loading=!1}}}},getters:{getDatabaseEndpoint:e=>()=>e.databaseEndpoint}}),xc=e=>(Wi("data-v-c60b885f"),e=e(),Vi(),e),M0={class:"app-header"},P0={class:"app-header__container"},T0=xc(()=>O("div",{class:"app-header__logo-section"},[O("img",{src:mu,alt:"Logo",class:"app-header__logo-image block dark:hidden"}),O("img",{src:bu,alt:"Logo",class:"app-header__logo-image hidden dark:block"})],-1)),O0={class:"app-header__right-section"},A0={class:"app-header__tooltip-content"},R0=xc(()=>O("span",{class:"tooltip-content__label"},"Database Endpoint: ",-1)),E0={class:"tooltip-content__info"},D0=nt({__name:"AppHeader",setup(e){const t=C0(),n=wd(),i=z(()=>n.darkMode),s=()=>{n.toggleDarkMode()},o=z(()=>t.databaseEndpoint);return gl(()=>{t.fetchDatabaseEndpoint()}),(r,a)=>(E(),N("header",M0,[O("div",P0,[T0,O("div",O0,[O("button",{onClick:s,class:"app-header__toggle-theme-button"},[pt(W(mn),{icon:i.value?"moon":"sun"},null,8,["icon"]),O("span",null,ft(i.value?"Dark Mode":"Light Mode"),1)]),pt(W(k0),{placement:"bottom",class:"cursor-pointer"},{trigger:lt(()=>[pt(W(kd),{class:"fa-lg app-header__db-icon"},{default:lt(()=>[pt(W(mn),{icon:"fa-solid fa-circle",class:"app-header__circle-icon",transform:"grow-13"}),pt(W(mn),{icon:"fa-solid fa-database",class:"app-header__database-icon"})]),_:1})]),content:lt(()=>[O("div",A0,[R0,O("span",E0,ft(o.value),1)])]),_:1})])])]))}}),L0=co(D0,[["__scopeId","data-v-c60b885f"]]);var hn=(e=>(e.RUNS="RUNS",e.SINGLE_RUN="SINGLE_RUN",e.SCENARIO="SCENARIO",e))(hn||{});const F0=e=>{let t=hn.RUNS,n=null;return e.path.startsWith("/dashboard")?t=hn.RUNS:e.path.startsWith("/runs")?(t=hn.SINGLE_RUN,n=e.params.runId):e.path.startsWith("/scenarios")&&(t=hn.SCENARIO,n=e.params.scenarioName),{viewType:t,id:n}},z0=e=>(Wi("data-v-a34e5046"),e=e(),Vi(),e),I0={key:0,class:"sidebar"},$0={class:"sidebar__header"},B0={class:"sidebar__header-content"},N0=z0(()=>O("h2",{class:"sidebar__title"},"Add Widgets",-1)),H0={class:"sidebar__filter-section"},j0={class:"sidebar__dropdown-button"},W0={class:"sidebar__dropdown-menu"},V0=["onClick"],U0={class:"sidebar__widget-list"},q0=["onClick"],Y0={class:"sidebar__widget-info"},X0={class:"sidebar__widget-title"},K0={class:"sidebar__widget-description"},G0={class:"sidebar__widget-preview"},J0=["src"],Z0=nt({__name:"AppWidgetSidebar",setup(e){const t=Hl(),n=Md(),i=z(()=>t.sidebarVisible),s=se(""),o=se(""),r=[{value:"",label:"All Widgets"},{value:st.CHART,label:"Chart"},{value:st.TABLE,label:"Table"},{value:st.METRIC,label:"Metric"},{value:st.CPU_USAGE,label:"CPU Usage"}],a=z(()=>{const u=r.find(f=>f.value===o.value);return u?u.label:"All Widgets"}),l=u=>{o.value=u.value},c=z(()=>gu.filter(u=>{const f=o.value?u.type===o.value:!0,p=u.title.toLowerCase().includes(s.value.toLowerCase());return f&&p})),d=()=>{t.setSidebarVisible(!1)},h=u=>{const{viewType:f,id:p}=F0(n);f&&t.addWidgets([{title:u.title,type:u.type,grid:u.grid,metadata:u.metadata,id:t.getWidgetId(f)}],f,p),d()};return(u,f)=>(E(),Tt(fl,{name:"slide"},{default:lt(()=>[i.value?(E(),N("div",I0,[O("div",$0,[O("div",B0,[pt(W(mn),{icon:"layer-group",class:"sidebar__icon"}),N0]),O("button",{onClick:d,class:"sidebar__close-button"},"×")]),O("div",H0,[pt(W(Jg),{text:"All Widgets","align-to-end":""},{trigger:lt(()=>[O("button",j0,[O("div",null,ft(a.value),1),pt(W(mn),{icon:"chevron-down",class:"sidebar__dropdown-icon"})])]),default:lt(()=>[O("div",W0,[(E(),N(Ce,null,Rs(r,p=>O("div",{key:p.value,onClick:g=>l(p),class:"sidebar__dropdown-item"},ft(p.label),9,V0)),64))])]),_:1}),Sd(O("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>s.value=p),type:"text",placeholder:"Search widgets here...",class:"sidebar__search-input"},null,512),[[Cd,s.value]])]),O("div",U0,[(E(!0),N(Ce,null,Rs(c.value,p=>(E(),N("button",{key:p.title,onClick:g=>h(p),class:"sidebar__widget-item"},[O("div",Y0,[O("h3",X0,ft(p.title),1),O("p",K0,ft(p.description),1)]),O("div",G0,[O("img",{src:p.image,alt:"widget preview",class:"sidebar__widget-image"},null,8,J0)])],8,q0))),128))])])):ht("",!0)]),_:1}))}}),Q0=co(Z0,[["__scopeId","data-v-a34e5046"]]),tb={class:"layout"},eb={class:"layout__content"},nb={class:"layout__title"},ib={class:"layout__filters"},sb={class:"layout__breadcrumbs"},ob={class:"layout__dashboard"},rb=nt({__name:"MainLayout",setup(e){const t=Hl();return(n,i)=>(E(),N("div",tb,[O("div",{class:it([{blurred:W(t).sidebarVisible},"layout__main"])},[pt(L0,{"show-add-widget":n.showAddWidget},null,8,["show-add-widget"]),O("div",eb,[O("div",nb,[B(n.$slots,"title",{},void 0,!0)]),O("div",ib,[B(n.$slots,"filters",{},void 0,!0)]),O("div",sb,[B(n.$slots,"breadcrumbs",{},void 0,!0)]),O("div",ob,[B(n.$slots,"dashboard",{},void 0,!0)])])],2),pt(Q0)]))}}),Kv=co(rb,[["__scopeId","data-v-69038f01"]]);/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function Un(e){return e+.5|0}const te=(e,t,n)=>Math.max(Math.min(e,n),t);function un(e){return te(Un(e*2.55),0,255)}function ae(e){return te(Un(e*255),0,255)}function Yt(e){return te(Un(e/2.55)/100,0,1)}function Xr(e){return te(Un(e*100),0,100)}const vt={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},Ks=[..."0123456789ABCDEF"],ab=e=>Ks[e&15],lb=e=>Ks[(e&240)>>4]+Ks[e&15],Qn=e=>(e&240)>>4===(e&15),cb=e=>Qn(e.r)&&Qn(e.g)&&Qn(e.b)&&Qn(e.a);function db(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&vt[e[1]]*17,g:255&vt[e[2]]*17,b:255&vt[e[3]]*17,a:t===5?vt[e[4]]*17:255}:(t===7||t===9)&&(n={r:vt[e[1]]<<4|vt[e[2]],g:vt[e[3]]<<4|vt[e[4]],b:vt[e[5]]<<4|vt[e[6]],a:t===9?vt[e[7]]<<4|vt[e[8]]:255})),n}const hb=(e,t)=>e<255?t(e):"";function ub(e){var t=cb(e)?ab:lb;return e?"#"+t(e.r)+t(e.g)+t(e.b)+hb(e.a,t):void 0}const fb=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _c(e,t,n){const i=t*Math.min(n,1-n),s=(o,r=(o+e/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function pb(e,t,n){const i=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function gb(e,t,n){const i=_c(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function mb(e,t,n,i,s){return e===s?(t-n)/i+(t<n?6:0):t===s?(n-e)/i+2:(e-t)/i+4}function Oo(e){const n=e.r/255,i=e.g/255,s=e.b/255,o=Math.max(n,i,s),r=Math.min(n,i,s),a=(o+r)/2;let l,c,d;return o!==r&&(d=o-r,c=a>.5?d/(2-o-r):d/(o+r),l=mb(n,i,s,d,o),l=l*60+.5),[l|0,c||0,a]}function Ao(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(ae)}function Ro(e,t,n){return Ao(_c,e,t,n)}function bb(e,t,n){return Ao(gb,e,t,n)}function yb(e,t,n){return Ao(pb,e,t,n)}function vc(e){return(e%360+360)%360}function xb(e){const t=fb.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?un(+t[5]):ae(+t[5]));const s=vc(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=bb(s,o,r):t[1]==="hsv"?i=yb(s,o,r):i=Ro(s,o,r),{r:i[0],g:i[1],b:i[2],a:n}}function _b(e,t){var n=Oo(e);n[0]=vc(n[0]+t),n=Ro(n),e.r=n[0],e.g=n[1],e.b=n[2]}function vb(e){if(!e)return;const t=Oo(e),n=t[0],i=Xr(t[1]),s=Xr(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${s}%, ${Yt(e.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Kr={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"},Gr={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"};function wb(){const e={},t=Object.keys(Gr),n=Object.keys(Kr);let i,s,o,r,a;for(i=0;i<t.length;i++){for(r=a=t[i],s=0;s<n.length;s++)o=n[s],a=a.replace(o,Kr[o]);o=parseInt(Gr[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let ti;function kb(e){ti||(ti=wb(),ti.transparent=[0,0,0,0]);const t=ti[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Sb=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Cb(e){const t=Sb.exec(e);let n=255,i,s,o;if(t){if(t[7]!==i){const r=+t[7];n=t[8]?un(r):te(r*255,0,255)}return i=+t[1],s=+t[3],o=+t[5],i=255&(t[2]?un(i):te(i,0,255)),s=255&(t[4]?un(s):te(s,0,255)),o=255&(t[6]?un(o):te(o,0,255)),{r:i,g:s,b:o,a:n}}}function Mb(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Yt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const ys=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,He=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Pb(e,t,n){const i=He(Yt(e.r)),s=He(Yt(e.g)),o=He(Yt(e.b));return{r:ae(ys(i+n*(He(Yt(t.r))-i))),g:ae(ys(s+n*(He(Yt(t.g))-s))),b:ae(ys(o+n*(He(Yt(t.b))-o))),a:e.a+n*(t.a-e.a)}}function ei(e,t,n){if(e){let i=Oo(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=Ro(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function wc(e,t){return e&&Object.assign(t||{},e)}function Jr(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ae(e[3]))):(t=wc(e,{r:0,g:0,b:0,a:1}),t.a=ae(t.a)),t}function Tb(e){return e.charAt(0)==="r"?Cb(e):xb(e)}class En{constructor(t){if(t instanceof En)return t;const n=typeof t;let i;n==="object"?i=Jr(t):n==="string"&&(i=db(t)||kb(t)||Tb(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=wc(this._rgb);return t&&(t.a=Yt(t.a)),t}set rgb(t){this._rgb=Jr(t)}rgbString(){return this._valid?Mb(this._rgb):void 0}hexString(){return this._valid?ub(this._rgb):void 0}hslString(){return this._valid?vb(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,i.r=255&c*i.r+o*s.r+.5,i.g=255&c*i.g+o*s.g+.5,i.b=255&c*i.b+o*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=Pb(this._rgb,t._rgb,n)),this}clone(){return new En(this.rgb)}alpha(t){return this._rgb.a=ae(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Un(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 ei(this._rgb,2,t),this}darken(t){return ei(this._rgb,2,-t),this}saturate(t){return ei(this._rgb,1,t),this}desaturate(t){return ei(this._rgb,1,-t),this}rotate(t){return _b(this._rgb,t),this}}/*!
 * Chart.js v4.4.3
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */function Vt(){}const Ob=(()=>{let e=0;return()=>e++})();function Y(e){return e===null||typeof e>"u"}function Q(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function V(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ct(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function _t(e,t){return ct(e)?e:t}function I(e,t){return typeof e>"u"?t:e}const Ab=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,kc=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function K(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function q(e,t,n,i){let s,o,r;if(Q(e))for(o=e.length,s=0;s<o;s++)t.call(n,e[s],s);else if(V(e))for(r=Object.keys(e),o=r.length,s=0;s<o;s++)t.call(n,e[r[s]],r[s])}function Li(e,t){let n,i,s,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=e[n],o=t[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Fi(e){if(Q(e))return e.map(Fi);if(V(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let s=0;for(;s<i;++s)t[n[s]]=Fi(e[n[s]]);return t}return e}function Sc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Rb(e,t,n,i){if(!Sc(e))return;const s=t[e],o=n[e];V(s)&&V(o)?Dn(s,o,i):t[e]=Fi(o)}function Dn(e,t,n){const i=Q(t)?t:[t],s=i.length;if(!V(e))return e;n=n||{};const o=n.merger||Rb;let r;for(let a=0;a<s;++a){if(r=i[a],!V(r))continue;const l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)o(l[c],e,r,n)}return e}function vn(e,t){return Dn(e,t,{merger:Eb})}function Eb(e,t,n){if(!Sc(e))return;const i=t[e],s=n[e];V(i)&&V(s)?vn(i,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Fi(s))}const Zr={"":e=>e,x:e=>e.x,y:e=>e.y};function Db(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function Lb(e){const t=Db(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function De(e,t){return(Zr[t]||(Zr[t]=Lb(t)))(e)}function Eo(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ln=e=>typeof e<"u",he=e=>typeof e=="function",Qr=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Fb(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Z=Math.PI,J=2*Z,zb=J+Z,zi=Number.POSITIVE_INFINITY,Ib=Z/180,ot=Z/2,me=Z/4,ta=Z*2/3,ee=Math.log10,Ht=Math.sign;function wn(e,t,n){return Math.abs(e-t)<n}function ea(e){const t=Math.round(e);e=wn(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(ee(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function $b(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((s,o)=>s-o).pop(),t}function Fn(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Bb(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Cc(e,t,n){let i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function $t(e){return e*(Z/180)}function Do(e){return e*(180/Z)}function na(e){if(!ct(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Mc(e,t){const n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*Z&&(o+=J),{angle:o,distance:s}}function Gs(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Nb(e,t){return(e-t+zb)%J-Z}function Pt(e){return(e%J+J)%J}function zn(e,t,n,i){const s=Pt(e),o=Pt(t),r=Pt(n),a=Pt(o-s),l=Pt(r-s),c=Pt(s-o),d=Pt(s-r);return s===o||s===r||i&&o===r||a>l&&c<d}function gt(e,t,n){return Math.max(t,Math.min(n,e))}function Hb(e){return gt(e,-32768,32767)}function ne(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function Lo(e,t,n){n=n||(r=>e[r]<t);let i=e.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,n(o)?s=o:i=o;return{lo:s,hi:i}}const Se=(e,t,n,i)=>Lo(e,n,i?s=>{const o=e[s][t];return o<n||o===n&&e[s+1][t]===n}:s=>e[s][t]<n),jb=(e,t,n)=>Lo(e,n,i=>e[i][t]>=n);function Wb(e,t,n){let i=0,s=e.length;for(;i<s&&e[i]<t;)i++;for(;s>i&&e[s-1]>n;)s--;return i>0||s<e.length?e.slice(i,s):e}const Pc=["push","pop","shift","splice","unshift"];function Vb(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Pc.forEach(n=>{const i="_onData"+Eo(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function ia(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(Pc.forEach(o=>{delete e[o]}),delete e._chartjs)}function Tc(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Oc=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Ac(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,Oc.call(window,()=>{i=!1,e.apply(t,n)}))}}function Ub(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const Fo=e=>e==="start"?"left":e==="end"?"right":"center",ut=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,qb=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function Yb(e,t,n){const i=t.length;let s=0,o=i;if(e._sorted){const{iScale:r,_parsed:a}=e,l=r.axis,{min:c,max:d,minDefined:h,maxDefined:u}=r.getUserBounds();h&&(s=gt(Math.min(Se(a,l,c).lo,n?i:Se(t,l,r.getPixelForValue(c)).lo),0,i-1)),u?o=gt(Math.max(Se(a,r.axis,d,!0).hi+1,n?0:Se(t,l,r.getPixelForValue(d),!0).hi+1),s,i)-s:o=i-s}return{start:s,count:o}}function Xb(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),o}const ni=e=>e===0||e===1,sa=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*J/n)),oa=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*J/n)+1,kn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ot)+1,easeOutSine:e=>Math.sin(e*ot),easeInOutSine:e=>-.5*(Math.cos(Z*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ni(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ni(e)?e:sa(e,.075,.3),easeOutElastic:e=>ni(e)?e:oa(e,.075,.3),easeInOutElastic(e){return ni(e)?e:e<.5?.5*sa(e*2,.1125,.45):.5+.5*oa(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-kn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?kn.easeInBounce(e*2)*.5:kn.easeOutBounce(e*2-1)*.5+.5};function zo(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ra(e){return zo(e)?e:new En(e)}function xs(e){return zo(e)?e:new En(e).saturate(.5).darken(.1).hexString()}const Kb=["x","y","borderWidth","radius","tension"],Gb=["color","borderColor","backgroundColor"];function Jb(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Gb},numbers:{type:"number",properties:Kb}}),e.describe("animations",{_fallback:"animation"}),e.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=>t|0}}}})}function Zb(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const aa=new Map;function Qb(e,t){t=t||{};const n=e+JSON.stringify(t);let i=aa.get(n);return i||(i=new Intl.NumberFormat(e,t),aa.set(n,i)),i}function ss(e,t,n){return Qb(t,n).format(e)}const Rc={values(e){return Q(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=ty(e,n)}const r=ee(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ss(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(ee(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?Rc.numeric.call(this,e,t,n):""}};function ty(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var os={formatters:Rc};function ey(e){e.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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:os.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Le=Object.create(null),Js=Object.create(null);function Sn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;i<s;++i){const o=n[i];e=e[o]||(e[o]=Object.create(null))}return e}function _s(e,t,n){return typeof t=="string"?Dn(Sn(e,t),n):Dn(Sn(e,""),t)}class ny{constructor(t,n){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=i=>i.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={},this.hoverBackgroundColor=(i,s)=>xs(s.backgroundColor),this.hoverBorderColor=(i,s)=>xs(s.borderColor),this.hoverColor=(i,s)=>xs(s.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(n)}set(t,n){return _s(this,t,n)}get(t){return Sn(this,t)}describe(t,n){return _s(Js,t,n)}override(t,n){return _s(Le,t,n)}route(t,n,i,s){const o=Sn(this,t),r=Sn(this,i),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[s];return V(l)?Object.assign({},c,l):I(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var et=new ny({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jb,Zb,ey]);function iy(e){return!e||Y(e.size)||Y(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Ii(e,t,n,i,s){let o=t[s];return o||(o=t[s]=e.measureText(s).width,n.push(s)),o>i&&(i=o),i}function sy(e,t,n,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},o=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let r=0;const a=n.length;let l,c,d,h,u;for(l=0;l<a;l++)if(h=n[l],h!=null&&!Q(h))r=Ii(e,s,o,r,h);else if(Q(h))for(c=0,d=h.length;c<d;c++)u=h[c],u!=null&&!Q(u)&&(r=Ii(e,s,o,r,u));e.restore();const f=o.length/2;if(f>n.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function be(e,t,n){const i=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*i)/i+s}function la(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Zs(e,t,n,i){Ec(e,t,n,i,null)}function Ec(e,t,n,i,s){let o,r,a,l,c,d,h,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*Ib;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),f){default:s?e.ellipse(n,i,s/2,g,0,0,J):e.arc(n,i,g,0,J),e.closePath();break;case"triangle":d=s?s/2:g,e.moveTo(n+Math.sin(m)*d,i-Math.cos(m)*g),m+=ta,e.lineTo(n+Math.sin(m)*d,i-Math.cos(m)*g),m+=ta,e.lineTo(n+Math.sin(m)*d,i-Math.cos(m)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+me)*l,h=Math.cos(m+me)*(s?s/2-c:l),a=Math.sin(m+me)*l,u=Math.sin(m+me)*(s?s/2-c:l),e.arc(n-h,i-a,c,m-Z,m-ot),e.arc(n+u,i-r,c,m-ot,m),e.arc(n+h,i+a,c,m,m+ot),e.arc(n-u,i+r,c,m+ot,m+Z),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,d=s?s/2:l,e.rect(n-d,i-l,2*d,2*l);break}m+=me;case"rectRot":h=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),e.moveTo(n-h,i-a),e.lineTo(n+u,i-r),e.lineTo(n+h,i+a),e.lineTo(n-u,i+r),e.closePath();break;case"crossRot":m+=me;case"cross":h=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),e.moveTo(n-h,i-a),e.lineTo(n+h,i+a),e.moveTo(n+u,i-r),e.lineTo(n-u,i+r);break;case"star":h=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),e.moveTo(n-h,i-a),e.lineTo(n+h,i+a),e.moveTo(n+u,i-r),e.lineTo(n-u,i+r),m+=me,h=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),e.moveTo(n-h,i-a),e.lineTo(n+h,i+a),e.moveTo(n+u,i-r),e.lineTo(n-u,i+r);break;case"line":r=s?s/2:Math.cos(m)*g,a=Math.sin(m)*g,e.moveTo(n-r,i-a),e.lineTo(n+r,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(m)*(s?s/2:g),i+Math.sin(m)*g);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Xt(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Io(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function $o(e){e.restore()}function oy(e,t,n,i,s){if(!t)return e.lineTo(n.x,n.y);if(s==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else s==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function ry(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function ay(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Y(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function ly(e,t,n,i,s){if(s.strikethrough||s.underline){const o=e.measureText(i),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,d),e.lineTo(a,d),e.stroke()}}function cy(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Fe(e,t,n,i,s,o={}){const r=Q(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,ay(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&cy(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Y(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,i,o.maxWidth)),e.fillText(c,n,i,o.maxWidth),ly(e,n,i,c,o),i+=Number(s.lineHeight);e.restore()}function In(e,t){const{x:n,y:i,w:s,h:o,radius:r}=t;e.arc(n+r.topLeft,i+r.topLeft,r.topLeft,1.5*Z,Z,!0),e.lineTo(n,i+o-r.bottomLeft),e.arc(n+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,Z,ot,!0),e.lineTo(n+s-r.bottomRight,i+o),e.arc(n+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,ot,0,!0),e.lineTo(n+s,i+r.topRight),e.arc(n+s-r.topRight,i+r.topRight,r.topRight,0,-ot,!0),e.lineTo(n+r.topLeft,i)}const dy=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,hy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function uy(e,t){const n=(""+e).match(dy);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const fy=e=>+e||0;function Bo(e,t){const n={},i=V(t),s=i?Object.keys(t):t,o=V(e)?i?r=>I(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of s)n[r]=fy(o(r));return n}function Dc(e){return Bo(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Te(e){return Bo(e,["topLeft","topRight","bottomLeft","bottomRight"])}function mt(e){const t=Dc(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function at(e,t){e=e||{},t=t||et.font;let n=I(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=I(e.style,t.style);i&&!(""+i).match(hy)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:I(e.family,t.family),lineHeight:uy(I(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:I(e.weight,t.weight),string:""};return s.string=iy(s),s}function ii(e,t,n,i){let s,o,r;for(s=0,o=e.length;s<o;++s)if(r=e[s],r!==void 0&&r!==void 0)return r}function py(e,t,n){const{min:i,max:s}=e,o=kc(t,(s-i)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function ue(e,t){return Object.assign(Object.create(e),t)}function No(e,t=[""],n,i,s=()=>e[0]){const o=n||e;typeof i>"u"&&(i=Ic("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:i,_getTarget:s,override:a=>No([a,...e],t,o,i)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Fc(a,l,()=>wy(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return da(a).includes(l)},ownKeys(a){return da(a)},set(a,l,c){const d=a._storage||(a._storage=s());return a[l]=d[l]=c,delete a._keys,!0}})}function Ye(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Lc(e,i),setContext:o=>Ye(e,o,n,i),override:o=>Ye(e.override(o),t,n,i)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return Fc(o,r,()=>my(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Lc(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:he(n)?n:()=>n,isIndexable:he(i)?i:()=>i}}const gy=(e,t)=>e?e+Eo(t):t,Ho=(e,t)=>V(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Fc(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function my(e,t,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=e;let a=i[t];return he(a)&&r.isScriptable(t)&&(a=by(t,a,e,n)),Q(a)&&a.length&&(a=yy(t,a,e,r.isIndexable)),Ho(t,a)&&(a=Ye(a,s,o&&o[t],r)),a}function by(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||i);return a.delete(e),Ho(e,l)&&(l=jo(s._scopes,s,e,l)),l}function yy(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&i(e))return t[o.index%t.length];if(V(t[0])){const l=t,c=s._scopes.filter(d=>d!==l);t=[];for(const d of l){const h=jo(c,s,e,d);t.push(Ye(h,o,r&&r[e],a))}}return t}function zc(e,t,n){return he(e)?e(t,n):e}const xy=(e,t)=>e===!0?t:typeof e=="string"?De(t,e):void 0;function _y(e,t,n,i,s){for(const o of t){const r=xy(n,o);if(r){e.add(r);const a=zc(r._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(r===!1&&typeof i<"u"&&n!==i)return null}return!1}function jo(e,t,n,i){const s=t._rootScopes,o=zc(t._fallback,n,i),r=[...e,...s],a=new Set;a.add(i);let l=ca(a,r,n,o||n,i);return l===null||typeof o<"u"&&o!==n&&(l=ca(a,r,o,l,i),l===null)?!1:No(Array.from(a),[""],s,o,()=>vy(t,n,i))}function ca(e,t,n,i,s){for(;n;)n=_y(e,t,n,i,s);return n}function vy(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Q(s)&&V(n)?n:s||{}}function wy(e,t,n,i){let s;for(const o of t)if(s=Ic(gy(o,e),n),typeof s<"u")return Ho(e,s)?jo(n,i,e,s):s}function Ic(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function da(e){let t=e._keys;return t||(t=e._keys=ky(e._scopes)),t}function ky(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}const Sy=Number.EPSILON||1e-14,Xe=(e,t)=>t<e.length&&!e[t].skip&&e[t],$c=e=>e==="x"?"y":"x";function Cy(e,t,n,i){const s=e.skip?t:e,o=t,r=n.skip?t:n,a=Gs(o,s),l=Gs(r,o);let c=a/(a+l),d=l/(a+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=i*c,u=i*d;return{previous:{x:o.x-h*(r.x-s.x),y:o.y-h*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function My(e,t,n){const i=e.length;let s,o,r,a,l,c=Xe(e,0);for(let d=0;d<i-1;++d)if(l=c,c=Xe(e,d+1),!(!l||!c)){if(wn(t[d],0,Sy)){n[d]=n[d+1]=0;continue}s=n[d]/t[d],o=n[d+1]/t[d],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),n[d]=s*r*t[d],n[d+1]=o*r*t[d])}}function Py(e,t,n="x"){const i=$c(n),s=e.length;let o,r,a,l=Xe(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Xe(e,c+1),!a)continue;const d=a[n],h=a[i];r&&(o=(d-r[n])/3,a[`cp1${n}`]=d-o,a[`cp1${i}`]=h-o*t[c]),l&&(o=(l[n]-d)/3,a[`cp2${n}`]=d+o,a[`cp2${i}`]=h+o*t[c])}}function Ty(e,t="x"){const n=$c(t),i=e.length,s=Array(i).fill(0),o=Array(i);let r,a,l,c=Xe(e,0);for(r=0;r<i;++r)if(a=l,l=c,c=Xe(e,r+1),!!l){if(c){const d=c[t]-l[t];s[r]=d!==0?(c[n]-l[n])/d:0}o[r]=a?c?Ht(s[r-1])!==Ht(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}My(e,s,o),Py(e,o,t)}function si(e,t,n){return Math.max(Math.min(e,n),t)}function Oy(e,t){let n,i,s,o,r,a=Xt(e[0],t);for(n=0,i=e.length;n<i;++n)r=o,o=a,a=n<i-1&&Xt(e[n+1],t),o&&(s=e[n],r&&(s.cp1x=si(s.cp1x,t.left,t.right),s.cp1y=si(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=si(s.cp2x,t.left,t.right),s.cp2y=si(s.cp2y,t.top,t.bottom)))}function Ay(e,t,n,i,s){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Ty(e,s);else{let c=i?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=Cy(c,a,e[Math.min(o+1,r-(i?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Oy(e,n)}function Wo(){return typeof window<"u"&&typeof document<"u"}function Vo(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function $i(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const rs=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Ry(e,t){return rs(e).getPropertyValue(t)}const Ey=["top","right","bottom","left"];function Oe(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=Ey[s];i[o]=parseFloat(e[t+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Dy=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Ly(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:o}=i;let r=!1,a,l;if(Dy(s,o,e.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function ve(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=rs(n),o=s.boxSizing==="border-box",r=Oe(s,"padding"),a=Oe(s,"border","width"),{x:l,y:c,box:d}=Ly(e,n),h=r.left+(d&&a.left),u=r.top+(d&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-u)/p*n.height/i)}}function Fy(e,t,n){let i,s;if(t===void 0||n===void 0){const o=e&&Vo(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const r=o.getBoundingClientRect(),a=rs(o),l=Oe(a,"border","width"),c=Oe(a,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,i=$i(a.maxWidth,o,"clientWidth"),s=$i(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:i||zi,maxHeight:s||zi}}const oi=e=>Math.round(e*10)/10;function zy(e,t,n,i){const s=rs(e),o=Oe(s,"margin"),r=$i(s.maxWidth,e,"clientWidth")||zi,a=$i(s.maxHeight,e,"clientHeight")||zi,l=Fy(e,t,n);let{width:c,height:d}=l;if(s.boxSizing==="content-box"){const u=Oe(s,"border","width"),f=Oe(s,"padding");c-=f.width+u.width,d-=f.height+u.height}return c=Math.max(0,c-o.width),d=Math.max(0,i?c/i:d-o.height),c=oi(Math.min(c,r,l.maxWidth)),d=oi(Math.min(d,a,l.maxHeight)),c&&!d&&(d=oi(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&d>l.height&&(d=l.height,c=oi(Math.floor(d*i))),{width:c,height:d}}function ha(e,t,n){const i=t||1,s=Math.floor(e.height*i),o=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||r.height!==s||r.width!==o?(e.currentDevicePixelRatio=i,r.height=s,r.width=o,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Iy=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Wo()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function ua(e,t){const n=Ry(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function we(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function $y(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function By(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=we(e,s,n),a=we(s,o,n),l=we(o,t,n),c=we(r,a,n),d=we(a,l,n);return we(c,d,n)}const Ny=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},Hy=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ue(e,t,n){return e?Ny(t,n):Hy()}function Bc(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Nc(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Hc(e){return e==="angle"?{between:zn,compare:Nb,normalize:Pt}:{between:ne,compare:(t,n)=>t-n,normalize:t=>t}}function fa({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function jy(e,t,n){const{property:i,start:s,end:o}=n,{between:r,normalize:a}=Hc(i),l=t.length;let{start:c,end:d,loop:h}=e,u,f;if(h){for(c+=l,d+=l,u=0,f=l;u<f&&r(a(t[c%l][i]),s,o);++u)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:h,style:e.style}}function Wy(e,t,n){if(!n)return[e];const{property:i,start:s,end:o}=n,r=t.length,{compare:a,between:l,normalize:c}=Hc(i),{start:d,end:h,loop:u,style:f}=jy(e,t,n),p=[];let g=!1,m=null,b,y,_;const w=()=>l(s,_,b)&&a(s,_)!==0,x=()=>a(o,b)===0||l(o,_,b),S=()=>g||w(),k=()=>!g||x();for(let C=d,M=d;C<=h;++C)y=t[C%r],!y.skip&&(b=c(y[i]),b!==_&&(g=l(b,s,o),m===null&&S()&&(m=a(b,s)===0?C:M),m!==null&&k()&&(p.push(fa({start:m,end:C,loop:u,count:r,style:f})),m=null),M=C,_=b));return m!==null&&p.push(fa({start:m,end:h,loop:u,count:r,style:f})),p}function Vy(e,t){const n=[],i=e.segments;for(let s=0;s<i.length;s++){const o=Wy(i[s],e.points,t);o.length&&n.push(...o)}return n}function Uy(e,t,n,i){let s=0,o=t-1;if(n&&!i)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(o+=s);o>s&&e[o%t].skip;)o--;return o%=t,{start:s,end:o}}function qy(e,t,n,i){const s=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%s];c.skip||c.stop?a.skip||(i=!1,o.push({start:t%s,end:(l-1)%s,loop:i}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:i}),o}function Yy(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const o=!!e._loop,{start:r,end:a}=Uy(n,s,o,i);if(i===!0)return pa(e,[{start:r,end:a,loop:o}],n,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return pa(e,qy(n,r,l,c),n,t)}function pa(e,t,n,i){return!i||!i.setContext||!n?t:Xy(e,t,n,i)}function Xy(e,t,n,i){const s=e._chart.getContext(),o=ga(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let d=o,h=t[0].start,u=h;function f(p,g,m,b){const y=a?-1:1;if(p!==g){for(p+=l;n[p%l].skip;)p-=y;for(;n[g%l].skip;)g+=y;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),d=b,h=g%l)}}for(const p of t){h=a?h:p.start;let g=n[h%l],m;for(u=h+1;u<=p.end;u++){const b=n[u%l];m=ga(i.setContext(ue(s,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Ky(m,d)&&f(h,u-1,p.loop,d),g=b,d=m}h<u-1&&f(h,u-1,p.loop,d)}return c}function ga(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ky(e,t){if(!t)return!1;const n=[],i=function(s,o){return zo(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
 * Chart.js v4.4.3
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */class Gy{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,s){const o=n.listeners[s],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(i-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Oc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ut=new Gy;const ma="transparent",Jy={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=ra(e||ma),s=i.valid&&ra(t||ma);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Zy{constructor(t,n,i,s){const o=n[i];s=ii([t.to,s,o,t.from]);const r=ii([t.from,o,s]);this._active=!0,this._fn=t.fn||Jy[t.type||typeof r],this._easing=kn[t.easing]||kn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ii([t.to,n,s,t.from]),this._from=ii([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<i),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/i%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class jc{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!V(t))return;const n=Object.keys(et.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!V(o))return;const r={};for(const a of n)r[a]=o[a];(Q(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,n){const i=n.options,s=tx(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&Qy(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,n){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const d=n[c];let h=o[c];const u=i.get(c);if(h)if(u&&h.active()){h.update(u,d,a);continue}else h.cancel();if(!u||!u.duration){t[c]=d;continue}o[c]=h=new Zy(u,t,c,d),s.push(h)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Ut.add(this._chart,i),!0}}function Qy(e,t){const n=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=e[i[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function tx(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ba(e,t){const n=e&&e.options||{},i=n.reverse,s=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function ex(e,t,n){if(n===!1)return!1;const i=ba(e,n),s=ba(t,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function nx(e){let t,n,i,s;return V(e)?(t=e.top,n=e.right,i=e.bottom,s=e.left):t=n=i=s=e,{top:t,right:n,bottom:i,left:s,disabled:e===!1}}function Wc(e,t){const n=[],i=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)n.push(i[s].index);return n}function ya(e,t,n,i={}){const s=e.keys,o=i.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===n){if(i.all)continue;break}c=e.values[l],ct(c)&&(o||t===0||Ht(t)===Ht(c))&&(t+=c)}return t}}function ix(e,t){const{iScale:n,vScale:i}=t,s=n.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],a[l]={[s]:d,[o]:e[d]};return a}function xa(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function sx(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function ox(e){const{min:t,max:n,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function rx(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function _a(e,t,n,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=e[s.index];if(n&&o>0||!n&&o<0)return s.index}return null}function va(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=i,l=o.axis,c=r.axis,d=sx(o,r,i),h=t.length;let u;for(let f=0;f<h;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=rx(s,d,g),u[a]=m,u._top=_a(u,r,!0,i.type),u._bottom=_a(u,r,!1,i.type);const y=u._visualValues||(u._visualValues={});y[a]=m}}function vs(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function ax(e,t){return ue(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function lx(e,t,n){return ue(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function on(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][n]===void 0)return;delete o[i][n],o[i]._visualValues!==void 0&&o[i]._visualValues[n]!==void 0&&delete o[i]._visualValues[n]}}}const ws=e=>e==="reset"||e==="none",wa=(e,t)=>t?e:Object.assign({},e),cx=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Wc(n,!0),values:null};class Ae{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=xa(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&&on(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(h,u,f,p)=>h==="x"?u:h==="r"?p:f,o=n.xAxisID=I(i.xAxisID,vs(t,"x")),r=n.yAxisID=I(i.yAxisID,vs(t,"y")),a=n.rAxisID=I(i.rAxisID,vs(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,o,r,a),d=n.vAxisID=s(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ia(this._data,this),t._stacked&&on(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(V(n)){const s=this._cachedMeta;this._data=ix(n,s)}else if(i!==n){if(i){ia(i,this);const s=this._cachedMeta;on(s),s._parsed=[]}n&&Object.isExtensible(n)&&Vb(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=xa(n.vScale,n),n.stack!==i.stack&&(s=!0,on(n),n.stack=i.stack),this._resyncElements(t),(s||o!==n._stacked)&&va(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:r}=i,a=o.axis;let l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],d,h,u;if(this._parsing===!1)i._parsed=s,i._sorted=!0,u=s;else{Q(s[t])?u=this.parseArrayData(i,s,t,n):V(s[t])?u=this.parseObjectData(i,s,t,n):u=this.parsePrimitiveData(i,s,t,n);const f=()=>h[a]===null||c&&h[a]<c[a];for(d=0;d<n;++d)i._parsed[d+t]=h=u[d],l&&(f()&&(l=!1),c=h);i._sorted=l}r&&va(this,u)}parsePrimitiveData(t,n,i,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),d=o===r,h=new Array(s);let u,f,p;for(u=0,f=s;u<f;++u)p=u+i,h[u]={[a]:d||o.parse(c[p],p),[l]:r.parse(n[p],p)};return h}parseArrayData(t,n,i,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,d,h;for(l=0,c=s;l<c;++l)d=l+i,h=n[d],a[l]={x:o.parse(h[0],d),y:r.parse(h[1],d)};return a}parseObjectData(t,n,i,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let d,h,u,f;for(d=0,h=s;d<h;++d)u=d+i,f=n[u],c[d]={x:o.parse(De(f,a),u),y:r.parse(De(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const s=this.chart,o=this._cachedMeta,r=n[t.axis],a={keys:Wc(s,!0),values:n._stacks[t.axis]._visualValues};return ya(a,r,o.index,{mode:i})}updateRangeFromParsed(t,n,i,s){const o=i[n.axis];let r=o===null?NaN:o;const a=s&&i._stacks[n.axis];s&&a&&(s.values=a,r=ya(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,r=s.length,a=this._getOtherScale(t),l=cx(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:h}=ox(a);let u,f;function p(){f=s[u];const g=f[a.axis];return!ct(f[t.axis])||d>g||h<g}for(u=0;u<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,o,r;for(s=0,o=n.length;s<o;++s)r=n[s][t.axis],ct(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,s=n.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=nx(I(this.options.clip,ex(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],o=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let d;for(i.dataset&&i.dataset.draw(t,o,a,l),d=a;d<a+l;++d){const h=s[d];h.hidden||(h.active&&c?r.push(h):h.draw(t,o))}for(d=0;d<r.length;++d)r[d].draw(t,o)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=lx(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=ax(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const s=n==="active",o=this._cachedDataOpts,r=t+"-"+n,a=o[r],l=this.enableOptionSharing&&Ln(i);if(a)return wa(a,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),h=s?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),d),f=Object.keys(et.elements[t]),p=()=>this.getContext(i,s,n),g=c.resolveNamedOptions(u,f,p,h);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(wa(g,l))),g}_resolveAnimations(t,n,i){const s=this.chart,o=this._cachedDataOpts,r=`animation-${n}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,n),u=d.getOptionScopes(this.getDataset(),h);l=d.createResolver(u,this.getContext(t,i,n))}const c=new jc(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ws(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,i),{sharedOptions:o,includeOptions:r}}updateElement(t,n,i,s){ws(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!ws(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"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 n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,o=n.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,n,i=!0){const s=this._cachedMeta,o=s.data,r=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),i&&this.updateElements(o,t,n,"reset")}updateElements(t,n,i,s){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,n);i._stacked&&on(i,s)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,s]=t;this[n](i,s)}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,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}T(Ae,"defaults",{}),T(Ae,"datasetElementType",null),T(Ae,"dataElementType",null);function dx(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let s=0,o=n.length;s<o;s++)i=i.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=Tc(i.sort((s,o)=>s-o))}return e._cache.$bar}function hx(e){const t=e.iScale,n=dx(t,e.type);let i=t._length,s,o,r,a;const l=()=>{r===32767||r===-32768||(Ln(a)&&(i=Math.min(i,Math.abs(r-a)||i)),a=r)};for(s=0,o=n.length;s<o;++s)r=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),l();return i}function ux(e,t,n,i){const s=n.barThickness;let o,r;return Y(s)?(o=t.min*n.categoryPercentage,r=n.barPercentage):(o=s*i,r=1),{chunk:o/i,ratio:r,start:t.pixels[e]-o/2}}function fx(e,t,n,i){const s=t.pixels,o=s[e];let r=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=n.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/i,ratio:n.barPercentage,start:c}}function px(e,t,n,i){const s=n.parse(e[0],i),o=n.parse(e[1],i),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function Vc(e,t,n,i){return Q(e)?px(e,t,n,i):t[n.axis]=n.parse(e,i),t}function ka(e,t,n,i){const s=e.iScale,o=e.vScale,r=s.getLabels(),a=s===o,l=[];let c,d,h,u;for(c=n,d=n+i;c<d;++c)u=t[c],h={},h[s.axis]=a||s.parse(r[c],c),l.push(Vc(u,h,o,c));return l}function ks(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function gx(e,t,n){return e!==0?Ht(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function mx(e){let t,n,i,s,o;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(s="end",o="start"):(s="start",o="end"),{start:n,end:i,reverse:t,top:s,bottom:o}}function bx(e,t,n,i){let s=t.borderSkipped;const o={};if(!s){e.borderSkipped=o;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:d}=mx(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?s=c:(n._bottom||0)===i?s=d:(o[Sa(d,r,a,l)]=!0,s=c)),o[Sa(s,r,a,l)]=!0,e.borderSkipped=o}function Sa(e,t,n,i){return i?(e=yx(e,t,n),e=Ca(e,n,t)):e=Ca(e,t,n),e}function yx(e,t,n){return e===t?n:e===n?t:e}function Ca(e,t,n){return e==="start"?t:e==="end"?n:e}function xx(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _i extends Ae{parsePrimitiveData(t,n,i,s){return ka(t,n,i,s)}parseArrayData(t,n,i,s){return ka(t,n,i,s)}parseObjectData(t,n,i,s){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,d=r.axis==="x"?a:l,h=[];let u,f,p,g;for(u=i,f=i+s;u<f;++u)g=n[u],p={},p[o.axis]=o.parse(De(g,c),u),h.push(Vc(De(g,d),p,r,u));return h}updateRangeFromParsed(t,n,i,s){super.updateRangeFromParsed(t,n,i,s);const o=i._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:s}=n,o=this.getParsed(t),r=o._custom,a=ks(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,s){const o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),d=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(n,s);for(let f=n;f<n+i;f++){const p=this.getParsed(f),g=o||Y(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,d),b=(p._stacks||{})[a.axis],y={horizontal:c,base:g.base,enableBorderRadius:!b||ks(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(y.options=h||this.resolveDataElementOptions(f,t[f].active?"active":s));const _=y.options||t[f].options;bx(y,_,b,r),xx(y,_,d.ratio),this.updateElement(t[f],f,y,s)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=i.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),d=c&&c[l.vScale.axis];if(Y(d)||isNaN(d))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const s=this._getStacks(t,i),o=n!==void 0?s.indexOf(n):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,s=[];let o,r;for(o=0,r=n.data.length;o<r;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||hx(n),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:i,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,d=ks(c);let h=l[n.axis],u=0,f=i?this.applyStack(n,l,i):h,p,g;f!==h&&(u=f-h,f=h),d&&(h=c.barStart,f=c.barEnd-c.barStart,h!==0&&Ht(h)!==Ht(c.barEnd)&&(u=0),u+=h);const m=!Y(o)&&!d?o:u;let b=n.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<r){g=gx(g,n,a)*r,h===a&&(b-=g/2);const y=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),w=Math.min(y,_),x=Math.max(y,_);b=Math.max(Math.min(b,x),w),p=b+g,i&&!d&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(p)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const y=Ht(g)*n.getLineWidthForValue(a)/2;b+=y,g-=y}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,n){const i=n.scale,s=this.options,o=s.skipNull,r=I(s.maxBarThickness,1/0);let a,l;if(n.grouped){const c=o?this._getStackCount(t):n.stackCount,d=s.barThickness==="flex"?fx(t,n,s,c):ux(t,n,s,c),h=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=d.start+d.chunk*h+d.chunk/2,l=Math.min(r,d.chunk*d.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(r,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[n.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}T(_i,"id","bar"),T(_i,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),T(_i,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function _x(e,t,n){let i=1,s=1,o=0,r=0;if(t<J){const a=e,l=a+t,c=Math.cos(a),d=Math.sin(a),h=Math.cos(l),u=Math.sin(l),f=(_,w,x)=>zn(_,a,l,!0)?1:Math.max(w,w*n,x,x*n),p=(_,w,x)=>zn(_,a,l,!0)?-1:Math.min(w,w*n,x,x*n),g=f(0,c,h),m=f(ot,d,u),b=p(Z,c,h),y=p(Z+ot,d,u);i=(g-b)/2,s=(m-y)/2,o=-(g+b)/2,r=-(m+y)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:r}}class fn extends Ae{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=l=>+i[l];if(V(i[t])){const{key:l="value"}=this._parsing;o=c=>+De(i[c],l)}let r,a;for(r=t,a=t+n;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return $t(this.options.rotation-90)}_getCircumference(){return $t(this.options.circumference)}_getRotationExtents(){let t=J,n=-J;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),n=Math.max(n,o+r)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-r)/2,0),l=Math.min(Ab(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:h}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=_x(h,d,l),m=(i.width-r)/u,b=(i.height-r)/f,y=Math.max(Math.min(m,b)/2,0),_=kc(this.options.radius,y),w=Math.max(_*l,0),x=(_-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=g*_,s.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/J)}updateElements(t,n,i,s){const o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,d=(a.left+a.right)/2,h=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(n,s);let b=this._getRotation(),y;for(y=0;y<n;++y)b+=this._circumference(y,o);for(y=n;y<n+i;++y){const _=this._circumference(y,o),w=t[y],x={x:d+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+_,circumference:_,outerRadius:p,innerRadius:f};m&&(x.options=g||this.resolveDataElementOptions(y,w.active?"active":s)),b+=_,this.updateElement(w,y,x,s)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,s;for(s=0;s<n.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?J*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=ss(n._parsed[t],i.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const i=this.chart;let s,o,r,a,l;if(!t){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){r=i.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,s=t.length;i<s;++i){const o=this.resolveDataElementOptions(i);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(I(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}T(fn,"id","doughnut"),T(fn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),T(fn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),T(fn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class vi extends Ae{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=Yb(n,s,r);this._drawStart=a,this._drawCount=l,Xb(n)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,i,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,s),u=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Fn(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",y=n+i,_=t.length;let w=n>0&&this.getParsed(n-1);for(let x=0;x<_;++x){const S=t[x],k=b?S:{};if(x<n||x>=y){k.skip=!0;continue}const C=this.getParsed(x),M=Y(C[f]),A=k[u]=r.getPixelForValue(C[u],x),R=k[f]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,C,l):C[f],x);k.skip=isNaN(A)||isNaN(R)||M,k.stop=x>0&&Math.abs(C[u]-w[u])>m,g&&(k.parsed=C,k.raw=c.data[x]),h&&(k.options=d||this.resolveDataElementOptions(x,S.active?"active":s)),b||this.updateElement(S,x,k,s),w=C}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}T(vi,"id","line"),T(vi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),T(vi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Qs extends fn{}T(Qs,"id","pie"),T(Qs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function ye(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uo{constructor(t){T(this,"options");this.options=t||{}}static override(t){Object.assign(Uo.prototype,t)}init(){}formats(){return ye()}parse(){return ye()}format(){return ye()}add(){return ye()}diff(){return ye()}startOf(){return ye()}endOf(){return ye()}}var vx={_date:Uo};function wx(e,t,n,i){const{controller:s,data:o,_sorted:r}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?jb:Se;if(i){if(s._sharedOptions){const c=o[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const h=l(o,t,n-d),u=l(o,t,n+d);return{lo:h.lo,hi:u.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function qn(e,t,n,i,s){const o=e.getSortedVisibleDatasetMetas(),r=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:d}=o[a],{lo:h,hi:u}=wx(o[a],t,r,s);for(let f=h;f<=u;++f){const p=d[f];p.skip||i(p,c,f)}}}function kx(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,r=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ss(e,t,n,i,s){const o=[];return!s&&!e.isPointInArea(t)||qn(e,n,t,function(a,l,c){!s&&!Xt(a,e.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Sx(e,t,n,i){let s=[];function o(r,a,l){const{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],i),{angle:h}=Mc(r,{x:t.x,y:t.y});zn(h,c,d)&&s.push({element:r,datasetIndex:a,index:l})}return qn(e,n,t,o),s}function Cx(e,t,n,i,s,o){let r=[];const a=kx(n);let l=Number.POSITIVE_INFINITY;function c(d,h,u){const f=d.inRange(t.x,t.y,s);if(i&&!f)return;const p=d.getCenterPoint(s);if(!(!!o||e.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:d,datasetIndex:h,index:u}],l=m):m===l&&r.push({element:d,datasetIndex:h,index:u})}return qn(e,n,t,c),r}function Cs(e,t,n,i,s,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!i?Sx(e,t,n,s):Cx(e,t,n,i,s,o)}function Ma(e,t,n,i,s){const o=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return qn(e,n,t,(l,c,d)=>{l[r](t[n],s)&&(o.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:o}var Mx={evaluateInteractionItems:qn,modes:{index(e,t,n,i){const s=ve(t,e),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?Ss(e,s,o,i,r):Cs(e,s,o,!1,i,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=a[0].index,h=c.data[d];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,i){const s=ve(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?Ss(e,s,o,i,r):Cs(e,s,o,!1,i,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(e,t,n,i){const s=ve(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return Ss(e,s,o,i,r)},nearest(e,t,n,i){const s=ve(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return Cs(e,s,o,n.intersect,i,r)},x(e,t,n,i){const s=ve(t,e);return Ma(e,s,"x",n.intersect,i)},y(e,t,n,i){const s=ve(t,e);return Ma(e,s,"y",n.intersect,i)}}};const Uc=["left","top","right","bottom"];function rn(e,t){return e.filter(n=>n.pos===t)}function Pa(e,t){return e.filter(n=>Uc.indexOf(n.pos)===-1&&n.box.axis===t)}function an(e,t){return e.sort((n,i)=>{const s=t?i:n,o=t?n:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Px(e){const t=[];let n,i,s,o,r,a;for(n=0,i=(e||[]).length;n<i;++n)s=e[n],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Tx(e){const t={};for(const n of e){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!Uc.includes(s))continue;const r=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Ox(e,t){const n=Tx(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*i:l&&t.availableWidth,a.height=s):(a.width=i,a.height=d?d*s:l&&t.availableHeight)}return n}function Ax(e){const t=Px(e),n=an(t.filter(c=>c.box.fullSize),!0),i=an(rn(t,"left"),!0),s=an(rn(t,"right")),o=an(rn(t,"top"),!0),r=an(rn(t,"bottom")),a=Pa(t,"x"),l=Pa(t,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:rn(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Ta(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function qc(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Rx(e,t,n,i){const{pos:s,box:o}=n,r=e.maxPadding;if(!V(s)){n.size&&(e[s]-=n.size);const h=i[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[s]+=n.size}o.getPadding&&qc(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ta(r,e,"left","right")),l=Math.max(0,t.outerHeight-Ta(r,e,"top","bottom")),c=a!==e.w,d=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function Ex(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Dx(e,t){const n=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],n[r])}),o}return i(e?["left","right"]:["top","bottom"])}function pn(e,t,n,i){const s=[];let o,r,a,l,c,d;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Dx(a.horizontal,t));const{same:h,other:u}=Rx(t,n,a,i);c|=h&&s.length,d=d||u,l.fullSize||s.push(a)}return c&&pn(s,t,n,i)||d}function ri(e,t,n,i,s){e.top=n,e.left=t,e.right=t+i,e.bottom=n+s,e.width=i,e.height=s}function Oa(e,t,n,i){const s=n.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=i[a.stack]||{count:1,placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){const h=t.w*d,u=c.size||l.height;Ln(c.start)&&(r=c.start),l.fullSize?ri(l,s.left,r,n.outerWidth-s.right-s.left,u):ri(l,t.left+c.placed,r,h,u),c.start=r,c.placed+=h,r=l.bottom}else{const h=t.h*d,u=c.size||l.width;Ln(c.start)&&(o=c.start),l.fullSize?ri(l,o,s.top,u,n.outerHeight-s.bottom-s.top):ri(l,o,t.top+c.placed,u,h),c.start=o,c.placed+=h,o=l.right}}t.x=o,t.y=r}var kt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const s=mt(e.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(n-s.height,0),a=Ax(e.boxes),l=a.vertical,c=a.horizontal;q(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const d=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/d,hBoxMaxHeight:r/2}),u=Object.assign({},s);qc(u,mt(i));const f=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s),p=Ox(l.concat(c),h);pn(a.fullSize,f,h,p),pn(l,f,h,p),pn(c,f,h,p)&&pn(l,f,h,p),Ex(f),Oa(a.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,Oa(a.rightAndBottom,f,h,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},q(a.chartArea,g=>{const m=g.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Yc{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Lx extends Yc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wi="$chartjs",Fx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Aa=e=>e===null||e==="";function zx(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[wi]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Aa(s)){const o=ua(e,"width");o!==void 0&&(e.width=o)}if(Aa(i))if(e.style.height==="")e.height=e.width/(t||2);else{const o=ua(e,"height");o!==void 0&&(e.height=o)}return e}const Xc=Iy?{passive:!0}:!1;function Ix(e,t,n){e&&e.addEventListener(t,n,Xc)}function $x(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Xc)}function Bx(e,t){const n=Fx[e.type]||e.type,{x:i,y:s}=ve(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Bi(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Nx(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Bi(a.addedNodes,i),r=r&&!Bi(a.removedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Hx(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Bi(a.removedNodes,i),r=r&&!Bi(a.addedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const $n=new Map;let Ra=0;function Kc(){const e=window.devicePixelRatio;e!==Ra&&(Ra=e,$n.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function jx(e,t){$n.size||window.addEventListener("resize",Kc),$n.set(e,t)}function Wx(e){$n.delete(e),$n.size||window.removeEventListener("resize",Kc)}function Vx(e,t,n){const i=e.canvas,s=i&&Vo(i);if(!s)return;const o=Ac((a,l)=>{const c=s.clientWidth;n(a,l),c<s.clientWidth&&n()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return r.observe(s),jx(e,o),r}function Ms(e,t,n){n&&n.disconnect(),t==="resize"&&Wx(e)}function Ux(e,t,n){const i=e.canvas,s=Ac(o=>{e.ctx!==null&&n(Bx(o,e))},e);return Ix(i,t,s),s}class qx extends Yc{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(zx(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[wi])return!1;const i=n[wi].initial;["height","width"].forEach(o=>{const r=i[o];Y(r)?n.removeAttribute(o):n.setAttribute(o,r)});const s=i.style||{};return Object.keys(s).forEach(o=>{n.style[o]=s[o]}),n.width=n.width,delete n[wi],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),r={attach:Nx,detach:Hx,resize:Vx}[n]||Ux;s[n]=r(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:Ms,detach:Ms,resize:Ms}[n]||$x)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return zy(t,n,i,s)}isAttached(t){const n=t&&Vo(t);return!!(n&&n.isConnected)}}function Yx(e){return!Wo()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Lx:qx}class Et{constructor(){T(this,"x");T(this,"y");T(this,"active",!1);T(this,"options");T(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Fn(this.x)&&Fn(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}T(Et,"defaults",{}),T(Et,"defaultRoutes");function Xx(e,t){const n=e.options.ticks,i=Kx(e),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?Jx(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Zx(t,c,o,r/s),c;const d=Gx(o,t,s);if(r>0){let h,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(ai(t,c,d,Y(f)?0:a-f,a),h=0,u=r-1;h<u;h++)ai(t,c,d,o[h],o[h+1]);return ai(t,c,d,l,Y(f)?t.length:l+f),c}return ai(t,c,d),c}function Kx(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(i,s))}function Gx(e,t,n){const i=Qx(e),s=t.length/n;if(!i)return Math.max(s,1);const o=$b(i);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function Jx(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Zx(e,t,n,i){let s=0,o=n[0],r;for(i=Math.ceil(i),r=0;r<e.length;r++)r===o&&(t.push(e[r]),s++,o=n[s*i])}function ai(e,t,n,i,s){const o=I(i,0),r=Math.min(I(s,e.length),e.length);let a=0,l,c,d;for(n=Math.ceil(n),s&&(l=s-i,n=l/Math.floor(l/n)),d=o;d<0;)a++,d=Math.round(o+a*n);for(c=Math.max(o,0);c<r;c++)c===d&&(t.push(e[c]),a++,d=Math.round(o+a*n))}function Qx(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const t_=e=>e==="left"?"right":e==="right"?"left":e,Ea=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Da=(e,t)=>Math.min(t||e,e);function La(e,t){const n=[],i=e.length/t,s=e.length;let o=0;for(;o<s;o+=i)n.push(e[Math.floor(o)]);return n}function e_(e,t,n){const i=e.ticks.length,s=Math.min(t,i-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),c;if(!(n&&(i===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function n_(e,t){q(e,n=>{const i=n.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete n.data[i[o]];i.splice(0,s)}})}function ln(e){return e.drawTicks?e.tickLength:0}function Fa(e,t){if(!e.display)return 0;const n=at(e.font,t),i=mt(e.padding);return(Q(e.text)?e.text.length:1)*n.lineHeight+i.height}function i_(e,t){return ue(e,{scale:t,type:"scale"})}function s_(e,t,n){return ue(e,{tick:n,index:t,type:"tick"})}function o_(e,t,n){let i=Fo(e);return(n&&t!=="right"||!n&&t==="right")&&(i=t_(i)),i}function r_(e,t,n,i){const{top:s,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:d}=l;let h=0,u,f,p;const g=r-s,m=a-o;if(e.isHorizontal()){if(f=ut(i,o,a),V(n)){const b=Object.keys(n)[0],y=n[b];p=d[b].getPixelForValue(y)+g-t}else n==="center"?p=(c.bottom+c.top)/2+g-t:p=Ea(e,n,t);u=a-o}else{if(V(n)){const b=Object.keys(n)[0],y=n[b];f=d[b].getPixelForValue(y)-m+t}else n==="center"?f=(c.left+c.right)/2-m+t:f=Ea(e,n,t);p=ut(i,r,s),h=n==="left"?-ot:ot}return{titleX:f,titleY:p,maxWidth:u,rotation:h}}class Be extends Et{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return t=_t(t,Number.POSITIVE_INFINITY),n=_t(n,Number.NEGATIVE_INFINITY),i=_t(i,Number.POSITIVE_INFINITY),s=_t(s,Number.NEGATIVE_INFINITY),{min:_t(t,i),max:_t(n,s),minDefined:ct(t),maxDefined:ct(n)}}getMinMax(t){let{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:n,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,r.min)),o||(i=Math.max(i,r.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:_t(n,_t(i,n)),max:_t(i,_t(n,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(){K(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=py(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?La(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Xx(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){K(this.options.afterUpdate,[this])}beforeSetDimensions(){K(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(){K(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),K(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){K(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=K(n.callback,[o.value,i,t],this)}afterTickToLabelConversion(){K(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){K(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=Da(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,o=n.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!n.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const d=this._getLabelSizes(),h=d.widest.width,u=d.highest.height,f=gt(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),h+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-ln(t.grid)-n.padding-Fa(t.title,this.chart.options.font),c=Math.sqrt(h*h+u*u),r=Do(Math.min(Math.asin(gt((d.highest.height+6)/a,-1,1)),Math.asin(gt(l/c,-1,1))-Math.asin(gt(u/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){K(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){K(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Fa(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=ln(o)+l):(t.height=this.maxHeight,t.width=ln(o)+l),i.display&&this.ticks.length){const{first:c,last:d,widest:h,highest:u}=this._getLabelSizes(),f=i.padding*2,p=$t(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=i.mirror?0:m*h.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=i.mirror?0:g*h.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,d,m,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*t.width,f=i*n.height):(u=i*t.height,f=s*n.width):o==="start"?f=n.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=n.width/2),this.paddingLeft=Math.max((u-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-h+r)*this.width/(this.width-h),0)}else{let d=n.height/2,h=t.height/2;o==="start"?(d=0,h=t.height):o==="end"&&(d=n.height,h=0),this.paddingTop=d+r,this.paddingBottom=h+r}}_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(){K(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)Y(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=La(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(n/Da(n,i));let c=0,d=0,h,u,f,p,g,m,b,y,_,w,x;for(h=0;h<n;h+=l){if(p=t[h].label,g=this._resolveTickFontOptions(h),s.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},y=g.lineHeight,_=w=0,!Y(p)&&!Q(p))_=Ii(s,b.data,b.gc,_,p),w=y;else if(Q(p))for(u=0,f=p.length;u<f;++u)x=p[u],!Y(x)&&!Q(x)&&(_=Ii(s,b.data,b.gc,_,x),w+=y);r.push(_),a.push(w),c=Math.max(_,c),d=Math.max(w,d)}n_(o,n);const S=r.indexOf(c),k=a.indexOf(d),C=M=>({width:r[M]||0,height:a[M]||0});return{first:C(0),last:C(n-1),widest:C(S),highest:C(k),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Hb(this._alignToPixels?be(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=s_(this.getContext(),t,i))}return this.$context||(this.$context=i_(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=$t(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),u=ln(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(F){return be(i,F,g)};let y,_,w,x,S,k,C,M,A,R,P,X;if(r==="top")y=b(this.bottom),k=this.bottom-u,M=y-m,R=b(t.top)+m,X=t.bottom;else if(r==="bottom")y=b(this.top),R=t.top,X=b(t.bottom)-m,k=y+m,M=this.top+u;else if(r==="left")y=b(this.right),S=this.right-u,C=y-m,A=b(t.left)+m,P=t.right;else if(r==="right")y=b(this.left),A=t.left,P=b(t.right)-m,S=y+m,C=this.left+u;else if(n==="x"){if(r==="center")y=b((t.top+t.bottom)/2+.5);else if(V(r)){const F=Object.keys(r)[0],H=r[F];y=b(this.chart.scales[F].getPixelForValue(H))}R=t.top,X=t.bottom,k=y+m,M=k+u}else if(n==="y"){if(r==="center")y=b((t.left+t.right)/2);else if(V(r)){const F=Object.keys(r)[0],H=r[F];y=b(this.chart.scales[F].getPixelForValue(H))}S=y-m,C=S-u,A=t.left,P=t.right}const U=I(s.ticks.maxTicksLimit,h),D=Math.max(1,Math.ceil(h/U));for(_=0;_<h;_+=D){const F=this.getContext(_),H=o.setContext(F),dt=a.setContext(F),tt=H.lineWidth,Wt=H.color,Lt=dt.dash||[],Ct=dt.dashOffset,Ze=H.tickWidth,fe=H.tickColor,Qe=H.tickBorderDash||[],pe=H.tickBorderDashOffset;w=e_(this,_,l),w!==void 0&&(x=be(i,w,tt),c?S=C=A=P=x:k=M=R=X=x,f.push({tx1:S,ty1:k,tx2:C,ty2:M,x1:A,y1:R,x2:P,y2:X,width:tt,color:Wt,borderDash:Lt,borderDashOffset:Ct,tickWidth:Ze,tickColor:fe,tickBorderDash:Qe,tickBorderDashOffset:pe}))}return this._ticksLength=h,this._borderValue=y,f}_computeLabelItems(t){const n=this.axis,i=this.options,{position:s,ticks:o}=i,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:h}=o,u=ln(i.grid),f=u+d,p=h?-d:f,g=-$t(this.labelRotation),m=[];let b,y,_,w,x,S,k,C,M,A,R,P,X="middle";if(s==="top")S=this.bottom-p,k=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+p,k=this._getXAxisLabelAlignment();else if(s==="left"){const D=this._getYAxisLabelAlignment(u);k=D.textAlign,x=D.x}else if(s==="right"){const D=this._getYAxisLabelAlignment(u);k=D.textAlign,x=D.x}else if(n==="x"){if(s==="center")S=(t.top+t.bottom)/2+f;else if(V(s)){const D=Object.keys(s)[0],F=s[D];S=this.chart.scales[D].getPixelForValue(F)+f}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")x=(t.left+t.right)/2-f;else if(V(s)){const D=Object.keys(s)[0],F=s[D];x=this.chart.scales[D].getPixelForValue(F)}k=this._getYAxisLabelAlignment(u).textAlign}n==="y"&&(l==="start"?X="top":l==="end"&&(X="bottom"));const U=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){_=a[b],w=_.label;const D=o.setContext(this.getContext(b));C=this.getPixelForTick(b)+o.labelOffset,M=this._resolveTickFontOptions(b),A=M.lineHeight,R=Q(w)?w.length:1;const F=R/2,H=D.color,dt=D.textStrokeColor,tt=D.textStrokeWidth;let Wt=k;r?(x=C,k==="inner"&&(b===y-1?Wt=this.options.reverse?"left":"right":b===0?Wt=this.options.reverse?"right":"left":Wt="center"),s==="top"?c==="near"||g!==0?P=-R*A+A/2:c==="center"?P=-U.highest.height/2-F*A+A:P=-U.highest.height+A/2:c==="near"||g!==0?P=A/2:c==="center"?P=U.highest.height/2-F*A:P=U.highest.height-R*A,h&&(P*=-1),g!==0&&!D.showLabelBackdrop&&(x+=A/2*Math.sin(g))):(S=C,P=(1-R)*A/2);let Lt;if(D.showLabelBackdrop){const Ct=mt(D.backdropPadding),Ze=U.heights[b],fe=U.widths[b];let Qe=P-Ct.top,pe=0-Ct.left;switch(X){case"middle":Qe-=Ze/2;break;case"bottom":Qe-=Ze;break}switch(k){case"center":pe-=fe/2;break;case"right":pe-=fe;break;case"inner":b===y-1?pe-=fe:b>0&&(pe-=fe/2);break}Lt={left:pe,top:Qe,width:fe+Ct.width,height:Ze+Ct.height,color:D.backdropColor}}m.push({label:w,font:M,textOffset:P,options:{rotation:g,color:H,strokeColor:dt,strokeWidth:tt,textAlign:Wt,textBaseline:X,translation:[x,S],backdrop:Lt}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-$t(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,d;return n==="left"?s?(d=this.right+o,i==="near"?c="left":i==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,i==="near"?c="right":i==="center"?(c="center",d-=l/2):(c="left",d=this.left)):n==="right"?s?(d=this.left+o,i==="near"?c="right":i==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,i==="near"?c="left":i==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:o,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,o,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(o=0,r=s.length;o<r;++o){const l=s[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),r=i.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,h,u;this.isHorizontal()?(c=be(t,this.left,r)-r/2,d=be(t,this.right,a)+a/2,h=u=l):(h=be(t,this.top,r)-r/2,u=be(t,this.bottom,a)+a/2,c=d=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,h),n.lineTo(d,u),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Io(i,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,d=r.textOffset;Fe(i,c,0,d,l,a)}s&&$o(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const o=at(i.font),r=mt(i.padding),a=i.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||V(n)?(l+=r.bottom,Q(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=r.top;const{titleX:c,titleY:d,maxWidth:h,rotation:u}=r_(this,l,n,a);Fe(t,i.text,0,0,o,{color:i.color,maxWidth:h,rotation:u,textAlign:o_(a,n,s),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=I(t.grid&&t.grid.z,-1),s=I(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Be.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,r;for(o=0,r=n.length;o<r;++o){const a=n[o];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return at(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class li{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;c_(n)&&(i=this.register(n));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,a_(t,r,i),this.override&&et.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,s=this.scope;i in n&&delete n[i],s&&i in et[s]&&(delete et[s][i],this.override&&delete Le[i])}}function a_(e,t,n){const i=Dn(Object.create(null),[n?et.get(n):{},et.get(t),e.defaults]);et.set(t,i),e.defaultRoutes&&l_(t,e.defaultRoutes),e.descriptors&&et.describe(t,e.descriptors)}function l_(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),s=i.pop(),o=[e].concat(i).join("."),r=t[n].split("."),a=r.pop(),l=r.join(".");et.route(o,s,l,a)})}function c_(e){return"id"in e&&"defaults"in e}class d_{constructor(){this.controllers=new li(Ae,"datasets",!0),this.elements=new li(Et,"elements"),this.plugins=new li(Object,"plugins"),this.scales=new li(Be,"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,n,i){[...n].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):q(s,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,n,i){const s=Eo(t);K(i["before"+s],[],i),n[t](i),K(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var zt=new d_;class h_{constructor(){this._init=[]}notify(t,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,n,i);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,n,i,s){s=s||{};for(const o of t){const r=o.plugin,a=r[i],l=[n,s,o.options];if(K(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){Y(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,s=I(i.options&&i.options.plugins,{}),o=u_(i);return s===!1&&!n?[]:p_(t,o,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}}function u_(e){const t={},n=[],i=Object.keys(zt.plugins.items);for(let o=0;o<i.length;o++)n.push(zt.getPlugin(i[o]));const s=e.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function f_(e,t){return!t&&e===!1?null:e===!0?{}:e}function p_(e,{plugins:t,localIds:n},i,s){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=f_(i[l],s);c!==null&&o.push({plugin:a,options:g_(e.config,{plugin:a,local:n[l]},c,r)})}return o}function g_(e,{plugin:t,local:n},i,s){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(i,o);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function to(e,t){const n=et.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function m_(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function b_(e,t){return e===t?"_index_":"_value_"}function za(e){if(e==="x"||e==="y"||e==="r")return e}function y_(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function eo(e,...t){if(za(e))return e;for(const n of t){const i=n.axis||y_(n.position)||e.length>1&&za(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ia(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function x_(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Ia(e,"x",n[0])||Ia(e,"y",n[0])}return{}}function __(e,t){const n=Le[e.type]||{scales:{}},i=t.scales||{},s=to(e.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!V(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=eo(r,a,x_(r,e),et.scales[a.type]),c=b_(l,s),d=n.scales||{};o[r]=vn(Object.create(null),[{axis:l},a,d[l],d[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||to(a,t),d=(Le[a]||{}).scales||{};Object.keys(d).forEach(h=>{const u=m_(h,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),vn(o[f],[{axis:u},i[f],d[h]])})}),Object.keys(o).forEach(r=>{const a=o[r];vn(a,[et.scales[a.type],et.scale])}),o}function Gc(e){const t=e.options||(e.options={});t.plugins=I(t.plugins,{}),t.scales=__(e,t)}function Jc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function v_(e){return e=e||{},e.data=Jc(e.data),Gc(e),e}const $a=new Map,Zc=new Set;function ci(e,t){let n=$a.get(e);return n||(n=t(),$a.set(e,n),Zc.add(n)),n}const cn=(e,t,n)=>{const i=De(t,n);i!==void 0&&e.add(i)};class w_{constructor(t){this._config=v_(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=Jc(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(),Gc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ci(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return ci(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return ci(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ci(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:o}=this,r=this._cachedScopes(t,i),a=r.get(n);if(a)return a;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(h=>cn(l,t,h))),d.forEach(h=>cn(l,s,h)),d.forEach(h=>cn(l,Le[o]||{},h)),d.forEach(h=>cn(l,et,h)),d.forEach(h=>cn(l,Js,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Zc.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Le[n]||{},et.datasets[n]||{},{type:n},et,Js]}resolveNamedOptions(t,n,i,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Ba(this._resolverCache,t,s);let l=r;if(S_(r,n)){o.$shared=!1,i=he(i)?i():i;const c=this.createResolver(t,i,a);l=Ye(r,i,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,i=[""],s){const{resolver:o}=Ba(this._resolverCache,t,i);return V(n)?Ye(o,n,void 0,s):o}}function Ba(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let o=i.get(s);return o||(o={resolver:No(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,o)),o}const k_=e=>V(e)&&Object.getOwnPropertyNames(e).some(t=>he(e[t]));function S_(e,t){const{isScriptable:n,isIndexable:i}=Lc(e);for(const s of t){const o=n(s),r=i(s),a=(r||o)&&e[s];if(o&&(he(a)||k_(a))||r&&Q(a))return!0}return!1}var C_="4.4.3";const M_=["top","bottom","left","right","chartArea"];function Na(e,t){return e==="top"||e==="bottom"||M_.indexOf(e)===-1&&t==="x"}function Ha(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function ja(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),K(n&&n.onComplete,[e],t)}function P_(e){const t=e.chart,n=t.options.animation;K(n&&n.onProgress,[e],t)}function Qc(e){return Wo()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const ki={},Wa=e=>{const t=Qc(e);return Object.values(ki).filter(n=>n.canvas===t).pop()};function T_(e,t,n){const i=Object.keys(e);for(const s of i){const o=+s;if(o>=t){const r=e[s];delete e[s],(n>0||o>t)&&(e[o+n]=r)}}}function O_(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function di(e,t,n){return e.options.clip?e[n]:t[n]}function A_(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:di(n,t,"left"),right:di(n,t,"right"),top:di(i,t,"top"),bottom:di(i,t,"bottom")}:t}var Jt;let qo=(Jt=class{static register(...t){zt.add(...t),Va()}static unregister(...t){zt.remove(...t),Va()}constructor(t,n){const i=this.config=new w_(n),s=Qc(t),o=Wa(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Yx(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=Ob(),this.ctx=a,this.canvas=l,this.width=d,this.height=c,this._options=r,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 h_,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ub(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],ki[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ut.listen(this,"complete",ja),Ut.listen(this,"progress",P_),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:o}=this;return Y(t)?n&&o?o:s?i/s: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 zt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ha(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return la(this.canvas,this.ctx),this}stop(){return Ut.stop(this),this}resize(t,n){Ut.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,n,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ha(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),K(i.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};q(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=eo(r,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),q(o,r=>{const a=r.options,l=a.id,c=eo(l,a),d=I(a.type,r.dtype);(a.position===void 0||Na(a.position,c)!==Na(r.dposition))&&(a.position=r.dposition),s[l]=!0;let h=null;if(l in i&&i[l].type===d)h=i[l];else{const u=zt.getScale(d);h=new u({id:l,type:d,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(a,t)}),q(s,(r,a)=>{r||delete i[a]}),q(i,r=>{kt.configure(this,r,r.options),kt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Ha("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const o=n[i];let r=this.getDatasetMeta(i);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=o.indexAxis||to(a,this.options),r.order=o.order||0,r.index=i,r.label=""+o.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const l=zt.getController(a),{datasetElementType:c,dataElementType:d}=et.datasets[a];Object.assign(l,{dataElementType:zt.getElement(d),datasetElementType:c&&zt.getElement(c)}),r.controller=new l(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){q(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:h}=this.getDatasetMeta(c),u=!s&&o.indexOf(h)===-1;h.buildOrUpdateElements(u),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||q(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ha("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){q(this.scales,t=>{kt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Qr(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of n){const r=i==="_removeElements"?-o:o;T_(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=i(0);for(let o=1;o<n;o++)if(!Qr(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;kt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],q(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,he(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ut.has(this)?this.attached&&!Ut.running(this)&&Ut.start(this):(this.draw(),ja({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let s,o;for(s=0,o=n.length;s<o;++s){const r=n[s];(!t||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,s=!i.disabled,o=A_(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Io(n,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),s&&$o(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Xt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const o=Mx.modes[n];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ue(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Ln(n)?(o.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ut.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),la(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ki[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,n=this.platform,i=(o,r)=>{n.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};q(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){q(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},q(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Li(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,o=(l,c)=>l.filter(d=>!c.some(h=>d.datasetIndex===h.datasetIndex&&d.index===h.index)),r=o(n,t),a=i?t:o(t,n);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:o}=this,r=n,a=this._getActiveElements(t,s,i,r),l=Fb(t),c=O_(t,this._lastEvent,i,l);i&&(this._lastEvent=null,K(o.onHover,[t,a,this],this),l&&K(o.onClick,[t,a,this],this));const d=!Li(a,s);return(d||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,d}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}},T(Jt,"defaults",et),T(Jt,"instances",ki),T(Jt,"overrides",Le),T(Jt,"registry",zt),T(Jt,"version",C_),T(Jt,"getChart",Wa),Jt);function Va(){return q(qo.instances,e=>e._plugins.invalidate())}function R_(e,t,n){const{startAngle:i,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;e.beginPath(),e.arc(o,r,a,i-c,n+c),l>s?(c=s/l,e.arc(o,r,l,n+c,i-c,!0)):e.arc(o,r,s,n+ot,i-ot),e.closePath(),e.clip()}function E_(e){return Bo(e,["outerStart","outerEnd","innerStart","innerEnd"])}function D_(e,t,n,i){const s=E_(e.options.borderRadius),o=(n-t)/2,r=Math.min(o,i*t/2),a=l=>{const c=(n-Math.min(o,l))*i/2;return gt(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:gt(s.innerStart,0,r),innerEnd:gt(s.innerEnd,0,r)}}function je(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Ni(e,t,n,i,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=t,h=Math.max(t.outerRadius+i+n-c,0),u=d>0?d+i+n+c:0;let f=0;const p=s-l;if(i){const D=d>0?d-i:0,F=h>0?h-i:0,H=(D+F)/2,dt=H!==0?p*H/(H+i):p;f=(p-dt)/2}const g=Math.max(.001,p*h-n/Z)/h,m=(p-g)/2,b=l+m+f,y=s-m-f,{outerStart:_,outerEnd:w,innerStart:x,innerEnd:S}=D_(t,u,h,y-b),k=h-_,C=h-w,M=b+_/k,A=y-w/C,R=u+x,P=u+S,X=b+x/R,U=y-S/P;if(e.beginPath(),o){const D=(M+A)/2;if(e.arc(r,a,h,M,D),e.arc(r,a,h,D,A),w>0){const tt=je(C,A,r,a);e.arc(tt.x,tt.y,w,A,y+ot)}const F=je(P,y,r,a);if(e.lineTo(F.x,F.y),S>0){const tt=je(P,U,r,a);e.arc(tt.x,tt.y,S,y+ot,U+Math.PI)}const H=(y-S/u+(b+x/u))/2;if(e.arc(r,a,u,y-S/u,H,!0),e.arc(r,a,u,H,b+x/u,!0),x>0){const tt=je(R,X,r,a);e.arc(tt.x,tt.y,x,X+Math.PI,b-ot)}const dt=je(k,b,r,a);if(e.lineTo(dt.x,dt.y),_>0){const tt=je(k,M,r,a);e.arc(tt.x,tt.y,_,b-ot,M)}}else{e.moveTo(r,a);const D=Math.cos(M)*h+r,F=Math.sin(M)*h+a;e.lineTo(D,F);const H=Math.cos(A)*h+r,dt=Math.sin(A)*h+a;e.lineTo(H,dt)}e.closePath()}function L_(e,t,n,i,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){Ni(e,t,n,i,l,s);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=r+(a%J||J))}return Ni(e,t,n,i,l,s),e.fill(),l}function F_(e,t,n,i,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(h||[]),e.lineDashOffset=u,f?(e.lineWidth=c*2,e.lineJoin=d||"round"):(e.lineWidth=c,e.lineJoin=d||"bevel");let p=t.endAngle;if(o){Ni(e,t,n,i,p,s);for(let g=0;g<o;++g)e.stroke();isNaN(a)||(p=r+(a%J||J))}f&&R_(e,t,p),o||(Ni(e,t,n,i,p,s),e.stroke())}class hi extends Et{constructor(n){super();T(this,"circumference");T(this,"endAngle");T(this,"fullCircles");T(this,"innerRadius");T(this,"outerRadius");T(this,"pixelMargin");T(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,s){const o=this.getProps(["x","y"],s),{angle:r,distance:a}=Mc(o,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=I(u,c-l)>=J||zn(r,l,c),m=ne(a,d+f,h+f);return g&&m}getCenterPoint(n){const{x:i,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:d}=this.options,h=(o+r)/2,u=(a+l+d+c)/2;return{x:i+Math.cos(h)*u,y:s+Math.sin(h)*u}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,o=(i.offset||0)/4,r=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>J?Math.floor(s/J):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(Z,s||0)),d=o*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,L_(n,this,d,r,a),F_(n,this,d,r,a),n.restore()}}T(hi,"id","arc"),T(hi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),T(hi,"defaultRoutes",{backgroundColor:"backgroundColor"}),T(hi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function td(e,t,n=t){e.lineCap=I(n.borderCapStyle,t.borderCapStyle),e.setLineDash(I(n.borderDash,t.borderDash)),e.lineDashOffset=I(n.borderDashOffset,t.borderDashOffset),e.lineJoin=I(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=I(n.borderWidth,t.borderWidth),e.strokeStyle=I(n.borderColor,t.borderColor)}function z_(e,t,n){e.lineTo(n.x,n.y)}function I_(e){return e.stepped?oy:e.tension||e.cubicInterpolationMode==="monotone"?ry:z_}function ed(e,t,n={}){const i=e.length,{start:s=0,end:o=i-1}=n,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),d=s<r&&o<r||s>a&&o>a;return{count:i,start:l,loop:t.loop,ilen:c<l&&!d?i+c-l:c-l}}function $_(e,t,n,i){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=ed(s,n,i),d=I_(o);let{move:h=!0,reverse:u}=i||{},f,p,g;for(f=0;f<=c;++f)p=s[(a+(u?c-f:f))%r],!p.skip&&(h?(e.moveTo(p.x,p.y),h=!1):d(e,g,p,u,o.stepped),g=p);return l&&(p=s[(a+(u?c:0))%r],d(e,g,p,u,o.stepped)),!!l}function B_(e,t,n,i){const s=t.points,{count:o,start:r,ilen:a}=ed(s,n,i),{move:l=!0,reverse:c}=i||{};let d=0,h=0,u,f,p,g,m,b;const y=w=>(r+(c?a-w:w))%o,_=()=>{g!==m&&(e.lineTo(d,m),e.lineTo(d,g),e.lineTo(d,b))};for(l&&(f=s[y(0)],e.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=s[y(u)],f.skip)continue;const w=f.x,x=f.y,S=w|0;S===p?(x<g?g=x:x>m&&(m=x),d=(h*d+w)/++h):(_(),e.lineTo(w,x),p=S,h=0,g=m=x),b=x}_()}function no(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?B_:$_}function N_(e){return e.stepped?$y:e.tension||e.cubicInterpolationMode==="monotone"?By:we}function H_(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),td(e,t.options),e.stroke(s)}function j_(e,t,n,i){const{segments:s,options:o}=t,r=no(t);for(const a of s)td(e,o,a.style),e.beginPath(),r(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const W_=typeof Path2D=="function";function V_(e,t,n,i){W_&&!t.options.segment?H_(e,t,n,i):j_(e,t,n,i)}class ui extends Et{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,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ay(this._points,i,t,s,n),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=Yy(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],o=this.points,r=Vy(this,{property:n,start:s,end:s});if(!r.length)return;const a=[],l=N_(i);let c,d;for(c=0,d=r.length;c<d;++c){const{start:h,end:u}=r[c],f=o[h],p=o[u];if(f===p){a.push(f);continue}const g=Math.abs((s-f[n])/(p[n]-f[n])),m=l(f,p,g,i.stepped);m[n]=t[n],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,n,i){return no(this)(t,this,n,i)}path(t,n,i){const s=this.segments,o=no(this);let r=this._loop;n=n||0,i=i||this.points.length-n;for(const a of s)r&=o(t,this,a,{start:n,end:n+i-1});return!!r}draw(t,n,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),V_(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}T(ui,"id","line"),T(ui,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),T(ui,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),T(ui,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ua(e,t,n,i){const s=e.options,{[n]:o}=e.getProps([n],i);return Math.abs(t-o)<s.radius+s.hitRadius}class Ps extends Et{constructor(n){super();T(this,"parsed");T(this,"skip");T(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(n-r,2)+Math.pow(i-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,i){return Ua(this,n,"x",i)}inYRange(n,i){return Ua(this,n,"y",i)}getCenterPoint(n){const{x:i,y:s}=this.getProps(["x","y"],n);return{x:i,y:s}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const s=i&&n.borderWidth||0;return(i+s)*2}draw(n,i){const s=this.options;this.skip||s.radius<.1||!Xt(this,i,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,Zs(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}T(Ps,"id","point"),T(Ps,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),T(Ps,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function nd(e,t){const{x:n,y:i,base:s,width:o,height:r}=e.getProps(["x","y","base","width","height"],t);let a,l,c,d,h;return e.horizontal?(h=r/2,a=Math.min(n,s),l=Math.max(n,s),c=i-h,d=i+h):(h=o/2,a=n-h,l=n+h,c=Math.min(i,s),d=Math.max(i,s)),{left:a,top:c,right:l,bottom:d}}function ie(e,t,n,i){return e?0:gt(t,n,i)}function U_(e,t,n){const i=e.options.borderWidth,s=e.borderSkipped,o=Dc(i);return{t:ie(s.top,o.top,0,n),r:ie(s.right,o.right,0,t),b:ie(s.bottom,o.bottom,0,n),l:ie(s.left,o.left,0,t)}}function q_(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,o=Te(s),r=Math.min(t,n),a=e.borderSkipped,l=i||V(s);return{topLeft:ie(!l||a.top||a.left,o.topLeft,0,r),topRight:ie(!l||a.top||a.right,o.topRight,0,r),bottomLeft:ie(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:ie(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Y_(e){const t=nd(e),n=t.right-t.left,i=t.bottom-t.top,s=U_(e,n/2,i/2),o=q_(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Ts(e,t,n,i){const s=t===null,o=n===null,a=e&&!(s&&o)&&nd(e,i);return a&&(s||ne(t,a.left,a.right))&&(o||ne(n,a.top,a.bottom))}function X_(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function K_(e,t){e.rect(t.x,t.y,t.w,t.h)}function Os(e,t,n={}){const i=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-i,r=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+i,y:e.y+s,w:e.w+o,h:e.h+r,radius:e.radius}}class As extends Et{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:r}=Y_(this),a=X_(r.radius)?In:K_;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Os(r,n,o)),t.clip(),a(t,Os(o,-n,r)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Os(o,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,i){return Ts(this,t,n,i)}inXRange(t,n){return Ts(this,t,null,n)}inYRange(t,n){return Ts(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+s)/2:n,y:o?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}T(As,"id","bar"),T(As,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),T(As,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const qa=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},G_=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Ya extends Et{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=K(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=at(i.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=qa(i,o);let c,d;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(r,o,a,l)+10):(d=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=s+a;let h=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-d;return this.legendItems.forEach((p,g)=>{const m=i+n/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(h+=d,c[c.length-(g>0?0:1)]=0,f+=d,u++),l[g]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+a}),h}_fitCols(t,n,i,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=r-t;let h=a,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:y,itemHeight:_}=J_(i,n,o,m,s);b>0&&f+_+2*a>d&&(h+=u+a,c.push({width:u,height:f}),p+=u+a,g++,u=f=0),l[b]={left:p,top:f,col:g,width:y,height:_},u=Math.max(u,y),f+=_+a}),h+=u,c.push({width:u,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:o}}=this,r=Ue(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ut(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ut(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=ut(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ut(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Io(t,this),this._draw(),$o(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:o,labels:r}=t,a=et.color,l=Ue(t.rtl,this.left,this.width),c=at(r.font),{padding:d}=r,h=c.size,u=h/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=qa(r,h),b=function(S,k,C){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const M=I(C.lineWidth,1);if(s.fillStyle=I(C.fillStyle,a),s.lineCap=I(C.lineCap,"butt"),s.lineDashOffset=I(C.lineDashOffset,0),s.lineJoin=I(C.lineJoin,"miter"),s.lineWidth=M,s.strokeStyle=I(C.strokeStyle,a),s.setLineDash(I(C.lineDash,[])),r.usePointStyle){const A={radius:g*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:M},R=l.xPlus(S,p/2),P=k+u;Ec(s,A,R,P,r.pointStyleWidth&&p)}else{const A=k+Math.max((h-g)/2,0),R=l.leftForLtr(S,p),P=Te(C.borderRadius);s.beginPath(),Object.values(P).some(X=>X!==0)?In(s,{x:R,y:A,w:p,h:g,radius:P}):s.rect(R,A,p,g),s.fill(),M!==0&&s.stroke()}s.restore()},y=function(S,k,C){Fe(s,C.text,S,k+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},_=this.isHorizontal(),w=this._computeTitleHeight();_?f={x:ut(o,this.left+d,this.right-i[0]),y:this.top+d+w,line:0}:f={x:this.left+d,y:ut(o,this.top+w+d,this.bottom-n[0].height),line:0},Bc(this.ctx,t.textDirection);const x=m+d;this.legendItems.forEach((S,k)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const C=s.measureText(S.text).width,M=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),A=p+u+C;let R=f.x,P=f.y;l.setWidth(this.width),_?k>0&&R+A+d>this.right&&(P=f.y+=x,f.line++,R=f.x=ut(o,this.left+d,this.right-i[f.line])):k>0&&P+x>this.bottom&&(R=f.x=R+n[f.line].width+d,f.line++,P=f.y=ut(o,this.top+w+d,this.bottom-n[f.line].height));const X=l.x(R);if(b(X,P,S),R=qb(M,R+p+u,_?R+A:this.right,t.rtl),y(l.x(R),P,S),_)f.x+=A+d;else if(typeof S.text!="string"){const U=c.lineHeight;f.y+=id(S,U)+d}else f.y+=x}),Nc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=at(n.font),s=mt(n.padding);if(!n.display)return;const o=Ue(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let d,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),d=this.top+c,h=ut(t.align,h,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);d=c+ut(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=ut(a,h,h+u);r.textAlign=o.textAlign(Fo(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=i.string,Fe(r,n.text,f,d,i)}_computeTitleHeight(){const t=this.options.title,n=at(t.font),i=mt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,o;if(ne(t,this.left,this.right)&&ne(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],ne(t,s.left,s.left+s.width)&&ne(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!tv(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=G_(s,i);s&&!o&&K(n.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&K(n.onHover,[t,i,this],this)}else i&&K(n.onClick,[t,i,this],this)}}function J_(e,t,n,i,s){const o=Z_(i,e,t,n),r=Q_(s,i,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Z_(e,t,n,i){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+n.size/2+i.measureText(s).width}function Q_(e,t,n){let i=e;return typeof t.text!="string"&&(i=id(t,n)),i}function id(e,t){const n=e.text?e.text.length:0;return t*n}function tv(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jv={id:"legend",_element:Ya,start(e,t,n){const i=e.legend=new Ya({ctx:e.ctx,options:n,chart:e});kt.configure(e,i,n),kt.addBox(e,i)},stop(e){kt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;kt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),d=mt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class sd extends Et{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Q(i.text)?i.text.length:1;this._padding=mt(i.padding);const o=s*at(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,d,h;return this.isHorizontal()?(d=ut(a,i,o),h=n+t,c=o-i):(r.position==="left"?(d=i+t,h=ut(a,s,n),l=Z*-.5):(d=o-t,h=ut(a,n,s),l=Z*.5),c=s-n),{titleX:d,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=at(n.font),o=i.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Fe(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:Fo(n.align),textBaseline:"middle",translation:[r,a]})}}function ev(e,t){const n=new sd({ctx:e.ctx,options:t,chart:e});kt.configure(e,n,t),kt.addBox(e,n),e.titleBlock=n}var Zv={id:"title",_element:sd,start(e,t,n){ev(e,n)},stop(e){const t=e.titleBlock;kt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;kt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gn={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,o=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),s+=l.y,++o}}return{x:[...i].reduce((a,l)=>a+l)/i.size,y:s/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=Gs(t,c);d<s&&(s=d,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function Ft(e,t){return t&&(Q(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function qt(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function nv(e,t){const{element:n,datasetIndex:i,index:s}=t,o=e.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:e,label:r,parsed:o.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Xa(e,t){const n=e.chart.ctx,{body:i,footer:s,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=at(t.bodyFont),c=at(t.titleFont),d=at(t.footerFont),h=o.length,u=s.length,f=i.length,p=mt(t.padding);let g=p.height,m=0,b=i.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),b){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*d.lineHeight+(u-1)*t.footerSpacing);let y=0;const _=function(w){m=Math.max(m,n.measureText(w).width+y)};return n.save(),n.font=c.string,q(e.title,_),n.font=l.string,q(e.beforeBody.concat(e.afterBody),_),y=t.displayColors?r+2+t.boxPadding:0,q(i,w=>{q(w.before,_),q(w.lines,_),q(w.after,_)}),y=0,n.font=d.string,q(e.footer,_),n.restore(),m+=p.width,{width:m,height:g}}function iv(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function sv(e,t,n,i){const{x:s,width:o}=i,r=n.caretSize+n.caretPadding;if(e==="left"&&s+o+r>t.width||e==="right"&&s-o-r<0)return!0}function ov(e,t,n,i){const{x:s,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),sv(c,e,t,n)&&(c="center"),c}function Ka(e,t,n){const i=n.yAlign||t.yAlign||iv(e,n);return{xAlign:n.xAlign||t.xAlign||ov(e,t,n,i),yAlign:i}}function rv(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function av(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function Ga(e,t,n,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:f}=Te(r);let p=rv(t,a);const g=av(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(d,u)+s:a==="right"&&(p+=Math.max(h,f)+s),{x:gt(p,0,i.width-t.width),y:gt(g,0,i.height-t.height)}}function fi(e,t,n){const i=mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Ja(e){return Ft([],qt(e))}function lv(e,t,n){return ue(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Za(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const od={beforeTitle:Vt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Vt,beforeBody:Vt,beforeLabel:Vt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Y(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Vt,afterBody:Vt,beforeFooter:Vt,footer:Vt,afterFooter:Vt};function bt(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?od[t].call(n,i):s}class io extends Et{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,o=new jc(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=lv(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=bt(i,"beforeTitle",this,t),o=bt(i,"title",this,t),r=bt(i,"afterTitle",this,t);let a=[];return a=Ft(a,qt(s)),a=Ft(a,qt(o)),a=Ft(a,qt(r)),a}getBeforeBody(t,n){return Ja(bt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return q(t,o=>{const r={before:[],lines:[],after:[]},a=Za(i,o);Ft(r.before,qt(bt(a,"beforeLabel",this,o))),Ft(r.lines,bt(a,"label",this,o)),Ft(r.after,qt(bt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,n){return Ja(bt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=bt(i,"beforeFooter",this,t),o=bt(i,"footer",this,t),r=bt(i,"afterFooter",this,t);let a=[];return a=Ft(a,qt(s)),a=Ft(a,qt(o)),a=Ft(a,qt(r)),a}_createItems(t){const n=this._active,i=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(nv(this.chart,n[l]));return t.filter&&(a=a.filter((d,h,u)=>t.filter(d,h,u,i))),t.itemSort&&(a=a.sort((d,h)=>t.itemSort(d,h,i))),q(a,d=>{const h=Za(t.callbacks,d);s.push(bt(h,"labelColor",this,d)),o.push(bt(h,"labelPointStyle",this,d)),r.push(bt(h,"labelTextColor",this,d))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=gn[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const l=this._size=Xa(this,i),c=Object.assign({},a,l),d=Ka(this.chart,i,c),h=Ga(i,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const o=this.getCaretPosition(t,i,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:h}=Te(a),{x:u,y:f}=t,{width:p,height:g}=n;let m,b,y,_,w,x;return o==="center"?(w=f+g/2,s==="left"?(m=u,b=m-r,_=w+r,x=w-r):(m=u+p,b=m+r,_=w-r,x=w+r),y=m):(s==="left"?b=u+Math.max(l,d)+r:s==="right"?b=u+p-Math.max(c,h)-r:b=this.caretX,o==="top"?(_=f,w=_-r,m=b-r,y=b+r):(_=f+g,w=_+r,m=b+r,y=b-r),x=_),{x1:m,x2:b,x3:y,y1:_,y2:w,y3:x}}drawTitle(t,n,i){const s=this.title,o=s.length;let r,a,l;if(o){const c=Ue(i.rtl,this.x,this.width);for(t.x=fi(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",r=at(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=r.string,l=0;l<o;++l)n.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,n,i,s,o){const r=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,d=at(o.bodyFont),h=fi(this,"left",o),u=s.x(h),f=l<d.lineHeight?(d.lineHeight-l)/2:0,p=n.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=s.leftForLtr(u,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Zs(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Zs(t,g,m,b)}else{t.lineWidth=V(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=s.leftForLtr(u,c),m=s.leftForLtr(s.xPlus(u,1),c-2),b=Te(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,In(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),In(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=i,h=at(i.bodyFont);let u=h.lineHeight,f=0;const p=Ue(i.rtl,this.x,this.width),g=function(C){n.fillText(C,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(r);let b,y,_,w,x,S,k;for(n.textAlign=r,n.textBaseline="middle",n.font=h.string,t.x=fi(this,m,i),n.fillStyle=i.bodyColor,q(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+d:c+2+d:0,w=0,S=s.length;w<S;++w){for(b=s[w],y=this.labelTextColors[w],n.fillStyle=y,q(b.before,g),_=b.lines,a&&_.length&&(this._drawColorBox(n,t,w,p,i),u=Math.max(h.lineHeight,l)),x=0,k=_.length;x<k;++x)g(_[x]),u=h.lineHeight;q(b.after,g)}f=0,u=h.lineHeight,q(this.afterBody,g),t.y-=o}drawFooter(t,n,i){const s=this.footer,o=s.length;let r,a;if(o){const l=Ue(i.rtl,this.x,this.width);for(t.x=fi(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",r=at(i.footerFont),n.fillStyle=i.footerColor,n.font=r.string,a=0;a<o;++a)n.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:d}=i,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:p}=Te(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+h,l),r==="top"&&this.drawCaret(t,n,i,s),n.lineTo(a+c-u,l),n.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,n,i,s),n.lineTo(a+c,l+d-p),n.quadraticCurveTo(a+c,l+d,a+c-p,l+d),r==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(a+f,l+d),n.quadraticCurveTo(a,l+d,a,l+d-f),r==="center"&&o==="left"&&this.drawCaret(t,n,i,s),n.lineTo(a,l+h),n.quadraticCurveTo(a,l,a+h,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const r=gn[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Xa(this,t),l=Object.assign({},r,this._size),c=Ka(n,t,l),d=Ga(t,l,c,n);(s._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=mt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,n),Bc(t,n.textDirection),o.y+=r.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Nc(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Li(i,s),r=this._positionChanged(s,n);(o||r)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,n,i),a=this._positionChanged(r,t),l=n||!Li(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:i,caretY:s,options:o}=this,r=gn[o.position].call(this,t,n);return r!==!1&&(i!==r.x||s!==r.y)}}T(io,"positioners",gn);var Qv={id:"tooltip",_element:io,positioners:gn,afterInit(e,t,n){n&&(e.tooltip=new io({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:od},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const cv=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function dv(e,t,n,i){const s=e.indexOf(t);if(s===-1)return cv(e,t,n,i);const o=e.lastIndexOf(t);return s!==o?n:s}const hv=(e,t)=>e===null?null:gt(Math.round(e),0,t);function Qa(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class tl extends Be{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:o}of n)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Y(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:dv(i,t,I(n,t),this._addedLabels),hv(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=n;r++)s.push({value:r});return s}getLabelForValue(t){return Qa.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}T(tl,"id","category"),T(tl,"defaults",{ticks:{callback:Qa}});function uv(e,t){const n=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:d,maxDigits:h,includeBounds:u}=e,f=o||1,p=d-1,{min:g,max:m}=t,b=!Y(r),y=!Y(a),_=!Y(c),w=(m-g)/(h+1);let x=ea((m-g)/p/f)*f,S,k,C,M;if(x<1e-14&&!b&&!y)return[{value:g},{value:m}];M=Math.ceil(m/x)-Math.floor(g/x),M>p&&(x=ea(M*x/p/f)*f),Y(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),s==="ticks"?(k=Math.floor(g/x)*x,C=Math.ceil(m/x)*x):(k=g,C=m),b&&y&&o&&Bb((a-r)/o,x/1e3)?(M=Math.round(Math.min((a-r)/x,d)),x=(a-r)/M,k=r,C=a):_?(k=b?r:k,C=y?a:C,M=c-1,x=(C-k)/M):(M=(C-k)/x,wn(M,Math.round(M),x/1e3)?M=Math.round(M):M=Math.ceil(M));const A=Math.max(na(x),na(k));S=Math.pow(10,Y(l)?A:l),k=Math.round(k*S)/S,C=Math.round(C*S)/S;let R=0;for(b&&(u&&k!==r?(n.push({value:r}),k<r&&R++,wn(Math.round((k+R*x)*S)/S,r,el(r,w,e))&&R++):k<r&&R++);R<M;++R){const P=Math.round((k+R*x)*S)/S;if(y&&P>a)break;n.push({value:P})}return y&&u&&C!==a?n.length&&wn(n[n.length-1].value,a,el(a,w,e))?n[n.length-1].value=a:n.push({value:a}):(!y||C===a)&&n.push({value:C}),n}function el(e,t,{horizontal:n,minRotation:i}){const s=$t(i),o=(n?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Hi extends Be{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,n){return Y(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=n?s:l,a=l=>o=i?o:l;if(t){const l=Ht(s),c=Ht(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=uv(s,o);return t.bounds==="ticks"&&Cc(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return ss(t,this.chart.options.locale,this.options.ticks.format)}}class nl extends Hi{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ct(t)?t:0,this.max=ct(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=$t(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}T(nl,"id","linear"),T(nl,"defaults",{ticks:{callback:os.formatters.numeric}});const Bn=e=>Math.floor(ee(e)),xe=(e,t)=>Math.pow(10,Bn(e)+t);function il(e){return e/Math.pow(10,Bn(e))===1}function sl(e,t,n){const i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function fv(e,t){const n=t-e;let i=Bn(n);for(;sl(e,t,i)>10;)i++;for(;sl(e,t,i)<10;)i--;return Math.min(i,Bn(e))}function pv(e,{min:t,max:n}){t=_t(e.min,t);const i=[],s=Bn(t);let o=fv(t,n),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,d=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-d)/Math.pow(10,o)),u=_t(e.min,Math.round((l+d+h*Math.pow(10,o))*r)/r);for(;u<n;)i.push({value:u,major:il(u),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,r=o>=0?1:r),u=Math.round((l+d+h*Math.pow(10,o))*r)/r;const f=_t(e.max,u);return i.push({value:f,major:il(f),significand:h}),i}class ol extends Be{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Hi.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return ct(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ct(t)?Math.max(0,t):null,this.max=ct(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ct(this._userMin)&&(this.min=t===xe(this.min,0)?xe(this.min,-1):xe(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const o=a=>i=t?i:a,r=a=>s=n?s:a;i===s&&(i<=0?(o(1),r(10)):(o(xe(i,-1)),r(xe(s,1)))),i<=0&&o(xe(s,-1)),s<=0&&r(xe(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=pv(n,this);return t.bounds==="ticks"&&Cc(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ss(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ee(t),this._valueRange=ee(this.max)-ee(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ee(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}T(ol,"id","logarithmic"),T(ol,"defaults",{ticks:{callback:os.formatters.logarithmic,major:{enabled:!0}}});function so(e){const t=e.ticks;if(t.display&&e.display){const n=mt(t.backdropPadding);return I(t.font&&t.font.size,et.font.size)+n.height}return 0}function gv(e,t,n){return n=Q(n)?n:[n],{w:sy(e,t.string,n),h:n.length*t.lineHeight}}function rl(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:e<i||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function mv(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],s=[],o=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?Z/o:0;for(let l=0;l<o;l++){const c=r.setContext(e.getPointLabelContext(l));s[l]=c.padding;const d=e.getPointPosition(l,e.drawingArea+s[l],a),h=at(c.font),u=gv(e.ctx,h,e._pointLabels[l]);i[l]=u;const f=Pt(e.getIndexAngle(l)+a),p=Math.round(Do(f)),g=rl(p,d.x,u.w,0,180),m=rl(p,d.y,u.h,90,270);bv(n,t,f,g,m)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=_v(e,i,s)}function bv(e,t,n,i,s){const o=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;i.start<t.l?(a=(t.l-i.start)/o,e.l=Math.min(e.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,e.t=Math.min(e.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,e.b=Math.max(e.b,t.b+l))}function yv(e,t,n){const i=e.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=n,l=e.getPointPosition(t,i+s+r,o),c=Math.round(Do(Pt(l.angle+ot))),d=kv(l.y,a.h,c),h=vv(c),u=wv(l.x,a.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+a.w,bottom:d+a.h}}function xv(e,t){if(!t)return!0;const{left:n,top:i,right:s,bottom:o}=e;return!(Xt({x:n,y:i},t)||Xt({x:n,y:o},t)||Xt({x:s,y:i},t)||Xt({x:s,y:o},t))}function _v(e,t,n){const i=[],s=e._pointLabels.length,o=e.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:so(o)/2,additionalAngle:r?Z/s:0};let c;for(let d=0;d<s;d++){l.padding=n[d],l.size=t[d];const h=yv(e,d,l);i.push(h),a==="auto"&&(h.visible=xv(h,c),h.visible&&(c=h))}return i}function vv(e){return e===0||e===180?"center":e<180?"left":"right"}function wv(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function kv(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Sv(e,t,n){const{left:i,top:s,right:o,bottom:r}=n,{backdropColor:a}=t;if(!Y(a)){const l=Te(t.borderRadius),c=mt(t.backdropPadding);e.fillStyle=a;const d=i-c.left,h=s-c.top,u=o-i+c.width,f=r-s+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),In(e,{x:d,y:h,w:u,h:f,radius:l}),e.fill()):e.fillRect(d,h,u,f)}}function Cv(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){const o=e._pointLabelItems[s];if(!o.visible)continue;const r=i.setContext(e.getPointLabelContext(s));Sv(n,r,o);const a=at(r.font),{x:l,y:c,textAlign:d}=o;Fe(n,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:d,textBaseline:"middle"})}}function rd(e,t,n,i){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,J);else{let o=e.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<i;r++)o=e.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function Mv(e,t,n,i,s){const o=e.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!i||!a||!l||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),rd(e,n,r,i),o.closePath(),o.stroke(),o.restore())}function Pv(e,t,n){return ue(e,{label:n,index:t,type:"pointLabel"})}class pi extends Hi{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=mt(so(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ct(t)&&!isNaN(t)?t:0,this.max=ct(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/so(this.options))}generateTickLabels(t){Hi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const s=K(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?mv(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){const n=J/(this._pointLabels.length||1),i=this.options.startAngle||0;return Pt(t*n+$t(i))}getDistanceFromCenterForValue(t){if(Y(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Y(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return Pv(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const s=this.getIndexAngle(t)-ot+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:s,bottom:o}=this._pointLabelItems[t];return{left:n,top:i,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),rd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:s,border:o}=n,r=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&Cv(this,r),s.display&&this.ticks.forEach((d,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);const u=this.getContext(h),f=s.setContext(u),p=o.setContext(u);Mv(this,f,l,r,p)}}),i.display){for(t.save(),a=r-1;a>=0;a--){const d=i.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:u}=d;!u||!h||(t.lineWidth=u,t.strokeStyle=h,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),d=at(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=mt(c.backdropPadding);t.fillRect(-r/2-h.left,-o-d.size/2-h.top,r+h.width,d.size+h.height)}Fe(t,a.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}T(pi,"id","radialLinear"),T(pi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:os.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),T(pi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),T(pi,"descriptors",{angleLines:{_fallback:"grid"}});const as={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},yt=Object.keys(as);function al(e,t){return e-t}function ll(e,t){if(Y(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:o}=e._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),ct(r)||(r=typeof i=="string"?n.parse(r,i):n.parse(r)),r===null?null:(s&&(r=s==="week"&&(Fn(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,s)),+r)}function cl(e,t,n,i){const s=yt.length;for(let o=yt.indexOf(e);o<s-1;++o){const r=as[yt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=i)return yt[o]}return yt[s-1]}function Tv(e,t,n,i,s){for(let o=yt.length-1;o>=yt.indexOf(n);o--){const r=yt[o];if(as[r].common&&e._adapter.diff(s,i,r)>=t-1)return r}return yt[n?yt.indexOf(n):0]}function Ov(e){for(let t=yt.indexOf(e)+1,n=yt.length;t<n;++t)if(as[yt[t]].common)return yt[t]}function dl(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=Lo(n,t),o=n[i]>=t?n[i]:n[s];e[o]=!0}}function Av(e,t,n,i){const s=e._adapter,o=+s.startOf(t[0].value,i),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function hl(e,t,n){const i=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,i.push({value:a,major:!1});return o===0||!n?i:Av(e,i,s,n)}class ji extends Be{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),s=this._adapter=new vx._date(t.adapters.date);s.init(n),vn(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ll(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=ct(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=ct(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=Wb(s,o,r);return this._unit=n.unit||(i.autoSkip?cl(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Tv(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ov(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),hl(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=gt(n,0,r),i=gt(i,0,r),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,o=s.time,r=o.unit||cl(o.minUnit,n,i,this._getLabelCapacity(n)),a=I(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Fn(l)||l===!0,d={};let h=n,u,f;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":r),t.diff(i,n,r)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+r);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(u=h,f=0;u<i;u=+t.add(u,a,r),f++)dl(d,u,p);return(u===i||s.bounds==="ticks"||f===1)&&dl(d,u,p),Object.keys(d).sort(al).map(g=>+g)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,o=this._unit,r=n||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,n,i,s){const o=this.options,r=o.ticks.callback;if(r)return K(r,[t,n,i],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],h=c&&a[c],u=i[n],f=c&&h&&u&&u.major;return this._adapter.format(t,s||(f?h:d))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=$t(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*r,h:i*r+a*o}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,o=this._tickFormatFunction(t,0,hl(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(ll(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tc(t.sort(al))}}T(ji,"id","time"),T(ji,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function gi(e,t,n){let i=0,s=e.length-1,o,r,a,l;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=Se(e,"pos",t)),{pos:o,time:a}=e[i],{pos:r,time:l}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=Se(e,"time",t)),{time:o,pos:a}=e[i],{time:r,pos:l}=e[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class ul extends ji{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=gi(n,this.min),this._tableRange=gi(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],o=[];let r,a,l,c,d;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(r=0,a=s.length;r<a;++r)d=s[r+1],l=s[r-1],c=s[r],Math.round((d+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(gi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return gi(this._table,i*this._tableRange+this._minPos,!0)}}T(ul,"id","timeseries"),T(ul,"defaults",ji.defaults);const ad={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},Rv={ariaLabel:{type:String},ariaDescribedby:{type:String}},Ev={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...ad,...Rv},Dv=Pd[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function We(e){return bl(e)?Ds(e):e}function Lv(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return bl(t)?new Proxy(e,{}):e}function Fv(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function ld(e,t){e.labels=t}function cd(e,t,n){const i=[];e.datasets=t.map(s=>{const o=e.datasets.find(r=>r[n]===s[n]);return!o||!s.data||i.includes(o)?{...s}:(i.push(o),Object.assign(o,s),o)})}function zv(e,t){const n={labels:[],datasets:[]};return ld(n,e.labels),cd(n,e.datasets,t),n}const Iv=nt({props:Ev,setup(e,t){let{expose:n,slots:i}=t;const s=se(null),o=ml(null);n({chart:o});const r=()=>{if(!s.value)return;const{type:c,data:d,options:h,plugins:u,datasetIdKey:f}=e,p=zv(d,f),g=Lv(p,d);o.value=new qo(s.value,{type:c,data:g,options:{...h},plugins:u})},a=()=>{const c=Ds(o.value);c&&(e.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},e.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(e.updateMode)};return gl(r),Td(a),lo([()=>e.options,()=>e.data],(c,d)=>{let[h,u]=c,[f,p]=d;const g=Ds(o.value);if(!g)return;let m=!1;if(h){const b=We(h),y=We(f);b&&b!==y&&(Fv(g,b),m=!0)}if(u){const b=We(u.labels),y=We(p.labels),_=We(u.datasets),w=We(p.datasets);b!==y&&(ld(g.config.data,b),m=!0),_&&_!==w&&(cd(g.config.data,_,e.datasetIdKey),m=!0)}m&&ao(()=>{l(g)})},{deep:!0}),()=>Es("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[Es("p",{},[i.default?i.default():""])])}});function Yo(e,t){return qo.register(t),nt({props:ad,setup(n,i){let{expose:s}=i;const o=ml(null),r=a=>{o.value=a==null?void 0:a.chart};return s({chart:o}),()=>Es(Iv,Dv({ref:r},{type:e,...n}))}})}const tw=Yo("bar",_i),ew=Yo("line",vi),nw=Yo("pie",Qs);export{jv as $,hi as A,Wv as B,qo as C,Uv as E,ui as L,Vv as M,Yv as N,Ps as P,Xv as R,st as W,nl as a,tl as b,ew as c,qv as d,Kv as e,Hv as f,Zv as g,Jv as h,As as i,tw as j,nw as k,Hl as l,Jg as m,Nv as n,Qv as p,lr as u};