Plugin Directory

Changeset 3048519

Timestamp:
03/10/2024 10:09:27 AM (5 months ago)
Author:
hasanuzzamanshamim
Message:

Realease version 1.0.2

Location:
buy-me-coffee
Files:
148 added
11 edited

Legend:

Unmodified
Added
Removed
  • buy-me-coffee/trunk/assets/js/plugin-main-js-file.js

    r3044362 r3048519  
    1 var vv=Object.defineProperty;var bv=(e,t,n)=>t in e?vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ae=(e,t,n)=>(bv(e,typeof t!="symbol"?t+"":t,n),n);import{i as ot,a as _v,b as Ln,g as ga,r as Ao,d as gu,c as Ah,e as Rh,f as Lh,h as sc,j as ic,k as no,l as Ui,m as wv,n as rn,S as Cs,L as rc,M as Xr,o as $h,t as zs,p as Ih,q as ac,s as Fh,u as Dt,v as Dh,w as xv,x as Sv,y as Cv,z as kv,A as Vs,C as vn,D as ss,E as P,F as rl,G as De,H as se,I as b,J as Be,K as Co,N as Pt,O as $n,P as Eo,Q as he,R as Ev,T as ws,U as Mv,V as lc,W as Pv,X as Qr,Y as Bh,Z as ye,_ as mt,$ as Nt,a0 as bn,a1 as A,a2 as Zo,a3 as Tv,a4 as Nh,a5 as we,a6 as on,a7 as cc,a8 as ke,a9 as He,aa as rt,ab as is,ac as ao,ad as Y,ae as Ov,af as me,ag as Av,ah as nn,ai as qi,aj as st,ak as Ht,al as lo,am as M,an as N,ao as R,ap as ve,aq as ma,ar as In,as as L,at as Ge,au as xe,av as Hs,aw as Rv,ax as F,ay as q,az as Ue,aA as Te,aB as fe,aC as ce,aD as X,aE as E,aF as Lv,aG as Or,aH as dt,aI as un,aJ as yt,aK as $v,aL as We,aM as Et,aN as $e,aO as On,aP as zh,aQ as et,aR as Vh,aS as uc,aT as Iv,aU as wn,aV as Mo,aW as Fv,aX as Hh,aY as Wh,aZ as jh,a_ as oo,a$ as Kh,b0 as Dv,b1 as Bv,b2 as Nv,b3 as zv,b4 as Vv,b5 as dc,b6 as Po,b7 as ks,b8 as Jr,b9 as Uh,ba as Mi,bb as so,bc as Lt,bd as Wt,be as ft,bf as fc,bg as Ce,bh as Qs,bi as Aa,bj as Hv,bk as Me,bl as ds,bm as Wv,bn as jv,bo as qh,bp as mu,bq as Yh,br as Gh,bs as va,bt as Kv,bu as Uv,bv as qv,bw as Yv,bx as vu,by as Gv,bz as Xv,bA as Qv,bB as Jv,bC as bu,bD as Xh,bE as Qh,bF as Zr,bG as Jh,bH as Zv,bI as ea,bJ as eb,bK as Zh,bL as ep,bM as tp,bN as Yi,bO as Gi,bP as tb,bQ as nb,bR as ob,bS as sb,bT as ib,bU as rb,B as ab}from"../plugin_main_js_file.js";var ON=yv((Qt,Jt)=>{const lb='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',cb=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,yu=e=>Array.from(e.querySelectorAll(lb)).filter(t=>ub(t)&&cb(t)),ub=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Xn=(e,t,{checkForDefaultPrevented:n=!0}={})=>s=>{const i=e==null?void 0:e(s);if(n===!1||!i)return t==null?void 0:t(s)},db=()=>ot&&/firefox/i.test(window.navigator.userAgent),hc=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}};var fb=/\s/;function hb(e){for(var t=e.length;t--&&fb.test(e.charAt(t)););return t}var pb=/^\s+/;function gb(e){return e&&e.slice(0,hb(e)+1).replace(pb,"")}var _u=0/0,mb=/^[-+]0x[0-9a-f]+$/i,vb=/^0b[01]+$/i,bb=/^0o[0-7]+$/i,yb=parseInt;function al(e){if(typeof e=="number")return e;if(_v(e))return _u;if(Ln(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ln(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gb(e);var n=vb.test(e);return n||bb.test(e)?yb(e.slice(2),n?2:8):mb.test(e)?_u:+e}var wu=1/0,_b=17976931348623157e292;function wb(e){if(!e)return e===0?e:0;if(e=al(e),e===wu||e===-wu){var t=e<0?-1:1;return t*_b}return e===e?e:0}function xb(e){var t=wb(e),n=t%1;return t===t?n?t-n:t:0}function pc(e){return e}var Sb=ga(Ao,"WeakMap");const ll=Sb;var xu=Object.create,Cb=function(){function e(){}return function(t){if(!Ln(t))return{};if(xu)return xu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const kb=Cb;function Eb(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)}function np(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Mb=800,Pb=16,Tb=Date.now;function Ob(e){var t=0,n=0;return function(){var o=Tb(),s=Pb-(o-n);if(n=o,s>0){if(++t>=Mb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ab(e){return function(){return e}}var Rb=gu?function(e,t){return gu(e,"toString",{configurable:!0,enumerable:!1,value:Ab(t),writable:!0})}:pc;const Lb=Rb;var $b=Ob(Lb);const op=$b;function Ib(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}function Fb(e,t,n,o){for(var s=e.length,i=n+(o?1:-1);o?i--:++i<s;)if(t(e[i],i,e))return i;return-1}function Xi(e,t,n,o){var s=!n;n||(n={});for(var i=-1,r=t.length;++i<r;){var a=t[i],l=o?o(n[a],e[a],a,n,e):void 0;l===void 0&&(l=e[a]),s?Ah(n,a,l):Rh(n,a,l)}return n}var Su=Math.max;function sp(e,t,n){return t=Su(t===void 0?e.length-1:t,0),function(){for(var o=arguments,s=-1,i=Su(o.length-t,0),r=Array(i);++s<i;)r[s]=o[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=o[s];return a[t]=n(r),Eb(e,this,a)}}function Db(e,t){return op(sp(e,t,pc),e+"")}var Bb=9007199254740991;function gc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bb}function Ws(e){return e!=null&&gc(e.length)&&!Lh(e)}function Nb(e,t,n){if(!Ln(n))return!1;var o=typeof t;return(o=="number"?Ws(n)&&sc(t,n.length):o=="string"&&t in n)?ic(n[t],e):!1}function zb(e){return Db(function(t,n){var o=-1,s=n.length,i=s>1?n[s-1]:void 0,r=s>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(s--,i):void 0,r&&Nb(n[0],n[1],r)&&(i=s<3?void 0:i,s=1),t=Object(t);++o<s;){var a=n[o];a&&e(t,a,o,i)}return t})}var Vb=Object.prototype;function mc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Vb;return e===n}function Hb(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Wb="[object Arguments]";function Cu(e){return no(e)&&Ui(e)==Wb}var ip=Object.prototype,jb=ip.hasOwnProperty,Kb=ip.propertyIsEnumerable,Ub=Cu(function(){return arguments}())?Cu:function(e){return no(e)&&jb.call(e,"callee")&&!Kb.call(e,"callee")};const Pi=Ub;function qb(){return!1}var rp=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,ku=rp&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,Yb=ku&&ku.exports===rp,Eu=Yb?Ao.Buffer:void 0,Gb=Eu?Eu.isBuffer:void 0,Xb=Gb||qb;const Ti=Xb;var Qb="[object Arguments]",Jb="[object Array]",Zb="[object Boolean]",ey="[object Date]",ty="[object Error]",ny="[object Function]",oy="[object Map]",sy="[object Number]",iy="[object Object]",ry="[object RegExp]",ay="[object Set]",ly="[object String]",cy="[object WeakMap]",uy="[object ArrayBuffer]",dy="[object DataView]",fy="[object Float32Array]",hy="[object Float64Array]",py="[object Int8Array]",gy="[object Int16Array]",my="[object Int32Array]",vy="[object Uint8Array]",by="[object Uint8ClampedArray]",yy="[object Uint16Array]",_y="[object Uint32Array]",Ze={};Ze[fy]=Ze[hy]=Ze[py]=Ze[gy]=Ze[my]=Ze[vy]=Ze[by]=Ze[yy]=Ze[_y]=!0;Ze[Qb]=Ze[Jb]=Ze[uy]=Ze[Zb]=Ze[dy]=Ze[ey]=Ze[ty]=Ze[ny]=Ze[oy]=Ze[sy]=Ze[iy]=Ze[ry]=Ze[ay]=Ze[ly]=Ze[cy]=!1;function wy(e){return no(e)&&gc(e.length)&&!!Ze[Ui(e)]}function vc(e){return function(t){return e(t)}}var ap=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,hi=ap&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,xy=hi&&hi.exports===ap,Ra=xy&&wv.process,Sy=function(){try{var e=hi&&hi.require&&hi.require("util").types;return e||Ra&&Ra.binding&&Ra.binding("util")}catch{}}();const Es=Sy;var Mu=Es&&Es.isTypedArray,Cy=Mu?vc(Mu):wy;const bc=Cy;var ky=Object.prototype,Ey=ky.hasOwnProperty;function lp(e,t){var n=rn(e),o=!n&&Pi(e),s=!n&&!o&&Ti(e),i=!n&&!o&&!s&&bc(e),r=n||o||s||i,a=r?Hb(e.length,String):[],l=a.length;for(var c in e)(t||Ey.call(e,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||sc(c,l)))&&a.push(c);return a}function cp(e,t){return function(n){return e(t(n))}}var My=cp(Object.keys,Object);const Py=My;var Ty=Object.prototype,Oy=Ty.hasOwnProperty;function Ay(e){if(!mc(e))return Py(e);var t=[];for(var n in Object(e))Oy.call(e,n)&&n!="constructor"&&t.push(n);return t}function Qi(e){return Ws(e)?lp(e):Ay(e)}function Ry(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Ly=Object.prototype,$y=Ly.hasOwnProperty;function Iy(e){if(!Ln(e))return Ry(e);var t=mc(e),n=[];for(var o in e)o=="constructor"&&(t||!$y.call(e,o))||n.push(o);return n}function Ji(e){return Ws(e)?lp(e,!0):Iy(e)}function yc(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e}var Pu=Cs?Cs.isConcatSpreadable:void 0;function Fy(e){return rn(e)||Pi(e)||!!(Pu&&e&&e[Pu])}function _c(e,t,n,o,s){var i=-1,r=e.length;for(n||(n=Fy),s||(s=[]);++i<r;){var a=e[i];t>0&&n(a)?t>1?_c(a,t-1,n,o,s):yc(s,a):o||(s[s.length]=a)}return s}function Dy(e){var t=e==null?0:e.length;return t?_c(e,1):[]}function By(e){return op(sp(e,void 0,Dy),e+"")}var Ny=cp(Object.getPrototypeOf,Object);const wc=Ny;var zy="[object Object]",Vy=Function.prototype,Hy=Object.prototype,up=Vy.toString,Wy=Hy.hasOwnProperty,jy=up.call(Object);function Ky(e){if(!no(e)||Ui(e)!=zy)return!1;var t=wc(e);if(t===null)return!0;var n=Wy.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&up.call(n)==jy}function cl(){if(!arguments.length)return[];var e=arguments[0];return rn(e)?e:[e]}function Uy(){this.__data__=new rc,this.size=0}function qy(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Yy(e){return this.__data__.get(e)}function Gy(e){return this.__data__.has(e)}var Xy=200;function Qy(e,t){var n=this.__data__;if(n instanceof rc){var o=n.__data__;if(!Xr||o.length<Xy-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new $h(o)}return n.set(e,t),this.size=n.size,this}function yn(e){var t=this.__data__=new rc(e);this.size=t.size}yn.prototype.clear=Uy;yn.prototype.delete=qy;yn.prototype.get=Yy;yn.prototype.has=Gy;yn.prototype.set=Qy;function Jy(e,t){return e&&Xi(t,Qi(t),e)}function Zy(e,t){return e&&Xi(t,Ji(t),e)}var dp=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,Tu=dp&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,e0=Tu&&Tu.exports===dp,Ou=e0?Ao.Buffer:void 0,Au=Ou?Ou.allocUnsafe:void 0;function fp(e,t){if(t)return e.slice();var n=e.length,o=Au?Au(n):new e.constructor(n);return e.copy(o),o}function t0(e,t){for(var n=-1,o=e==null?0:e.length,s=0,i=[];++n<o;){var r=e[n];t(r,n,e)&&(i[s++]=r)}return i}function hp(){return[]}var n0=Object.prototype,o0=n0.propertyIsEnumerable,Ru=Object.getOwnPropertySymbols,s0=Ru?function(e){return e==null?[]:(e=Object(e),t0(Ru(e),function(t){return o0.call(e,t)}))}:hp;const xc=s0;function i0(e,t){return Xi(e,xc(e),t)}var r0=Object.getOwnPropertySymbols,a0=r0?function(e){for(var t=[];e;)yc(t,xc(e)),e=wc(e);return t}:hp;const pp=a0;function l0(e,t){return Xi(e,pp(e),t)}function gp(e,t,n){var o=t(e);return rn(e)?o:yc(o,n(e))}function ul(e){return gp(e,Qi,xc)}function c0(e){return gp(e,Ji,pp)}var u0=ga(Ao,"DataView");const dl=u0;var d0=ga(Ao,"Promise");const fl=d0;var f0=ga(Ao,"Set");const hl=f0;var Lu="[object Map]",h0="[object Object]",$u="[object Promise]",Iu="[object Set]",Fu="[object WeakMap]",Du="[object DataView]",p0=zs(dl),g0=zs(Xr),m0=zs(fl),v0=zs(hl),b0=zs(ll),jo=Ui;(dl&&jo(new dl(new ArrayBuffer(1)))!=Du||Xr&&jo(new Xr)!=Lu||fl&&jo(fl.resolve())!=$u||hl&&jo(new hl)!=Iu||ll&&jo(new ll)!=Fu)&&(jo=function(e){var t=Ui(e),n=t==h0?e.constructor:void 0,o=n?zs(n):"";if(o)switch(o){case p0:return Du;case g0:return Lu;case m0:return $u;case v0:return Iu;case b0:return Fu}return t});const Oi=jo;var y0=Object.prototype,_0=y0.hasOwnProperty;function w0(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&_0.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var x0=Ao.Uint8Array;const ta=x0;function Sc(e){var t=new e.constructor(e.byteLength);return new ta(t).set(new ta(e)),t}function S0(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var C0=/\w*$/;function k0(e){var t=new e.constructor(e.source,C0.exec(e));return t.lastIndex=e.lastIndex,t}var Bu=Cs?Cs.prototype:void 0,Nu=Bu?Bu.valueOf:void 0;function E0(e){return Nu?Object(Nu.call(e)):{}}function mp(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var M0="[object Boolean]",P0="[object Date]",T0="[object Map]",O0="[object Number]",A0="[object RegExp]",R0="[object Set]",L0="[object String]",$0="[object Symbol]",I0="[object ArrayBuffer]",F0="[object DataView]",D0="[object Float32Array]",B0="[object Float64Array]",N0="[object Int8Array]",z0="[object Int16Array]",V0="[object Int32Array]",H0="[object Uint8Array]",W0="[object Uint8ClampedArray]",j0="[object Uint16Array]",K0="[object Uint32Array]";function U0(e,t,n){var o=e.constructor;switch(t){case I0:return Sc(e);case M0:case P0:return new o(+e);case F0:return S0(e,n);case D0:case B0:case N0:case z0:case V0:case H0:case W0:case j0:case K0:return mp(e,n);case T0:return new o;case O0:case L0:return new o(e);case A0:return k0(e);case R0:return new o;case $0:return E0(e)}}function vp(e){return typeof e.constructor=="function"&&!mc(e)?kb(wc(e)):{}}var q0="[object Map]";function Y0(e){return no(e)&&Oi(e)==q0}var zu=Es&&Es.isMap,G0=zu?vc(zu):Y0;const X0=G0;var Q0="[object Set]";function J0(e){return no(e)&&Oi(e)==Q0}var Vu=Es&&Es.isSet,Z0=Vu?vc(Vu):J0;const e_=Z0;var t_=1,n_=2,o_=4,bp="[object Arguments]",s_="[object Array]",i_="[object Boolean]",r_="[object Date]",a_="[object Error]",yp="[object Function]",l_="[object GeneratorFunction]",c_="[object Map]",u_="[object Number]",_p="[object Object]",d_="[object RegExp]",f_="[object Set]",h_="[object String]",p_="[object Symbol]",g_="[object WeakMap]",m_="[object ArrayBuffer]",v_="[object DataView]",b_="[object Float32Array]",y_="[object Float64Array]",__="[object Int8Array]",w_="[object Int16Array]",x_="[object Int32Array]",S_="[object Uint8Array]",C_="[object Uint8ClampedArray]",k_="[object Uint16Array]",E_="[object Uint32Array]",Xe={};Xe[bp]=Xe[s_]=Xe[m_]=Xe[v_]=Xe[i_]=Xe[r_]=Xe[b_]=Xe[y_]=Xe[__]=Xe[w_]=Xe[x_]=Xe[c_]=Xe[u_]=Xe[_p]=Xe[d_]=Xe[f_]=Xe[h_]=Xe[p_]=Xe[S_]=Xe[C_]=Xe[k_]=Xe[E_]=!0;Xe[a_]=Xe[yp]=Xe[g_]=!1;function Ar(e,t,n,o,s,i){var r,a=t&t_,l=t&n_,c=t&o_;if(n&&(r=s?n(e,o,s,i):n(e)),r!==void 0)return r;if(!Ln(e))return e;var u=rn(e);if(u){if(r=w0(e),!a)return np(e,r)}else{var d=Oi(e),f=d==yp||d==l_;if(Ti(e))return fp(e,a);if(d==_p||d==bp||f&&!s){if(r=l||f?{}:vp(e),!a)return l?l0(e,Zy(r,e)):i0(e,Jy(r,e))}else{if(!Xe[d])return s?e:{};r=U0(e,d,a)}}i||(i=new yn);var p=i.get(e);if(p)return p;i.set(e,r),e_(e)?e.forEach(function(v){r.add(Ar(v,t,n,v,e,i))}):X0(e)&&e.forEach(function(v,m){r.set(m,Ar(v,t,n,m,e,i))});var g=c?l?c0:ul:l?Ji:Qi,h=u?void 0:g(e);return Ib(h||e,function(v,m){h&&(m=v,v=e[m]),Rh(r,m,Ar(v,t,n,m,e,i))}),r}var M_=4;function Hu(e){return Ar(e,M_)}var P_="__lodash_hash_undefined__";function T_(e){return this.__data__.set(e,P_),this}function O_(e){return this.__data__.has(e)}function na(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new $h;++t<n;)this.add(e[t])}na.prototype.add=na.prototype.push=T_;na.prototype.has=O_;function A_(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function R_(e,t){return e.has(t)}var L_=1,$_=2;function wp(e,t,n,o,s,i){var r=n&L_,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&$_?new na:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var g=e[d],h=t[d];if(o)var v=r?o(h,g,d,t,e,i):o(g,h,d,e,t,i);if(v!==void 0){if(v)continue;f=!1;break}if(p){if(!A_(t,function(m,y){if(!R_(p,y)&&(g===m||s(g,m,n,o,i)))return p.push(y)})){f=!1;break}}else if(!(g===h||s(g,h,n,o,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function I_(e){var t=-1,n=Array(e.size);return e.forEach(function(o,s){n[++t]=[s,o]}),n}function F_(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var D_=1,B_=2,N_="[object Boolean]",z_="[object Date]",V_="[object Error]",H_="[object Map]",W_="[object Number]",j_="[object RegExp]",K_="[object Set]",U_="[object String]",q_="[object Symbol]",Y_="[object ArrayBuffer]",G_="[object DataView]",Wu=Cs?Cs.prototype:void 0,La=Wu?Wu.valueOf:void 0;function X_(e,t,n,o,s,i,r){switch(n){case G_:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Y_:return!(e.byteLength!=t.byteLength||!i(new ta(e),new ta(t)));case N_:case z_:case W_:return ic(+e,+t);case V_:return e.name==t.name&&e.message==t.message;case j_:case U_:return e==t+"";case H_:var a=I_;case K_:var l=o&D_;if(a||(a=F_),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;o|=B_,r.set(e,t);var u=wp(a(e),a(t),o,s,i,r);return r.delete(e),u;case q_:if(La)return La.call(e)==La.call(t)}return!1}var Q_=1,J_=Object.prototype,Z_=J_.hasOwnProperty;function ew(e,t,n,o,s,i){var r=n&Q_,a=ul(e),l=a.length,c=ul(t),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var f=a[d];if(!(r?f in t:Z_.call(t,f)))return!1}var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var h=!0;i.set(e,t),i.set(t,e);for(var v=r;++d<l;){f=a[d];var m=e[f],y=t[f];if(o)var w=r?o(y,m,f,t,e,i):o(m,y,f,e,t,i);if(!(w===void 0?m===y||s(m,y,n,o,i):w)){h=!1;break}v||(v=f=="constructor")}if(h&&!v){var _=e.constructor,x=t.constructor;_!=x&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof x=="function"&&x instanceof x)&&(h=!1)}return i.delete(e),i.delete(t),h}var tw=1,ju="[object Arguments]",Ku="[object Array]",ir="[object Object]",nw=Object.prototype,Uu=nw.hasOwnProperty;function ow(e,t,n,o,s,i){var r=rn(e),a=rn(t),l=r?Ku:Oi(e),c=a?Ku:Oi(t);l=l==ju?ir:l,c=c==ju?ir:c;var u=l==ir,d=c==ir,f=l==c;if(f&&Ti(e)){if(!Ti(t))return!1;r=!0,u=!1}if(f&&!u)return i||(i=new yn),r||bc(e)?wp(e,t,n,o,s,i):X_(e,t,l,n,o,s,i);if(!(n&tw)){var p=u&&Uu.call(e,"__wrapped__"),g=d&&Uu.call(t,"__wrapped__");if(p||g){var h=p?e.value():e,v=g?t.value():t;return i||(i=new yn),s(h,v,n,o,i)}}return f?(i||(i=new yn),ew(e,t,n,o,s,i)):!1}function ba(e,t,n,o,s){return e===t?!0:e==null||t==null||!no(e)&&!no(t)?e!==e&&t!==t:ow(e,t,n,o,ba,s)}var sw=1,iw=2;function rw(e,t,n,o){var s=n.length,i=s,r=!o;if(e==null)return!i;for(e=Object(e);s--;){var a=n[s];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<i;){a=n[s];var l=a[0],c=e[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in e))return!1}else{var d=new yn;if(o)var f=o(c,u,l,e,t,d);if(!(f===void 0?ba(u,c,sw|iw,o,d):f))return!1}}return!0}function xp(e){return e===e&&!Ln(e)}function aw(e){for(var t=Qi(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,xp(s)]}return t}function Sp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function lw(e){var t=aw(e);return t.length==1&&t[0][2]?Sp(t[0][0],t[0][1]):function(n){return n===e||rw(n,e,t)}}function cw(e,t){return e!=null&&t in Object(e)}function uw(e,t,n){t=Ih(t,e);for(var o=-1,s=t.length,i=!1;++o<s;){var r=ac(t[o]);if(!(i=e!=null&&n(e,r)))break;e=e[r]}return i||++o!=s?i:(s=e==null?0:e.length,!!s&&gc(s)&&sc(r,s)&&(rn(e)||Pi(e)))}function Cp(e,t){return e!=null&&uw(e,t,cw)}var dw=1,fw=2;function hw(e,t){return Fh(e)&&xp(t)?Sp(ac(e),t):function(n){var o=Dt(n,e);return o===void 0&&o===t?Cp(n,e):ba(t,o,dw|fw)}}function pw(e){return function(t){return t==null?void 0:t[e]}}function gw(e){return function(t){return Dh(t,e)}}function mw(e){return Fh(e)?pw(ac(e)):gw(e)}function kp(e){return typeof e=="function"?e:e==null?pc:typeof e=="object"?rn(e)?hw(e[0],e[1]):lw(e):mw(e)}function vw(e){return function(t,n,o){for(var s=-1,i=Object(t),r=o(t),a=r.length;a--;){var l=r[e?a:++s];if(n(i[l],l,i)===!1)break}return t}}var bw=vw();const Ep=bw;function yw(e,t){return e&&Ep(e,t,Qi)}function _w(e,t){return function(n,o){if(n==null)return n;if(!Ws(n))return e(n,o);for(var s=n.length,i=t?s:-1,r=Object(n);(t?i--:++i<s)&&o(r[i],i,r)!==!1;);return n}}var ww=_w(yw);const xw=ww;var Sw=function(){return Ao.Date.now()};const $a=Sw;var Cw="Expected a function",kw=Math.max,Ew=Math.min;function rs(e,t,n){var o,s,i,r,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Cw);t=al(t)||0,Ln(n)&&(u=!!n.leading,d="maxWait"in n,i=d?kw(al(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(S){var C=o,k=s;return o=s=void 0,c=S,r=e.apply(k,C),r}function g(S){return c=S,a=setTimeout(m,t),u?p(S):r}function h(S){var C=S-l,k=S-c,T=t-C;return d?Ew(T,i-k):T}function v(S){var C=S-l,k=S-c;return l===void 0||C>=t||C<0||d&&k>=i}function m(){var S=$a();if(v(S))return y(S);a=setTimeout(m,h(S))}function y(S){return a=void 0,f&&o?p(S):(o=s=void 0,r)}function w(){a!==void 0&&clearTimeout(a),c=0,o=l=s=a=void 0}function _(){return a===void 0?r:y($a())}function x(){var S=$a(),C=v(S);if(o=arguments,s=this,l=S,C){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(m,t),p(l)}return a===void 0&&(a=setTimeout(m,t)),r}return x.cancel=w,x.flush=_,x}function pl(e,t,n){(n!==void 0&&!ic(e[t],n)||n===void 0&&!(t in e))&&Ah(e,t,n)}function Mw(e){return no(e)&&Ws(e)}function gl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Pw(e){return Xi(e,Ji(e))}function Tw(e,t,n,o,s,i,r){var a=gl(e,n),l=gl(t,n),c=r.get(l);if(c){pl(e,n,c);return}var u=i?i(a,l,n+"",e,t,r):void 0,d=u===void 0;if(d){var f=rn(l),p=!f&&Ti(l),g=!f&&!p&&bc(l);u=l,f||p||g?rn(a)?u=a:Mw(a)?u=np(a):p?(d=!1,u=fp(l,!0)):g?(d=!1,u=mp(l,!0)):u=[]:Ky(l)||Pi(l)?(u=a,Pi(a)?u=Pw(a):(!Ln(a)||Lh(a))&&(u=vp(l))):d=!1}d&&(r.set(l,u),s(u,l,o,i,r),r.delete(l)),pl(e,n,u)}function Mp(e,t,n,o,s){e!==t&&Ep(t,function(i,r){if(s||(s=new yn),Ln(i))Tw(e,t,r,n,Mp,o,s);else{var a=o?o(gl(e,r),i,r+"",e,t,s):void 0;a===void 0&&(a=i),pl(e,r,a)}},Ji)}var Ow=Math.max,Aw=Math.min;function Rw(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var s=o-1;return n!==void 0&&(s=xb(n),s=n<0?Ow(o+s,0):Aw(s,o-1)),Fb(e,kp(t),s,!0)}function Lw(e,t){var n=-1,o=Ws(e)?Array(e.length):[];return xw(e,function(s,i,r){o[++n]=t(s,i,r)}),o}function $w(e,t){var n=rn(e)?xv:Lw;return n(e,kp(t))}function Iw(e,t){return _c($w(e,t),1)}function oa(e,t){return ba(e,t)}function es(e){return e==null}function Fw(e){return e===void 0}var Dw=zb(function(e,t,n){Mp(e,t,n)});const Pp=Dw;function Bw(e,t,n){for(var o=-1,s=t.length,i={};++o<s;){var r=t[o],a=Dh(e,r);n(a,r)&&Sv(i,Ih(r,e),a)}return i}function Nw(e,t){return Bw(e,t,function(n,o){return Cp(e,o)})}var zw=By(function(e,t){return e==null?{}:Nw(e,t)});const Vw=zw,Hw=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),bo=e=>Cv(e);class Ww extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Ro(e,t){throw new Ww(`[${e}] ${t}`)}let rr;const jw=e=>{var t;if(!ot)return 0;if(rr!==void 0)return rr;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",n.appendChild(s);const i=s.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),rr=o-i,rr};function Kw(e,t){if(!ot)return;if(!t){e.scrollTop=0;return}const n=[];let o=t.offsetParent;for(;o!==null&&e!==o&&e.contains(o);)n.push(o),o=o.offsetParent;const s=t.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),i=s+t.offsetHeight,r=e.scrollTop,a=r+e.clientHeight;s<r?e.scrollTop=s:i>a&&(e.scrollTop=i-e.clientHeight)}const Je="update:modelValue",io="change",ml="input",Uw=e=>kv[e||"default"],Cc=e=>["",...Vs].includes(e);var Rr=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Rr||{});const Lr=e=>{const t=vn(e)?e:[e],n=[];return t.forEach(o=>{var s;vn(o)?n.push(...Lr(o)):ss(o)&&vn(o.children)?n.push(...Lr(o.children)):(n.push(o),ss(o)&&((s=o.component)==null?void 0:s.subTree)&&n.push(...Lr(o.component.subTree)))}),n},Tp=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),qw=e=>ot?window.requestAnimationFrame(e):setTimeout(e,16),pn=e=>e,Yw=["class","style"],Gw=/^on[A-Z]/,Xw=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,o=P(()=>((n==null?void 0:n.value)||[]).concat(Yw)),s=De();return s?P(()=>{var i;return rl(Object.entries((i=s.proxy)==null?void 0:i.$attrs).filter(([r])=>!o.value.includes(r)&&!(t&&Gw.test(r))))}):P(()=>({}))},ya=({from:e,replacement:t,scope:n,version:o,ref:s,type:i="API"},r)=>{se(()=>b(r),a=>{},{immediate:!0})},Qw=(e,t,n)=>{let o={offsetX:0,offsetY:0};const s=a=>{const l=a.clientX,c=a.clientY,{offsetX:u,offsetY:d}=o,f=e.value.getBoundingClientRect(),p=f.left,g=f.top,h=f.width,v=f.height,m=document.documentElement.clientWidth,y=document.documentElement.clientHeight,w=-p+u,_=-g+d,x=m-p-h+u,S=y-g-v+d,C=T=>{const B=Math.min(Math.max(u+T.clientX-l,w),x),$=Math.min(Math.max(d+T.clientY-c,_),S);o={offsetX:B,offsetY:$},e.value.style.transform=`translate(${$n(B)}, ${$n($)})`},k=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",k)},i=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",s)},r=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",s)};Be(()=>{Co(()=>{n.value?i():r()})}),Pt(()=>{r()})},Jw=(e,t={})=>{Eo(e)||Ro("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||he("popup"),o=Ev(()=>n.bm("parent","hidden"));if(!ot||ws(document.body,o.value))return;let s=0,i=!1,r="0";const a=()=>{setTimeout(()=>{Qr(document==null?void 0:document.body,o.value),i&&document&&(document.body.style.width=r)},200)};se(e,l=>{if(!l){a();return}i=!ws(document.body,o.value),i&&(r=document.body.style.width),s=jw(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,u=Mv(document.body,"overflowY");s>0&&(c||u==="scroll")&&i&&(document.body.style.width=`calc(100% - ${s}px)`),lc(document.body,o.value)}),Pv(()=>a())},Zw=Bh({type:ye(Boolean),default:null}),e1=Bh({type:ye(Function)}),t1=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,o=[t],s={[e]:Zw,[n]:e1};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const f=De(),{emit:p}=f,g=f.props,h=P(()=>mt(g[n])),v=P(()=>g[e]===null),m=C=>{r.value!==!0&&(r.value=!0,a&&(a.value=C),mt(u)&&u(C))},y=C=>{r.value!==!1&&(r.value=!1,a&&(a.value=C),mt(d)&&d(C))},w=C=>{if(g.disabled===!0||mt(c)&&!c())return;const k=h.value&&ot;k&&p(t,!0),(v.value||!k)&&m(C)},_=C=>{if(g.disabled===!0||!ot)return;const k=h.value&&ot;k&&p(t,!1),(v.value||!k)&&y(C)},x=C=>{!Nt(C)||(g.disabled&&C?h.value&&p(t,!1):r.value!==C&&(C?m():y()))},S=()=>{r.value?_():w()};return se(()=>g[e],x),l&&f.appContext.config.globalProperties.$route!==void 0&&se(()=>({...f.proxy.$route}),()=>{l.value&&r.value&&_()}),Be(()=>{x(g[e])}),{hide:_,show:w,toggle:S,hasUpdateHandler:h}},useModelToggleProps:s,useModelToggleEmits:o}},Op=e=>{const t=De();return P(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})};var zt="top",an="bottom",ln="right",Vt="left",kc="auto",Zi=[zt,an,ln,Vt],Ms="start",Ai="end",n1="clippingParents",Ap="viewport",Js="popper",o1="reference",qu=Zi.reduce(function(e,t){return e.concat([t+"-"+Ms,t+"-"+Ai])},[]),_a=[].concat(Zi,[kc]).reduce(function(e,t){return e.concat([t,t+"-"+Ms,t+"-"+Ai])},[]),s1="beforeRead",i1="read",r1="afterRead",a1="beforeMain",l1="main",c1="afterMain",u1="beforeWrite",d1="write",f1="afterWrite",h1=[s1,i1,r1,a1,l1,c1,u1,d1,f1];function Fn(e){return e?(e.nodeName||"").toLowerCase():null}function Cn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ps(e){var t=Cn(e).Element;return e instanceof t||e instanceof Element}function sn(e){var t=Cn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ec(e){if(typeof ShadowRoot>"u")return!1;var t=Cn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function p1(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},s=t.attributes[n]||{},i=t.elements[n];!sn(i)||!Fn(i)||(Object.assign(i.style,o),Object.keys(s).forEach(function(r){var a=s[r];a===!1?i.removeAttribute(r):i.setAttribute(r,a===!0?"":a)}))})}function g1(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],i=t.attributes[o]||{},r=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),a=r.reduce(function(l,c){return l[c]="",l},{});!sn(s)||!Fn(s)||(Object.assign(s.style,a),Object.keys(i).forEach(function(l){s.removeAttribute(l)}))})}}var Rp={name:"applyStyles",enabled:!0,phase:"write",fn:p1,effect:g1,requires:["computeStyles"]};function An(e){return e.split("-")[0]}var ts=Math.max,sa=Math.min,Ts=Math.round;function Os(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,s=1;if(sn(e)&&t){var i=e.offsetHeight,r=e.offsetWidth;r>0&&(o=Ts(n.width)/r||1),i>0&&(s=Ts(n.height)/i||1)}return{width:n.width/o,height:n.height/s,top:n.top/s,right:n.right/o,bottom:n.bottom/s,left:n.left/o,x:n.left/o,y:n.top/s}}function Mc(e){var t=Os(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Lp(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ec(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function ro(e){return Cn(e).getComputedStyle(e)}function m1(e){return["table","td","th"].indexOf(Fn(e))>=0}function Lo(e){return((Ps(e)?e.ownerDocument:e.document)||window.document).documentElement}function wa(e){return Fn(e)==="html"?e:e.assignedSlot||e.parentNode||(Ec(e)?e.host:null)||Lo(e)}function Yu(e){return!sn(e)||ro(e).position==="fixed"?null:e.offsetParent}function v1(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&sn(e)){var o=ro(e);if(o.position==="fixed")return null}var s=wa(e);for(Ec(s)&&(s=s.host);sn(s)&&["html","body"].indexOf(Fn(s))<0;){var i=ro(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function er(e){for(var t=Cn(e),n=Yu(e);n&&m1(n)&&ro(n).position==="static";)n=Yu(n);return n&&(Fn(n)==="html"||Fn(n)==="body"&&ro(n).position==="static")?t:n||v1(e)||t}function Pc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function pi(e,t,n){return ts(e,sa(t,n))}function b1(e,t,n){var o=pi(e,t,n);return o>n?n:o}function $p(){return{top:0,right:0,bottom:0,left:0}}function Ip(e){return Object.assign({},$p(),e)}function Fp(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var y1=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ip(typeof e!="number"?e:Fp(e,Zi))};function _1(e){var t,n=e.state,o=e.name,s=e.options,i=n.elements.arrow,r=n.modifiersData.popperOffsets,a=An(n.placement),l=Pc(a),c=[Vt,ln].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!r)){var d=y1(s.padding,n),f=Mc(i),p=l==="y"?zt:Vt,g=l==="y"?an:ln,h=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],v=r[l]-n.rects.reference[l],m=er(i),y=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,w=h/2-v/2,_=d[p],x=y-f[u]-d[g],S=y/2-f[u]/2+w,C=pi(_,S,x),k=l;n.modifiersData[o]=(t={},t[k]=C,t.centerOffset=C-S,t)}}function w1(e){var t=e.state,n=e.options,o=n.element,s=o===void 0?"[data-popper-arrow]":o;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||!Lp(t.elements.popper,s)||(t.elements.arrow=s))}var x1={name:"arrow",enabled:!0,phase:"main",fn:_1,effect:w1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function As(e){return e.split("-")[1]}var S1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function C1(e){var t=e.x,n=e.y,o=window,s=o.devicePixelRatio||1;return{x:Ts(t*s)/s||0,y:Ts(n*s)/s||0}}function Gu(e){var t,n=e.popper,o=e.popperRect,s=e.placement,i=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=r.x,p=f===void 0?0:f,g=r.y,h=g===void 0?0:g,v=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=v.x,h=v.y;var m=r.hasOwnProperty("x"),y=r.hasOwnProperty("y"),w=Vt,_=zt,x=window;if(c){var S=er(n),C="clientHeight",k="clientWidth";if(S===Cn(n)&&(S=Lo(n),ro(S).position!=="static"&&a==="absolute"&&(C="scrollHeight",k="scrollWidth")),S=S,s===zt||(s===Vt||s===ln)&&i===Ai){_=an;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-o.height,h*=l?1:-1}if(s===Vt||(s===zt||s===an)&&i===Ai){w=ln;var B=d&&S===x&&x.visualViewport?x.visualViewport.width:S[k];p-=B-o.width,p*=l?1:-1}}var $=Object.assign({position:a},c&&S1),D=u===!0?C1({x:p,y:h}):{x:p,y:h};if(p=D.x,h=D.y,l){var W;return Object.assign({},$,(W={},W[_]=y?"0":"",W[w]=m?"0":"",W.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",W))}return Object.assign({},$,(t={},t[_]=y?h+"px":"",t[w]=m?p+"px":"",t.transform="",t))}function k1(e){var t=e.state,n=e.options,o=n.gpuAcceleration,s=o===void 0?!0:o,i=n.adaptive,r=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:An(t.placement),variation:As(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Gu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Gu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Dp={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:k1,data:{}},ar={passive:!0};function E1(e){var t=e.state,n=e.instance,o=e.options,s=o.scroll,i=s===void 0?!0:s,r=o.resize,a=r===void 0?!0:r,l=Cn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ar)}),a&&l.addEventListener("resize",n.update,ar),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ar)}),a&&l.removeEventListener("resize",n.update,ar)}}var Bp={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:E1,data:{}},M1={left:"right",right:"left",bottom:"top",top:"bottom"};function $r(e){return e.replace(/left|right|bottom|top/g,function(t){return M1[t]})}var P1={start:"end",end:"start"};function Xu(e){return e.replace(/start|end/g,function(t){return P1[t]})}function Tc(e){var t=Cn(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function Oc(e){return Os(Lo(e)).left+Tc(e).scrollLeft}function T1(e){var t=Cn(e),n=Lo(e),o=t.visualViewport,s=n.clientWidth,i=n.clientHeight,r=0,a=0;return o&&(s=o.width,i=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=o.offsetLeft,a=o.offsetTop)),{width:s,height:i,x:r+Oc(e),y:a}}function O1(e){var t,n=Lo(e),o=Tc(e),s=(t=e.ownerDocument)==null?void 0:t.body,i=ts(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ts(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-o.scrollLeft+Oc(e),l=-o.scrollTop;return ro(s||n).direction==="rtl"&&(a+=ts(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:r,x:a,y:l}}function Ac(e){var t=ro(e),n=t.overflow,o=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+o)}function Np(e){return["html","body","#document"].indexOf(Fn(e))>=0?e.ownerDocument.body:sn(e)&&Ac(e)?e:Np(wa(e))}function gi(e,t){var n;t===void 0&&(t=[]);var o=Np(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=Cn(o),r=s?[i].concat(i.visualViewport||[],Ac(o)?o:[]):o,a=t.concat(r);return s?a:a.concat(gi(wa(r)))}function vl(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function A1(e){var t=Os(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Qu(e,t){return t===Ap?vl(T1(e)):Ps(t)?A1(t):vl(O1(Lo(e)))}function R1(e){var t=gi(wa(e)),n=["absolute","fixed"].indexOf(ro(e).position)>=0,o=n&&sn(e)?er(e):e;return Ps(o)?t.filter(function(s){return Ps(s)&&Lp(s,o)&&Fn(s)!=="body"}):[]}function L1(e,t,n){var o=t==="clippingParents"?R1(e):[].concat(t),s=[].concat(o,[n]),i=s[0],r=s.reduce(function(a,l){var c=Qu(e,l);return a.top=ts(c.top,a.top),a.right=sa(c.right,a.right),a.bottom=sa(c.bottom,a.bottom),a.left=ts(c.left,a.left),a},Qu(e,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function zp(e){var t=e.reference,n=e.element,o=e.placement,s=o?An(o):null,i=o?As(o):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(s){case zt:l={x:r,y:t.y-n.height};break;case an:l={x:r,y:t.y+t.height};break;case ln:l={x:t.x+t.width,y:a};break;case Vt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=s?Pc(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Ms:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ai:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Ri(e,t){t===void 0&&(t={});var n=t,o=n.placement,s=o===void 0?e.placement:o,i=n.boundary,r=i===void 0?n1:i,a=n.rootBoundary,l=a===void 0?Ap:a,c=n.elementContext,u=c===void 0?Js:c,d=n.altBoundary,f=d===void 0?!1:d,p=n.padding,g=p===void 0?0:p,h=Ip(typeof g!="number"?g:Fp(g,Zi)),v=u===Js?o1:Js,m=e.rects.popper,y=e.elements[f?v:u],w=L1(Ps(y)?y:y.contextElement||Lo(e.elements.popper),r,l),_=Os(e.elements.reference),x=zp({reference:_,element:m,strategy:"absolute",placement:s}),S=vl(Object.assign({},m,x)),C=u===Js?S:_,k={top:w.top-C.top+h.top,bottom:C.bottom-w.bottom+h.bottom,left:w.left-C.left+h.left,right:C.right-w.right+h.right},T=e.modifiersData.offset;if(u===Js&&T){var B=T[s];Object.keys(k).forEach(function($){var D=[ln,an].indexOf($)>=0?1:-1,W=[zt,an].indexOf($)>=0?"y":"x";k[$]+=B[W]*D})}return k}function $1(e,t){t===void 0&&(t={});var n=t,o=n.placement,s=n.boundary,i=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?_a:l,u=As(o),d=u?a?qu:qu.filter(function(g){return As(g)===u}):Zi,f=d.filter(function(g){return c.indexOf(g)>=0});f.length===0&&(f=d);var p=f.reduce(function(g,h){return g[h]=Ri(e,{placement:h,boundary:s,rootBoundary:i,padding:r})[An(h)],g},{});return Object.keys(p).sort(function(g,h){return p[g]-p[h]})}function I1(e){if(An(e)===kc)return[];var t=$r(e);return[Xu(e),t,Xu(t)]}function F1(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,h=n.allowedAutoPlacements,v=t.options.placement,m=An(v),y=m===v,w=l||(y||!g?[$r(v)]:I1(v)),_=[v].concat(w).reduce(function(U,re){return U.concat(An(re)===kc?$1(t,{placement:re,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:h}):re)},[]),x=t.rects.reference,S=t.rects.popper,C=new Map,k=!0,T=_[0],B=0;B<_.length;B++){var $=_[B],D=An($),W=As($)===Ms,ne=[zt,an].indexOf(D)>=0,j=ne?"width":"height",Q=Ri(t,{placement:$,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),V=ne?W?ln:Vt:W?an:zt;x[j]>S[j]&&(V=$r(V));var le=$r(V),I=[];if(i&&I.push(Q[D]<=0),a&&I.push(Q[V]<=0,Q[le]<=0),I.every(function(U){return U})){T=$,k=!1;break}C.set($,I)}if(k)for(var Z=g?3:1,de=function(U){var re=_.find(function(ie){var O=C.get(ie);if(O)return O.slice(0,U).every(function(H){return H})});if(re)return T=re,"break"},J=Z;J>0;J--){var G=de(J);if(G==="break")break}t.placement!==T&&(t.modifiersData[o]._skip=!0,t.placement=T,t.reset=!0)}}var D1={name:"flip",enabled:!0,phase:"main",fn:F1,requiresIfExists:["offset"],data:{_skip:!1}};function Ju(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Zu(e){return[zt,ln,an,Vt].some(function(t){return e[t]>=0})}function B1(e){var t=e.state,n=e.name,o=t.rects.reference,s=t.rects.popper,i=t.modifiersData.preventOverflow,r=Ri(t,{elementContext:"reference"}),a=Ri(t,{altBoundary:!0}),l=Ju(r,o),c=Ju(a,s,i),u=Zu(l),d=Zu(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var N1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:B1};function z1(e,t,n){var o=An(e),s=[Vt,zt].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,r=i[0],a=i[1];return r=r||0,a=(a||0)*s,[Vt,ln].indexOf(o)>=0?{x:a,y:r}:{x:r,y:a}}function V1(e){var t=e.state,n=e.options,o=e.name,s=n.offset,i=s===void 0?[0,0]:s,r=_a.reduce(function(u,d){return u[d]=z1(d,t.rects,i),u},{}),a=r[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=r}var H1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:V1};function W1(e){var t=e.state,n=e.name;t.modifiersData[n]=zp({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Vp={name:"popperOffsets",enabled:!0,phase:"read",fn:W1,data:{}};function j1(e){return e==="x"?"y":"x"}function K1(e){var t=e.state,n=e.options,o=e.name,s=n.mainAxis,i=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,g=n.tetherOffset,h=g===void 0?0:g,v=Ri(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),m=An(t.placement),y=As(t.placement),w=!y,_=Pc(m),x=j1(_),S=t.modifiersData.popperOffsets,C=t.rects.reference,k=t.rects.popper,T=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,B=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(S){if(i){var W,ne=_==="y"?zt:Vt,j=_==="y"?an:ln,Q=_==="y"?"height":"width",V=S[_],le=V+v[ne],I=V-v[j],Z=p?-k[Q]/2:0,de=y===Ms?C[Q]:k[Q],J=y===Ms?-k[Q]:-C[Q],G=t.elements.arrow,U=p&&G?Mc(G):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$p(),ie=re[ne],O=re[j],H=pi(0,C[Q],U[Q]),K=w?C[Q]/2-Z-H-ie-B.mainAxis:de-H-ie-B.mainAxis,te=w?-C[Q]/2+Z+H+O+B.mainAxis:J+H+O+B.mainAxis,ge=t.elements.arrow&&er(t.elements.arrow),Le=ge?_==="y"?ge.clientTop||0:ge.clientLeft||0:0,Ee=(W=$==null?void 0:$[_])!=null?W:0,_e=V+K-Ee-Le,Ve=V+te-Ee,gt=pi(p?sa(le,_e):le,V,p?ts(I,Ve):I);S[_]=gt,D[_]=gt-V}if(a){var Ye,jt=_==="x"?zt:Vt,zn=_==="x"?an:ln,Tt=S[x],Zt=x==="y"?"height":"width",Kt=Tt+v[jt],En=Tt-v[zn],en=[zt,Vt].indexOf(m)!==-1,oe=(Ye=$==null?void 0:$[x])!=null?Ye:0,be=en?Kt:Tt-C[Zt]-k[Zt]-oe+B.altAxis,qe=en?Tt+C[Zt]+k[Zt]-oe-B.altAxis:En,Ut=p&&en?b1(be,Tt,qe):pi(p?be:Kt,Tt,p?qe:En);S[x]=Ut,D[x]=Ut-Tt}t.modifiersData[o]=D}}var U1={name:"preventOverflow",enabled:!0,phase:"main",fn:K1,requiresIfExists:["offset"]};function q1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Y1(e){return e===Cn(e)||!sn(e)?Tc(e):q1(e)}function G1(e){var t=e.getBoundingClientRect(),n=Ts(t.width)/e.offsetWidth||1,o=Ts(t.height)/e.offsetHeight||1;return n!==1||o!==1}function X1(e,t,n){n===void 0&&(n=!1);var o=sn(t),s=sn(t)&&G1(t),i=Lo(t),r=Os(e,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!n)&&((Fn(t)!=="body"||Ac(i))&&(a=Y1(t)),sn(t)?(l=Os(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Oc(i))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Q1(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function s(i){n.add(i.name);var r=[].concat(i.requires||[],i.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&s(l)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||s(i)}),o}function J1(e){var t=Q1(e);return h1.reduce(function(n,o){return n.concat(t.filter(function(s){return s.phase===o}))},[])}function Z1(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ex(e){var t=e.reduce(function(n,o){var s=n[o.name];return n[o.name]=s?Object.assign({},s,o,{options:Object.assign({},s.options,o.options),data:Object.assign({},s.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var ed={placement:"bottom",modifiers:[],strategy:"absolute"};function td(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Rc(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,s=t.defaultOptions,i=s===void 0?ed:s;return function(r,a,l){l===void 0&&(l=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},ed,i),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,f={state:c,setOptions:function(h){var v=typeof h=="function"?h(c.options):h;g(),c.options=Object.assign({},i,c.options,v),c.scrollParents={reference:Ps(r)?gi(r):r.contextElement?gi(r.contextElement):[],popper:gi(a)};var m=J1(ex([].concat(o,c.options.modifiers)));return c.orderedModifiers=m.filter(function(y){return y.enabled}),p(),f.update()},forceUpdate:function(){if(!d){var h=c.elements,v=h.reference,m=h.popper;if(td(v,m)){c.rects={reference:X1(v,er(m),c.options.strategy==="fixed"),popper:Mc(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(k){return c.modifiersData[k.name]=Object.assign({},k.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var w=c.orderedModifiers[y],_=w.fn,x=w.options,S=x===void 0?{}:x,C=w.name;typeof _=="function"&&(c=_({state:c,options:S,name:C,instance:f})||c)}}}},update:Z1(function(){return new Promise(function(h){f.forceUpdate(),h(c)})}),destroy:function(){g(),d=!0}};if(!td(r,a))return f;f.setOptions(l).then(function(h){!d&&l.onFirstUpdate&&l.onFirstUpdate(h)});function p(){c.orderedModifiers.forEach(function(h){var v=h.name,m=h.options,y=m===void 0?{}:m,w=h.effect;if(typeof w=="function"){var _=w({state:c,name:v,instance:f,options:y}),x=function(){};u.push(_||x)}})}function g(){u.forEach(function(h){return h()}),u=[]}return f}}Rc();var tx=[Bp,Vp,Dp,Rp];Rc({defaultModifiers:tx});var nx=[Bp,Vp,Dp,Rp,H1,D1,U1,x1,N1],Hp=Rc({defaultModifiers:nx});const ox=(e,t,n={})=>{const o={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=sx(l);Object.assign(r.value,c)},requires:["computeStyles"]},s=P(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=b(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],o,{name:"applyStyles",enabled:!1}]}}),i=bn(),r=A({styles:{popper:{position:b(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{!i.value||(i.value.destroy(),i.value=void 0)};return se(s,l=>{const c=b(i);c&&c.setOptions(l)},{deep:!0}),se([e,t],([l,c])=>{a(),!(!l||!c)&&(i.value=Hp(l,c,b(s)))}),Pt(()=>{a()}),{state:P(()=>{var l;return{...((l=b(i))==null?void 0:l.state)||{}}}),styles:P(()=>b(r).styles),attributes:P(()=>b(r).attributes),update:()=>{var l;return(l=b(i))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=b(i))==null?void 0:l.forceUpdate()},instanceRef:P(()=>b(i))}};function sx(e){const t=Object.keys(e.elements),n=rl(t.map(s=>[s,e.styles[s]||{}])),o=rl(t.map(s=>[s,e.attributes[s]]));return{styles:n,attributes:o}}const Wp=e=>{if(!e)return{onClick:Zo,onMousedown:Zo,onMouseup:Zo};let t=!1,n=!1;return{onClick:r=>{t&&n&&e(r),t=n=!1},onMousedown:r=>{t=r.target===r.currentTarget},onMouseup:r=>{n=r.target===r.currentTarget}}},ix=(e,t=0)=>{if(t===0)return e;const n=A(!1);let o=0;const s=()=>{o&&clearTimeout(o),o=window.setTimeout(()=>{n.value=e.value},t)};return Be(s),se(()=>e.value,i=>{i?s():n.value=i}),n};function nd(){let e;const t=(o,s)=>{n(),e=window.setTimeout(o,s)},n=()=>window.clearTimeout(e);return Tv(()=>n()),{registerTimeout:t,cancelTimeout:n}}const od={prefix:Math.floor(Math.random()*1e4),current:0},rx=Symbol("elIdInjection"),jp=()=>De()?we(rx,od):od,Rs=e=>{const t=jp(),n=Nh();return P(()=>b(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let bs=[];const sd=e=>{const t=e;t.key===on.esc&&bs.forEach(n=>n(t))},ax=e=>{Be(()=>{bs.length===0&&document.addEventListener("keydown",sd),ot&&bs.push(e)}),Pt(()=>{bs=bs.filter(t=>t!==e),bs.length===0&&ot&&document.removeEventListener("keydown",sd)})};let id;const Kp=()=>{const e=Nh(),t=jp(),n=P(()=>`${e.value}-popper-container-${t.prefix}`),o=P(()=>`#${n.value}`);return{id:n,selector:o}},lx=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},cx=()=>{const{id:e,selector:t}=Kp();return cc(()=>{!ot||!id&&!document.body.querySelector(t.value)&&(id=lx(e.value))}),{id:e,selector:t}},ux=ke({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Up=({showAfter:e,hideAfter:t,autoClose:n,open:o,close:s})=>{const{registerTimeout:i}=nd(),{registerTimeout:r,cancelTimeout:a}=nd();return{onOpen:u=>{i(()=>{o(u);const d=b(n);He(d)&&d>0&&r(()=>{s(u)},d)},b(e))},onClose:u=>{a(),i(()=>{s(u)},b(t))}}},qp=Symbol("elForwardRef"),dx=e=>{rt(qp,{setForwardRef:n=>{e.value=n}})},fx=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}});function hx(e){const t=A();function n(){if(e.value==null)return;const{selectionStart:s,selectionEnd:i,value:r}=e.value;if(s==null||i==null)return;const a=r.slice(0,Math.max(0,s)),l=r.slice(Math.max(0,i));t.value={selectionStart:s,selectionEnd:i,value:r,beforeTxt:a,afterTxt:l}}function o(){if(e.value==null||t.value==null)return;const{value:s}=e.value,{beforeTxt:i,afterTxt:r,selectionStart:a}=t.value;if(i==null||r==null||a==null)return;let l=s.length;if(s.endsWith(r))l=s.length-r.length;else if(s.startsWith(i))l=i.length;else{const c=i[a-1],u=s.indexOf(c,a-1);u!==-1&&(l=u+1)}e.value.setSelectionRange(l,l)}return[n,o]}const px=(e,t,n)=>Lr(e.subTree).filter(i=>{var r;return ss(i)&&((r=i.type)==null?void 0:r.name)===t&&!!i.component}).map(i=>i.component.uid).map(i=>n[i]).filter(i=>!!i),Yp=(e,t)=>{const n={},o=bn([]);return{children:o,addChild:r=>{n[r.uid]=r,o.value=px(e,t,n)},removeChild:r=>{delete n[r],o.value=o.value.filter(a=>a.uid!==r)}}};function gx(e,{afterFocus:t,afterBlur:n}={}){const o=De(),{emit:s}=o,i=bn(),r=A(!1),a=u=>{r.value||(r.value=!0,s("focus",u),t==null||t())},l=u=>{var d;u.relatedTarget&&((d=i.value)==null?void 0:d.contains(u.relatedTarget))||(r.value=!1,s("blur",u),n==null||n())},c=()=>{var u;(u=e.value)==null||u.focus()};return se(i,u=>{u&&u.setAttribute("tabindex","-1")}),is(i,"click",c),{wrapperRef:i,isFocused:r,handleFocus:a,handleBlur:l}}const mx=ke({a11y:{type:Boolean,default:!0},locale:{type:ye(Object)},size:ao,button:{type:ye(Object)},experimentalFeatures:{type:ye(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:ye(Object)},zIndex:Number,namespace:{type:String,default:"el"}}),bl={};Y({name:"ElConfigProvider",props:mx,setup(e,{slots:t}){se(()=>e.message,o=>{Object.assign(bl,o!=null?o:{})},{immediate:!0,deep:!0});const n=Ov(e);return()=>me(t,"default",{config:n==null?void 0:n.value})}});const js=Symbol("formContextKey"),as=Symbol("formItemContextKey"),cn=(e,t={})=>{const n=A(void 0),o=t.prop?n:Op("size"),s=t.global?n:Av(),i=t.form?{size:void 0}:we(js,void 0),r=t.formItem?{size:void 0}:we(as,void 0);return P(()=>o.value||b(e)||(r==null?void 0:r.size)||(i==null?void 0:i.size)||s.value||"")},fs=e=>{const t=Op("disabled"),n=we(js,void 0);return P(()=>t.value||b(e)||(n==null?void 0:n.disabled)||!1)},co=()=>{const e=we(js,void 0),t=we(as,void 0);return{form:e,formItem:t}},Ks=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=A(!1)),o||(o=A(!1));const s=A();let i;const r=P(()=>{var a;return!!(!e.label&&t&&t.inputIds&&((a=t.inputIds)==null?void 0:a.length)<=1)});return Be(()=>{i=se([nn(e,"id"),n],([a,l])=>{const c=a!=null?a:l?void 0:Rs().value;c!==s.value&&(t!=null&&t.removeInputId&&(s.value&&t.removeInputId(s.value),!(o!=null&&o.value)&&!l&&c&&t.addInputId(c)),s.value=c)},{immediate:!0})}),qi(()=>{i&&i(),t!=null&&t.removeInputId&&s.value&&t.removeInputId(s.value)}),{isLabeledByFormItem:r,inputId:s}},vx=ke({size:{type:String,values:Vs},disabled:Boolean}),bx=ke({...vx,model:Object,rules:{type:ye(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),yx={validate:(e,t,n)=>(vn(e)||st(e))&&Nt(t)&&st(n)};function _x(){const e=A([]),t=P(()=>{if(!e.value.length)return"0";const i=Math.max(...e.value);return i?`${i}px`:""});function n(i){const r=e.value.indexOf(i);return r===-1&&t.value,r}function o(i,r){if(i&&r){const a=n(r);e.value.splice(a,1,i)}else i&&e.value.push(i)}function s(i){const r=n(i);r>-1&&e.value.splice(r,1)}return{autoLabelWidth:t,registerLabelWidth:o,deregisterLabelWidth:s}}const lr=(e,t)=>{const n=cl(t);return n.length>0?e.filter(o=>o.prop&&n.includes(o.prop)):e},wx="ElForm",xx=Y({name:wx}),Sx=Y({...xx,props:bx,emits:yx,setup(e,{expose:t,emit:n}){const o=e,s=[],i=cn(),r=he("form"),a=P(()=>{const{labelPosition:y,inline:w}=o;return[r.b(),r.m(i.value||"default"),{[r.m(`label-${y}`)]:y,[r.m("inline")]:w}]}),l=y=>{s.push(y)},c=y=>{y.prop&&s.splice(s.indexOf(y),1)},u=(y=[])=>{!o.model||lr(s,y).forEach(w=>w.resetField())},d=(y=[])=>{lr(s,y).forEach(w=>w.clearValidate())},f=P(()=>!!o.model),p=y=>{if(s.length===0)return[];const w=lr(s,y);return w.length?w:[]},g=async y=>v(void 0,y),h=async(y=[])=>{if(!f.value)return!1;const w=p(y);if(w.length===0)return!0;let _={};for(const x of w)try{await x.validate("")}catch(S){_={..._,...S}}return Object.keys(_).length===0?!0:Promise.reject(_)},v=async(y=[],w)=>{const _=!mt(w);try{const x=await h(y);return x===!0&&(w==null||w(x)),x}catch(x){if(x instanceof Error)throw x;const S=x;return o.scrollToError&&m(Object.keys(S)[0]),w==null||w(!1,S),_&&Promise.reject(S)}},m=y=>{var w;const _=lr(s,y)[0];_&&((w=_.$el)==null||w.scrollIntoView(o.scrollIntoViewOptions))};return se(()=>o.rules,()=>{o.validateOnRuleChange&&g().catch(y=>void 0)},{deep:!0}),rt(js,Ht({...lo(o),emit:n,resetFields:u,clearValidate:d,validateField:v,addField:l,removeField:c,..._x()})),t({validate:g,validateField:v,resetFields:u,clearValidate:d,scrollToField:m}),(y,w)=>(M(),N("form",{class:R(b(a))},[me(y.$slots,"default")],2))}});var Cx=ve(Sx,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yo.apply(this,arguments)}function kx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Li(e,t)}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yl(e)}function Li(e,t){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o},Li(e,t)}function Ex(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ir(e,t,n){return Ex()?Ir=Reflect.construct.bind():Ir=function(s,i,r){var a=[null];a.push.apply(a,i);var l=Function.bind.apply(s,a),c=new l;return r&&Li(c,r.prototype),c},Ir.apply(null,arguments)}function Mx(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _l(e){var t=typeof Map=="function"?new Map:void 0;return _l=function(o){if(o===null||!Mx(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,s)}function s(){return Ir(o,arguments,yl(this).constructor)}return s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Li(s,o)},_l(e)}var Px=/%[sdj%]/g,Tx=function(){};typeof process<"u"&&process.env;function wl(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function Xt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var s=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var r=e.replace(Px,function(a){if(a==="%%")return"%";if(s>=i)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return r}return e}function Ox(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function pt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Ox(t)&&typeof e=="string"&&!e)}function Ax(e,t,n){var o=[],s=0,i=e.length;function r(a){o.push.apply(o,a||[]),s++,s===i&&n(o)}e.forEach(function(a){t(a,r)})}function rd(e,t,n){var o=0,s=e.length;function i(r){if(r&&r.length){n(r);return}var a=o;o=o+1,a<s?t(e[a],i):n([])}i([])}function Rx(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var ad=function(e){kx(t,e);function t(n,o){var s;return s=e.call(this,"Async Validation Error")||this,s.errors=n,s.fields=o,s}return t}(_l(Error));function Lx(e,t,n,o,s){if(t.first){var i=new Promise(function(f,p){var g=function(m){return o(m),m.length?p(new ad(m,wl(m))):f(s)},h=Rx(e);rd(h,n,g)});return i.catch(function(f){return f}),i}var r=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise(function(f,p){var g=function(v){if(u.push.apply(u,v),c++,c===l)return o(u),u.length?p(new ad(u,wl(u))):f(s)};a.length||(o(u),f(s)),a.forEach(function(h){var v=e[h];r.indexOf(h)!==-1?rd(v,n,g):Ax(v,n,g)})});return d.catch(function(f){return f}),d}function $x(e){return!!(e&&e.message!==void 0)}function Ix(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function ld(e,t){return function(n){var o;return e.fullFields?o=Ix(t,e.fullFields):o=t[n.field||e.fullField],$x(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function cd(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=Yo({},e[n],o):e[n]=o}}return e}var Gp=function(t,n,o,s,i,r){t.required&&(!o.hasOwnProperty(t.field)||pt(n,r||t.type))&&s.push(Xt(i.messages.required,t.fullField))},Fx=function(t,n,o,s,i){(/^\s+$/.test(n)||n==="")&&s.push(Xt(i.messages.whitespace,t.fullField))},cr,Dx=function(){if(cr)return cr;var e="[a-fA-F\\d:]",t=function(_){return _&&_.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",s=(`
     1var vv=Object.defineProperty;var bv=(e,t,n)=>t in e?vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ae=(e,t,n)=>(bv(e,typeof t!="symbol"?t+"":t,n),n);import{i as ot,a as _v,b as Ln,g as ga,r as Ao,d as gu,c as Ah,e as Rh,f as Lh,h as sc,j as ic,k as no,l as s=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=A(!1)),o||(o=A(!1));const s=A();let i;const r=P(()=>{var a;return!!(!e.label&&t&&t.inputIds&&((a=t.inputIds)==null?void 0:a.length)<=1)});return Be(()=>{i=se([nn(e,"id"),n],([a,l])=>{const c=a!=null?a:l?void 0:Rs().value;c!==s.value&&(t!=null&&t.removeInputId&&(s.value&&t.removeInputId(s.value),!(o!=null&&o.value)&&!l&&c&&t.addInputId(c)),s.value=c)},{immediate:!0})}),qi(()=>{i&&i(),t!=null&&t.removeInputId&&s.value&&t.removeInputId(s.value)}),{isLabeledByFormItem:r,inputId:s}},vx=ke({size:{type:String,values:Vs},disabled:Boolean}),bx=ke({...vx,model:Object,rules:{type:ye(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),yx={validate:(e,t,n)=>(vn(e)||st(e))&&Nt(t)&&st(n)};function _x(){const e=A([]),t=P(()=>{if(!e.value.length)return"0";const i=Math.max(...e.value);return i?`${i}px`:""});function n(i){const r=e.value.indexOf(i);return r===-1&&t.value,r}function o(i,r){if(i&&r){const a=n(r);e.value.splice(a,1,i)}else i&&e.value.push(i)}function s(i){const r=n(i);r>-1&&e.value.splice(r,1)}return{autoLabelWidth:t,registerLabelWidth:o,deregisterLabelWidth:s}}const lr=(e,t)=>{const n=cl(t);return n.length>0?e.filter(o=>o.prop&&n.includes(o.prop)):e},wx="ElForm",xx=Y({name:wx}),Sx=Y({...xx,props:bx,emits:yx,setup(e,{expose:t,emit:n}){const o=e,s=[],i=cn(),r=he("form"),a=P(()=>{const{labelPosition:y,inline:w}=o;return[r.b(),r.m(i.value||"default"),{[r.m(`label-${y}`)]:y,[r.m("inline")]:w}]}),l=y=>{s.push(y)},c=y=>{y.prop&&s.splice(s.indexOf(y),1)},u=(y=[])=>{!o.model||lr(s,y).forEach(w=>w.resetField())},d=(y=[])=>{lr(s,y).forEach(w=>w.clearValidate())},f=P(()=>!!o.model),p=y=>{if(s.length===0)return[];const w=lr(s,y);return w.length?w:[]},g=async y=>v(void 0,y),h=async(y=[])=>{if(!f.value)return!1;const w=p(y);if(w.length===0)return!0;let _={};for(const x of w)try{await x.validate("")}catch(S){_={..._,...S}}return Object.keys(_).length===0?!0:Promise.reject(_)},v=async(y=[],w)=>{const _=!mt(w);try{const x=await h(y);return x===!0&&(w==null||w(x)),x}catch(x){if(x instanceof Error)throw x;const S=x;return o.scrollToError&&m(Object.keys(S)[0]),w==null||w(!1,S),_&&Promise.reject(S)}},m=y=>{var w;const _=lr(s,y)[0];_&&((w=_.$el)==null||w.scrollIntoView(o.scrollIntoViewOptions))};return se(()=>o.rules,()=>{o.validateOnRuleChange&&g().catch(y=>void 0)},{deep:!0}),rt(js,Ht({...lo(o),emit:n,resetFields:u,clearValidate:d,validateField:v,addField:l,removeField:c,..._x()})),t({validate:g,validateField:v,resetFields:u,clearValidate:d,scrollToField:m}),(y,w)=>(M(),N("form",{class:R(b(a))},[me(y.$slots,"default")],2))}});var Cx=ve(Sx,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yo.apply(this,arguments)}function kx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Li(e,t)}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yl(e)}function Li(e,t){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o},Li(e,t)}function Ex(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ir(e,t,n){return Ex()?Ir=Reflect.construct.bind():Ir=function(s,i,r){var a=[null];a.push.apply(a,i);var l=Function.bind.apply(s,a),c=new l;return r&&Li(c,r.prototype),c},Ir.apply(null,arguments)}function Mx(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _l(e){var t=typeof Map=="function"?new Map:void 0;return _l=function(o){if(o===null||!Mx(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,s)}function s(){return Ir(o,arguments,yl(this).constructor)}return s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Li(s,o)},_l(e)}var Px=/%[sdj%]/g,Tx=function(){};typeof process<"u"&&process.env;function wl(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function Xt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var s=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var r=e.replace(Px,function(a){if(a==="%%")return"%";if(s>=i)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return r}return e}function Ox(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function pt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Ox(t)&&typeof e=="string"&&!e)}function Ax(e,t,n){var o=[],s=0,i=e.length;function r(a){o.push.apply(o,a||[]),s++,s===i&&n(o)}e.forEach(function(a){t(a,r)})}function rd(e,t,n){var o=0,s=e.length;function i(r){if(r&&r.length){n(r);return}var a=o;o=o+1,a<s?t(e[a],i):n([])}i([])}function Rx(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var ad=function(e){kx(t,e);function t(n,o){var s;return s=e.call(this,"Async Validation Error")||this,s.errors=n,s.fields=o,s}return t}(_l(Error));function Lx(e,t,n,o,s){if(t.first){var i=new Promise(function(f,p){var g=function(m){return o(m),m.length?p(new ad(m,wl(m))):f(s)},h=Rx(e);rd(h,n,g)});return i.catch(function(f){return f}),i}var r=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise(function(f,p){var g=function(v){if(u.push.apply(u,v),c++,c===l)return o(u),u.length?p(new ad(u,wl(u))):f(s)};a.length||(o(u),f(s)),a.forEach(function(h){var v=e[h];r.indexOf(h)!==-1?rd(v,n,g):Ax(v,n,g)})});return d.catch(function(f){return f}),d}function $x(e){return!!(e&&e.message!==void 0)}function Ix(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function ld(e,t){return function(n){var o;return e.fullFields?o=Ix(t,e.fullFields):o=t[n.field||e.fullField],$x(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function cd(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=Yo({},e[n],o):e[n]=o}}return e}var Gp=function(t,n,o,s,i,r){t.required&&(!o.hasOwnProperty(t.field)||pt(n,r||t.type))&&s.push(Xt(i.messages.required,t.fullField))},Fx=function(t,n,o,s,i){(/^\s+$/.test(n)||n==="")&&s.push(Xt(i.messages.whitespace,t.fullField))},cr,Dx=function(){if(cr)return cr;var e="[a-fA-F\\d:]",t=function(_){return _&&_.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",s=(`
    22(?:
    33(?:`+o+":){7}(?:"+o+`|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
     
    1010(?::(?:(?::`+o+"){0,5}:"+n+"|(?::"+o+`){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
    1111)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
    12 `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+s+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+s+"$"),l=function(_){return _&&_.exact?i:new RegExp("(?:"+t(_)+n+t(_)+")|(?:"+t(_)+s+t(_)+")","g")};l.v4=function(w){return w&&w.exact?r:new RegExp(""+t(w)+n+t(w),"g")},l.v6=function(w){return w&&w.exact?a:new RegExp(""+t(w)+s+t(w),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+f+"|"+p+g+h+")"+v+m;return cr=new RegExp("(?:^"+y+"$)","i"),cr},ud={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ri={integer:function(t){return ri.number(t)&&parseInt(t,10)===t},float:function(t){return ri.number(t)&&!ri.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ri.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(ud.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Dx())},hex:function(t){return typeof t=="string"&&!!t.match(ud.hex)}},Bx=function(t,n,o,s,i){if(t.required&&n===void 0){Gp(t,n,o,s,i);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;r.indexOf(a)>-1?ri[a](n)||s.push(Xt(i.messages.types[a],t.fullField,t.type)):a&&typeof n!==t.type&&s.push(Xt(i.messages.types[a],t.fullField,t.type))},Nx=function(t,n,o,s,i){var r=typeof t.len=="number",a=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",g=Array.isArray(n);if(f?d="number":p?d="string":g&&(d="array"),!d)return!1;g&&(u=n.length),p&&(u=n.replace(c,"_").length),r?u!==t.len&&s.push(Xt(i.messages[d].len,t.fullField,t.len)):a&&!l&&u<t.min?s.push(Xt(i.messages[d].min,t.fullField,t.min)):l&&!a&&u>t.max?s.push(Xt(i.messages[d].max,t.fullField,t.max)):a&&l&&(u<t.min||u>t.max)&&s.push(Xt(i.messages[d].range,t.fullField,t.min,t.max))},ps="enum",zx=function(t,n,o,s,i){t[ps]=Array.isArray(t[ps])?t[ps]:[],t[ps].indexOf(n)===-1&&s.push(Xt(i.messages[ps],t.fullField,t[ps].join(", ")))},Vx=function(t,n,o,s,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||s.push(Xt(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var r=new RegExp(t.pattern);r.test(n)||s.push(Xt(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Ie={required:Gp,whitespace:Fx,type:Bx,range:Nx,enum:zx,pattern:Vx},Hx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n,"string")&&!t.required)return o();Ie.required(t,n,s,r,i,"string"),pt(n,"string")||(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i),Ie.pattern(t,n,s,r,i),t.whitespace===!0&&Ie.whitespace(t,n,s,r,i))}o(r)},Wx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&Ie.type(t,n,s,r,i)}o(r)},jx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i))}o(r)},Kx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&Ie.type(t,n,s,r,i)}o(r)},Ux=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),pt(n)||Ie.type(t,n,s,r,i)}o(r)},qx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i))}o(r)},Yx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i))}o(r)},Gx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return o();Ie.required(t,n,s,r,i,"array"),n!=null&&(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i))}o(r)},Xx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&Ie.type(t,n,s,r,i)}o(r)},Qx="enum",Jx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&Ie[Qx](t,n,s,r,i)}o(r)},Zx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n,"string")&&!t.required)return o();Ie.required(t,n,s,r,i),pt(n,"string")||Ie.pattern(t,n,s,r,i)}o(r)},eS=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n,"date")&&!t.required)return o();if(Ie.required(t,n,s,r,i),!pt(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Ie.type(t,l,s,r,i),l&&Ie.range(t,l.getTime(),s,r,i)}}o(r)},tS=function(t,n,o,s,i){var r=[],a=Array.isArray(n)?"array":typeof n;Ie.required(t,n,s,r,i,a),o(r)},Ia=function(t,n,o,s,i){var r=t.type,a=[],l=t.required||!t.required&&s.hasOwnProperty(t.field);if(l){if(pt(n,r)&&!t.required)return o();Ie.required(t,n,s,a,i,r),pt(n,r)||Ie.type(t,n,s,a,i)}o(a)},nS=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i)}o(r)},mi={string:Hx,method:Wx,number:jx,boolean:Kx,regexp:Ux,integer:qx,float:Yx,array:Gx,object:Xx,enum:Jx,pattern:Zx,date:eS,url:Ia,hex:Ia,email:Ia,required:tS,any:nS};function xl(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Sl=xl(),tr=function(){function e(n){this.rules=null,this._messages=Sl,this.define(n)}var t=e.prototype;return t.define=function(o){var s=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(i){var r=o[i];s.rules[i]=Array.isArray(r)?r:[r]})},t.messages=function(o){return o&&(this._messages=cd(xl(),o)),this._messages},t.validate=function(o,s,i){var r=this;s===void 0&&(s={}),i===void 0&&(i=function(){});var a=o,l=s,c=i;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(h){var v=[],m={};function y(_){if(Array.isArray(_)){var x;v=(x=v).concat.apply(x,_)}else v.push(_)}for(var w=0;w<h.length;w++)y(h[w]);v.length?(m=wl(v),c(v,m)):c(null,a)}if(l.messages){var d=this.messages();d===Sl&&(d=xl()),cd(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},p=l.keys||Object.keys(this.rules);p.forEach(function(h){var v=r.rules[h],m=a[h];v.forEach(function(y){var w=y;typeof w.transform=="function"&&(a===o&&(a=Yo({},a)),m=a[h]=w.transform(m)),typeof w=="function"?w={validator:w}:w=Yo({},w),w.validator=r.getValidationMethod(w),w.validator&&(w.field=h,w.fullField=w.fullField||h,w.type=r.getType(w),f[h]=f[h]||[],f[h].push({rule:w,value:m,source:a,field:h}))})});var g={};return Lx(f,l,function(h,v){var m=h.rule,y=(m.type==="object"||m.type==="array")&&(typeof m.fields=="object"||typeof m.defaultField=="object");y=y&&(m.required||!m.required&&h.value),m.field=h.field;function w(S,C){return Yo({},C,{fullField:m.fullField+"."+S,fullFields:m.fullFields?[].concat(m.fullFields,[S]):[S]})}function _(S){S===void 0&&(S=[]);var C=Array.isArray(S)?S:[S];!l.suppressWarning&&C.length&&e.warning("async-validator:",C),C.length&&m.message!==void 0&&(C=[].concat(m.message));var k=C.map(ld(m,a));if(l.first&&k.length)return g[m.field]=1,v(k);if(!y)v(k);else{if(m.required&&!h.value)return m.message!==void 0?k=[].concat(m.message).map(ld(m,a)):l.error&&(k=[l.error(m,Xt(l.messages.required,m.field))]),v(k);var T={};m.defaultField&&Object.keys(h.value).map(function(D){T[D]=m.defaultField}),T=Yo({},T,h.rule.fields);var B={};Object.keys(T).forEach(function(D){var W=T[D],ne=Array.isArray(W)?W:[W];B[D]=ne.map(w.bind(null,D))});var $=new e(B);$.messages(l.messages),h.rule.options&&(h.rule.options.messages=l.messages,h.rule.options.error=l.error),$.validate(h.value,h.rule.options||l,function(D){var W=[];k&&k.length&&W.push.apply(W,k),D&&D.length&&W.push.apply(W,D),v(W.length?W:null)})}}var x;if(m.asyncValidator)x=m.asyncValidator(m,h.value,_,h.source,l);else if(m.validator){try{x=m.validator(m,h.value,_,h.source,l)}catch(S){console.error==null||console.error(S),l.suppressValidatorError||setTimeout(function(){throw S},0),_(S.message)}x===!0?_():x===!1?_(typeof m.message=="function"?m.message(m.fullField||m.field):m.message||(m.fullField||m.field)+" fails"):x instanceof Array?_(x):x instanceof Error&&_(x.message)}x&&x.then&&x.then(function(){return _()},function(S){return _(S)})},function(h){u(h)},a)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!mi.hasOwnProperty(o.type))throw new Error(Xt("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var s=Object.keys(o),i=s.indexOf("message");return i!==-1&&s.splice(i,1),s.length===1&&s[0]==="required"?mi.required:mi[this.getType(o)]||void 0},e}();tr.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");mi[t]=n};tr.warning=Tx;tr.messages=Sl;tr.validators=mi;const oS=["","error","validating","success"],sS=ke({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:ye([String,Array])},required:{type:Boolean,default:void 0},rules:{type:ye([Object,Array])},error:String,validateStatus:{type:String,values:oS},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Vs}}),dd="ElLabelWrap";var iS=Y({name:dd,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=we(js,void 0),o=we(as);o||Ro(dd,"usage: <el-form-item><label-wrap /></el-form-item>");const s=he("form"),i=A(),r=A(0),a=()=>{var u;if((u=i.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(u="update")=>{xe(()=>{t.default&&e.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Be(()=>{c()}),Pt(()=>{l("remove")}),ma(()=>c()),se(r,(u,d)=>{e.updateAll&&(n==null||n.registerLabelWidth(u,d))}),In(P(()=>{var u,d;return(d=(u=i.value)==null?void 0:u.firstElementChild)!=null?d:null}),c),()=>{var u,d;if(!t)return null;const{isAutoWidth:f}=e;if(f){const p=n==null?void 0:n.autoLabelWidth,g=o==null?void 0:o.hasLabel,h={};if(g&&p&&p!=="auto"){const v=Math.max(0,Number.parseInt(p,10)-r.value),m=n.labelPosition==="left"?"marginRight":"marginLeft";v&&(h[m]=`${v}px`)}return L("div",{ref:i,class:[s.be("item","label-wrap")],style:h},[(u=t.default)==null?void 0:u.call(t)])}else return L(Ge,{ref:i},[(d=t.default)==null?void 0:d.call(t)])}}});const rS=["role","aria-labelledby"],aS=Y({name:"ElFormItem"}),lS=Y({...aS,props:sS,setup(e,{expose:t}){const n=e,o=Hs(),s=we(js,void 0),i=we(as,void 0),r=cn(void 0,{formItem:!1}),a=he("form-item"),l=Rs().value,c=A([]),u=A(""),d=Rv(u,100),f=A(""),p=A();let g,h=!1;const v=P(()=>{if((s==null?void 0:s.labelPosition)==="top")return{};const O=$n(n.labelWidth||(s==null?void 0:s.labelWidth)||"");return O?{width:O}:{}}),m=P(()=>{if((s==null?void 0:s.labelPosition)==="top"||(s==null?void 0:s.inline))return{};if(!n.label&&!n.labelWidth&&T)return{};const O=$n(n.labelWidth||(s==null?void 0:s.labelWidth)||"");return!n.label&&!o.label?{marginLeft:O}:{}}),y=P(()=>[a.b(),a.m(r.value),a.is("error",u.value==="error"),a.is("validating",u.value==="validating"),a.is("success",u.value==="success"),a.is("required",ne.value||n.required),a.is("no-asterisk",s==null?void 0:s.hideRequiredAsterisk),(s==null?void 0:s.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:s==null?void 0:s.statusIcon}]),w=P(()=>Nt(n.inlineMessage)?n.inlineMessage:(s==null?void 0:s.inlineMessage)||!1),_=P(()=>[a.e("error"),{[a.em("error","inline")]:w.value}]),x=P(()=>n.prop?st(n.prop)?n.prop:n.prop.join("."):""),S=P(()=>!!(n.label||o.label)),C=P(()=>n.for||c.value.length===1?c.value[0]:void 0),k=P(()=>!C.value&&S.value),T=!!i,B=P(()=>{const O=s==null?void 0:s.model;if(!(!O||!n.prop))return Or(O,n.prop).value}),$=P(()=>{const{required:O}=n,H=[];n.rules&&H.push(...cl(n.rules));const K=s==null?void 0:s.rules;if(K&&n.prop){const te=Or(K,n.prop).value;te&&H.push(...cl(te))}if(O!==void 0){const te=H.map((ge,Le)=>[ge,Le]).filter(([ge])=>Object.keys(ge).includes("required"));if(te.length>0)for(const[ge,Le]of te)ge.required!==O&&(H[Le]={...ge,required:O});else H.push({required:O})}return H}),D=P(()=>$.value.length>0),W=O=>$.value.filter(K=>!K.trigger||!O?!0:Array.isArray(K.trigger)?K.trigger.includes(O):K.trigger===O).map(({trigger:K,...te})=>te),ne=P(()=>$.value.some(O=>O.required)),j=P(()=>{var O;return d.value==="error"&&n.showMessage&&((O=s==null?void 0:s.showMessage)!=null?O:!0)}),Q=P(()=>`${n.label||""}${(s==null?void 0:s.labelSuffix)||""}`),V=O=>{u.value=O},le=O=>{var H,K;const{errors:te,fields:ge}=O;(!te||!ge)&&console.error(O),V("error"),f.value=te?(K=(H=te==null?void 0:te[0])==null?void 0:H.message)!=null?K:`${n.prop} is required`:"",s==null||s.emit("validate",n.prop,!1,f.value)},I=()=>{V("success"),s==null||s.emit("validate",n.prop,!0,"")},Z=async O=>{const H=x.value;return new tr({[H]:O}).validate({[H]:B.value},{firstFields:!0}).then(()=>(I(),!0)).catch(te=>(le(te),Promise.reject(te)))},de=async(O,H)=>{if(h||!n.prop)return!1;const K=mt(H);if(!D.value)return H==null||H(!1),!1;const te=W(O);return te.length===0?(H==null||H(!0),!0):(V("validating"),Z(te).then(()=>(H==null||H(!0),!0)).catch(ge=>{const{fields:Le}=ge;return H==null||H(!1,Le),K?!1:Promise.reject(Le)}))},J=()=>{V(""),f.value="",h=!1},G=async()=>{const O=s==null?void 0:s.model;if(!O||!n.prop)return;const H=Or(O,n.prop);h=!0,H.value=Hu(g),await xe(),J(),h=!1},U=O=>{c.value.includes(O)||c.value.push(O)},re=O=>{c.value=c.value.filter(H=>H!==O)};se(()=>n.error,O=>{f.value=O||"",V(O?"error":"")},{immediate:!0}),se(()=>n.validateStatus,O=>V(O||""));const ie=Ht({...lo(n),$el:p,size:r,validateState:u,labelId:l,inputIds:c,isGroup:k,hasLabel:S,addInputId:U,removeInputId:re,resetField:G,clearValidate:J,validate:de});return rt(as,ie),Be(()=>{n.prop&&(s==null||s.addField(ie),g=Hu(B.value))}),Pt(()=>{s==null||s.removeField(ie)}),t({size:r,validateMessage:f,validateState:u,validate:de,clearValidate:J,resetField:G}),(O,H)=>{var K;return M(),N("div",{ref_key:"formItemRef",ref:p,class:R(b(y)),role:b(k)?"group":void 0,"aria-labelledby":b(k)?b(l):void 0},[L(b(iS),{"is-auto-width":b(v).width==="auto","update-all":((K=b(s))==null?void 0:K.labelWidth)==="auto"},{default:F(()=>[b(S)?(M(),q(Ue(b(C)?"label":"div"),{key:0,id:b(l),for:b(C),class:R(b(a).e("label")),style:Te(b(v))},{default:F(()=>[me(O.$slots,"label",{label:b(Q)},()=>[fe(ce(b(Q)),1)])]),_:3},8,["id","for","class","style"])):X("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),E("div",{class:R(b(a).e("content")),style:Te(b(m))},[me(O.$slots,"default"),L(Lv,{name:`${b(a).namespace.value}-zoom-in-top`},{default:F(()=>[b(j)?me(O.$slots,"error",{key:0,error:f.value},()=>[E("div",{class:R(b(_))},ce(f.value),3)]):X("v-if",!0)]),_:3},8,["name"])],6)],10,rS)}}});var Xp=ve(lS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const Lc=dt(Cx,{FormItem:Xp}),$c=un(Xp);let fn;const cS=`
     12`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+s+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+s+"$"),l=function(_){return _&&_.exact?i:new RegExp("(?:"+t(_)+n+t(_)+")|(?:"+t(_)+s+t(_)+")","g")};l.v4=function(w){return w&&w.exact?r:new RegExp(""+t(w)+n+t(w),"g")},l.v6=function(w){return w&&w.exact?a:new RegExp(""+t(w)+s+t(w),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+f+"|"+p+g+h+")"+v+m;return cr=new RegExp("(?:^"+y+"$)","i"),cr},ud={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ri={integer:function(t){return ri.number(t)&&parseInt(t,10)===t},float:function(t){return ri.number(t)&&!ri.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ri.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(ud.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Dx())},hex:function(t){return typeof t=="string"&&!!t.match(ud.hex)}},Bx=function(t,n,o,s,i){if(t.required&&n===void 0){Gp(t,n,o,s,i);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;r.indexOf(a)>-1?ri[a](n)||s.push(Xt(i.messages.types[a],t.fullField,t.type)):a&&typeof n!==t.type&&s.push(Xt(i.messages.types[a],t.fullField,t.type))},Nx=function(t,n,o,s,i){var r=typeof t.len=="number",a=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",g=Array.isArray(n);if(f?d="number":p?d="string":g&&(d="array"),!d)return!1;g&&(u=n.length),p&&(u=n.replace(c,"_").length),r?u!==t.len&&s.push(Xt(i.messages[d].len,t.fullField,t.len)):a&&!l&&u<t.min?s.push(Xt(i.messages[d].min,t.fullField,t.min)):l&&!a&&u>t.max?s.push(Xt(i.messages[d].max,t.fullField,t.max)):a&&l&&(u<t.min||u>t.max)&&s.push(Xt(i.messages[d].range,t.fullField,t.min,t.max))},ps="enum",zx=function(t,n,o,s,i){t[ps]=Array.isArray(t[ps])?t[ps]:[],t[ps].indexOf(n)===-1&&s.push(Xt(i.messages[ps],t.fullField,t[ps].join(", ")))},Vx=function(t,n,o,s,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||s.push(Xt(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var r=new RegExp(t.pattern);r.test(n)||s.push(Xt(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Ie={required:Gp,whitespace:Fx,type:Bx,range:Nx,enum:zx,pattern:Vx},Hx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n,"string")&&!t.required)return o();Ie.required(t,n,s,r,i,"string"),pt(n,"string")||(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i),Ie.pattern(t,n,s,r,i),t.whitespace===!0&&Ie.whitespace(t,n,s,r,i))}o(r)},Wx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&Ie.type(t,n,s,r,i)}o(r)},jx=function(t,n,o,s,i){var r=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),pt(n)&&!t.required)return o();Ie.required(t,n,s,r,i),n!==void 0&&(Ie.type(t,n,s,r,i),Ie.range(t,n,s,r,i))}o(r)},e(b(C)?"label":"div"),{key:0,id:b(l),for:b(C),class:R(b(a).e("label")),style:Te(b(v))},{default:F(()=>[me(O.$slots,"label",{label:b(Q)},()=>[fe(ce(b(Q)),1)])]),_:3},8,["id","for","class","style"])):X("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),E("div",{class:R(b(a).e("content")),style:Te(b(m))},[me(O.$slots,"default"),L(Lv,{name:`${b(a).namespace.value}-zoom-in-top`},{default:F(()=>[b(j)?me(O.$slots,"error",{key:0,error:f.value},()=>[E("div",{class:R(b(_))},ce(f.value),3)]):X("v-if",!0)]),_:3},8,["name"])],6)],10,rS)}}});var Xp=ve(lS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const Lc=dt(Cx,{FormItem:Xp}),$c=un(Xp);let fn;const cS=`
    1313  height:0 !important;
    1414  visibility:hidden !important;
     
    1818  top:0 !important;
    1919  right:0 !important;
    20 `,uS=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function dS(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:uS.map(r=>`${r}:${t.getPropertyValue(r)}`).join(";"),paddingSize:o,borderSize:s,boxSizing:n}}function fd(e,t=1,n){var o;fn||(fn=document.createElement("textarea"),document.body.appendChild(fn));const{paddingSize:s,borderSize:i,boxSizing:r,contextStyle:a}=dS(e);fn.setAttribute("style",`${a};${cS}`),fn.value=e.value||e.placeholder||"";let l=fn.scrollHeight;const c={};r==="border-box"?l=l+i:r==="content-box"&&(l=l-s),fn.value="";const u=fn.scrollHeight-s;if(He(t)){let d=u*t;r==="border-box"&&(d=d+s+i),l=Math.max(d,l),c.minHeight=`${d}px`}if(He(n)){let d=u*n;r==="border-box"&&(d=d+s+i),l=Math.min(d,l)}return c.height=`${l}px`,(o=fn.parentNode)==null||o.removeChild(fn),fn=void 0,c}const fS=ke({id:{type:String,default:void 0},size:ao,disabled:Boolean,modelValue:{type:ye([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ye([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:yt},prefixIcon:{type:yt},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ye([Object,Array,String]),default:()=>pn({})},autofocus:{type:Boolean,default:!1}}),hS={[Je]:e=>st(e),input:e=>st(e),change:e=>st(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},pS=["role"],gS=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],mS=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],vS=Y({name:"ElInput",inheritAttrs:!1}),bS=Y({...vS,props:fS,emits:hS,setup(e,{expose:t,emit:n}){const o=e,s=$v(),i=Hs(),r=P(()=>{const oe={};return o.containerRole==="combobox"&&(oe["aria-haspopup"]=s["aria-haspopup"],oe["aria-owns"]=s["aria-owns"],oe["aria-expanded"]=s["aria-expanded"]),oe}),a=P(()=>[o.type==="textarea"?v.b():h.b(),h.m(p.value),h.is("disabled",g.value),h.is("exceed",U.value),{[h.b("group")]:i.prepend||i.append,[h.bm("group","append")]:i.append,[h.bm("group","prepend")]:i.prepend,[h.m("prefix")]:i.prefix||o.prefixIcon,[h.m("suffix")]:i.suffix||o.suffixIcon||o.clearable||o.showPassword,[h.bm("suffix","password-clear")]:Z.value&&de.value},s.class]),l=P(()=>[h.e("wrapper"),h.is("focus",B.value)]),c=Xw({excludeKeys:P(()=>Object.keys(r.value))}),{form:u,formItem:d}=co(),{inputId:f}=Ks(o,{formItemContext:d}),p=cn(),g=fs(),h=he("input"),v=he("textarea"),m=bn(),y=bn(),w=A(!1),_=A(!1),x=A(!1),S=A(),C=bn(o.inputStyle),k=P(()=>m.value||y.value),{wrapperRef:T,isFocused:B,handleFocus:$,handleBlur:D}=gx(k,{afterBlur(){var oe;o.validateEvent&&((oe=d==null?void 0:d.validate)==null||oe.call(d,"blur").catch(be=>void 0))}}),W=P(()=>{var oe;return(oe=u==null?void 0:u.statusIcon)!=null?oe:!1}),ne=P(()=>(d==null?void 0:d.validateState)||""),j=P(()=>ne.value&&Vh[ne.value]),Q=P(()=>x.value?uc:Iv),V=P(()=>[s.style,o.inputStyle]),le=P(()=>[o.inputStyle,C.value,{resize:o.resize}]),I=P(()=>es(o.modelValue)?"":String(o.modelValue)),Z=P(()=>o.clearable&&!g.value&&!o.readonly&&!!I.value&&(B.value||w.value)),de=P(()=>o.showPassword&&!g.value&&!o.readonly&&!!I.value&&(!!I.value||B.value)),J=P(()=>o.showWordLimit&&!!c.value.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),G=P(()=>I.value.length),U=P(()=>!!J.value&&G.value>Number(c.value.maxlength)),re=P(()=>!!i.suffix||!!o.suffixIcon||Z.value||o.showPassword||J.value||!!ne.value&&W.value),[ie,O]=hx(m);In(y,oe=>{if(te(),!J.value||o.resize!=="both")return;const be=oe[0],{width:qe}=be.contentRect;S.value={right:`calc(100% - ${qe+15+6}px)`}});const H=()=>{const{type:oe,autosize:be}=o;if(!(!ot||oe!=="textarea"||!y.value))if(be){const qe=wn(be)?be.minRows:void 0,Ut=wn(be)?be.maxRows:void 0,Vn=fd(y.value,qe,Ut);C.value={overflowY:"hidden",...Vn},xe(()=>{y.value.offsetHeight,C.value=Vn})}else C.value={minHeight:fd(y.value).minHeight}},te=(oe=>{let be=!1;return()=>{var qe;if(be||!o.autosize)return;((qe=y.value)==null?void 0:qe.offsetParent)===null||(oe(),be=!0)}})(H),ge=()=>{const oe=k.value,be=o.formatter?o.formatter(I.value):I.value;!oe||oe.value===be||(oe.value=be)},Le=async oe=>{ie();let{value:be}=oe.target;if(o.formatter&&(be=o.parser?o.parser(be):be),!_.value){if(be===I.value){ge();return}n(Je,be),n("input",be),await xe(),ge(),O()}},Ee=oe=>{n("change",oe.target.value)},_e=oe=>{n("compositionstart",oe),_.value=!0},Ve=oe=>{var be;n("compositionupdate",oe);const qe=(be=oe.target)==null?void 0:be.value,Ut=qe[qe.length-1]||"";_.value=!Tp(Ut)},gt=oe=>{n("compositionend",oe),_.value&&(_.value=!1,Le(oe))},Ye=()=>{x.value=!x.value,jt()},jt=async()=>{var oe;await xe(),(oe=k.value)==null||oe.focus()},zn=()=>{var oe;return(oe=k.value)==null?void 0:oe.blur()},Tt=oe=>{w.value=!1,n("mouseleave",oe)},Zt=oe=>{w.value=!0,n("mouseenter",oe)},Kt=oe=>{n("keydown",oe)},En=()=>{var oe;(oe=k.value)==null||oe.select()},en=()=>{n(Je,""),n("change",""),n("clear"),n("input","")};return se(()=>o.modelValue,()=>{var oe;xe(()=>H()),o.validateEvent&&((oe=d==null?void 0:d.validate)==null||oe.call(d,"change").catch(be=>void 0))}),se(I,()=>ge()),se(()=>o.type,async()=>{await xe(),ge(),H()}),Be(()=>{!o.formatter&&o.parser,ge(),xe(H)}),t({input:m,textarea:y,ref:k,textareaStyle:le,autosize:nn(o,"autosize"),focus:jt,blur:zn,select:En,clear:en,resizeTextarea:H}),(oe,be)=>We((M(),N("div",On(b(r),{class:b(a),style:b(V),role:oe.containerRole,onMouseenter:Zt,onMouseleave:Tt}),[X(" input "),oe.type!=="textarea"?(M(),N(Ge,{key:0},[X(" prepend slot "),oe.$slots.prepend?(M(),N("div",{key:0,class:R(b(h).be("group","prepend"))},[me(oe.$slots,"prepend")],2)):X("v-if",!0),E("div",{ref_key:"wrapperRef",ref:T,class:R(b(l))},[X(" prefix slot "),oe.$slots.prefix||oe.prefixIcon?(M(),N("span",{key:0,class:R(b(h).e("prefix"))},[E("span",{class:R(b(h).e("prefix-inner"))},[me(oe.$slots,"prefix"),oe.prefixIcon?(M(),q(b($e),{key:0,class:R(b(h).e("icon"))},{default:F(()=>[(M(),q(Ue(oe.prefixIcon)))]),_:1},8,["class"])):X("v-if",!0)],2)],2)):X("v-if",!0),E("input",On({id:b(f),ref_key:"input",ref:m,class:b(h).e("inner")},b(c),{type:oe.showPassword?x.value?"text":"password":oe.type,disabled:b(g),formatter:oe.formatter,parser:oe.parser,readonly:oe.readonly,autocomplete:oe.autocomplete,tabindex:oe.tabindex,"aria-label":oe.label,placeholder:oe.placeholder,style:oe.inputStyle,form:o.form,autofocus:o.autofocus,onCompositionstart:_e,onCompositionupdate:Ve,onCompositionend:gt,onInput:Le,onFocus:be[0]||(be[0]=(...qe)=>b($)&&b($)(...qe)),onBlur:be[1]||(be[1]=(...qe)=>b(D)&&b(D)(...qe)),onChange:Ee,onKeydown:Kt}),null,16,gS),X(" suffix slot "),b(re)?(M(),N("span",{key:1,class:R(b(h).e("suffix"))},[E("span",{class:R(b(h).e("suffix-inner"))},[!b(Z)||!b(de)||!b(J)?(M(),N(Ge,{key:0},[me(oe.$slots,"suffix"),oe.suffixIcon?(M(),q(b($e),{key:0,class:R(b(h).e("icon"))},{default:F(()=>[(M(),q(Ue(oe.suffixIcon)))]),_:1},8,["class"])):X("v-if",!0)],64)):X("v-if",!0),b(Z)?(M(),q(b($e),{key:1,class:R([b(h).e("icon"),b(h).e("clear")]),onMousedown:et(b(Zo),["prevent"]),onClick:en},{default:F(()=>[L(b(zh))]),_:1},8,["class","onMousedown"])):X("v-if",!0),b(de)?(M(),q(b($e),{key:2,class:R([b(h).e("icon"),b(h).e("password")]),onClick:Ye},{default:F(()=>[(M(),q(Ue(b(Q))))]),_:1},8,["class"])):X("v-if",!0),b(J)?(M(),N("span",{key:3,class:R(b(h).e("count"))},[E("span",{class:R(b(h).e("count-inner"))},ce(b(G))+" / "+ce(b(c).maxlength),3)],2)):X("v-if",!0),b(ne)&&b(j)&&b(W)?(M(),q(b($e),{key:4,class:R([b(h).e("icon"),b(h).e("validateIcon"),b(h).is("loading",b(ne)==="validating")])},{default:F(()=>[(M(),q(Ue(b(j))))]),_:1},8,["class"])):X("v-if",!0)],2)],2)):X("v-if",!0)],2),X(" append slot "),oe.$slots.append?(M(),N("div",{key:1,class:R(b(h).be("group","append"))},[me(oe.$slots,"append")],2)):X("v-if",!0)],64)):(M(),N(Ge,{key:1},[X(" textarea "),E("textarea",On({id:b(f),ref_key:"textarea",ref:y,class:b(v).e("inner")},b(c),{tabindex:oe.tabindex,disabled:b(g),readonly:oe.readonly,autocomplete:oe.autocomplete,style:b(le),"aria-label":oe.label,placeholder:oe.placeholder,form:o.form,autofocus:o.autofocus,onCompositionstart:_e,onCompositionupdate:Ve,onCompositionend:gt,onInput:Le,onFocus:be[2]||(be[2]=(...qe)=>b($)&&b($)(...qe)),onBlur:be[3]||(be[3]=(...qe)=>b(D)&&b(D)(...qe)),onChange:Ee,onKeydown:Kt}),null,16,mS),b(J)?(M(),N("span",{key:0,style:Te(S.value),class:R(b(h).e("count"))},ce(b(G))+" / "+ce(b(c).maxlength),7)):X("v-if",!0)],64))],16,pS)),[[Et,oe.type!=="hidden"]])}});var yS=ve(bS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const $o=dt(yS),_s=4,_S={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},wS=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),Qp=Symbol("scrollbarContextKey"),xS=ke({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),SS="Thumb",CS=Y({__name:"thumb",props:xS,setup(e){const t=e,n=we(Qp),o=he("scrollbar");n||Ro(SS,"can not inject scrollbar context");const s=A(),i=A(),r=A({}),a=A(!1);let l=!1,c=!1,u=ot?document.onselectstart:null;const d=P(()=>_S[t.vertical?"vertical":"horizontal"]),f=P(()=>wS({size:t.size,move:t.move,bar:d.value})),p=P(()=>s.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/t.ratio/i.value[d.value.offset]),g=S=>{var C;if(S.stopPropagation(),S.ctrlKey||[1,2].includes(S.button))return;(C=window.getSelection())==null||C.removeAllRanges(),v(S);const k=S.currentTarget;!k||(r.value[d.value.axis]=k[d.value.offset]-(S[d.value.client]-k.getBoundingClientRect()[d.value.direction]))},h=S=>{if(!i.value||!s.value||!n.wrapElement)return;const C=Math.abs(S.target.getBoundingClientRect()[d.value.direction]-S[d.value.client]),k=i.value[d.value.offset]/2,T=(C-k)*100*p.value/s.value[d.value.offset];n.wrapElement[d.value.scroll]=T*n.wrapElement[d.value.scrollSize]/100},v=S=>{S.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",y),u=document.onselectstart,document.onselectstart=()=>!1},m=S=>{if(!s.value||!i.value||l===!1)return;const C=r.value[d.value.axis];if(!C)return;const k=(s.value.getBoundingClientRect()[d.value.direction]-S[d.value.client])*-1,T=i.value[d.value.offset]-C,B=(k-T)*100*p.value/s.value[d.value.offset];n.wrapElement[d.value.scroll]=B*n.wrapElement[d.value.scrollSize]/100},y=()=>{l=!1,r.value[d.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),x(),c&&(a.value=!1)},w=()=>{c=!1,a.value=!!t.size},_=()=>{c=!0,a.value=l};Pt(()=>{x(),document.removeEventListener("mouseup",y)});const x=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return is(nn(n,"scrollbarElement"),"mousemove",w),is(nn(n,"scrollbarElement"),"mouseleave",_),(S,C)=>(M(),q(Mo,{name:b(o).b("fade"),persisted:""},{default:F(()=>[We(E("div",{ref_key:"instance",ref:s,class:R([b(o).e("bar"),b(o).is(b(d).key)]),onMousedown:h},[E("div",{ref_key:"thumb",ref:i,class:R(b(o).e("thumb")),style:Te(b(f)),onMousedown:g},null,38)],34),[[Et,S.always||a.value]])]),_:1},8,["name"]))}});var hd=ve(CS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const kS=ke({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}}),ES=Y({__name:"bar",props:kS,setup(e,{expose:t}){const n=e,o=A(0),s=A(0);return t({handleScroll:r=>{if(r){const a=r.offsetHeight-_s,l=r.offsetWidth-_s;s.value=r.scrollTop*100/a*n.ratioY,o.value=r.scrollLeft*100/l*n.ratioX}}}),(r,a)=>(M(),N(Ge,null,[L(hd,{move:o.value,ratio:r.ratioX,size:r.width,always:r.always},null,8,["move","ratio","size","always"]),L(hd,{move:s.value,ratio:r.ratioY,size:r.height,vertical:"",always:r.always},null,8,["move","ratio","size","always"])],64))}});var MS=ve(ES,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const PS=ke({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:ye([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),TS={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(He)},OS="ElScrollbar",AS=Y({name:OS}),RS=Y({...AS,props:PS,emits:TS,setup(e,{expose:t,emit:n}){const o=e,s=he("scrollbar");let i,r;const a=A(),l=A(),c=A(),u=A("0"),d=A("0"),f=A(),p=A(1),g=A(1),h=P(()=>{const C={};return o.height&&(C.height=$n(o.height)),o.maxHeight&&(C.maxHeight=$n(o.maxHeight)),[o.wrapStyle,C]}),v=P(()=>[o.wrapClass,s.e("wrap"),{[s.em("wrap","hidden-default")]:!o.native}]),m=P(()=>[s.e("view"),o.viewClass]),y=()=>{var C;l.value&&((C=f.value)==null||C.handleScroll(l.value),n("scroll",{scrollTop:l.value.scrollTop,scrollLeft:l.value.scrollLeft}))};function w(C,k){wn(C)?l.value.scrollTo(C):He(C)&&He(k)&&l.value.scrollTo(C,k)}const _=C=>{!He(C)||(l.value.scrollTop=C)},x=C=>{!He(C)||(l.value.scrollLeft=C)},S=()=>{if(!l.value)return;const C=l.value.offsetHeight-_s,k=l.value.offsetWidth-_s,T=C**2/l.value.scrollHeight,B=k**2/l.value.scrollWidth,$=Math.max(T,o.minSize),D=Math.max(B,o.minSize);p.value=T/(C-T)/($/(C-$)),g.value=B/(k-B)/(D/(k-D)),d.value=$+_s<C?`${$}px`:"",u.value=D+_s<k?`${D}px`:""};return se(()=>o.noresize,C=>{C?(i==null||i(),r==null||r()):({stop:i}=In(c,S),r=is("resize",S))},{immediate:!0}),se(()=>[o.maxHeight,o.height],()=>{o.native||xe(()=>{var C;S(),l.value&&((C=f.value)==null||C.handleScroll(l.value))})}),rt(Qp,Ht({scrollbarElement:a,wrapElement:l})),Be(()=>{o.native||xe(()=>{S()})}),ma(()=>S()),t({wrapRef:l,update:S,scrollTo:w,setScrollTop:_,setScrollLeft:x,handleScroll:y}),(C,k)=>(M(),N("div",{ref_key:"scrollbarRef",ref:a,class:R(b(s).b())},[E("div",{ref_key:"wrapRef",ref:l,class:R(b(v)),style:Te(b(h)),onScroll:y},[(M(),q(Ue(C.tag),{ref_key:"resizeRef",ref:c,class:R(b(m)),style:Te(C.viewStyle)},{default:F(()=>[me(C.$slots,"default")]),_:3},8,["class","style"]))],38),C.native?X("v-if",!0):(M(),q(MS,{key:0,ref_key:"barRef",ref:f,height:d.value,width:u.value,always:C.always,"ratio-x":g.value,"ratio-y":p.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var LS=ve(RS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const Ic=dt(LS),Fc=Symbol("popper"),Jp=Symbol("popperContent"),$S=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],Zp=ke({role:{type:String,values:$S,default:"tooltip"}}),IS=Y({name:"ElPopper",inheritAttrs:!1}),FS=Y({...IS,props:Zp,setup(e,{expose:t}){const n=e,o=A(),s=A(),i=A(),r=A(),a=P(()=>n.role),l={triggerRef:o,popperInstanceRef:s,contentRef:i,referenceRef:r,role:a};return t(l),rt(Fc,l),(c,u)=>me(c.$slots,"default")}});var DS=ve(FS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const eg=ke({arrowOffset:{type:Number,default:5}}),BS=Y({name:"ElPopperArrow",inheritAttrs:!1}),NS=Y({...BS,props:eg,setup(e,{expose:t}){const n=e,o=he("popper"),{arrowOffset:s,arrowRef:i,arrowStyle:r}=we(Jp,void 0);return se(()=>n.arrowOffset,a=>{s.value=a}),Pt(()=>{i.value=void 0}),t({arrowRef:i}),(a,l)=>(M(),N("span",{ref_key:"arrowRef",ref:i,class:R(b(o).e("arrow")),style:Te(b(r)),"data-popper-arrow":""},null,6))}});var zS=ve(NS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const VS="ElOnlyChild",HS=Y({name:VS,setup(e,{slots:t,attrs:n}){var o;const s=we(qp),i=fx((o=s==null?void 0:s.setForwardRef)!=null?o:Zo);return()=>{var r;const a=(r=t.default)==null?void 0:r.call(t,n);if(!a||a.length>1)return null;const l=tg(a);return l?We(Fv(l,n),[[i]]):null}}});function tg(e){if(!e)return null;const t=e;for(const n of t){if(wn(n))switch(n.type){case Wh:continue;case Hh:case"svg":return pd(n);case Ge:return tg(n.children);default:return n}return pd(n)}return null}function pd(e){const t=he("only-child");return L("span",{class:t.e("content")},[e])}const ng=ke({virtualRef:{type:ye(Object)},virtualTriggering:Boolean,onMouseenter:{type:ye(Function)},onMouseleave:{type:ye(Function)},onClick:{type:ye(Function)},onKeydown:{type:ye(Function)},onFocus:{type:ye(Function)},onBlur:{type:ye(Function)},onContextmenu:{type:ye(Function)},id:String,open:Boolean}),WS=Y({name:"ElPopperTrigger",inheritAttrs:!1}),jS=Y({...WS,props:ng,setup(e,{expose:t}){const n=e,{role:o,triggerRef:s}=we(Fc,void 0);dx(s);const i=P(()=>a.value?n.id:void 0),r=P(()=>{if(o&&o.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=P(()=>{if(o&&o.value!=="tooltip")return o.value}),l=P(()=>a.value?`${n.open}`:void 0);let c;return Be(()=>{se(()=>n.virtualRef,u=>{u&&(s.value=jh(u))},{immediate:!0}),se(s,(u,d)=>{c==null||c(),c=void 0,oo(u)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(f=>{var p;const g=n[f];g&&(u.addEventListener(f.slice(2).toLowerCase(),g),(p=d==null?void 0:d.removeEventListener)==null||p.call(d,f.slice(2).toLowerCase(),g))}),c=se([i,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,g)=>{es(f[g])?u.removeAttribute(p):u.setAttribute(p,f[g])})},{immediate:!0})),oo(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>d.removeAttribute(f))},{immediate:!0})}),Pt(()=>{c==null||c(),c=void 0}),t({triggerRef:s}),(u,d)=>u.virtualTriggering?X("v-if",!0):(M(),q(b(HS),On({key:0},u.$attrs,{"aria-controls":b(i),"aria-describedby":b(r),"aria-expanded":b(l),"aria-haspopup":b(a)}),{default:F(()=>[me(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var KS=ve(jS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const Fa="focus-trap.focus-after-trapped",Da="focus-trap.focus-after-released",US="focus-trap.focusout-prevented",gd={cancelable:!0,bubbles:!1},qS={cancelable:!0,bubbles:!1},md="focusAfterTrapped",vd="focusAfterReleased",YS=Symbol("elFocusTrap"),Dc=A(),xa=A(0),Bc=A(0);let ur=0;const og=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},bd=(e,t)=>{for(const n of e)if(!GS(n,t))return n},GS=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},XS=e=>{const t=og(e),n=bd(t,e),o=bd(t.reverse(),e);return[n,o]},QS=e=>e instanceof HTMLInputElement&&"select"in e,po=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),Bc.value=window.performance.now(),e!==n&&QS(e)&&t&&e.select()}};function yd(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const JS=()=>{let e=[];return{push:o=>{const s=e[0];s&&o!==s&&s.pause(),e=yd(e,o),e.unshift(o)},remove:o=>{var s,i;e=yd(e,o),(i=(s=e[0])==null?void 0:s.resume)==null||i.call(s)}}},ZS=(e,t=!1)=>{const n=document.activeElement;for(const o of e)if(po(o,t),document.activeElement!==n)return},_d=JS(),eC=()=>xa.value>Bc.value,dr=()=>{Dc.value="pointer",xa.value=window.performance.now()},wd=()=>{Dc.value="keyboard",xa.value=window.performance.now()},tC=()=>(Be(()=>{ur===0&&(document.addEventListener("mousedown",dr),document.addEventListener("touchstart",dr),document.addEventListener("keydown",wd)),ur++}),Pt(()=>{ur--,ur<=0&&(document.removeEventListener("mousedown",dr),document.removeEventListener("touchstart",dr),document.removeEventListener("keydown",wd))}),{focusReason:Dc,lastUserFocusTimestamp:xa,lastAutomatedFocusTimestamp:Bc}),fr=e=>new CustomEvent(US,{...qS,detail:e}),nC=Y({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[md,vd,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=A();let o,s;const{focusReason:i}=tC();ax(g=>{e.trapped&&!r.paused&&t("release-requested",g)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=g=>{if(!e.loop&&!e.trapped||r.paused)return;const{key:h,altKey:v,ctrlKey:m,metaKey:y,currentTarget:w,shiftKey:_}=g,{loop:x}=e,S=h===on.tab&&!v&&!m&&!y,C=document.activeElement;if(S&&C){const k=w,[T,B]=XS(k);if(T&&B){if(!_&&C===B){const D=fr({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(g.preventDefault(),x&&po(T,!0))}else if(_&&[T,k].includes(C)){const D=fr({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(g.preventDefault(),x&&po(B,!0))}}else if(C===k){const D=fr({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||g.preventDefault()}}};rt(YS,{focusTrapRef:n,onKeydown:a}),se(()=>e.focusTrapEl,g=>{g&&(n.value=g)},{immediate:!0}),se([n],([g],[h])=>{g&&(g.addEventListener("keydown",a),g.addEventListener("focusin",u),g.addEventListener("focusout",d)),h&&(h.removeEventListener("keydown",a),h.removeEventListener("focusin",u),h.removeEventListener("focusout",d))});const l=g=>{t(md,g)},c=g=>t(vd,g),u=g=>{const h=b(n);if(!h)return;const v=g.target,m=g.relatedTarget,y=v&&h.contains(v);e.trapped||m&&h.contains(m)||(o=m),y&&t("focusin",g),!r.paused&&e.trapped&&(y?s=v:po(s,!0))},d=g=>{const h=b(n);if(!(r.paused||!h))if(e.trapped){const v=g.relatedTarget;!es(v)&&!h.contains(v)&&setTimeout(()=>{if(!r.paused&&e.trapped){const m=fr({focusReason:i.value});t("focusout-prevented",m),m.defaultPrevented||po(s,!0)}},0)}else{const v=g.target;v&&h.contains(v)||t("focusout",g)}};async function f(){await xe();const g=b(n);if(g){_d.push(r);const h=g.contains(document.activeElement)?o:document.activeElement;if(o=h,!g.contains(h)){const m=new Event(Fa,gd);g.addEventListener(Fa,l),g.dispatchEvent(m),m.defaultPrevented||xe(()=>{let y=e.focusStartEl;st(y)||(po(y),document.activeElement!==y&&(y="first")),y==="first"&&ZS(og(g),!0),(document.activeElement===h||y==="container")&&po(g)})}}}function p(){const g=b(n);if(g){g.removeEventListener(Fa,l);const h=new CustomEvent(Da,{...gd,detail:{focusReason:i.value}});g.addEventListener(Da,c),g.dispatchEvent(h),!h.defaultPrevented&&(i.value=="keyboard"||!eC()||g.contains(document.activeElement))&&po(o!=null?o:document.body),g.removeEventListener(Da,c),_d.remove(r)}}return Be(()=>{e.trapped&&f(),se(()=>e.trapped,g=>{g?f():p()})}),Pt(()=>{e.trapped&&p()}),{onKeydown:a}}});function oC(e,t,n,o,s,i){return me(e.$slots,"default",{handleKeydown:e.onKeydown})}var sg=ve(nC,[["render",oC],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const sC=["fixed","absolute"],iC=ke({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ye(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:_a,default:"bottom"},popperOptions:{type:ye(Object),default:()=>({})},strategy:{type:String,values:sC,default:"absolute"}}),ig=ke({...iC,id:String,style:{type:ye([String,Array,Object])},className:{type:ye([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ye([String,Array,Object])},popperStyle:{type:ye([String,Array,Object])},referenceEl:{type:ye(Object)},triggerTargetEl:{type:ye(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),rC={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},aC=(e,t=[])=>{const{placement:n,strategy:o,popperOptions:s}=e,i={placement:n,strategy:o,...s,modifiers:[...cC(e),...t]};return uC(i,s==null?void 0:s.modifiers),i},lC=e=>{if(!!ot)return jh(e)};function cC(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:o}=e;return[{name:"offset",options:{offset:[0,t!=null?t:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:o}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function uC(e,t){t&&(e.modifiers=[...e.modifiers,...t!=null?t:[]])}const dC=0,fC=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:o,role:s}=we(Fc,void 0),i=A(),r=A(),a=P(()=>({name:"eventListeners",enabled:!!e.visible})),l=P(()=>{var m;const y=b(i),w=(m=b(r))!=null?m:dC;return{name:"arrow",enabled:!Fw(y),options:{element:y,padding:w}}}),c=P(()=>({onFirstUpdate:()=>{g()},...aC(e,[b(l),b(a)])})),u=P(()=>lC(e.referenceEl)||b(o)),{attributes:d,state:f,styles:p,update:g,forceUpdate:h,instanceRef:v}=ox(u,n,c);return se(v,m=>t.value=m),Be(()=>{se(()=>{var m;return(m=b(u))==null?void 0:m.getBoundingClientRect()},()=>{g()})}),{attributes:d,arrowRef:i,contentRef:n,instanceRef:v,state:f,styles:p,role:s,forceUpdate:h,update:g}},hC=(e,{attributes:t,styles:n,role:o})=>{const{nextZIndex:s}=Kh(),i=he("popper"),r=P(()=>b(t).popper),a=A(e.zIndex||s()),l=P(()=>[i.b(),i.is("pure",e.pure),i.is(e.effect),e.popperClass]),c=P(()=>[{zIndex:b(a)},b(n).popper,e.popperStyle||{}]),u=P(()=>o.value==="dialog"?"false":void 0),d=P(()=>b(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=e.zIndex||s()}}},pC=(e,t)=>{const n=A(!1),o=A();return{focusStartRef:o,trapped:n,onFocusAfterReleased:c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(o.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(o.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},gC=Y({name:"ElPopperContent"}),mC=Y({...gC,props:ig,emits:rC,setup(e,{expose:t,emit:n}){const o=e,{focusStartRef:s,trapped:i,onFocusAfterReleased:r,onFocusAfterTrapped:a,onFocusInTrap:l,onFocusoutPrevented:c,onReleaseRequested:u}=pC(o,n),{attributes:d,arrowRef:f,contentRef:p,styles:g,instanceRef:h,role:v,update:m}=fC(o),{ariaModal:y,arrowStyle:w,contentAttrs:_,contentClass:x,contentStyle:S,updateZIndex:C}=hC(o,{styles:g,attributes:d,role:v}),k=we(as,void 0),T=A();rt(Jp,{arrowStyle:w,arrowRef:f,arrowOffset:T}),k&&(k.addInputId||k.removeInputId)&&rt(as,{...k,addInputId:Zo,removeInputId:Zo});let B;const $=(W=!0)=>{m(),W&&C()},D=()=>{$(!1),o.visible&&o.focusOnShow?i.value=!0:o.visible===!1&&(i.value=!1)};return Be(()=>{se(()=>o.triggerTargetEl,(W,ne)=>{B==null||B(),B=void 0;const j=b(W||p.value),Q=b(ne||p.value);oo(j)&&(B=se([v,()=>o.ariaLabel,y,()=>o.id],V=>{["role","aria-label","aria-modal","id"].forEach((le,I)=>{es(V[I])?j.removeAttribute(le):j.setAttribute(le,V[I])})},{immediate:!0})),Q!==j&&oo(Q)&&["role","aria-label","aria-modal","id"].forEach(V=>{Q.removeAttribute(V)})},{immediate:!0}),se(()=>o.visible,D,{immediate:!0})}),Pt(()=>{B==null||B(),B=void 0}),t({popperContentRef:p,popperInstanceRef:h,updatePopper:$,contentStyle:S}),(W,ne)=>(M(),N("div",On({ref_key:"contentRef",ref:p},b(_),{style:b(S),class:b(x),tabindex:"-1",onMouseenter:ne[0]||(ne[0]=j=>W.$emit("mouseenter",j)),onMouseleave:ne[1]||(ne[1]=j=>W.$emit("mouseleave",j))}),[L(b(sg),{trapped:b(i),"trap-on-focus-in":!0,"focus-trap-el":b(p),"focus-start-el":b(s),onFocusAfterTrapped:b(a),onFocusAfterReleased:b(r),onFocusin:b(l),onFocusoutPrevented:b(c),onReleaseRequested:b(u)},{default:F(()=>[me(W.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var vC=ve(mC,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const bC=dt(DS),Nc=Symbol("elTooltip"),$i=ke({...ux,...ig,appendTo:{type:ye([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:ye(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),rg=ke({...ng,disabled:Boolean,trigger:{type:ye([String,Array]),default:"hover"},triggerKeys:{type:ye(Array),default:()=>[on.enter,on.space]}}),{useModelToggleProps:yC,useModelToggleEmits:_C,useModelToggle:wC}=t1("visible"),xC=ke({...Zp,...yC,...$i,...rg,...eg,showArrow:{type:Boolean,default:!0}}),SC=[..._C,"before-show","before-hide","show","hide","open","close"],CC=(e,t)=>vn(e)?e.includes(t):e===t,gs=(e,t,n)=>o=>{CC(b(e),t)&&n(o)},kC=Y({name:"ElTooltipTrigger"}),EC=Y({...kC,props:rg,setup(e,{expose:t}){const n=e,o=he("tooltip"),{controlled:s,id:i,open:r,onOpen:a,onClose:l,onToggle:c}=we(Nc,void 0),u=A(null),d=()=>{if(b(s)||n.disabled)return!0},f=nn(n,"trigger"),p=Xn(d,gs(f,"hover",a)),g=Xn(d,gs(f,"hover",l)),h=Xn(d,gs(f,"click",_=>{_.button===0&&c(_)})),v=Xn(d,gs(f,"focus",a)),m=Xn(d,gs(f,"focus",l)),y=Xn(d,gs(f,"contextmenu",_=>{_.preventDefault(),c(_)})),w=Xn(d,_=>{const{code:x}=_;n.triggerKeys.includes(x)&&(_.preventDefault(),c(_))});return t({triggerRef:u}),(_,x)=>(M(),q(b(KS),{id:b(i),"virtual-ref":_.virtualRef,open:b(r),"virtual-triggering":_.virtualTriggering,class:R(b(o).e("trigger")),onBlur:b(m),onClick:b(h),onContextmenu:b(y),onFocus:b(v),onMouseenter:b(p),onMouseleave:b(g),onKeydown:b(w)},{default:F(()=>[me(_.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var MC=ve(EC,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const PC=Y({name:"ElTooltipContent",inheritAttrs:!1}),TC=Y({...PC,props:$i,setup(e,{expose:t}){const n=e,{selector:o}=Kp(),s=he("tooltip"),i=A(null),r=A(!1),{controlled:a,id:l,open:c,trigger:u,onClose:d,onOpen:f,onShow:p,onHide:g,onBeforeShow:h,onBeforeHide:v}=we(Nc,void 0),m=P(()=>n.transition||`${s.namespace.value}-fade-in-linear`),y=P(()=>n.persistent);Pt(()=>{r.value=!0});const w=P(()=>b(y)?!0:b(c)),_=P(()=>n.disabled?!1:b(c)),x=P(()=>n.appendTo||o.value),S=P(()=>{var V;return(V=n.style)!=null?V:{}}),C=P(()=>!b(c)),k=()=>{g()},T=()=>{if(b(a))return!0},B=Xn(T,()=>{n.enterable&&b(u)==="hover"&&f()}),$=Xn(T,()=>{b(u)==="hover"&&d()}),D=()=>{var V,le;(le=(V=i.value)==null?void 0:V.updatePopper)==null||le.call(V),h==null||h()},W=()=>{v==null||v()},ne=()=>{p(),Q=Bv(P(()=>{var V;return(V=i.value)==null?void 0:V.popperContentRef}),()=>{if(b(a))return;b(u)!=="hover"&&d()})},j=()=>{n.virtualTriggering||d()};let Q;return se(()=>b(c),V=>{V||Q==null||Q()},{flush:"post"}),se(()=>n.content,()=>{var V,le;(le=(V=i.value)==null?void 0:V.updatePopper)==null||le.call(V)}),t({contentRef:i}),(V,le)=>(M(),q(Dv,{disabled:!V.teleported,to:b(x)},[L(Mo,{name:b(m),onAfterLeave:k,onBeforeEnter:D,onAfterEnter:ne,onBeforeLeave:W},{default:F(()=>[b(w)?We((M(),q(b(vC),On({key:0,id:b(l),ref_key:"contentRef",ref:i},V.$attrs,{"aria-label":V.ariaLabel,"aria-hidden":b(C),"boundaries-padding":V.boundariesPadding,"fallback-placements":V.fallbackPlacements,"gpu-acceleration":V.gpuAcceleration,offset:V.offset,placement:V.placement,"popper-options":V.popperOptions,strategy:V.strategy,effect:V.effect,enterable:V.enterable,pure:V.pure,"popper-class":V.popperClass,"popper-style":[V.popperStyle,b(S)],"reference-el":V.referenceEl,"trigger-target-el":V.triggerTargetEl,visible:b(_),"z-index":V.zIndex,onMouseenter:b(B),onMouseleave:b($),onBlur:j,onClose:b(d)}),{default:F(()=>[r.value?X("v-if",!0):me(V.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Et,b(_)]]):X("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var OC=ve(TC,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const AC=["innerHTML"],RC={key:1},LC=Y({name:"ElTooltip"}),$C=Y({...LC,props:xC,emits:SC,setup(e,{expose:t,emit:n}){const o=e;cx();const s=Rs(),i=A(),r=A(),a=()=>{var m;const y=b(i);y&&((m=y.popperInstanceRef)==null||m.update())},l=A(!1),c=A(),{show:u,hide:d,hasUpdateHandler:f}=wC({indicator:l,toggleReason:c}),{onOpen:p,onClose:g}=Up({showAfter:nn(o,"showAfter"),hideAfter:nn(o,"hideAfter"),autoClose:nn(o,"autoClose"),open:u,close:d}),h=P(()=>Nt(o.visible)&&!f.value);rt(Nc,{controlled:h,id:s,open:Nv(l),trigger:nn(o,"trigger"),onOpen:m=>{p(m)},onClose:m=>{g(m)},onToggle:m=>{b(l)?g(m):p(m)},onShow:()=>{n("show",c.value)},onHide:()=>{n("hide",c.value)},onBeforeShow:()=>{n("before-show",c.value)},onBeforeHide:()=>{n("before-hide",c.value)},updatePopper:a}),se(()=>o.disabled,m=>{m&&l.value&&(l.value=!1)});const v=m=>{var y,w;const _=(w=(y=r.value)==null?void 0:y.contentRef)==null?void 0:w.popperContentRef,x=(m==null?void 0:m.relatedTarget)||document.activeElement;return _&&_.contains(x)};return zv(()=>l.value&&d()),t({popperRef:i,contentRef:r,isFocusInsideContent:v,updatePopper:a,onOpen:p,onClose:g,hide:d}),(m,y)=>(M(),q(b(bC),{ref_key:"popperRef",ref:i,role:m.role},{default:F(()=>[L(MC,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:F(()=>[m.$slots.default?me(m.$slots,"default",{key:0}):X("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),L(OC,{ref_key:"contentRef",ref:r,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:F(()=>[me(m.$slots,"content",{},()=>[m.rawContent?(M(),N("span",{key:0,innerHTML:m.content},null,8,AC)):(M(),N("span",RC,ce(m.content),1))]),m.showArrow?(M(),q(b(zS),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):X("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var IC=ve($C,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const Io=dt(IC),FC=ke({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"}}),DC=["textContent"],BC=Y({name:"ElBadge"}),NC=Y({...BC,props:FC,setup(e,{expose:t}){const n=e,o=he("badge"),s=P(()=>n.isDot?"":He(n.value)&&He(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`);return t({content:s}),(i,r)=>(M(),N("div",{class:R(b(o).b())},[me(i.$slots,"default"),L(Mo,{name:`${b(o).namespace.value}-zoom-in-center`,persisted:""},{default:F(()=>[We(E("sup",{class:R([b(o).e("content"),b(o).em("content",i.type),b(o).is("fixed",!!i.$slots.default),b(o).is("dot",i.isDot)]),textContent:ce(b(s))},null,10,DC),[[Et,!i.hidden&&(b(s)||i.isDot)]])]),_:1},8,["name"])],2))}});var zC=ve(NC,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const VC=dt(zC),ag=Symbol("buttonGroupContextKey"),HC=(e,t)=>{ya({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},P(()=>e.type==="text"));const n=we(ag,void 0),o=Vv("button"),{form:s}=co(),i=cn(P(()=>n==null?void 0:n.size)),r=fs(),a=A(),l=Hs(),c=P(()=>e.type||(n==null?void 0:n.type)||""),u=P(()=>{var g,h,v;return(v=(h=e.autoInsertSpace)!=null?h:(g=o.value)==null?void 0:g.autoInsertSpace)!=null?v:!1}),d=P(()=>e.tag==="button"?{ariaDisabled:r.value||e.loading,disabled:r.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),f=P(()=>{var g;const h=(g=l.default)==null?void 0:g.call(l);if(u.value&&(h==null?void 0:h.length)===1){const v=h[0];if((v==null?void 0:v.type)===Hh){const m=v.children;return/^\p{Unified_Ideograph}{2}$/u.test(m.trim())}}return!1});return{_disabled:r,_size:i,_type:c,_ref:a,_props:d,shouldAddSpace:f,handleClick:g=>{e.nativeType==="reset"&&(s==null||s.resetFields()),t("click",g)}}},Cl=["default","primary","success","warning","info","danger","text",""],WC=["button","submit","reset"],kl=ke({size:ao,disabled:Boolean,type:{type:String,values:Cl,default:""},icon:{type:yt},nativeType:{type:String,values:WC,default:"button"},loading:Boolean,loadingIcon:{type:yt,default:()=>dc},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:ye([String,Object]),default:"button"}}),jC={click:e=>e instanceof MouseEvent};function _t(e,t){KC(e)&&(e="100%");var n=UC(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function hr(e){return Math.min(1,Math.max(0,e))}function KC(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function UC(e){return typeof e=="string"&&e.indexOf("%")!==-1}function lg(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function pr(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Go(e){return e.length===1?"0"+e:String(e)}function qC(e,t,n){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(n,255)*255}}function xd(e,t,n){e=_t(e,255),t=_t(t,255),n=_t(n,255);var o=Math.max(e,t,n),s=Math.min(e,t,n),i=0,r=0,a=(o+s)/2;if(o===s)r=0,i=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4;break}i/=6}return{h:i,s:r,l:a}}function Ba(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YC(e,t,n){var o,s,i;if(e=_t(e,360),t=_t(t,100),n=_t(n,100),t===0)s=n,i=n,o=n;else{var r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Ba(a,r,e+1/3),s=Ba(a,r,e),i=Ba(a,r,e-1/3)}return{r:o*255,g:s*255,b:i*255}}function Sd(e,t,n){e=_t(e,255),t=_t(t,255),n=_t(n,255);var o=Math.max(e,t,n),s=Math.min(e,t,n),i=0,r=o,a=o-s,l=o===0?0:a/o;if(o===s)i=0;else{switch(o){case e:i=(t-n)/a+(t<n?6:0);break;case t:i=(n-e)/a+2;break;case n:i=(e-t)/a+4;break}i/=6}return{h:i,s:l,v:r}}function GC(e,t,n){e=_t(e,360)*6,t=_t(t,100),n=_t(n,100);var o=Math.floor(e),s=e-o,i=n*(1-t),r=n*(1-s*t),a=n*(1-(1-s)*t),l=o%6,c=[n,r,i,i,a,n][l],u=[a,n,n,r,i,i][l],d=[i,i,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function Cd(e,t,n,o){var s=[Go(Math.round(e).toString(16)),Go(Math.round(t).toString(16)),Go(Math.round(n).toString(16))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function XC(e,t,n,o,s){var i=[Go(Math.round(e).toString(16)),Go(Math.round(t).toString(16)),Go(Math.round(n).toString(16)),Go(QC(o))];return s&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function QC(e){return Math.round(parseFloat(e)*255).toString(16)}function kd(e){return qt(e)/255}function qt(e){return parseInt(e,16)}function JC(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var El={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ZC(e){var t={r:0,g:0,b:0},n=1,o=null,s=null,i=null,r=!1,a=!1;return typeof e=="string"&&(e=nk(e)),typeof e=="object"&&(jn(e.r)&&jn(e.g)&&jn(e.b)?(t=qC(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):jn(e.h)&&jn(e.s)&&jn(e.v)?(o=pr(e.s),s=pr(e.v),t=GC(e.h,o,s),r=!0,a="hsv"):jn(e.h)&&jn(e.s)&&jn(e.l)&&(o=pr(e.s),i=pr(e.l),t=YC(e.h,o,i),r=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=lg(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var ek="[-\\+]?\\d+%?",tk="[-\\+]?\\d*\\.\\d+%?",yo="(?:".concat(tk,")|(?:").concat(ek,")"),Na="[\\s|\\(]+(".concat(yo,")[,|\\s]+(").concat(yo,")[,|\\s]+(").concat(yo,")\\s*\\)?"),za="[\\s|\\(]+(".concat(yo,")[,|\\s]+(").concat(yo,")[,|\\s]+(").concat(yo,")[,|\\s]+(").concat(yo,")\\s*\\)?"),hn={CSS_UNIT:new RegExp(yo),rgb:new RegExp("rgb"+Na),rgba:new RegExp("rgba"+za),hsl:new RegExp("hsl"+Na),hsla:new RegExp("hsla"+za),hsv:new RegExp("hsv"+Na),hsva:new RegExp("hsva"+za),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function nk(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(El[e])e=El[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=hn.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=hn.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=hn.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=hn.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=hn.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=hn.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=hn.hex8.exec(e),n?{r:qt(n[1]),g:qt(n[2]),b:qt(n[3]),a:kd(n[4]),format:t?"name":"hex8"}:(n=hn.hex6.exec(e),n?{r:qt(n[1]),g:qt(n[2]),b:qt(n[3]),format:t?"name":"hex"}:(n=hn.hex4.exec(e),n?{r:qt(n[1]+n[1]),g:qt(n[2]+n[2]),b:qt(n[3]+n[3]),a:kd(n[4]+n[4]),format:t?"name":"hex8"}:(n=hn.hex3.exec(e),n?{r:qt(n[1]+n[1]),g:qt(n[2]+n[2]),b:qt(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function jn(e){return Boolean(hn.CSS_UNIT.exec(String(e)))}var ok=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=JC(t)),this.originalInput=t;var s=ZC(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:s.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,s,i=t.r/255,r=t.g/255,a=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*o+.0722*s},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=lg(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Sd(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Sd(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),s=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(s,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(s,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=xd(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=xd(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),s=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(s,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(s,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Cd(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),XC(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(_t(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(_t(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Cd(this.r,this.g,this.b,!1),n=0,o=Object.entries(El);n<o.length;n++){var s=o[n],i=s[0],r=s[1];if(t===r)return i}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var o=!1,s=this.a<1&&this.a>=0,i=!n&&s&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=hr(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=hr(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=hr(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=hr(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),s=new e(t).toRgb(),i=n/100,r={r:(s.r-o.r)*i+o.r,g:(s.g-o.g)*i+o.g,b:(s.b-o.b)*i+o.b,a:(s.a-o.a)*i+o.a};return new e(r)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),s=360/n,i=[this];for(o.h=(o.h-(s*t>>1)+720)%360;--t;)o.h=(o.h+s)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,s=n.s,i=n.v,r=[],a=1/t;t--;)r.push(new e({h:o,s,v:i})),i=(i+a)%1;return r},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),s=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/s,g:(n.g*n.a+o.g*o.a*(1-n.a))/s,b:(n.b*n.a+o.b*o.a*(1-n.a))/s,a:s})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,s=[this],i=360/t,r=1;r<t;r++)s.push(new e({h:(o+r*i)%360,s:n.s,l:n.l}));return s},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function fo(e,t=20){return e.mix("#141414",t).toString()}function sk(e){const t=fs(),n=he("button");return P(()=>{let o={};const s=e.color;if(s){const i=new ok(s),r=e.dark?i.tint(20).toString():fo(i,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?fo(i,90):i.tint(90).toString(),"text-color":s,"border-color":e.dark?fo(i,50):i.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":r,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":r}),t.value&&(o[n.cssVarBlockName("disabled-bg-color")]=e.dark?fo(i,90):i.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?fo(i,50):i.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?fo(i,80):i.tint(80).toString());else{const a=e.dark?fo(i,30):i.tint(30).toString(),l=i.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(o=n.cssVarBlock({"bg-color":s,"text-color":l,"border-color":s,"hover-bg-color":a,"hover-text-color":l,"hover-border-color":a,"active-bg-color":r,"active-border-color":r}),t.value){const c=e.dark?fo(i,50):i.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=c,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=c}}}return o})}const ik=Y({name:"ElButton"}),rk=Y({...ik,props:kl,emits:jC,setup(e,{expose:t,emit:n}){const o=e,s=sk(o),i=he("button"),{_ref:r,_size:a,_type:l,_disabled:c,_props:u,shouldAddSpace:d,handleClick:f}=HC(o,n);return t({ref:r,size:a,type:l,disabled:c,shouldAddSpace:d}),(p,g)=>(M(),q(Ue(p.tag),On({ref_key:"_ref",ref:r},b(u),{class:[b(i).b(),b(i).m(b(l)),b(i).m(b(a)),b(i).is("disabled",b(c)),b(i).is("loading",p.loading),b(i).is("plain",p.plain),b(i).is("round",p.round),b(i).is("circle",p.circle),b(i).is("text",p.text),b(i).is("link",p.link),b(i).is("has-bg",p.bg)],style:b(s),onClick:b(f)}),{default:F(()=>[p.loading?(M(),N(Ge,{key:0},[p.$slots.loading?me(p.$slots,"loading",{key:0}):(M(),q(b($e),{key:1,class:R(b(i).is("loading"))},{default:F(()=>[(M(),q(Ue(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(M(),q(b($e),{key:1},{default:F(()=>[p.icon?(M(),q(Ue(p.icon),{key:0})):me(p.$slots,"icon",{key:1})]),_:3})):X("v-if",!0),p.$slots.default?(M(),N("span",{key:2,class:R({[b(i).em("text","expand")]:b(d)})},[me(p.$slots,"default")],2)):X("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var ak=ve(rk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const lk={size:kl.size,type:kl.type},ck=Y({name:"ElButtonGroup"}),uk=Y({...ck,props:lk,setup(e){const t=e;rt(ag,Ht({size:nn(t,"size"),type:nn(t,"type")}));const n=he("button");return(o,s)=>(M(),N("div",{class:R(`${b(n).b("group")}`)},[me(o.$slots,"default")],2))}});var cg=ve(uk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Dn=dt(ak,{ButtonGroup:cg}),dk=un(cg);var fk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const go=new Map;let Ed;ot&&(document.addEventListener("mousedown",e=>Ed=e),document.addEventListener("mouseup",e=>{for(const t of go.values())for(const{documentHandler:n}of t)n(e,Ed)}));function Md(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:oo(t.arg)&&n.push(t.arg),function(o,s){const i=t.instance.popperRef,r=o.target,a=s==null?void 0:s.target,l=!t||!t.instance,c=!r||!a,u=e.contains(r)||e.contains(a),d=e===r,f=n.length&&n.some(g=>g==null?void 0:g.contains(r))||n.length&&n.includes(a),p=i&&(i.contains(r)||i.contains(a));l||c||u||d||f||p||t.value(o,s)}}const zc={beforeMount(e,t){go.has(e)||go.set(e,[]),go.get(e).push({documentHandler:Md(e,t),bindingFn:t.value})},updated(e,t){go.has(e)||go.set(e,[]);const n=go.get(e),o=n.findIndex(i=>i.bindingFn===t.oldValue),s={documentHandler:Md(e,t),bindingFn:t.value};o>=0?n.splice(o,1,s):n.push(s)},unmounted(e){go.delete(e)}},Ml="_trap-focus-children",Xo=[],Pd=e=>{if(Xo.length===0)return;const t=Xo[Xo.length-1][Ml];if(t.length>0&&e.code===on.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],s=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),s&&!n&&(e.preventDefault(),t[0].focus())}},pk={beforeMount(e){e[Ml]=yu(e),Xo.push(e),Xo.length<=1&&document.addEventListener("keydown",Pd)},updated(e){xe(()=>{e[Ml]=yu(e)})},unmounted(){Xo.shift(),Xo.length===0&&document.removeEventListener("keydown",Pd)}};var Td=!1,qo,Pl,Tl,Fr,Dr,ug,Br,Ol,Al,Rl,dg,Ll,$l,fg,hg;function $t(){if(!Td){Td=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Ll=/\b(iPhone|iP[ao]d)/.exec(e),$l=/\b(iP[ao]d)/.exec(e),Rl=/Android/i.exec(e),fg=/FBAN\/\w+;/i.exec(e),hg=/Mobile/i.exec(e),dg=!!/Win64/.exec(e),t){qo=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,qo&&document&&document.documentMode&&(qo=document.documentMode);var o=/(?:Trident\/(\d+.\d+))/.exec(e);ug=o?parseFloat(o[1])+4:qo,Pl=t[2]?parseFloat(t[2]):NaN,Tl=t[3]?parseFloat(t[3]):NaN,Fr=t[4]?parseFloat(t[4]):NaN,Fr?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Dr=t&&t[1]?parseFloat(t[1]):NaN):Dr=NaN}else qo=Pl=Tl=Dr=Fr=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Br=s?parseFloat(s[1].replace("_",".")):!0}else Br=!1;Ol=!!n[2],Al=!!n[3]}else Br=Ol=Al=!1}}var Il={ie:function(){return $t()||qo},ieCompatibilityMode:function(){return $t()||ug>qo},ie64:function(){return Il.ie()&&dg},firefox:function(){return $t()||Pl},opera:function(){return $t()||Tl},webkit:function(){return $t()||Fr},safari:function(){return Il.webkit()},chrome:function(){return $t()||Dr},windows:function(){return $t()||Ol},osx:function(){return $t()||Br},linux:function(){return $t()||Al},iphone:function(){return $t()||Ll},mobile:function(){return $t()||Ll||$l||Rl||hg},nativeApp:function(){return $t()||fg},android:function(){return $t()||Rl},ipad:function(){return $t()||$l}},gk=Il,gr=!!(typeof window<"u"&&window.document&&window.document.createElement),mk={canUseDOM:gr,canUseWorkers:typeof Worker<"u",canUseEventListeners:gr&&!!(window.addEventListener||window.attachEvent),canUseViewport:gr&&!!window.screen,isInWorker:!gr},pg=mk,gg;pg.canUseDOM&&(gg=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function vk(e,t){if(!pg.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var s=document.createElement("div");s.setAttribute(n,"return;"),o=typeof s[n]=="function"}return!o&&gg&&e==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var bk=vk,Od=10,Ad=40,Rd=800;function mg(e){var t=0,n=0,o=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=t*Od,s=n*Od,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||s)&&e.deltaMode&&(e.deltaMode==1?(o*=Ad,s*=Ad):(o*=Rd,s*=Rd)),o&&!t&&(t=o<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:s}}mg.getEventType=function(){return gk.firefox()?"DOMMouseScroll":bk("wheel")?"wheel":"mousewheel"};var yk=mg;/**
     20`,uS=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function dS(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:uS.map(r=>`${r}:${t.getPropertyValue(r)}`).join(";"),paddingSize:o,borderSize:s,boxSizing:n}}function fd(e,t=1,n){var o;fn||(fn=document.createElement("textarea"),document.body.appendChild(fn));const{paddingSize:s,borderSize:i,boxSizing:r,contextStyle:a}=dS(e);fn.setAttribute("style",`${a};${cS}`),fn.value=e.value||e.placeholder||"";let l=fn.scrollHeight;const c={};r==="border-box"?l=l+i:r==="content-box"&&(l=l-s),fn.value="";const u=fn.scrollHeight-s;if(He(t)){let d=u*t;r==="border-box"&&(d=d+s+i),l=Math.max(d,l),c.minHeight=`${d}px`}if(He(n)){let d=u*n;r==="border-box"&&(d=d+s+i),l=Math.min(d,l)}return c.height=`${l}px`,(o=fn.parentNode)==null||o.removeChild(fn),fn=void 0,c}const fS=ke({id:{type:String,default:void 0},size:ao,disabled:Boolean,modelValue:{type:ye([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ye([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:yt},prefixIcon:{type:yt},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ye([Object,Array,String]),default:()=>pn({})},autofocus:{type:Boolean,default:!1}}),hS={[Je]:e=>st(e),input:e=>st(e),change:e=>st(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},pS=["role"],gS=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],mS=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],vS=Y({name:"ElInput",inheritAttrs:!1}),bS=Y({...vS,props:fS,emits:hS,setup(e,{expose:t,emit:n}){const o=e,s=$v(),i=Hs(),r=P(()=>{const oe={};return o.containerRole==="combobox"&&(oe["aria-haspopup"]=s["aria-haspopup"],oe["aria-owns"]=s["aria-owns"],oe["aria-expanded"]=s["aria-expanded"]),oe}),a=P(()=>[o.type==="textarea"?v.b():h.b(),h.m(p.value),h.is("disabled",g.value),h.is("exceed",e(p.icon),{key:0})):me(p.$slots,"icon",{key:1})]),_:3})):X("v-if",!0),p.$slots.default?(M(),N("span",{key:2,class:R({[b(i).em("text","expand")]:b(d)})},[me(p.$slots,"default")],2)):X("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var ak=ve(rk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const lk={size:kl.size,type:kl.type},ck=Y({name:"ElButtonGroup"}),uk=Y({...ck,props:lk,setup(e){const t=e;rt(ag,Ht({size:nn(t,"size"),type:nn(t,"type")}));const n=he("button");return(o,s)=>(M(),N("div",{class:R(`${b(n).b("group")}`)},[me(o.$slots,"default")],2))}});var cg=ve(uk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Dn=dt(ak,{ButtonGroup:cg}),dk=un(cg);var fk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const go=new Map;let Ed;ot&&(document.addEventListener("mousedown",e=>Ed=e),document.addEventListener("mouseup",e=>{for(const t of go.values())for(const{documentHandler:n}of t)n(e,Ed)}));function Md(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:oo(t.arg)&&n.push(t.arg),function(o,s){const i=t.instance.popperRef,r=o.target,a=s==null?void 0:s.target,l=!t||!t.instance,c=!r||!a,u=e.contains(r)||e.contains(a),d=e===r,f=n.length&&n.some(g=>g==null?void 0:g.contains(r))||n.length&&n.includes(a),p=i&&(i.contains(r)||i.contains(a));l||c||u||d||f||p||t.value(o,s)}}const zc={beforeMount(e,t){go.has(e)||go.set(e,[]),go.get(e).push({documentHandler:Md(e,t),bindingFn:t.value})},updated(e,t){go.has(e)||go.set(e,[]);const n=go.get(e),o=n.findIndex(i=>i.bindingFn===t.oldValue),s={documentHandler:Md(e,t),bindingFn:t.value};o>=0?n.splice(o,1,s):n.push(s)},unmounted(e){go.delete(e)}},Ml="_trap-focus-children",Xo=[],Pd=e=>{if(Xo.length===0)return;const t=Xo[Xo.length-1][Ml];if(t.length>0&&e.code===on.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],s=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),s&&!n&&(e.preventDefault(),t[0].focus())}},pk={beforeMount(e){e[Ml]=yu(e),Xo.push(e),Xo.length<=1&&document.addEventListener("keydown",Pd)},updated(e){xe(()=>{e[Ml]=yu(e)})},unmounted(){Xo.shift(),Xo.length===0&&document.removeEventListener("keydown",Pd)}};var Td=!1,qo,Pl,Tl,Fr,Dr,ug,Br,Ol,Al,Rl,dg,Ll,$l,fg,hg;function $t(){if(!Td){Td=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Ll=/\b(iPhone|iP[ao]d)/.exec(e),$l=/\b(iP[ao]d)/.exec(e),Rl=/Android/i.exec(e),fg=/FBAN\/\w+;/i.exec(e),hg=/Mobile/i.exec(e),dg=!!/Win64/.exec(e),t){qo=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,qo&&document&&document.documentMode&&(qo=document.documentMode);var o=/(?:Trident\/(\d+.\d+))/.exec(e);ug=o?parseFloat(o[1])+4:qo,Pl=t[2]?parseFloat(t[2]):NaN,Tl=t[3]?parseFloat(t[3]):NaN,Fr=t[4]?parseFloat(t[4]):NaN,Fr?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Dr=t&&t[1]?parseFloat(t[1]):NaN):Dr=NaN}else qo=Pl=Tl=Dr=Fr=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Br=s?parseFloat(s[1].replace("_",".")):!0}else Br=!1;Ol=!!n[2],Al=!!n[3]}else Br=Ol=Al=!1}}var Il={ie:function(){return $t()||qo},ieCompatibilityMode:function(){return $t()||ug>qo},ie64:function(){return Il.ie()&&dg},firefox:function(){return $t()||Pl},opera:function(){return $t()||Tl},webkit:function(){return $t()||Fr},safari:function(){return Il.webkit()},chrome:function(){return $t()||Dr},windows:function(){return $t()||Ol},osx:function(){return $t()||Br},linux:function(){return $t()||Al},iphone:function(){return $t()||Ll},mobile:function(){return $t()||Ll||$l||Rl||hg},nativeApp:function(){return $t()||fg},android:function(){return $t()||Rl},ipad:function(){return $t()||$l}},gk=Il,gr=!!(typeof window<"u"&&window.document&&window.document.createElement),mk={canUseDOM:gr,canUseWorkers:typeof Worker<"u",canUseEventListeners:gr&&!!(window.addEventListener||window.attachEvent),canUseViewport:gr&&!!window.screen,isInWorker:!gr},pg=mk,gg;pg.canUseDOM&&(gg=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function vk(e,t){if(!pg.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var s=document.createElement("div");s.setAttribute(n,"return;"),o=typeof s[n]=="function"}return!o&&gg&&e==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var bk=vk,Od=10,Ad=40,Rd=800;function mg(e){var t=0,n=0,o=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=t*Od,s=n*Od,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||s)&&e.deltaMode&&(e.deltaMode==1?(o*=Ad,s*=Ad):(o*=Rd,s*=Rd)),o&&!t&&(t=o<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:s}}mg.getEventType=function(){return gk.firefox()?"DOMMouseScroll":bk("wheel")?"wheel":"mousewheel"};var yk=mg;/**
    2121* Checks if an event is supported in the current execution environment.
    2222*
     
    3131* @internal
    3232* @license Modernizr 3.0.0pre (Custom Build) | MIT
    33 */const _k=function(e,t){if(e&&e.addEventListener){const n=function(o){const s=yk(o);t&&Reflect.apply(t,this,[o,s])};e.addEventListener("wheel",n,{passive:!0})}},wk={beforeMount(e,t){_k(e,t.value)}},vg={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:ao,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},bg={[Je]:e=>st(e)||He(e)||Nt(e),change:e=>st(e)||He(e)||Nt(e)},Us=Symbol("checkboxGroupContextKey"),xk=({model:e,isChecked:t})=>{const n=we(Us,void 0),o=P(()=>{var i,r;const a=(i=n==null?void 0:n.max)==null?void 0:i.value,l=(r=n==null?void 0:n.min)==null?void 0:r.value;return!Po(a)&&e.value.length>=a&&!t.value||!Po(l)&&e.value.length<=l&&t.value});return{isDisabled:fs(P(()=>(n==null?void 0:n.disabled.value)||o.value)),isLimitDisabled:o}},Sk=(e,{model:t,isLimitExceeded:n,hasOwnLabel:o,isDisabled:s,isLabeledByFormItem:i})=>{const r=we(Us,void 0),{formItem:a}=co(),{emit:l}=De();function c(g){var h,v;return g===e.trueLabel||g===!0?(h=e.trueLabel)!=null?h:!0:(v=e.falseLabel)!=null?v:!1}function u(g,h){l("change",c(g),h)}function d(g){if(n.value)return;const h=g.target;l("change",c(h.checked),g)}async function f(g){n.value||!o.value&&!s.value&&i.value&&(g.composedPath().some(m=>m.tagName==="LABEL")||(t.value=c([!1,e.falseLabel].includes(t.value)),await xe(),u(t.value,g)))}const p=P(()=>(r==null?void 0:r.validateEvent)||e.validateEvent);return se(()=>e.modelValue,()=>{p.value&&(a==null||a.validate("change").catch(g=>void 0))}),{handleChange:d,onClickRoot:f}},Ck=e=>{const t=A(!1),{emit:n}=De(),o=we(Us,void 0),s=P(()=>Po(o)===!1),i=A(!1);return{model:P({get(){var a,l;return s.value?(a=o==null?void 0:o.modelValue)==null?void 0:a.value:(l=e.modelValue)!=null?l:t.value},set(a){var l,c;s.value&&vn(a)?(i.value=((l=o==null?void 0:o.max)==null?void 0:l.value)!==void 0&&a.length>(o==null?void 0:o.max.value),i.value===!1&&((c=o==null?void 0:o.changeEvent)==null||c.call(o,a))):(n(Je,a),t.value=a)}}),isGroup:s,isLimitExceeded:i}},kk=(e,t,{model:n})=>{const o=we(Us,void 0),s=A(!1),i=P(()=>{const c=n.value;return Nt(c)?c:vn(c)?wn(e.label)?c.map(ks).some(u=>oa(u,e.label)):c.map(ks).includes(e.label):c!=null?c===e.trueLabel:!!c}),r=cn(P(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value}),{prop:!0}),a=cn(P(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value})),l=P(()=>!!(t.default||e.label));return{checkboxButtonSize:r,isChecked:i,isFocused:s,checkboxSize:a,hasOwnLabel:l}},Ek=(e,{model:t})=>{function n(){vn(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&n()},yg=(e,t)=>{const{formItem:n}=co(),{model:o,isGroup:s,isLimitExceeded:i}=Ck(e),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u}=kk(e,t,{model:o}),{isDisabled:d}=xk({model:o,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Ks(e,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:g,onClickRoot:h}=Sk(e,{model:o,isLimitExceeded:i,hasOwnLabel:u,isDisabled:d,isLabeledByFormItem:p});return Ek(e,{model:o}),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:d,isFocused:r,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:o,handleChange:g,onClickRoot:h}},Mk=["tabindex","role","aria-checked"],Pk=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],Tk=["id","aria-hidden","disabled","value","name","tabindex"],Ok=Y({name:"ElCheckbox"}),Ak=Y({...Ok,props:vg,emits:bg,setup(e){const t=e,n=Hs(),{inputId:o,isLabeledByFormItem:s,isChecked:i,isDisabled:r,isFocused:a,checkboxSize:l,hasOwnLabel:c,model:u,handleChange:d,onClickRoot:f}=yg(t,n),p=he("checkbox"),g=P(()=>[p.b(),p.m(l.value),p.is("disabled",r.value),p.is("bordered",t.border),p.is("checked",i.value)]),h=P(()=>[p.e("input"),p.is("disabled",r.value),p.is("checked",i.value),p.is("indeterminate",t.indeterminate),p.is("focus",a.value)]);return(v,m)=>(M(),q(Ue(!b(c)&&b(s)?"span":"label"),{class:R(b(g)),"aria-controls":v.indeterminate?v.controls:null,onClick:b(f)},{default:F(()=>[E("span",{class:R(b(h)),tabindex:v.indeterminate?0:void 0,role:v.indeterminate?"checkbox":void 0,"aria-checked":v.indeterminate?"mixed":void 0},[v.trueLabel||v.falseLabel?We((M(),N("input",{key:0,id:b(o),"onUpdate:modelValue":m[0]||(m[0]=y=>Eo(u)?u.value=y:null),class:R(b(p).e("original")),type:"checkbox","aria-hidden":v.indeterminate?"true":"false",name:v.name,tabindex:v.tabindex,disabled:b(r),"true-value":v.trueLabel,"false-value":v.falseLabel,onChange:m[1]||(m[1]=(...y)=>b(d)&&b(d)(...y)),onFocus:m[2]||(m[2]=y=>a.value=!0),onBlur:m[3]||(m[3]=y=>a.value=!1),onClick:m[4]||(m[4]=et(()=>{},["stop"]))},null,42,Pk)),[[Jr,b(u)]]):We((M(),N("input",{key:1,id:b(o),"onUpdate:modelValue":m[5]||(m[5]=y=>Eo(u)?u.value=y:null),class:R(b(p).e("original")),type:"checkbox","aria-hidden":v.indeterminate?"true":"false",disabled:b(r),value:v.label,name:v.name,tabindex:v.tabindex,onChange:m[6]||(m[6]=(...y)=>b(d)&&b(d)(...y)),onFocus:m[7]||(m[7]=y=>a.value=!0),onBlur:m[8]||(m[8]=y=>a.value=!1),onClick:m[9]||(m[9]=et(()=>{},["stop"]))},null,42,Tk)),[[Jr,b(u)]]),E("span",{class:R(b(p).e("inner"))},null,2)],10,Mk),b(c)?(M(),N("span",{key:0,class:R(b(p).e("label"))},[me(v.$slots,"default"),v.$slots.default?X("v-if",!0):(M(),N(Ge,{key:0},[fe(ce(v.label),1)],64))],2)):X("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Rk=ve(Ak,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const Lk=["name","tabindex","disabled","true-value","false-value"],$k=["name","tabindex","disabled","value"],Ik=Y({name:"ElCheckboxButton"}),Fk=Y({...Ik,props:vg,emits:bg,setup(e){const t=e,n=Hs(),{isFocused:o,isChecked:s,isDisabled:i,checkboxButtonSize:r,model:a,handleChange:l}=yg(t,n),c=we(Us,void 0),u=he("checkbox"),d=P(()=>{var p,g,h,v;const m=(g=(p=c==null?void 0:c.fill)==null?void 0:p.value)!=null?g:"";return{backgroundColor:m,borderColor:m,color:(v=(h=c==null?void 0:c.textColor)==null?void 0:h.value)!=null?v:"",boxShadow:m?`-1px 0 0 0 ${m}`:void 0}}),f=P(()=>[u.b("button"),u.bm("button",r.value),u.is("disabled",i.value),u.is("checked",s.value),u.is("focus",o.value)]);return(p,g)=>(M(),N("label",{class:R(b(f))},[p.trueLabel||p.falseLabel?We((M(),N("input",{key:0,"onUpdate:modelValue":g[0]||(g[0]=h=>Eo(a)?a.value=h:null),class:R(b(u).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:b(i),"true-value":p.trueLabel,"false-value":p.falseLabel,onChange:g[1]||(g[1]=(...h)=>b(l)&&b(l)(...h)),onFocus:g[2]||(g[2]=h=>o.value=!0),onBlur:g[3]||(g[3]=h=>o.value=!1),onClick:g[4]||(g[4]=et(()=>{},["stop"]))},null,42,Lk)),[[Jr,b(a)]]):We((M(),N("input",{key:1,"onUpdate:modelValue":g[5]||(g[5]=h=>Eo(a)?a.value=h:null),class:R(b(u).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:b(i),value:p.label,onChange:g[6]||(g[6]=(...h)=>b(l)&&b(l)(...h)),onFocus:g[7]||(g[7]=h=>o.value=!0),onBlur:g[8]||(g[8]=h=>o.value=!1),onClick:g[9]||(g[9]=et(()=>{},["stop"]))},null,42,$k)),[[Jr,b(a)]]),p.$slots.default||p.label?(M(),N("span",{key:2,class:R(b(u).be("button","inner")),style:Te(b(s)?b(d):void 0)},[me(p.$slots,"default",{},()=>[fe(ce(p.label),1)])],6)):X("v-if",!0)],2))}});var _g=ve(Fk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const Dk=ke({modelValue:{type:ye(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:ao,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Bk={[Je]:e=>vn(e),change:e=>vn(e)},Nk=Y({name:"ElCheckboxGroup"}),zk=Y({...Nk,props:Dk,emits:Bk,setup(e,{emit:t}){const n=e,o=he("checkbox"),{formItem:s}=co(),{inputId:i,isLabeledByFormItem:r}=Ks(n,{formItemContext:s}),a=async c=>{t(Je,c),await xe(),t("change",c)},l=P({get(){return n.modelValue},set(c){a(c)}});return rt(Us,{...Vw(lo(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:a}),se(()=>n.modelValue,()=>{n.validateEvent&&(s==null||s.validate("change").catch(c=>void 0))}),(c,u)=>{var d;return M(),q(Ue(c.tag),{id:b(i),class:R(b(o).b("group")),role:"group","aria-label":b(r)?void 0:c.label||"checkbox-group","aria-labelledby":b(r)?(d=b(s))==null?void 0:d.labelId:void 0},{default:F(()=>[me(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var wg=ve(zk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const ls=dt(Rk,{CheckboxButton:_g,CheckboxGroup:wg});un(_g);un(wg);const xg=ke({size:ao,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),Vk=ke({...xg,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),Sg={[Je]:e=>st(e)||He(e)||Nt(e),[io]:e=>st(e)||He(e)||Nt(e)},Cg=Symbol("radioGroupKey"),kg=(e,t)=>{const n=A(),o=we(Cg,void 0),s=P(()=>!!o),i=P({get(){return s.value?o.modelValue:e.modelValue},set(u){s.value?o.changeEvent(u):t&&t(Je,u),n.value.checked=e.modelValue===e.label}}),r=cn(P(()=>o==null?void 0:o.size)),a=fs(P(()=>o==null?void 0:o.disabled)),l=A(!1),c=P(()=>a.value||s.value&&i.value!==e.label?-1:0);return{radioRef:n,isGroup:s,radioGroup:o,focus:l,size:r,disabled:a,tabIndex:c,modelValue:i}},Hk=["value","name","disabled"],Wk=Y({name:"ElRadio"}),jk=Y({...Wk,props:Vk,emits:Sg,setup(e,{emit:t}){const n=e,o=he("radio"),{radioRef:s,radioGroup:i,focus:r,size:a,disabled:l,modelValue:c}=kg(n,t);function u(){xe(()=>t("change",c.value))}return(d,f)=>{var p;return M(),N("label",{class:R([b(o).b(),b(o).is("disabled",b(l)),b(o).is("focus",b(r)),b(o).is("bordered",d.border),b(o).is("checked",b(c)===d.label),b(o).m(b(a))])},[E("span",{class:R([b(o).e("input"),b(o).is("disabled",b(l)),b(o).is("checked",b(c)===d.label)])},[We(E("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":f[0]||(f[0]=g=>Eo(c)?c.value=g:null),class:R(b(o).e("original")),value:d.label,name:d.name||((p=b(i))==null?void 0:p.name),disabled:b(l),type:"radio",onFocus:f[1]||(f[1]=g=>r.value=!0),onBlur:f[2]||(f[2]=g=>r.value=!1),onChange:u,onClick:f[3]||(f[3]=et(()=>{},["stop"]))},null,42,Hk),[[Uh,b(c)]]),E("span",{class:R(b(o).e("inner"))},null,2)],2),E("span",{class:R(b(o).e("label")),onKeydown:f[4]||(f[4]=et(()=>{},["stop"]))},[me(d.$slots,"default",{},()=>[fe(ce(d.label),1)])],34)],2)}}});var Kk=ve(jk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);const Uk=ke({...xg,name:{type:String,default:""}}),qk=["value","name","disabled"],Yk=Y({name:"ElRadioButton"}),Gk=Y({...Yk,props:Uk,setup(e){const t=e,n=he("radio"),{radioRef:o,focus:s,size:i,disabled:r,modelValue:a,radioGroup:l}=kg(t),c=P(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(u,d)=>{var f;return M(),N("label",{class:R([b(n).b("button"),b(n).is("active",b(a)===u.label),b(n).is("disabled",b(r)),b(n).is("focus",b(s)),b(n).bm("button",b(i))])},[We(E("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":d[0]||(d[0]=p=>Eo(a)?a.value=p:null),class:R(b(n).be("button","original-radio")),value:u.label,type:"radio",name:u.name||((f=b(l))==null?void 0:f.name),disabled:b(r),onFocus:d[1]||(d[1]=p=>s.value=!0),onBlur:d[2]||(d[2]=p=>s.value=!1),onClick:d[3]||(d[3]=et(()=>{},["stop"]))},null,42,qk),[[Uh,b(a)]]),E("span",{class:R(b(n).be("button","inner")),style:Te(b(a)===u.label?b(c):{}),onKeydown:d[4]||(d[4]=et(()=>{},["stop"]))},[me(u.$slots,"default",{},()=>[fe(ce(u.label),1)])],38)],2)}}});var Eg=ve(Gk,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);const Xk=ke({id:{type:String,default:void 0},size:ao,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),Qk=Sg,Jk=["id","aria-label","aria-labelledby"],Zk=Y({name:"ElRadioGroup"}),eE=Y({...Zk,props:Xk,emits:Qk,setup(e,{emit:t}){const n=e,o=he("radio"),s=Rs(),i=A(),{formItem:r}=co(),{inputId:a,isLabeledByFormItem:l}=Ks(n,{formItemContext:r}),c=d=>{t(Je,d),xe(()=>t("change",d))};Be(()=>{const d=i.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(p=>p.checked)&&f&&(f.tabIndex=0)});const u=P(()=>n.name||s.value);return rt(Cg,Ht({...lo(n),changeEvent:c,name:u})),se(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(d=>void 0))}),(d,f)=>(M(),N("div",{id:b(a),ref_key:"radioGroupRef",ref:i,class:R(b(o).b("group")),role:"radiogroup","aria-label":b(l)?void 0:d.label||"radio-group","aria-labelledby":b(l)?b(r).labelId:void 0},[me(d.$slots,"default")],10,Jk))}});var Mg=ve(eE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);const Pg=dt(Kk,{RadioButton:Eg,RadioGroup:Mg}),Tg=un(Mg);un(Eg);const Og=ke({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:Vs,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),tE={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},nE=Y({name:"ElTag"}),oE=Y({...nE,props:Og,emits:tE,setup(e,{emit:t}){const n=e,o=cn(),s=he("tag"),i=P(()=>{const{type:l,hit:c,effect:u,closable:d,round:f}=n;return[s.b(),s.is("closable",d),s.m(l),s.m(o.value),s.m(u),s.is("hit",c),s.is("round",f)]}),r=l=>{t("close",l)},a=l=>{t("click",l)};return(l,c)=>l.disableTransitions?(M(),N("span",{key:0,class:R(b(i)),style:Te({backgroundColor:l.color}),onClick:a},[E("span",{class:R(b(s).e("content"))},[me(l.$slots,"default")],2),l.closable?(M(),q(b($e),{key:0,class:R(b(s).e("close")),onClick:et(r,["stop"])},{default:F(()=>[L(b(Mi))]),_:1},8,["class","onClick"])):X("v-if",!0)],6)):(M(),q(Mo,{key:1,name:`${b(s).namespace.value}-zoom-in-center`,appear:""},{default:F(()=>[E("span",{class:R(b(i)),style:Te({backgroundColor:l.color}),onClick:a},[E("span",{class:R(b(s).e("content"))},[me(l.$slots,"default")],2),l.closable?(M(),q(b($e),{key:0,class:R(b(s).e("close")),onClick:et(r,["stop"])},{default:F(()=>[L(b(Mi))]),_:1},8,["class","onClick"])):X("v-if",!0)],6)]),_:3},8,["name"]))}});var sE=ve(oE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const iE=dt(sE),Ag=Symbol("rowContextKey"),rE=["start","center","end","space-around","space-between","space-evenly"],aE=["top","middle","bottom"],lE=ke({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:rE,default:"start"},align:{type:String,values:aE}}),cE=Y({name:"ElRow"}),uE=Y({...cE,props:lE,setup(e){const t=e,n=he("row"),o=P(()=>t.gutter);rt(Ag,{gutter:o});const s=P(()=>{const r={};return t.gutter&&(r.marginRight=r.marginLeft=`-${t.gutter/2}px`),r}),i=P(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(r,a)=>(M(),q(Ue(r.tag),{class:R(b(i)),style:Te(b(s))},{default:F(()=>[me(r.$slots,"default")]),_:3},8,["class","style"]))}});var dE=ve(uE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const Vc=dt(dE),fE=ke({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:ye([Number,Object]),default:()=>pn({})},sm:{type:ye([Number,Object]),default:()=>pn({})},md:{type:ye([Number,Object]),default:()=>pn({})},lg:{type:ye([Number,Object]),default:()=>pn({})},xl:{type:ye([Number,Object]),default:()=>pn({})}}),hE=Y({name:"ElCol"}),pE=Y({...hE,props:fE,setup(e){const t=e,{gutter:n}=we(Ag,{gutter:P(()=>0)}),o=he("col"),s=P(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),i=P(()=>{const r=[];return["span","offset","pull","push"].forEach(c=>{const u=t[c];He(u)&&(c==="span"?r.push(o.b(`${t[c]}`)):u>0&&r.push(o.b(`${c}-${t[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{He(t[c])?r.push(o.b(`${c}-${t[c]}`)):wn(t[c])&&Object.entries(t[c]).forEach(([u,d])=>{r.push(u!=="span"?o.b(`${c}-${u}-${d}`):o.b(`${c}-${d}`))})}),n.value&&r.push(o.is("guttered")),[o.b(),r]});return(r,a)=>(M(),q(Ue(r.tag),{class:R(b(i)),style:Te(b(s))},{default:F(()=>[me(r.$slots,"default")]),_:3},8,["class","style"]))}});var gE=ve(pE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const Rg=dt(gE),mE=ke({color:{type:ye(Object),required:!0},vertical:{type:Boolean,default:!1}});let Va=!1;function Ii(e,t){if(!ot)return;const n=function(i){var r;(r=t.drag)==null||r.call(t,i)},o=function(i){var r;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",o),document.onselectstart=null,document.ondragstart=null,Va=!1,(r=t.end)==null||r.call(t,i)},s=function(i){var r;Va||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",o),document.addEventListener("touchmove",n),document.addEventListener("touchend",o),Va=!0,(r=t.start)==null||r.call(t,i))};e.addEventListener("mousedown",s),e.addEventListener("touchstart",s)}const vE=e=>{const t=De(),n=bn(),o=bn();function s(r){r.target!==n.value&&i(r)}function i(r){if(!o.value||!n.value)return;const l=t.vnode.el.getBoundingClientRect(),{clientX:c,clientY:u}=hc(r);if(e.vertical){let d=u-l.top;d=Math.max(n.value.offsetHeight/2,d),d=Math.min(d,l.height-n.value.offsetHeight/2),e.color.set("alpha",Math.round((d-n.value.offsetHeight/2)/(l.height-n.value.offsetHeight)*100))}else{let d=c-l.left;d=Math.max(n.value.offsetWidth/2,d),d=Math.min(d,l.width-n.value.offsetWidth/2),e.color.set("alpha",Math.round((d-n.value.offsetWidth/2)/(l.width-n.value.offsetWidth)*100))}}return{thumb:n,bar:o,handleDrag:i,handleClick:s}},bE=(e,{bar:t,thumb:n,handleDrag:o})=>{const s=De(),i=he("color-alpha-slider"),r=A(0),a=A(0),l=A();function c(){if(!n.value||e.vertical)return 0;const y=s.vnode.el,w=e.color.get("alpha");return y?Math.round(w*(y.offsetWidth-n.value.offsetWidth/2)/100):0}function u(){if(!n.value)return 0;const y=s.vnode.el;if(!e.vertical)return 0;const w=e.color.get("alpha");return y?Math.round(w*(y.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(e.color&&e.color.value){const{r:y,g:w,b:_}=e.color.toRgb();return`linear-gradient(to right, rgba(${y}, ${w}, ${_}, 0) 0%, rgba(${y}, ${w}, ${_}, 1) 100%)`}return""}function f(){r.value=c(),a.value=u(),l.value=d()}Be(()=>{if(!t.value||!n.value)return;const y={drag:w=>{o(w)},end:w=>{o(w)}};Ii(t.value,y),Ii(n.value,y),f()}),se(()=>e.color.get("alpha"),()=>f()),se(()=>e.color.value,()=>f());const p=P(()=>[i.b(),i.is("vertical",e.vertical)]),g=P(()=>i.e("bar")),h=P(()=>i.e("thumb")),v=P(()=>({background:l.value})),m=P(()=>({left:$n(r.value),top:$n(a.value)}));return{rootKls:p,barKls:g,barStyle:v,thumbKls:h,thumbStyle:m,update:f}},yE="ElColorAlphaSlider",_E=Y({name:yE}),wE=Y({..._E,props:mE,setup(e,{expose:t}){const n=e,{bar:o,thumb:s,handleDrag:i,handleClick:r}=vE(n),{rootKls:a,barKls:l,barStyle:c,thumbKls:u,thumbStyle:d,update:f}=bE(n,{bar:o,thumb:s,handleDrag:i});return t({update:f,bar:o,thumb:s}),(p,g)=>(M(),N("div",{class:R(b(a))},[E("div",{ref_key:"bar",ref:o,class:R(b(l)),style:Te(b(c)),onClick:g[0]||(g[0]=(...h)=>b(r)&&b(r)(...h))},null,6),E("div",{ref_key:"thumb",ref:s,class:R(b(u)),style:Te(b(d))},null,6)],2))}});var xE=ve(wE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/alpha-slider.vue"]]);const SE=Y({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=he("color-hue-slider"),n=De(),o=A(),s=A(),i=A(0),r=A(0),a=P(()=>e.color.get("hue"));se(()=>a.value,()=>{f()});function l(p){p.target!==o.value&&c(p)}function c(p){if(!s.value||!o.value)return;const h=n.vnode.el.getBoundingClientRect(),{clientX:v,clientY:m}=hc(p);let y;if(e.vertical){let w=m-h.top;w=Math.min(w,h.height-o.value.offsetHeight/2),w=Math.max(o.value.offsetHeight/2,w),y=Math.round((w-o.value.offsetHeight/2)/(h.height-o.value.offsetHeight)*360)}else{let w=v-h.left;w=Math.min(w,h.width-o.value.offsetWidth/2),w=Math.max(o.value.offsetWidth/2,w),y=Math.round((w-o.value.offsetWidth/2)/(h.width-o.value.offsetWidth)*360)}e.color.set("hue",y)}function u(){if(!o.value)return 0;const p=n.vnode.el;if(e.vertical)return 0;const g=e.color.get("hue");return p?Math.round(g*(p.offsetWidth-o.value.offsetWidth/2)/360):0}function d(){if(!o.value)return 0;const p=n.vnode.el;if(!e.vertical)return 0;const g=e.color.get("hue");return p?Math.round(g*(p.offsetHeight-o.value.offsetHeight/2)/360):0}function f(){i.value=u(),r.value=d()}return Be(()=>{if(!s.value||!o.value)return;const p={drag:g=>{c(g)},end:g=>{c(g)}};Ii(s.value,p),Ii(o.value,p),f()}),{bar:s,thumb:o,thumbLeft:i,thumbTop:r,hueValue:a,handleClick:l,update:f,ns:t}}});function CE(e,t,n,o,s,i){return M(),N("div",{class:R([e.ns.b(),e.ns.is("vertical",e.vertical)])},[E("div",{ref:"bar",class:R(e.ns.e("bar")),onClick:t[0]||(t[0]=(...r)=>e.handleClick&&e.handleClick(...r))},null,2),E("div",{ref:"thumb",class:R(e.ns.e("thumb")),style:Te({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var kE=ve(SE,[["render",CE],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/hue-slider.vue"]]);const EE=ke({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:ao,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:ye(Array)},validateEvent:{type:Boolean,default:!0}}),ME={[Je]:e=>st(e)||es(e),[io]:e=>st(e)||es(e),activeChange:e=>st(e)||es(e)},Lg=Symbol("colorPickerContextKey"),Ld=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},PE=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},TE=function(e){return typeof e=="string"&&e.includes("%")},xs=function(e,t){PE(e)&&(e="100%");const n=TE(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},$d={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Nr=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${$d[t]||t}${$d[n]||n}`},Id=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${Nr(e)}${Nr(t)}${Nr(n)}`},Ha={A:10,B:11,C:12,D:13,E:14,F:15},No=function(e){return e.length===2?(Ha[e[0].toUpperCase()]||+e[0])*16+(Ha[e[1].toUpperCase()]||+e[1]):Ha[e[1].toUpperCase()]||+e[1]},OE=function(e,t,n){t=t/100,n=n/100;let o=t;const s=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,o*=s<=1?s:2-s;const i=(n+t)/2,r=n===0?2*o/(s+o):2*t/(n+t);return{h:e,s:r*100,v:i*100}},Fd=(e,t,n)=>{e=xs(e,255),t=xs(t,255),n=xs(n,255);const o=Math.max(e,t,n),s=Math.min(e,t,n);let i;const r=o,a=o-s,l=o===0?0:a/o;if(o===s)i=0;else{switch(o){case e:{i=(t-n)/a+(t<n?6:0);break}case t:{i=(n-e)/a+2;break}case n:{i=(e-t)/a+4;break}}i/=6}return{h:i*360,s:l*100,v:r*100}},Zs=function(e,t,n){e=xs(e,360)*6,t=xs(t,100),n=xs(n,100);const o=Math.floor(e),s=e-o,i=n*(1-t),r=n*(1-s*t),a=n*(1-(1-s)*t),l=o%6,c=[n,r,i,i,a,n][l],u=[a,n,n,r,i,i][l],d=[i,i,a,n,n,r][l];return{r:Math.round(c*255),g:Math.round(u*255),b:Math.round(d*255)}};class vi{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in t)so(t,n)&&(this[n]=t[n]);t.value?this.fromString(t.value):this.doOnChange()}set(t,n){if(arguments.length===1&&typeof t=="object"){for(const o in t)so(t,o)&&this.set(o,t[o]);return}this[`_${t}`]=n,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return Zs(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(o,s,i)=>{this._hue=Math.max(0,Math.min(360,o)),this._saturation=Math.max(0,Math.min(100,s)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(t.includes("hsl")){const o=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,i)=>i>2?Number.parseFloat(s):Number.parseInt(s,10));if(o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3){const{h:s,s:i,v:r}=OE(o[0],o[1],o[2]);n(s,i,r)}}else if(t.includes("hsv")){const o=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,i)=>i>2?Number.parseFloat(s):Number.parseInt(s,10));o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3&&n(o[0],o[1],o[2])}else if(t.includes("rgb")){const o=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,i)=>i>2?Number.parseFloat(s):Number.parseInt(s,10));if(o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3){const{h:s,s:i,v:r}=Fd(o[0],o[1],o[2]);n(s,i,r)}}else if(t.includes("#")){const o=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(o))return;let s,i,r;o.length===3?(s=No(o[0]+o[0]),i=No(o[1]+o[1]),r=No(o[2]+o[2])):(o.length===6||o.length===8)&&(s=No(o.slice(0,2)),i=No(o.slice(2,4)),r=No(o.slice(4,6))),o.length===8?this._alpha=No(o.slice(6))/255*100:(o.length===3||o.length===6)&&(this._alpha=100);const{h:a,s:l,v:c}=Fd(s,i,r);n(a,l,c)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:n,_value:o,_alpha:s,format:i}=this;if(this.enableAlpha)switch(i){case"hsl":{const r=Ld(t,n/100,o/100);this.value=`hsla(${t}, ${Math.round(r[1]*100)}%, ${Math.round(r[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(n)}%, ${Math.round(o)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${Id(Zs(t,n,o))}${Nr(s*255/100)}`;break}default:{const{r,g:a,b:l}=Zs(t,n,o);this.value=`rgba(${r}, ${a}, ${l}, ${this.get("alpha")/100})`}}else switch(i){case"hsl":{const r=Ld(t,n/100,o/100);this.value=`hsl(${t}, ${Math.round(r[1]*100)}%, ${Math.round(r[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(n)}%, ${Math.round(o)}%)`;break}case"rgb":{const{r,g:a,b:l}=Zs(t,n,o);this.value=`rgb(${r}, ${a}, ${l})`;break}default:this.value=Id(Zs(t,n,o))}}}const AE=Y({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=he("color-predefine"),{currentColor:n}=we(Lg),o=A(i(e.colors,e.color));se(()=>n.value,r=>{const a=new vi;a.fromString(r),o.value.forEach(l=>{l.selected=a.compare(l)})}),Co(()=>{o.value=i(e.colors,e.color)});function s(r){e.color.fromString(e.colors[r])}function i(r,a){return r.map(l=>{const c=new vi;return c.enableAlpha=!0,c.format="rgba",c.fromString(l),c.selected=c.value===a.value,c})}return{rgbaColors:o,handleSelect:s,ns:t}}}),RE=["onClick"];function LE(e,t,n,o,s,i){return M(),N("div",{class:R(e.ns.b())},[E("div",{class:R(e.ns.e("colors"))},[(M(!0),N(Ge,null,Lt(e.rgbaColors,(r,a)=>(M(),N("div",{key:e.colors[a],class:R([e.ns.e("color-selector"),e.ns.is("alpha",r._alpha<100),{selected:r.selected}]),onClick:l=>e.handleSelect(a)},[E("div",{style:Te({backgroundColor:r.value})},null,4)],10,RE))),128))],2)],2)}var $E=ve(AE,[["render",LE],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/predefine.vue"]]);const IE=Y({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=he("color-svpanel"),n=De(),o=A(0),s=A(0),i=A("hsl(0, 100%, 50%)"),r=P(()=>{const c=e.color.get("hue"),u=e.color.get("value");return{hue:c,value:u}});function a(){const c=e.color.get("saturation"),u=e.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:p}=d;s.value=c*f/100,o.value=(100-u)*p/100,i.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function l(c){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:p}=hc(c);let g=f-d.left,h=p-d.top;g=Math.max(0,g),g=Math.min(g,d.width),h=Math.max(0,h),h=Math.min(h,d.height),s.value=g,o.value=h,e.color.set({saturation:g/d.width*100,value:100-h/d.height*100})}return se(()=>r.value,()=>{a()}),Be(()=>{Ii(n.vnode.el,{drag:c=>{l(c)},end:c=>{l(c)}}),a()}),{cursorTop:o,cursorLeft:s,background:i,colorValue:r,handleDrag:l,update:a,ns:t}}}),FE=E("div",null,null,-1),DE=[FE];function BE(e,t,n,o,s,i){return M(),N("div",{class:R(e.ns.b()),style:Te({backgroundColor:e.background})},[E("div",{class:R(e.ns.e("white"))},null,2),E("div",{class:R(e.ns.e("black"))},null,2),E("div",{class:R(e.ns.e("cursor")),style:Te({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},DE,6)],6)}var NE=ve(IE,[["render",BE],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/sv-panel.vue"]]);const zE=["id","aria-label","aria-labelledby","aria-description","tabindex","onKeydown"],VE=Y({name:"ElColorPicker"}),HE=Y({...VE,props:EE,emits:ME,setup(e,{expose:t,emit:n}){const o=e,{t:s}=Wt(),i=he("color"),{formItem:r}=co(),a=cn(),l=fs(),{inputId:c,isLabeledByFormItem:u}=Ks(o,{formItemContext:r}),d=A(),f=A(),p=A(),g=A();let h=!0;const v=Ht(new vi({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue})),m=A(!1),y=A(!1),w=A(""),_=P(()=>!o.modelValue&&!y.value?"transparent":T(v,o.showAlpha)),x=P(()=>!o.modelValue&&!y.value?"":v.value),S=P(()=>u.value?void 0:o.label||s("el.colorpicker.defaultLabel")),C=P(()=>u.value?r==null?void 0:r.labelId:void 0),k=P(()=>[i.b("picker"),i.is("disabled",l.value),i.bm("picker",a.value)]);function T(I,Z){if(!(I instanceof vi))throw new TypeError("color should be instance of _color Class");const{r:de,g:J,b:G}=I.toRgb();return Z?`rgba(${de}, ${J}, ${G}, ${I.get("alpha")/100})`:`rgb(${de}, ${J}, ${G})`}function B(I){m.value=I}const $=rs(B,100);function D(){l.value||B(!0)}function W(){$(!1),ne()}function ne(){xe(()=>{o.modelValue?v.fromString(o.modelValue):(v.value="",xe(()=>{y.value=!1}))})}function j(){l.value||$(!m.value)}function Q(){v.fromString(w.value)}function V(){const I=v.value;n(Je,I),n("change",I),o.validateEvent&&(r==null||r.validate("change").catch(Z=>void 0)),$(!1),xe(()=>{const Z=new vi({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue});v.compare(Z)||ne()})}function le(){$(!1),n(Je,null),n("change",null),o.modelValue!==null&&o.validateEvent&&(r==null||r.validate("change").catch(I=>void 0)),ne()}return Be(()=>{o.modelValue&&(w.value=x.value)}),se(()=>o.modelValue,I=>{I?I&&I!==v.value&&(h=!1,v.fromString(I)):y.value=!1}),se(()=>x.value,I=>{w.value=I,h&&n("activeChange",I),h=!0}),se(()=>v.value,()=>{!o.modelValue&&!y.value&&(y.value=!0)}),se(()=>m.value,()=>{xe(()=>{var I,Z,de;(I=d.value)==null||I.update(),(Z=f.value)==null||Z.update(),(de=p.value)==null||de.update()})}),rt(Lg,{currentColor:x}),t({color:v,show:D,hide:W}),(I,Z)=>(M(),q(b(Io),{ref_key:"popper",ref:g,visible:m.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[b(i).be("picker","panel"),b(i).b("dropdown"),I.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${b(i).namespace.value}-zoom-in-top`,persistent:""},{content:F(()=>[We((M(),N("div",null,[E("div",{class:R(b(i).be("dropdown","main-wrapper"))},[L(kE,{ref_key:"hue",ref:d,class:"hue-slider",color:b(v),vertical:""},null,8,["color"]),L(NE,{ref_key:"sv",ref:f,color:b(v)},null,8,["color"])],2),I.showAlpha?(M(),q(xE,{key:0,ref_key:"alpha",ref:p,color:b(v)},null,8,["color"])):X("v-if",!0),I.predefine?(M(),q($E,{key:1,ref:"predefine",color:b(v),colors:I.predefine},null,8,["color","colors"])):X("v-if",!0),E("div",{class:R(b(i).be("dropdown","btns"))},[E("span",{class:R(b(i).be("dropdown","value"))},[L(b($o),{modelValue:w.value,"onUpdate:modelValue":Z[0]||(Z[0]=de=>w.value=de),"validate-event":!1,size:"small",onKeyup:ft(Q,["enter"]),onBlur:Q},null,8,["modelValue","onKeyup"])],2),L(b(Dn),{class:R(b(i).be("dropdown","link-btn")),text:"",size:"small",onClick:le},{default:F(()=>[fe(ce(b(s)("el.colorpicker.clear")),1)]),_:1},8,["class"]),L(b(Dn),{plain:"",size:"small",class:R(b(i).be("dropdown","btn")),onClick:V},{default:F(()=>[fe(ce(b(s)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)])),[[b(zc),W]])]),default:F(()=>[E("div",{id:b(c),class:R(b(k)),role:"button","aria-label":b(S),"aria-labelledby":b(C),"aria-description":b(s)("el.colorpicker.description",{color:I.modelValue||""}),tabindex:I.tabindex,onKeydown:ft(j,["enter"])},[b(l)?(M(),N("div",{key:0,class:R(b(i).be("picker","mask"))},null,2)):X("v-if",!0),E("div",{class:R(b(i).be("picker","trigger")),onClick:j},[E("span",{class:R([b(i).be("picker","color"),b(i).is("alpha",I.showAlpha)])},[E("span",{class:R(b(i).be("picker","color-inner")),style:Te({backgroundColor:b(_)})},[We(L(b($e),{class:R([b(i).be("picker","icon"),b(i).is("icon-arrow-down")])},{default:F(()=>[L(b(fc))]),_:1},8,["class"]),[[Et,I.modelValue||y.value]]),We(L(b($e),{class:R([b(i).be("picker","empty"),b(i).is("icon-close")])},{default:F(()=>[L(b(Mi))]),_:1},8,["class"]),[[Et,!I.modelValue&&!y.value]])],6)],2)],2)],42,zE)]),_:1},8,["visible","popper-class","transition"]))}});var WE=ve(HE,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/color-picker.vue"]]);const jE=dt(WE),KE=ke({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:ye([String,Array,Object])},zIndex:{type:ye([String,Number])}}),UE={click:e=>e instanceof MouseEvent},qE="overlay";var YE=Y({name:"ElOverlay",props:KE,emits:UE,setup(e,{slots:t,emit:n}){const o=he(qE),s=l=>{n("click",l)},{onClick:i,onMousedown:r,onMouseup:a}=Wp(e.customMaskEvent?void 0:s);return()=>e.mask?L("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:i,onMousedown:r,onMouseup:a},[me(t,"default")],Rr.STYLE|Rr.CLASS|Rr.PROPS,["onClick","onMouseup","onMousedown"]):Ce("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[me(t,"default")])}});const GE=YE,$g=Symbol("elPaginationKey"),XE=ke({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:yt}}),QE={click:e=>e instanceof MouseEvent},JE=["disabled","aria-label","aria-disabled"],ZE={key:0},eM=Y({name:"ElPaginationPrev"}),tM=Y({...eM,props:XE,emits:QE,setup(e){const t=e,{t:n}=Wt(),o=P(()=>t.disabled||t.currentPage<=1);return(s,i)=>(M(),N("button",{type:"button",class:"btn-prev",disabled:b(o),"aria-label":s.prevText||b(n)("el.pagination.prev"),"aria-disabled":b(o),onClick:i[0]||(i[0]=r=>s.$emit("click",r))},[s.prevText?(M(),N("span",ZE,ce(s.prevText),1)):(M(),q(b($e),{key:1},{default:F(()=>[(M(),q(Ue(s.prevIcon)))]),_:1}))],8,JE))}});var nM=ve(tM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]);const oM=ke({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:yt}}),sM=["disabled","aria-label","aria-disabled"],iM={key:0},rM=Y({name:"ElPaginationNext"}),aM=Y({...rM,props:oM,emits:["click"],setup(e){const t=e,{t:n}=Wt(),o=P(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(s,i)=>(M(),N("button",{type:"button",class:"btn-next",disabled:b(o),"aria-label":s.nextText||b(n)("el.pagination.next"),"aria-disabled":b(o),onClick:i[0]||(i[0]=r=>s.$emit("click",r))},[s.nextText?(M(),N("span",iM,ce(s.nextText),1)):(M(),q(b($e),{key:1},{default:F(()=>[(M(),q(Ue(s.nextIcon)))]),_:1}))],8,sM))}});var lM=ve(aM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]);const Ig=Symbol("ElSelectGroup"),Sa=Symbol("ElSelect");function cM(e,t){const n=we(Sa),o=we(Ig,{disabled:!1}),s=P(()=>Object.prototype.toString.call(e.value).toLowerCase()==="[object object]"),i=P(()=>n.props.multiple?d(n.props.modelValue,e.value):f(e.value,n.props.modelValue)),r=P(()=>{if(n.props.multiple){const h=n.props.modelValue||[];return!i.value&&h.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=P(()=>e.label||(s.value?"":e.value)),l=P(()=>e.value||e.label||""),c=P(()=>e.disabled||t.groupDisabled||r.value),u=De(),d=(h=[],v)=>{if(s.value){const m=n.props.valueKey;return h&&h.some(y=>ks(Dt(y,m))===Dt(v,m))}else return h&&h.includes(v)},f=(h,v)=>{if(s.value){const{valueKey:m}=n.props;return Dt(h,m)===Dt(v,m)}else return h===v},p=()=>{!e.disabled&&!o.disabled&&(n.hoverIndex=n.optionsArray.indexOf(u.proxy))};se(()=>a.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),se(()=>e.value,(h,v)=>{const{remote:m,valueKey:y}=n.props;if(Object.is(h,v)||(n.onOptionDestroy(v,u.proxy),n.onOptionCreate(u.proxy)),!e.created&&!m){if(y&&typeof h=="object"&&typeof v=="object"&&h[y]===v[y])return;n.setSelected()}}),se(()=>o.disabled,()=>{t.groupDisabled=o.disabled},{immediate:!0});const{queryChange:g}=ks(n);return se(g,h=>{const{query:v}=b(h),m=new RegExp(Hw(v),"i");t.visible=m.test(a.value)||e.created,t.visible||n.filteredOptionsCount--},{immediate:!0}),{select:n,currentLabel:a,currentValue:l,itemSelected:i,isDisabled:c,hoverItem:p}}const uM=Y({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=he("select"),n=P(()=>[t.be("dropdown","item"),t.is("disabled",b(r)),{selected:b(i),hover:b(u)}]),o=Ht({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:s,itemSelected:i,isDisabled:r,select:a,hoverItem:l}=cM(e,o),{visible:c,hover:u}=lo(o),d=De().proxy;a.onOptionCreate(d),Pt(()=>{const p=d.value,{selected:g}=a,v=(a.props.multiple?g:[g]).some(m=>m.value===d.value);xe(()=>{a.cachedOptions.get(p)===d&&!v&&a.cachedOptions.delete(p)}),a.onOptionDestroy(p,d)});function f(){e.disabled!==!0&&o.groupDisabled!==!0&&a.handleOptionSelect(d)}return{ns:t,containerKls:n,currentLabel:s,itemSelected:i,isDisabled:r,select:a,hoverItem:l,visible:c,hover:u,selectOptionClick:f,states:o}}});function dM(e,t,n,o,s,i){return We((M(),N("li",{class:R(e.containerKls),onMouseenter:t[0]||(t[0]=(...r)=>e.hoverItem&&e.hoverItem(...r)),onClick:t[1]||(t[1]=et((...r)=>e.selectOptionClick&&e.selectOptionClick(...r),["stop"]))},[me(e.$slots,"default",{},()=>[E("span",null,ce(e.currentLabel),1)])],34)),[[Et,e.visible]])}var Hc=ve(uM,[["render",dM],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const fM=Y({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=we(Sa),t=he("select"),n=P(()=>e.props.popperClass),o=P(()=>e.props.multiple),s=P(()=>e.props.fitInputWidth),i=A("");function r(){var a;i.value=`${(a=e.selectWrapper)==null?void 0:a.offsetWidth}px`}return Be(()=>{r(),In(e.selectWrapper,r)}),{ns:t,minWidth:i,popperClass:n,isMultiple:o,isFitInputWidth:s}}});function hM(e,t,n,o,s,i){return M(),N("div",{class:R([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Te({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[me(e.$slots,"default")],6)}var pM=ve(fM,[["render",hM],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);function gM(e){const{t}=Wt();return Ht({options:new Map,cachedOptions:new Map,disabledOptions:new Map,createdLabel:null,createdSelected:!1,selected:e.multiple?[]:{},inputLength:20,inputWidth:0,optionsCount:0,filteredOptionsCount:0,visible:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,cachedPlaceHolder:"",currentPlaceholder:t("el.select.placeholder"),menuVisibleOnFocus:!1,isOnComposition:!1,prefixWidth:11,mouseEnter:!1,focused:!1})}const mM=(e,t,n)=>{const{t:o}=Wt(),s=he("select");ya({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},P(()=>e.suffixTransition===!1));const i=A(null),r=A(null),a=A(null),l=A(null),c=A(null),u=A(null),d=A(null),f=A(null),p=A(-1),g=bn({query:""}),h=bn(""),v=A([]);let m=0;const{form:y,formItem:w}=co(),_=P(()=>!e.filterable||e.multiple||!t.visible),x=P(()=>e.disabled||(y==null?void 0:y.disabled)),S=P(()=>{const z=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!=="";return e.clearable&&!x.value&&t.inputHovering&&z}),C=P(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),k=P(()=>s.is("reverse",C.value&&t.visible&&e.suffixTransition)),T=P(()=>(y==null?void 0:y.statusIcon)&&(w==null?void 0:w.validateState)&&Vh[w==null?void 0:w.validateState]),B=P(()=>e.remote?300:0),$=P(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&t.query===""&&t.options.size===0?!1:e.filterable&&t.query&&t.options.size>0&&t.filteredOptionsCount===0?e.noMatchText||o("el.select.noMatch"):t.options.size===0?e.noDataText||o("el.select.noData"):null),D=P(()=>{const z=Array.from(t.options.values()),ee=[];return v.value.forEach(ue=>{const Pe=z.findIndex(xt=>xt.currentLabel===ue);Pe>-1&&ee.push(z[Pe])}),ee.length>=z.length?ee:z}),W=P(()=>Array.from(t.cachedOptions.values())),ne=P(()=>{const z=D.value.filter(ee=>!ee.created).some(ee=>ee.currentLabel===t.query);return e.filterable&&e.allowCreate&&t.query!==""&&!z}),j=cn(),Q=P(()=>["small"].includes(j.value)?"small":"default"),V=P({get(){return t.visible&&$.value!==!1},set(z){t.visible=z}});se([()=>x.value,()=>j.value,()=>y==null?void 0:y.size],()=>{xe(()=>{le()})}),se(()=>e.placeholder,z=>{t.cachedPlaceHolder=t.currentPlaceholder=z,e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(t.currentPlaceholder="")}),se(()=>e.modelValue,(z,ee)=>{e.multiple&&(le(),z&&z.length>0||r.value&&t.query!==""?t.currentPlaceholder="":t.currentPlaceholder=t.cachedPlaceHolder,e.filterable&&!e.reserveKeyword&&(t.query="",I(t.query))),J(),e.filterable&&!e.multiple&&(t.inputLength=20),!oa(z,ee)&&e.validateEvent&&(w==null||w.validate("change").catch(ue=>void 0))},{flush:"post",deep:!0}),se(()=>t.visible,z=>{var ee,ue,Pe,xt,At;z?((ue=(ee=l.value)==null?void 0:ee.updatePopper)==null||ue.call(ee),e.filterable&&(t.filteredOptionsCount=t.optionsCount,t.query=e.remote?"":t.selectedLabel,(xt=(Pe=a.value)==null?void 0:Pe.focus)==null||xt.call(Pe),e.multiple?(At=r.value)==null||At.focus():t.selectedLabel&&(t.currentPlaceholder=`${t.selectedLabel}`,t.selectedLabel=""),I(t.query),!e.multiple&&!e.remote&&(g.value.query="",Qs(g),Qs(h)))):(e.filterable&&(mt(e.filterMethod)&&e.filterMethod(""),mt(e.remoteMethod)&&e.remoteMethod("")),t.query="",t.previousQuery=null,t.selectedLabel="",t.inputLength=20,t.menuVisibleOnFocus=!1,U(),xe(()=>{r.value&&r.value.value===""&&t.selected.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}),e.multiple||(t.selected&&(e.filterable&&e.allowCreate&&t.createdSelected&&t.createdLabel?t.selectedLabel=t.createdLabel:t.selectedLabel=t.selected.currentLabel,e.filterable&&(t.query=t.selectedLabel)),e.filterable&&(t.currentPlaceholder=t.cachedPlaceHolder))),n.emit("visible-change",z)}),se(()=>t.options.entries(),()=>{var z,ee,ue;if(!ot)return;(ee=(z=l.value)==null?void 0:z.updatePopper)==null||ee.call(z),e.multiple&&le();const Pe=((ue=d.value)==null?void 0:ue.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Po(e.modelValue)||!Array.from(Pe).includes(document.activeElement))&&J(),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&de()},{flush:"post"}),se(()=>t.hoverIndex,z=>{He(z)&&z>-1?p.value=D.value[z]||{}:p.value={},D.value.forEach(ee=>{ee.hover=p.value===ee})});const le=()=>{xe(()=>{var z,ee;if(!i.value)return;const ue=i.value.$el.querySelector("input");m=m||(ue.clientHeight>0?ue.clientHeight+2:0);const Pe=u.value,xt=Uw(j.value||(y==null?void 0:y.size)),At=j.value||xt===m||m<=0?xt:m;!(ue.offsetParent===null)&&(ue.style.height=`${(t.selected.length===0?At:Math.max(Pe?Pe.clientHeight+(Pe.clientHeight>At?6:0):0,At))-2}px`),t.visible&&$.value!==!1&&((ee=(z=l.value)==null?void 0:z.updatePopper)==null||ee.call(z))})},I=async z=>{if(!(t.previousQuery===z||t.isOnComposition)){if(t.previousQuery===null&&(mt(e.filterMethod)||mt(e.remoteMethod))){t.previousQuery=z;return}t.previousQuery=z,xe(()=>{var ee,ue;t.visible&&((ue=(ee=l.value)==null?void 0:ee.updatePopper)==null||ue.call(ee))}),t.hoverIndex=-1,e.multiple&&e.filterable&&xe(()=>{if(!x.value){const ee=r.value.value.length*15+20;t.inputLength=e.collapseTags?Math.min(50,ee):ee,Z()}le()}),e.remote&&mt(e.remoteMethod)?(t.hoverIndex=-1,e.remoteMethod(z)):mt(e.filterMethod)?(e.filterMethod(z),Qs(h)):(t.filteredOptionsCount=t.optionsCount,g.value.query=z,Qs(g),Qs(h)),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&(await xe(),de())}},Z=()=>{t.currentPlaceholder!==""&&(t.currentPlaceholder=r.value.value?"":t.cachedPlaceHolder)},de=()=>{const z=D.value.filter(Pe=>Pe.visible&&!Pe.disabled&&!Pe.states.groupDisabled),ee=z.find(Pe=>Pe.created),ue=z[0];t.hoverIndex=gt(D.value,ee||ue)},J=()=>{var z;if(e.multiple)t.selectedLabel="";else{const ue=G(e.modelValue);(z=ue.props)!=null&&z.created?(t.createdLabel=ue.props.value,t.createdSelected=!0):t.createdSelected=!1,t.selectedLabel=ue.currentLabel,t.selected=ue,e.filterable&&(t.query=t.selectedLabel);return}const ee=[];Array.isArray(e.modelValue)&&e.modelValue.forEach(ue=>{ee.push(G(ue))}),t.selected=ee,xe(()=>{le()})},G=z=>{let ee;const ue=Aa(z).toLowerCase()==="object",Pe=Aa(z).toLowerCase()==="null",xt=Aa(z).toLowerCase()==="undefined";for(let Wn=t.cachedOptions.size-1;Wn>=0;Wn--){const dn=W.value[Wn];if(ue?Dt(dn.value,e.valueKey)===Dt(z,e.valueKey):dn.value===z){ee={value:z,currentLabel:dn.currentLabel,isDisabled:dn.isDisabled};break}}if(ee)return ee;const At=ue?z.label:!Pe&&!xt?z:"",Hn={value:z,currentLabel:At};return e.multiple&&(Hn.hitState=!1),Hn},U=()=>{setTimeout(()=>{const z=e.valueKey;e.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(ee=>D.value.findIndex(ue=>Dt(ue,z)===Dt(ee,z)))):t.hoverIndex=-1:t.hoverIndex=D.value.findIndex(ee=>Ne(ee)===Ne(t.selected))},300)},re=()=>{var z,ee;ie(),(ee=(z=l.value)==null?void 0:z.updatePopper)==null||ee.call(z),e.multiple&&le()},ie=()=>{var z;t.inputWidth=(z=i.value)==null?void 0:z.$el.offsetWidth},O=()=>{e.filterable&&t.query!==t.selectedLabel&&(t.query=t.selectedLabel,I(t.query))},H=rs(()=>{O()},B.value),K=rs(z=>{I(z.target.value)},B.value),te=z=>{oa(e.modelValue,z)||n.emit(io,z)},ge=z=>Rw(z,ee=>!t.disabledOptions.has(ee)),Le=z=>{if(z.code!==on.delete){if(z.target.value.length<=0&&!Kt()){const ee=e.modelValue.slice(),ue=ge(ee);if(ue<0)return;ee.splice(ue,1),n.emit(Je,ee),te(ee)}z.target.value.length===1&&e.modelValue.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}},Ee=(z,ee)=>{const ue=t.selected.indexOf(ee);if(ue>-1&&!x.value){const Pe=e.modelValue.slice();Pe.splice(ue,1),n.emit(Je,Pe),te(Pe),n.emit("remove-tag",ee.value)}z.stopPropagation(),be()},_e=z=>{z.stopPropagation();const ee=e.multiple?[]:"";if(!st(ee))for(const ue of t.selected)ue.isDisabled&&ee.push(ue.value);n.emit(Je,ee),te(ee),t.hoverIndex=-1,t.visible=!1,n.emit("clear"),be()},Ve=z=>{var ee;if(e.multiple){const ue=(e.modelValue||[]).slice(),Pe=gt(ue,z.value);Pe>-1?ue.splice(Pe,1):(e.multipleLimit<=0||ue.length<e.multipleLimit)&&ue.push(z.value),n.emit(Je,ue),te(ue),z.created&&(t.query="",I(""),t.inputLength=20),e.filterable&&((ee=r.value)==null||ee.focus())}else n.emit(Je,z.value),te(z.value),t.visible=!1;Ye(),!t.visible&&xe(()=>{jt(z)})},gt=(z=[],ee)=>{if(!wn(ee))return z.indexOf(ee);const ue=e.valueKey;let Pe=-1;return z.some((xt,At)=>ks(Dt(xt,ue))===Dt(ee,ue)?(Pe=At,!0):!1),Pe},Ye=()=>{const z=r.value||i.value;z&&(z==null||z.focus())},jt=z=>{var ee,ue,Pe,xt,At;const Hn=Array.isArray(z)?z[0]:z;let Wn=null;if(Hn!=null&&Hn.value){const dn=D.value.filter(St=>St.value===Hn.value);dn.length>0&&(Wn=dn[0].$el)}if(l.value&&Wn){const dn=(xt=(Pe=(ue=(ee=l.value)==null?void 0:ee.popperRef)==null?void 0:ue.contentRef)==null?void 0:Pe.querySelector)==null?void 0:xt.call(Pe,`.${s.be("dropdown","wrap")}`);dn&&Kw(dn,Wn)}(At=f.value)==null||At.handleScroll()},zn=z=>{t.optionsCount++,t.filteredOptionsCount++,t.options.set(z.value,z),t.cachedOptions.set(z.value,z),z.disabled&&t.disabledOptions.set(z.value,z)},Tt=(z,ee)=>{t.options.get(z)===ee&&(t.optionsCount--,t.filteredOptionsCount--,t.options.delete(z))},Zt=z=>{z.code!==on.backspace&&Kt(!1),t.inputLength=r.value.value.length*15+20,le()},Kt=z=>{if(!Array.isArray(t.selected))return;const ee=ge(t.selected.map(Pe=>Pe.value)),ue=t.selected[ee];if(!!ue)return z===!0||z===!1?(ue.hitState=z,z):(ue.hitState=!ue.hitState,ue.hitState)},En=z=>{const ee=z.target.value;if(z.type==="compositionend")t.isOnComposition=!1,xe(()=>I(ee));else{const ue=ee[ee.length-1]||"";t.isOnComposition=!Tp(ue)}},en=()=>{xe(()=>jt(t.selected))},oe=z=>{t.focused||((e.automaticDropdown||e.filterable)&&(e.filterable&&!t.visible&&(t.menuVisibleOnFocus=!0),t.visible=!0),t.focused=!0,n.emit("focus",z))},be=()=>{var z,ee;t.visible?(z=r.value||i.value)==null||z.focus():(ee=i.value)==null||ee.focus()},qe=()=>{var z,ee,ue;t.visible=!1,(z=i.value)==null||z.blur(),(ue=(ee=a.value)==null?void 0:ee.blur)==null||ue.call(ee)},Ut=z=>{var ee,ue,Pe;((ee=l.value)==null?void 0:ee.isFocusInsideContent(z))||((ue=c.value)==null?void 0:ue.isFocusInsideContent(z))||((Pe=d.value)==null?void 0:Pe.contains(z.relatedTarget))||(t.visible&&pe(),t.focused=!1,n.emit("blur",z))},Vn=z=>{_e(z)},pe=()=>{t.visible=!1},Se=z=>{t.visible&&(z.preventDefault(),z.stopPropagation(),t.visible=!1)},Re=z=>{z&&!t.mouseEnter||x.value||(t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:(!l.value||!l.value.isFocusInsideContent())&&(t.visible=!t.visible),be())},Oe=()=>{t.visible?D.value[t.hoverIndex]&&Ve(D.value[t.hoverIndex]):Re()},Ne=z=>wn(z.value)?Dt(z.value,e.valueKey):z.value,at=P(()=>D.value.filter(z=>z.visible).every(z=>z.disabled)),wt=P(()=>e.multiple?t.selected.slice(0,e.maxCollapseTags):[]),Mn=P(()=>e.multiple?t.selected.slice(e.maxCollapseTags):[]),Ot=z=>{if(!t.visible){t.visible=!0;return}if(!(t.options.size===0||t.filteredOptionsCount===0)&&!t.isOnComposition&&!at.value){z==="next"?(t.hoverIndex++,t.hoverIndex===t.options.size&&(t.hoverIndex=0)):z==="prev"&&(t.hoverIndex--,t.hoverIndex<0&&(t.hoverIndex=t.options.size-1));const ee=D.value[t.hoverIndex];(ee.disabled===!0||ee.states.groupDisabled===!0||!ee.visible)&&Ot(z),xe(()=>jt(p.value))}},Gs=()=>{t.mouseEnter=!0},Xs=()=>{t.mouseEnter=!1},uo=(z,ee)=>{var ue,Pe;Ee(z,ee),(Pe=(ue=c.value)==null?void 0:ue.updatePopper)==null||Pe.call(ue)},Do=P(()=>({maxWidth:`${b(t.inputWidth)-32-(T.value?22:0)}px`,width:"100%"}));return{optionList:v,optionsArray:D,selectSize:j,handleResize:re,debouncedOnInputChange:H,debouncedQueryChange:K,deletePrevTag:Le,deleteTag:Ee,deleteSelected:_e,handleOptionSelect:Ve,scrollToOption:jt,readonly:_,resetInputHeight:le,showClose:S,iconComponent:C,iconReverse:k,showNewOption:ne,collapseTagSize:Q,setSelected:J,managePlaceholder:Z,selectDisabled:x,emptyText:$,toggleLastOptionHitState:Kt,resetInputState:Zt,handleComposition:En,onOptionCreate:zn,onOptionDestroy:Tt,handleMenuEnter:en,handleFocus:oe,focus:be,blur:qe,handleBlur:Ut,handleClearClick:Vn,handleClose:pe,handleKeydownEscape:Se,toggleMenu:Re,selectOption:Oe,getValueKey:Ne,navigateOptions:Ot,handleDeleteTooltipTag:uo,dropMenuVisible:V,queryChange:g,groupQueryChange:h,showTagList:wt,collapseTagList:Mn,selectTagsStyle:Do,reference:i,input:r,iOSInput:a,tooltipRef:l,tagTooltipRef:c,tags:u,selectWrapper:d,scrollbar:f,handleMouseEnter:Gs,handleMouseLeave:Xs}};var vM=Y({name:"ElOptions",emits:["update-options"],setup(e,{slots:t,emit:n}){let o=[];function s(i,r){if(i.length!==r.length)return!1;for(const[a]of i.entries())if(i[a]!=r[a])return!1;return!0}return()=>{var i,r;const a=(i=t.default)==null?void 0:i.call(t),l=[];function c(u){!Array.isArray(u)||u.forEach(d=>{var f,p,g,h;const v=(f=(d==null?void 0:d.type)||{})==null?void 0:f.name;v==="ElOptionGroup"?c(!st(d.children)&&!Array.isArray(d.children)&&mt((p=d.children)==null?void 0:p.default)?(g=d.children)==null?void 0:g.default():d.children):v==="ElOption"?l.push((h=d.props)==null?void 0:h.label):Array.isArray(d.children)&&c(d.children)})}return a.length&&c((r=a[0])==null?void 0:r.children),s(l,o)||(o=l,n("update-options",l)),a}}});const Dd="ElSelect",bM=Y({name:Dd,componentName:Dd,components:{ElInput:$o,ElSelectMenu:pM,ElOption:Hc,ElOptions:vM,ElTag:iE,ElScrollbar:Ic,ElTooltip:Io,ElIcon:$e},directives:{ClickOutside:zc},props:{name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:{type:String,validator:Cc},effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:$i.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:yt,default:zh},fitInputWidth:Boolean,suffixIcon:{type:yt,default:fc},tagType:{...Og.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:String,values:_a,default:"bottom-start"},ariaLabel:{type:String,default:void 0}},emits:[Je,io,"remove-tag","clear","visible-change","focus","blur"],setup(e,t){const n=he("select"),o=he("input"),{t:s}=Wt(),i=gM(e),{optionList:r,optionsArray:a,selectSize:l,readonly:c,handleResize:u,collapseTagSize:d,debouncedOnInputChange:f,debouncedQueryChange:p,deletePrevTag:g,deleteTag:h,deleteSelected:v,handleOptionSelect:m,scrollToOption:y,setSelected:w,resetInputHeight:_,managePlaceholder:x,showClose:S,selectDisabled:C,iconComponent:k,iconReverse:T,showNewOption:B,emptyText:$,toggleLastOptionHitState:D,resetInputState:W,handleComposition:ne,onOptionCreate:j,onOptionDestroy:Q,handleMenuEnter:V,handleFocus:le,focus:I,blur:Z,handleBlur:de,handleClearClick:J,handleClose:G,handleKeydownEscape:U,toggleMenu:re,selectOption:ie,getValueKey:O,navigateOptions:H,handleDeleteTooltipTag:K,dropMenuVisible:te,reference:ge,input:Le,iOSInput:Ee,tooltipRef:_e,tagTooltipRef:Ve,tags:gt,selectWrapper:Ye,scrollbar:jt,queryChange:zn,groupQueryChange:Tt,handleMouseEnter:Zt,handleMouseLeave:Kt,showTagList:En,collapseTagList:en,selectTagsStyle:oe}=mM(e,i,t),{inputWidth:be,selected:qe,inputLength:Ut,filteredOptionsCount:Vn,visible:pe,selectedLabel:Se,hoverIndex:Re,query:Oe,inputHovering:Ne,currentPlaceholder:at,menuVisibleOnFocus:wt,isOnComposition:Mn,options:Ot,cachedOptions:Gs,optionsCount:Xs,prefixWidth:uo}=lo(i),Do=P(()=>{const St=[n.b()],Bo=b(l);return Bo&&St.push(n.m(Bo)),e.disabled&&St.push(n.m("disabled")),St}),z=P(()=>[n.e("tags"),n.is("disabled",b(C))]),ee=P(()=>[n.b("tags-wrapper"),{"has-prefix":b(uo)&&b(qe).length}]),ue=P(()=>[n.e("input"),n.is(b(l)),n.is("disabled",b(C))]),Pe=P(()=>[n.e("input"),n.is(b(l)),n.em("input","iOS")]),xt=P(()=>[n.is("empty",!e.allowCreate&&Boolean(b(Oe))&&b(Vn)===0)]),At=P(()=>({maxWidth:`${b(be)>123?b(be)-123:b(be)-75}px`})),Hn=P(()=>({marginLeft:`${b(uo)}px`,flexGrow:1,width:`${b(Ut)/(b(be)-32)}%`,maxWidth:`${b(be)-42}px`}));rt(Sa,Ht({props:e,options:Ot,optionsArray:a,cachedOptions:Gs,optionsCount:Xs,filteredOptionsCount:Vn,hoverIndex:Re,handleOptionSelect:m,onOptionCreate:j,onOptionDestroy:Q,selectWrapper:Ye,selected:qe,setSelected:w,queryChange:zn,groupQueryChange:Tt})),Be(()=>{i.cachedPlaceHolder=at.value=e.placeholder||(()=>s("el.select.placeholder")),e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(at.value=""),In(Ye,u),e.remote&&e.multiple&&_(),xe(()=>{const St=ge.value&&ge.value.$el;if(!!St&&(be.value=St.getBoundingClientRect().width,t.slots.prefix)){const Bo=St.querySelector(`.${o.e("prefix")}`);uo.value=Math.max(Bo.getBoundingClientRect().width+11,30)}}),w()}),e.multiple&&!Array.isArray(e.modelValue)&&t.emit(Je,[]),!e.multiple&&Array.isArray(e.modelValue)&&t.emit(Je,"");const Wn=P(()=>{var St,Bo;return(Bo=(St=_e.value)==null?void 0:St.popperRef)==null?void 0:Bo.contentRef});return{isIOS:Hv,onOptionsRendered:St=>{r.value=St},prefixWidth:uo,selectSize:l,readonly:c,handleResize:u,collapseTagSize:d,debouncedOnInputChange:f,debouncedQueryChange:p,deletePrevTag:g,deleteTag:h,handleDeleteTooltipTag:K,deleteSelected:v,handleOptionSelect:m,scrollToOption:y,inputWidth:be,selected:qe,inputLength:Ut,filteredOptionsCount:Vn,visible:pe,selectedLabel:Se,hoverIndex:Re,query:Oe,inputHovering:Ne,currentPlaceholder:at,menuVisibleOnFocus:wt,isOnComposition:Mn,options:Ot,resetInputHeight:_,managePlaceholder:x,showClose:S,selectDisabled:C,iconComponent:k,iconReverse:T,showNewOption:B,emptyText:$,toggleLastOptionHitState:D,resetInputState:W,handleComposition:ne,handleMenuEnter:V,handleFocus:le,focus:I,blur:Z,handleBlur:de,handleClearClick:J,handleClose:G,handleKeydownEscape:U,toggleMenu:re,selectOption:ie,getValueKey:O,navigateOptions:H,dropMenuVisible:te,reference:ge,input:Le,iOSInput:Ee,tooltipRef:_e,popperPaneRef:Wn,tags:gt,selectWrapper:Ye,scrollbar:jt,wrapperKls:Do,tagsKls:z,tagWrapperKls:ee,inputKls:ue,iOSInputKls:Pe,scrollbarKls:xt,selectTagsStyle:oe,nsSelect:n,tagTextStyle:At,inputStyle:Hn,handleMouseEnter:Zt,handleMouseLeave:Kt,showTagList:En,collapseTagList:en,tagTooltipRef:Ve}}}),yM=["disabled","autocomplete","aria-label"],_M=["disabled"],wM={style:{height:"100%",display:"flex","justify-content":"center","align-items":"center"}};function xM(e,t,n,o,s,i){const r=Me("el-tag"),a=Me("el-tooltip"),l=Me("el-icon"),c=Me("el-input"),u=Me("el-option"),d=Me("el-options"),f=Me("el-scrollbar"),p=Me("el-select-menu"),g=ds("click-outside");return We((M(),N("div",{ref:"selectWrapper",class:R(e.wrapperKls),onMouseenter:t[22]||(t[22]=(...h)=>e.handleMouseEnter&&e.handleMouseEnter(...h)),onMouseleave:t[23]||(t[23]=(...h)=>e.handleMouseLeave&&e.handleMouseLeave(...h)),onClick:t[24]||(t[24]=et((...h)=>e.toggleMenu&&e.toggleMenu(...h),["stop"]))},[L(a,{ref:"tooltipRef",visible:e.dropMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onShow:e.handleMenuEnter},{default:F(()=>[E("div",{class:"select-trigger",onMouseenter:t[20]||(t[20]=h=>e.inputHovering=!0),onMouseleave:t[21]||(t[21]=h=>e.inputHovering=!1)},[e.multiple?(M(),N("div",{key:0,ref:"tags",tabindex:"-1",class:R(e.tagsKls),style:Te(e.selectTagsStyle),onClick:t[15]||(t[15]=(...h)=>e.focus&&e.focus(...h))},[e.collapseTags&&e.selected.length?(M(),q(Mo,{key:0,onAfterLeave:e.resetInputHeight},{default:F(()=>[E("span",{class:R(e.tagWrapperKls)},[(M(!0),N(Ge,null,Lt(e.showTagList,h=>(M(),q(r,{key:e.getValueKey(h),closable:!e.selectDisabled&&!h.isDisabled,size:e.collapseTagSize,hit:h.hitState,type:e.tagType,"disable-transitions":"",onClose:v=>e.deleteTag(v,h)},{default:F(()=>[E("span",{class:R(e.nsSelect.e("tags-text")),style:Te(e.tagTextStyle)},ce(h.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128)),e.selected.length>e.maxCollapseTags?(M(),q(r,{key:0,closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":""},{default:F(()=>[e.collapseTagsTooltip?(M(),q(a,{key:0,ref:"tagTooltipRef",disabled:e.dropMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:F(()=>[E("span",{class:R(e.nsSelect.e("tags-text"))},"+ "+ce(e.selected.length-e.maxCollapseTags),3)]),content:F(()=>[E("div",{class:R(e.nsSelect.e("collapse-tags"))},[(M(!0),N(Ge,null,Lt(e.collapseTagList,h=>(M(),N("div",{key:e.getValueKey(h),class:R(e.nsSelect.e("collapse-tag"))},[L(r,{class:"in-tooltip",closable:!e.selectDisabled&&!h.isDisabled,size:e.collapseTagSize,hit:h.hitState,type:e.tagType,"disable-transitions":"",style:{margin:"2px"},onClose:v=>e.handleDeleteTooltipTag(v,h)},{default:F(()=>[E("span",{class:R(e.nsSelect.e("tags-text")),style:Te({maxWidth:e.inputWidth-75+"px"})},ce(h.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):(M(),N("span",{key:1,class:R(e.nsSelect.e("tags-text"))},"+ "+ce(e.selected.length-e.maxCollapseTags),3))]),_:1},8,["size","type"])):X("v-if",!0)],2)]),_:1},8,["onAfterLeave"])):X("v-if",!0),e.collapseTags?X("v-if",!0):(M(),q(Mo,{key:1,onAfterLeave:e.resetInputHeight},{default:F(()=>[E("span",{class:R(e.tagWrapperKls),style:Te(e.prefixWidth&&e.selected.length?{marginLeft:`${e.prefixWidth}px`}:"")},[(M(!0),N(Ge,null,Lt(e.selected,h=>(M(),q(r,{key:e.getValueKey(h),closable:!e.selectDisabled&&!h.isDisabled,size:e.collapseTagSize,hit:h.hitState,type:e.tagType,"disable-transitions":"",onClose:v=>e.deleteTag(v,h)},{default:F(()=>[E("span",{class:R(e.nsSelect.e("tags-text")),style:Te({maxWidth:e.inputWidth-75+"px"})},ce(h.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128))],6)]),_:1},8,["onAfterLeave"])),e.filterable&&!e.selectDisabled?We((M(),N("input",{key:2,ref:"input","onUpdate:modelValue":t[0]||(t[0]=h=>e.query=h),type:"text",class:R(e.inputKls),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Te(e.inputStyle),"aria-label":e.ariaLabel,onFocus:t[1]||(t[1]=(...h)=>e.handleFocus&&e.handleFocus(...h)),onBlur:t[2]||(t[2]=(...h)=>e.handleBlur&&e.handleBlur(...h)),onKeyup:t[3]||(t[3]=(...h)=>e.managePlaceholder&&e.managePlaceholder(...h)),onKeydown:[t[4]||(t[4]=(...h)=>e.resetInputState&&e.resetInputState(...h)),t[5]||(t[5]=ft(et(h=>e.navigateOptions("next"),["prevent"]),["down"])),t[6]||(t[6]=ft(et(h=>e.navigateOptions("prev"),["prevent"]),["up"])),t[7]||(t[7]=ft((...h)=>e.handleKeydownEscape&&e.handleKeydownEscape(...h),["esc"])),t[8]||(t[8]=ft(et((...h)=>e.selectOption&&e.selectOption(...h),["stop","prevent"]),["enter"])),t[9]||(t[9]=ft((...h)=>e.deletePrevTag&&e.deletePrevTag(...h),["delete"])),t[10]||(t[10]=ft(h=>e.visible=!1,["tab"]))],onCompositionstart:t[11]||(t[11]=(...h)=>e.handleComposition&&e.handleComposition(...h)),onCompositionupdate:t[12]||(t[12]=(...h)=>e.handleComposition&&e.handleComposition(...h)),onCompositionend:t[13]||(t[13]=(...h)=>e.handleComposition&&e.handleComposition(...h)),onInput:t[14]||(t[14]=(...h)=>e.debouncedQueryChange&&e.debouncedQueryChange(...h))},null,46,yM)),[[Wv,e.query]]):X("v-if",!0)],6)):X("v-if",!0),X(" fix: https://github.com/element-plus/element-plus/issues/11415 "),e.isIOS&&!e.multiple&&e.filterable&&e.readonly?(M(),N("input",{key:1,ref:"iOSInput",class:R(e.iOSInputKls),disabled:e.selectDisabled,type:"text"},null,10,_M)):X("v-if",!0),L(c,{id:e.id,ref:"reference",modelValue:e.selectedLabel,"onUpdate:modelValue":t[16]||(t[16]=h=>e.selectedLabel=h),type:"text",placeholder:typeof e.currentPlaceholder=="function"?e.currentPlaceholder():e.currentPlaceholder,name:e.name,autocomplete:e.autocomplete,size:e.selectSize,disabled:e.selectDisabled,readonly:e.readonly,"validate-event":!1,class:R([e.nsSelect.is("focus",e.visible)]),tabindex:e.multiple&&e.filterable?-1:void 0,label:e.ariaLabel,onFocus:e.handleFocus,onBlur:e.handleBlur,onInput:e.debouncedOnInputChange,onPaste:e.debouncedOnInputChange,onCompositionstart:e.handleComposition,onCompositionupdate:e.handleComposition,onCompositionend:e.handleComposition,onKeydown:[t[17]||(t[17]=ft(et(h=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[18]||(t[18]=ft(et(h=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),ft(et(e.selectOption,["stop","prevent"]),["enter"]),ft(e.handleKeydownEscape,["esc"]),t[19]||(t[19]=ft(h=>e.visible=!1,["tab"]))]},jv({suffix:F(()=>[e.iconComponent&&!e.showClose?(M(),q(l,{key:0,class:R([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:F(()=>[(M(),q(Ue(e.iconComponent)))]),_:1},8,["class"])):X("v-if",!0),e.showClose&&e.clearIcon?(M(),q(l,{key:1,class:R([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:F(()=>[(M(),q(Ue(e.clearIcon)))]),_:1},8,["class","onClick"])):X("v-if",!0)]),_:2},[e.$slots.prefix?{name:"prefix",fn:F(()=>[E("div",wM,[me(e.$slots,"prefix")])])}:void 0]),1032,["id","modelValue","placeholder","name","autocomplete","size","disabled","readonly","class","tabindex","label","onFocus","onBlur","onInput","onPaste","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown"])],32)]),content:F(()=>[L(p,null,{default:F(()=>[We(L(f,{ref:"scrollbar",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:R(e.scrollbarKls)},{default:F(()=>[e.showNewOption?(M(),q(u,{key:0,value:e.query,created:!0},null,8,["value"])):X("v-if",!0),L(d,{onUpdateOptions:e.onOptionsRendered},{default:F(()=>[me(e.$slots,"default")]),_:3},8,["onUpdateOptions"])]),_:3},8,["wrap-class","view-class","class"]),[[Et,e.options.size>0&&!e.loading]]),e.emptyText&&(!e.allowCreate||e.loading||e.allowCreate&&e.options.size===0)?(M(),N(Ge,{key:0},[e.$slots.empty?me(e.$slots,"empty",{key:0}):(M(),N("p",{key:1,class:R(e.nsSelect.be("dropdown","empty"))},ce(e.emptyText),3))],64)):X("v-if",!0)]),_:3})]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onShow"])],34)),[[g,e.handleClose,e.popperPaneRef]])}var SM=ve(bM,[["render",xM],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const CM=Y({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=he("select"),n=A(!0),o=De(),s=A([]);rt(Ig,Ht({...lo(e)}));const i=we(Sa);Be(()=>{s.value=r(o.subTree)});const r=l=>{const c=[];return Array.isArray(l.children)&&l.children.forEach(u=>{var d;u.type&&u.type.name==="ElOption"&&u.component&&u.component.proxy?c.push(u.component.proxy):(d=u.children)!=null&&d.length&&c.push(...r(u))}),c},{groupQueryChange:a}=ks(i);return se(a,()=>{n.value=s.value.some(l=>l.visible===!0)},{flush:"post"}),{visible:n,ns:t}}});function kM(e,t,n,o,s,i){return We((M(),N("ul",{class:R(e.ns.be("group","wrap"))},[E("li",{class:R(e.ns.be("group","title"))},ce(e.label),3),E("li",null,[E("ul",{class:R(e.ns.b("group"))},[me(e.$slots,"default")],2)])],2)),[[Et,e.visible]])}var Fg=ve(CM,[["render",kM],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const Wc=dt(SM,{Option:Hc,OptionGroup:Fg}),jc=un(Hc);un(Fg);const Kc=()=>we($g,{}),EM=ke({pageSize:{type:Number,required:!0},pageSizes:{type:ye(Array),default:()=>pn([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Vs}}),MM=Y({name:"ElPaginationSizes"}),PM=Y({...MM,props:EM,emits:["page-size-change"],setup(e,{emit:t}){const n=e,{t:o}=Wt(),s=he("pagination"),i=Kc(),r=A(n.pageSize);se(()=>n.pageSizes,(c,u)=>{if(!oa(c,u)&&Array.isArray(c)){const d=c.includes(n.pageSize)?n.pageSize:n.pageSizes[0];t("page-size-change",d)}}),se(()=>n.pageSize,c=>{r.value=c});const a=P(()=>n.pageSizes);function l(c){var u;c!==r.value&&(r.value=c,(u=i.handleSizeChange)==null||u.call(i,Number(c)))}return(c,u)=>(M(),N("span",{class:R(b(s).e("sizes"))},[L(b(Wc),{"model-value":r.value,disabled:c.disabled,"popper-class":c.popperClass,size:c.size,teleported:c.teleported,"validate-event":!1,onChange:l},{default:F(()=>[(M(!0),N(Ge,null,Lt(b(a),d=>(M(),q(b(jc),{key:d,value:d,label:d+b(o)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var TM=ve(PM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);const OM=ke({size:{type:String,values:Vs}}),AM=["disabled"],RM=Y({name:"ElPaginationJumper"}),LM=Y({...RM,props:OM,setup(e){const{t}=Wt(),n=he("pagination"),{pageCount:o,disabled:s,currentPage:i,changeEvent:r}=Kc(),a=A(),l=P(()=>{var d;return(d=a.value)!=null?d:i==null?void 0:i.value});function c(d){a.value=d?+d:""}function u(d){d=Math.trunc(+d),r==null||r(d),a.value=void 0}return(d,f)=>(M(),N("span",{class:R(b(n).e("jump")),disabled:b(s)},[E("span",{class:R([b(n).e("goto")])},ce(b(t)("el.pagination.goto")),3),L(b($o),{size:d.size,class:R([b(n).e("editor"),b(n).is("in-pagination")]),min:1,max:b(o),disabled:b(s),"model-value":b(l),"validate-event":!1,label:b(t)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","label"]),E("span",{class:R([b(n).e("classifier")])},ce(b(t)("el.pagination.pageClassifier")),3)],10,AM))}});var $M=ve(LM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]);const IM=ke({total:{type:Number,default:1e3}}),FM=["disabled"],DM=Y({name:"ElPaginationTotal"}),BM=Y({...DM,props:IM,setup(e){const{t}=Wt(),n=he("pagination"),{disabled:o}=Kc();return(s,i)=>(M(),N("span",{class:R(b(n).e("total")),disabled:b(o)},ce(b(t)("el.pagination.total",{total:s.total})),11,FM))}});var NM=ve(BM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]);const zM=ke({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),VM=["onKeyup"],HM=["aria-current","aria-label","tabindex"],WM=["tabindex","aria-label"],jM=["aria-current","aria-label","tabindex"],KM=["tabindex","aria-label"],UM=["aria-current","aria-label","tabindex"],qM=Y({name:"ElPaginationPager"}),YM=Y({...qM,props:zM,emits:["change"],setup(e,{emit:t}){const n=e,o=he("pager"),s=he("icon"),{t:i}=Wt(),r=A(!1),a=A(!1),l=A(!1),c=A(!1),u=A(!1),d=A(!1),f=P(()=>{const _=n.pagerCount,x=(_-1)/2,S=Number(n.currentPage),C=Number(n.pageCount);let k=!1,T=!1;C>_&&(S>_-x&&(k=!0),S<C-x&&(T=!0));const B=[];if(k&&!T){const $=C-(_-2);for(let D=$;D<C;D++)B.push(D)}else if(!k&&T)for(let $=2;$<_;$++)B.push($);else if(k&&T){const $=Math.floor(_/2)-1;for(let D=S-$;D<=S+$;D++)B.push(D)}else for(let $=2;$<C;$++)B.push($);return B}),p=P(()=>["more","btn-quickprev",s.b(),o.is("disabled",n.disabled)]),g=P(()=>["more","btn-quicknext",s.b(),o.is("disabled",n.disabled)]),h=P(()=>n.disabled?-1:0);Co(()=>{const _=(n.pagerCount-1)/2;r.value=!1,a.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-_&&(r.value=!0),n.currentPage<n.pageCount-_&&(a.value=!0))});function v(_=!1){n.disabled||(_?l.value=!0:c.value=!0)}function m(_=!1){_?u.value=!0:d.value=!0}function y(_){const x=_.target;if(x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("number")){const S=Number(x.textContent);S!==n.currentPage&&t("change",S)}else x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("more")&&w(_)}function w(_){const x=_.target;if(x.tagName.toLowerCase()==="ul"||n.disabled)return;let S=Number(x.textContent);const C=n.pageCount,k=n.currentPage,T=n.pagerCount-2;x.className.includes("more")&&(x.className.includes("quickprev")?S=k-T:x.className.includes("quicknext")&&(S=k+T)),Number.isNaN(+S)||(S<1&&(S=1),S>C&&(S=C)),S!==k&&t("change",S)}return(_,x)=>(M(),N("ul",{class:R(b(o).b()),onClick:w,onKeyup:ft(y,["enter"])},[_.pageCount>0?(M(),N("li",{key:0,class:R([[b(o).is("active",_.currentPage===1),b(o).is("disabled",_.disabled)],"number"]),"aria-current":_.currentPage===1,"aria-label":b(i)("el.pagination.currentPage",{pager:1}),tabindex:b(h)}," 1 ",10,HM)):X("v-if",!0),r.value?(M(),N("li",{key:1,class:R(b(p)),tabindex:b(h),"aria-label":b(i)("el.pagination.prevPages",{pager:_.pagerCount-2}),onMouseenter:x[0]||(x[0]=S=>v(!0)),onMouseleave:x[1]||(x[1]=S=>l.value=!1),onFocus:x[2]||(x[2]=S=>m(!0)),onBlur:x[3]||(x[3]=S=>u.value=!1)},[(l.value||u.value)&&!_.disabled?(M(),q(b(qh),{key:0})):(M(),q(b(mu),{key:1}))],42,WM)):X("v-if",!0),(M(!0),N(Ge,null,Lt(b(f),S=>(M(),N("li",{key:S,class:R([[b(o).is("active",_.currentPage===S),b(o).is("disabled",_.disabled)],"number"]),"aria-current":_.currentPage===S,"aria-label":b(i)("el.pagination.currentPage",{pager:S}),tabindex:b(h)},ce(S),11,jM))),128)),a.value?(M(),N("li",{key:2,class:R(b(g)),tabindex:b(h),"aria-label":b(i)("el.pagination.nextPages",{pager:_.pagerCount-2}),onMouseenter:x[4]||(x[4]=S=>v()),onMouseleave:x[5]||(x[5]=S=>c.value=!1),onFocus:x[6]||(x[6]=S=>m()),onBlur:x[7]||(x[7]=S=>d.value=!1)},[(c.value||d.value)&&!_.disabled?(M(),q(b(Yh),{key:0})):(M(),q(b(mu),{key:1}))],42,KM)):X("v-if",!0),_.pageCount>1?(M(),N("li",{key:3,class:R([[b(o).is("active",_.currentPage===_.pageCount),b(o).is("disabled",_.disabled)],"number"]),"aria-current":_.currentPage===_.pageCount,"aria-label":b(i)("el.pagination.currentPage",{pager:_.pageCount}),tabindex:b(h)},ce(_.pageCount),11,UM)):X("v-if",!0)],42,VM))}});var GM=ve(YM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]);const Rt=e=>typeof e!="number",XM=ke({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>He(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:ye(Array),default:()=>pn([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:yt,default:()=>Gh},nextText:{type:String,default:""},nextIcon:{type:yt,default:()=>va},teleported:{type:Boolean,default:!0},small:Boolean,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),QM={"update:current-page":e=>He(e),"update:page-size":e=>He(e),"size-change":e=>He(e),"current-change":e=>He(e),"prev-click":e=>He(e),"next-click":e=>He(e)},Bd="ElPagination";var JM=Y({name:Bd,props:XM,emits:QM,setup(e,{emit:t,slots:n}){const{t:o}=Wt(),s=he("pagination"),i=De().vnode.props||{},r="onUpdate:currentPage"in i||"onUpdate:current-page"in i||"onCurrentChange"in i,a="onUpdate:pageSize"in i||"onUpdate:page-size"in i||"onSizeChange"in i,l=P(()=>{if(Rt(e.total)&&Rt(e.pageCount)||!Rt(e.currentPage)&&!r)return!1;if(e.layout.includes("sizes")){if(Rt(e.pageCount)){if(!Rt(e.total)&&!Rt(e.pageSize)&&!a)return!1}else if(!a)return!1}return!0}),c=A(Rt(e.defaultPageSize)?10:e.defaultPageSize),u=A(Rt(e.defaultCurrentPage)?1:e.defaultCurrentPage),d=P({get(){return Rt(e.pageSize)?c.value:e.pageSize},set(w){Rt(e.pageSize)&&(c.value=w),a&&(t("update:page-size",w),t("size-change",w))}}),f=P(()=>{let w=0;return Rt(e.pageCount)?Rt(e.total)||(w=Math.max(1,Math.ceil(e.total/d.value))):w=e.pageCount,w}),p=P({get(){return Rt(e.currentPage)?u.value:e.currentPage},set(w){let _=w;w<1?_=1:w>f.value&&(_=f.value),Rt(e.currentPage)&&(u.value=_),r&&(t("update:current-page",_),t("current-change",_))}});se(f,w=>{p.value>w&&(p.value=w)});function g(w){p.value=w}function h(w){d.value=w;const _=f.value;p.value>_&&(p.value=_)}function v(){e.disabled||(p.value-=1,t("prev-click",p.value))}function m(){e.disabled||(p.value+=1,t("next-click",p.value))}function y(w,_){w&&(w.props||(w.props={}),w.props.class=[w.props.class,_].join(" "))}return rt($g,{pageCount:f,disabled:P(()=>e.disabled),currentPage:p,changeEvent:g,handleSizeChange:h}),()=>{var w,_;if(!l.value)return o("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&f.value<=1)return null;const x=[],S=[],C=Ce("div",{class:s.e("rightwrapper")},S),k={prev:Ce(nM,{disabled:e.disabled,currentPage:p.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:v}),jumper:Ce($M,{size:e.small?"small":"default"}),pager:Ce(GM,{currentPage:p.value,pageCount:f.value,pagerCount:e.pagerCount,onChange:g,disabled:e.disabled}),next:Ce(lM,{disabled:e.disabled,currentPage:p.value,pageCount:f.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:m}),sizes:Ce(TM,{pageSize:d.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:e.small?"small":"default"}),slot:(_=(w=n==null?void 0:n.default)==null?void 0:w.call(n))!=null?_:null,total:Ce(NM,{total:Rt(e.total)?0:e.total})},T=e.layout.split(",").map($=>$.trim());let B=!1;return T.forEach($=>{if($==="->"){B=!0;return}B?S.push(k[$]):x.push(k[$])}),y(x[0],s.is("first")),y(x[x.length-1],s.is("last")),B&&S.length>0&&(y(S[0],s.is("first")),y(S[S.length-1],s.is("last")),x.push(C)),Ce("div",{class:[s.b(),s.is("background",e.background),{[s.m("small")]:e.small}]},x)}}});const ZM=dt(JM),eP=ke({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Cl,default:"primary"},cancelButtonType:{type:String,values:Cl,default:"text"},icon:{type:yt,default:()=>Kv},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:$i.teleported,persistent:$i.persistent,width:{type:[String,Number],default:150}}),tP={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},nP=Y({name:"ElPopconfirm"}),oP=Y({...nP,props:eP,emits:tP,setup(e,{emit:t}){const n=e,{t:o}=Wt(),s=he("popconfirm"),i=A(),r=()=>{var f,p;(p=(f=i.value)==null?void 0:f.onClose)==null||p.call(f)},a=P(()=>({width:$n(n.width)})),l=f=>{t("confirm",f),r()},c=f=>{t("cancel",f),r()},u=P(()=>n.confirmButtonText||o("el.popconfirm.confirmButtonText")),d=P(()=>n.cancelButtonText||o("el.popconfirm.cancelButtonText"));return(f,p)=>(M(),q(b(Io),On({ref_key:"tooltipRef",ref:i,trigger:"click",effect:"light"},f.$attrs,{"popper-class":`${b(s).namespace.value}-popover`,"popper-style":b(a),teleported:f.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":f.hideAfter,persistent:f.persistent}),{content:F(()=>[E("div",{class:R(b(s).b())},[E("div",{class:R(b(s).e("main"))},[!f.hideIcon&&f.icon?(M(),q(b($e),{key:0,class:R(b(s).e("icon")),style:Te({color:f.iconColor})},{default:F(()=>[(M(),q(Ue(f.icon)))]),_:1},8,["class","style"])):X("v-if",!0),fe(" "+ce(f.title),1)],2),E("div",{class:R(b(s).e("action"))},[L(b(Dn),{size:"small",type:f.cancelButtonType==="text"?"":f.cancelButtonType,text:f.cancelButtonType==="text",onClick:c},{default:F(()=>[fe(ce(b(d)),1)]),_:1},8,["type","text"]),L(b(Dn),{size:"small",type:f.confirmButtonType==="text"?"":f.confirmButtonType,text:f.confirmButtonType==="text",onClick:l},{default:F(()=>[fe(ce(b(u)),1)]),_:1},8,["type","text"])],2)],2)]),default:F(()=>[f.$slots.reference?me(f.$slots,"reference",{key:0}):X("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var sP=ve(oP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]]);const Dg=dt(sP),iP=ke({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),rP=ke({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),aP=Y({name:"ElSkeletonItem"}),lP=Y({...aP,props:rP,setup(e){const t=he("skeleton");return(n,o)=>(M(),N("div",{class:R([b(t).e("item"),b(t).e(n.variant)])},[n.variant==="image"?(M(),q(b(Uv),{key:0})):X("v-if",!0)],2))}});var ia=ve(lP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const cP=Y({name:"ElSkeleton"}),uP=Y({...cP,props:iP,setup(e,{expose:t}){const n=e,o=he("skeleton"),s=ix(nn(n,"loading"),n.throttle);return t({uiLoading:s}),(i,r)=>b(s)?(M(),N("div",On({key:0,class:[b(o).b(),b(o).is("animated",i.animated)]},i.$attrs),[(M(!0),N(Ge,null,Lt(i.count,a=>(M(),N(Ge,{key:a},[i.loading?me(i.$slots,"template",{key:a},()=>[L(ia,{class:R(b(o).is("first")),variant:"p"},null,8,["class"]),(M(!0),N(Ge,null,Lt(i.rows,l=>(M(),q(ia,{key:l,class:R([b(o).e("paragraph"),b(o).is("last",l===i.rows&&i.rows>1)]),variant:"p"},null,8,["class"]))),128))]):X("v-if",!0)],64))),128))],16)):me(i.$slots,"default",qv(On({key:1},i.$attrs)))}});var dP=ve(uP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const fP=dt(dP,{SkeletonItem:ia});un(ia);const hP=ke({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),pP={[io]:(e,t)=>[e,t].every(He)},gP=Y({name:"ElSteps"}),mP=Y({...gP,props:hP,emits:pP,setup(e,{emit:t}){const n=e,o=he("steps"),{children:s,addChild:i,removeChild:r}=Yp(De(),"ElStep");return se(s,()=>{s.value.forEach((a,l)=>{a.setIndex(l)})}),rt("ElSteps",{props:n,steps:s,addStep:i,removeStep:r}),se(()=>n.active,(a,l)=>{t(io,a,l)}),(a,l)=>(M(),N("div",{class:R([b(o).b(),b(o).m(a.simple?"simple":a.direction)])},[me(a.$slots,"default")],2))}});var vP=ve(mP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]);const bP=ke({title:{type:String,default:""},icon:{type:yt},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),yP=Y({name:"ElStep"}),_P=Y({...yP,props:bP,setup(e){const t=e,n=he("step"),o=A(-1),s=A({}),i=A(""),r=we("ElSteps"),a=De();Be(()=>{se([()=>r.props.active,()=>r.props.processStatus,()=>r.props.finishStatus],([S])=>{_(S)},{immediate:!0})}),Pt(()=>{r.removeStep(x.uid)});const l=P(()=>t.status||i.value),c=P(()=>{const S=r.steps.value[o.value-1];return S?S.currentStatus:"wait"}),u=P(()=>r.props.alignCenter),d=P(()=>r.props.direction==="vertical"),f=P(()=>r.props.simple),p=P(()=>r.steps.value.length),g=P(()=>{var S;return((S=r.steps.value[p.value-1])==null?void 0:S.uid)===(a==null?void 0:a.uid)}),h=P(()=>f.value?"":r.props.space),v=P(()=>[n.b(),n.is(f.value?"simple":r.props.direction),n.is("flex",g.value&&!h.value&&!u.value),n.is("center",u.value&&!d.value&&!f.value)]),m=P(()=>{const S={flexBasis:He(h.value)?`${h.value}px`:h.value?h.value:`${100/(p.value-(u.value?0:1))}%`};return d.value||g.value&&(S.maxWidth=`${100/p.value}%`),S}),y=S=>{o.value=S},w=S=>{const C=S==="wait",k={transitionDelay:`${C?"-":""}${150*o.value}ms`},T=S===r.props.processStatus||C?0:100;k.borderWidth=T&&!f.value?"1px":0,k[r.props.direction==="vertical"?"height":"width"]=`${T}%`,s.value=k},_=S=>{S>o.value?i.value=r.props.finishStatus:S===o.value&&c.value!=="error"?i.value=r.props.processStatus:i.value="wait";const C=r.steps.value[o.value-1];C&&C.calcProgress(i.value)},x=Ht({uid:a.uid,currentStatus:l,setIndex:y,calcProgress:w});return r.addStep(x),(S,C)=>(M(),N("div",{style:Te(b(m)),class:R(b(v))},[X(" icon & line "),E("div",{class:R([b(n).e("head"),b(n).is(b(l))])},[b(f)?X("v-if",!0):(M(),N("div",{key:0,class:R(b(n).e("line"))},[E("i",{class:R(b(n).e("line-inner")),style:Te(s.value)},null,6)],2)),E("div",{class:R([b(n).e("icon"),b(n).is(S.icon||S.$slots.icon?"icon":"text")])},[me(S.$slots,"icon",{},()=>[S.icon?(M(),q(b($e),{key:0,class:R(b(n).e("icon-inner"))},{default:F(()=>[(M(),q(Ue(S.icon)))]),_:1},8,["class"])):b(l)==="success"?(M(),q(b($e),{key:1,class:R([b(n).e("icon-inner"),b(n).is("status")])},{default:F(()=>[L(b(Yv))]),_:1},8,["class"])):b(l)==="error"?(M(),q(b($e),{key:2,class:R([b(n).e("icon-inner"),b(n).is("status")])},{default:F(()=>[L(b(Mi))]),_:1},8,["class"])):b(f)?X("v-if",!0):(M(),N("div",{key:3,class:R(b(n).e("icon-inner"))},ce(o.value+1),3))])],2)],2),X(" title & description "),E("div",{class:R(b(n).e("main"))},[E("div",{class:R([b(n).e("title"),b(n).is(b(l))])},[me(S.$slots,"title",{},()=>[fe(ce(S.title),1)])],2),b(f)?(M(),N("div",{key:0,class:R(b(n).e("arrow"))},null,2)):(M(),N("div",{key:1,class:R([b(n).e("description"),b(n).is(b(l))])},[me(S.$slots,"description",{},()=>[fe(ce(S.description),1)])],2))],2)],6))}});var Bg=ve(_P,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);const wP=dt(vP,{Step:Bg}),xP=un(Bg),SP=ke({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:Cc},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},inactiveActionIcon:{type:yt},activeActionIcon:{type:yt},activeIcon:{type:yt},inactiveIcon:{type:yt},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:ye(Function)},id:String,tabindex:{type:[String,Number]},value:{type:[Boolean,String,Number],default:!1}}),CP={[Je]:e=>Nt(e)||st(e)||He(e),[io]:e=>Nt(e)||st(e)||He(e),[ml]:e=>Nt(e)||st(e)||He(e)},kP=["onClick"],EP=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],MP=["aria-hidden"],PP=["aria-hidden"],TP=["aria-hidden"],Fl="ElSwitch",OP=Y({name:Fl}),AP=Y({...OP,props:SP,emits:CP,setup(e,{expose:t,emit:n}){const o=e,s=De(),{formItem:i}=co(),r=cn(),a=he("switch");(k=>{k.forEach(T=>{ya({from:T[0],replacement:T[1],scope:Fl,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},P(()=>{var B;return!!((B=s.vnode.props)!=null&&B[T[2]])}))})})([['"value"','"model-value" or "v-model"',"value"],['"active-color"',"CSS var `--el-switch-on-color`","activeColor"],['"inactive-color"',"CSS var `--el-switch-off-color`","inactiveColor"],['"border-color"',"CSS var `--el-switch-border-color`","borderColor"]]);const{inputId:c}=Ks(o,{formItemContext:i}),u=fs(P(()=>o.loading)),d=A(o.modelValue!==!1),f=A(),p=A(),g=P(()=>[a.b(),a.m(r.value),a.is("disabled",u.value),a.is("checked",w.value)]),h=P(()=>[a.e("label"),a.em("label","left"),a.is("active",!w.value)]),v=P(()=>[a.e("label"),a.em("label","right"),a.is("active",w.value)]),m=P(()=>({width:$n(o.width)}));se(()=>o.modelValue,()=>{d.value=!0}),se(()=>o.value,()=>{d.value=!1});const y=P(()=>d.value?o.modelValue:o.value),w=P(()=>y.value===o.activeValue);[o.activeValue,o.inactiveValue].includes(y.value)||(n(Je,o.inactiveValue),n(io,o.inactiveValue),n(ml,o.inactiveValue)),se(w,k=>{var T;f.value.checked=k,o.validateEvent&&((T=i==null?void 0:i.validate)==null||T.call(i,"change").catch(B=>void 0))});const _=()=>{const k=w.value?o.inactiveValue:o.activeValue;n(Je,k),n(io,k),n(ml,k),xe(()=>{f.value.checked=w.value})},x=()=>{if(u.value)return;const{beforeChange:k}=o;if(!k){_();return}const T=k();[vu(T),Nt(T)].includes(!0)||Ro(Fl,"beforeChange must return type `Promise<boolean>` or `boolean`"),vu(T)?T.then($=>{$&&_()}).catch($=>{}):T&&_()},S=P(()=>a.cssVarBlock({...o.activeColor?{"on-color":o.activeColor}:null,...o.inactiveColor?{"off-color":o.inactiveColor}:null,...o.borderColor?{"border-color":o.borderColor}:null})),C=()=>{var k,T;(T=(k=f.value)==null?void 0:k.focus)==null||T.call(k)};return Be(()=>{f.value.checked=w.value}),t({focus:C,checked:w}),(k,T)=>(M(),N("div",{class:R(b(g)),style:Te(b(S)),onClick:et(x,["prevent"])},[E("input",{id:b(c),ref_key:"input",ref:f,class:R(b(a).e("input")),type:"checkbox",role:"switch","aria-checked":b(w),"aria-disabled":b(u),name:k.name,"true-value":k.activeValue,"false-value":k.inactiveValue,disabled:b(u),tabindex:k.tabindex,onChange:_,onKeydown:ft(x,["enter"])},null,42,EP),!k.inlinePrompt&&(k.inactiveIcon||k.inactiveText)?(M(),N("span",{key:0,class:R(b(h))},[k.inactiveIcon?(M(),q(b($e),{key:0},{default:F(()=>[(M(),q(Ue(k.inactiveIcon)))]),_:1})):X("v-if",!0),!k.inactiveIcon&&k.inactiveText?(M(),N("span",{key:1,"aria-hidden":b(w)},ce(k.inactiveText),9,MP)):X("v-if",!0)],2)):X("v-if",!0),E("span",{ref_key:"core",ref:p,class:R(b(a).e("core")),style:Te(b(m))},[k.inlinePrompt?(M(),N("div",{key:0,class:R(b(a).e("inner"))},[k.activeIcon||k.inactiveIcon?(M(),q(b($e),{key:0,class:R(b(a).is("icon"))},{default:F(()=>[(M(),q(Ue(b(w)?k.activeIcon:k.inactiveIcon)))]),_:1},8,["class"])):k.activeText||k.inactiveText?(M(),N("span",{key:1,class:R(b(a).is("text")),"aria-hidden":!b(w)},ce(b(w)?k.activeText:k.inactiveText),11,PP)):X("v-if",!0)],2)):X("v-if",!0),E("div",{class:R(b(a).e("action"))},[k.loading?(M(),q(b($e),{key:0,class:R(b(a).is("loading"))},{default:F(()=>[L(b(dc))]),_:1},8,["class"])):k.activeActionIcon&&b(w)?(M(),q(b($e),{key:1},{default:F(()=>[(M(),q(Ue(k.activeActionIcon)))]),_:1})):k.inactiveActionIcon&&!b(w)?(M(),q(b($e),{key:2},{default:F(()=>[(M(),q(Ue(k.inactiveActionIcon)))]),_:1})):X("v-if",!0)],2)],6),!k.inlinePrompt&&(k.activeIcon||k.activeText)?(M(),N("span",{key:1,class:R(b(v))},[k.activeIcon?(M(),q(b($e),{key:0},{default:F(()=>[(M(),q(Ue(k.activeIcon)))]),_:1})):X("v-if",!0),!k.activeIcon&&k.activeText?(M(),N("span",{key:1,"aria-hidden":!b(w)},ce(k.activeText),9,TP)):X("v-if",!0)],2)):X("v-if",!0)],14,kP))}});var RP=ve(AP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const Ng=dt(RP);/*!
     33*/const _k=function(e,t){if(e&&e.addEventListener){const n=function(o){const s=yk(o);t&&Reflect.apply(t,this,[o,s])};e.addEventListener("wheel",n,{passive:!0})}},wk={beforeMount(e,t){_k(e,t.value)}},vg={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:ao,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},bg={[Je]:e=>st(e)||He(e)||Nt(e),change:e=>st(e)||He(e)||Nt(e)},e(k.activeIcon)))]),_:1})):X("v-if",!0),!k.activeIcon&&k.activeText?(M(),N("span",{key:1,"aria-hidden":!b(w)},ce(k.activeText),9,TP)):X("v-if",!0)],2)):X("v-if",!0)],14,kP))}});var RP=ve(AP,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const Ng=dt(RP);/*!
    3434 * escape-html
    3535 * Copyright(c) 2012-2013 TJ Holowaychuk
     
    3737 * Copyright(c) 2015 Tiancheng "Timothy" Gu
    3838 * MIT Licensed
    39  */var LP=/["'&<>]/,$P=IP;function IP(e){var t=""+e,n=LP.exec(t);if(!n)return t;var o,s="",i=0,r=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}r!==i&&(s+=t.substring(r,i)),r=i+1,s+=o}return r!==i?s+t.substring(r,i):s}const Wa=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},FP=function(e,t,n,o,s){if(!t&&!o&&(!s||Array.isArray(s)&&!s.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const i=o?null:function(a,l){return s?(Array.isArray(s)||(s=[s]),s.map(c=>typeof c=="string"?Dt(a,c):c(a,l,e))):(t!=="$key"&&wn(a)&&"$value"in a&&(a=a.$value),[wn(a)?Dt(a,t):a])},r=function(a,l){if(o)return o(a.value,l.value);for(let c=0,u=a.key.length;c<u;c++){if(a.key[c]<l.key[c])return-1;if(a.key[c]>l.key[c])return 1}return 0};return e.map((a,l)=>({value:a,index:l,key:i?i(a,l):null})).sort((a,l)=>{let c=r(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},zg=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},DP=function(e,t){let n=null;for(let o=0;o<e.columns.length;o++){const s=e.columns[o];if(s.columnKey===t){n=s;break}}return n||Ro("ElTable",`No column matching with column-key: ${t}`),n},Nd=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?zg(e,o[0]):null},bt=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let o=e;for(const s of n)o=o[s];return`${o}`}else if(typeof t=="function")return t.call(null,e)},Qo=function(e,t){const n={};return(e||[]).forEach((o,s)=>{n[bt(o,t)]={row:o,index:s}}),n};function BP(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(so(t,o)){const s=t[o];typeof s<"u"&&(n[o]=s)}return n}function Uc(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Vg(e){return e===""||e!==void 0&&(e=Uc(e),Number.isNaN(e)&&(e=80)),e}function NP(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function zP(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function bi(e,t,n){let o=!1;const s=e.indexOf(t),i=s!==-1,r=a=>{a==="add"?e.push(t):e.splice(s,1),o=!0,vn(t.children)&&t.children.forEach(l=>{bi(e,l,n!=null?n:!i)})};return Nt(n)?n&&!i?r("add"):!n&&i&&r("remove"):r(i?"remove":"add"),o}function VP(e,t,n="children",o="hasChildren"){const s=r=>!(Array.isArray(r)&&r.length);function i(r,a,l){t(r,a,l),a.forEach(c=>{if(c[o]){t(c,null,l+1);return}const u=c[n];s(u)||i(c,u,l+1)})}e.forEach(r=>{if(r[o]){t(r,null,0);return}const a=r[n];s(a)||i(r,a,0)})}let qn;function HP(e,t,n,o,s){s=Pp({enterable:!0,showArrow:!0},s);const i=e==null?void 0:e.dataset.prefix,r=e==null?void 0:e.querySelector(`.${i}-scrollbar__wrap`);function a(){const v=s.effect==="light",m=document.createElement("div");return m.className=[`${i}-popper`,v?"is-light":"is-dark",s.popperClass||""].join(" "),n=$P(n),m.innerHTML=n,m.style.zIndex=String(o()),e==null||e.appendChild(m),m}function l(){const v=document.createElement("div");return v.className=`${i}-popper__arrow`,v}function c(){u&&u.update()}qn==null||qn(),qn=()=>{try{u&&u.destroy(),p&&(e==null||e.removeChild(p)),t.removeEventListener("mouseenter",d),t.removeEventListener("mouseleave",f),r==null||r.removeEventListener("scroll",qn),qn=void 0}catch{}};let u=null,d=c,f=qn;s.enterable&&({onOpen:d,onClose:f}=Up({showAfter:s.showAfter,hideAfter:s.hideAfter,open:c,close:qn}));const p=a();p.onmouseenter=d,p.onmouseleave=f;const g=[];if(s.offset&&g.push({name:"offset",options:{offset:[0,s.offset]}}),s.showArrow){const v=p.appendChild(l());g.push({name:"arrow",options:{element:v,padding:10}})}const h=s.popperOptions||{};return u=Hp(t,p,{placement:s.placement||"top",strategy:"fixed",...h,modifiers:h.modifiers?g.concat(h.modifiers):g}),t.addEventListener("mouseenter",d),t.addEventListener("mouseleave",f),r==null||r.addEventListener("scroll",qn),u}function Hg(e){return e.children?Iw(e.children,Hg):[e]}function zd(e,t){return e+t.colSpan}const Wg=(e,t,n,o)=>{let s=0,i=e;const r=n.states.columns.value;if(o){const l=Hg(o[e]);s=r.slice(0,r.indexOf(l[0])).reduce(zd,0),i=s+l.reduce(zd,0)-1}else s=e;let a;switch(t){case"left":i<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:i<n.states.fixedLeafColumnsLength.value?a="left":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:s,after:i}:{}},qc=(e,t,n,o,s,i=0)=>{const r=[],{direction:a,start:l,after:c}=Wg(t,n,o,s);if(a){const u=a==="left";r.push(`${e}-fixed-column--${a}`),u&&c+i===o.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!u&&l-i===o.states.columns.value.length-o.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function Vd(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Yc=(e,t,n,o)=>{const{direction:s,start:i=0,after:r=0}=Wg(e,t,n,o);if(!s)return;const a={},l=s==="left",c=n.states.columns.value;return l?a.left=c.slice(0,i).reduce(Vd,0):a.right=c.slice(r+1).reverse().reduce(Vd,0),a},Ls=(e,t)=>{!e||Number.isNaN(e[t])||(e[t]=`${e[t]}px`)};function WP(e){const t=De(),n=A(!1),o=A([]);return{updateExpandRows:()=>{const l=e.data.value||[],c=e.rowKey.value;if(n.value)o.value=l.slice();else if(c){const u=Qo(o.value,c);o.value=l.reduce((d,f)=>{const p=bt(f,c);return u[p]&&d.push(f),d},[])}else o.value=[]},toggleRowExpansion:(l,c)=>{bi(o.value,l,c)&&t.emit("expand-change",l,o.value.slice())},setExpandRowKeys:l=>{t.store.assertRowKey();const c=e.data.value||[],u=e.rowKey.value,d=Qo(c,u);o.value=l.reduce((f,p)=>{const g=d[p];return g&&f.push(g.row),f},[])},isRowExpanded:l=>{const c=e.rowKey.value;return c?!!Qo(o.value,c)[bt(l,c)]:o.value.includes(l)},states:{expandRows:o,defaultExpandAll:n}}}function jP(e){const t=De(),n=A(null),o=A(null),s=c=>{t.store.assertRowKey(),n.value=c,r(c)},i=()=>{n.value=null},r=c=>{const{data:u,rowKey:d}=e;let f=null;d.value&&(f=(b(u)||[]).find(p=>bt(p,d.value)===c)),o.value=f,t.emit("current-change",o.value,null)};return{setCurrentRowKey:s,restoreCurrentRowKey:i,setCurrentRowByKey:r,updateCurrentRow:c=>{const u=o.value;if(c&&c!==u){o.value=c,t.emit("current-change",o.value,u);return}!c&&u&&(o.value=null,t.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=e.rowKey.value,u=e.data.value||[],d=o.value;if(!u.includes(d)&&d){if(c){const f=bt(d,c);r(f)}else o.value=null;o.value===null&&t.emit("current-change",null,d)}else n.value&&(r(n.value),i())},states:{_currentRowKey:n,currentRow:o}}}function KP(e){const t=A([]),n=A({}),o=A(16),s=A(!1),i=A({}),r=A("hasChildren"),a=A("children"),l=De(),c=P(()=>{if(!e.rowKey.value)return{};const m=e.data.value||[];return d(m)}),u=P(()=>{const m=e.rowKey.value,y=Object.keys(i.value),w={};return y.length&&y.forEach(_=>{if(i.value[_].length){const x={children:[]};i.value[_].forEach(S=>{const C=bt(S,m);x.children.push(C),S[r.value]&&!w[C]&&(w[C]={children:[]})}),w[_]=x}}),w}),d=m=>{const y=e.rowKey.value,w={};return VP(m,(_,x,S)=>{const C=bt(_,y);Array.isArray(x)?w[C]={children:x.map(k=>bt(k,y)),level:S}:s.value&&(w[C]={children:[],lazy:!0,level:S})},a.value,r.value),w},f=(m=!1,y=(w=>(w=l.store)==null?void 0:w.states.defaultExpandAll.value)())=>{var w;const _=c.value,x=u.value,S=Object.keys(_),C={};if(S.length){const k=b(n),T=[],B=(D,W)=>{if(m)return t.value?y||t.value.includes(W):!!(y||(D==null?void 0:D.expanded));{const ne=y||t.value&&t.value.includes(W);return!!((D==null?void 0:D.expanded)||ne)}};S.forEach(D=>{const W=k[D],ne={..._[D]};if(ne.expanded=B(W,D),ne.lazy){const{loaded:j=!1,loading:Q=!1}=W||{};ne.loaded=!!j,ne.loading=!!Q,T.push(D)}C[D]=ne});const $=Object.keys(x);s.value&&$.length&&T.length&&$.forEach(D=>{const W=k[D],ne=x[D].children;if(T.includes(D)){if(C[D].children.length!==0)throw new Error("[ElTable]children must be an empty array.");C[D].children=ne}else{const{loaded:j=!1,loading:Q=!1}=W||{};C[D]={lazy:!0,loaded:!!j,loading:!!Q,expanded:B(W,D),children:ne,level:""}}})}n.value=C,(w=l.store)==null||w.updateTableScrollY()};se(()=>t.value,()=>{f(!0)}),se(()=>c.value,()=>{f()}),se(()=>u.value,()=>{f()});const p=m=>{t.value=m,f()},g=(m,y)=>{l.store.assertRowKey();const w=e.rowKey.value,_=bt(m,w),x=_&&n.value[_];if(_&&x&&"expanded"in x){const S=x.expanded;y=typeof y>"u"?!x.expanded:y,n.value[_].expanded=y,S!==y&&l.emit("expand-change",m,y),l.store.updateTableScrollY()}},h=m=>{l.store.assertRowKey();const y=e.rowKey.value,w=bt(m,y),_=n.value[w];s.value&&_&&"loaded"in _&&!_.loaded?v(m,w,_):g(m,void 0)},v=(m,y,w)=>{const{load:_}=l.props;_&&!n.value[y].loaded&&(n.value[y].loading=!0,_(m,w,x=>{if(!Array.isArray(x))throw new TypeError("[ElTable] data must be an array");n.value[y].loading=!1,n.value[y].loaded=!0,n.value[y].expanded=!0,x.length&&(i.value[y]=x),l.emit("expand-change",m,!0)}))};return{loadData:v,loadOrToggle:h,toggleTreeExpansion:g,updateTreeExpandKeys:p,updateTreeData:f,normalize:d,states:{expandRowKeys:t,treeData:n,indent:o,lazy:s,lazyTreeNodeMap:i,lazyColumnIdentifier:r,childrenColumnName:a}}}const UP=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:FP(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},zr=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,zr(n.children)):t.push(n)}),t};function qP(){var e;const t=De(),{size:n}=lo((e=t.proxy)==null?void 0:e.$props),o=A(null),s=A([]),i=A([]),r=A(!1),a=A([]),l=A([]),c=A([]),u=A([]),d=A([]),f=A([]),p=A([]),g=A([]),h=[],v=A(0),m=A(0),y=A(0),w=A(!1),_=A([]),x=A(!1),S=A(!1),C=A(null),k=A({}),T=A(null),B=A(null),$=A(null),D=A(null),W=A(null);se(s,()=>t.state&&V(!1),{deep:!0});const ne=()=>{if(!o.value)throw new Error("[ElTable] prop row-key is required")},j=pe=>{var Se;(Se=pe.children)==null||Se.forEach(Re=>{Re.fixed=pe.fixed,j(Re)})},Q=()=>{a.value.forEach(Ne=>{j(Ne)}),u.value=a.value.filter(Ne=>Ne.fixed===!0||Ne.fixed==="left"),d.value=a.value.filter(Ne=>Ne.fixed==="right"),u.value.length>0&&a.value[0]&&a.value[0].type==="selection"&&!a.value[0].fixed&&(a.value[0].fixed=!0,u.value.unshift(a.value[0]));const pe=a.value.filter(Ne=>!Ne.fixed);l.value=[].concat(u.value).concat(pe).concat(d.value);const Se=zr(pe),Re=zr(u.value),Oe=zr(d.value);v.value=Se.length,m.value=Re.length,y.value=Oe.length,c.value=[].concat(Re).concat(Se).concat(Oe),r.value=u.value.length>0||d.value.length>0},V=(pe,Se=!1)=>{pe&&Q(),Se?t.state.doLayout():t.state.debouncedUpdateLayout()},le=pe=>_.value.includes(pe),I=()=>{w.value=!1,_.value.length&&(_.value=[],t.emit("selection-change",[]))},Z=()=>{let pe;if(o.value){pe=[];const Se=Qo(_.value,o.value),Re=Qo(s.value,o.value);for(const Oe in Se)so(Se,Oe)&&!Re[Oe]&&pe.push(Se[Oe].row)}else pe=_.value.filter(Se=>!s.value.includes(Se));if(pe.length){const Se=_.value.filter(Re=>!pe.includes(Re));_.value=Se,t.emit("selection-change",Se.slice())}},de=()=>(_.value||[]).slice(),J=(pe,Se=void 0,Re=!0)=>{if(bi(_.value,pe,Se)){const Ne=(_.value||[]).slice();Re&&t.emit("select",Ne,pe),t.emit("selection-change",Ne)}},G=()=>{var pe,Se;const Re=S.value?!w.value:!(w.value||_.value.length);w.value=Re;let Oe=!1,Ne=0;const at=(Se=(pe=t==null?void 0:t.store)==null?void 0:pe.states)==null?void 0:Se.rowKey.value;s.value.forEach((wt,Mn)=>{const Ot=Mn+Ne;C.value?C.value.call(null,wt,Ot)&&bi(_.value,wt,Re)&&(Oe=!0):bi(_.value,wt,Re)&&(Oe=!0),Ne+=ie(bt(wt,at))}),Oe&&t.emit("selection-change",_.value?_.value.slice():[]),t.emit("select-all",_.value)},U=()=>{const pe=Qo(_.value,o.value);s.value.forEach(Se=>{const Re=bt(Se,o.value),Oe=pe[Re];Oe&&(_.value[Oe.index]=Se)})},re=()=>{var pe,Se,Re;if(((pe=s.value)==null?void 0:pe.length)===0){w.value=!1;return}let Oe;o.value&&(Oe=Qo(_.value,o.value));const Ne=function(Ot){return Oe?!!Oe[bt(Ot,o.value)]:_.value.includes(Ot)};let at=!0,wt=0,Mn=0;for(let Ot=0,Gs=(s.value||[]).length;Ot<Gs;Ot++){const Xs=(Re=(Se=t==null?void 0:t.store)==null?void 0:Se.states)==null?void 0:Re.rowKey.value,uo=Ot+Mn,Do=s.value[Ot],z=C.value&&C.value.call(null,Do,uo);if(Ne(Do))wt++;else if(!C.value||z){at=!1;break}Mn+=ie(bt(Do,Xs))}wt===0&&(at=!1),w.value=at},ie=pe=>{var Se;if(!t||!t.store)return 0;const{treeData:Re}=t.store.states;let Oe=0;const Ne=(Se=Re.value[pe])==null?void 0:Se.children;return Ne&&(Oe+=Ne.length,Ne.forEach(at=>{Oe+=ie(at)})),Oe},O=(pe,Se)=>{Array.isArray(pe)||(pe=[pe]);const Re={};return pe.forEach(Oe=>{k.value[Oe.id]=Se,Re[Oe.columnKey||Oe.id]=Se}),Re},H=(pe,Se,Re)=>{B.value&&B.value!==pe&&(B.value.order=null),B.value=pe,$.value=Se,D.value=Re},K=()=>{let pe=b(i);Object.keys(k.value).forEach(Se=>{const Re=k.value[Se];if(!Re||Re.length===0)return;const Oe=zg({columns:c.value},Se);Oe&&Oe.filterMethod&&(pe=pe.filter(Ne=>Re.some(at=>Oe.filterMethod.call(null,at,Ne,Oe))))}),T.value=pe},te=()=>{s.value=UP(T.value,{sortingColumn:B.value,sortProp:$.value,sortOrder:D.value})},ge=(pe=void 0)=>{pe&&pe.filter||K(),te()},Le=pe=>{const{tableHeaderRef:Se}=t.refs;if(!Se)return;const Re=Object.assign({},Se.filterPanels),Oe=Object.keys(Re);if(!!Oe.length)if(typeof pe=="string"&&(pe=[pe]),Array.isArray(pe)){const Ne=pe.map(at=>DP({columns:c.value},at));Oe.forEach(at=>{const wt=Ne.find(Mn=>Mn.id===at);wt&&(wt.filteredValue=[])}),t.store.commit("filterChange",{column:Ne,values:[],silent:!0,multi:!0})}else Oe.forEach(Ne=>{const at=c.value.find(wt=>wt.id===Ne);at&&(at.filteredValue=[])}),k.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Ee=()=>{!B.value||(H(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:_e,toggleRowExpansion:Ve,updateExpandRows:gt,states:Ye,isRowExpanded:jt}=WP({data:s,rowKey:o}),{updateTreeExpandKeys:zn,toggleTreeExpansion:Tt,updateTreeData:Zt,loadOrToggle:Kt,states:En}=KP({data:s,rowKey:o}),{updateCurrentRowData:en,updateCurrentRow:oe,setCurrentRowKey:be,states:qe}=jP({data:s,rowKey:o});return{assertRowKey:ne,updateColumns:Q,scheduleLayout:V,isSelected:le,clearSelection:I,cleanSelection:Z,getSelectionRows:de,toggleRowSelection:J,_toggleAllSelection:G,toggleAllSelection:null,updateSelectionByRowKey:U,updateAllSelected:re,updateFilters:O,updateCurrentRow:oe,updateSort:H,execFilter:K,execSort:te,execQuery:ge,clearFilter:Le,clearSort:Ee,toggleRowExpansion:Ve,setExpandRowKeysAdapter:pe=>{_e(pe),zn(pe)},setCurrentRowKey:be,toggleRowExpansionAdapter:(pe,Se)=>{c.value.some(({type:Oe})=>Oe==="expand")?Ve(pe,Se):Tt(pe,Se)},isRowExpanded:jt,updateExpandRows:gt,updateCurrentRowData:en,loadOrToggle:Kt,updateTreeData:Zt,states:{tableSize:n,rowKey:o,data:s,_data:i,isComplex:r,_columns:a,originColumns:l,columns:c,fixedColumns:u,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:g,updateOrderFns:h,leafColumnsLength:v,fixedLeafColumnsLength:m,rightFixedLeafColumnsLength:y,isAllSelected:w,selection:_,reserveSelection:x,selectOnIndeterminate:S,selectable:C,filters:k,filteredData:T,sortingColumn:B,sortProp:$,sortOrder:D,hoverRow:W,...Ye,...En,...qe}}}function Dl(e,t){return e.map(n=>{var o;return n.id===t.id?t:((o=n.children)!=null&&o.length&&(n.children=Dl(n.children,t)),n)})}function Bl(e){e.forEach(t=>{var n,o;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(o=t.children)!=null&&o.length&&Bl(t.children)}),e.sort((t,n)=>t.no-n.no)}function YP(){const e=De(),t=qP();return{ns:he("table"),...t,mutations:{setData(r,a){const l=b(r._data)!==a;r.data.value=a,r._data.value=a,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),b(r.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):l?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,a,l,c){const u=b(r._columns);let d=[];l?(l&&!l.children&&(l.children=[]),l.children.push(a),d=Dl(u,l)):(u.push(a),d=u),Bl(d),r._columns.value=d,r.updateOrderFns.push(c),a.type==="selection"&&(r.selectable.value=a.selectable,r.reserveSelection.value=a.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,a){var l;((l=a.getColumnIndex)==null?void 0:l.call(a))!==a.no&&(Bl(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,a,l,c){const u=b(r._columns)||[];if(l)l.children.splice(l.children.findIndex(f=>f.id===a.id),1),xe(()=>{var f;((f=l.children)==null?void 0:f.length)===0&&delete l.children}),r._columns.value=Dl(u,l);else{const f=u.indexOf(a);f>-1&&(u.splice(f,1),r._columns.value=u)}const d=r.updateOrderFns.indexOf(c);d>-1&&r.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,a){const{prop:l,order:c,init:u}=a;if(l){const d=b(r.columns).find(f=>f.property===l);d&&(d.order=c,e.store.updateSort(d,l,c),e.store.commit("changeSortCondition",{init:u}))}},changeSortCondition(r,a){const{sortingColumn:l,sortProp:c,sortOrder:u}=r,d=b(l),f=b(c),p=b(u);p===null&&(r.sortingColumn.value=null,r.sortProp.value=null);const g={filter:!0};e.store.execQuery(g),(!a||!(a.silent||a.init))&&e.emit("sort-change",{column:d,prop:f,order:p}),e.store.updateTableScrollY()},filterChange(r,a){const{column:l,values:c,silent:u}=a,d=e.store.updateFilters(l,c);e.store.execQuery(),u||e.emit("filter-change",d),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(r,a){e.store.toggleRowSelection(a),e.store.updateAllSelected()},setHoverRow(r,a){r.hoverRow.value=a},setCurrentRow(r,a){e.store.updateCurrentRow(a)}},commit:function(r,...a){const l=e.store.mutations;if(l[r])l[r].apply(e,[e.store.states].concat(a));else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){xe(()=>e.layout.updateScrollY.apply(e.layout))}}}const yi={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"}};function GP(e,t){if(!e)throw new Error("Table is required.");const n=YP();return n.toggleAllSelection=rs(n._toggleAllSelection,10),Object.keys(yi).forEach(o=>{jg(Kg(t,o),o,n)}),XP(n,t),n}function XP(e,t){Object.keys(yi).forEach(n=>{se(()=>Kg(t,n),o=>{jg(o,n,e)})})}function jg(e,t,n){let o=e,s=yi[t];typeof yi[t]=="object"&&(s=s.key,o=o||yi[t].default),n.states[s].value=o}function Kg(e,t){if(t.includes(".")){const n=t.split(".");let o=e;return n.forEach(s=>{o=o[s]}),o}else return e[t]}class QP{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=A(null),this.scrollX=A(!1),this.scrollY=A(!1),this.bodyWidth=A(null),this.fixedWidth=A(null),this.rightFixedWidth=A(null),this.gutterWidth=0;for(const n in t)so(t,n)&&(Eo(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n==null?void 0:n.wrapRef)){let o=!0;const s=this.scrollY.value;return o=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=o,s!==o}return!1}setHeight(t,n="height"){if(!ot)return;const o=this.table.vnode.el;if(t=NP(t),this.height.value=Number(t),!o&&(t||t===0))return xe(()=>this.setHeight(t,n));typeof t=="number"?(o.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(o.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(o=>{o.isColumnGroup?t.push.apply(t,o.columns):t.push(o)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!ot)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let o=0;const s=this.getFlattenColumns(),i=s.filter(l=>typeof l.width!="number");if(s.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),i.length>0&&t){if(s.forEach(l=>{o+=Number(l.width||l.minWidth||80)}),o<=n){this.scrollX.value=!1;const l=n-o;if(i.length===1)i[0].realWidth=Number(i[0].minWidth||80)+l;else{const c=i.reduce((f,p)=>f+Number(p.minWidth||80),0),u=l/c;let d=0;i.forEach((f,p)=>{if(p===0)return;const g=Math.floor(Number(f.minWidth||80)*u);d+=g,f.realWidth=Number(f.minWidth||80)+g}),i[0].realWidth=Number(i[0].minWidth||80)+l-d}}else this.scrollX.value=!0,i.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(o,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else s.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),o+=l.realWidth}),this.scrollX.value=o>n,this.bodyWidth.value=o;const r=this.store.states.fixedColumns.value;if(r.length>0){let l=0;r.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.fixedWidth.value=l}const a=this.store.states.rightFixedColumns.value;if(a.length>0){let l=0;a.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(o=>{var s,i;switch(t){case"columns":(s=o.state)==null||s.onColumnsChange(this);break;case"scrollable":(i=o.state)==null||i.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:JP}=ls,ZP=Y({name:"ElTableFilterPanel",components:{ElCheckbox:ls,ElCheckboxGroup:JP,ElScrollbar:Ic,ElTooltip:Io,ElIcon:$e,ArrowDown:fc,ArrowUp:Gv},directives:{ClickOutside:zc},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=De(),{t:n}=Wt(),o=he("table-filter"),s=t==null?void 0:t.parent;s.filterPanels.value[e.column.id]||(s.filterPanels.value[e.column.id]=t);const i=A(!1),r=A(null),a=P(()=>e.column&&e.column.filters),l=P({get:()=>{var _;return(((_=e.column)==null?void 0:_.filteredValue)||[])[0]},set:_=>{c.value&&(typeof _<"u"&&_!==null?c.value.splice(0,1,_):c.value.splice(0,1))}}),c=P({get(){return e.column?e.column.filteredValue||[]:[]},set(_){e.column&&e.upDataColumn("filteredValue",_)}}),u=P(()=>e.column?e.column.filterMultiple:!0),d=_=>_.value===l.value,f=()=>{i.value=!1},p=_=>{_.stopPropagation(),i.value=!i.value},g=()=>{i.value=!1},h=()=>{y(c.value),f()},v=()=>{c.value=[],y(c.value),f()},m=_=>{l.value=_,y(typeof _<"u"&&_!==null?c.value:[]),f()},y=_=>{e.store.commit("filterChange",{column:e.column,values:_}),e.store.updateAllSelected()};se(i,_=>{e.column&&e.upDataColumn("filterOpened",_)},{immediate:!0});const w=P(()=>{var _,x;return(x=(_=r.value)==null?void 0:_.popperRef)==null?void 0:x.contentRef});return{tooltipVisible:i,multiple:u,filteredValue:c,filterValue:l,filters:a,handleConfirm:h,handleReset:v,handleSelect:m,isActive:d,t:n,ns:o,showFilterPanel:p,hideFilterPanel:g,popperPaneRef:w,tooltip:r}}}),eT={key:0},tT=["disabled"],nT=["label","onClick"];function oT(e,t,n,o,s,i){const r=Me("el-checkbox"),a=Me("el-checkbox-group"),l=Me("el-scrollbar"),c=Me("arrow-up"),u=Me("arrow-down"),d=Me("el-icon"),f=Me("el-tooltip"),p=ds("click-outside");return M(),q(f,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:F(()=>[e.multiple?(M(),N("div",eT,[E("div",{class:R(e.ns.e("content"))},[L(l,{"wrap-class":e.ns.e("wrap")},{default:F(()=>[L(a,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:R(e.ns.e("checkbox-group"))},{default:F(()=>[(M(!0),N(Ge,null,Lt(e.filters,g=>(M(),q(r,{key:g.value,label:g.value},{default:F(()=>[fe(ce(g.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),E("div",{class:R(e.ns.e("bottom"))},[E("button",{class:R({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},ce(e.t("el.table.confirmFilter")),11,tT),E("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},ce(e.t("el.table.resetFilter")),1)],2)])):(M(),N("ul",{key:1,class:R(e.ns.e("list"))},[E("li",{class:R([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=g=>e.handleSelect(null))},ce(e.t("el.table.clearFilter")),3),(M(!0),N(Ge,null,Lt(e.filters,g=>(M(),N("li",{key:g.value,class:R([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),label:g.value,onClick:h=>e.handleSelect(g.value)},ce(g.text),11,nT))),128))],2))]),default:F(()=>[We((M(),N("span",{class:R([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...g)=>e.showFilterPanel&&e.showFilterPanel(...g))},[L(d,null,{default:F(()=>[e.column.filterOpened?(M(),q(c,{key:0})):(M(),q(u,{key:1}))]),_:1})],2)),[[p,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var sT=ve(ZP,[["render",oT],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function Ug(e){const t=De();cc(()=>{n.value.addObserver(t)}),Be(()=>{o(n.value),s(n.value)}),ma(()=>{o(n.value),s(n.value)}),qi(()=>{n.value.removeObserver(t)});const n=P(()=>{const i=e.layout;if(!i)throw new Error("Can not find table layout.");return i}),o=i=>{var r;const a=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col"))||[];if(!a.length)return;const l=i.getFlattenColumns(),c={};l.forEach(u=>{c[u.id]=u});for(let u=0,d=a.length;u<d;u++){const f=a[u],p=f.getAttribute("name"),g=c[p];g&&f.setAttribute("width",g.realWidth||g.width)}},s=i=>{var r,a;const l=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=l.length;u<d;u++)l[u].setAttribute("width",i.scrollY.value?i.gutterWidth:"0");const c=((a=e.vnode.el)==null?void 0:a.querySelectorAll("th.gutter"))||[];for(let u=0,d=c.length;u<d;u++){const f=c[u];f.style.width=i.scrollY.value?`${i.gutterWidth}px`:"0",f.style.display=i.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:o,onScrollableChange:s}}const Bn=Symbol("ElTable");function iT(e,t){const n=De(),o=we(Bn),s=h=>{h.stopPropagation()},i=(h,v)=>{!v.filters&&v.sortable?g(h,v,!1):v.filterable&&!v.sortable&&s(h),o==null||o.emit("header-click",v,h)},r=(h,v)=>{o==null||o.emit("header-contextmenu",v,h)},a=A(null),l=A(!1),c=A({}),u=(h,v)=>{if(!!ot&&!(v.children&&v.children.length>0)&&a.value&&e.border){l.value=!0;const m=o;t("set-drag-visible",!0);const w=(m==null?void 0:m.vnode.el).getBoundingClientRect().left,_=n.vnode.el.querySelector(`th.${v.id}`),x=_.getBoundingClientRect(),S=x.left-w+30;lc(_,"noclick"),c.value={startMouseLeft:h.clientX,startLeft:x.right-w,startColumnLeft:x.left-w,tableLeft:w};const C=m==null?void 0:m.refs.resizeProxy;C.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const k=B=>{const $=B.clientX-c.value.startMouseLeft,D=c.value.startLeft+$;C.style.left=`${Math.max(S,D)}px`},T=()=>{if(l.value){const{startColumnLeft:B,startLeft:$}=c.value,W=Number.parseInt(C.style.left,10)-B;v.width=v.realWidth=W,m==null||m.emit("header-dragend",v.width,$-B,v,h),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",T),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Qr(_,"noclick")},0)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",T)}},d=(h,v)=>{if(v.children&&v.children.length>0)return;const m=h.target;if(!oo(m))return;const y=m==null?void 0:m.closest("th");if(!(!v||!v.resizable)&&!l.value&&e.border){const w=y.getBoundingClientRect(),_=document.body.style;w.width>12&&w.right-h.pageX<8?(_.cursor="col-resize",ws(y,"is-sortable")&&(y.style.cursor="col-resize"),a.value=v):l.value||(_.cursor="",ws(y,"is-sortable")&&(y.style.cursor="pointer"),a.value=null)}},f=()=>{!ot||(document.body.style.cursor="")},p=({order:h,sortOrders:v})=>{if(h==="")return v[0];const m=v.indexOf(h||null);return v[m>v.length-2?0:m+1]},g=(h,v,m)=>{var y;h.stopPropagation();const w=v.order===m?null:m||p(v),_=(y=h.target)==null?void 0:y.closest("th");if(_&&ws(_,"noclick")){Qr(_,"noclick");return}if(!v.sortable)return;const x=e.store.states;let S=x.sortProp.value,C;const k=x.sortingColumn.value;(k!==v||k===v&&k.order===null)&&(k&&(k.order=null),x.sortingColumn.value=v,S=v.property),w?C=v.order=w:C=v.order=null,x.sortProp.value=S,x.sortOrder.value=C,o==null||o.store.commit("changeSortCondition")};return{handleHeaderClick:i,handleHeaderContextMenu:r,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:g,handleFilterClick:s}}function rT(e){const t=we(Bn),n=he("table");return{getHeaderRowStyle:a=>{const l=t==null?void 0:t.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=t==null?void 0:t.props.headerRowClassName;return typeof c=="string"?l.push(c):typeof c=="function"&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{var d;let f=(d=t==null?void 0:t.props.headerCellStyle)!=null?d:{};typeof f=="function"&&(f=f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const p=Yc(l,u.fixed,e.store,c);return Ls(p,"left"),Ls(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(a,l,c,u)=>{const d=qc(n.b(),l,u.fixed,e.store,c),f=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||f.push("is-leaf"),u.sortable&&f.push("is-sortable");const p=t==null?void 0:t.props.headerCellClassName;return typeof p=="string"?f.push(p):typeof p=="function"&&f.push(p.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),f.push(n.e("cell")),f.filter(g=>Boolean(g)).join(" ")}}}const qg=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,qg(n.children))):t.push(n)}),t},aT=e=>{let t=1;const n=(i,r)=>{if(r&&(i.level=r.level+1,t<i.level&&(t=i.level)),i.children){let a=0;i.children.forEach(l=>{n(l,i),a+=l.colSpan}),i.colSpan=a}else i.colSpan=1};e.forEach(i=>{i.level=1,n(i,void 0)});const o=[];for(let i=0;i<t;i++)o.push([]);return qg(e).forEach(i=>{i.children?(i.rowSpan=1,i.children.forEach(r=>r.isSubColumn=!0)):i.rowSpan=t-i.level+1,o[i.level-1].push(i)}),o};function lT(e){const t=we(Bn),n=P(()=>aT(e.store.states.originColumns.value));return{isGroup:P(()=>{const i=n.value.length>1;return i&&t&&(t.state.isGroup.value=!0),i}),toggleAllSelection:i=>{i.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var cT=Y({name:"ElTableHeader",components:{ElCheckbox:ls},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=De(),o=we(Bn),s=he("table"),i=A({}),{onColumnsChange:r,onScrollableChange:a}=Ug(o);Be(async()=>{await xe(),await xe();const{prop:S,order:C}=e.defaultSort;o==null||o.store.commit("sort",{prop:S,order:C,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:g}=iT(e,t),{getHeaderRowStyle:h,getHeaderRowClass:v,getHeaderCellStyle:m,getHeaderCellClass:y}=rT(e),{isGroup:w,toggleAllSelection:_,columnRows:x}=lT(e);return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=i,{ns:s,filterPanels:i,onColumnsChange:r,onScrollableChange:a,columnRows:x,getHeaderRowClass:v,getHeaderRowStyle:h,getHeaderCellClass:y,getHeaderCellStyle:m,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:g,isGroup:w,toggleAllSelection:_}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:o,getHeaderCellClass:s,getHeaderRowClass:i,getHeaderRowStyle:r,handleHeaderClick:a,handleHeaderContextMenu:l,handleMouseDown:c,handleMouseMove:u,handleSortClick:d,handleMouseOut:f,store:p,$parent:g}=this;let h=1;return Ce("thead",{class:{[e.is("group")]:t}},n.map((v,m)=>Ce("tr",{class:i(m),key:m,style:r(m)},v.map((y,w)=>(y.rowSpan>h&&(h=y.rowSpan),Ce("th",{class:s(m,w,v,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:o(m,w,v,y),onClick:_=>a(_,y),onContextmenu:_=>l(_,y),onMousedown:_=>c(_,y),onMousemove:_=>u(_,y),onMouseout:f},[Ce("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:w,store:p,_self:g}):y.label,y.sortable&&Ce("span",{onClick:_=>d(_,y),class:"caret-wrapper"},[Ce("i",{onClick:_=>d(_,y,"ascending"),class:"sort-caret ascending"}),Ce("i",{onClick:_=>d(_,y,"descending"),class:"sort-caret descending"})]),y.filterable&&Ce(sT,{store:p,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(_,x)=>{y[_]=x}})])]))))))}});function uT(e){const t=we(Bn),n=A(""),o=A(Ce("div")),{nextZIndex:s}=Kh(),i=(g,h,v)=>{var m;const y=t,w=Wa(g);let _;const x=(m=y==null?void 0:y.vnode.el)==null?void 0:m.dataset.prefix;w&&(_=Nd({columns:e.store.states.columns.value},w,x),_&&(y==null||y.emit(`cell-${v}`,h,_,w,g))),y==null||y.emit(`row-${v}`,h,_,g)},r=(g,h)=>{i(g,h,"dblclick")},a=(g,h)=>{e.store.commit("setCurrentRow",h),i(g,h,"click")},l=(g,h)=>{i(g,h,"contextmenu")},c=rs(g=>{e.store.commit("setHoverRow",g)},30),u=rs(()=>{e.store.commit("setHoverRow",null)},30),d=g=>{const h=window.getComputedStyle(g,null),v=Number.parseInt(h.paddingLeft,10)||0,m=Number.parseInt(h.paddingRight,10)||0,y=Number.parseInt(h.paddingTop,10)||0,w=Number.parseInt(h.paddingBottom,10)||0;return{left:v,right:m,top:y,bottom:w}};return{handleDoubleClick:r,handleClick:a,handleContextMenu:l,handleMouseEnter:c,handleMouseLeave:u,handleCellMouseEnter:(g,h,v)=>{var m;const y=t,w=Wa(g),_=(m=y==null?void 0:y.vnode.el)==null?void 0:m.dataset.prefix;if(w){const V=Nd({columns:e.store.states.columns.value},w,_),le=y.hoverState={cell:w,column:V,row:h};y==null||y.emit("cell-mouse-enter",le.row,le.column,le.cell,g)}if(!v)return;const x=g.target.querySelector(".cell");if(!(ws(x,`${_}-tooltip`)&&x.childNodes.length))return;const S=document.createRange();S.setStart(x,0),S.setEnd(x,x.childNodes.length);let C=S.getBoundingClientRect().width,k=S.getBoundingClientRect().height;C-Math.floor(C)<.001&&(C=Math.floor(C)),k-Math.floor(k)<.001&&(k=Math.floor(k));const{top:$,left:D,right:W,bottom:ne}=d(x),j=D+W,Q=$+ne;(C+j>x.offsetWidth||k+Q>x.offsetHeight||x.scrollWidth>x.offsetWidth)&&HP(t==null?void 0:t.refs.tableWrapper,w,w.innerText||w.textContent,s,v)},handleCellMouseLeave:g=>{if(!Wa(g))return;const v=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",v==null?void 0:v.row,v==null?void 0:v.column,v==null?void 0:v.cell,g)},tooltipContent:n,tooltipTrigger:o}}function dT(e){const t=we(Bn),n=he("table");return{getRowStyle:(c,u)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u)=>{const d=[n.e("row")];(t==null?void 0:t.props.highlightCurrentRow)&&c===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&u%2===1&&d.push(n.em("row","striped"));const f=t==null?void 0:t.props.rowClassName;return typeof f=="string"?d.push(f):typeof f=="function"&&d.push(f.call(null,{row:c,rowIndex:u})),d},getCellStyle:(c,u,d,f)=>{const p=t==null?void 0:t.props.cellStyle;let g=p!=null?p:{};typeof p=="function"&&(g=p.call(null,{rowIndex:c,columnIndex:u,row:d,column:f}));const h=Yc(u,e==null?void 0:e.fixed,e.store);return Ls(h,"left"),Ls(h,"right"),Object.assign({},g,h)},getCellClass:(c,u,d,f,p)=>{const g=qc(n.b(),u,e==null?void 0:e.fixed,e.store,void 0,p),h=[f.id,f.align,f.className,...g],v=t==null?void 0:t.props.cellClassName;return typeof v=="string"?h.push(v):typeof v=="function"&&h.push(v.call(null,{rowIndex:c,columnIndex:u,row:d,column:f})),h.push(n.e("cell")),h.filter(m=>Boolean(m)).join(" ")},getSpan:(c,u,d,f)=>{let p=1,g=1;const h=t==null?void 0:t.props.spanMethod;if(typeof h=="function"){const v=h({row:c,column:u,rowIndex:d,columnIndex:f});Array.isArray(v)?(p=v[0],g=v[1]):typeof v=="object"&&(p=v.rowspan,g=v.colspan)}return{rowspan:p,colspan:g}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const f=c.map(({realWidth:p,width:g})=>p||g).slice(d,d+u);return Number(f.reduce((p,g)=>Number(p)+Number(g),-1))}}}function fT(e){const t=we(Bn),n=he("table"),{handleDoubleClick:o,handleClick:s,handleContextMenu:i,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=uT(e),{getRowStyle:f,getRowClass:p,getCellStyle:g,getCellClass:h,getSpan:v,getColspanRealWidth:m}=dT(e),y=P(()=>e.store.states.columns.value.findIndex(({type:C})=>C==="default")),w=(C,k)=>{const T=t.props.rowKey;return T?bt(C,T):k},_=(C,k,T,B=!1)=>{const{tooltipEffect:$,tooltipOptions:D,store:W}=e,{indent:ne,columns:j}=W.states,Q=p(C,k);let V=!0;return T&&(Q.push(n.em("row",`level-${T.level}`)),V=T.display),Ce("tr",{style:[V?null:{display:"none"},f(C,k)],class:Q,key:w(C,k),onDblclick:I=>o(I,C),onClick:I=>s(I,C),onContextmenu:I=>i(I,C),onMouseenter:()=>r(k),onMouseleave:a},j.value.map((I,Z)=>{const{rowspan:de,colspan:J}=v(C,I,k,Z);if(!de||!J)return null;const G=Object.assign({},I);G.realWidth=m(j.value,J,Z);const U={store:e.store,_self:e.context||t,column:G,row:C,$index:k,cellIndex:Z,expanded:B};Z===y.value&&T&&(U.treeNode={indent:T.level*ne.value,level:T.level},typeof T.expanded=="boolean"&&(U.treeNode.expanded=T.expanded,"loading"in T&&(U.treeNode.loading=T.loading),"noLazyChildren"in T&&(U.treeNode.noLazyChildren=T.noLazyChildren)));const re=`${k},${Z}`,ie=G.columnKey||G.rawColumnKey||"",O=x(Z,I,U),H=I.showOverflowTooltip&&Pp({effect:$},D,I.showOverflowTooltip);return Ce("td",{style:g(k,Z,C,I),class:h(k,Z,C,I,J-1),key:`${ie}${re}`,rowspan:de,colspan:J,onMouseenter:K=>l(K,C,H),onMouseleave:c},[O])}))},x=(C,k,T)=>k.renderCell(T);return{wrappedRowRender:(C,k)=>{const T=e.store,{isRowExpanded:B,assertRowKey:$}=T,{treeData:D,lazyTreeNodeMap:W,childrenColumnName:ne,rowKey:j}=T.states,Q=T.states.columns.value;if(Q.some(({type:le})=>le==="expand")){const le=B(C),I=_(C,k,void 0,le),Z=t.renderExpanded;return le?Z?[[I,Ce("tr",{key:`expanded-row__${I.key}`},[Ce("td",{colspan:Q.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[Z({row:C,$index:k,store:T,expanded:le})])])]]:(console.error("[Element Error]renderExpanded is required."),I):[[I]]}else if(Object.keys(D.value).length){$();const le=bt(C,j.value);let I=D.value[le],Z=null;I&&(Z={expanded:I.expanded,level:I.level,display:!0},typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(Z.noLazyChildren=!(I.children&&I.children.length)),Z.loading=I.loading));const de=[_(C,k,Z)];if(I){let J=0;const G=(re,ie)=>{!(re&&re.length&&ie)||re.forEach(O=>{const H={display:ie.display&&ie.expanded,level:ie.level+1,expanded:!1,noLazyChildren:!1,loading:!1},K=bt(O,j.value);if(K==null)throw new Error("For nested data item, row-key is required.");if(I={...D.value[K]},I&&(H.expanded=I.expanded,I.level=I.level||H.level,I.display=!!(I.expanded&&H.display),typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(H.noLazyChildren=!(I.children&&I.children.length)),H.loading=I.loading)),J++,de.push(_(O,k+J,H)),I){const te=W.value[K]||O[ne.value];G(te,I)}})};I.display=!0;const U=W.value[le]||C[ne.value];G(U,I)}return de}else return _(C,k,void 0)},tooltipContent:u,tooltipTrigger:d}}const hT={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var pT=Y({name:"ElTableBody",props:hT,setup(e){const t=De(),n=we(Bn),o=he("table"),{wrappedRowRender:s,tooltipContent:i,tooltipTrigger:r}=fT(e),{onColumnsChange:a,onScrollableChange:l}=Ug(n);return se(e.store.states.hoverRow,(c,u)=>{!e.store.states.isComplex.value||!ot||qw(()=>{const d=t==null?void 0:t.vnode.el,f=Array.from((d==null?void 0:d.children)||[]).filter(h=>h==null?void 0:h.classList.contains(`${o.e("row")}`)),p=f[u],g=f[c];p&&Qr(p,"hover-row"),g&&lc(g,"hover-row")})}),qi(()=>{var c;(c=qn)==null||c()}),{ns:o,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:s,tooltipContent:i,tooltipTrigger:r}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return Ce("tbody",{tabIndex:-1},[n.reduce((o,s)=>o.concat(e(s,o.length)),[])])}});function Gc(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(s=>s.width===void 0)&&(n=[]);const o=s=>{const i={key:`${e.tableLayout}_${s.id}`,style:{},name:void 0};return t?i.style={width:`${s.width}px`}:i.name=s.id,i};return Ce("colgroup",{},n.map(s=>Ce("col",o(s))))}Gc.props=["columns","tableLayout"];function gT(){const e=we(Bn),t=e==null?void 0:e.store,n=P(()=>t.states.fixedLeafColumnsLength.value),o=P(()=>t.states.rightFixedColumns.value.length),s=P(()=>t.states.columns.value.length),i=P(()=>t.states.fixedColumns.value.length),r=P(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:o,columnsCount:s,leftFixedCount:i,rightFixedCount:r,columns:t.states.columns}}function mT(e){const{columns:t}=gT(),n=he("table");return{getCellClasses:(i,r)=>{const a=i[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...qc(n.b(),r,a.fixed,e.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(i,r)=>{const a=Yc(r,i.fixed,e.store);return Ls(a,"left"),Ls(a,"right"),a},columns:t}}var vT=Y({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:o}=mT(e);return{ns:he("table"),getCellClasses:t,getCellStyles:n,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:o,sumText:s,ns:i}=this,r=this.store.states.data.value;let a=[];return o?a=o({columns:e,data:r}):e.forEach((l,c)=>{if(c===0){a[c]=s;return}const u=r.map(g=>Number(g[l.property])),d=[];let f=!0;u.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const h=`${g}`.split(".")[1];d.push(h?h.length:0)}});const p=Math.max.apply(null,d);f?a[c]="":a[c]=u.reduce((g,h)=>{const v=Number(h);return Number.isNaN(+v)?g:Number.parseFloat((g+h).toFixed(Math.min(p,20)))},0)}),Ce("table",{class:i.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[Gc({columns:e}),Ce("tbody",[Ce("tr",{},[...e.map((l,c)=>Ce("td",{key:c,colspan:l.colSpan,rowspan:l.rowSpan,class:n(e,c),style:t(l,c)},[Ce("div",{class:["cell",l.labelClassName]},[a[c]])]))])])])}});function bT(e){return{setCurrentRow:u=>{e.commit("setCurrentRow",u)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(u,d)=>{e.toggleRowSelection(u,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:u=>{e.clearFilter(u)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(u,d)=>{e.toggleRowExpansionAdapter(u,d)},clearSort:()=>{e.clearSort()},sort:(u,d)=>{e.commit("sort",{prop:u,order:d})}}}function yT(e,t,n,o){const s=A(!1),i=A(null),r=A(!1),a=I=>{r.value=I},l=A({width:null,height:null,headerHeight:null}),c=A(!1),u={display:"inline-block",verticalAlign:"middle"},d=A(),f=A(0),p=A(0),g=A(0),h=A(0),v=A(0);Co(()=>{t.setHeight(e.height)}),Co(()=>{t.setMaxHeight(e.maxHeight)}),se(()=>[e.currentRowKey,n.states.rowKey],([I,Z])=>{!b(Z)||!b(I)||n.setCurrentRowKey(`${I}`)},{immediate:!0}),se(()=>e.data,I=>{o.store.commit("setData",I)},{immediate:!0,deep:!0}),Co(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const m=()=>{o.store.commit("setHoverRow",null),o.hoverState&&(o.hoverState=null)},y=(I,Z)=>{const{pixelX:de,pixelY:J}=Z;Math.abs(de)>=Math.abs(J)&&(o.refs.bodyWrapper.scrollLeft+=Z.pixelX/5)},w=P(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),_=P(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),x=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(T)};Be(async()=>{await xe(),n.updateColumns(),B(),requestAnimationFrame(x);const I=o.vnode.el,Z=o.refs.headerWrapper;e.flexible&&I&&I.parentElement&&(I.parentElement.style.minWidth="0"),l.value={width:d.value=I.offsetWidth,height:I.offsetHeight,headerHeight:e.showHeader&&Z?Z.offsetHeight:null},n.states.columns.value.forEach(de=>{de.filteredValue&&de.filteredValue.length&&o.store.commit("filterChange",{column:de,values:de.filteredValue,silent:!0})}),o.$ready=!0});const S=(I,Z)=>{if(!I)return;const de=Array.from(I.classList).filter(J=>!J.startsWith("is-scrolling-"));de.push(t.scrollX.value?Z:"is-scrolling-none"),I.className=de.join(" ")},C=I=>{const{tableWrapper:Z}=o.refs;S(Z,I)},k=I=>{const{tableWrapper:Z}=o.refs;return!!(Z&&Z.classList.contains(I))},T=function(){if(!o.refs.scrollBarRef)return;if(!t.scrollX.value){const ie="is-scrolling-none";k(ie)||C(ie);return}const I=o.refs.scrollBarRef.wrapRef;if(!I)return;const{scrollLeft:Z,offsetWidth:de,scrollWidth:J}=I,{headerWrapper:G,footerWrapper:U}=o.refs;G&&(G.scrollLeft=Z),U&&(U.scrollLeft=Z);const re=J-de-1;Z>=re?C("is-scrolling-right"):C(Z===0?"is-scrolling-left":"is-scrolling-middle")},B=()=>{!o.refs.scrollBarRef||(o.refs.scrollBarRef.wrapRef&&is(o.refs.scrollBarRef.wrapRef,"scroll",T,{passive:!0}),e.fit?In(o.vnode.el,$):is(window,"resize",$),In(o.refs.bodyWrapper,()=>{var I,Z;$(),(Z=(I=o.refs)==null?void 0:I.scrollBarRef)==null||Z.update()}))},$=()=>{var I,Z,de,J;const G=o.vnode.el;if(!o.$ready||!G)return;let U=!1;const{width:re,height:ie,headerHeight:O}=l.value,H=d.value=G.offsetWidth;re!==H&&(U=!0);const K=G.offsetHeight;(e.height||w.value)&&ie!==K&&(U=!0);const te=e.tableLayout==="fixed"?o.refs.headerWrapper:(I=o.refs.tableHeaderRef)==null?void 0:I.$el;e.showHeader&&(te==null?void 0:te.offsetHeight)!==O&&(U=!0),f.value=((Z=o.refs.tableWrapper)==null?void 0:Z.scrollHeight)||0,g.value=(te==null?void 0:te.scrollHeight)||0,h.value=((de=o.refs.footerWrapper)==null?void 0:de.offsetHeight)||0,v.value=((J=o.refs.appendWrapper)==null?void 0:J.offsetHeight)||0,p.value=f.value-g.value-h.value-v.value,U&&(l.value={width:H,height:K,headerHeight:e.showHeader&&(te==null?void 0:te.offsetHeight)||0},x())},D=cn(),W=P(()=>{const{bodyWidth:I,scrollY:Z,gutterWidth:de}=t;return I.value?`${I.value-(Z.value?de:0)}px`:""}),ne=P(()=>e.maxHeight?"fixed":e.tableLayout),j=P(()=>{if(e.data&&e.data.length)return null;let I="100%";e.height&&p.value&&(I=`${p.value}px`);const Z=d.value;return{width:Z?`${Z}px`:"",height:I}}),Q=P(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),V=P(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${g.value+h.value}px)`}:{maxHeight:`${e.maxHeight-g.value-h.value}px`}:{});return{isHidden:s,renderExpanded:i,setDragVisible:a,isGroup:c,handleMouseLeave:m,handleHeaderFooterMousewheel:y,tableSize:D,emptyBlockStyle:j,handleFixedMousewheel:(I,Z)=>{const de=o.refs.bodyWrapper;if(Math.abs(Z.spinY)>0){const J=de.scrollTop;Z.pixelY<0&&J!==0&&I.preventDefault(),Z.pixelY>0&&de.scrollHeight-de.clientHeight>J&&I.preventDefault(),de.scrollTop+=Math.ceil(Z.pixelY/5)}else de.scrollLeft+=Math.ceil(Z.pixelX/5)},resizeProxyVisible:r,bodyWidth:W,resizeState:l,doLayout:x,tableBodyStyles:_,tableLayout:ne,scrollbarViewStyle:u,tableInnerStyle:Q,scrollbarStyle:V}}function _T(e){const t=A(),n=()=>{const s=e.vnode.el.querySelector(".hidden-columns"),i={childList:!0,subtree:!0},r=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{r.forEach(a=>a())}),t.value.observe(s,i)};Be(()=>{n()}),qi(()=>{var o;(o=t.value)==null||o.disconnect()})}var wT={data:{type:Array,default:()=>[]},size:ao,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean,showOverflowTooltip:[Boolean,Object]};const xT=()=>{const e=A(),t=(i,r)=>{const a=e.value;a&&a.scrollTo(i,r)},n=(i,r)=>{const a=e.value;a&&He(r)&&["Top","Left"].includes(i)&&a[`setScroll${i}`](r)};return{scrollBarRef:e,scrollTo:t,setScrollTop:i=>n("Top",i),setScrollLeft:i=>n("Left",i)}};let ST=1;const CT=Y({name:"ElTable",directives:{Mousewheel:wk},components:{TableHeader:cT,TableBody:pT,TableFooter:vT,ElScrollbar:Ic,hColgroup:Gc},props:wT,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Wt(),n=he("table"),o=De();rt(Bn,o);const s=GP(o,e);o.store=s;const i=new QP({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=i;const r=P(()=>(s.states.data.value||[]).length===0),{setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:g,sort:h}=bT(s),{isHidden:v,renderExpanded:m,setDragVisible:y,isGroup:w,handleMouseLeave:_,handleHeaderFooterMousewheel:x,tableSize:S,emptyBlockStyle:C,handleFixedMousewheel:k,resizeProxyVisible:T,bodyWidth:B,resizeState:$,doLayout:D,tableBodyStyles:W,tableLayout:ne,scrollbarViewStyle:j,tableInnerStyle:Q,scrollbarStyle:V}=yT(e,i,s,o),{scrollBarRef:le,scrollTo:I,setScrollLeft:Z,setScrollTop:de}=xT(),J=rs(D,50),G=`${n.namespace.value}-table_${ST++}`;o.tableId=G,o.state={isGroup:w,resizeState:$,doLayout:D,debouncedUpdateLayout:J};const U=P(()=>e.sumText||t("el.table.sumText")),re=P(()=>e.emptyText||t("el.table.emptyText"));return _T(o),{ns:n,layout:i,store:s,handleHeaderFooterMousewheel:x,handleMouseLeave:_,tableId:G,tableSize:S,isHidden:v,isEmpty:r,renderExpanded:m,resizeProxyVisible:T,resizeState:$,isGroup:w,bodyWidth:B,tableBodyStyles:W,emptyBlockStyle:C,debouncedUpdateLayout:J,handleFixedMousewheel:k,setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:g,doLayout:D,sort:h,t,setDragVisible:y,context:o,computedSumText:U,computedEmptyText:re,tableLayout:ne,scrollbarViewStyle:j,tableInnerStyle:Q,scrollbarStyle:V,scrollBarRef:le,scrollTo:I,setScrollLeft:Z,setScrollTop:de}}}),kT=["data-prefix"],ET={ref:"hiddenColumns",class:"hidden-columns"};function MT(e,t,n,o,s,i){const r=Me("hColgroup"),a=Me("table-header"),l=Me("table-body"),c=Me("el-scrollbar"),u=Me("table-footer"),d=ds("mousewheel");return M(),N("div",{ref:"tableWrapper",class:R([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Te(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...f)=>e.handleMouseLeave&&e.handleMouseLeave(...f))},[E("div",{class:R(e.ns.e("inner-wrapper")),style:Te(e.tableInnerStyle)},[E("div",ET,[me(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?We((M(),N("div",{key:0,ref:"headerWrapper",class:R(e.ns.e("header-wrapper"))},[E("table",{ref:"tableHeader",class:R(e.ns.e("header")),style:Te(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[L(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),L(a,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,e.handleHeaderFooterMousewheel]]):X("v-if",!0),E("div",{ref:"bodyWrapper",class:R(e.ns.e("body-wrapper"))},[L(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:F(()=>[E("table",{ref:"tableBody",class:R(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Te({width:e.bodyWidth,tableLayout:e.tableLayout})},[L(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(M(),q(a,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):X("v-if",!0),L(l,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(M(),N("div",{key:0,ref:"emptyBlock",style:Te(e.emptyBlockStyle),class:R(e.ns.e("empty-block"))},[E("span",{class:R(e.ns.e("empty-text"))},[me(e.$slots,"empty",{},()=>[fe(ce(e.computedEmptyText),1)])],2)],6)):X("v-if",!0),e.$slots.append?(M(),N("div",{key:1,ref:"appendWrapper",class:R(e.ns.e("append-wrapper"))},[me(e.$slots,"append")],2)):X("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?We((M(),N("div",{key:1,ref:"footerWrapper",class:R(e.ns.e("footer-wrapper"))},[L(u,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:Te(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[Et,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):X("v-if",!0),e.border||e.isGroup?(M(),N("div",{key:2,class:R(e.ns.e("border-left-patch"))},null,2)):X("v-if",!0)],6),We(E("div",{ref:"resizeProxy",class:R(e.ns.e("column-resize-proxy"))},null,2),[[Et,e.resizeProxyVisible]])],46,kT)}var PT=ve(CT,[["render",MT],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const TT={selection:"table-column--selection",expand:"table__expand-column"},OT={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},AT=e=>TT[e]||"",RT={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return Ce(ls,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:o}){return Ce(ls,{disabled:t.selectable?!t.selectable.call(null,e,o):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const o=e.index;return typeof o=="number"?n=t+o:typeof o=="function"&&(n=o(t)),Ce("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:o}=t,s=[o.e("expand-icon")];return n&&s.push(o.em("expand-icon","expanded")),Ce("div",{class:s,onClick:function(r){r.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Ce($e,null,{default:()=>[Ce(va)]})]})},sortable:!1,resizable:!1}};function LT({row:e,column:t,$index:n}){var o;const s=t.property,i=s&&Or(e,s).value;return t&&t.formatter?t.formatter(e,t,i,n):((o=i==null?void 0:i.toString)==null?void 0:o.call(i))||""}function $T({row:e,treeNode:t,store:n},o=!1){const{ns:s}=n;if(!t)return o?[Ce("span",{class:s.e("placeholder")})]:null;const i=[],r=function(a){a.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&i.push(Ce("span",{class:s.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const a=[s.e("expand-icon"),t.expanded?s.em("expand-icon","expanded"):""];let l=va;t.loading&&(l=dc),i.push(Ce("div",{class:a,onClick:r},{default:()=>[Ce($e,{class:{[s.is("loading")]:t.loading}},{default:()=>[Ce(l)]})]}))}else i.push(Ce("span",{class:s.e("placeholder")}));return i}function Hd(e,t){return e.reduce((n,o)=>(n[o]=o,n),t)}function IT(e,t){const n=De();return{registerComplexWatchers:()=>{const i=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=Hd(i,r);Object.keys(a).forEach(l=>{const c=r[l];so(t,c)&&se(()=>t[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=Uc(u)),c==="minWidth"&&l==="realMinWidth"&&(d=Vg(u)),n.columnConfig.value[c]=d,n.columnConfig.value[l]=d;const f=c==="fixed";e.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const i=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},a=Hd(i,r);Object.keys(a).forEach(l=>{const c=r[l];so(t,c)&&se(()=>t[c],u=>{n.columnConfig.value[l]=u})})}}}function FT(e,t,n){const o=De(),s=A(""),i=A(!1),r=A(),a=A(),l=he("table");Co(()=>{r.value=e.align?`is-${e.align}`:null,r.value}),Co(()=>{a.value=e.headerAlign?`is-${e.headerAlign}`:r.value,a.value});const c=P(()=>{let _=o.vnode.vParent||o.parent;for(;_&&!_.tableId&&!_.columnId;)_=_.vnode.vParent||_.parent;return _}),u=P(()=>{const{store:_}=o.parent;if(!_)return!1;const{treeData:x}=_.states,S=x.value;return S&&Object.keys(S).length>0}),d=A(Uc(e.width)),f=A(Vg(e.minWidth)),p=_=>(d.value&&(_.width=d.value),f.value&&(_.minWidth=f.value),!d.value&&f.value&&(_.width=void 0),_.minWidth||(_.minWidth=80),_.realWidth=Number(_.width===void 0?_.minWidth:_.width),_),g=_=>{const x=_.type,S=RT[x]||{};Object.keys(S).forEach(k=>{const T=S[k];k!=="className"&&T!==void 0&&(_[k]=T)});const C=AT(x);if(C){const k=`${b(l.namespace)}-${C}`;_.className=_.className?`${_.className} ${k}`:k}return _},h=_=>{Array.isArray(_)?_.forEach(S=>x(S)):x(_);function x(S){var C;((C=S==null?void 0:S.type)==null?void 0:C.name)==="ElTableColumn"&&(S.vParent=o)}};return{columnId:s,realAlign:r,isSubColumn:i,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:_=>{e.renderHeader||_.type!=="selection"&&(_.renderHeader=S=>{o.columnConfig.value.label;const C=t.header;return C?C(S):_.label});let x=_.renderCell;return _.type==="expand"?(_.renderCell=S=>Ce("div",{class:"cell"},[x(S)]),n.value.renderExpanded=S=>t.default?t.default(S):t.default):(x=x||LT,_.renderCell=S=>{let C=null;if(t.default){const W=t.default(S);C=W.some(ne=>ne.type!==Wh)?W:x(S)}else C=x(S);const{columns:k}=n.value.store.states,T=k.value.findIndex(W=>W.type==="default"),B=u.value&&S.cellIndex===T,$=$T(S,B),D={class:"cell",style:{}};return _.showOverflowTooltip&&(D.class=`${D.class} ${b(l.namespace)}-tooltip`,D.style={width:`${(S.column.realWidth||Number(S.column.width))-1}px`}),h(C),Ce("div",D,[$,C])}),_},getPropsData:(..._)=>_.reduce((x,S)=>(Array.isArray(S)&&S.forEach(C=>{x[C]=e[C]}),x),{}),getColumnElIndex:(_,x)=>Array.prototype.indexOf.call(_,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",o.columnConfig.value)}}}var DT={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let BT=1;var Yg=Y({name:"ElTableColumn",components:{ElCheckbox:ls},props:DT,setup(e,{slots:t}){const n=De(),o=A({}),s=P(()=>{let w=n.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:i,registerComplexWatchers:r}=IT(s,e),{columnId:a,isSubColumn:l,realHeaderAlign:c,columnOrTableParent:u,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:p,getPropsData:g,getColumnElIndex:h,realAlign:v,updateColumnOrder:m}=FT(e,t,s),y=u.value;a.value=`${y.tableId||y.columnId}_column_${BT++}`,cc(()=>{l.value=s.value!==y;const w=e.type||"default",_=e.sortable===""?!0:e.sortable,x=Po(e.showOverflowTooltip)?y.props.showOverflowTooltip:e.showOverflowTooltip,S={...OT[w],id:a.value,type:w,property:e.prop||e.property,align:v,headerAlign:c,showOverflowTooltip:x,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:_,index:e.index,rawColumnKey:n.vnode.key};let $=g(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);$=BP(S,$),$=zP(p,d,f)($),o.value=$,i(),r()}),Be(()=>{var w;const _=u.value,x=l.value?_.vnode.el.children:(w=_.refs.hiddenColumns)==null?void 0:w.children,S=()=>h(x||[],n.vnode.el);o.value.getColumnIndex=S,S()>-1&&s.value.store.commit("insertColumn",o.value,l.value?_.columnConfig.value:null,m)}),Pt(()=>{s.value.store.commit("removeColumn",o.value,l.value?y.columnConfig.value:null,m)}),n.columnId=a.value,n.columnConfig=o},render(){var e,t,n;try{const o=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),s=[];if(Array.isArray(o))for(const r of o)((n=r.type)==null?void 0:n.name)==="ElTableColumn"||r.shapeFlag&2?s.push(r):r.type===Ge&&Array.isArray(r.children)&&r.children.forEach(a=>{(a==null?void 0:a.patchFlag)!==1024&&!st(a==null?void 0:a.children)&&s.push(a)});return Ce("div",s)}catch{return Ce("div",[])}}});const NT=dt(PT,{TableColumn:Yg}),zT=un(Yg),Ca=Symbol("tabsRootContextKey"),VT=ke({tabs:{type:ye(Array),default:()=>pn([])}}),Gg="ElTabBar",HT=Y({name:Gg}),WT=Y({...HT,props:VT,setup(e,{expose:t}){const n=e,o=De(),s=we(Ca);s||Ro(Gg,"<el-tabs><el-tab-bar /></el-tabs>");const i=he("tabs"),r=A(),a=A(),l=()=>{let u=0,d=0;const f=["top","bottom"].includes(s.props.tabPosition)?"width":"height",p=f==="width"?"x":"y",g=p==="x"?"left":"top";return n.tabs.every(h=>{var v,m;const y=(m=(v=o.parent)==null?void 0:v.refs)==null?void 0:m[`tab-${h.uid}`];if(!y)return!1;if(!h.active)return!0;u=y[`offset${bo(g)}`],d=y[`client${bo(f)}`];const w=window.getComputedStyle(y);return f==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(w.paddingLeft)+Number.parseFloat(w.paddingRight)),u+=Number.parseFloat(w.paddingLeft)),!1}),{[f]:`${d}px`,transform:`translate${bo(p)}(${u}px)`}},c=()=>a.value=l();return se(()=>n.tabs,async()=>{await xe(),c()},{immediate:!0}),In(r,()=>c()),t({ref:r,update:c}),(u,d)=>(M(),N("div",{ref_key:"barRef",ref:r,class:R([b(i).e("active-bar"),b(i).is(b(s).props.tabPosition)]),style:Te(a.value)},null,6))}});var jT=ve(WT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const KT=ke({panes:{type:ye(Array),default:()=>pn([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),UT={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},Wd="ElTabNav",qT=Y({name:Wd,props:KT,emits:UT,setup(e,{expose:t,emit:n}){const o=De(),s=we(Ca);s||Ro(Wd,"<el-tabs><tab-nav /></el-tabs>");const i=he("tabs"),r=Xv(),a=Qv(),l=A(),c=A(),u=A(),d=A(),f=A(!1),p=A(0),g=A(!1),h=A(!0),v=P(()=>["top","bottom"].includes(s.props.tabPosition)?"width":"height"),m=P(()=>({transform:`translate${v.value==="width"?"X":"Y"}(-${p.value}px)`})),y=()=>{if(!l.value)return;const T=l.value[`offset${bo(v.value)}`],B=p.value;if(!B)return;const $=B>T?B-T:0;p.value=$},w=()=>{if(!l.value||!c.value)return;const T=c.value[`offset${bo(v.value)}`],B=l.value[`offset${bo(v.value)}`],$=p.value;if(T-$<=B)return;const D=T-$>B*2?$+B:T-B;p.value=D},_=async()=>{const T=c.value;if(!f.value||!u.value||!l.value||!T)return;await xe();const B=u.value.querySelector(".is-active");if(!B)return;const $=l.value,D=["top","bottom"].includes(s.props.tabPosition),W=B.getBoundingClientRect(),ne=$.getBoundingClientRect(),j=D?T.offsetWidth-ne.width:T.offsetHeight-ne.height,Q=p.value;let V=Q;D?(W.left<ne.left&&(V=Q-(ne.left-W.left)),W.right>ne.right&&(V=Q+W.right-ne.right)):(W.top<ne.top&&(V=Q-(ne.top-W.top)),W.bottom>ne.bottom&&(V=Q+(W.bottom-ne.bottom))),V=Math.max(V,0),p.value=Math.min(V,j)},x=()=>{var T;if(!c.value||!l.value)return;e.stretch&&((T=d.value)==null||T.update());const B=c.value[`offset${bo(v.value)}`],$=l.value[`offset${bo(v.value)}`],D=p.value;$<B?(f.value=f.value||{},f.value.prev=D,f.value.next=D+$<B,B-D<$&&(p.value=B-$)):(f.value=!1,D>0&&(p.value=0))},S=T=>{const B=T.code,{up:$,down:D,left:W,right:ne}=on;if(![$,D,W,ne].includes(B))return;const j=Array.from(T.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),Q=j.indexOf(T.target);let V;B===W||B===$?Q===0?V=j.length-1:V=Q-1:Q<j.length-1?V=Q+1:V=0,j[V].focus({preventScroll:!0}),j[V].click(),C()},C=()=>{h.value&&(g.value=!0)},k=()=>g.value=!1;return se(r,T=>{T==="hidden"?h.value=!1:T==="visible"&&setTimeout(()=>h.value=!0,50)}),se(a,T=>{T?setTimeout(()=>h.value=!0,50):h.value=!1}),In(u,x),Be(()=>setTimeout(()=>_(),0)),ma(()=>x()),t({scrollToActiveTab:_,removeFocus:k}),se(()=>e.panes,()=>o.update(),{flush:"post",deep:!0}),()=>{const T=f.value?[L("span",{class:[i.e("nav-prev"),i.is("disabled",!f.value.prev)],onClick:y},[L($e,null,{default:()=>[L(Gh,null,null)]})]),L("span",{class:[i.e("nav-next"),i.is("disabled",!f.value.next)],onClick:w},[L($e,null,{default:()=>[L(va,null,null)]})])]:null,B=e.panes.map(($,D)=>{var W,ne,j,Q;const V=$.uid,le=$.props.disabled,I=(ne=(W=$.props.name)!=null?W:$.index)!=null?ne:`${D}`,Z=!le&&($.isClosable||e.editable);$.index=`${D}`;const de=Z?L($e,{class:"is-icon-close",onClick:U=>n("tabRemove",$,U)},{default:()=>[L(Mi,null,null)]}):null,J=((Q=(j=$.slots).label)==null?void 0:Q.call(j))||$.props.label,G=!le&&$.active?0:-1;return L("div",{ref:`tab-${V}`,class:[i.e("item"),i.is(s.props.tabPosition),i.is("active",$.active),i.is("disabled",le),i.is("closable",Z),i.is("focus",g.value)],id:`tab-${I}`,key:`tab-${V}`,"aria-controls":`pane-${I}`,role:"tab","aria-selected":$.active,tabindex:G,onFocus:()=>C(),onBlur:()=>k(),onClick:U=>{k(),n("tabClick",$,I,U)},onKeydown:U=>{Z&&(U.code===on.delete||U.code===on.backspace)&&n("tabRemove",$,U)}},[J,de])});return L("div",{ref:u,class:[i.e("nav-wrap"),i.is("scrollable",!!f.value),i.is(s.props.tabPosition)]},[T,L("div",{class:i.e("nav-scroll"),ref:l},[L("div",{class:[i.e("nav"),i.is(s.props.tabPosition),i.is("stretch",e.stretch&&["top","bottom"].includes(s.props.tabPosition))],ref:c,style:m.value,role:"tablist",onKeydown:S},[e.type?null:L(jT,{ref:d,tabs:[...e.panes]},null),B])])])}}}),YT=ke({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:ye(Function),default:()=>!0},stretch:Boolean}),ja=e=>st(e)||He(e),GT={[Je]:e=>ja(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>ja(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>ja(e),tabAdd:()=>!0};var XT=Y({name:"ElTabs",props:YT,emits:GT,setup(e,{emit:t,slots:n,expose:o}){var s,i;const r=he("tabs"),{children:a,addChild:l,removeChild:c}=Yp(De(),"ElTabPane"),u=A(),d=A((i=(s=e.modelValue)!=null?s:e.activeName)!=null?i:"0"),f=m=>{d.value=m,t(Je,m),t("tabChange",m)},p=async m=>{var y,w,_;if(!(d.value===m||Po(m)))try{await((y=e.beforeLeave)==null?void 0:y.call(e,m,d.value))!==!1&&(f(m),(_=(w=u.value)==null?void 0:w.removeFocus)==null||_.call(w))}catch{}},g=(m,y,w)=>{m.props.disabled||(p(y),t("tabClick",m,w))},h=(m,y)=>{m.props.disabled||Po(m.props.name)||(y.stopPropagation(),t("edit",m.props.name,"remove"),t("tabRemove",m.props.name))},v=()=>{t("edit",void 0,"add"),t("tabAdd")};return ya({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},P(()=>!!e.activeName)),se(()=>e.activeName,m=>p(m)),se(()=>e.modelValue,m=>p(m)),se(d,async()=>{var m;await xe(),(m=u.value)==null||m.scrollToActiveTab()}),rt(Ca,{props:e,currentName:d,registerPane:l,unregisterPane:c}),o({currentName:d}),()=>{const m=e.editable||e.addable?L("span",{class:r.e("new-tab"),tabindex:"0",onClick:v,onKeydown:_=>{_.code===on.enter&&v()}},[L($e,{class:r.is("icon-plus")},{default:()=>[L(Jv,null,null)]})]):null,y=L("div",{class:[r.e("header"),r.is(e.tabPosition)]},[m,L(qT,{ref:u,currentName:d.value,editable:e.editable,type:e.type,panes:a.value,stretch:e.stretch,onTabClick:g,onTabRemove:h},null)]),w=L("div",{class:r.e("content")},[me(n,"default")]);return L("div",{class:[r.b(),r.m(e.tabPosition),{[r.m("card")]:e.type==="card",[r.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[y,w]:[w,y]])}}});const QT=ke({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),JT=["id","aria-hidden","aria-labelledby"],Xg="ElTabPane",ZT=Y({name:Xg}),eO=Y({...ZT,props:QT,setup(e){const t=e,n=De(),o=Hs(),s=we(Ca);s||Ro(Xg,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const i=he("tab-pane"),r=A(),a=P(()=>t.closable||s.props.closable),l=bu(()=>{var p;return s.currentName.value===((p=t.name)!=null?p:r.value)}),c=A(l.value),u=P(()=>{var p;return(p=t.name)!=null?p:r.value}),d=bu(()=>!t.lazy||c.value||l.value);se(l,p=>{p&&(c.value=!0)});const f=Ht({uid:n.uid,slots:o,props:t,paneName:u,active:l,index:r,isClosable:a});return Be(()=>{s.registerPane(f)}),qi(()=>{s.unregisterPane(f.uid)}),(p,g)=>b(d)?We((M(),N("div",{key:0,id:`pane-${b(u)}`,class:R(b(i).b()),role:"tabpanel","aria-hidden":!b(l),"aria-labelledby":`tab-${b(u)}`},[me(p.$slots,"default")],10,JT)),[[Et,b(l)]]):X("v-if",!0)}});var Qg=ve(eO,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const Jg=dt(XT,{TabPane:Qg}),Zg=un(Qg),em=["success","info","warning","error"],Ft=pn({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:ot?document.body:void 0}),tO=ke({customClass:{type:String,default:Ft.customClass},center:{type:Boolean,default:Ft.center},dangerouslyUseHTMLString:{type:Boolean,default:Ft.dangerouslyUseHTMLString},duration:{type:Number,default:Ft.duration},icon:{type:yt,default:Ft.icon},id:{type:String,default:Ft.id},message:{type:ye([String,Object,Function]),default:Ft.message},onClose:{type:ye(Function),required:!1},showClose:{type:Boolean,default:Ft.showClose},type:{type:String,values:em,default:Ft.type},offset:{type:Number,default:Ft.offset},zIndex:{type:Number,default:Ft.zIndex},grouping:{type:Boolean,default:Ft.grouping},repeatNum:{type:Number,default:Ft.repeatNum}}),nO={destroy:()=>!0},gn=Xh([]),oO=e=>{const t=gn.findIndex(s=>s.id===e),n=gn[t];let o;return t>0&&(o=gn[t-1]),{current:n,prev:o}},sO=e=>{const{prev:t}=oO(e);return t?t.vm.exposed.bottom.value:0},iO=(e,t)=>gn.findIndex(o=>o.id===e)>0?20:t,rO=["id"],aO=["innerHTML"],lO=Y({name:"ElMessage"}),cO=Y({...lO,props:tO,emits:nO,setup(e,{expose:t}){const n=e,{Close:o}=Jh,{ns:s,zIndex:i}=Qh("message"),{currentZIndex:r,nextZIndex:a}=i,l=A(),c=A(!1),u=A(0);let d;const f=P(()=>n.type?n.type==="error"?"danger":n.type:"info"),p=P(()=>{const C=n.type;return{[s.bm("icon",C)]:C&&Zr[C]}}),g=P(()=>n.icon||Zr[n.type]||""),h=P(()=>sO(n.id)),v=P(()=>iO(n.id,n.offset)+h.value),m=P(()=>u.value+v.value),y=P(()=>({top:`${v.value}px`,zIndex:r.value}));function w(){n.duration!==0&&({stop:d}=Zv(()=>{x()},n.duration))}function _(){d==null||d()}function x(){c.value=!1}function S({code:C}){C===on.esc&&x()}return Be(()=>{w(),a(),c.value=!0}),se(()=>n.repeatNum,()=>{_(),w()}),is(document,"keydown",S),In(l,()=>{u.value=l.value.getBoundingClientRect().height}),t({visible:c,bottom:m,close:x}),(C,k)=>(M(),q(Mo,{name:b(s).b("fade"),onBeforeLeave:C.onClose,onAfterLeave:k[0]||(k[0]=T=>C.$emit("destroy")),persisted:""},{default:F(()=>[We(E("div",{id:C.id,ref_key:"messageRef",ref:l,class:R([b(s).b(),{[b(s).m(C.type)]:C.type&&!C.icon},b(s).is("center",C.center),b(s).is("closable",C.showClose),C.customClass]),style:Te(b(y)),role:"alert",onMouseenter:_,onMouseleave:w},[C.repeatNum>1?(M(),q(b(VC),{key:0,value:C.repeatNum,type:b(f),class:R(b(s).e("badge"))},null,8,["value","type","class"])):X("v-if",!0),b(g)?(M(),q(b($e),{key:1,class:R([b(s).e("icon"),b(p)])},{default:F(()=>[(M(),q(Ue(b(g))))]),_:1},8,["class"])):X("v-if",!0),me(C.$slots,"default",{},()=>[C.dangerouslyUseHTMLString?(M(),N(Ge,{key:1},[X(" Caution here, message could've been compromised, never use user's input as message "),E("p",{class:R(b(s).e("content")),innerHTML:C.message},null,10,aO)],2112)):(M(),N("p",{key:0,class:R(b(s).e("content"))},ce(C.message),3))]),C.showClose?(M(),q(b($e),{key:2,class:R(b(s).e("closeBtn")),onClick:et(x,["stop"])},{default:F(()=>[L(b(o))]),_:1},8,["class","onClick"])):X("v-if",!0)],46,rO),[[Et,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var uO=ve(cO,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let dO=1;const tm=e=>{const t=!e||st(e)||ss(e)||mt(e)?{message:e}:e,n={...Ft,...t};if(!n.appendTo)n.appendTo=document.body;else if(st(n.appendTo)){let o=document.querySelector(n.appendTo);oo(o)||(o=document.body),n.appendTo=o}return n},fO=e=>{const t=gn.indexOf(e);if(t===-1)return;gn.splice(t,1);const{handler:n}=e;n.close()},hO=({appendTo:e,...t},n)=>{const o=`message_${dO++}`,s=t.onClose,i=document.createElement("div"),r={...t,id:o,onClose:()=>{s==null||s(),fO(u)},onDestroy:()=>{ea(null,i)}},a=L(uO,r,mt(r.message)||ss(r.message)?{default:mt(r.message)?r.message:()=>r.message}:null);a.appContext=n||$s._context,ea(a,i),e.appendChild(i.firstElementChild);const l=a.component,u={id:o,vnode:a,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:a.component.props};return u},$s=(e={},t)=>{if(!ot)return{close:()=>{}};if(He(bl.max)&&gn.length>=bl.max)return{close:()=>{}};const n=tm(e);if(n.grouping&&gn.length){const s=gn.find(({vnode:i})=>{var r;return((r=i.props)==null?void 0:r.message)===n.message});if(s)return s.props.repeatNum+=1,s.props.type=n.type,s.handler}const o=hO(n,t);return gn.push(o),o.handler};em.forEach(e=>{$s[e]=(t={},n)=>{const o=tm(t);return $s({...o,type:e},n)}});function pO(e){for(const t of gn)(!e||e===t.props.type)&&t.handler.close()}$s.closeAll=pO;$s._context=null;const gO=eb($s,"$message"),mO=Y({name:"ElMessageBox",directives:{TrapFocus:pk},components:{ElButton:Dn,ElFocusTrap:sg,ElInput:$o,ElOverlay:GE,ElIcon:$e,...Jh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Cc},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:o,ns:s,size:i}=Qh("message-box",P(()=>e.buttonSize)),{t:r}=n,{nextZIndex:a}=o,l=A(!1),c=Ht({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=P(()=>{const j=c.type;return{[s.bm("icon",j)]:j&&Zr[j]}}),d=Rs(),f=Rs(),p=P(()=>c.icon||Zr[c.type]||""),g=P(()=>!!c.message),h=A(),v=A(),m=A(),y=A(),w=A(),_=P(()=>c.confirmButtonClass);se(()=>c.inputValue,async j=>{await xe(),e.boxType==="prompt"&&j!==null&&$()},{immediate:!0}),se(()=>l.value,j=>{var Q,V;j&&(e.boxType!=="prompt"&&(c.autofocus?m.value=(V=(Q=w.value)==null?void 0:Q.$el)!=null?V:h.value:m.value=h.value),c.zIndex=a()),e.boxType==="prompt"&&(j?xe().then(()=>{var le;y.value&&y.value.$el&&(c.autofocus?m.value=(le=D())!=null?le:h.value:m.value=h.value)}):(c.editorErrorMessage="",c.validateError=!1))});const x=P(()=>e.draggable);Qw(h,v,x),Be(async()=>{await xe(),e.closeOnHashChange&&window.addEventListener("hashchange",S)}),Pt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",S)});function S(){!l.value||(l.value=!1,xe(()=>{c.action&&t("action",c.action)}))}const C=()=>{e.closeOnClickModal&&B(c.distinguishCancelAndClose?"close":"cancel")},k=Wp(C),T=j=>{if(c.inputType!=="textarea")return j.preventDefault(),B("confirm")},B=j=>{var Q;e.boxType==="prompt"&&j==="confirm"&&!$()||(c.action=j,c.beforeClose?(Q=c.beforeClose)==null||Q.call(c,j,c,S):S())},$=()=>{if(e.boxType==="prompt"){const j=c.inputPattern;if(j&&!j.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const Q=c.inputValidator;if(typeof Q=="function"){const V=Q(c.inputValue);if(V===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(typeof V=="string")return c.editorErrorMessage=V,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},D=()=>{const j=y.value.$refs;return j.input||j.textarea},W=()=>{B("close")},ne=()=>{e.closeOnPressEscape&&W()};return e.lockScroll&&Jw(l),{...lo(c),ns:s,overlayEvent:k,visible:l,hasMessage:g,typeClass:u,contentId:d,inputId:f,btnSize:i,iconComponent:p,confirmButtonClasses:_,rootRef:h,focusStartRef:m,headerRef:v,inputRef:y,confirmRef:w,doClose:S,handleClose:W,onCloseRequested:ne,handleWrapperClick:C,handleInputEnter:T,handleAction:B,t:r}}}),vO=["aria-label","aria-describedby"],bO=["aria-label"],yO=["id"];function _O(e,t,n,o,s,i){const r=Me("el-icon"),a=Me("close"),l=Me("el-input"),c=Me("el-button"),u=Me("el-focus-trap"),d=Me("el-overlay");return M(),q(Mo,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:F(()=>[We(L(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:F(()=>[E("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:R(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[L(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:F(()=>[E("div",{ref:"rootRef",class:R([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Te(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=et(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(M(),N("div",{key:0,ref:"headerRef",class:R(e.ns.e("header"))},[E("div",{class:R(e.ns.e("title"))},[e.iconComponent&&e.center?(M(),q(r,{key:0,class:R([e.ns.e("status"),e.typeClass])},{default:F(()=>[(M(),q(Ue(e.iconComponent)))]),_:1},8,["class"])):X("v-if",!0),E("span",null,ce(e.title),1)],2),e.showClose?(M(),N("button",{key:0,type:"button",class:R(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=ft(et(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[L(r,{class:R(e.ns.e("close"))},{default:F(()=>[L(a)]),_:1},8,["class"])],42,bO)):X("v-if",!0)],2)):X("v-if",!0),E("div",{id:e.contentId,class:R(e.ns.e("content"))},[E("div",{class:R(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(M(),q(r,{key:0,class:R([e.ns.e("status"),e.typeClass])},{default:F(()=>[(M(),q(Ue(e.iconComponent)))]),_:1},8,["class"])):X("v-if",!0),e.hasMessage?(M(),N("div",{key:1,class:R(e.ns.e("message"))},[me(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(M(),q(Ue(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(M(),q(Ue(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:F(()=>[fe(ce(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):X("v-if",!0)],2),We(E("div",{class:R(e.ns.e("input"))},[L(l,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:R({invalid:e.validateError}),onKeydown:ft(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),E("div",{class:R(e.ns.e("errormsg")),style:Te({visibility:e.editorErrorMessage?"visible":"hidden"})},ce(e.editorErrorMessage),7)],2),[[Et,e.showInput]])],10,yO),E("div",{class:R(e.ns.e("btns"))},[e.showCancelButton?(M(),q(c,{key:0,loading:e.cancelButtonLoading,class:R([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=ft(et(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:F(()=>[fe(ce(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):X("v-if",!0),We(L(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:R([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=ft(et(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:F(()=>[fe(ce(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[Et,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,vO)]),_:3},8,["z-index","overlay-class","mask"]),[[Et,e.visible]])]),_:3})}var wO=ve(mO,[["render",_O],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const Fi=new Map,xO=e=>{let t=document.body;return e.appendTo&&(st(e.appendTo)&&(t=document.querySelector(e.appendTo)),oo(e.appendTo)&&(t=e.appendTo),oo(t)||(t=document.body)),t},SO=(e,t,n=null)=>{const o=L(wO,e,mt(e.message)||ss(e.message)?{default:mt(e.message)?e.message:()=>e.message}:null);return o.appContext=n,ea(o,t),xO(e).appendChild(t.firstElementChild),o.component},CO=()=>document.createElement("div"),kO=(e,t)=>{const n=CO();e.onVanish=()=>{ea(null,n),Fi.delete(s)},e.onAction=i=>{const r=Fi.get(s);let a;e.showInput?a={value:s.inputValue,action:i}:a=i,e.callback?e.callback(a,o.proxy):i==="cancel"||i==="close"?e.distinguishCancelAndClose&&i!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(a)};const o=SO(e,n,t),s=o.proxy;for(const i in e)so(e,i)&&!so(s.$props,i)&&(s[i]=e[i]);return s.visible=!0,s};function qs(e,t=null){if(!ot)return Promise.reject();let n;return st(e)||ss(e)?e={message:e}:n=e.callback,new Promise((o,s)=>{const i=kO(e,t!=null?t:qs._context);Fi.set(i,{options:e,callback:n,resolve:o,reject:s})})}const EO=["alert","confirm","prompt"],MO={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};EO.forEach(e=>{qs[e]=PO(e)});function PO(e){return(t,n,o,s)=>{let i="";return wn(n)?(o=n,i=""):Po(n)?i="":i=n,qs(Object.assign({title:i,message:t,type:"",...MO[e]},o,{boxType:e}),s)}}qs.close=()=>{Fi.forEach((e,t)=>{t.doClose()}),Fi.clear()};qs._context=null;const mo=qs;mo.install=e=>{mo._context=e._context,e.config.globalProperties.$msgbox=mo,e.config.globalProperties.$messageBox=mo,e.config.globalProperties.$alert=mo.alert,e.config.globalProperties.$confirm=mo.confirm,e.config.globalProperties.$prompt=mo.prompt};const jd=mo,kn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},TO={name:"Report",components:{Coffee:Zh,User:ep,Money:tp},data(){return{val:"Hello from Report"}},props:{reportData:{type:Object,required:!0}},methods:{getImage(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e}}},Ys=e=>(Yi("data-v-ebe5bac1"),e=e(),Gi(),e),OO={class:"buymecoffee_report_wrapper"},AO={class:"buymecoffee_report_inner"},RO={class:"buymecoffee_report_count",style:{"text-align":"center"}},LO=["src"],$O={key:0,style:{"max-height":"120px","overflow-y":"hidden"}},IO=Ys(()=>E("li",null,[E("span",null,"Total Received")],-1)),FO=["innerHTML"],DO=["innerHTML"],BO={key:1},NO=Ys(()=>E("br",null,null,-1)),zO={class:"buymecoffee_report_inner"},VO={class:"buymecoffee_report_count",style:{"text-align":"center"}},HO=["src"],WO={key:0,style:{"max-height":"120px","overflow-y":"hidden"}},jO=Ys(()=>E("li",null,[E("span",null,"Amount Pending")],-1)),KO=["innerHTML"],UO=["innerHTML"],qO={key:1},YO=Ys(()=>E("br",null,null,-1)),GO={class:"buymecoffee_report_inner"},XO={class:"buymecoffee_report_count"},QO=["src"],JO=Ys(()=>E("li",null,[E("span",null,"Supporters")],-1)),ZO={style:{margin:"0"}},eA={class:"buymecoffee_report_inner"},tA={class:"buymecoffee_report_count"},nA=["src"],oA=Ys(()=>E("li",null,[E("span",null,"Total Coffee")],-1)),sA={style:{margin:"0"}};function iA(e,t,n,o,s,i){var r,a;return M(),N("div",OO,[E("div",AO,[E("div",RO,[E("img",{src:i.getImage("money.png"),alt:"Money"},null,8,LO),n.reportData.currency_total.length>0?(M(),N("ul",$O,[IO,n.reportData.currency_total.length===1?(M(),N("p",{key:0,style:{margin:"0"},innerHTML:(r=n.reportData)==null?void 0:r.currency_total[0].formatted_total},null,8,FO)):(M(!0),N(Ge,{key:1},Lt(n.reportData.currency_total,l=>(M(),N("li",null,[E("span",{style:{"font-size":"20px"},innerHTML:l.formatted_total},null,8,DO)]))),256))])):(M(),N("span",BO,[NO,fe("No amount received yet!")]))])]),E("div",zO,[E("div",VO,[E("img",{src:i.getImage("money-pending.png"),alt:"MoneyPending"},null,8,HO),n.reportData.currency_total_pending.length>0?(M(),N("ul",WO,[jO,n.reportData.currency_total_pending.length===1?(M(),N("p",{key:0,style:{margin:"0"},innerHTML:(a=n.reportData)==null?void 0:a.currency_total_pending[0].formatted_total},null,8,KO)):(M(!0),N(Ge,{key:1},Lt(n.reportData.currency_total_pending,l=>(M(),N("li",null,[E("span",{style:{"font-size":"20px"},innerHTML:l.formatted_total},null,8,UO)]))),256))])):(M(),N("span",qO,[YO,fe("No pending yet!")]))])]),E("div",GO,[E("div",XO,[E("img",{src:i.getImage("supporters.png"),alt:"supporters"},null,8,QO),E("ul",null,[JO,E("li",null,[E("p",ZO,ce(n.reportData.total_supporters||0),1)])])])]),E("div",eA,[E("div",tA,[E("img",{src:i.getImage("coffee-cup.png"),alt:"coffee-cup"},null,8,nA),E("ul",null,[oA,E("li",null,[E("p",sA,ce(n.reportData.total_coffee||0),1)])])])])])}const rA=kn(TO,[["render",iA],["__scopeId","data-v-ebe5bac1"]]),aA={name:"Supporters",data(){return{currentPage:this.current}},props:{supporters:{type:Array,required:!0},posts_per_page:{type:Number},total:{type:Number||String},current:{type:Number||String},hide_pagination:{type:String,default:"no"},hide_columns:{type:Array,default:[]}},methods:{handleSizeChange(e){this.currentPage=e-1,this.$emit("pageChanged",this.currentPage)},handleGet(e){this.$router.push({name:"Supporter",params:{id:e}})},handleDelete(e){this.$post({action:"buymecoffee_admin_ajax",route:"delete_supporter",data:{id:e},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(()=>{this.$handleSuccess("This record has been deleted."),this.$emit("fetchSupporters")}).catch(t=>{this.$handleError(t)})},maybeGetMethodImage(e){return e==="paypal"?window.BuyMeCoffeeAdmin.assets_url+"images/PayPal.svg":e==="stripe"?window.BuyMeCoffeeAdmin.assets_url+"images/stripe.svg":!1}}},lA=["onClick"],cA=["innerHTML"],uA=["innerHTML"],dA=["src"],fA=E("br",null,null,-1);function hA(e,t,n,o,s,i){const r=zT,a=Dn,l=Dg,c=dk,u=NT,d=ZM;return M(),N("div",null,[L(u,{class:"customers_table",data:n.supporters},{default:F(()=>[n.hide_columns.includes("id")?X("",!0):(M(),q(r,{key:0,width:"80",label:"Id"},{default:F(f=>[E("span",null,ce(f.row.id),1)]),_:1})),n.hide_columns.includes("date")?X("",!0):(M(),q(r,{key:1,width:"180",label:"Date"},{default:F(f=>[E("span",null,ce(f.row.created_at),1)]),_:1})),n.hide_columns.includes("name")?X("",!0):(M(),q(r,{key:2,prop:"supporters_name",width:"200",label:"Name"},{default:F(f=>[E("a",{style:{cursor:"pointer"},onClick:p=>i.handleGet(f.row.id)},ce(f.row.supporters_name),9,lA)]),_:1})),n.hide_columns.includes("amount")?X("",!0):(M(),q(r,{key:3,label:"Amount"},{default:F(f=>[E("span",{class:"wpm_supporters_amount",innerHTML:f.row.amount_formatted},null,8,cA)]),_:1})),n.hide_columns.includes("status")?X("",!0):(M(),q(r,{key:4,prop:"payment_status",label:"Status"},{default:F(f=>[E("span",{class:R("buymecoffee_status buymecoffee_status_"+f.row.payment_status),innerHTML:f.row.payment_status},null,10,uA)]),_:1})),n.hide_columns.includes("method")?X("",!0):(M(),q(r,{key:5,label:"Method"},{default:F(f=>[i.maybeGetMethodImage(f.row.payment_method)?(M(),N("img",{key:0,width:"48",class:"buymecoffee_paid_by_image",src:i.maybeGetMethodImage(f.row.payment_method)},null,8,dA)):(M(),N("span",{key:1,class:R("buymecoffee_payment_type buymecoffee_payment_type_"+f.row.payment_method),style:{"margin-left":"10px"}},ce(f.row.payment_method?f.row.payment_method:"-"),3))]),_:1})),n.hide_columns.includes("mode")?X("",!0):(M(),q(r,{key:6,label:"Mode"},{default:F(f=>[E("span",{class:R("buymecoffee_payment_mode buymecoffee_payment_mode_"+f.row.payment_mode),style:{"margin-left":"10px"}},ce(f.row.payment_mode?f.row.payment_mode:"-"),3)]),_:1})),n.hide_columns.includes("operations")?X("",!0):(M(),q(r,{key:7,label:"Operations"},{default:F(f=>[L(c,null,{default:F(()=>[L(a,{round:"",size:"small",icon:"View",onClick:p=>i.handleGet(f.row.id)},null,8,["onClick"]),L(l,{onConfirm:p=>i.handleDelete(f.row.id),title:"Are you sure to delete this?"},{reference:F(()=>[L(a,{round:"",size:"small",type:"danger",icon:"Delete"})]),_:2},1032,["onConfirm"])]),_:2},1024)]),_:1}))]),_:1},8,["data"]),fA,n.hide_pagination!=="yes"?(M(),q(d,{key:0,onCurrentChange:i.handleSizeChange,"page-size":n.posts_per_page,background:"background",layout:"size, prev, pager, next, total","page-count":Math.ceil(n.total/n.posts_per_page),total:n.total},null,8,["onCurrentChange","page-size","page-count","total"])):X("",!0)])}const nm=kn(aA,[["render",hA]]);/*!
     39 */var LP=/["'&<>]/,$P=IP;function IP(e){var t=""+e,n=LP.exec(t);if(!n)return t;var o,s="",i=0,r=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}r!==i&&(s+=t.substring(r,i)),r=i+1,s+=o}return r!==i?s+t.substring(r,i):s}const Wa=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},FP=function(e,t,n,o,s){if(!t&&!o&&(!s||Array.isArray(s)&&!s.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const i=o?null:function(a,l){return s?(Array.isArray(s)||(s=[s]),s.map(c=>typeof c=="string"?Dt(a,c):c(a,l,e))):(t!=="$key"&&wn(a)&&"$value"in a&&(a=a.$value),[wn(a)?Dt(a,t):a])},r=function(a,l){if(o)return o(a.value,l.value);for(let c=0,u=a.key.length;c<u;c++){if(a.key[c]<l.key[c])return-1;if(a.key[c]>l.key[c])return 1}return 0};return e.map((a,l)=>({value:a,index:l,key:i?i(a,l):null})).sort((a,l)=>{let c=r(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},zg=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},DP=function(e,t){let n=null;for(let o=0;o<e.columns.length;o++){const s=e.columns[o];if(s.columnKey===t){n=s;break}}return n||Ro("ElTable",`No column matching with column-key: ${t}`),n},Nd=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?zg(e,o[0]):null},bt=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let o=e;for(const s of n)o=o[s];return`${o}`}else if(typeof t=="function")return t.call(null,e)},Qo=function(e,t){const n={};return(e||[]).forEach((o,s)=>{n[bt(o,t)]={row:o,index:s}}),n};function BP(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(so(t,o)){const s=t[o];typeof s<"u"&&(n[o]=s)}return n}function O)]))),256))])):(M(),N("span",qO,[YO,fe("No pending yet!")]))])]),E("div",GO,[E("div",XO,[E("img",{src:i.getImage("supporters.png"),alt:"supporters"},null,8,QO),E("ul",null,[JO,E("li",null,[E("p",ZO,ce(n.reportData.total_supporters||0),1)])])])]),E("div",eA,[E("div",tA,[E("img",{src:i.getImage("coffee-cup.png"),alt:"coffee-cup"},null,8,nA),E("ul",null,[oA,E("li",null,[E("p",sA,ce(n.reportData.total_coffee||0),1)])])])])])}const rA=kn(TO,[["render",iA],["__scopeId","data-v-ebe5bac1"]]),aA={name:"Supporters",data(){return{currentPage:this.current}},props:{supporters:{type:Array,required:!0},posts_per_page:{type:Number},total:{type:Number||String},current:{type:Number||String},hide_pagination:{type:String,default:"no"},hide_columns:{type:Array,default:[]}},methods:{handleSizeChange(e){this.currentPage=e-1,this.$emit("pageChanged",this.currentPage)},handleGet(e){this.$router.push({name:"Supporter",params:{id:e}})},handleDelete(e){this.$post({action:"buymecoffee_admin_ajax",route:"delete_supporter",data:{id:e},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(()=>{this.$handleSuccess("This record has been deleted."),this.$emit("fetchSupporters")}).catch(t=>{this.$handleError(t)})},maybeGetMethodImage(e){return e==="paypal"?window.BuyMeCoffeeAdmin.assets_url+"images/PayPal.svg":e==="stripe"?window.BuyMeCoffeeAdmin.assets_url+"images/stripe.svg":!1}}},lA=["onClick"],cA=["innerHTML"],uA=["innerHTML"],dA=["src"],fA=E("br",null,null,-1);function hA(e,t,n,o,s,i){const r=zT,a=Dn,l=Dg,c=dk,u=NT,d=ZM;return M(),N("div",null,[L(u,{class:"customers_table",data:n.supporters},{default:F(()=>[n.hide_columns.includes("id")?X("",!0):(M(),q(r,{key:0,width:"80",label:"Id"},{default:F(f=>[E("span",null,ce(f.row.id),1)]),_:1})),n.hide_columns.includes("date")?X("",!0):(M(),q(r,{key:1,width:"180",label:"Date"},{default:F(f=>[E("span",null,ce(f.row.created_at),1)]),_:1})),n.hide_columns.includes("name")?X("",!0):(M(),q(r,{key:2,prop:"supporters_name",width:"200",label:"Name"},{default:F(f=>[E("a",{style:{cursor:"pointer"},onClick:p=>i.handleGet(f.row.id)},ce(f.row.supporters_name),9,lA)]),_:1})),n.hide_columns.includes("amount")?X("",!0):(M(),q(r,{key:3,label:"Amount"},{default:F(f=>[E("span",{class:"wpm_supporters_amount",innerHTML:f.row.amount_formatted},null,8,cA)]),_:1})),n.hide_columns.includes("status")?X("",!0):(M(),q(r,{key:4,prop:"payment_status",label:"Status"},{default:F(f=>[E("span",{class:R("buymecoffee_status buymecoffee_status_"+f.row.payment_status),innerHTML:f.row.payment_status},null,10,uA)]),_:1})),n.hide_columns.includes("method")?X("",!0):(M(),q(r,{key:5,label:"Method"},{default:F(f=>[i.maybeGetMethodImage(f.row.payment_method)?(M(),N("img",{key:0,width:"48",class:"buymecoffee_paid_by_image",src:i.maybeGetMethodImage(f.row.payment_method)},null,8,dA)):(M(),N("span",{key:1,class:R("buymecoffee_payment_type buymecoffee_payment_type_"+f.row.payment_method),style:{"margin-left":"10px"}},ce(f.row.payment_method?f.row.payment_method:"-"),3))]),_:1})),n.hide_columns.includes("mode")?X("",!0):(M(),q(r,{key:6,label:"Mode"},{default:F(f=>[E("span",{class:R("buymecoffee_payment_mode buymecoffee_payment_mode_"+f.row.payment_mode),style:{"margin-left":"10px"}},ce(f.row.payment_mode?f.row.payment_mode:"-"),3)]),_:1})),n.hide_columns.includes("operations")?X("",!0):(M(),q(r,{key:7,label:"Operations"},{default:F(f=>[L(c,null,{default:F(()=>[L(a,{round:"",size:"small",icon:"View",onClick:p=>i.handleGet(f.row.id)},null,8,["onClick"]),L(l,{onConfirm:p=>i.handleDelete(f.row.id),title:"Are you sure to delete this?"},{reference:F(()=>[L(a,{round:"",size:"small",type:"danger",icon:"Delete"})]),_:2},1032,["onConfirm"])]),_:2},1024)]),_:1}))]),_:1},8,["data"]),fA,n.hide_pagination!=="yes"?(M(),q(d,{key:0,onCurrentChange:i.handleSizeChange,"page-size":n.posts_per_page,background:"background",layout:"size, prev, pager, next, total","page-count":Math.ceil(n.total/n.posts_per_page),total:n.total},null,8,["onCurrentChange","page-size","page-count","total"])):X("",!0)])}const nm=kn(aA,[["render",hA]]);/*!
    4040 * @kurkle/color v0.3.2
    4141 * https://github.com/kurkle/color#readme
    4242 * (c) 2023 Jukka Kurkela
    4343 * Released under the MIT License
    44  */function nr(e){return e+.5|0}const _o=(e,t,n)=>Math.max(Math.min(e,n),t);function ai(e){return _o(nr(e*2.55),0,255)}function ko(e){return _o(nr(e*255),0,255)}function Qn(e){return _o(nr(e/2.55)/100,0,1)}function Kd(e){return _o(nr(e*100),0,100)}const tn={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},Nl=[..."0123456789ABCDEF"],pA=e=>Nl[e&15],gA=e=>Nl[(e&240)>>4]+Nl[e&15],mr=e=>(e&240)>>4===(e&15),mA=e=>mr(e.r)&&mr(e.g)&&mr(e.b)&&mr(e.a);function vA(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&tn[e[1]]*17,g:255&tn[e[2]]*17,b:255&tn[e[3]]*17,a:t===5?tn[e[4]]*17:255}:(t===7||t===9)&&(n={r:tn[e[1]]<<4|tn[e[2]],g:tn[e[3]]<<4|tn[e[4]],b:tn[e[5]]<<4|tn[e[6]],a:t===9?tn[e[7]]<<4|tn[e[8]]:255})),n}const bA=(e,t)=>e<255?t(e):"";function yA(e){var t=mA(e)?pA:gA;return e?"#"+t(e.r)+t(e.g)+t(e.b)+bA(e.a,t):void 0}const _A=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function om(e,t,n){const o=t*Math.min(n,1-n),s=(i,r=(i+e/30)%12)=>n-o*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function wA(e,t,n){const o=(s,i=(s+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[o(5),o(3),o(1)]}function xA(e,t,n){const o=om(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)o[s]*=1-t-n,o[s]+=t;return o}function SA(e,t,n,o,s){return e===s?(t-n)/o+(t<n?6:0):t===s?(n-e)/o+2:(e-t)/o+4}function Xc(e){const n=e.r/255,o=e.g/255,s=e.b/255,i=Math.max(n,o,s),r=Math.min(n,o,s),a=(i+r)/2;let l,c,u;return i!==r&&(u=i-r,c=a>.5?u/(2-i-r):u/(i+r),l=SA(n,o,s,u,i),l=l*60+.5),[l|0,c||0,a]}function Qc(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(ko)}function Jc(e,t,n){return Qc(om,e,t,n)}function CA(e,t,n){return Qc(xA,e,t,n)}function kA(e,t,n){return Qc(wA,e,t,n)}function sm(e){return(e%360+360)%360}function EA(e){const t=_A.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?ai(+t[5]):ko(+t[5]));const s=sm(+t[2]),i=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?o=CA(s,i,r):t[1]==="hsv"?o=kA(s,i,r):o=Jc(s,i,r),{r:o[0],g:o[1],b:o[2],a:n}}function MA(e,t){var n=Xc(e);n[0]=sm(n[0]+t),n=Jc(n),e.r=n[0],e.g=n[1],e.b=n[2]}function PA(e){if(!e)return;const t=Xc(e),n=t[0],o=Kd(t[1]),s=Kd(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${s}%, ${Qn(e.a)})`:`hsl(${n}, ${o}%, ${s}%)`}const Ud={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"},qd={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 TA(){const e={},t=Object.keys(qd),n=Object.keys(Ud);let o,s,i,r,a;for(o=0;o<t.length;o++){for(r=a=t[o],s=0;s<n.length;s++)i=n[s],a=a.replace(i,Ud[i]);i=parseInt(qd[r],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let vr;function OA(e){vr||(vr=TA(),vr.transparent=[0,0,0,0]);const t=vr[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const AA=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function RA(e){const t=AA.exec(e);let n=255,o,s,i;if(!!t){if(t[7]!==o){const r=+t[7];n=t[8]?ai(r):_o(r*255,0,255)}return o=+t[1],s=+t[3],i=+t[5],o=255&(t[2]?ai(o):_o(o,0,255)),s=255&(t[4]?ai(s):_o(s,0,255)),i=255&(t[6]?ai(i):_o(i,0,255)),{r:o,g:s,b:i,a:n}}}function LA(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Qn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Ka=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ms=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function $A(e,t,n){const o=ms(Qn(e.r)),s=ms(Qn(e.g)),i=ms(Qn(e.b));return{r:ko(Ka(o+n*(ms(Qn(t.r))-o))),g:ko(Ka(s+n*(ms(Qn(t.g))-s))),b:ko(Ka(i+n*(ms(Qn(t.b))-i))),a:e.a+n*(t.a-e.a)}}function br(e,t,n){if(e){let o=Xc(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=Jc(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function im(e,t){return e&&Object.assign(t||{},e)}function Yd(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=ko(e[3]))):(t=im(e,{r:0,g:0,b:0,a:1}),t.a=ko(t.a)),t}function IA(e){return e.charAt(0)==="r"?RA(e):EA(e)}class Di{constructor(t){if(t instanceof Di)return t;const n=typeof t;let o;n==="object"?o=Yd(t):n==="string"&&(o=vA(t)||OA(t)||IA(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=im(this._rgb);return t&&(t.a=Qn(t.a)),t}set rgb(t){this._rgb=Yd(t)}rgbString(){return this._valid?LA(this._rgb):void 0}hexString(){return this._valid?yA(this._rgb):void 0}hslString(){return this._valid?PA(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,s=t.rgb;let i;const r=n===i?.5:n,a=2*r-1,l=o.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-c,o.r=255&c*o.r+i*s.r+.5,o.g=255&c*o.g+i*s.g+.5,o.b=255&c*o.b+i*s.b+.5,o.a=r*o.a+(1-r)*s.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=$A(this._rgb,t._rgb,n)),this}clone(){return new Di(this.rgb)}alpha(t){return this._rgb.a=ko(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=nr(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 br(this._rgb,2,t),this}darken(t){return br(this._rgb,2,-t),this}saturate(t){return br(this._rgb,1,t),this}desaturate(t){return br(this._rgb,1,-t),this}rotate(t){return MA(this._rgb,t),this}}/*!
     44 */function nr(e){return e+.5|0}const _o=(e,t,n)=>Math.max(Math.min(e,n),t);function ai(e){return _o(nr(e*2.55),0,255)}function ko(e){return _o(nr(e*255),0,255)}function Qn(e){return _o(nr(e/2.55)/100,0,1)}function a(i+n*(ms(Qn(t.b))-i))),a:e.a+n*(t.a-e.a)}}function br(e,t,n){if(e){let o=Xc(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=Jc(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function im(e,t){return e&&Object.assign(t||{},e)}function Yd(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=ko(e[3]))):(t=im(e,{r:0,g:0,b:0,a:1}),t.a=ko(t.a)),t}function IA(e){return e.charAt(0)==="r"?RA(e):EA(e)}class Di{constructor(t){if(t instanceof Di)return t;const n=typeof t;let o;n==="object"?o=Yd(t):n==="string"&&(o=vA(t)||OA(t)||IA(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=im(this._rgb);return t&&(t.a=Qn(t.a)),t}set rgb(t){this._rgb=Yd(t)}rgbString(){return this._valid?LA(this._rgb):void 0}hexString(){return this._valid?yA(this._rgb):void 0}hslString(){return this._valid?PA(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,s=t.rgb;let i;const r=n===i?.5:n,a=2*r-1,l=o.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-c,o.r=255&c*o.r+i*s.r+.5,o.g=255&c*o.g+i*s.g+.5,o.b=255&c*o.b+i*s.b+.5,o.a=r*o.a+(1-r)*s.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=$A(this._rgb,t._rgb,n)),this}clone(){return new Di(this.rgb)}alpha(t){return this._rgb.a=ko(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=nr(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 br(this._rgb,2,t),this}darken(t){return br(this._rgb,2,-t),this}saturate(t){return br(this._rgb,1,t),this}desaturate(t){return br(this._rgb,1,-t),this}rotate(t){return MA(this._rgb,t),this}}/*!
    4545 * Chart.js v4.4.0
    4646 * https://www.chartjs.org
    4747 * (c) 2023 Chart.js Contributors
    4848 * Released under the MIT License
    49  */function Kn(){}const FA=(()=>{let e=0;return()=>e++})();function ze(e){return e===null||typeof e>"u"}function tt(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 Fe(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function lt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Yt(e,t){return lt(e)?e:t}function Ae(e,t){return typeof e>"u"?t:e}const DA=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,rm=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Qe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ke(e,t,n,o){let s,i,r;if(tt(e))if(i=e.length,o)for(s=i-1;s>=0;s--)t.call(n,e[s],s);else for(s=0;s<i;s++)t.call(n,e[s],s);else if(Fe(e))for(r=Object.keys(e),i=r.length,s=0;s<i;s++)t.call(n,e[r[s]],r[s])}function ra(e,t){let n,o,s,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(s=e[n],i=t[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function aa(e){if(tt(e))return e.map(aa);if(Fe(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let s=0;for(;s<o;++s)t[n[s]]=aa(e[n[s]]);return t}return e}function am(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function BA(e,t,n,o){if(!am(e))return;const s=t[e],i=n[e];Fe(s)&&Fe(i)?Bi(s,i,o):t[e]=aa(i)}function Bi(e,t,n){const o=tt(t)?t:[t],s=o.length;if(!Fe(e))return e;n=n||{};const i=n.merger||BA;let r;for(let a=0;a<s;++a){if(r=o[a],!Fe(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)i(l[c],e,r,n)}return e}function _i(e,t){return Bi(e,t,{merger:NA})}function NA(e,t,n){if(!am(e))return;const o=t[e],s=n[e];Fe(o)&&Fe(s)?_i(o,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=aa(s))}const Gd={"":e=>e,x:e=>e.x,y:e=>e.y};function zA(e){const t=e.split("."),n=[];let o="";for(const s of t)o+=s,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function VA(e){const t=zA(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function To(e,t){return(Gd[t]||(Gd[t]=VA(t)))(e)}function Zc(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ni=e=>typeof e<"u",Oo=e=>typeof e=="function",Xd=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function HA(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const it=Math.PI,nt=2*it,WA=nt+it,la=Number.POSITIVE_INFINITY,jA=it/180,ut=it/2,zo=it/4,Qd=it*2/3,wo=Math.log10,Rn=Math.sign;function wi(e,t,n){return Math.abs(e-t)<n}function Jd(e){const t=Math.round(e);e=wi(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(wo(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function KA(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((s,i)=>s-i).pop(),t}function Is(e){return!isNaN(parseFloat(e))&&isFinite(e)}function UA(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function lm(e,t,n){let o,s,i;for(o=0,s=e.length;o<s;o++)i=e[o][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function mn(e){return e*(it/180)}function eu(e){return e*(180/it)}function Zd(e){if(!lt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function cm(e,t){const n=t.x-e.x,o=t.y-e.y,s=Math.sqrt(n*n+o*o);let i=Math.atan2(o,n);return i<-.5*it&&(i+=nt),{angle:i,distance:s}}function zl(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function qA(e,t){return(e-t+WA)%nt-it}function Gt(e){return(e%nt+nt)%nt}function zi(e,t,n,o){const s=Gt(e),i=Gt(t),r=Gt(n),a=Gt(i-s),l=Gt(r-s),c=Gt(s-i),u=Gt(s-r);return s===i||s===r||o&&i===r||a>l&&c<u}function vt(e,t,n){return Math.max(t,Math.min(n,e))}function YA(e){return vt(e,-32768,32767)}function Zn(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function tu(e,t,n){n=n||(r=>e[r]<t);let o=e.length-1,s=0,i;for(;o-s>1;)i=s+o>>1,n(i)?s=i:o=i;return{lo:s,hi:o}}const eo=(e,t,n,o)=>tu(e,n,o?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),GA=(e,t,n)=>tu(e,n,o=>e[o][t]>=n);function XA(e,t,n){let o=0,s=e.length;for(;o<s&&e[o]<t;)o++;for(;s>o&&e[s-1]>n;)s--;return o>0||s<e.length?e.slice(o,s):e}const um=["push","pop","shift","splice","unshift"];function QA(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),um.forEach(n=>{const o="_onData"+Zc(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){const r=s.apply(this,i);return e._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...i)}),r}})})}function ef(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,s=o.indexOf(t);s!==-1&&o.splice(s,1),!(o.length>0)&&(um.forEach(i=>{delete e[i]}),delete e._chartjs)}function dm(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const fm=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function hm(e,t){let n=[],o=!1;return function(...s){n=s,o||(o=!0,fm.call(window,()=>{o=!1,e.apply(t,n)}))}}function JA(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const nu=e=>e==="start"?"left":e==="end"?"right":"center",Ct=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,ZA=(e,t,n,o)=>e===(o?"left":"right")?n:e==="center"?(t+n)/2:t;function pm(e,t,n){const o=t.length;let s=0,i=o;if(e._sorted){const{iScale:r,_parsed:a}=e,l=r.axis,{min:c,max:u,minDefined:d,maxDefined:f}=r.getUserBounds();d&&(s=vt(Math.min(eo(a,l,c).lo,n?o:eo(t,l,r.getPixelForValue(c)).lo),0,o-1)),f?i=vt(Math.max(eo(a,r.axis,u,!0).hi+1,n?0:eo(t,l,r.getPixelForValue(u),!0).hi+1),s,o)-s:i=o-s}return{start:s,count:i}}function gm(e){const{xScale:t,yScale:n,_scaleRanges:o}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!o)return e._scaleRanges=s,!0;const i=o.xmin!==t.min||o.xmax!==t.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,s),i}const yr=e=>e===0||e===1,tf=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*nt/n)),nf=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*nt/n)+1,xi={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*ut)+1,easeOutSine:e=>Math.sin(e*ut),easeInOutSine:e=>-.5*(Math.cos(it*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=>yr(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=>yr(e)?e:tf(e,.075,.3),easeOutElastic:e=>yr(e)?e:nf(e,.075,.3),easeInOutElastic(e){return yr(e)?e:e<.5?.5*tf(e*2,.1125,.45):.5+.5*nf(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-xi.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?xi.easeInBounce(e*2)*.5:xi.easeOutBounce(e*2-1)*.5+.5};function ou(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function of(e){return ou(e)?e:new Di(e)}function Ua(e){return ou(e)?e:new Di(e).saturate(.5).darken(.1).hexString()}const e2=["x","y","borderWidth","radius","tension"],t2=["color","borderColor","backgroundColor"];function n2(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:t2},numbers:{type:"number",properties:e2}}),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 o2(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const sf=new Map;function s2(e,t){t=t||{};const n=e+JSON.stringify(t);let o=sf.get(n);return o||(o=new Intl.NumberFormat(e,t),sf.set(n,o)),o}function or(e,t,n){return s2(t,n).format(e)}const mm={values(e){return tt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let s,i=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"),i=i2(e,n)}const r=wo(Math.abs(i)),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),or(e,o,l)},logarithmic(e,t,n){if(e===0)return"0";const o=n[t].significand||e/Math.pow(10,Math.floor(wo(e)));return[1,2,3,5,10,15].includes(o)||t>.8*n.length?mm.numeric.call(this,e,t,n):""}};function i2(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 ka={formatters:mm};function r2(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:ka.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 cs=Object.create(null),Vl=Object.create(null);function Si(e,t){if(!t)return e;const n=t.split(".");for(let o=0,s=n.length;o<s;++o){const i=n[o];e=e[i]||(e[i]=Object.create(null))}return e}function qa(e,t,n){return typeof t=="string"?Bi(Si(e,t),n):Bi(Si(e,""),t)}class a2{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=o=>o.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=(o,s)=>Ua(s.backgroundColor),this.hoverBorderColor=(o,s)=>Ua(s.borderColor),this.hoverColor=(o,s)=>Ua(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 qa(this,t,n)}get(t){return Si(this,t)}describe(t,n){return qa(Vl,t,n)}override(t,n){return qa(cs,t,n)}route(t,n,o,s){const i=Si(this,t),r=Si(this,o),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[s];return Fe(l)?Object.assign({},c,l):Ae(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var ct=new a2({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[n2,o2,r2]);function l2(e){return!e||ze(e.size)||ze(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ca(e,t,n,o,s){let i=t[s];return i||(i=t[s]=e.measureText(s).width,n.push(s)),i>o&&(o=i),o}function c2(e,t,n,o){o=o||{};let s=o.data=o.data||{},i=o.garbageCollect=o.garbageCollect||[];o.font!==t&&(s=o.data={},i=o.garbageCollect=[],o.font=t),e.save(),e.font=t;let r=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!tt(d))r=ca(e,s,i,r,d);else if(tt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!tt(f)&&(r=ca(e,s,i,r,f));e.restore();const p=i.length/2;if(p>n.length){for(l=0;l<p;l++)delete s[i[l]];i.splice(0,p)}return r}function Vo(e,t,n){const o=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*o)/o+s}function rf(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Hl(e,t,n,o){vm(e,t,n,o,null)}function vm(e,t,n,o,s){let i,r,a,l,c,u,d,f;const p=t.pointStyle,g=t.rotation,h=t.radius;let v=(g||0)*jA;if(p&&typeof p=="object"&&(i=p.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(v),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:s?e.ellipse(n,o,s/2,h,0,0,nt):e.arc(n,o,h,0,nt),e.closePath();break;case"triangle":u=s?s/2:h,e.moveTo(n+Math.sin(v)*u,o-Math.cos(v)*h),v+=Qd,e.lineTo(n+Math.sin(v)*u,o-Math.cos(v)*h),v+=Qd,e.lineTo(n+Math.sin(v)*u,o-Math.cos(v)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,r=Math.cos(v+zo)*l,d=Math.cos(v+zo)*(s?s/2-c:l),a=Math.sin(v+zo)*l,f=Math.sin(v+zo)*(s?s/2-c:l),e.arc(n-d,o-a,c,v-it,v-ut),e.arc(n+f,o-r,c,v-ut,v),e.arc(n+d,o+a,c,v,v+ut),e.arc(n-f,o+r,c,v+ut,v+it),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*h,u=s?s/2:l,e.rect(n-u,o-l,2*u,2*l);break}v+=zo;case"rectRot":d=Math.cos(v)*(s?s/2:h),r=Math.cos(v)*h,a=Math.sin(v)*h,f=Math.sin(v)*(s?s/2:h),e.moveTo(n-d,o-a),e.lineTo(n+f,o-r),e.lineTo(n+d,o+a),e.lineTo(n-f,o+r),e.closePath();break;case"crossRot":v+=zo;case"cross":d=Math.cos(v)*(s?s/2:h),r=Math.cos(v)*h,a=Math.sin(v)*h,f=Math.sin(v)*(s?s/2:h),e.moveTo(n-d,o-a),e.lineTo(n+d,o+a),e.moveTo(n+f,o-r),e.lineTo(n-f,o+r);break;case"star":d=Math.cos(v)*(s?s/2:h),r=Math.cos(v)*h,a=Math.sin(v)*h,f=Math.sin(v)*(s?s/2:h),e.moveTo(n-d,o-a),e.lineTo(n+d,o+a),e.moveTo(n+f,o-r),e.lineTo(n-f,o+r),v+=zo,d=Math.cos(v)*(s?s/2:h),r=Math.cos(v)*h,a=Math.sin(v)*h,f=Math.sin(v)*(s?s/2:h),e.moveTo(n-d,o-a),e.lineTo(n+d,o+a),e.moveTo(n+f,o-r),e.lineTo(n-f,o+r);break;case"line":r=s?s/2:Math.cos(v)*h,a=Math.sin(v)*h,e.moveTo(n-r,o-a),e.lineTo(n+r,o+a);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(v)*(s?s/2:h),o+Math.sin(v)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function to(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 Ea(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ma(e){e.restore()}function u2(e,t,n,o,s){if(!t)return e.lineTo(n.x,n.y);if(s==="middle"){const i=(t.x+n.x)/2;e.lineTo(i,t.y),e.lineTo(i,n.y)}else s==="after"!=!!o?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function d2(e,t,n,o){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(o?t.cp1x:t.cp2x,o?t.cp1y:t.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function f2(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),ze(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 h2(e,t,n,o,s){if(s.strikethrough||s.underline){const i=e.measureText(o),r=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,c=n+i.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,u),e.lineTo(a,u),e.stroke()}}function p2(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function us(e,t,n,o,s,i={}){const r=tt(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,f2(e,i),l=0;l<r.length;++l)c=r[l],i.backdrop&&p2(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),ze(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(c,n,o,i.maxWidth)),e.fillText(c,n,o,i.maxWidth),h2(e,n,o,c,i),o+=Number(s.lineHeight);e.restore()}function Vi(e,t){const{x:n,y:o,w:s,h:i,radius:r}=t;e.arc(n+r.topLeft,o+r.topLeft,r.topLeft,1.5*it,it,!0),e.lineTo(n,o+i-r.bottomLeft),e.arc(n+r.bottomLeft,o+i-r.bottomLeft,r.bottomLeft,it,ut,!0),e.lineTo(n+s-r.bottomRight,o+i),e.arc(n+s-r.bottomRight,o+i-r.bottomRight,r.bottomRight,ut,0,!0),e.lineTo(n+s,o+r.topRight),e.arc(n+s-r.topRight,o+r.topRight,r.topRight,0,-ut,!0),e.lineTo(n+r.topLeft,o)}const g2=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,m2=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function v2(e,t){const n=(""+e).match(g2);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 b2=e=>+e||0;function su(e,t){const n={},o=Fe(t),s=o?Object.keys(t):t,i=Fe(e)?o?r=>Ae(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of s)n[r]=b2(i(r));return n}function bm(e){return su(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ns(e){return su(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(e){const t=bm(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ht(e,t){e=e||{},t=t||ct.font;let n=Ae(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=Ae(e.style,t.style);o&&!(""+o).match(m2)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const s={family:Ae(e.family,t.family),lineHeight:v2(Ae(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:Ae(e.weight,t.weight),string:""};return s.string=l2(s),s}function li(e,t,n,o){let s=!0,i,r,a;for(i=0,r=e.length;i<r;++i)if(a=e[i],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),s=!1),n!==void 0&&tt(a)&&(a=a[n%a.length],s=!1),a!==void 0))return o&&!s&&(o.cacheable=!1),a}function y2(e,t,n){const{min:o,max:s}=e,i=rm(t,(s-o)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(o,-Math.abs(i)),max:r(s,i)}}function Fo(e,t){return Object.assign(Object.create(e),t)}function iu(e,t=[""],n,o,s=()=>e[0]){const i=n||e;typeof o>"u"&&(o=xm("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:o,_getTarget:s,override:a=>iu([a,...e],t,i,o)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return _m(a,l,()=>M2(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return lf(a).includes(l)},ownKeys(a){return lf(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Fs(e,t,n,o){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:ym(e,o),setContext:i=>Fs(e,i,n,o),override:i=>Fs(e.override(i),t,n,o)};return new Proxy(s,{deleteProperty(i,r){return delete i[r],delete e[r],!0},get(i,r,a){return _m(i,r,()=>w2(i,r,a))},getOwnPropertyDescriptor(i,r){return i._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(i,r,a){return e[r]=a,delete i[r],!0}})}function ym(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:o,isScriptable:Oo(n)?n:()=>n,isIndexable:Oo(o)?o:()=>o}}const _2=(e,t)=>e?e+Zc(t):t,ru=(e,t)=>Fe(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function _m(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const o=n();return e[t]=o,o}function w2(e,t,n){const{_proxy:o,_context:s,_subProxy:i,_descriptors:r}=e;let a=o[t];return Oo(a)&&r.isScriptable(t)&&(a=x2(t,a,e,n)),tt(a)&&a.length&&(a=S2(t,a,e,r.isIndexable)),ru(t,a)&&(a=Fs(a,s,i&&i[t],r)),a}function x2(e,t,n,o){const{_proxy:s,_context:i,_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(i,r||o);return a.delete(e),ru(e,l)&&(l=au(s._scopes,s,e,l)),l}function S2(e,t,n,o){const{_proxy:s,_context:i,_subProxy:r,_descriptors:a}=n;if(typeof i.index<"u"&&o(e))return t[i.index%t.length];if(Fe(t[0])){const l=t,c=s._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=au(c,s,e,u);t.push(Fs(d,i,r&&r[e],a))}}return t}function wm(e,t,n){return Oo(e)?e(t,n):e}const C2=(e,t)=>e===!0?t:typeof e=="string"?To(t,e):void 0;function k2(e,t,n,o,s){for(const i of t){const r=C2(n,i);if(r){e.add(r);const a=wm(r._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(r===!1&&typeof o<"u"&&n!==o)return null}return!1}function au(e,t,n,o){const s=t._rootScopes,i=wm(t._fallback,n,o),r=[...e,...s],a=new Set;a.add(o);let l=af(a,r,n,i||n,o);return l===null||typeof i<"u"&&i!==n&&(l=af(a,r,i,l,o),l===null)?!1:iu(Array.from(a),[""],s,i,()=>E2(t,n,o))}function af(e,t,n,o,s){for(;n;)n=k2(e,t,n,o,s);return n}function E2(e,t,n){const o=e._getTarget();t in o||(o[t]={});const s=o[t];return tt(s)&&Fe(n)?n:s||{}}function M2(e,t,n,o){let s;for(const i of t)if(s=xm(_2(i,e),n),typeof s<"u")return ru(e,s)?au(n,o,e,s):s}function xm(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function lf(e){let t=e._keys;return t||(t=e._keys=P2(e._scopes)),t}function P2(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(o);return Array.from(t)}function Sm(e,t,n,o){const{iScale:s}=e,{key:i="r"}=this._parsing,r=new Array(o);let a,l,c,u;for(a=0,l=o;a<l;++a)c=a+n,u=t[c],r[a]={r:s.parse(To(u,i),c)};return r}const T2=Number.EPSILON||1e-14,Ds=(e,t)=>t<e.length&&!e[t].skip&&e[t],Cm=e=>e==="x"?"y":"x";function O2(e,t,n,o){const s=e.skip?t:e,i=t,r=n.skip?t:n,a=zl(i,s),l=zl(r,i);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=o*c,f=o*u;return{previous:{x:i.x-d*(r.x-s.x),y:i.y-d*(r.y-s.y)},next:{x:i.x+f*(r.x-s.x),y:i.y+f*(r.y-s.y)}}}function A2(e,t,n){const o=e.length;let s,i,r,a,l,c=Ds(e,0);for(let u=0;u<o-1;++u)if(l=c,c=Ds(e,u+1),!(!l||!c)){if(wi(t[u],0,T2)){n[u]=n[u+1]=0;continue}s=n[u]/t[u],i=n[u+1]/t[u],a=Math.pow(s,2)+Math.pow(i,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=s*r*t[u],n[u+1]=i*r*t[u])}}function R2(e,t,n="x"){const o=Cm(n),s=e.length;let i,r,a,l=Ds(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Ds(e,c+1),!a)continue;const u=a[n],d=a[o];r&&(i=(u-r[n])/3,a[`cp1${n}`]=u-i,a[`cp1${o}`]=d-i*t[c]),l&&(i=(l[n]-u)/3,a[`cp2${n}`]=u+i,a[`cp2${o}`]=d+i*t[c])}}function L2(e,t="x"){const n=Cm(t),o=e.length,s=Array(o).fill(0),i=Array(o);let r,a,l,c=Ds(e,0);for(r=0;r<o;++r)if(a=l,l=c,c=Ds(e,r+1),!!l){if(c){const u=c[t]-l[t];s[r]=u!==0?(c[n]-l[n])/u:0}i[r]=a?c?Rn(s[r-1])!==Rn(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}A2(e,s,i),R2(e,i,t)}function _r(e,t,n){return Math.max(Math.min(e,n),t)}function $2(e,t){let n,o,s,i,r,a=to(e[0],t);for(n=0,o=e.length;n<o;++n)r=i,i=a,a=n<o-1&&to(e[n+1],t),i&&(s=e[n],r&&(s.cp1x=_r(s.cp1x,t.left,t.right),s.cp1y=_r(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=_r(s.cp2x,t.left,t.right),s.cp2y=_r(s.cp2y,t.top,t.bottom)))}function I2(e,t,n,o,s){let i,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")L2(e,s);else{let c=o?e[e.length-1]:e[0];for(i=0,r=e.length;i<r;++i)a=e[i],l=O2(c,a,e[Math.min(i+1,r-(o?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&&$2(e,n)}function km(){return typeof window<"u"&&typeof document<"u"}function lu(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ua(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const Pa=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function F2(e,t){return Pa(e).getPropertyValue(t)}const D2=["top","right","bottom","left"];function os(e,t,n){const o={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=D2[s];o[i]=parseFloat(e[t+"-"+i+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const B2=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function N2(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=o;let r=!1,a,l;if(B2(s,i,e.target))a=s,l=i;else{const c=t.getBoundingClientRect();a=o.clientX-c.left,l=o.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Ko(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,s=Pa(n),i=s.boxSizing==="border-box",r=os(s,"padding"),a=os(s,"border","width"),{x:l,y:c,box:u}=N2(e,n),d=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:p,height:g}=t;return i&&(p-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/p*n.width/o),y:Math.round((c-f)/g*n.height/o)}}function z2(e,t,n){let o,s;if(t===void 0||n===void 0){const i=lu(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const r=i.getBoundingClientRect(),a=Pa(i),l=os(a,"border","width"),c=os(a,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,o=ua(a.maxWidth,i,"clientWidth"),s=ua(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:o||la,maxHeight:s||la}}const wr=e=>Math.round(e*10)/10;function V2(e,t,n,o){const s=Pa(e),i=os(s,"margin"),r=ua(s.maxWidth,e,"clientWidth")||la,a=ua(s.maxHeight,e,"clientHeight")||la,l=z2(e,t,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const f=os(s,"border","width"),p=os(s,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-i.width),u=Math.max(0,o?c/o:u-i.height),c=wr(Math.min(c,r,l.maxWidth)),u=wr(Math.min(u,a,l.maxHeight)),c&&!u&&(u=wr(c/2)),(t!==void 0||n!==void 0)&&o&&l.height&&u>l.height&&(u=l.height,c=wr(Math.floor(u*o))),{width:c,height:u}}function cf(e,t,n){const o=t||1,s=Math.floor(e.height*o),i=Math.floor(e.width*o);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!==o||r.height!==s||r.width!==i?(e.currentDevicePixelRatio=o,r.height=s,r.width=i,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const H2=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function uf(e,t){const n=F2(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Uo(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function W2(e,t,n,o){return{x:e.x+n*(t.x-e.x),y:o==="middle"?n<.5?e.y:t.y:o==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function j2(e,t,n,o){const s={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},r=Uo(e,s,n),a=Uo(s,i,n),l=Uo(i,t,n),c=Uo(r,a,n),u=Uo(a,l,n);return Uo(c,u,n)}const K2=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,o){return n-o},leftForLtr(n,o){return n-o}}},U2=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ss(e,t,n){return e?K2(t,n):U2()}function Em(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function Mm(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Pm(e){return e==="angle"?{between:zi,compare:qA,normalize:Gt}:{between:Zn,compare:(t,n)=>t-n,normalize:t=>t}}function df({start:e,end:t,count:n,loop:o,style:s}){return{start:e%n,end:t%n,loop:o&&(t-e+1)%n===0,style:s}}function q2(e,t,n){const{property:o,start:s,end:i}=n,{between:r,normalize:a}=Pm(o),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&r(a(t[c%l][o]),s,i);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Tm(e,t,n){if(!n)return[e];const{property:o,start:s,end:i}=n,r=t.length,{compare:a,between:l,normalize:c}=Pm(o),{start:u,end:d,loop:f,style:p}=q2(e,t,n),g=[];let h=!1,v=null,m,y,w;const _=()=>l(s,w,m)&&a(s,w)!==0,x=()=>a(i,m)===0||l(i,w,m),S=()=>h||_(),C=()=>!h||x();for(let k=u,T=u;k<=d;++k)y=t[k%r],!y.skip&&(m=c(y[o]),m!==w&&(h=l(m,s,i),v===null&&S()&&(v=a(m,s)===0?k:T),v!==null&&C()&&(g.push(df({start:v,end:k,loop:f,count:r,style:p})),v=null),T=k,w=m));return v!==null&&g.push(df({start:v,end:d,loop:f,count:r,style:p})),g}function Om(e,t){const n=[],o=e.segments;for(let s=0;s<o.length;s++){const i=Tm(o[s],e.points,t);i.length&&n.push(...i)}return n}function Y2(e,t,n,o){let s=0,i=t-1;if(n&&!o)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(i+=s);i>s&&e[i%t].skip;)i--;return i%=t,{start:s,end:i}}function G2(e,t,n,o){const s=e.length,i=[];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||(o=!1,i.push({start:t%s,end:(l-1)%s,loop:o}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&i.push({start:t%s,end:r%s,loop:o}),i}function X2(e,t){const n=e.points,o=e.options.spanGaps,s=n.length;if(!s)return[];const i=!!e._loop,{start:r,end:a}=Y2(n,s,i,o);if(o===!0)return ff(e,[{start:r,end:a,loop:i}],n,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return ff(e,G2(n,r,l,c),n,t)}function ff(e,t,n,o){return!o||!o.setContext||!n?t:Q2(e,t,n,o)}function Q2(e,t,n,o){const s=e._chart.getContext(),i=hf(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let u=i,d=t[0].start,f=d;function p(g,h,v,m){const y=a?-1:1;if(g!==h){for(g+=l;n[g%l].skip;)g-=y;for(;n[h%l].skip;)h+=y;g%l!==h%l&&(c.push({start:g%l,end:h%l,loop:v,style:m}),u=m,d=h%l)}}for(const g of t){d=a?d:g.start;let h=n[d%l],v;for(f=d+1;f<=g.end;f++){const m=n[f%l];v=hf(o.setContext(Fo(s,{type:"segment",p0:h,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),J2(v,u)&&p(d,f-1,g.loop,u),h=m,u=v}d<f-1&&p(d,f-1,g.loop,u)}return c}function hf(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function J2(e,t){if(!t)return!1;const n=[],o=function(s,i){return ou(i)?(n.includes(i)||n.push(i),n.indexOf(i)):i};return JSON.stringify(e,o)!==JSON.stringify(t,o)}/*!
     49 */function 2()}function Em(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function Mm(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Pm(e){return e==="angle"?{between:zi,compare:qA,normalize:Gt}:{between:Zn,compare:(t,n)=>t-n,normalize:t=>t}}function df({start:e,end:t,count:n,loop:o,style:s}){return{start:e%n,end:t%n,loop:o&&(t-e+1)%n===0,style:s}}function q2(e,t,n){const{property:o,start:s,end:i}=n,{between:r,normalize:a}=Pm(o),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&r(a(t[c%l][o]),s,i);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Tm(e,t,n){if(!n)return[e];const{property:o,start:s,end:i}=n,r=t.length,{compare:a,between:l,normalize:c}=Pm(o),{start:u,end:d,loop:f,style:p}=q2(e,t,n),g=[];let h=!1,v=null,m,y,w;const _=()=>l(s,w,m)&&a(s,w)!==0,x=()=>a(i,m)===0||l(i,w,m),S=()=>h||_(),C=()=>!h||x();for(let k=u,T=u;k<=d;++k)y=t[k%r],!y.skip&&(m=c(y[o]),m!==w&&(h=l(m,s,i),v===null&&S()&&(v=a(m,s)===0?k:T),v!==null&&C()&&(g.push(df({start:v,end:k,loop:f,count:r,style:p})),v=null),T=k,w=m));return v!==null&&g.push(df({start:v,end:d,loop:f,count:r,style:p})),g}function Om(e,t){const n=[],o=e.segments;for(let s=0;s<o.length;s++){const i=Tm(o[s],e.points,t);i.length&&n.push(...i)}return n}function Y2(e,t,n,o){let s=0,i=t-1;if(n&&!o)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(i+=s);i>s&&e[i%t].skip;)i--;return i%=t,{start:s,end:i}}function G2(e,t,n,o){const s=e.length,i=[];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||(o=!1,i.push({start:t%s,end:(l-1)%s,loop:o}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&i.push({start:t%s,end:r%s,loop:o}),i}function X2(e,t){const n=e.points,o=e.options.spanGaps,s=n.length;if(!s)return[];const i=!!e._loop,{start:r,end:a}=Y2(n,s,i,o);if(o===!0)return ff(e,[{start:r,end:a,loop:i}],n,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return ff(e,G2(n,r,l,c),n,t)}function ff(e,t,n,o){return!o||!o.setContext||!n?t:Q2(e,t,n,o)}function Q2(e,t,n,o){const s=e._chart.getContext(),i=hf(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let u=i,d=t[0].start,f=d;function p(g,h,v,m){const y=a?-1:1;if(g!==h){for(g+=l;n[g%l].skip;)g-=y;for(;n[h%l].skip;)h+=y;g%l!==h%l&&(c.push({start:g%l,end:h%l,loop:v,style:m}),u=m,d=h%l)}}for(const g of t){d=a?d:g.start;let h=n[d%l],v;for(f=d+1;f<=g.end;f++){const m=n[f%l];v=hf(o.setContext(Fo(s,{type:"segment",p0:h,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),J2(v,u)&&p(d,f-1,g.loop,u),h=m,u=v}d<f-1&&p(d,f-1,g.loop,u)}return c}function hf(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function J2(e,t){if(!t)return!1;const n=[],o=function(s,i){return ou(i)?(n.includes(i)||n.push(i),n.indexOf(i)):i};return JSON.stringify(e,o)!==JSON.stringify(t,o)}/*!
    5050 * Chart.js v4.4.0
    5151 * https://www.chartjs.org
    5252 * (c) 2023 Chart.js Contributors
    5353 * Released under the MIT License
    54  */class Z2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,s){const i=n.listeners[s],r=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=fm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,s)=>{if(!o.running||!o.items.length)return;const i=o.items;let r=i.length-1,a=!1,l;for(;r>=0;--r)l=i[r],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),a=!0):(i[r]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,o,t,"progress")),i.length||(o.running=!1,this._notify(s,o,t,"complete"),o.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}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((o,s)=>Math.max(o,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 o=n.items;let s=o.length-1;for(;s>=0;--s)o[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Yn=new Z2;const pf="transparent",eR={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=of(e||pf),s=o.valid&&of(t||pf);return s&&s.valid?s.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class tR{constructor(t,n,o,s){const i=n[o];s=li([t.to,s,i,t.from]);const r=li([t.from,i,s]);this._active=!0,this._fn=t.fn||eR[t.type||typeof r],this._easing=xi[t.easing]||xi.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=o,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const s=this._target[this._prop],i=o-this._start,r=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=li([t.to,n,s,t.from]),this._from=li([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,s=this._prop,i=this._from,r=this._loop,a=this._to;let l;if(this._active=i!==a&&(r||n<o),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/o%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let s=0;s<o.length;s++)o[s][n]()}}class Am{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Fe(t))return;const n=Object.keys(ct.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!Fe(i))return;const r={};for(const a of n)r[a]=i[a];(tt(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!o.has(a))&&o.set(a,r)})})}_animateOptions(t,n){const o=n.options,s=oR(t,o);if(!s)return[];const i=this._createAnimations(s,o);return o.$shared&&nR(t.options.$animations,o).then(()=>{t.options=o},()=>{}),i}_createAnimations(t,n){const o=this._properties,s=[],i=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 u=n[c];let d=i[c];const f=o.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}i[c]=d=new tR(f,t,c,u),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Yn.add(this._chart,o),!0}}function nR(e,t){const n=[],o=Object.keys(t);for(let s=0;s<o.length;s++){const i=e[o[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function oR(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 gf(e,t){const n=e&&e.options||{},o=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:o?i:s,end:o?s:i}}function sR(e,t,n){if(n===!1)return!1;const o=gf(e,n),s=gf(t,n);return{top:s.end,right:o.end,bottom:s.start,left:o.start}}function iR(e){let t,n,o,s;return Fe(e)?(t=e.top,n=e.right,o=e.bottom,s=e.left):t=n=o=s=e,{top:t,right:n,bottom:o,left:s,disabled:e===!1}}function Rm(e,t){const n=[],o=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=o.length;s<i;++s)n.push(o[s].index);return n}function mf(e,t,n,o={}){const s=e.keys,i=o.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(o.all)continue;break}c=e.values[l],lt(c)&&(i||t===0||Rn(t)===Rn(c))&&(t+=c)}return t}}function rR(e){const t=Object.keys(e),n=new Array(t.length);let o,s,i;for(o=0,s=t.length;o<s;++o)i=t[o],n[o]={x:i,y:e[i]};return n}function vf(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aR(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function lR(e){const{min:t,max:n,minDefined:o,maxDefined:s}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function cR(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function bf(e,t,n,o){for(const s of t.getMatchingVisibleMetas(o).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function yf(e,t){const{chart:n,_cachedMeta:o}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:r,index:a}=o,l=i.axis,c=r.axis,u=aR(i,r,o),d=t.length;let f;for(let p=0;p<d;++p){const g=t[p],{[l]:h,[c]:v}=g,m=g._stacks||(g._stacks={});f=m[c]=cR(s,u,h),f[a]=v,f._top=bf(f,r,!0,o.type),f._bottom=bf(f,r,!1,o.type);const y=f._visualValues||(f._visualValues={});y[a]=v}}function Ya(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function uR(e,t){return Fo(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function dR(e,t,n){return Fo(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ei(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(!!o){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const Ga=e=>e==="reset"||e==="none",_f=(e,t)=>t?e:Object.assign({},e),fR=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Rm(n,!0),values:null};class _n{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=vf(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&&ei(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),s=(d,f,p,g)=>d==="x"?f:d==="r"?g:p,i=n.xAxisID=Ae(o.xAxisID,Ya(t,"x")),r=n.yAxisID=Ae(o.yAxisID,Ya(t,"y")),a=n.rAxisID=Ae(o.rAxisID,Ya(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,i,r,a),u=n.vAxisID=s(l,r,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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&&ef(this._data,this),t._stacked&&ei(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(Fe(n))this._data=rR(n);else if(o!==n){if(o){ef(o,this);const s=this._cachedMeta;ei(s),s._parsed=[]}n&&Object.isExtensible(n)&&QA(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,o=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=vf(n.vScale,n),n.stack!==o.stack&&(s=!0,ei(n),n.stack=o.stack),this._resyncElements(t),(s||i!==n._stacked)&&yf(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:s}=this,{iScale:i,_stacked:r}=o,a=i.axis;let l=t===0&&n===s.length?!0:o._sorted,c=t>0&&o._parsed[t-1],u,d,f;if(this._parsing===!1)o._parsed=s,o._sorted=!0,f=s;else{tt(s[t])?f=this.parseArrayData(o,s,t,n):Fe(s[t])?f=this.parseObjectData(o,s,t,n):f=this.parsePrimitiveData(o,s,t,n);const p=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)o._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);o._sorted=l}r&&yf(this,f)}parsePrimitiveData(t,n,o,s){const{iScale:i,vScale:r}=t,a=i.axis,l=r.axis,c=i.getLabels(),u=i===r,d=new Array(s);let f,p,g;for(f=0,p=s;f<p;++f)g=f+o,d[f]={[a]:u||i.parse(c[g],g),[l]:r.parse(n[g],g)};return d}parseArrayData(t,n,o,s){const{xScale:i,yScale:r}=t,a=new Array(s);let l,c,u,d;for(l=0,c=s;l<c;++l)u=l+o,d=n[u],a[l]={x:i.parse(d[0],u),y:r.parse(d[1],u)};return a}parseObjectData(t,n,o,s){const{xScale:i,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,d,f,p;for(u=0,d=s;u<d;++u)f=u+o,p=n[f],c[u]={x:i.parse(To(p,a),f),y:r.parse(To(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const s=this.chart,i=this._cachedMeta,r=n[t.axis],a={keys:Rm(s,!0),values:n._stacks[t.axis]._visualValues};return mf(a,r,i.index,{mode:o})}updateRangeFromParsed(t,n,o,s){const i=o[n.axis];let r=i===null?NaN:i;const a=s&&o._stacks[n.axis];s&&a&&(s.values=a,r=mf(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const o=this._cachedMeta,s=o._parsed,i=o._sorted&&t===o.iScale,r=s.length,a=this._getOtherScale(t),l=fR(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=lR(a);let f,p;function g(){p=s[f];const h=p[a.axis];return!lt(p[t.axis])||u>h||d<h}for(f=0;f<r&&!(!g()&&(this.updateRangeFromParsed(c,t,p,l),i));++f);if(i){for(f=r-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let s,i,r;for(s=0,i=n.length;s<i;++s)r=n[s][t.axis],lt(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=iR(Ae(this.options.clip,sR(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,s=o.data||[],i=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(t,i,a,l),u=a;u<a+l;++u){const d=s[u];d.hidden||(d.active&&c?r.push(d):d.draw(t,i))}for(u=0;u<r.length;++u)r[u].draw(t,i)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];i=r.$context||(r.$context=dR(this.getContext(),t,r)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=uR(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const s=n==="active",i=this._cachedDataOpts,r=t+"-"+n,a=i[r],l=this.enableOptionSharing&&Ni(o);if(a)return _f(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ct.elements[t]),g=()=>this.getContext(o,s,n),h=c.resolveNamedOptions(f,p,g,d);return h.$shared&&(h.$shared=l,i[r]=Object.freeze(_f(h,l))),h}_resolveAnimations(t,n,o){const s=this.chart,i=this._cachedDataOpts,r=`animation-${n}`,a=i[r];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,o,n))}const c=new Am(s,l&&l.animations);return l&&l._cacheable&&(i[r]=Object.freeze(c)),c}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Ga(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(o),r=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:r}}updateElement(t,n,o,s){Ga(s)?Object.assign(t,o):this._resolveAnimations(n,s).update(t,o)}updateSharedOptions(t,n,o){t&&!Ga(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,o,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"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,o=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=o.length,i=n.length,r=Math.min(i,s);r&&this.parse(0,r),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,o=!0){const s=this._cachedMeta,i=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(i),a=t;a<r;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),o&&this.updateElements(i,t,n,"reset")}updateElements(t,n,o,s){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const s=o._parsed.splice(t,n);o._stacked&&ei(o,s)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,s]=t;this[n](o,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 o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ae(_n,"defaults",{}),ae(_n,"datasetElementType",null),ae(_n,"dataElementType",null);function hR(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let s=0,i=n.length;s<i;s++)o=o.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=dm(o.sort((s,i)=>s-i))}return e._cache.$bar}function pR(e){const t=e.iScale,n=hR(t,e.type);let o=t._length,s,i,r,a;const l=()=>{r===32767||r===-32768||(Ni(a)&&(o=Math.min(o,Math.abs(r-a)||o)),a=r)};for(s=0,i=n.length;s<i;++s)r=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)r=t.getPixelForTick(s),l();return o}function gR(e,t,n,o){const s=n.barThickness;let i,r;return ze(s)?(i=t.min*n.categoryPercentage,r=n.barPercentage):(i=s*o,r=1),{chunk:i/o,ratio:r,start:t.pixels[e]-i/2}}function mR(e,t,n,o){const s=t.pixels,i=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=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-r);const c=i-(i-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/o,ratio:n.barPercentage,start:c}}function vR(e,t,n,o){const s=n.parse(e[0],o),i=n.parse(e[1],o),r=Math.min(s,i),a=Math.max(s,i);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:i,min:r,max:a}}function Lm(e,t,n,o){return tt(e)?vR(e,t,n,o):t[n.axis]=n.parse(e,o),t}function wf(e,t,n,o){const s=e.iScale,i=e.vScale,r=s.getLabels(),a=s===i,l=[];let c,u,d,f;for(c=n,u=n+o;c<u;++c)f=t[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(Lm(f,d,i,c));return l}function Xa(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function bR(e,t,n){return e!==0?Rn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yR(e){let t,n,o,s,i;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:o,reverse:t,top:s,bottom:i}}function _R(e,t,n,o){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;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:u}=yR(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?s=c:(n._bottom||0)===o?s=u:(i[xf(u,r,a,l)]=!0,s=c)),i[xf(s,r,a,l)]=!0,e.borderSkipped=i}function xf(e,t,n,o){return o?(e=wR(e,t,n),e=Sf(e,n,t)):e=Sf(e,t,n),e}function wR(e,t,n){return e===t?n:e===n?t:e}function Sf(e,t,n){return e==="start"?t:e==="end"?n:e}function xR(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Vr extends _n{parsePrimitiveData(t,n,o,s){return wf(t,n,o,s)}parseArrayData(t,n,o,s){return wf(t,n,o,s)}parseObjectData(t,n,o,s){const{iScale:i,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=i.axis==="x"?a:l,u=r.axis==="x"?a:l,d=[];let f,p,g,h;for(f=o,p=o+s;f<p;++f)h=n[f],g={},g[i.axis]=i.parse(To(h,c),f),d.push(Lm(To(h,u),g,r,f));return d}updateRangeFromParsed(t,n,o,s){super.updateRangeFromParsed(t,n,o,s);const i=o._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:s}=n,i=this.getParsed(t),r=i._custom,a=Xa(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+o.getLabelForValue(i[o.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,o,s){const i=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let p=n;p<n+o;p++){const g=this.getParsed(p),h=i||ze(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,u),m=(g._stacks||{})[a.axis],y={horizontal:c,base:h.base,enableBorderRadius:!m||Xa(g._custom)||r===m._top||r===m._bottom,x:c?h.head:v.center,y:c?v.center:h.head,height:c?v.size:Math.abs(h.size),width:c?Math.abs(h.size):v.size};f&&(y.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const w=y.options||t[p].options;_R(y,w,m,r),xR(y,w,u.ratio),this.updateElement(t[p],p,y,s)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,s=o.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),i=o.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(ze(u)||isNaN(u))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((i===!1||r.indexOf(l.stack)===-1||i===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,o){const s=this._getStacks(t,o),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,s=[];let i,r;for(i=0,r=n.data.length;i<r;++i)s.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const a=t.barThickness;return{min:a||pR(n),pixels:s,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:s},options:{base:i,minBarLength:r}}=this,a=i||0,l=this.getParsed(t),c=l._custom,u=Xa(c);let d=l[n.axis],f=0,p=o?this.applyStack(n,l,o):d,g,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Rn(d)!==Rn(c.barEnd)&&(f=0),f+=d);const v=!ze(i)&&!u?i:f;let m=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+p):g=m,h=g-m,Math.abs(h)<r){h=bR(h,n,a)*r,d===a&&(m-=h/2);const y=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),_=Math.min(y,w),x=Math.max(y,w);m=Math.max(Math.min(m,x),_),g=m+h,o&&!u&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(m))}if(m===n.getPixelForValue(a)){const y=Rn(h)*n.getLineWidthForValue(a)/2;m+=y,h-=y}return{size:h,base:m,head:g,center:g+h/2}}_calculateBarIndexPixels(t,n){const o=n.scale,s=this.options,i=s.skipNull,r=Ae(s.maxBarThickness,1/0);let a,l;if(n.grouped){const c=i?this._getStackCount(t):n.stackCount,u=s.barThickness==="flex"?mR(t,n,s,c):gR(t,n,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(t)[o.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,o=t.data,s=o.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&o[i].draw(this._ctx)}}ae(Vr,"id","bar"),ae(Vr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ae(Vr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Hr extends _n{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,o,s){const i=super.parsePrimitiveData(t,n,o,s);for(let r=0;r<i.length;r++)i[r]._custom=this.resolveDataElementOptions(r+o).radius;return i}parseArrayData(t,n,o,s){const i=super.parseArrayData(t,n,o,s);for(let r=0;r<i.length;r++){const a=n[o+r];i[r]._custom=Ae(a[2],this.resolveDataElementOptions(r+o).radius)}return i}parseObjectData(t,n,o,s){const i=super.parseObjectData(t,n,o,s);for(let r=0;r<i.length;r++){const a=n[o+r];i[r]._custom=Ae(a&&a.r&&+a.r,this.resolveDataElementOptions(r+o).radius)}return i}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let o=t.length-1;o>=0;--o)n=Math.max(n,t[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:s,yScale:i}=n,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=i.getLabelForValue(r.y),c=r._custom;return{label:o[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,o,s){const i=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=r.axis,d=a.axis;for(let f=n;f<n+o;f++){const p=t[f],g=!i&&this.getParsed(f),h={},v=h[u]=i?r.getPixelForDecimal(.5):r.getPixelForValue(g[u]),m=h[d]=i?a.getBasePixel():a.getPixelForValue(g[d]);h.skip=isNaN(v)||isNaN(m),c&&(h.options=l||this.resolveDataElementOptions(f,p.active?"active":s),i&&(h.options.radius=0)),this.updateElement(p,f,h,s)}}resolveDataElementOptions(t,n){const o=this.getParsed(t);let s=super.resolveDataElementOptions(t,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const i=s.radius;return n!=="active"&&(s.radius=0),s.radius+=Ae(o&&o._custom,i),s}}ae(Hr,"id","bubble"),ae(Hr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ae(Hr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function SR(e,t,n){let o=1,s=1,i=0,r=0;if(t<nt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),p=(w,_,x)=>zi(w,a,l,!0)?1:Math.max(_,_*n,x,x*n),g=(w,_,x)=>zi(w,a,l,!0)?-1:Math.min(_,_*n,x,x*n),h=p(0,c,d),v=p(ut,u,f),m=g(it,c,d),y=g(it+ut,u,f);o=(h-m)/2,s=(v-y)/2,i=-(h+m)/2,r=-(v+y)/2}return{ratioX:o,ratioY:s,offsetX:i,offsetY:r}}class Jo extends _n{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 o=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=o;else{let i=l=>+o[l];if(Fe(o[t])){const{key:l="value"}=this._parsing;i=c=>+To(o[c],l)}let r,a;for(r=t,a=t+n;r<a;++r)s._parsed[r]=i(r)}}_getRotation(){return mn(this.options.rotation-90)}_getCircumference(){return mn(this.options.circumference)}_getRotationExtents(){let t=nt,n=-nt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const s=this.chart.getDatasetMeta(o).controller,i=s._getRotation(),r=s._getCircumference();t=Math.min(t,i),n=Math.max(n,i+r)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:o}=n,s=this._cachedMeta,i=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-r)/2,0),l=Math.min(DA(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:h}=SR(d,u,l),v=(o.width-r)/f,m=(o.height-r)/p,y=Math.max(Math.min(v,m)/2,0),w=rm(this.options.radius,y),_=Math.max(w*l,0),x=(w-_)/this._getVisibleDatasetWeightTotal();this.offsetX=g*w,this.offsetY=h*w,s.total=this.calculateTotal(),this.outerRadius=w-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(i,0,i.length,t)}_circumference(t,n){const o=this.options,s=this._cachedMeta,i=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*i/nt)}updateElements(t,n,o,s){const i=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=i&&c.animateScale,p=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:h,includeOptions:v}=this._getSharedOptions(n,s);let m=this._getRotation(),y;for(y=0;y<n;++y)m+=this._circumference(y,i);for(y=n;y<n+o;++y){const w=this._circumference(y,i),_=t[y],x={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+w,circumference:w,outerRadius:g,innerRadius:p};v&&(x.options=h||this.resolveDataElementOptions(y,_.active?"active":s)),m+=w,this.updateElement(_,y,x,s)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let o=0,s;for(s=0;s<n.length;s++){const i=t._parsed[s];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,s=o.data.labels||[],i=or(n._parsed[t],o.options.locale);return{label:s[t]||"",value:i}}getMaxBorderWidth(t){let n=0;const o=this.chart;let s,i,r,a,l;if(!t){for(s=0,i=o.data.datasets.length;s<i;++s)if(o.isDatasetVisible(s)){r=o.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,i=t.length;s<i;++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 o=0,s=t.length;o<s;++o){const i=this.resolveDataElementOptions(o);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let o=0;o<t;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(t){return Math.max(Ae(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ae(Jo,"id","doughnut"),ae(Jo,"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"}),ae(Jo,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),ae(Jo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:s}}=t.legend.options;return n.labels.map((i,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:o,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class Wr extends _n{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:o,data:s=[],_dataset:i}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=pm(n,s,r);this._drawStart=a,this._drawCount=l,gm(n)&&(a=0,l=s.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,o,s){const i=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,s),f=r.axis,p=a.axis,{spanGaps:g,segment:h}=this.options,v=Is(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||i||s==="none",y=n+o,w=t.length;let _=n>0&&this.getParsed(n-1);for(let x=0;x<w;++x){const S=t[x],C=m?S:{};if(x<n||x>=y){C.skip=!0;continue}const k=this.getParsed(x),T=ze(k[p]),B=C[f]=r.getPixelForValue(k[f],x),$=C[p]=i||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[p],x);C.skip=isNaN(B)||isNaN($)||T,C.stop=x>0&&Math.abs(k[f]-_[f])>v,h&&(C.parsed=k,C.raw=c.data[x]),d&&(C.options=u||this.resolveDataElementOptions(x,S.active?"active":s)),m||this.updateElement(S,x,C,s),_=k}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,o=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return o;const i=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(o,i,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ae(Wr,"id","line"),ae(Wr,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ae(Wr,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ci extends _n{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,s=o.data.labels||[],i=or(n._parsed[t].r,o.options.locale);return{label:s[t]||"",value:i}}parseObjectData(t,n,o,s){return Sm.bind(this)(t,n,o,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((o,s)=>{const i=this.getParsed(s).r;!isNaN(i)&&this.chart.getDataVisibility(s)&&(i<n.min&&(n.min=i),i>n.max&&(n.max=i))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,o=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(s/2,0),r=Math.max(o.cutoutPercentage?i/100*o.cutoutPercentage:1,0),a=(i-r)/t.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,o,s){const i=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*it;let p=f,g;const h=360/this.countVisibleElements();for(g=0;g<n;++g)p+=this._computeAngle(g,s,h);for(g=n;g<n+o;g++){const v=t[g];let m=p,y=p+this._computeAngle(g,s,h),w=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;p=y,i&&(l.animateScale&&(w=0),l.animateRotate&&(m=y=f));const _={x:u,y:d,innerRadius:0,outerRadius:w,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(g,v.active?"active":s)};this.updateElement(v,g,_,s)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((o,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,o){return this.chart.getDataVisibility(t)?mn(this.resolveDataElementOptions(t,n).angle||o):0}}ae(Ci,"id","polarArea"),ae(Ci,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ae(Ci,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:s}}=t.legend.options;return n.labels.map((i,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:o,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Wl extends Jo{}ae(Wl,"id","pie"),ae(Wl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class jr extends _n{getLabelAndValue(t){const n=this._cachedMeta.vScale,o=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(t,n,o,s){return Sm.bind(this)(t,n,o,s)}update(t){const n=this._cachedMeta,o=n.dataset,s=n.data||[],i=n.iScale.getLabels();if(o.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:i.length===s.length,options:r};this.updateElement(o,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,o,s){const i=this._cachedMeta.rScale,r=s==="reset";for(let a=n;a<n+o;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),u=i.getPointPositionForValue(a,this.getParsed(a).r),d=r?i.xCenter:u.x,f=r?i.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,p,s)}}}ae(jr,"id","radar"),ae(jr,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ae(jr,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Kr extends _n{getLabelAndValue(t){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:s,yScale:i}=n,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=i.getLabelForValue(r.y);return{label:o[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:o=[]}=n,s=this.chart._animationsDisabled;let{start:i,count:r}=pm(n,o,s);if(this._drawStart=i,this._drawCount=r,gm(n)&&(i=0,r=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=o;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,i,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,o,s){const i=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,s),d=this.getSharedOptions(u),f=this.includeOptions(s,d),p=r.axis,g=a.axis,{spanGaps:h,segment:v}=this.options,m=Is(h)?h:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||s==="none";let w=n>0&&this.getParsed(n-1);for(let _=n;_<n+o;++_){const x=t[_],S=this.getParsed(_),C=y?x:{},k=ze(S[g]),T=C[p]=r.getPixelForValue(S[p],_),B=C[g]=i||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[g],_);C.skip=isNaN(T)||isNaN(B)||k,C.stop=_>0&&Math.abs(S[p]-w[p])>m,v&&(C.parsed=S,C.raw=c.data[_]),f&&(C.options=d||this.resolveDataElementOptions(_,x.active?"active":s)),y||this.updateElement(x,_,C,s),w=S}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const o=t.dataset,s=o.options&&o.options.borderWidth||0;if(!n.length)return s;const i=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,i,r)/2}}ae(Kr,"id","scatter"),ae(Kr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ae(Kr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var CR=Object.freeze({__proto__:null,BarController:Vr,BubbleController:Hr,DoughnutController:Jo,LineController:Wr,PieController:Wl,PolarAreaController:Ci,RadarController:jr,ScatterController:Kr});function Ho(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class cu{constructor(t){ae(this,"options");this.options=t||{}}static override(t){Object.assign(cu.prototype,t)}init(){}formats(){return Ho()}parse(){return Ho()}format(){return Ho()}add(){return Ho()}diff(){return Ho()}startOf(){return Ho()}endOf(){return Ho()}}var kR={_date:cu};function ER(e,t,n,o){const{controller:s,data:i,_sorted:r}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&i.length){const l=a._reversePixels?GA:eo;if(o){if(s._sharedOptions){const c=i[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(i,t,n-u),f=l(i,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(i,t,n)}return{lo:0,hi:i.length-1}}function sr(e,t,n,o,s){const i=e.getSortedVisibleDatasetMetas(),r=n[t];for(let a=0,l=i.length;a<l;++a){const{index:c,data:u}=i[a],{lo:d,hi:f}=ER(i[a],t,r,s);for(let p=d;p<=f;++p){const g=u[p];g.skip||o(g,c,p)}}}function MR(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,s){const i=t?Math.abs(o.x-s.x):0,r=n?Math.abs(o.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(r,2))}}function Qa(e,t,n,o,s){const i=[];return!s&&!e.isPointInArea(t)||sr(e,n,t,function(a,l,c){!s&&!to(a,e.chartArea,0)||a.inRange(t.x,t.y,o)&&i.push({element:a,datasetIndex:l,index:c})},!0),i}function PR(e,t,n,o){let s=[];function i(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],o),{angle:d}=cm(r,{x:t.x,y:t.y});zi(d,c,u)&&s.push({element:r,datasetIndex:a,index:l})}return sr(e,n,t,i),s}function TR(e,t,n,o,s,i){let r=[];const a=MR(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,s);if(o&&!p)return;const g=u.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!p)return;const v=a(t,g);v<l?(r=[{element:u,datasetIndex:d,index:f}],l=v):v===l&&r.push({element:u,datasetIndex:d,index:f})}return sr(e,n,t,c),r}function Ja(e,t,n,o,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!o?PR(e,t,n,s):TR(e,t,n,o,s,i)}function Cf(e,t,n,o,s){const i=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return sr(e,n,t,(l,c,u)=>{l[r](t[n],s)&&(i.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),o&&!a?[]:i}var OR={evaluateInteractionItems:sr,modes:{index(e,t,n,o){const s=Ko(t,e),i=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?Qa(e,s,i,o,r):Ja(e,s,i,!1,o,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,o){const s=Ko(t,e),i=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?Qa(e,s,i,o,r):Ja(e,s,i,!1,o,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,o){const s=Ko(t,e),i=n.axis||"xy",r=n.includeInvisible||!1;return Qa(e,s,i,o,r)},nearest(e,t,n,o){const s=Ko(t,e),i=n.axis||"xy",r=n.includeInvisible||!1;return Ja(e,s,i,n.intersect,o,r)},x(e,t,n,o){const s=Ko(t,e);return Cf(e,s,"x",n.intersect,o)},y(e,t,n,o){const s=Ko(t,e);return Cf(e,s,"y",n.intersect,o)}}};const $m=["left","top","right","bottom"];function ti(e,t){return e.filter(n=>n.pos===t)}function kf(e,t){return e.filter(n=>$m.indexOf(n.pos)===-1&&n.box.axis===t)}function ni(e,t){return e.sort((n,o)=>{const s=t?o:n,i=t?n:o;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function AR(e){const t=[];let n,o,s,i,r,a;for(n=0,o=(e||[]).length;n<o;++n)s=e[n],{position:i,options:{stack:r,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&i+r,stackWeight:a});return t}function RR(e){const t={};for(const n of e){const{stack:o,pos:s,stackWeight:i}=n;if(!o||!$m.includes(s))continue;const r=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=i}return t}function LR(e,t){const n=RR(e),{vBoxMaxWidth:o,hBoxMaxHeight:s}=t;let i,r,a;for(i=0,r=e.length;i<r;++i){a=e[i];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:l&&t.availableWidth,a.height=s):(a.width=o,a.height=u?u*s:l&&t.availableHeight)}return n}function $R(e){const t=AR(e),n=ni(t.filter(c=>c.box.fullSize),!0),o=ni(ti(t,"left"),!0),s=ni(ti(t,"right")),i=ni(ti(t,"top"),!0),r=ni(ti(t,"bottom")),a=kf(t,"x"),l=kf(t,"y");return{fullSize:n,leftAndTop:o.concat(i),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ti(t,"chartArea"),vertical:o.concat(s).concat(l),horizontal:i.concat(r).concat(a)}}function Ef(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function Im(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 IR(e,t,n,o){const{pos:s,box:i}=n,r=e.maxPadding;if(!Fe(s)){n.size&&(e[s]-=n.size);const d=o[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,e[s]+=n.size}i.getPadding&&Im(r,i.getPadding());const a=Math.max(0,t.outerWidth-Ef(r,e,"left","right")),l=Math.max(0,t.outerHeight-Ef(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function FR(e){const t=e.maxPadding;function n(o){const s=Math.max(t[o]-e[o],0);return e[o]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function DR(e,t){const n=t.maxPadding;function o(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{i[r]=Math.max(t[r],n[r])}),i}return o(e?["left","right"]:["top","bottom"])}function ci(e,t,n,o){const s=[];let i,r,a,l,c,u;for(i=0,r=e.length,c=0;i<r;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,DR(a.horizontal,t));const{same:d,other:f}=IR(t,n,a,o);c|=d&&s.length,u=u||f,l.fullSize||s.push(a)}return c&&ci(s,t,n,o)||u}function xr(e,t,n,o,s){e.top=n,e.left=t,e.right=t+o,e.bottom=n+s,e.width=o,e.height=s}function Mf(e,t,n,o){const s=n.padding;let{x:i,y:r}=t;for(const a of e){const l=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;Ni(c.start)&&(r=c.start),l.fullSize?xr(l,s.left,r,n.outerWidth-s.right-s.left,f):xr(l,t.left+c.placed,r,d,f),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*u,f=c.size||l.width;Ni(c.start)&&(i=c.start),l.fullSize?xr(l,i,s.top,f,n.outerHeight-s.bottom-s.top):xr(l,i,t.top+c.placed,f,d),c.start=i,c.placed+=d,i=l.right}}t.x=i,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,o){if(!e)return;const s=Mt(e.options.layout.padding),i=Math.max(t-s.width,0),r=Math.max(n-s.height,0),a=$R(e.boxes),l=a.vertical,c=a.horizontal;Ke(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,v)=>v.box.options&&v.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:i,availableHeight:r,vBoxMaxWidth:i/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},s);Im(f,Mt(o));const p=Object.assign({maxPadding:f,w:i,h:r,x:s.left,y:s.top},s),g=LR(l.concat(c),d);ci(a.fullSize,p,d,g),ci(l,p,d,g),ci(c,p,d,g)&&ci(l,p,d,g),FR(p),Mf(a.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,Mf(a.rightAndBottom,p,d,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ke(a.chartArea,h=>{const v=h.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Fm{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,s){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):o)}}isAttached(t){return!0}updateConfig(t){}}class BR extends Fm{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ur="$chartjs",NR={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Pf=e=>e===null||e==="";function zR(e,t){const n=e.style,o=e.getAttribute("height"),s=e.getAttribute("width");if(e[Ur]={initial:{height:o,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Pf(s)){const i=uf(e,"width");i!==void 0&&(e.width=i)}if(Pf(o))if(e.style.height==="")e.height=e.width/(t||2);else{const i=uf(e,"height");i!==void 0&&(e.height=i)}return e}const Dm=H2?{passive:!0}:!1;function VR(e,t,n){e.addEventListener(t,n,Dm)}function HR(e,t,n){e.canvas.removeEventListener(t,n,Dm)}function WR(e,t){const n=NR[e.type]||e.type,{x:o,y:s}=Ko(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:s!==void 0?s:null}}function da(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function jR(e,t,n){const o=e.canvas,s=new MutationObserver(i=>{let r=!1;for(const a of i)r=r||da(a.addedNodes,o),r=r&&!da(a.removedNodes,o);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function KR(e,t,n){const o=e.canvas,s=new MutationObserver(i=>{let r=!1;for(const a of i)r=r||da(a.removedNodes,o),r=r&&!da(a.addedNodes,o);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Hi=new Map;let Tf=0;function Bm(){const e=window.devicePixelRatio;e!==Tf&&(Tf=e,Hi.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function UR(e,t){Hi.size||window.addEventListener("resize",Bm),Hi.set(e,t)}function qR(e){Hi.delete(e),Hi.size||window.removeEventListener("resize",Bm)}function YR(e,t,n){const o=e.canvas,s=o&&lu(o);if(!s)return;const i=hm((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,u=l.contentRect.height;c===0&&u===0||i(c,u)});return r.observe(s),UR(e,i),r}function Za(e,t,n){n&&n.disconnect(),t==="resize"&&qR(e)}function GR(e,t,n){const o=e.canvas,s=hm(i=>{e.ctx!==null&&n(WR(i,e))},e);return VR(o,t,s),s}class XR extends Fm{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(zR(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[Ur])return!1;const o=n[Ur].initial;["height","width"].forEach(i=>{const r=o[i];ze(r)?n.removeAttribute(i):n.setAttribute(i,r)});const s=o.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[Ur],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),r={attach:jR,detach:KR,resize:YR}[n]||GR;s[n]=r(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),s=o[n];if(!s)return;({attach:Za,detach:Za,resize:Za}[n]||HR)(t,n,s),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,s){return V2(t,n,o,s)}isAttached(t){const n=lu(t);return!!(n&&n.isConnected)}}function QR(e){return!km()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?BR:XR}class xn{constructor(){ae(this,"x");ae(this,"y");ae(this,"active",!1);ae(this,"options");ae(this,"$animations")}tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return Is(this.x)&&Is(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const s={};return t.forEach(i=>{s[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),s}}ae(xn,"defaults",{}),ae(xn,"defaultRoutes");function JR(e,t){const n=e.options.ticks,o=ZR(e),s=Math.min(n.maxTicksLimit||o,o),i=n.major.enabled?tL(t):[],r=i.length,a=i[0],l=i[r-1],c=[];if(r>s)return nL(t,c,i,r/s),c;const u=eL(i,t,s);if(r>0){let d,f;const p=r>1?Math.round((l-a)/(r-1)):null;for(Sr(t,c,u,ze(p)?0:a-p,a),d=0,f=r-1;d<f;d++)Sr(t,c,u,i[d],i[d+1]);return Sr(t,c,u,l,ze(p)?t.length:l+p),c}return Sr(t,c,u),c}function ZR(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(o,s))}function eL(e,t,n){const o=oL(e),s=t.length/n;if(!o)return Math.max(s,1);const i=KA(o);for(let r=0,a=i.length-1;r<a;r++){const l=i[r];if(l>s)return l}return Math.max(s,1)}function tL(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function nL(e,t,n,o){let s=0,i=n[0],r;for(o=Math.ceil(o),r=0;r<e.length;r++)r===i&&(t.push(e[r]),s++,i=n[s*o])}function Sr(e,t,n,o,s){const i=Ae(o,0),r=Math.min(Ae(s,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),s&&(l=s-o,n=l/Math.floor(l/n)),u=i;u<0;)a++,u=Math.round(i+a*n);for(c=Math.max(i,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(i+a*n))}function oL(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const sL=e=>e==="left"?"right":e==="right"?"left":e,Of=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Af=(e,t)=>Math.min(t||e,e);function Rf(e,t){const n=[],o=e.length/t,s=e.length;let i=0;for(;i<s;i+=o)n.push(e[Math.floor(i)]);return n}function iL(e,t,n){const o=e.ticks.length,s=Math.min(t,o-1),i=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),c;if(!(n&&(o===1?c=Math.max(l-i,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<i-a||l>r+a)))return l}function rL(e,t){Ke(e,n=>{const o=n.gc,s=o.length/2;let i;if(s>t){for(i=0;i<s;++i)delete n.data[o[i]];o.splice(0,s)}})}function oi(e){return e.drawTicks?e.tickLength:0}function Lf(e,t){if(!e.display)return 0;const n=ht(e.font,t),o=Mt(e.padding);return(tt(e.text)?e.text.length:1)*n.lineHeight+o.height}function aL(e,t){return Fo(e,{scale:t,type:"scale"})}function lL(e,t,n){return Fo(e,{tick:n,index:t,type:"tick"})}function cL(e,t,n){let o=nu(e);return(n&&t!=="right"||!n&&t==="right")&&(o=sL(o)),o}function uL(e,t,n,o){const{top:s,left:i,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,g;const h=r-s,v=a-i;if(e.isHorizontal()){if(p=Ct(o,i,a),Fe(n)){const m=Object.keys(n)[0],y=n[m];g=u[m].getPixelForValue(y)+h-t}else n==="center"?g=(c.bottom+c.top)/2+h-t:g=Of(e,n,t);f=a-i}else{if(Fe(n)){const m=Object.keys(n)[0],y=n[m];p=u[m].getPixelForValue(y)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=Of(e,n,t);g=Ct(o,r,s),d=n==="left"?-ut:ut}return{titleX:p,titleY:g,maxWidth:f,rotation:d}}class hs extends xn{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:o,_suggestedMax:s}=this;return t=Yt(t,Number.POSITIVE_INFINITY),n=Yt(n,Number.NEGATIVE_INFINITY),o=Yt(o,Number.POSITIVE_INFINITY),s=Yt(s,Number.NEGATIVE_INFINITY),{min:Yt(t,o),max:Yt(n,s),minDefined:lt(t),maxDefined:lt(n)}}getMinMax(t){let{min:n,max:o,minDefined:s,maxDefined:i}=this.getUserBounds(),r;if(s&&i)return{min:n,max:o};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)),i||(o=Math.max(o,r.max));return n=i&&n>o?o:n,o=s&&n>o?n:o,{min:Yt(n,Yt(o,n)),max:Yt(o,Yt(n,o))}}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(){Qe(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:s,grace:i,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=y2(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Rf(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=JR(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,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(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(){Qe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,s,i;for(o=0,s=t.length;o<s;o++)i=t[o],i.label=Qe(n.callback,[i.value,o,t],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=Af(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!n.display||s>=i||o<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=vt(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/o:p/(o-1),d+6>a&&(a=p/(o-(t.offset?.5:1)),l=this.maxHeight-oi(t.grid)-n.padding-Lf(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=eu(Math.min(Math.asin(vt((u.highest.height+6)/a,-1,1)),Math.asin(vt(l/c,-1,1))-Math.asin(vt(f/c,-1,1)))),r=Math.max(s,Math.min(i,r))),this.labelRotation=r}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:s,grid:i}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Lf(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=oi(i)+l):(t.height=this.maxHeight,t.width=oi(i)+l),o.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=o.padding*2,g=mn(this.labelRotation),h=Math.cos(g),v=Math.sin(g);if(a){const m=o.mirror?0:v*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=o.mirror?0:h*d.width+v*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,v,h)}}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,o,s){const{ticks:{align:i,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=s*t.width,p=o*n.height):(f=o*t.height,p=s*n.width):i==="start"?p=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+r)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;i==="start"?(u=0,d=t.height):i==="end"&&(u=n.height,d=0),this.paddingTop=u+r,this.paddingBottom=d+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(){Qe(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,o;for(n=0,o=t.length;n<o;n++)ze(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Rf(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:s,_longestTextCache:i}=this,r=[],a=[],l=Math.floor(n/Af(n,o));let c=0,u=0,d,f,p,g,h,v,m,y,w,_,x;for(d=0;d<n;d+=l){if(g=t[d].label,h=this._resolveTickFontOptions(d),s.font=v=h.string,m=i[v]=i[v]||{data:{},gc:[]},y=h.lineHeight,w=_=0,!ze(g)&&!tt(g))w=ca(s,m.data,m.gc,w,g),_=y;else if(tt(g))for(f=0,p=g.length;f<p;++f)x=g[f],!ze(x)&&!tt(x)&&(w=ca(s,m.data,m.gc,w,x),_+=y);r.push(w),a.push(_),c=Math.max(w,c),u=Math.max(_,u)}rL(i,n);const S=r.indexOf(c),C=a.indexOf(u),k=T=>({width:r[T]||0,height:a[T]||0});return{first:k(0),last:k(n-1),widest:k(S),highest:k(C),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 YA(this._alignToPixels?Vo(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 o=n[t];return o.$context||(o.$context=lL(this.getContext(),t,o))}return this.$context||(this.$context=aL(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=mn(this.labelRotation),o=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),r=t.autoSkipPadding||0,a=i?i.widest.width+r:0,l=i?i.highest.height+r:0;return this.isHorizontal()?l*o>a*s?a/o:l/s:l*s<a*o?l/o:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,s=this.options,{grid:i,position:r,border:a}=s,l=i.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=oi(i),p=[],g=a.setContext(this.getContext()),h=g.display?g.width:0,v=h/2,m=function(Q){return Vo(o,Q,h)};let y,w,_,x,S,C,k,T,B,$,D,W;if(r==="top")y=m(this.bottom),C=this.bottom-f,T=y-v,$=m(t.top)+v,W=t.bottom;else if(r==="bottom")y=m(this.top),$=t.top,W=m(t.bottom)-v,C=y+v,T=this.top+f;else if(r==="left")y=m(this.right),S=this.right-f,k=y-v,B=m(t.left)+v,D=t.right;else if(r==="right")y=m(this.left),B=t.left,D=m(t.right)-v,S=y+v,k=this.left+f;else if(n==="x"){if(r==="center")y=m((t.top+t.bottom)/2+.5);else if(Fe(r)){const Q=Object.keys(r)[0],V=r[Q];y=m(this.chart.scales[Q].getPixelForValue(V))}$=t.top,W=t.bottom,C=y+v,T=C+f}else if(n==="y"){if(r==="center")y=m((t.left+t.right)/2);else if(Fe(r)){const Q=Object.keys(r)[0],V=r[Q];y=m(this.chart.scales[Q].getPixelForValue(V))}S=y-v,k=S-f,B=t.left,D=t.right}const ne=Ae(s.ticks.maxTicksLimit,d),j=Math.max(1,Math.ceil(d/ne));for(w=0;w<d;w+=j){const Q=this.getContext(w),V=i.setContext(Q),le=a.setContext(Q),I=V.lineWidth,Z=V.color,de=le.dash||[],J=le.dashOffset,G=V.tickWidth,U=V.tickColor,re=V.tickBorderDash||[],ie=V.tickBorderDashOffset;_=iL(this,w,l),_!==void 0&&(x=Vo(o,_,I),c?S=k=B=D=x:C=T=$=W=x,p.push({tx1:S,ty1:C,tx2:k,ty2:T,x1:B,y1:$,x2:D,y2:W,width:I,color:Z,borderDash:de,borderDashOffset:J,tickWidth:G,tickColor:U,tickBorderDash:re,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=y,p}_computeLabelItems(t){const n=this.axis,o=this.options,{position:s,ticks:i}=o,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=i,f=oi(o.grid),p=f+u,g=d?-u:p,h=-mn(this.labelRotation),v=[];let m,y,w,_,x,S,C,k,T,B,$,D,W="middle";if(s==="top")S=this.bottom-g,C=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+g,C=this._getXAxisLabelAlignment();else if(s==="left"){const j=this._getYAxisLabelAlignment(f);C=j.textAlign,x=j.x}else if(s==="right"){const j=this._getYAxisLabelAlignment(f);C=j.textAlign,x=j.x}else if(n==="x"){if(s==="center")S=(t.top+t.bottom)/2+p;else if(Fe(s)){const j=Object.keys(s)[0],Q=s[j];S=this.chart.scales[j].getPixelForValue(Q)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")x=(t.left+t.right)/2-p;else if(Fe(s)){const j=Object.keys(s)[0],Q=s[j];x=this.chart.scales[j].getPixelForValue(Q)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const ne=this._getLabelSizes();for(m=0,y=a.length;m<y;++m){w=a[m],_=w.label;const j=i.setContext(this.getContext(m));k=this.getPixelForTick(m)+i.labelOffset,T=this._resolveTickFontOptions(m),B=T.lineHeight,$=tt(_)?_.length:1;const Q=$/2,V=j.color,le=j.textStrokeColor,I=j.textStrokeWidth;let Z=C;r?(x=k,C==="inner"&&(m===y-1?Z=this.options.reverse?"left":"right":m===0?Z=this.options.reverse?"right":"left":Z="center"),s==="top"?c==="near"||h!==0?D=-$*B+B/2:c==="center"?D=-ne.highest.height/2-Q*B+B:D=-ne.highest.height+B/2:c==="near"||h!==0?D=B/2:c==="center"?D=ne.highest.height/2-Q*B:D=ne.highest.height-$*B,d&&(D*=-1),h!==0&&!j.showLabelBackdrop&&(x+=B/2*Math.sin(h))):(S=k,D=(1-$)*B/2);let de;if(j.showLabelBackdrop){const J=Mt(j.backdropPadding),G=ne.heights[m],U=ne.widths[m];let re=D-J.top,ie=0-J.left;switch(W){case"middle":re-=G/2;break;case"bottom":re-=G;break}switch(C){case"center":ie-=U/2;break;case"right":ie-=U;break}de={left:ie,top:re,width:U+J.width,height:G+J.height,color:j.backdropColor}}v.push({label:_,font:T,textOffset:D,options:{rotation:h,color:V,strokeColor:le,strokeWidth:I,textAlign:Z,textBaseline:W,translation:[x,S],backdrop:de}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-mn(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:o,mirror:s,padding:i}}=this.options,r=this._getLabelSizes(),a=t+i,l=r.widest.width;let c,u;return n==="left"?s?(u=this.right+i,o==="near"?c="left":o==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+i,o==="near"?c="right":o==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:o,top:s,width:i,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,s,i,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,r;const a=(l,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(i=0,r=s.length;i<r;++i){const l=s[i];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:o,grid:s}}=this,i=o.setContext(this.getContext()),r=o.display?i.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Vo(t,this.left,r)-r/2,u=Vo(t,this.right,a)+a/2,d=f=l):(d=Vo(t,this.top,r)-r/2,f=Vo(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const o=this.ctx,s=this._computeLabelArea();s&&Ea(o,s);const i=this.getLabelItems(t);for(const r of i){const a=r.options,l=r.font,c=r.label,u=r.textOffset;us(o,c,0,u,l,a)}s&&Ma(o)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:s}}=this;if(!o.display)return;const i=ht(o.font),r=Mt(o.padding),a=o.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||Fe(n)?(l+=r.bottom,tt(o.text)&&(l+=i.lineHeight*(o.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=uL(this,l,n,a);us(t,o.text,0,0,i,{color:o.color,maxWidth:d,rotation:f,textAlign:cL(a,n,s),textBaseline:"middle",translation:[c,u]})}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,o=Ae(t.grid&&t.grid.z,-1),s=Ae(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==hs.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:o,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",s=[];let i,r;for(i=0,r=n.length;i<r;++i){const a=n[i];a[o]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ht(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Cr{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,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 o;hL(n)&&(o=this.register(n));const s=this.items,i=t.id,r=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in s||(s[i]=t,dL(t,r,o),this.override&&ct.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,s=this.scope;o in n&&delete n[o],s&&o in ct[s]&&(delete ct[s][o],this.override&&delete cs[o])}}function dL(e,t,n){const o=Bi(Object.create(null),[n?ct.get(n):{},ct.get(t),e.defaults]);ct.set(t,o),e.defaultRoutes&&fL(t,e.defaultRoutes),e.descriptors&&ct.describe(t,e.descriptors)}function fL(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),s=o.pop(),i=[e].concat(o).join("."),r=t[n].split("."),a=r.pop(),l=r.join(".");ct.route(i,s,l,a)})}function hL(e){return"id"in e&&"defaults"in e}class pL{constructor(){this.controllers=new Cr(_n,"datasets",!0),this.elements=new Cr(xn,"elements"),this.plugins=new Cr(Object,"plugins"),this.scales=new Cr(hs,"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,o){[...n].forEach(s=>{const i=o||this._getRegistryForType(s);o||i.isForType(s)||i===this.plugins&&s.id?this._exec(t,i,s):Ke(s,r=>{const a=o||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,n,o){const s=Zc(t);Qe(o["before"+s],[],o),n[t](o),Qe(o["after"+s],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return s}}var Tn=new pL;class gL{constructor(){this._init=[]}notify(t,n,o,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(i,t,n,o);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,n,o,s){s=s||{};for(const i of t){const r=i.plugin,a=r[o],l=[n,s,i.options];if(Qe(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){ze(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 o=t&&t.config,s=Ae(o.options&&o.options.plugins,{}),i=mL(o);return s===!1&&!n?[]:bL(t,i,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,s=(i,r)=>i.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,o),t,"stop"),this._notify(s(o,n),t,"start")}}function mL(e){const t={},n=[],o=Object.keys(Tn.plugins.items);for(let i=0;i<o.length;i++)n.push(Tn.getPlugin(o[i]));const s=e.plugins||[];for(let i=0;i<s.length;i++){const r=s[i];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function vL(e,t){return!t&&e===!1?null:e===!0?{}:e}function bL(e,{plugins:t,localIds:n},o,s){const i=[],r=e.getContext();for(const a of t){const l=a.id,c=vL(o[l],s);c!==null&&i.push({plugin:a,options:yL(e.config,{plugin:a,local:n[l]},c,r)})}return i}function yL(e,{plugin:t,local:n},o,s){const i=e.pluginScopeKeys(t),r=e.getOptionScopes(o,i);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function jl(e,t){const n=ct.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function _L(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function wL(e,t){return e===t?"_index_":"_value_"}function $f(e){if(e==="x"||e==="y"||e==="r")return e}function xL(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Kl(e,...t){if($f(e))return e;for(const n of t){const o=n.axis||xL(n.position)||e.length>1&&$f(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function If(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function SL(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return If(e,"x",n[0])||If(e,"y",n[0])}return{}}function CL(e,t){const n=cs[e.type]||{scales:{}},o=t.scales||{},s=jl(e.type,t),i=Object.create(null);return Object.keys(o).forEach(r=>{const a=o[r];if(!Fe(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=Kl(r,a,SL(r,e),ct.scales[a.type]),c=wL(l,s),u=n.scales||{};i[r]=_i(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||jl(a,t),u=(cs[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=_L(d,l),p=r[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),_i(i[p],[{axis:f},o[p],u[d]])})}),Object.keys(i).forEach(r=>{const a=i[r];_i(a,[ct.scales[a.type],ct.scale])}),i}function Nm(e){const t=e.options||(e.options={});t.plugins=Ae(t.plugins,{}),t.scales=CL(e,t)}function zm(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function kL(e){return e=e||{},e.data=zm(e.data),Nm(e),e}const Ff=new Map,Vm=new Set;function kr(e,t){let n=Ff.get(e);return n||(n=t(),Ff.set(e,n),Vm.add(n)),n}const si=(e,t,n)=>{const o=To(t,n);o!==void 0&&e.add(o)};class EL{constructor(t){this._config=kL(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=zm(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(),Nm(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return kr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return kr(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return kr(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return kr(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let s=o.get(t);return(!s||n)&&(s=new Map,o.set(t,s)),s}getOptionScopes(t,n,o){const{options:s,type:i}=this,r=this._cachedScopes(t,o),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>si(l,t,d))),u.forEach(d=>si(l,s,d)),u.forEach(d=>si(l,cs[i]||{},d)),u.forEach(d=>si(l,ct,d)),u.forEach(d=>si(l,Vl,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Vm.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,cs[n]||{},ct.datasets[n]||{},{type:n},ct,Vl]}resolveNamedOptions(t,n,o,s=[""]){const i={$shared:!0},{resolver:r,subPrefixes:a}=Df(this._resolverCache,t,s);let l=r;if(PL(r,n)){i.$shared=!1,o=Oo(o)?o():o;const c=this.createResolver(t,o,a);l=Fs(r,o,c)}for(const c of n)i[c]=l[c];return i}createResolver(t,n,o=[""],s){const{resolver:i}=Df(this._resolverCache,t,o);return Fe(n)?Fs(i,n,void 0,s):i}}function Df(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const s=n.join();let i=o.get(s);return i||(i={resolver:iu(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(s,i)),i}const ML=e=>Fe(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Oo(e[n]),!1);function PL(e,t){const{isScriptable:n,isIndexable:o}=ym(e);for(const s of t){const i=n(s),r=o(s),a=(r||i)&&e[s];if(i&&(Oo(a)||ML(a))||r&&tt(a))return!0}return!1}var TL="4.4.0";const OL=["top","bottom","left","right","chartArea"];function Bf(e,t){return e==="top"||e==="bottom"||OL.indexOf(e)===-1&&t==="x"}function Nf(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function zf(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[e],t)}function AL(e){const t=e.chart,n=t.options.animation;Qe(n&&n.onProgress,[e],t)}function Hm(e){return km()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qr={},Vf=e=>{const t=Hm(e);return Object.values(qr).filter(n=>n.canvas===t).pop()};function RL(e,t,n){const o=Object.keys(e);for(const s of o){const i=+s;if(i>=t){const r=e[s];delete e[s],(n>0||i>t)&&(e[i+n]=r)}}}function LL(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}function Er(e,t,n){return e.options.clip?e[n]:t[n]}function $L(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:Er(n,t,"left"),right:Er(n,t,"right"),top:Er(o,t,"top"),bottom:Er(o,t,"bottom")}:t}class Jn{static register(...t){Tn.add(...t),Hf()}static unregister(...t){Tn.remove(...t),Hf()}constructor(t,n){const o=this.config=new EL(n),s=Hm(t),i=Vf(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const r=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||QR(s)),this.platform.updateConfig(o);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=FA(),this.ctx=a,this.canvas=l,this.width=u,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 gL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=JA(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],qr[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Yn.listen(this,"complete",zf),Yn.listen(this,"progress",AL),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:s,_aspectRatio:i}=this;return ze(t)?n&&i?i:s?o/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 Tn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rf(this.canvas,this.ctx),this}stop(){return Yn.stop(this),this}resize(t,n){Yn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,s=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,n,i),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,cf(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),Qe(o.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ke(n,(o,s)=>{o.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,s=Object.keys(o).reduce((r,a)=>(r[a]=!1,r),{});let i=[];n&&(i=i.concat(Object.keys(n).map(r=>{const a=n[r],l=Kl(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ke(i,r=>{const a=r.options,l=a.id,c=Kl(l,a),u=Ae(a.type,r.dtype);(a.position===void 0||Bf(a.position,c)!==Bf(r.dposition))&&(a.position=r.dposition),s[l]=!0;let d=null;if(l in o&&o[l].type===u)d=o[l];else{const f=Tn.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),o[d.id]=d}d.init(a,t)}),Ke(s,(r,a)=>{r||delete o[a]}),Ke(o,r=>{kt.configure(this,r,r.options),kt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((s,i)=>s.index-i.index),o>n){for(let s=n;s<o;++s)this._destroyDatasetMeta(s);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(Nf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,s)=>{n.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,s;for(this._removeUnreferencedMetasets(),o=0,s=n.length;o<s;o++){const i=n[o];let r=this.getDatasetMeta(o);const a=i.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=a,r.indexAxis=i.indexAxis||jl(a,this.options),r.order=i.order||0,r.index=o,r.label=""+i.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const l=Tn.getController(a),{datasetElementType:c,dataElementType:u}=ct.datasets[a];Object.assign(l,{dataElementType:Tn.getElement(u),datasetElementType:c&&Tn.getElement(c)}),r.controller=new l(this,o),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Ke(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 o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=o.layout.autoPadding?r:0,this._updateLayout(r),s||Ke(i,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nf("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ke(this.scales,t=>{kt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!Xd(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:s,count:i}of n){const r=o==="_removeElements"?-i:i;RL(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=i=>new Set(t.filter(r=>r[0]===i).map((r,a)=>a+","+r.splice(1).join(","))),s=o(0);for(let i=1;i<n;i++)if(!Xd(s,o(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;kt.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],Ke(this.boxes,s=>{o&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Oo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),s={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(o.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Yn.has(this)?this.attached&&!Yn.running(this)&&Yn.start(this):(this.draw(),zf({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:s}=this._resizeBeforeDraw;this._resize(o,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,o=[];let s,i;for(s=0,i=n.length;s<i;++s){const r=n[s];(!t||r.visible)&&o.push(r)}return o}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,o=t._clip,s=!o.disabled,i=$L(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Ea(n,{left:o.left===!1?0:i.left-o.left,right:o.right===!1?this.width:i.right+o.right,top:o.top===!1?0:i.top-o.top,bottom:o.bottom===!1?this.height:i.bottom+o.bottom}),t.controller.draw(),s&&Ma(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return to(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,s){const i=OR.modes[n];return typeof i=="function"?i(this,t,o,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let s=o.filter(i=>i&&i._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},o.push(s)),s}getContext(){return this.$context||(this.$context=Fo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const s=o?"show":"hide",i=this.getDatasetMeta(t),r=i.controller._resolveAnimations(void 0,s);Ni(n)?(i.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),r.update(i,{visible:o}),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(),Yn.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(),rf(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete qr[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,o=(i,r)=>{n.addEventListener(this,i,r),t[i]=r},s=(i,r,a)=>{i.offsetX=r,i.offsetY=a,this._eventHandler(i)};Ke(this.options.events,i=>o(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},i=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),o("resize",i),o("detach",r)};r=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){Ke(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ke(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const s=o?"set":"remove";let i,r,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.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||[],o=t.map(({datasetIndex:i,index:r})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[r],index:r}});!ra(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const s=this.options.hover,i=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),r=i(n,t),a=o?t:i(t,n);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const o={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",o,s)===!1)return;const i=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,s),(i||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:s=[],options:i}=this,r=n,a=this._getActiveElements(t,s,o,r),l=HA(t),c=LL(t,this._lastEvent,o,l);o&&(this._lastEvent=null,Qe(i.onHover,[t,a,this],this),l&&Qe(i.onClick,[t,a,this],this));const u=!ra(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,o,s){if(t.type==="mouseout")return[];if(!o)return n;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}}ae(Jn,"defaults",ct),ae(Jn,"instances",qr),ae(Jn,"overrides",cs),ae(Jn,"registry",Tn),ae(Jn,"version",TL),ae(Jn,"getChart",Vf);function Hf(){return Ke(Jn.instances,e=>e._plugins.invalidate())}function IL(e,t,n){const{startAngle:o,pixelMargin:s,x:i,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;e.beginPath(),e.arc(i,r,a,o-c,n+c),l>s?(c=s/l,e.arc(i,r,l,n+c,o-c,!0)):e.arc(i,r,s,n+ut,o-ut),e.closePath(),e.clip()}function FL(e){return su(e,["outerStart","outerEnd","innerStart","innerEnd"])}function DL(e,t,n,o){const s=FL(e.options.borderRadius),i=(n-t)/2,r=Math.min(i,o*t/2),a=l=>{const c=(n-Math.min(i,l))*o/2;return vt(l,0,Math.min(i,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:vt(s.innerStart,0,r),innerEnd:vt(s.innerEnd,0,r)}}function vs(e,t,n,o){return{x:n+e*Math.cos(t),y:o+e*Math.sin(t)}}function fa(e,t,n,o,s,i){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+o+n-c,0),f=u>0?u+o+n+c:0;let p=0;const g=s-l;if(o){const j=u>0?u-o:0,Q=d>0?d-o:0,V=(j+Q)/2,le=V!==0?g*V/(V+o):g;p=(g-le)/2}const h=Math.max(.001,g*d-n/it)/d,v=(g-h)/2,m=l+v+p,y=s-v-p,{outerStart:w,outerEnd:_,innerStart:x,innerEnd:S}=DL(t,f,d,y-m),C=d-w,k=d-_,T=m+w/C,B=y-_/k,$=f+x,D=f+S,W=m+x/$,ne=y-S/D;if(e.beginPath(),i){const j=(T+B)/2;if(e.arc(r,a,d,T,j),e.arc(r,a,d,j,B),_>0){const I=vs(k,B,r,a);e.arc(I.x,I.y,_,B,y+ut)}const Q=vs(D,y,r,a);if(e.lineTo(Q.x,Q.y),S>0){const I=vs(D,ne,r,a);e.arc(I.x,I.y,S,y+ut,ne+Math.PI)}const V=(y-S/f+(m+x/f))/2;if(e.arc(r,a,f,y-S/f,V,!0),e.arc(r,a,f,V,m+x/f,!0),x>0){const I=vs($,W,r,a);e.arc(I.x,I.y,x,W+Math.PI,m-ut)}const le=vs(C,m,r,a);if(e.lineTo(le.x,le.y),w>0){const I=vs(C,T,r,a);e.arc(I.x,I.y,w,m-ut,T)}}else{e.moveTo(r,a);const j=Math.cos(T)*d+r,Q=Math.sin(T)*d+a;e.lineTo(j,Q);const V=Math.cos(B)*d+r,le=Math.sin(B)*d+a;e.lineTo(V,le)}e.closePath()}function BL(e,t,n,o,s){const{fullCircles:i,startAngle:r,circumference:a}=t;let l=t.endAngle;if(i){fa(e,t,n,o,l,s);for(let c=0;c<i;++c)e.fill();isNaN(a)||(l=r+(a%nt||nt))}return fa(e,t,n,o,l,s),e.fill(),l}function NL(e,t,n,o,s){const{fullCircles:i,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,p?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let g=t.endAngle;if(i){fa(e,t,n,o,g,s);for(let h=0;h<i;++h)e.stroke();isNaN(a)||(g=r+(a%nt||nt))}p&&IL(e,t,g),i||(fa(e,t,n,o,g,s),e.stroke())}class ui extends xn{constructor(n){super();ae(this,"circumference");ae(this,"endAngle");ae(this,"fullCircles");ae(this,"innerRadius");ae(this,"outerRadius");ae(this,"pixelMargin");ae(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,o,s){const i=this.getProps(["x","y"],s),{angle:r,distance:a}=cm(i,{x:n,y:o}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),p=(this.options.spacing+this.options.borderWidth)/2,h=Ae(f,c-l)>=nt||zi(r,l,c),v=Zn(a,u+p,d+p);return h&&v}getCenterPoint(n){const{x:o,y:s,startAngle:i,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(i+r)/2,f=(a+l+u+c)/2;return{x:o+Math.cos(d)*f,y:s+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:s}=this,i=(o.offset||0)/4,r=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=s>nt?Math.floor(s/nt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(it,s||0)),u=i*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,BL(n,this,u,r,a),NL(n,this,u,r,a),n.restore()}}ae(ui,"id","arc"),ae(ui,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ae(ui,"defaultRoutes",{backgroundColor:"backgroundColor"}),ae(ui,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Wm(e,t,n=t){e.lineCap=Ae(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ae(n.borderDash,t.borderDash)),e.lineDashOffset=Ae(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ae(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ae(n.borderWidth,t.borderWidth),e.strokeStyle=Ae(n.borderColor,t.borderColor)}function zL(e,t,n){e.lineTo(n.x,n.y)}function VL(e){return e.stepped?u2:e.tension||e.cubicInterpolationMode==="monotone"?d2:zL}function jm(e,t,n={}){const o=e.length,{start:s=0,end:i=o-1}=n,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(i,a),u=s<r&&i<r||s>a&&i>a;return{count:o,start:l,loop:t.loop,ilen:c<l&&!u?o+c-l:c-l}}function HL(e,t,n,o){const{points:s,options:i}=t,{count:r,start:a,loop:l,ilen:c}=jm(s,n,o),u=VL(i);let{move:d=!0,reverse:f}=o||{},p,g,h;for(p=0;p<=c;++p)g=s[(a+(f?c-p:p))%r],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,h,g,f,i.stepped),h=g);return l&&(g=s[(a+(f?c:0))%r],u(e,h,g,f,i.stepped)),!!l}function WL(e,t,n,o){const s=t.points,{count:i,start:r,ilen:a}=jm(s,n,o),{move:l=!0,reverse:c}=o||{};let u=0,d=0,f,p,g,h,v,m;const y=_=>(r+(c?a-_:_))%i,w=()=>{h!==v&&(e.lineTo(u,v),e.lineTo(u,h),e.lineTo(u,m))};for(l&&(p=s[y(0)],e.moveTo(p.x,p.y)),f=0;f<=a;++f){if(p=s[y(f)],p.skip)continue;const _=p.x,x=p.y,S=_|0;S===g?(x<h?h=x:x>v&&(v=x),u=(d*u+_)/++d):(w(),e.lineTo(_,x),g=S,d=0,h=v=x),m=x}w()}function Ul(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?WL:HL}function jL(e){return e.stepped?W2:e.tension||e.cubicInterpolationMode==="monotone"?j2:Uo}function KL(e,t,n,o){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,o)&&s.closePath()),Wm(e,t.options),e.stroke(s)}function UL(e,t,n,o){const{segments:s,options:i}=t,r=Ul(t);for(const a of s)Wm(e,i,a.style),e.beginPath(),r(e,t,a,{start:n,end:n+o-1})&&e.closePath(),e.stroke()}const qL=typeof Path2D=="function";function YL(e,t,n,o){qL&&!t.options.segment?KL(e,t,n,o):UL(e,t,n,o)}class xo extends xn{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 o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const s=o.spanGaps?this._loop:this._fullLoop;I2(this._points,o,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=X2(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,o=t.length;return o&&n[t[o-1].end]}interpolate(t,n){const o=this.options,s=t[n],i=this.points,r=Om(this,{property:n,start:s,end:s});if(!r.length)return;const a=[],l=jL(o);let c,u;for(c=0,u=r.length;c<u;++c){const{start:d,end:f}=r[c],p=i[d],g=i[f];if(p===g){a.push(p);continue}const h=Math.abs((s-p[n])/(g[n]-p[n])),v=l(p,g,h,o.stepped);v[n]=t[n],a.push(v)}return a.length===1?a[0]:a}pathSegment(t,n,o){return Ul(this)(t,this,n,o)}path(t,n,o){const s=this.segments,i=Ul(this);let r=this._loop;n=n||0,o=o||this.points.length-n;for(const a of s)r&=i(t,this,a,{start:n,end:n+o-1});return!!r}draw(t,n,o,s){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(t.save(),YL(t,this,o,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ae(xo,"id","line"),ae(xo,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ae(xo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ae(xo,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Wf(e,t,n,o){const s=e.options,{[n]:i}=e.getProps([n],o);return Math.abs(t-i)<s.radius+s.hitRadius}class Yr extends xn{constructor(n){super();ae(this,"parsed");ae(this,"skip");ae(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,o,s){const i=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(n-r,2)+Math.pow(o-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(n,o){return Wf(this,n,"x",o)}inYRange(n,o){return Wf(this,n,"y",o)}getCenterPoint(n){const{x:o,y:s}=this.getProps(["x","y"],n);return{x:o,y:s}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const s=o&&n.borderWidth||0;return(o+s)*2}draw(n,o){const s=this.options;this.skip||s.radius<.1||!to(this,o,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,Hl(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ae(Yr,"id","point"),ae(Yr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ae(Yr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Km(e,t){const{x:n,y:o,base:s,width:i,height:r}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=r/2,a=Math.min(n,s),l=Math.max(n,s),c=o-d,u=o+d):(d=i/2,a=n-d,l=n+d,c=Math.min(o,s),u=Math.max(o,s)),{left:a,top:c,right:l,bottom:u}}function So(e,t,n,o){return e?0:vt(t,n,o)}function GL(e,t,n){const o=e.options.borderWidth,s=e.borderSkipped,i=bm(o);return{t:So(s.top,i.top,0,n),r:So(s.right,i.right,0,t),b:So(s.bottom,i.bottom,0,n),l:So(s.left,i.left,0,t)}}function XL(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=ns(s),r=Math.min(t,n),a=e.borderSkipped,l=o||Fe(s);return{topLeft:So(!l||a.top||a.left,i.topLeft,0,r),topRight:So(!l||a.top||a.right,i.topRight,0,r),bottomLeft:So(!l||a.bottom||a.left,i.bottomLeft,0,r),bottomRight:So(!l||a.bottom||a.right,i.bottomRight,0,r)}}function QL(e){const t=Km(e),n=t.right-t.left,o=t.bottom-t.top,s=GL(e,n/2,o/2),i=XL(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:i},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:o-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function el(e,t,n,o){const s=t===null,i=n===null,a=e&&!(s&&i)&&Km(e,o);return a&&(s||Zn(t,a.left,a.right))&&(i||Zn(n,a.top,a.bottom))}function JL(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function ZL(e,t){e.rect(t.x,t.y,t.w,t.h)}function tl(e,t,n={}){const o=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-o,r=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+o,y:e.y+s,w:e.w+i,h:e.h+r,radius:e.radius}}class Gr extends xn{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:o,backgroundColor:s}}=this,{inner:i,outer:r}=QL(this),a=JL(r.radius)?Vi:ZL;t.save(),(r.w!==i.w||r.h!==i.h)&&(t.beginPath(),a(t,tl(r,n,i)),t.clip(),a(t,tl(i,-n,r)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),a(t,tl(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,o){return el(this,t,n,o)}inXRange(t,n){return el(this,t,null,n)}inYRange(t,n){return el(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+s)/2:n,y:i?o:(o+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ae(Gr,"id","bar"),ae(Gr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ae(Gr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var e$=Object.freeze({__proto__:null,ArcElement:ui,BarElement:Gr,LineElement:xo,PointElement:Yr});const ql=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],jf=ql.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Um(e){return ql[e%ql.length]}function qm(e){return jf[e%jf.length]}function t$(e,t){return e.borderColor=Um(t),e.backgroundColor=qm(t),++t}function n$(e,t){return e.backgroundColor=e.data.map(()=>Um(t++)),t}function o$(e,t){return e.backgroundColor=e.data.map(()=>qm(t++)),t}function s$(e){let t=0;return(n,o)=>{const s=e.getDatasetMeta(o).controller;s instanceof Jo?t=n$(n,t):s instanceof Ci?t=o$(n,t):s&&(t=t$(n,t))}}function Kf(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function i$(e){return e&&(e.borderColor||e.backgroundColor)}var r$={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:o},options:s}=e.config,{elements:i}=s;if(!n.forceOverride&&(Kf(o)||i$(s)||i&&Kf(i)))return;const r=s$(e);o.forEach(r)}};function a$(e,t,n,o,s){const i=s.samples||o;if(i>=n)return e.slice(t,t+n);const r=[],a=(n-2)/(i-2);let l=0;const c=t+n-1;let u=t,d,f,p,g,h;for(r[l++]=e[u],d=0;d<i-2;d++){let v=0,m=0,y;const w=Math.floor((d+1)*a)+1+t,_=Math.min(Math.floor((d+2)*a)+1,n)+t,x=_-w;for(y=w;y<_;y++)v+=e[y].x,m+=e[y].y;v/=x,m/=x;const S=Math.floor(d*a)+1+t,C=Math.min(Math.floor((d+1)*a)+1,n)+t,{x:k,y:T}=e[u];for(p=g=-1,y=S;y<C;y++)g=.5*Math.abs((k-v)*(e[y].y-T)-(k-e[y].x)*(m-T)),g>p&&(p=g,f=e[y],h=y);r[l++]=f,u=h}return r[l++]=e[c],r}function l$(e,t,n,o){let s=0,i=0,r,a,l,c,u,d,f,p,g,h;const v=[],m=t+n-1,y=e[t].x,_=e[m].x-y;for(r=t;r<t+n;++r){a=e[r],l=(a.x-y)/_*o,c=a.y;const x=l|0;if(x===u)c<g?(g=c,d=r):c>h&&(h=c,f=r),s=(i*s+a.x)/++i;else{const S=r-1;if(!ze(d)&&!ze(f)){const C=Math.min(d,f),k=Math.max(d,f);C!==p&&C!==S&&v.push({...e[C],x:s}),k!==p&&k!==S&&v.push({...e[k],x:s})}r>0&&S!==p&&v.push(e[S]),v.push(a),u=x,i=0,g=h=c,d=f=p=r}}return v}function Ym(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Uf(e){e.data.datasets.forEach(t=>{Ym(t)})}function c$(e,t){const n=t.length;let o=0,s;const{iScale:i}=e,{min:r,max:a,minDefined:l,maxDefined:c}=i.getUserBounds();return l&&(o=vt(eo(t,i.axis,r).lo,0,n-1)),c?s=vt(eo(t,i.axis,a).hi+1,o,n)-o:s=n-o,{start:o,count:s}}var u$={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Uf(e);return}const o=e.width;e.data.datasets.forEach((s,i)=>{const{_data:r,indexAxis:a}=s,l=e.getDatasetMeta(i),c=r||s.data;if(li([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=c$(l,c);const p=n.threshold||4*o;if(f<=p){Ym(s);return}ze(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(h){this._data=h}}));let g;switch(n.algorithm){case"lttb":g=a$(c,d,f,o,n);break;case"min-max":g=l$(c,d,f,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=g})},destroy(e){Uf(e)}};function d$(e,t,n){const o=e.segments,s=e.points,i=t.points,r=[];for(const a of o){let{start:l,end:c}=a;c=uu(l,c,s);const u=Yl(n,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=Om(t,u);for(const f of d){const p=Yl(n,i[f.start],i[f.end],f.loop),g=Tm(a,s,p);for(const h of g)r.push({source:h,target:f,start:{[n]:qf(u,p,"start",Math.max)},end:{[n]:qf(u,p,"end",Math.min)}})}}return r}function Yl(e,t,n,o){if(o)return;let s=t[e],i=n[e];return e==="angle"&&(s=Gt(s),i=Gt(i)),{property:e,start:s,end:i}}function f$(e,t){const{x:n=null,y:o=null}=e||{},s=t.points,i=[];return t.segments.forEach(({start:r,end:a})=>{a=uu(r,a,s);const l=s[r],c=s[a];o!==null?(i.push({x:l.x,y:o}),i.push({x:c.x,y:o})):n!==null&&(i.push({x:n,y:l.y}),i.push({x:n,y:c.y}))}),i}function uu(e,t,n){for(;t>e;t--){const o=n[t];if(!isNaN(o.x)&&!isNaN(o.y))break}return t}function qf(e,t,n,o){return e&&t?o(e[n],t[n]):e?e[n]:t?t[n]:0}function Gm(e,t){let n=[],o=!1;return tt(e)?(o=!0,n=e):n=f$(e,t),n.length?new xo({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Yf(e){return e&&e.fill!==!1}function h$(e,t,n){let s=e[t].fill;const i=[t];let r;if(!n)return s;for(;s!==!1&&i.indexOf(s)===-1;){if(!lt(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;i.push(s),s=r.fill}return!1}function p$(e,t,n){const o=b$(e);if(Fe(o))return isNaN(o.value)?!1:o;let s=parseFloat(o);return lt(s)&&Math.floor(s)===s?g$(o[0],t,s,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function g$(e,t,n,o){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=o?!1:n}function m$(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Fe(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function v$(e,t,n){let o;return e==="start"?o=n:e==="end"?o=t.options.reverse?t.min:t.max:Fe(e)?o=e.value:o=t.getBaseValue(),o}function b$(e){const t=e.options,n=t.fill;let o=Ae(n&&n.target,n);return o===void 0&&(o=!!t.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function y$(e){const{scale:t,index:n,line:o}=e,s=[],i=o.segments,r=o.points,a=_$(t,n);a.push(Gm({x:null,y:t.bottom},o));for(let l=0;l<i.length;l++){const c=i[l];for(let u=c.start;u<=c.end;u++)w$(s,r[u],a)}return new xo({points:s,options:{}})}function _$(e,t){const n=[],o=e.getMatchingVisibleMetas("line");for(let s=0;s<o.length;s++){const i=o[s];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}function w$(e,t,n){const o=[];for(let s=0;s<n.length;s++){const i=n[s],{first:r,last:a,point:l}=x$(i,t,"x");if(!(!l||r&&a)){if(r)o.unshift(l);else if(e.push(l),!a)break}}e.push(...o)}function x$(e,t,n){const o=e.interpolate(t,n);if(!o)return{};const s=o[n],i=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<i.length;c++){const u=i[c],d=r[u.start][n],f=r[u.end][n];if(Zn(s,d,f)){a=s===d,l=s===f;break}}return{first:a,last:l,point:o}}class Xm{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,o){const{x:s,y:i,radius:r}=this;return n=n||{start:0,end:nt},t.arc(s,i,r,n.end,n.start,!0),!o.bounds}interpolate(t){const{x:n,y:o,radius:s}=this,i=t.angle;return{x:n+Math.cos(i)*s,y:o+Math.sin(i)*s,angle:i}}}function S$(e){const{chart:t,fill:n,line:o}=e;if(lt(n))return C$(t,n);if(n==="stack")return y$(e);if(n==="shape")return!0;const s=k$(e);return s instanceof Xm?s:Gm(s,o)}function C$(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function k$(e){return(e.scale||{}).getPointPositionForValue?M$(e):E$(e)}function E$(e){const{scale:t={},fill:n}=e,o=m$(n,t);if(lt(o)){const s=t.isHorizontal();return{x:s?o:null,y:s?null:o}}return null}function M$(e){const{scale:t,fill:n}=e,o=t.options,s=t.getLabels().length,i=o.reverse?t.max:t.min,r=v$(n,t,i),a=[];if(o.grid.circular){const l=t.getPointPositionForValue(0,i);return new Xm({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function nl(e,t,n){const o=S$(t),{line:s,scale:i,axis:r}=t,a=s.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};o&&s.points.length&&(Ea(e,n),P$(e,{line:s,target:o,above:u,below:d,area:n,scale:i,axis:r}),Ma(e))}function P$(e,t){const{line:n,target:o,above:s,below:i,area:r,scale:a}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&i!==s&&(Gf(e,o,r.top),Xf(e,{line:n,target:o,color:s,scale:a,property:l}),e.restore(),e.save(),Gf(e,o,r.bottom)),Xf(e,{line:n,target:o,color:i,scale:a,property:l}),e.restore()}function Gf(e,t,n){const{segments:o,points:s}=t;let i=!0,r=!1;e.beginPath();for(const a of o){const{start:l,end:c}=a,u=s[l],d=s[uu(l,c,s)];i?(e.moveTo(u.x,u.y),i=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Xf(e,t){const{line:n,target:o,property:s,color:i,scale:r}=t,a=d$(n,o,s);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:f=i}={}}=l,p=o!==!0;e.save(),e.fillStyle=f,T$(e,r,p&&Yl(s,u,d)),e.beginPath();const g=!!n.pathSegment(e,l);let h;if(p){g?e.closePath():Qf(e,o,d,s);const v=!!o.pathSegment(e,c,{move:g,reverse:!0});h=g&&v,h||Qf(e,o,u,s)}e.closePath(),e.fill(h?"evenodd":"nonzero"),e.restore()}}function T$(e,t,n){const{top:o,bottom:s}=t.chart.chartArea,{property:i,start:r,end:a}=n||{};i==="x"&&(e.beginPath(),e.rect(r,o,a-r,s-o),e.clip())}function Qf(e,t,n,o){const s=t.interpolate(n,o);s&&e.lineTo(s.x,s.y)}var O$={id:"filler",afterDatasetsUpdate(e,t,n){const o=(e.data.datasets||[]).length,s=[];let i,r,a,l;for(r=0;r<o;++r)i=e.getDatasetMeta(r),a=i.dataset,l=null,a&&a.options&&a instanceof xo&&(l={visible:e.isDatasetVisible(r),index:r,fill:p$(a,r,o),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:a}),i.$filler=l,s.push(l);for(r=0;r<o;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=h$(s,r,n.propagate))},beforeDraw(e,t,n){const o=n.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;!a||(a.line.updateControlPoints(i,a.axis),o&&a.fill&&nl(e.ctx,a,i))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=e.getSortedVisibleDatasetMetas();for(let s=o.length-1;s>=0;--s){const i=o[s].$filler;Yf(i)&&nl(e.ctx,i,e.chartArea)}},beforeDatasetDraw(e,t,n){const o=t.meta.$filler;!Yf(o)||n.drawTime!=="beforeDatasetDraw"||nl(e.ctx,o,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Jf=(e,t)=>{let{boxHeight:n=t,boxWidth:o=t}=e;return e.usePointStyle&&(n=Math.min(n,t),o=e.pointStyleWidth||Math.min(o,t)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(t,n)}},A$=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Zf extends xn{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,o){this.maxWidth=t,this.maxHeight=n,this._margins=o,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=Qe(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(o=>t.filter(o,this.chart.data))),t.sort&&(n=n.sort((o,s)=>t.sort(o,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 o=t.labels,s=ht(o.font),i=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Jf(o,i);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,i,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,o,s){const{ctx:i,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((g,h)=>{const v=o+n/2+i.measureText(g.text).width;(h===0||c[c.length-1]+v+2*a>r)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(t,n,o,s){const{ctx:i,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let d=a,f=0,p=0,g=0,h=0;return this.legendItems.forEach((v,m)=>{const{itemWidth:y,itemHeight:w}=R$(o,n,i,v,s);m>0&&p+w+2*a>u&&(d+=f+a,c.push({width:f,height:p}),g+=f+a,h++,f=p=0),l[m]={left:g,top:p,col:h,width:y,height:w},f=Math.max(f,y),p+=w+a}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:s},rtl:i}}=this,r=Ss(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=Ct(o,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Ct(o,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=Ct(o,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Ct(o,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;Ea(t,this),this._draw(),Ma(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:o,ctx:s}=this,{align:i,labels:r}=t,a=ct.color,l=Ss(t.rtl,this.left,this.width),c=ht(r.font),{padding:u}=r,d=c.size,f=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:g,boxHeight:h,itemHeight:v}=Jf(r,d),m=function(S,C,k){if(isNaN(g)||g<=0||isNaN(h)||h<0)return;s.save();const T=Ae(k.lineWidth,1);if(s.fillStyle=Ae(k.fillStyle,a),s.lineCap=Ae(k.lineCap,"butt"),s.lineDashOffset=Ae(k.lineDashOffset,0),s.lineJoin=Ae(k.lineJoin,"miter"),s.lineWidth=T,s.strokeStyle=Ae(k.strokeStyle,a),s.setLineDash(Ae(k.lineDash,[])),r.usePointStyle){const B={radius:h*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:T},$=l.xPlus(S,g/2),D=C+f;vm(s,B,$,D,r.pointStyleWidth&&g)}else{const B=C+Math.max((d-h)/2,0),$=l.leftForLtr(S,g),D=ns(k.borderRadius);s.beginPath(),Object.values(D).some(W=>W!==0)?Vi(s,{x:$,y:B,w:g,h,radius:D}):s.rect($,B,g,h),s.fill(),T!==0&&s.stroke()}s.restore()},y=function(S,C,k){us(s,k.text,S,C+v/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},w=this.isHorizontal(),_=this._computeTitleHeight();w?p={x:Ct(i,this.left+u,this.right-o[0]),y:this.top+u+_,line:0}:p={x:this.left+u,y:Ct(i,this.top+_+u,this.bottom-n[0].height),line:0},Em(this.ctx,t.textDirection);const x=v+u;this.legendItems.forEach((S,C)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const k=s.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),B=g+f+k;let $=p.x,D=p.y;l.setWidth(this.width),w?C>0&&$+B+u>this.right&&(D=p.y+=x,p.line++,$=p.x=Ct(i,this.left+u,this.right-o[p.line])):C>0&&D+x>this.bottom&&($=p.x=$+n[p.line].width+u,p.line++,D=p.y=Ct(i,this.top+_+u,this.bottom-n[p.line].height));const W=l.x($);if(m(W,D,S),$=ZA(T,$+g+f,w?$+B:this.right,t.rtl),y(l.x($),D,S),w)p.x+=B+u;else if(typeof S.text!="string"){const ne=c.lineHeight;p.y+=Qm(S,ne)+u}else p.y+=x}),Mm(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,o=ht(n.font),s=Mt(n.padding);if(!n.display)return;const i=Ss(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=o.size/2,c=s.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=Ct(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((h,v)=>Math.max(h,v.height),0);u=c+Ct(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const p=Ct(a,d,d+f);r.textAlign=i.textAlign(nu(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=o.string,us(r,n.text,p,u,o)}_computeTitleHeight(){const t=this.options.title,n=ht(t.font),o=Mt(t.padding);return t.display?n.lineHeight+o.height:0}_getLegendItemAt(t,n){let o,s,i;if(Zn(t,this.left,this.right)&&Zn(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(s=i[o],Zn(t,s.left,s.left+s.width)&&Zn(n,s.top,s.top+s.height))return this.legendItems[o]}return null}handleEvent(t){const n=this.options;if(!I$(t.type,n))return;const o=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=A$(s,o);s&&!i&&Qe(n.onLeave,[t,s,this],this),this._hoveredItem=o,o&&!i&&Qe(n.onHover,[t,o,this],this)}else o&&Qe(n.onClick,[t,o,this],this)}}function R$(e,t,n,o,s){const i=L$(o,e,t,n),r=$$(s,o,t.lineHeight);return{itemWidth:i,itemHeight:r}}function L$(e,t,n,o){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,r)=>i.length>r.length?i:r)),t+n.size/2+o.measureText(s).width}function $$(e,t,n){let o=e;return typeof t.text!="string"&&(o=Qm(t,n)),o}function Qm(e,t){const n=e.text?e.text.length:0;return t*n}function I$(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var F$={id:"legend",_element:Zf,start(e,t,n){const o=e.legend=new Zf({ctx:e.ctx,options:n,chart:e});kt.configure(e,o,n),kt.addBox(e,o)},stop(e){kt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const o=e.legend;kt.configure(e,o,n),o.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 o=t.datasetIndex,s=n.chart;s.isDatasetVisible(o)?(s.hide(o),t.hidden=!0):(s.show(o),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:o,textAlign:s,color:i,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Mt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||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 du extends xn{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 o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=tt(o.text)?o.text.length:1;this._padding=Mt(o.padding);const i=s*ht(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:o,bottom:s,right:i,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ct(a,o,i),d=n+t,c=i-o):(r.position==="left"?(u=o+t,d=Ct(a,s,n),l=it*-.5):(u=i-t,d=Ct(a,n,s),l=it*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const o=ht(n.font),i=o.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(i);us(t,n.text,0,0,o,{color:n.color,maxWidth:l,rotation:c,textAlign:nu(n.align),textBaseline:"middle",translation:[r,a]})}}function D$(e,t){const n=new du({ctx:e.ctx,options:t,chart:e});kt.configure(e,n,t),kt.addBox(e,n),e.titleBlock=n}var B$={id:"title",_element:du,start(e,t,n){D$(e,n)},stop(e){const t=e.titleBlock;kt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const o=e.titleBlock;kt.configure(e,o,n),o.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 Mr=new WeakMap;var N$={id:"subtitle",start(e,t,n){const o=new du({ctx:e.ctx,options:n,chart:e});kt.configure(e,o,n),kt.addBox(e,o),Mr.set(e,o)},stop(e){kt.removeBox(e,Mr.get(e)),Mr.delete(e)},beforeUpdate(e,t,n){const o=Mr.get(e);kt.configure(e,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const di={average(e){if(!e.length)return!1;let t,n,o=0,s=0,i=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const a=r.tooltipPosition();o+=a.x,s+=a.y,++i}}return{x:o/i,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,s=Number.POSITIVE_INFINITY,i,r,a;for(i=0,r=e.length;i<r;++i){const l=e[i].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=zl(t,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Pn(e,t){return t&&(tt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Gn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
     54 */class Z2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,s){const i=n.listeners[s],r=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=fm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,s)=>{if(!o.running||!o.items.length)return;const i=o.items;let r=i.length-1,a=!1,l;for(;r>=0;--r)l=i[r],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),a=!0):(i[r]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,o,t,"progress")),i.length||(o.running=!1,this._notify(s,o,t,"complete"),o.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}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((o,s)=>Math.max(o,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 o=n.items;let s=o.length-1;for(;s>=0;--s)o[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Yn=new Z2;const pf="transparent",eR={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=of(e||pf),s=o.valid&&of(t||pf);return s&&s.valid?s.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class tR{constructor(t,n,o,s){const i=n[o];s=li([t.to,s,i,t.from]);const r=li([t.from,i,s]);this._active=!0,this._fn=t.fn||eR[t.type||typeof r],this._easing=xi[t.easing]||xi.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=o,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const s=this._target[this._prop],i=o-this._start,r=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=li([t.to,n,s,t.from]),this._from=li([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,s=this._prop,i=this._from,r=this._loop,a=this._to;let l;if(this._active=i!==a&&(r||n<o),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/o%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let s=0;s<o.length;s++)o[s][n]()}}class Am{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Fe(t))return;const n=Object.keys(ct.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!Fe(i))return;const r={};for(const a of n)r[a]=i[a];(tt(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!o.has(a))&&o.set(a,r)})})}_animateOptions(t,n){const o=n.options,s=oR(t,o);if(!s)return[];const i=this._createAnimations(s,o);return o.$shared&&nR(t.options.$animations,o).then(()=>{t.options=o},()=>{}),i}_createAnimations(t,n){const o=this._properties,s=[],i=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 u=n[c];let d=i[c];const f=o.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}i[c]=d=new tR(f,t,c,u),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Yn.add(this._chart,o),!0}}function nR(e,t){const n=[],o=Object.keys(t);for(let s=0;s<o.length;s++){const i=e[o[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function oR(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 gf(e,t){const n=e&&e.options||{},o=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:o?i:s,end:o?s:i}}function sR(e,t,n){if(n===!1)return!1;const o=gf(e,n),s=gf(t,n);return{top:s.end,right:o.end,bottom:s.start,left:o.start}}function iR(e){let t,n,o,s;return Fe(e)?(t=e.top,n=e.right,o=e.bottom,s=e.left):t=n=o=s=e,{top:t,right:n,bottom:o,left:s,disabled:e===!1}}function Rm(e,t){const n=[],o=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=o.length;s<i;++s)n.push(o[s].index);return n}function mf(e,t,n,o={}){const s=e.keys,i=o.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(o.all)continue;break}c=e.values[l],lt(c)&&(i||t===0||Rn(t)===Rn(c))&&(t+=c)}return t}}function rR(e){const t=Object.keys(e),n=new Array(t.length);let o,s,i;for(o=0,s=t.length;o<s;++o)i=t[o],n[o]={x:i,y:e[i]};return n}function vf(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aR(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function lR(e){const{min:t,max:n,minDefined:o,maxDefined:s}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function cR(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function bf(e,t,n,o){for(const s of t.getMatchingVisibleMetas(o).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function yf(e,t){const{chart:n,_cachedMeta:o}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:r,index:a}=o,l=i.axis,c=r.axis,u=aR(i,r,o),d=t.length;let f;for(let p=0;p<d;++p){const g=t[p],{[l]:h,[c]:v}=g,m=g._stacks||(g._stacks={});f=m[c]=cR(s,u,h),f[a]=v,f._top=bf(f,r,!0,o.type),f._bottom=bf(f,r,!1,o.type);const y=f._visualValues||(f._visualValues={});y[a]=v}}function Ya(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function uR(e,t){return Fo(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function dR(e,t,n){return Fo(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ei(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(!!o){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const Ga=e=>e==="reset"||e==="none",_f=(e,t)=>t?e:Object.assign({},e),fR=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Rm(n,!0),values:null};class _n{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=vf(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&&ei(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),s=(d,f,p,g)=>d==="x"?f:d==="r"?g:p,i=n.xAxisID=Ae(o.xAxisID,Ya(t,"x")),r=n.yAxisID=Ae(o.yAxisID,Ya(t,"y")),a=n.rAxisID=Ae(o.rAxisID,Ya(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,i,r,a),u=n.vAxisID=s(l,r,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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&&ef(this._data,this),t._stacked&&ei(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(Fe(n))this._data=rR(n);else if(o!==n){if(o){ef(o,this);const s=this._cachedMeta;ei(s),s._parsed=[]}n&&Object.isExtensible(n)&&QA(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,o=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=vf(n.vScale,n),n.stack!==o.stack&&(s=!0,ei(n),n.stack=o.stack),this._resyncElements(t),(s||i!==n._stacked)&&yf(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:s}=this,{iScale:i,_stacked:r}=o,a=i.axis;let l=t===0&&n===s.length?!0:o._sorted,c=t>0&&o._parsed[t-1],u,d,f;if(this._parsing===!1)o._parsed=s,o._sorted=!0,f=s;else{tt(s[t])?f=this.parseArrayData(o,s,t,n):Fe(s[t])?f=this.parseObjectData(o,s,t,n):f=this.parsePrimitiveData(o,s,t,n);const p=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)o._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);o._sorted=l}r&&yf(this,f)}parsePrimitiveData(t,n,o,s){const{iScale:i,vScale:r}=t,a=i.axis,l=r.axis,c=i.getLabels(),u=i===r,d=new Array(s);let f,p,g;for(f=0,p=s;f<p;++f)g=f+o,d[f]={[a]:u||i.parse(c[g],g),[l]:r.parse(n[g],g)};return d}parseArrayData(t,n,o,s){const{xScale:i,yScale:r}=t,a=new Array(s);let l,c,u,d;for(l=0,c=s;l<c;++l)u=l+o,d=n[u],a[l]={x:i.parse(d[0],u),y:r.parse(d[1],u)};return a}parseObjectData(t,n,o,s){const{xScale:i,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,d,f,p;for(u=0,d=s;u<d;++u)f=u+o,p=n[f],c[u]={x:i.parse(To(p,a),f),y:r.parse(To(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const s=this.chart,i=this._cachedMeta,r=n[t.axis],a={keys:Rm(s,!0),values:n._stacks[t.axis]._visualValues};return mf(a,r,i.index,{mode:o})}updateRangeFromParsed(t,n,o,s){const i=o[n.axis];let r=i===null?NaN:i;const a=s&&o._stacks[n.axis];s&&a&&(s.values=a,r=mf(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const o=this._cachedMeta,s=o._parsed,i=o._sorted&&t===o.iScale,r=s.length,a=this._getOtherScale(t),l=fR(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=lR(a);let f,p;function g(){p=s[f];const h=p[a.axis];return!lt(p[t.axis])||u>h||d<h}for(f=0;f<r&&!(!g()&&(this.updateRangeFromParsed(c,t,p,l),i));++f);if(i){for(f=r-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let s,i,r;for(s=0,i=n.length;s<i;++s)r=n[s][t.axis],lt(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=iR(Ae(this.options.clip,sR(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,s=o.data||[],i=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(t,i,a,l),u=a;u<a+l;++u){const d=s[u];d.hidden||(d.active&&c?r.push(d):d.draw(t,i))}for(u=0;u<r.length;++u)r[u].draw(t,i)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];i=r.$context||(r.$context=dR(this.getContext(),t,r)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=uR(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const s=n==="active",i=this._cachedDataOpts,r=t+"-"+n,a=i[r],l=this.enableOptionSharing&&Ni(o);if(a)return _f(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ct.elements[t]),g=()=>this.getContext(o,s,n),h=c.resolveNamedOptions(f,p,g,d);return h.$shared&&(h.$shared=l,i[r]=Object.freeze(_f(h,l))),h}_resolveAnimations(t,n,o){const s=this.chart,i=this._cachedDataOpts,r=`animation-${n}`,a=i[r];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,o,n))}const c=new Am(s,l&&l.animations);return l&&l._cacheable&&(i[r]=Object.freeze(c)),c}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Ga(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(o),r=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:r}}updateElement(t,n,o,s){Ga(s)?Object.assign(t,o):this._resolveAnimations(n,s).update(t,o)}updateSharedOptions(t,n,o){t&&!Ga(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,o,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"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,o=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=o.length,i=n.length,r=Math.min(i,s);r&&this.parse(0,r),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,o=!0){const s=this._cachedMeta,i=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(i),a=t;a<r;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),o&&this.updateElements(i,t,n,"reset")}updateElements(t,n,o,s){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const s=o._parsed.splice(t,n);o._stacked&&ei(o,s)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,s]=t;this[n](o,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 o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ae(_n,"defaults",{}),ae(_n,"datasetElementType",null),ae(_n,"dataElementType",null);function hR(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let s=0,i=n.length;s<i;s++)o=o.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=dm(o.sort((s,i)=>s-i))}return e._cache.$bar}function pR(e){const t=e.iScale,n=hR(t,e.type);let o=t._length,s,i,r,a;const l=()=>{r===32767||r===-32768||(Ni(a)&&(o=Math.min(o,Math.abs(r-a)||o)),a=r)};for(s=0,i=n.length;s<i;++s)r=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)r=t.getPixelForTick(s),l();return o}function gR(e,t,n,o){const s=n.barThickness;let i,r;return ze(s)?(i=t.min*n.categoryPercentage,r=n.barPercentage):(i=s*o,r=1),{chunk:i/o,ratio:r,start:t.pixels[e]-i/2}}function mR(e,t,n,o){const s=t.pixels,i=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=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-r);const c=i-(i-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/o,ratio:n.barPercentage,start:c}}function vR(e,t,n,o){const s=n.parse(e[0],o),i=n.parse(e[1],o),r=Math.min(s,i),a=Math.max(s,i);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:i,min:r,max:a}}function Lm(e,t,n,o){return tt(e)?vR(e,t,n,o):t[n.axis]=n.parse(e,o),t}function wf(e,t,n,o){const s=e.iScale,i=e.vScale,r=s.getLabels(),a=s===i,l=[];let c,u,d,f;for(c=n,u=n+o;c<u;++c)f=t[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(Lm(f,d,i,c));return l}function Xa(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function bR(e,t,n){return e!==0?Rn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yR(e){let t,n,o,s,i;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:o,reverse:t,top:s,bottom:i}}function _R(e,t,n,o){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;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:u}=yR(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?s=c:(n._bottom||0)===o?s=u:(i[xf(u,r,a,l)]=!0,s=c)),i[xf(s,r,a,l)]=!0,e.borderSkipped=i}function xf(e,t,n,o){return o?(e=wR(e,t,n),e=Sf(e,n,t)):e=Sf(e,t,n),e}function wR(e,t,n){return e===t?n:e===n?t:e}function Sf(e,t,n){return e==="start"?t:e==="end"?n:e}function xR(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Vr extends _n{parsePrimitiveData(t,n,o,s){return wf(t,n,o,s)}parseArrayData(t,n,o,s){return wf(t,n,o,s)}parseObjectData(t,n,o,s){const{iScale:i,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=i.axis==="x"?a:l,u=r.axis==="x"?a:l,d=[];let f,p,g,h;for(f=o,p=o+s;f<p;++f)h=n[f],g={},g[i.axis]=i.parse(To(h,c),f),d.push(Lm(To(h,u),g,r,f));return d}updateRangeFromParsed(t,n,o,s){super.updateRangeFromParsed(t,n,o,s);const i=o._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:s}=n,i=this.getParsed(t),r=i._custom,a=Xa(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+o.getLabelForValue(i[o.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,o,s){const i=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let p=n;p<n+o;p++){const g=this.getParsed(p),h=i||ze(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,u),m=(g._stacks||{})[a.axis],y={horizontal:c,base:h.base,enableBorderRadius:!m||Xa(g._custom)||r===m._top||r===m._bottom,x:c?h.head:v.center,y:c?v.center:h.head,height:c?v.size:Math.abs(h.size),width:c?Math.abs(h.size):v.size};f&&(y.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const w=y.options||t[p].options;_R(y,w,m,r),xR(y,w,u.ratio),this.updateElement(t[p],p,y,s)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,s=o.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),i=o.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(ze(u)||isNaN(u))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((i===!1||r.indexOf(l.stack)===-1||i===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,o){const s=this._getStacks(t,o),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,s=[];let i,r;for(i=0,r=n.data.length;i<r;++i)s.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const a=t.barThickness;return{min:a||pR(n),pixels:s,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:s},options:{base:i,minBarLength:r}}=this,a=i||0,l=this.getParsed(t),c=l._custom,u=Xa(c);let d=l[n.axis],f=0,p=o?this.applyStack(n,l,o):d,g,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Rn(d)!==Rn(c.barEnd)&&(f=0),f+=d);const v=!ze(i)&&!u?i:f;let m=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+p):g=m,h=g-m,Math.abs(h)<r){h=bR(h,n,a)*r,d===a&&(m-=h/2);const y=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),_=Math.min(y,w),x=Math.max(y,w);m=Math.max(Math.min(m,x),_),g=m+h,o&&!u&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(m))}if(m===n.getPixelForValue(a)){const y=Rn(h)*n.getLineWidthForValue(a)/2;m+=y,h-=y}return{size:h,base:m,head:g,center:g+h/2}}_calculateBarIndexPixels(t,n){const o=n.scale,s=this.options,i=s.skipNull,r=Ae(s.maxBarThickness,1/0);let a,l;if(n.grouped){const c=i?this._getStackCount(t):n.stackCount,u=s.barThickness==="flex"?mR(t,n,s,c):gR(t,n,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(t)[o.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,o=t.data,s=o.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&o[i].draw(this._ctx)}}ae(Vr,"id","bar"),ae(Vr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ae(Vr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Hr extends _n{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,o,s){const i=super.parsePrimitiveData(t,n,o,s);for(let r=0;r<i.length;r++)i[r]._custom=this.resolveDataElementOptions(r+o).radius;return i}parseArrayData(t,n,o,s){const i=super.parseArrayData(t,n,o,s);for(let r=0;r<i.length;r++){const a=n[o+r];i[r]._custom=Ae(a[2],this.resolveDataElementOptions(r+o).radius)}return i}parseObjectData(t,n,o,s){const i=super.parseObjectData(t,n,o,s);for(let r=0;r<i.length;r++){const a=n[o+r];i[r]._custom=Ae(a&&a.r&&+a.r,this.resolveDataElementOptions(r+o).radius)}return i}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let o=t.length-1;o>=0;--o)n=Math.max(n,t[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:s,yScale:i}=n,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=i.getLabelForValue(r.y),c=r._custom;return{label:o[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,o,s){const i=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=r.axis,d=a.axis;for(let f=n;f<n+o;f++){const p=t[f],g=!i&&this.getParsed(f),h={},v=h[u]=i?r.getPixelForDecimal(.5):r.getPixelForValue(g[u]),m=h[d]=i?a.getBasePixel():a.getPixelForValue(g[d]);h.skip=isNaN(v)||isNaN(m),c&&(h.options=l||this.resolveDataElementOptions(f,p.active?"active":s),i&&(h.options.radius=0)),this.updateElement(p,f,h,s)}}resolveDataElementOptions(t,n){const o=this.getParsed(t);let s=super.resolveDataElementOptions(t,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const i=s.radius;return n!=="active"&&(s.radius=0),s.radius+=Ae(o&&o._custom,i),s}}ae(Hr,"id","bubble"),ae(Hr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ae(Hr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function SR(e,t,n){let o=1,s=1,i=0,r=0;if(t<nt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),p=(w,_,x)=>zi(w,a,l,!0)?1:Math.max(_,_*n,x,x*n),g=(w,_,x)=>zi(w,a,l,!0)?-1:Math.min(_,_*n,x,x*n),h=p(0,c,d),v=p(ut,u,f),m=g(it,c,d),y=g(it+ut,u,f);o=(h-m)/2,s=(v-y)/2,i=-(h+m)/2,r=-(v+y)/2}return{ratioX:o,ratioY:s,offsetX:i,offsetY:r}}class Jo extends _n{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 o=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=o;else{let i=l=>+o[l];if(Fe(o[t])){const{key:l="value"}=this._parsing;i=c=>+To(o[c],l)}let r,a;for(r=t,a=t+n;r<a;++r)s._parsed[r]=i(r)}}_getRotation(){return mn(this.options.rotation-90)}_getCircumference(){return mn(this.options.circumference)}_getRotationExtents(){let t=nt,n=-nt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const s=this.chart.getDatasetMeta(o).controller,i=s._getRotation(),r=s._getCircumference();t=Math.min(t,i),n=Math.max(n,i+r)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:o}=n,s=this._cachedMeta,i=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-r)/2,0),l=Math.min(DA(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:h}=SR(d,u,l),v=(o.width-r)/f,m=(o.height-r)/p,y=Math.max(Math.min(v,m)/2,0),w=rm(this.options.radius,y),_=Math.max(w*l,0),x=(w-_)/this._getVisibleDatasetWeightTotal();this.offsetX=g*w,this.offsetY=h*w,s.total=this.calculateTotal(),this.outerRadius=w-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(i,0,i.length,t)}_circumference(t,n){const o=this.options,s=this._cachedMeta,i=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*i/nt)}updateElements(t,n,o,s){const i=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=i&&c.animateScale,p=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:h,includeOptions:v}=this._getSharedOptions(n,s);let m=this._getRotation(),y;for(y=0;y<n;++y)m+=this._circumference(y,i);for(y=n;y<n+o;++y){const w=this._circumference(y,i),_=t[y],x={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+w,circumference:w,outerRadius:g,innerRadius:p};v&&(x.options=h||this.resolveDataElementOptions(y,_.active?"active":s)),m+=w,this.updateElement(_,y,x,s)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let o=0,s;for(s=0;s<n.length;s++){const i=t._parsed[s];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,s=o.data.labels||[],i=or(n._parsed[t],o.options.locale);return{label:s[t]||"",value:i}}getMaxBorderWidth(t){let n=0;const o=this.chart;let s,i,r,a,l;if(!t){for(s=0,i=o.data.datasets.length;s<i;++s)if(o.isDatasetVisible(s)){r=o.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,i=t.length;s<i;++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 o=0,s=t.length;o<s;++o){const i=this.resolveDataElementOptions(o);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let o=0;o<t;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(t){return Math.max(Ae(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ae(Jo,"id","doughnut"),ae(Jo,"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"}),ae(Jo,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),ae(Jo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:s}}=t.legend.options;return n.labels.map((i,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:o,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class Wr extends _n{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:o,data:s=[],_dataset:i}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=pm(n,s,r);this._drawStart=a,this._drawCount=l,gm(n)&&(a=0,l=s.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,o,s){const i=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,s),f=r.axis,p=a.axis,{spanGaps:g,segment:h}=this.options,v=Is(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||i||s==="none",y=n+o,w=t.length;let _=n>0&&this.getParsed(n-1);for(let x=0;x<w;++x){const S=t[x],C=m?S:{};if(x<n||x>=y){C.skip=!0;continue}const k=this.getParsed(x),T=ze(k[p]),B=C[f]=r.getPixelForValue(k[f],x),$=C[p]=i||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[p],x);C.skip=isNaN(B)||isNaN($)||T,C.stop=x>0&&Math.abs(k[f]-_[f])>v,h&&(C.parsed=k,C.raw=c.data[x]),d&&(C.options=u||this.resolveDataElementOptions(x,S.active?"active":s)),m||this.updateElement(S,x,C,s),_=k}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,o=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return o;const i=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(o,i,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ae(Wr,"id","line"),ae(Wr,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ae(Wr,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ci extends _n{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,o=this.chart,s=o.data.labels||[],i=or(n._parsed[t].r,o.options.locale);return{label:s[t]||"",value:i}}parseObjectData(t,n,o,s){return Sm.bind(this)(t,n,o,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((o,s)=>{const i=this.getParsed(s).r;!isNaN(i)&&this.chart.getDataVisibility(s)&&(i<n.min&&(n.min=i),i>n.max&&(n.max=i))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,o=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(s/2,0),r=Math.max(o.cutoutPercentage?i/100*o.cutoutPercentage:1,0),a=(i-r)/t.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,o,s){const i=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*it;let p=f,g;const h=360/this.countVisibleElements();for(g=0;g<n;++g)p+=this._computeAngle(g,s,h);for(g=n;g<n+o;g++){const v=t[g];let m=p,y=p+this._computeAngle(g,s,h),w=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;p=y,i&&(l.animateScale&&(w=0),l.animateRotate&&(m=y=f));const _={x:u,y:d,innerRadius:0,outerRadius:w,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(g,v.active?"active":s)};this.updateElement(v,g,_,s)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((o,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,o){return this.chart.getDataVisibility(t)?mn(this.resolveDataElementOptions(t,n).angle||o):0}}ae(Ci,"id","polarArea"),ae(Ci,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ae(Ci,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:s}}=t.legend.options;return n.labels.map((i,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:o,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Wl extends Jo{}ae(Wl,"id","pie"),ae(Wl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class jr extends _n{getLabelAndValue(t){const n=this._cachedMeta.vScale,o=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(t,n,o,s){return Sm.bind(this)(t,n,o,s)}update(t){const n=this._cachedMeta,o=n.dataset,s=n.data||[],i=n.iScale.getLabels();if(o.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:i.length===s.length,options:r};this.updateElement(o,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,o,s){const i=this._cachedMeta.rScale,r=s==="reset";for(let a=n;a<n+o;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),u=i.getPointPositionForValue(a,this.getParsed(a).r),d=r?i.xCenter:u.x,f=r?i.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,p,s)}}}ae(jr,"id","radar"),ae(jr,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ae(jr,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class f(e)}};function d$(e,t,n){const o=e.segments,s=e.points,i=t.points,r=[];for(const a of o){let{start:l,end:c}=a;c=uu(l,c,s);const u=Yl(n,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=Om(t,u);for(const f of d){const p=Yl(n,i[f.start],i[f.end],f.loop),g=Tm(a,s,p);for(const h of g)r.push({source:h,target:f,start:{[n]:qf(u,p,"start",Math.max)},end:{[n]:qf(u,p,"end",Math.min)}})}}return r}function Yl(e,t,n,o){if(o)return;let s=t[e],i=n[e];return e==="angle"&&(s=Gt(s),i=Gt(i)),{property:e,start:s,end:i}}function f$(e,t){const{x:n=null,y:o=null}=e||{},s=t.points,i=[];return t.segments.forEach(({start:r,end:a})=>{a=uu(r,a,s);const l=s[r],c=s[a];o!==null?(i.push({x:l.x,y:o}),i.push({x:c.x,y:o})):n!==null&&(i.push({x:n,y:l.y}),i.push({x:n,y:c.y}))}),i}function uu(e,t,n){for(;t>e;t--){const o=n[t];if(!isNaN(o.x)&&!isNaN(o.y))break}return t}function qf(e,t,n,o){return e&&t?o(e[n],t[n]):e?e[n]:t?t[n]:0}function Gm(e,t){let n=[],o=!1;return tt(e)?(o=!0,n=e):n=f$(e,t),n.length?new xo({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Yf(e){return e&&e.fill!==!1}function h$(e,t,n){let s=e[t].fill;const i=[t];let r;if(!n)return s;for(;s!==!1&&i.indexOf(s)===-1;){if(!lt(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;i.push(s),s=r.fill}return!1}function p$(e,t,n){const o=b$(e);if(Fe(o))return isNaN(o.value)?!1:o;let s=parseFloat(o);return lt(s)&&Math.floor(s)===s?g$(o[0],t,s,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function g$(e,t,n,o){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=o?!1:n}function m$(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Fe(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function v$(e,t,n){let o;return e==="start"?o=n:e==="end"?o=t.options.reverse?t.min:t.max:Fe(e)?o=e.value:o=t.getBaseValue(),o}function b$(e){const t=e.options,n=t.fill;let o=Ae(n&&n.target,n);return o===void 0&&(o=!!t.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function y$(e){const{scale:t,index:n,line:o}=e,s=[],i=o.segments,r=o.points,a=_$(t,n);a.push(Gm({x:null,y:t.bottom},o));for(let l=0;l<i.length;l++){const c=i[l];for(let u=c.start;u<=c.end;u++)w$(s,r[u],a)}return new xo({points:s,options:{}})}function _$(e,t){const n=[],o=e.getMatchingVisibleMetas("line");for(let s=0;s<o.length;s++){const i=o[s];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}function w$(e,t,n){const o=[];for(let s=0;s<n.length;s++){const i=n[s],{first:r,last:a,point:l}=x$(i,t,"x");if(!(!l||r&&a)){if(r)o.unshift(l);else if(e.push(l),!a)break}}e.push(...o)}function x$(e,t,n){const o=e.interpolate(t,n);if(!o)return{};const s=o[n],i=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<i.length;c++){const u=i[c],d=r[u.start][n],f=r[u.end][n];if(Zn(s,d,f)){a=s===d,l=s===f;break}}return{first:a,last:l,point:o}}class Xm{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,o){const{x:s,y:i,radius:r}=this;return n=n||{start:0,end:nt},t.arc(s,i,r,n.end,n.start,!0),!o.bounds}interpolate(t){const{x:n,y:o,radius:s}=this,i=t.angle;return{x:n+Math.cos(i)*s,y:o+Math.sin(i)*s,angle:i}}}function S$(e){const{chart:t,fill:n,line:o}=e;if(lt(n))return C$(t,n);if(n==="stack")return y$(e);if(n==="shape")return!0;const s=k$(e);return s instanceof Xm?s:Gm(s,o)}function C$(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function k$(e){return(e.scale||{}).getPointPositionForValue?M$(e):E$(e)}function E$(e){const{scale:t={},fill:n}=e,o=m$(n,t);if(lt(o)){const s=t.isHorizontal();return{x:s?o:null,y:s?null:o}}return null}function M$(e){const{scale:t,fill:n}=e,o=t.options,s=t.getLabels().length,i=o.reverse?t.max:t.min,r=v$(n,t,i),a=[];if(o.grid.circular){const l=t.getPointPositionForValue(0,i);return new Xm({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function nl(e,t,n){const o=S$(t),{line:s,scale:i,axis:r}=t,a=s.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};o&&s.points.length&&(Ea(e,n),P$(e,{line:s,target:o,above:u,below:d,area:n,scale:i,axis:r}),Ma(e))}function P$(e,t){const{line:n,target:o,above:s,below:i,area:r,scale:a}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&i!==s&&(Gf(e,o,r.top),Xf(e,{line:n,target:o,color:s,scale:a,property:l}),e.restore(),e.save(),Gf(e,o,r.bottom)),Xf(e,{line:n,target:o,color:i,scale:a,property:l}),e.restore()}function Gf(e,t,n){const{segments:o,points:s}=t;let i=!0,r=!1;e.beginPath();for(const a of o){const{start:l,end:c}=a,u=s[l],d=s[uu(l,c,s)];i?(e.moveTo(u.x,u.y),i=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Xf(e,t){const{line:n,target:o,property:s,color:i,scale:r}=t,a=d$(n,o,s);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:f=i}={}}=l,p=o!==!0;e.save(),e.fillStyle=f,T$(e,r,p&&Yl(s,u,d)),e.beginPath();const g=!!n.pathSegment(e,l);let h;if(p){g?e.closePath():Qf(e,o,d,s);const v=!!o.pathSegment(e,c,{move:g,reverse:!0});h=g&&v,h||Qf(e,o,u,s)}e.closePath(),e.fill(h?"evenodd":"nonzero"),e.restore()}}function T$(e,t,n){const{top:o,bottom:s}=t.chart.chartArea,{property:i,start:r,end:a}=n||{};i==="x"&&(e.beginPath(),e.rect(r,o,a-r,s-o),e.clip())}function Qf(e,t,n,o){const s=t.interpolate(n,o);s&&e.lineTo(s.x,s.y)}var O$={id:"filler",afterDatasetsUpdate(e,t,n){const o=(e.data.datasets||[]).length,s=[];let i,r,a,l;for(r=0;r<o;++r)i=e.getDatasetMeta(r),a=i.dataset,l=null,a&&a.options&&a instanceof xo&&(l={visible:e.isDatasetVisible(r),index:r,fill:p$(a,r,o),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:a}),i.$filler=l,s.push(l);for(r=0;r<o;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=h$(s,r,n.propagate))},beforeDraw(e,t,n){const o=n.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;!a||(a.line.updateControlPoints(i,a.axis),o&&a.fill&&nl(e.ctx,a,i))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=e.getSortedVisibleDatasetMetas();for(let s=o.length-1;s>=0;--s){const i=o[s].$filler;Yf(i)&&nl(e.ctx,i,e.chartArea)}},beforeDatasetDraw(e,t,n){const o=t.meta.$filler;!Yf(o)||n.drawTime!=="beforeDatasetDraw"||nl(e.ctx,o,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Jf=(e,t)=>{let{boxHeight:n=t,boxWidth:o=t}=e;return e.usePointStyle&&(n=Math.min(n,t),o=e.pointStyleWidth||Math.min(o,t)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(t,n)}},A$=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Zf extends xn{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,o){this.maxWidth=t,this.maxHeight=n,this._margins=o,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=Qe(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(o=>t.filter(o,this.chart.data))),t.sort&&(n=n.sort((o,s)=>t.sort(o,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 o=t.labels,s=ht(o.font),i=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Jf(o,i);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,i,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,o,s){const{ctx:i,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((g,h)=>{const v=o+n/2+i.measureText(g.text).width;(h===0||c[c.length-1]+v+2*a>r)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(t,n,o,s){const{ctx:i,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let d=a,f=0,p=0,g=0,h=0;return this.legendItems.forEach((v,m)=>{const{itemWidth:y,itemHeight:w}=R$(o,n,i,v,s);m>0&&p+w+2*a>u&&(d+=f+a,c.push({width:f,height:p}),g+=f+a,h++,f=p=0),l[m]={left:g,top:p,col:h,width:y,height:w},f=Math.max(f,y),p+=w+a}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:s},rtl:i}}=this,r=Ss(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=Ct(o,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Ct(o,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=Ct(o,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Ct(o,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;Ea(t,this),this._draw(),Ma(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:o,ctx:s}=this,{align:i,labels:r}=t,a=ct.color,l=Ss(t.rtl,this.left,this.width),c=ht(r.font),{padding:u}=r,d=c.size,f=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:g,boxHeight:h,itemHeight:v}=Jf(r,d),m=function(S,C,k){if(isNaN(g)||g<=0||isNaN(h)||h<0)return;s.save();const T=Ae(k.lineWidth,1);if(s.fillStyle=Ae(k.fillStyle,a),s.lineCap=Ae(k.lineCap,"butt"),s.lineDashOffset=Ae(k.lineDashOffset,0),s.lineJoin=Ae(k.lineJoin,"miter"),s.lineWidth=T,s.strokeStyle=Ae(k.strokeStyle,a),s.setLineDash(Ae(k.lineDash,[])),r.usePointStyle){const B={radius:h*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:T},$=l.xPlus(S,g/2),D=C+f;vm(s,B,$,D,r.pointStyleWidth&&g)}else{const B=C+Math.max((d-h)/2,0),$=l.leftForLtr(S,g),D=ns(k.borderRadius);s.beginPath(),Object.values(D).some(W=>W!==0)?Vi(s,{x:$,y:B,w:g,h,radius:D}):s.rect($,B,g,h),s.fill(),T!==0&&s.stroke()}s.restore()},y=function(S,C,k){us(s,k.text,S,C+v/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},w=this.isHorizontal(),_=this._computeTitleHeight();w?p={x:Ct(i,this.left+u,this.right-o[0]),y:this.top+u+_,line:0}:p={x:this.left+u,y:Ct(i,this.top+_+u,this.bottom-n[0].height),line:0},Em(this.ctx,t.textDirection);const x=v+u;this.legendItems.forEach((S,C)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const k=s.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),B=g+f+k;let $=p.x,D=p.y;l.setWidth(this.width),w?C>0&&$+B+u>this.right&&(D=p.y+=x,p.line++,$=p.x=Ct(i,this.left+u,this.right-o[p.line])):C>0&&D+x>this.bottom&&($=p.x=$+n[p.line].width+u,p.line++,D=p.y=Ct(i,this.top+_+u,this.bottom-n[p.line].height));const W=l.x($);if(m(W,D,S),$=ZA(T,$+g+f,w?$+B:this.right,t.rtl),y(l.x($),D,S),w)p.x+=B+u;else if(typeof S.text!="string"){const ne=c.lineHeight;p.y+=Qm(S,ne)+u}else p.y+=x}),Mm(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,o=ht(n.font),s=Mt(n.padding);if(!n.display)return;const i=Ss(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=o.size/2,c=s.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=Ct(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((h,v)=>Math.max(h,v.height),0);u=c+Ct(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const p=Ct(a,d,d+f);r.textAlign=i.textAlign(nu(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=o.string,us(r,n.text,p,u,o)}_computeTitleHeight(){const t=this.options.title,n=ht(t.font),o=Mt(t.padding);return t.display?n.lineHeight+o.height:0}_getLegendItemAt(t,n){let o,s,i;if(Zn(t,this.left,this.right)&&Zn(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(s=i[o],Zn(t,s.left,s.left+s.width)&&Zn(n,s.top,s.top+s.height))return this.legendItems[o]}return null}handleEvent(t){const n=this.options;if(!I$(t.type,n))return;const o=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=A$(s,o);s&&!i&&Qe(n.onLeave,[t,s,this],this),this._hoveredItem=o,o&&!i&&Qe(n.onHover,[t,o,this],this)}else o&&Qe(n.onClick,[t,o,this],this)}}function R$(e,t,n,o,s){const i=L$(o,e,t,n),r=$$(s,o,t.lineHeight);return{itemWidth:i,itemHeight:r}}function L$(e,t,n,o){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,r)=>i.length>r.length?i:r)),t+n.size/2+o.measureText(s).width}function $$(e,t,n){let o=e;return typeof t.text!="string"&&(o=Qm(t,n)),o}function Qm(e,t){const n=e.text?e.text.length:0;return t*n}function I$(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var F$={id:"legend",_element:Zf,start(e,t,n){const o=e.legend=new Zf({ctx:e.ctx,options:n,chart:e});kt.configure(e,o,n),kt.addBox(e,o)},stop(e){kt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const o=e.legend;kt.configure(e,o,n),o.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 o=t.datasetIndex,s=n.chart;s.isDatasetVisible(o)?(s.hide(o),t.hidden=!0):(s.show(o),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:o,textAlign:s,color:i,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Mt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||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 du extends xn{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 o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=tt(o.text)?o.text.length:1;this._padding=Mt(o.padding);const i=s*ht(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:o,bottom:s,right:i,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ct(a,o,i),d=n+t,c=i-o):(r.position==="left"?(u=o+t,d=Ct(a,s,n),l=it*-.5):(u=i-t,d=Ct(a,n,s),l=it*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const o=ht(n.font),i=o.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(i);us(t,n.text,0,0,o,{color:n.color,maxWidth:l,rotation:c,textAlign:nu(n.align),textBaseline:"middle",translation:[r,a]})}}function D$(e,t){const n=new du({ctx:e.ctx,options:t,chart:e});kt.configure(e,n,t),kt.addBox(e,n),e.titleBlock=n}var B$={id:"title",_element:du,start(e,t,n){D$(e,n)},stop(e){const t=e.titleBlock;kt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const o=e.titleBlock;kt.configure(e,o,n),o.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 Mr=new WeakMap;var N$={id:"subtitle",start(e,t,n){const o=new du({ctx:e.ctx,options:n,chart:e});kt.configure(e,o,n),kt.addBox(e,o),Mr.set(e,o)},stop(e){kt.removeBox(e,Mr.get(e)),Mr.delete(e)},beforeUpdate(e,t,n){const o=Mr.get(e);kt.configure(e,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const di={average(e){if(!e.length)return!1;let t,n,o=0,s=0,i=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const a=r.tooltipPosition();o+=a.x,s+=a.y,++i}}return{x:o/i,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,s=Number.POSITIVE_INFINITY,i,r,a;for(i=0,r=e.length;i<r;++i){const l=e[i].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=zl(t,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Pn(e,t){return t&&(tt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Gn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
    5555`)>-1?e.split(`
    56 `):e}function z$(e,t){const{element:n,datasetIndex:o,index:s}=t,i=e.getDatasetMeta(o).controller,{label:r,value:a}=i.getLabelAndValue(s);return{chart:e,label:r,parsed:i.getParsed(s),raw:e.data.datasets[o].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:o,element:n}}function eh(e,t){const n=e.chart.ctx,{body:o,footer:s,title:i}=e,{boxWidth:r,boxHeight:a}=t,l=ht(t.bodyFont),c=ht(t.titleFont),u=ht(t.footerFont),d=i.length,f=s.length,p=o.length,g=Mt(t.padding);let h=g.height,v=0,m=o.reduce((_,x)=>_+x.before.length+x.lines.length+x.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;h+=p*_+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let y=0;const w=function(_){v=Math.max(v,n.measureText(_).width+y)};return n.save(),n.font=c.string,Ke(e.title,w),n.font=l.string,Ke(e.beforeBody.concat(e.afterBody),w),y=t.displayColors?r+2+t.boxPadding:0,Ke(o,_=>{Ke(_.before,w),Ke(_.lines,w),Ke(_.after,w)}),y=0,n.font=u.string,Ke(e.footer,w),n.restore(),v+=g.width,{width:v,height:h}}function V$(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function H$(e,t,n,o){const{x:s,width:i}=o,r=n.caretSize+n.caretPadding;if(e==="left"&&s+i+r>t.width||e==="right"&&s-i-r<0)return!0}function W$(e,t,n,o){const{x:s,width:i}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return o==="center"?c=s<=(a+l)/2?"left":"right":s<=i/2?c="left":s>=r-i/2&&(c="right"),H$(c,e,t,n)&&(c="center"),c}function th(e,t,n){const o=n.yAlign||t.yAlign||V$(e,n);return{xAlign:n.xAlign||t.xAlign||W$(e,t,n,o),yAlign:o}}function j$(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function K$(e,t,n){let{y:o,height:s}=e;return t==="top"?o+=n:t==="bottom"?o-=s+n:o-=s/2,o}function nh(e,t,n,o){const{caretSize:s,caretPadding:i,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=s+i,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=ns(r);let g=j$(t,a);const h=K$(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+s:a==="right"&&(g+=Math.max(d,p)+s),{x:vt(g,0,o.width-t.width),y:vt(h,0,o.height-t.height)}}function Pr(e,t,n){const o=Mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function oh(e){return Pn([],Gn(e))}function U$(e,t,n){return Fo(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function sh(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Jm={beforeTitle:Kn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return n[t.dataIndex]}return""},afterTitle:Kn,beforeBody:Kn,beforeLabel:Kn,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 ze(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:Kn,afterBody:Kn,beforeFooter:Kn,footer:Kn,afterFooter:Kn};function It(e,t,n,o){const s=e[t].call(n,o);return typeof s>"u"?Jm[t].call(n,o):s}class Gl extends xn{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,o=this.options.setContext(this.getContext()),s=o.enabled&&n.options.animation&&o.animations,i=new Am(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=U$(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,s=It(o,"beforeTitle",this,t),i=It(o,"title",this,t),r=It(o,"afterTitle",this,t);let a=[];return a=Pn(a,Gn(s)),a=Pn(a,Gn(i)),a=Pn(a,Gn(r)),a}getBeforeBody(t,n){return oh(It(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,s=[];return Ke(t,i=>{const r={before:[],lines:[],after:[]},a=sh(o,i);Pn(r.before,Gn(It(a,"beforeLabel",this,i))),Pn(r.lines,It(a,"label",this,i)),Pn(r.after,Gn(It(a,"afterLabel",this,i))),s.push(r)}),s}getAfterBody(t,n){return oh(It(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,s=It(o,"beforeFooter",this,t),i=It(o,"footer",this,t),r=It(o,"afterFooter",this,t);let a=[];return a=Pn(a,Gn(s)),a=Pn(a,Gn(i)),a=Pn(a,Gn(r)),a}_createItems(t){const n=this._active,o=this.chart.data,s=[],i=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(z$(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,o))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,o))),Ke(a,u=>{const d=sh(t.callbacks,u);s.push(It(d,"labelColor",this,u)),i.push(It(d,"labelPointStyle",this,u)),r.push(It(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=r,this.dataPoints=a,a}update(t,n){const o=this.options.setContext(this.getContext()),s=this._active;let i,r=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=di[o.position].call(this,s,this._eventPosition);r=this._createItems(o),this.title=this.getTitle(r,o),this.beforeBody=this.getBeforeBody(r,o),this.body=this.getBody(r,o),this.afterBody=this.getAfterBody(r,o),this.footer=this.getFooter(r,o);const l=this._size=eh(this,o),c=Object.assign({},a,l),u=th(this.chart,o,c),d=nh(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,s){const i=this.getCaretPosition(t,o,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,o){const{xAlign:s,yAlign:i}=this,{caretSize:r,cornerRadius:a}=o,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ns(a),{x:f,y:p}=t,{width:g,height:h}=n;let v,m,y,w,_,x;return i==="center"?(_=p+h/2,s==="left"?(v=f,m=v-r,w=_+r,x=_-r):(v=f+g,m=v+r,w=_-r,x=_+r),y=v):(s==="left"?m=f+Math.max(l,u)+r:s==="right"?m=f+g-Math.max(c,d)-r:m=this.caretX,i==="top"?(w=p,_=w-r,v=m-r,y=m+r):(w=p+h,_=w+r,v=m+r,y=m-r),x=w),{x1:v,x2:m,x3:y,y1:w,y2:_,y3:x}}drawTitle(t,n,o){const s=this.title,i=s.length;let r,a,l;if(i){const c=Ss(o.rtl,this.x,this.width);for(t.x=Pr(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",r=ht(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=r.string,l=0;l<i;++l)n.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===i&&(t.y+=o.titleMarginBottom-a)}}_drawColorBox(t,n,o,s,i){const r=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:l,boxWidth:c}=i,u=ht(i.bodyFont),d=Pr(this,"left",i),f=s.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+p;if(i.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=s.leftForLtr(f,c)+c/2,m=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,Hl(t,h,v,m),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Hl(t,h,v,m)}else{t.lineWidth=Fe(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 h=s.leftForLtr(f,c),v=s.leftForLtr(s.xPlus(f,1),c-2),m=ns(r.borderRadius);Object.values(m).some(y=>y!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Vi(t,{x:h,y:g,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Vi(t,{x:v,y:g+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(h,g,c,l),t.strokeRect(h,g,c,l),t.fillStyle=r.backgroundColor,t.fillRect(v,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:s}=this,{bodySpacing:i,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=o,d=ht(o.bodyFont);let f=d.lineHeight,p=0;const g=Ss(o.rtl,this.x,this.width),h=function(k){n.fillText(k,g.x(t.x+p),t.y+f/2),t.y+=f+i},v=g.textAlign(r);let m,y,w,_,x,S,C;for(n.textAlign=r,n.textBaseline="middle",n.font=d.string,t.x=Pr(this,v,o),n.fillStyle=o.bodyColor,Ke(this.beforeBody,h),p=a&&v!=="right"?r==="center"?c/2+u:c+2+u:0,_=0,S=s.length;_<S;++_){for(m=s[_],y=this.labelTextColors[_],n.fillStyle=y,Ke(m.before,h),w=m.lines,a&&w.length&&(this._drawColorBox(n,t,_,g,o),f=Math.max(d.lineHeight,l)),x=0,C=w.length;x<C;++x)h(w[x]),f=d.lineHeight;Ke(m.after,h)}p=0,f=d.lineHeight,Ke(this.afterBody,h),t.y-=i}drawFooter(t,n,o){const s=this.footer,i=s.length;let r,a;if(i){const l=Ss(o.rtl,this.x,this.width);for(t.x=Pr(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=l.textAlign(o.footerAlign),n.textBaseline="middle",r=ht(o.footerFont),n.fillStyle=o.footerColor,n.font=r.string,a=0;a<i;++a)n.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o.footerSpacing}}drawBackground(t,n,o,s){const{xAlign:i,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=o,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:g}=ns(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),r==="top"&&this.drawCaret(t,n,o,s),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),r==="center"&&i==="right"&&this.drawCaret(t,n,o,s),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),r==="bottom"&&this.drawCaret(t,n,o,s),n.lineTo(a+p,l+u),n.quadraticCurveTo(a,l+u,a,l+u-p),r==="center"&&i==="left"&&this.drawCaret(t,n,o,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,s=o&&o.x,i=o&&o.y;if(s||i){const r=di[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=eh(this,t),l=Object.assign({},r,this._size),c=th(n,t,l),u=nh(t,l,c,n);(s._to!==u.x||i._to!==u.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,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;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=o,this.drawBackground(i,t,s,n),Em(t,n.textDirection),i.y+=r.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),Mm(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const o=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}}),i=!ra(o,s),r=this._positionChanged(s,n);(i||r)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],r=this._getActiveElements(t,i,n,o),a=this._positionChanged(r,t),l=n||!ra(r,i)||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,o,s){const i=this.options;if(t.type==="mouseout")return[];if(!s)return n;const r=this.chart.getElementsAtEventForMode(t,i.mode,i,o);return i.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:o,caretY:s,options:i}=this,r=di[i.position].call(this,t,n);return r!==!1&&(o!==r.x||s!==r.y)}}ae(Gl,"positioners",di);var q$={id:"tooltip",_element:Gl,positioners:di,afterInit(e,t,n){n&&(e.tooltip=new Gl({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:Jm},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"]},Y$=Object.freeze({__proto__:null,Colors:r$,Decimation:u$,Filler:O$,Legend:F$,SubTitle:N$,Title:B$,Tooltip:q$});const G$=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function X$(e,t,n,o){const s=e.indexOf(t);if(s===-1)return G$(e,t,n,o);const i=e.lastIndexOf(t);return s!==i?n:s}const Q$=(e,t)=>e===null?null:vt(Math.round(e),0,t);function ih(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Xl extends hs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:s,label:i}of n)o[s]===i&&o.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ze(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:X$(o,t,Ae(n,t),this._addedLabels),Q$(n,o.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:o,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(o=0),n||(s=this.getLabels().length-1)),this.min=o,this.max=s}buildTicks(){const t=this.min,n=this.max,o=this.options.offset,s=[];let i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let r=t;r<=n;r++)s.push({value:r});return s}getLabelForValue(t){return ih.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}}ae(Xl,"id","category"),ae(Xl,"defaults",{ticks:{callback:ih}});function J$(e,t){const n=[],{bounds:s,step:i,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=i||1,g=u-1,{min:h,max:v}=t,m=!ze(r),y=!ze(a),w=!ze(c),_=(v-h)/(d+1);let x=Jd((v-h)/g/p)*p,S,C,k,T;if(x<1e-14&&!m&&!y)return[{value:h},{value:v}];T=Math.ceil(v/x)-Math.floor(h/x),T>g&&(x=Jd(T*x/g/p)*p),ze(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),s==="ticks"?(C=Math.floor(h/x)*x,k=Math.ceil(v/x)*x):(C=h,k=v),m&&y&&i&&UA((a-r)/i,x/1e3)?(T=Math.round(Math.min((a-r)/x,u)),x=(a-r)/T,C=r,k=a):w?(C=m?r:C,k=y?a:k,T=c-1,x=(k-C)/T):(T=(k-C)/x,wi(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));const B=Math.max(Zd(x),Zd(C));S=Math.pow(10,ze(l)?B:l),C=Math.round(C*S)/S,k=Math.round(k*S)/S;let $=0;for(m&&(f&&C!==r?(n.push({value:r}),C<r&&$++,wi(Math.round((C+$*x)*S)/S,r,rh(r,_,e))&&$++):C<r&&$++);$<T;++$){const D=Math.round((C+$*x)*S)/S;if(y&&D>a)break;n.push({value:D})}return y&&f&&k!==a?n.length&&wi(n[n.length-1].value,a,rh(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!y||k===a)&&n.push({value:k}),n}function rh(e,t,{horizontal:n,minRotation:o}){const s=mn(o),i=(n?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/i,r)}class ha extends hs{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 ze(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:s,max:i}=this;const r=l=>s=n?s:l,a=l=>i=o?i:l;if(t){const l=Rn(s),c=Rn(i);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||r(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,s;return o?(s=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} 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 o=this.getTickLimit();o=Math.max(2,o);const s={maxTicks:o,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},i=this._range||this,r=J$(s,i);return t.bounds==="ticks"&&lm(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,o=this.max;if(super.configure(),this.options.offset&&t.length){const s=(o-n)/Math.max(t.length-1,1)/2;n-=s,o+=s}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return or(t,this.chart.options.locale,this.options.ticks.format)}}class Ql extends ha{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=lt(t)?t:0,this.max=lt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=mn(this.options.ticks.minRotation),s=(t?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.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}}ae(Ql,"id","linear"),ae(Ql,"defaults",{ticks:{callback:ka.formatters.numeric}});const Wi=e=>Math.floor(wo(e)),Wo=(e,t)=>Math.pow(10,Wi(e)+t);function ah(e){return e/Math.pow(10,Wi(e))===1}function lh(e,t,n){const o=Math.pow(10,n),s=Math.floor(e/o);return Math.ceil(t/o)-s}function Z$(e,t){const n=t-e;let o=Wi(n);for(;lh(e,t,o)>10;)o++;for(;lh(e,t,o)<10;)o--;return Math.min(o,Wi(e))}function eI(e,{min:t,max:n}){t=Yt(e.min,t);const o=[],s=Wi(t);let i=Z$(t,n),r=i<0?Math.pow(10,Math.abs(i)):1;const a=Math.pow(10,i),l=s>i?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,i)),f=Yt(e.min,Math.round((l+u+d*Math.pow(10,i))*r)/r);for(;f<n;)o.push({value:f,major:ah(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,r=i>=0?1:r),f=Math.round((l+u+d*Math.pow(10,i))*r)/r;const p=Yt(e.max,f);return o.push({value:p,major:ah(p),significand:d}),o}class Jl extends hs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const o=ha.prototype.parse.apply(this,[t,n]);if(o===0){this._zero=!0;return}return lt(o)&&o>0?o:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=lt(t)?Math.max(0,t):null,this.max=lt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!lt(this._userMin)&&(this.min=t===Wo(this.min,0)?Wo(this.min,-1):Wo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let o=this.min,s=this.max;const i=a=>o=t?o:a,r=a=>s=n?s:a;o===s&&(o<=0?(i(1),r(10)):(i(Wo(o,-1)),r(Wo(s,1)))),o<=0&&i(Wo(s,-1)),s<=0&&r(Wo(o,1)),this.min=o,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},o=eI(n,this);return t.bounds==="ticks"&&lm(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(t){return t===void 0?"0":or(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=wo(t),this._valueRange=wo(this.max)-wo(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(wo(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}ae(Jl,"id","logarithmic"),ae(Jl,"defaults",{ticks:{callback:ka.formatters.logarithmic,major:{enabled:!0}}});function Zl(e){const t=e.ticks;if(t.display&&e.display){const n=Mt(t.backdropPadding);return Ae(t.font&&t.font.size,ct.font.size)+n.height}return 0}function tI(e,t,n){return n=tt(n)?n:[n],{w:c2(e,t.string,n),h:n.length*t.lineHeight}}function ch(e,t,n,o,s){return e===o||e===s?{start:t-n/2,end:t+n/2}:e<o||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function nI(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),o=[],s=[],i=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?it/i:0;for(let l=0;l<i;l++){const c=r.setContext(e.getPointLabelContext(l));s[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+s[l],a),d=ht(c.font),f=tI(e.ctx,d,e._pointLabels[l]);o[l]=f;const p=Gt(e.getIndexAngle(l)+a),g=Math.round(eu(p)),h=ch(g,u.x,f.w,0,180),v=ch(g,u.y,f.h,90,270);oI(n,t,p,h,v)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=rI(e,o,s)}function oI(e,t,n,o,s){const i=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;o.start<t.l?(a=(t.l-o.start)/i,e.l=Math.min(e.l,t.l-a)):o.end>t.r&&(a=(o.end-t.r)/i,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 sI(e,t,n){const o=e.drawingArea,{extra:s,additionalAngle:i,padding:r,size:a}=n,l=e.getPointPosition(t,o+s+r,i),c=Math.round(eu(Gt(l.angle+ut))),u=cI(l.y,a.h,c),d=aI(c),f=lI(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function iI(e,t){if(!t)return!0;const{left:n,top:o,right:s,bottom:i}=e;return!(to({x:n,y:o},t)||to({x:n,y:i},t)||to({x:s,y:o},t)||to({x:s,y:i},t))}function rI(e,t,n){const o=[],s=e._pointLabels.length,i=e.options,{centerPointLabels:r,display:a}=i.pointLabels,l={extra:Zl(i)/2,additionalAngle:r?it/s:0};let c;for(let u=0;u<s;u++){l.padding=n[u],l.size=t[u];const d=sI(e,u,l);o.push(d),a==="auto"&&(d.visible=iI(d,c),d.visible&&(c=d))}return o}function aI(e){return e===0||e===180?"center":e<180?"left":"right"}function lI(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function cI(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function uI(e,t,n){const{left:o,top:s,right:i,bottom:r}=n,{backdropColor:a}=t;if(!ze(a)){const l=ns(t.borderRadius),c=Mt(t.backdropPadding);e.fillStyle=a;const u=o-c.left,d=s-c.top,f=i-o+c.width,p=r-s+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),Vi(e,{x:u,y:d,w:f,h:p,radius:l}),e.fill()):e.fillRect(u,d,f,p)}}function dI(e,t){const{ctx:n,options:{pointLabels:o}}=e;for(let s=t-1;s>=0;s--){const i=e._pointLabelItems[s];if(!i.visible)continue;const r=o.setContext(e.getPointLabelContext(s));uI(n,r,i);const a=ht(r.font),{x:l,y:c,textAlign:u}=i;us(n,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function Zm(e,t,n,o){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,nt);else{let i=e.getPointPosition(0,t);s.moveTo(i.x,i.y);for(let r=1;r<o;r++)i=e.getPointPosition(r,t),s.lineTo(i.x,i.y)}}function fI(e,t,n,o,s){const i=e.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!o||!a||!l||n<0||(i.save(),i.strokeStyle=a,i.lineWidth=l,i.setLineDash(s.dash),i.lineDashOffset=s.dashOffset,i.beginPath(),Zm(e,n,r,o),i.closePath(),i.stroke(),i.restore())}function hI(e,t,n){return Fo(e,{label:n,index:t,type:"pointLabel"})}class fi extends ha{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(Zl(this.options)/2),n=this.width=this.maxWidth-t.width,o=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+o/2+t.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=lt(t)&&!isNaN(t)?t:0,this.max=lt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Zl(this.options))}generateTickLabels(t){ha.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,o)=>{const s=Qe(this.options.pointLabels.callback,[n,o],this);return s||s===0?s:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const t=this.options;t.display&&t.pointLabels.display?nI(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,o,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((o-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,o,s))}getIndexAngle(t){const n=nt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Gt(t*n+mn(o))}getDistanceFromCenterForValue(t){if(ze(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(ze(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 o=n[t];return hI(this.getContext(),t,o)}}getPointPosition(t,n,o=0){const s=this.getIndexAngle(t)-ut+o;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:o,right:s,bottom:i}=this._pointLabelItems[t];return{left:n,top:o,right:s,bottom:i}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const o=this.ctx;o.save(),o.beginPath(),Zm(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=t,o.fill(),o.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:o,grid:s,border:i}=n,r=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&dI(this,r),s.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=s.setContext(f),g=i.setContext(f);fI(this,p,l,r,g)}}),o.display){for(t.save(),a=r-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.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,o=n.ticks;if(!o.display)return;const s=this.getIndexAngle(0);let i,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&&!n.reverse)return;const c=o.setContext(this.getContext(l)),u=ht(c.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Mt(c.backdropPadding);t.fillRect(-r/2-d.left,-i-u.size/2-d.top,r+d.width,u.size+d.height)}us(t,a.label,0,-i,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}ae(fi,"id","radialLinear"),ae(fi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ka.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ae(fi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ae(fi,"descriptors",{angleLines:{_fallback:"grid"}});const Ta={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}},Bt=Object.keys(Ta);function uh(e,t){return e-t}function dh(e,t){if(ze(t))return null;const n=e._adapter,{parser:o,round:s,isoWeekday:i}=e._parseOpts;let r=t;return typeof o=="function"&&(r=o(r)),lt(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(s&&(r=s==="week"&&(Is(i)||i===!0)?n.startOf(r,"isoWeek",i):n.startOf(r,s)),+r)}function fh(e,t,n,o){const s=Bt.length;for(let i=Bt.indexOf(e);i<s-1;++i){const r=Ta[Bt[i]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=o)return Bt[i]}return Bt[s-1]}function pI(e,t,n,o,s){for(let i=Bt.length-1;i>=Bt.indexOf(n);i--){const r=Bt[i];if(Ta[r].common&&e._adapter.diff(s,o,r)>=t-1)return r}return Bt[n?Bt.indexOf(n):0]}function gI(e){for(let t=Bt.indexOf(e)+1,n=Bt.length;t<n;++t)if(Ta[Bt[t]].common)return Bt[t]}function hh(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:s}=tu(n,t),i=n[o]>=t?n[o]:n[s];e[i]=!0}}function mI(e,t,n,o){const s=e._adapter,i=+s.startOf(t[0].value,o),r=t[t.length-1].value;let a,l;for(a=i;a<=r;a=+s.add(a,1,o))l=n[a],l>=0&&(t[l].major=!0);return t}function ph(e,t,n){const o=[],s={},i=t.length;let r,a;for(r=0;r<i;++r)a=t[r],s[a]=r,o.push({value:a,major:!1});return i===0||!n?o:mI(e,o,s,n)}class ji extends hs{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 o=t.time||(t.time={}),s=this._adapter=new kR._date(t.adapters.date);s.init(n),_i(o.displayFormats,s.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:dh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:s,max:i,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(i=Math.max(i,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=lt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),o),i=lt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,s=o.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 i=this.min,r=this.max,a=XA(s,i,r);return this._unit=n.unit||(o.autoSkip?fh(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):pI(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:gI(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),ph(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?o=i:o=(i-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=vt(n,0,r),o=vt(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,s=this.options,i=s.time,r=i.unit||fh(i.minUnit,n,o,this._getLabelCapacity(n)),a=Ae(s.ticks.stepSize,1),l=r==="week"?i.isoWeekday:!1,c=Is(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(o,n,r)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<o;f=+t.add(f,a,r),p++)hh(u,f,g);return(f===o||s.bounds==="ticks"||p===1)&&hh(u,f,g),Object.keys(u).sort(uh).map(h=>+h)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,r=n||s[i];return this._adapter.format(t,r)}_tickFormatFunction(t,n,o,s){const i=this.options,r=i.ticks.callback;if(r)return Qe(r,[t,n,o],this);const a=i.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=o[n],p=c&&d&&f&&f.major;return this._adapter.format(t,s||(p?d:u))}generateTickLabels(t){let n,o,s;for(n=0,o=t.length;n<o;++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,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,s=mn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:o*i+a*r,h:o*r+a*i}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,s=o[n.unit]||o.millisecond,i=this._tickFormatFunction(t,0,ph(this,[t],this._majorUnit),s),r=this._getLabelSize(i),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,o;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,o=s.length;n<o;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const s=this.getLabels();for(n=0,o=s.length;n<o;++n)t.push(dh(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return dm(t.sort(uh))}}ae(ji,"id","time"),ae(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 Tr(e,t,n){let o=0,s=e.length-1,i,r,a,l;n?(t>=e[o].pos&&t<=e[s].pos&&({lo:o,hi:s}=eo(e,"pos",t)),{pos:i,time:a}=e[o],{pos:r,time:l}=e[s]):(t>=e[o].time&&t<=e[s].time&&({lo:o,hi:s}=eo(e,"time",t)),{time:i,pos:a}=e[o],{time:r,pos:l}=e[s]);const c=r-i;return c?a+(l-a)*(t-i)/c:a}class ec 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=Tr(n,this.min),this._tableRange=Tr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,s=[],i=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=o&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],l=s[r-1],c=s[r],Math.round((u+l)/2)!==c&&i.push({time:c,pos:r/(a-1)});return i}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(Tr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return Tr(this._table,o*this._tableRange+this._minPos,!0)}}ae(ec,"id","timeseries"),ae(ec,"defaults",ji.defaults);var vI=Object.freeze({__proto__:null,CategoryScale:Xl,LinearScale:Ql,LogarithmicScale:Jl,RadialLinearScale:fi,TimeScale:ji,TimeSeriesScale:ec});const bI=[CR,e$,Y$,vI];Jn.register(...bI);const yI={name:"CardChart",props:{chartProps:{type:Object,required:!0},chartOptions:{type:Object,required:!0}},data(){return{loading:!1,chartId:"buymecoffee_overview_chart_"+this.chartProps.id,chartHeight:this.chartProps.height?this.chartProps.height:"auto",chartWidth:this.chartProps.width?this.chartProps.width:"auto"}},methods:{generateChart(){let e={type:this.chartProps.type?this.chartProps.type:"line",data:{labels:this.chartProps.label,datasets:[{bezierCurve:!1,label:"",data:this.chartProps.data,borderWidth:1,borderColor:this.chartProps.color,backgroundColor:this.chartProps.backgroundColor,fill:!0}]},options:this.chartOptions},t=document.getElementById(this.chartId).getContext("2d");window[this.chartProps.id]=new Jn(t,e)}},mounted(){this.generateChart()}},_I=["id","width","height"];function wI(e,t,n,o,s,i){return M(),N("div",null,[E("canvas",{id:s.chartId,width:s.chartWidth,height:s.chartHeight},null,8,_I)])}const xI=kn(yI,[["render",wI]]),SI={name:"Dashboard",components:{Report:rA,View:uc,Help:tb,Setting:nb,SupportersTable:nm,ChartRenderer:xI},data(){return{limit:20,guidedTour:!0,fetching:!0,posts_per_page:10,current:0,total:0,supporters:[],renderChart:!1,dummyChart:!0,top_paid_currency:"USD",previewUrl:window.BuyMeCoffeeAdmin.preview_url,reportData:{total_supporters:this.total,total_coffee:0,currency_total:[],currency_total_pending:[]},totalRevenue:{id:"revenue_chart",type:"line",height:"460",title:"Total Revenue",color:"rgba(111,194,255,0.51)",backgroundColor:"rgba(24,220,244,0.32)",data:[20,18,20,20,25],label:["January","February","March","April","May"]},overviewOptions:{elements:{line:{tension:.3},point:{radius:5}},plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>e.formattedValue+" "+this.top_paid_currency}}}}}},computed:{},methods:{getImage(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e},setStore(){this.guidedTour=!0,window.localStorage&&localStorage.setItem("buymecoffee_guided_tour",!1)},getSupporters(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_supporters",data:{filter_top:"yes",limit:this.limit,page:this.current,posts_per_page:this.posts_per_page},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.supporters=e.data.supporters,this.total=e.data.total,this.reportData=e.data.reports,this.fetching=!1}).fail(e=>{this.$message.error(e.responseJSON.data.message)}).always(()=>{this.fetching=!1})},getWeeklyRevenue(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_weekly_revenue",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{var n,o;this.top_paid_currency=((n=e==null?void 0:e.data)==null?void 0:n.top_paid_currency)||"USD";let t=(o=e==null?void 0:e.data)==null?void 0:o.chartData[this.top_paid_currency];t&&(this.totalRevenue.data=t.data,this.totalRevenue.label=t.label,this.dummyChart=!1),this.renderChart=!0,this.fetching=!1}).catch(e=>{this.fetching=!1,this.$handleError(e)})}},mounted(){this.getSupporters(),this.getWeeklyRevenue(),window.localStorage&&(this.guidedTour=!!window.localStorage.getItem("buymecoffee_guided_tour"))}},ev=e=>(Yi("data-v-b2a15b64"),e=e(),Gi(),e),CI={class:"buymecoffee_main_container"},kI={class:"bmc_coffee_preview"},EI=["href"],MI={key:0,class:"quick_setup_tour"},PI=ev(()=>E("br",null,null,-1)),TI={class:"buymecoffee_dashboard_2nd_row"},OI={class:"buymecoffee_supporters"},AI=ev(()=>E("h1",{class:"buymecoffee_menu_graph_title"},"Supporters Leaderboard",-1)),RI={class:"buymecoffee_supporters_map",style:{padding:"23px"}},LI={class:"buymecoffee_menu_graph_title"},$I={key:0,style:{color:"#ff9800","font-weight":"400"}},II={style:{height:"100%"}},FI={key:0,style:{"text-align":"center",color:"#e38110"}};function DI(e,t,n,o,s,i){const r=Me("report"),a=Me("Help"),l=$e,c=Io,u=Me("View"),d=Me("Setting"),f=Me("supporters-table"),p=Me("ChartRenderer");return M(),N("div",CI,[L(r,{reportData:s.reportData},null,8,["reportData"]),E("div",kI,[L(c,{effect:"light",content:"Quick guided setup",placement:"top"},{default:F(()=>[E("a",{style:{cursor:"pointer"},onClick:t[0]||(t[0]=g=>e.$router.push("quick-setup"))},[L(l,null,{default:F(()=>[L(a)]),_:1}),fe("Setup | ")])]),_:1}),E("a",{href:s.previewUrl,target:"_blank"},[L(l,{style:{"margin-right":"4px"}},{default:F(()=>[L(u)]),_:1}),fe(" Preview")],8,EI)]),!s.supporters.length&&!s.guidedTour&&!s.fetching?(M(),N("div",MI,[E("p",{onClick:t[1]||(t[1]=(...g)=>i.setStore&&i.setStore(...g)),style:{float:"right"}},"x close "),E("div",null,[L(l,null,{default:F(()=>[L(d)]),_:1})]),E("div",{onClick:t[2]||(t[2]=g=>e.$router.push("quick-setup"))},[fe(" Start collecting your donations with Buy me coffee! "),PI,fe(" Start a Quick setup tour. ")])])):X("",!0),E("div",TI,[E("div",OI,[AI,L(f,{onPageChanged:t[3]||(t[3]=g=>{s.current=g,i.getSupporters()}),supporters:s.supporters,hide_pagination:"yes",hide_columns:["operations","id","mode","date"]},null,8,["supporters"])]),E("div",RI,[E("h1",LI,[fe("Recent Revenue graph in "+ce(s.top_paid_currency)+" ",1),s.dummyChart?(M(),N("span",$I,"(Dummy chart)")):X("",!0)]),E("div",II,[s.dummyChart?(M(),N("div",FI," NB: No actual data found! Once you receive some donations, this chart will be updated. ")):X("",!0),s.renderChart?(M(),q(p,{key:1,chartProps:s.totalRevenue,chartOptions:s.overviewOptions},null,8,["chartProps","chartOptions"])):X("",!0)])])])])}const BI=kn(SI,[["render",DI],["__scopeId","data-v-b2a15b64"]]);var tv={exports:{}};/*!
     56`):e}function z$(e,t){const{element:n,datasetIndex:o,index:s}=t,i=e.getDatasetMeta(o).controller,{label:r,value:a}=i.getLabelAndValue(s);return{chart:e,label:r,parsed:i.getParsed(s),raw:e.data.datasets[o].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:o,element:n}}function eh(e,t){const n=e.chart.ctx,{body:o,footer:s,title:i}=e,{boxWidth:r,boxHeight:a}=t,l=ht(t.bodyFont),c=ht(t.titleFont),u=ht(t.footerFont),d=i.length,f=s.length,p=o.length,g=Mt(t.padding);let h=g.height,v=0,m=o.reduce((_,x)=>_+x.before.length+x.lines.length+x.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;h+=p*_+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let y=0;const w=function(_){v=Math.max(v,n.measureText(_).width+y)};return n.save(),n.font=c.string,A((a-r)/i,x/1e3)?(T=Math.round(Math.min((a-r)/x,u)),x=(a-r)/T,C=r,k=a):w?(C=m?r:C,k=y?a:k,T=c-1,x=(k-C)/T):(T=(k-C)/x,wi(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));const B=Math.max(Zd(x),Zd(C));S=Math.pow(10,ze(l)?B:l),C=Math.round(C*S)/S,k=Math.round(k*S)/S;let $=0;for(m&&(f&&C!==r?(n.push({value:r}),C<r&&$++,wi(Math.round((C+$*x)*S)/S,r,rh(r,_,e))&&$++):C<r&&$++);$<T;++$){const D=Math.round((C+$*x)*S)/S;if(y&&D>a)break;n.push({value:D})}return y&&f&&k!==a?n.length&&wi(n[n.length-1].value,a,rh(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!y||k===a)&&n.push({value:k}),n}function rh(e,t,{horizontal:n,minRotation:o}){const s=mn(o),i=(n?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/i,r)}class ha extends hs{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 ze(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:s,max:i}=this;const r=l=>s=n?s:l,a=l=>i=o?i:l;if(t){const l=Rn(s),c=Rn(i);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||r(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,s;return o?(s=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} 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 o=this.getTickLimit();o=Math.max(2,o);const s={maxTicks:o,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},i=this._range||this,r=J$(s,i);return t.bounds==="ticks"&&lm(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,o=this.max;if(super.configure(),this.options.offset&&t.length){const s=(o-n)/Math.max(t.length-1,1)/2;n-=s,o+=s}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return or(t,this.chart.options.locale,this.options.ticks.format)}}class Ql extends ha{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=lt(t)?t:0,this.max=lt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=mn(this.options.ticks.minRotation),s=(t?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.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}}ae(Ql,"id","linear"),ae(Ql,"defaults",{ticks:{callback:ka.formatters.numeric}});const Wi=e=>Math.floor(wo(e)),Wo=(e,t)=>Math.pow(10,Wi(e)+t);function ah(e){return e/Math.pow(10,Wi(e))===1}function lh(e,t,n){const o=Math.pow(10,n),s=Math.floor(e/o);return Math.ceil(t/o)-s}function Z$(e,t){const n=t-e;let o=Wi(n);for(;lh(e,t,o)>10;)o++;for(;lh(e,t,o)<10;)o--;return Math.min(o,Wi(e))}function eI(e,{min:t,max:n}){t=Yt(e.min,t);const o=[],s=Wi(t);let i=Z$(t,n),r=i<0?Math.pow(10,Math.abs(i)):1;const a=Math.pow(10,i),l=s>i?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,i)),f=Yt(e.min,Math.round((l+u+d*Math.pow(10,i))*r)/r);for(;f<n;)o.push({value:f,major:ah(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,r=i>=0?1:r),f=Math.round((l+u+d*Math.pow(10,i))*r)/r;const p=Yt(e.max,f);return o.push({value:p,major:ah(p),significand:d}),o}class Jl extends hs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const o=ha.prototype.parse.apply(this,[t,n]);if(o===0){this._zero=!0;return}return lt(o)&&o>0?o:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=lt(t)?Math.max(0,t):null,this.max=lt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!lt(this._userMin)&&(this.min=t===Wo(this.min,0)?Wo(this.min,-1):Wo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let o=this.min,s=this.max;const i=a=>o=t?o:a,r=a=>s=n?s:a;o===s&&(o<=0?(i(1),r(10)):(i(Wo(o,-1)),r(Wo(s,1)))),o<=0&&i(Wo(s,-1)),s<=0&&r(Wo(o,1)),this.min=o,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},o=eI(n,this);return t.bounds==="ticks"&&lm(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(t){return t===void 0?"0":or(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=wo(t),this._valueRange=wo(this.max)-wo(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(wo(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}ae(Jl,"id","logarithmic"),ae(Jl,"defaults",{ticks:{callback:ka.formatters.logarithmic,major:{enabled:!0}}});function Zl(e){const t=e.ticks;if(t.display&&e.display){const n=Mt(t.backdropPadding);return Ae(t.font&&t.font.size,ct.font.size)+n.height}return 0}function tI(e,t,n){return n=tt(n)?n:[n],{w:c2(e,t.string,n),h:n.length*t.lineHeight}}function ch(e,t,n,o,s){return e===o||e===s?{start:t-n/2,end:t+n/2}:e<o||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function nI(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),o=[],s=[],i=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?it/i:0;for(let l=0;l<i;l++){const c=r.setContext(e.getPointLabelContext(l));s[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+s[l],a),d=ht(c.font),f=tI(e.ctx,d,e._pointLabels[l]);o[l]=f;const p=Gt(e.getIndexAngle(l)+a),g=Math.round(eu(p)),h=ch(g,u.x,f.w,0,180),v=ch(g,u.y,f.h,90,270);oI(n,t,p,h,v)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=rI(e,o,s)}function oI(e,t,n,o,s){const i=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;o.start<t.l?(a=(t.l-o.start)/i,e.l=Math.min(e.l,t.l-a)):o.end>t.r&&(a=(o.end-t.r)/i,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 sI(e,t,n){const o=e.drawingArea,{extra:s,additionalAngle:i,padding:r,size:a}=n,l=e.getPointPosition(t,o+s+r,i),c=Math.round(eu(Gt(l.angle+ut))),u=cI(l.y,a.h,c),d=aI(c),f=lI(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function iI(e,t){if(!t)return!0;const{left:n,top:o,right:s,bottom:i}=e;return!(to({x:n,y:o},t)||to({x:n,y:i},t)||to({x:s,y:o},t)||to({x:s,y:i},t))}function rI(e,t,n){const o=[],s=e._pointLabels.length,i=e.options,{centerPointLabels:r,display:a}=i.pointLabels,l={extra:Zl(i)/2,additionalAngle:r?it/s:0};let c;for(let u=0;u<s;u++){l.padding=n[u],l.size=t[u];const d=sI(e,u,l);o.push(d),a==="auto"&&(d.visible=iI(d,c),d.visible&&(c=d))}return o}function aI(e){return e===0||e===180?"center":e<180?"left":"right"}function lI(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function cI(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function uI(e,t,n){const{left:o,top:s,right:i,bottom:r}=n,{backdropColor:a}=t;if(!ze(a)){const l=ns(t.borderRadius),c=Mt(t.backdropPadding);e.fillStyle=a;const u=o-c.left,d=s-c.top,f=i-o+c.width,p=r-s+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),Vi(e,{x:u,y:d,w:f,h:p,radius:l}),e.fill()):e.fillRect(u,d,f,p)}}function dI(e,t){const{ctx:n,options:{pointLabels:o}}=e;for(let s=t-1;s>=0;s--){const i=e._pointLabelItems[s];if(!i.visible)continue;const r=o.setContext(e.getPointLabelContext(s));uI(n,r,i);const a=ht(r.font),{x:l,y:c,textAlign:u}=i;us(n,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function Zm(e,t,n,o){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,nt);else{let i=e.getPointPosition(0,t);s.moveTo(i.x,i.y);for(let r=1;r<o;r++)i=e.getPointPosition(r,t),s.lineTo(i.x,i.y)}}function fI(e,t,n,o,s){const i=e.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!o||!a||!l||n<0||(i.save(),i.strokeStyle=a,i.lineWidth=l,i.setLineDash(s.dash),i.lineDashOffset=s.dashOffset,i.beginPath(),Zm(e,n,r,o),i.closePath(),i.stroke(),i.restore())}function hI(e,t,n){return Fo(e,{label:n,index:t,type:"pointLabel"})}class fi extends ha{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(Zl(this.options)/2),n=this.width=this.maxWidth-t.width,o=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+o/2+t.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=lt(t)&&!isNaN(t)?t:0,this.max=lt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Zl(this.options))}generateTickLabels(t){ha.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,o)=>{const s=Qe(this.options.pointLabels.callback,[n,o],this);return s||s===0?s:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const t=this.options;t.display&&t.pointLabels.display?nI(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,o,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((o-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,o,s))}getIndexAngle(t){const n=nt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Gt(t*n+mn(o))}getDistanceFromCenterForValue(t){if(ze(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(ze(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 o=n[t];return hI(this.getContext(),t,o)}}getPointPosition(t,n,o=0){const s=this.getIndexAngle(t)-ut+o;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:o,right:s,bottom:i}=this._pointLabelItems[t];return{left:n,top:o,right:s,bottom:i}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const o=this.ctx;o.save(),o.beginPath(),Zm(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=t,o.fill(),o.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:o,grid:s,border:i}=n,r=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&dI(this,r),s.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=s.setContext(f),g=i.setContext(f);fI(this,p,l,r,g)}}),o.display){for(t.save(),a=r-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.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,o=n.ticks;if(!o.display)return;const s=this.getIndexAngle(0);let i,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&&!n.reverse)return;const c=o.setContext(this.getContext(l)),u=ht(c.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Mt(c.backdropPadding);t.fillRect(-r/2-d.left,-i-u.size/2-d.top,r+d.width,u.size+d.height)}us(t,a.label,0,-i,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}ae(fi,"id","radialLinear"),ae(fi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ka.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ae(fi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ae(fi,"descriptors",{angleLines:{_fallback:"grid"}});const Ta={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}},Bt=Object.keys(Ta);function uh(e,t){return e-t}function dh(e,t){if(ze(t))return null;const n=e._adapter,{parser:o,round:s,isoWeekday:i}=e._parseOpts;let r=t;return typeof o=="function"&&(r=o(r)),lt(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(s&&(r=s==="week"&&(Is(i)||i===!0)?n.startOf(r,"isoWeek",i):n.startOf(r,s)),+r)}function fh(e,t,n,o){const s=Bt.length;for(let i=Bt.indexOf(e);i<s-1;++i){const r=Ta[Bt[i]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=o)return Bt[i]}return Bt[s-1]}function pI(e,t,n,o,s){for(let i=Bt.length-1;i>=Bt.indexOf(n);i--){const r=Bt[i];if(Ta[r].common&&e._adapter.diff(s,o,r)>=t-1)return r}return Bt[n?Bt.indexOf(n):0]}function gI(e){for(let t=Bt.indexOf(e)+1,n=Bt.length;t<n;++t)if(Ta[Bt[t]].common)return Bt[t]}function hh(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:s}=tu(n,t),i=n[o]>=t?n[o]:n[s];e[i]=!0}}function mI(e,t,n,o){const s=e._adapter,i=+s.startOf(t[0].value,o),r=t[t.length-1].value;let a,l;for(a=i;a<=r;a=+s.add(a,1,o))l=n[a],l>=0&&(t[l].major=!0);return t}function ph(e,t,n){const o=[],s={},i=t.length;let r,a;for(r=0;r<i;++r)a=t[r],s[a]=r,o.push({value:a,major:!1});return i===0||!n?o:mI(e,o,s,n)}class ji extends hs{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 o=t.time||(t.time={}),s=this._adapter=new kR._date(t.adapters.date);s.init(n),_i(o.displayFormats,s.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:dh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:s,max:i,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(i=Math.max(i,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=lt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),o),i=lt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,s=o.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 i=this.min,r=this.max,a=XA(s,i,r);return this._unit=n.unit||(o.autoSkip?fh(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):pI(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:gI(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),ph(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?o=i:o=(i-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=vt(n,0,r),o=vt(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,s=this.options,i=s.time,r=i.unit||fh(i.minUnit,n,o,this._getLabelCapacity(n)),a=Ae(s.ticks.stepSize,1),l=r==="week"?i.isoWeekday:!1,c=Is(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(o,n,r)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<o;f=+t.add(f,a,r),p++)hh(u,f,g);return(f===o||s.bounds==="ticks"||p===1)&&hh(u,f,g),Object.keys(u).sort(uh).map(h=>+h)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,r=n||s[i];return this._adapter.format(t,r)}_tickFormatFunction(t,n,o,s){const i=this.options,r=i.ticks.callback;if(r)return Qe(r,[t,n,o],this);const a=i.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=o[n],p=c&&d&&f&&f.major;return this._adapter.format(t,s||(p?d:u))}generateTickLabels(t){let n,o,s;for(n=0,o=t.length;n<o;++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,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,s=mn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:o*i+a*r,h:o*r+a*i}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,s=o[n.unit]||o.millisecond,i=this._tickFormatFunction(t,0,ph(this,[t],this._majorUnit),s),r=this._getLabelSize(i),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,o;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,o=s.length;n<o;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const s=this.getLabels();for(n=0,o=s.length;n<o;++n)t.push(dh(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return dm(t.sort(uh))}}ae(ji,"id","time"),ae(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 Tr(e,t,n){let o=0,s=e.length-1,i,r,a,l;n?(t>=e[o].pos&&t<=e[s].pos&&({lo:o,hi:s}=eo(e,"pos",t)),{pos:i,time:a}=e[o],{pos:r,time:l}=e[s]):(t>=e[o].time&&t<=e[s].time&&({lo:o,hi:s}=eo(e,"time",t)),{time:i,pos:a}=e[o],{time:r,pos:l}=e[s]);const c=r-i;return c?a+(l-a)*(t-i)/c:a}class ec 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=Tr(n,this.min),this._tableRange=Tr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,s=[],i=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=o&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],l=s[r-1],c=s[r],Math.round((u+l)/2)!==c&&i.push({time:c,pos:r/(a-1)});return i}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(Tr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return Tr(this._table,o*this._tableRange+this._minPos,!0)}}ae(ec,"id","timeseries"),ae(ec,"defaults",ji.defaults);var vI=Object.freeze({__proto__:null,CategoryScale:Xl,LinearScale:Ql,LogarithmicScale:Jl,RadialLinearScale:fi,TimeScale:ji,TimeSeriesScale:ec});const bI=[CR,e$,Y$,vI];Jn.register(...bI);const yI={name:"CardChart",props:{chartProps:{type:Object,required:!0},chartOptions:{type:Object,required:!0}},data(){return{loading:!1,chartId:"buymecoffee_overview_chart_"+this.chartProps.id,chartHeight:this.chartProps.height?this.chartProps.height:"auto",chartWidth:this.chartProps.width?this.chartProps.width:"auto"}},methods:{generateChart(){let e={type:this.chartProps.type?this.chartProps.type:"line",data:{labels:this.chartProps.label,datasets:[{bezierCurve:!1,label:"",data:this.chartProps.data,borderWidth:1,borderColor:this.chartProps.color,backgroundColor:this.chartProps.backgroundColor,fill:!0}]},options:this.chartOptions},t=document.getElementById(this.chartId).getContext("2d");window[this.chartProps.id]=new Jn(t,e)}},mounted(){this.generateChart()}},_I=["id","width","height"];function wI(e,t,n,o,s,i){return M(),N("div",null,[E("canvas",{id:s.chartId,width:s.chartWidth,height:s.chartHeight},null,8,_I)])}const xI=kn(yI,[["render",wI]]),SI={name:"Dashboard",components:{Report:rA,View:uc,Help:tb,Setting:nb,SupportersTable:nm,ChartRenderer:xI},data(){return{limit:20,guidedTour:!0,fetching:!0,posts_per_page:10,current:0,total:0,supporters:[],renderChart:!1,dummyChart:!0,top_paid_currency:"USD",previewUrl:window.BuyMeCoffeeAdmin.preview_url,reportData:{total_supporters:this.total,total_coffee:0,currency_total:[],currency_total_pending:[]},totalRevenue:{id:"revenue_chart",type:"line",height:"460",title:"Total Revenue",color:"rgba(111,194,255,0.51)",backgroundColor:"rgba(24,220,244,0.32)",data:[20,18,20,20,25],label:["January","February","March","April","May"]},overviewOptions:{elements:{line:{tension:.3},point:{radius:5}},plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>e.formattedValue+" "+this.top_paid_currency}}}}}},computed:{},methods:{getImage(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e},setStore(){this.guidedTour=!0,window.localStorage&&localStorage.setItem("buymecoffee_guided_tour",!1)},getSupporters(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_supporters",data:{filter_top:"yes",limit:this.limit,page:this.current,posts_per_page:this.posts_per_page},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.supporters=e.data.supporters,this.total=e.data.total,this.reportData=e.data.reports,this.fetching=!1}).fail(e=>{this.$message.error(e.responseJSON.data.message)}).always(()=>{this.fetching=!1})},getWeeklyRevenue(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_weekly_revenue",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{var n,o;this.top_paid_currency=((n=e==null?void 0:e.data)==null?void 0:n.top_paid_currency)||"USD";let t=(o=e==null?void 0:e.data)==null?void 0:o.chartData[this.top_paid_currency];t&&(this.totalRevenue.data=t.data,this.totalRevenue.label=t.label,this.dummyChart=!1),this.renderChart=!0,this.fetching=!1}).catch(e=>{this.fetching=!1,this.$handleError(e)})}},mounted(){this.getSupporters(),this.getWeeklyRevenue(),window.localStorage&&(this.guidedTour=!!window.localStorage.getItem("buymecoffee_guided_tour"))}},ev=e=>(Yi("data-v-b2a15b64"),e=e(),Gi(),e),CI={class:"buymecoffee_main_container"},kI={class:"bmc_coffee_preview"},EI=["href"],MI={key:0,class:"quick_setup_tour"},PI=ev(()=>E("br",null,null,-1)),TI={class:"buymecoffee_dashboard_2nd_row"},OI={class:"buymecoffee_supporters"},AI=ev(()=>E("h1",{class:"buymecoffee_menu_graph_title"},"Supporters Leaderboard",-1)),RI={class:"buymecoffee_supporters_map",style:{padding:"23px"}},LI={class:"buymecoffee_menu_graph_title"},$I={key:0,style:{color:"#ff9800","font-weight":"400"}},II={style:{height:"100%"}},FI={key:0,style:{"text-align":"center",color:"#e38110"}};function DI(e,t,n,o,s,i){const r=Me("report"),a=Me("Help"),l=$e,c=Io,u=Me("View"),d=Me("Setting"),f=Me("supporters-table"),p=Me("ChartRenderer");return M(),N("div",CI,[L(r,{reportData:s.reportData},null,8,["reportData"]),E("div",kI,[L(c,{effect:"light",content:"Quick guided setup",placement:"top"},{default:F(()=>[E("a",{style:{cursor:"pointer"},onClick:t[0]||(t[0]=g=>e.$router.push("quick-setup"))},[L(l,null,{default:F(()=>[L(a)]),_:1}),fe("Setup | ")])]),_:1}),E("a",{href:s.previewUrl,target:"_blank"},[L(l,{style:{"margin-right":"4px"}},{default:F(()=>[L(u)]),_:1}),fe(" Preview")],8,EI)]),!s.supporters.length&&!s.guidedTour&&!s.fetching?(M(),N("div",MI,[E("p",{onClick:t[1]||(t[1]=(...g)=>i.setStore&&i.setStore(...g)),style:{float:"right"}},"x close "),E("div",null,[L(l,null,{default:F(()=>[L(d)]),_:1})]),E("div",{onClick:t[2]||(t[2]=g=>e.$router.push("quick-setup"))},[fe(" Start collecting your donations with Buy me coffee! "),PI,fe(" Start a Quick setup tour. ")])])):X("",!0),E("div",TI,[E("div",OI,[AI,L(f,{onPageChanged:t[3]||(t[3]=g=>{s.current=g,i.getSupporters()}),supporters:s.supporters,hide_pagination:"yes",hide_columns:["operations","id","mode","date"]},null,8,["supporters"])]),E("div",RI,[E("h1",LI,[fe("Recent Revenue graph in "+ce(s.top_paid_currency)+" ",1),s.dummyChart?(M(),N("span",$I,"(Dummy chart)")):X("",!0)]),E("div",II,[s.dummyChart?(M(),N("div",FI," NB: No actual data found! Once you receive some donations, this chart will be updated. ")):X("",!0),s.renderChart?(M(),q(p,{key:1,chartProps:s.totalRevenue,chartOptions:s.overviewOptions},null,8,["chartProps","chartOptions"])):X("",!0)])])])])}const BI=kn(SI,[["render",DI],["__scopeId","data-v-b2a15b64"]]);var tv={exports:{}};/*!
    5757 * clipboard.js v2.0.11
    5858 * https://clipboardjs.com/
    5959 *
    6060 * Licensed MIT © Zeno Rocha
    61  */(function(e,t){(function(o,s){e.exports=s()})(fk,function(){return function(){var n={686:function(i,r,a){a.d(r,{default:function(){return de}});var l=a(279),c=a.n(l),u=a(370),d=a.n(u),f=a(817),p=a.n(f);function g(J){try{return document.execCommand(J)}catch{return!1}}var h=function(G){var U=p()(G);return g("cut"),U},v=h;function m(J){var G=document.documentElement.getAttribute("dir")==="rtl",U=document.createElement("textarea");U.style.fontSize="12pt",U.style.border="0",U.style.padding="0",U.style.margin="0",U.style.position="absolute",U.style[G?"right":"left"]="-9999px";var re=window.pageYOffset||document.documentElement.scrollTop;return U.style.top="".concat(re,"px"),U.setAttribute("readonly",""),U.value=J,U}var y=function(G,U){var re=m(G);U.container.appendChild(re);var ie=p()(re);return g("copy"),re.remove(),ie},w=function(G){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},re="";return typeof G=="string"?re=y(G,U):G instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(G==null?void 0:G.type)?re=y(G.value,U):(re=p()(G),g("copy")),re},_=w;function x(J){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(U){return typeof U}:x=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},x(J)}var S=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=G.action,re=U===void 0?"copy":U,ie=G.container,O=G.target,H=G.text;if(re!=="copy"&&re!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(O!==void 0)if(O&&x(O)==="object"&&O.nodeType===1){if(re==="copy"&&O.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(re==="cut"&&(O.hasAttribute("readonly")||O.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(H)return _(H,{container:ie});if(O)return re==="cut"?v(O):_(O,{container:ie})},C=S;function k(J){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(U){return typeof U}:k=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},k(J)}function T(J,G){if(!(J instanceof G))throw new TypeError("Cannot call a class as a function")}function B(J,G){for(var U=0;U<G.length;U++){var re=G[U];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(J,re.key,re)}}function $(J,G,U){return G&&B(J.prototype,G),U&&B(J,U),J}function D(J,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(G&&G.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),G&&W(J,G)}function W(J,G){return W=Object.setPrototypeOf||function(re,ie){return re.__proto__=ie,re},W(J,G)}function ne(J){var G=V();return function(){var re=le(J),ie;if(G){var O=le(this).constructor;ie=Reflect.construct(re,arguments,O)}else ie=re.apply(this,arguments);return j(this,ie)}}function j(J,G){return G&&(k(G)==="object"||typeof G=="function")?G:Q(J)}function Q(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J}function V(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function le(J){return le=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},le(J)}function I(J,G){var U="data-clipboard-".concat(J);if(!!G.hasAttribute(U))return G.getAttribute(U)}var Z=function(J){D(U,J);var G=ne(U);function U(re,ie){var O;return T(this,U),O=G.call(this),O.resolveOptions(ie),O.listenClick(re),O}return $(U,[{key:"resolveOptions",value:function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ie.action=="function"?ie.action:this.defaultAction,this.target=typeof ie.target=="function"?ie.target:this.defaultTarget,this.text=typeof ie.text=="function"?ie.text:this.defaultText,this.container=k(ie.container)==="object"?ie.container:document.body}},{key:"listenClick",value:function(ie){var O=this;this.listener=d()(ie,"click",function(H){return O.onClick(H)})}},{key:"onClick",value:function(ie){var O=ie.delegateTarget||ie.currentTarget,H=this.action(O)||"copy",K=C({action:H,container:this.container,target:this.target(O),text:this.text(O)});this.emit(K?"success":"error",{action:H,text:K,trigger:O,clearSelection:function(){O&&O.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ie){return I("action",ie)}},{key:"defaultTarget",value:function(ie){var O=I("target",ie);if(O)return document.querySelector(O)}},{key:"defaultText",value:function(ie){return I("text",ie)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ie){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return _(ie,O)}},{key:"cut",value:function(ie){return v(ie)}},{key:"isSupported",value:function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],O=typeof ie=="string"?[ie]:ie,H=!!document.queryCommandSupported;return O.forEach(function(K){H=H&&!!document.queryCommandSupported(K)}),H}}]),U}(c()),de=Z},828:function(i){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var a=Element.prototype;a.matches=a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}function l(c,u){for(;c&&c.nodeType!==r;){if(typeof c.matches=="function"&&c.matches(u))return c;c=c.parentNode}}i.exports=l},438:function(i,r,a){var l=a(828);function c(f,p,g,h,v){var m=d.apply(this,arguments);return f.addEventListener(g,m,v),{destroy:function(){f.removeEventListener(g,m,v)}}}function u(f,p,g,h,v){return typeof f.addEventListener=="function"?c.apply(null,arguments):typeof g=="function"?c.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(m){return c(m,p,g,h,v)}))}function d(f,p,g,h){return function(v){v.delegateTarget=l(v.target,p),v.delegateTarget&&h.call(f,v)}}i.exports=u},879:function(i,r){r.node=function(a){return a!==void 0&&a instanceof HTMLElement&&a.nodeType===1},r.nodeList=function(a){var l=Object.prototype.toString.call(a);return a!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in a&&(a.length===0||r.node(a[0]))},r.string=function(a){return typeof a=="string"||a instanceof String},r.fn=function(a){var l=Object.prototype.toString.call(a);return l==="[object Function]"}},370:function(i,r,a){var l=a(879),c=a(438);function u(g,h,v){if(!g&&!h&&!v)throw new Error("Missing required arguments");if(!l.string(h))throw new TypeError("Second argument must be a String");if(!l.fn(v))throw new TypeError("Third argument must be a Function");if(l.node(g))return d(g,h,v);if(l.nodeList(g))return f(g,h,v);if(l.string(g))return p(g,h,v);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function d(g,h,v){return g.addEventListener(h,v),{destroy:function(){g.removeEventListener(h,v)}}}function f(g,h,v){return Array.prototype.forEach.call(g,function(m){m.addEventListener(h,v)}),{destroy:function(){Array.prototype.forEach.call(g,function(m){m.removeEventListener(h,v)})}}}function p(g,h,v){return c(document.body,g,h,v)}i.exports=u},817:function(i){function r(a){var l;if(a.nodeName==="SELECT")a.focus(),l=a.value;else if(a.nodeName==="INPUT"||a.nodeName==="TEXTAREA"){var c=a.hasAttribute("readonly");c||a.setAttribute("readonly",""),a.select(),a.setSelectionRange(0,a.value.length),c||a.removeAttribute("readonly"),l=a.value}else{a.hasAttribute("contenteditable")&&a.focus();var u=window.getSelection(),d=document.createRange();d.selectNodeContents(a),u.removeAllRanges(),u.addRange(d),l=u.toString()}return l}i.exports=r},279:function(i){function r(){}r.prototype={on:function(a,l,c){var u=this.e||(this.e={});return(u[a]||(u[a]=[])).push({fn:l,ctx:c}),this},once:function(a,l,c){var u=this;function d(){u.off(a,d),l.apply(c,arguments)}return d._=l,this.on(a,d,c)},emit:function(a){var l=[].slice.call(arguments,1),c=((this.e||(this.e={}))[a]||[]).slice(),u=0,d=c.length;for(u;u<d;u++)c[u].fn.apply(c[u].ctx,l);return this},off:function(a,l){var c=this.e||(this.e={}),u=c[a],d=[];if(u&&l)for(var f=0,p=u.length;f<p;f++)u[f].fn!==l&&u[f].fn._!==l&&d.push(u[f]);return d.length?c[a]=d:delete c[a],this}},i.exports=r,i.exports.TinyEmitter=r}},o={};function s(i){if(o[i])return o[i].exports;var r=o[i]={exports:{}};return n[i](r,r.exports,s),r.exports}return function(){s.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return s.d(r,{a:r}),r}}(),function(){s.d=function(i,r){for(var a in r)s.o(r,a)&&!s.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:r[a]})}}(),function(){s.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)}}(),s(686)}().default})})(tv);const fu=hk(tv.exports),nv={__name:"MediaButton",emits:["onMediaSelected"],setup(e,{emit:t}){let n=null;const o=()=>{n!=null&&n.open()};Be(()=>{!typeof window.wp.media!=="function"&&(n=window.wp.media({title:"Select or Upload Media Of Your Chosen Persuasion",button:{text:"Use this media"},multiple:!0}),s())});const s=()=>{n.on("select",function(){const i=n.state().get("selection").toJSON();t("onMediaSelected",i)})};return(i,r)=>(M(),N("button",{type:"button",class:"rounded-sm bg-primary-500 py-2 px-4 border-0 shadow text-[14px] font-medium cursor-pointer",onClick:o},[L(b(ob)),fe("Update Image ")]))}},NI={name:"Settings",computed:{View(){return uc}},components:{MediaButton:nv},data(){return{saving:!1,currencies:{},fetching:!0,previewUrl:window.BuyMeCoffeeAdmin.preview_url,predefineColors:["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577","#FFF","#000000"],template:{advanced:{}}}},methods:{onMediaSelected(e){e.length&&(this.template.advanced.image=e[0].url)},changeBgColor(e){this.template.advanced.bgColor=e},changeFontColor(e){this.template.advanced.color=e},getSettings(){this.$get({action:"buymecoffee_admin_ajax",route:"get_settings",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.template=e.data.template,this.currencies=e.data.currencies,this.fetching=!1})},fullPath(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e},resetDefault(){this.saving=!0,this.$post({action:"buymecoffee_admin_ajax",route:"reset_template_settings",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.$handleSuccess(e.data.message),this.template=e.data.settings,this.saving=!1}).fail(e=>{var t,n;this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.saving=!1})},saveTemplates(){this.saving=!0,this.$post({action:"buymecoffee_admin_ajax",route:"save_settings",data:this.template,buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.$handleSuccess(e.data.message),this.saving=!1}).fail(e=>{var t,n;console.log(e),this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.saving=!1})},previewButton(){window.open(this.previewUrl)}},mounted(){this.getSettings(),jQuery(document).ready(function(e){var t=new fu(".copy");t.on("success",function(n){e(n.trigger).text("Copied!"),n.clearSelection(),setTimeout(function(){e(n.trigger).text(n.text)},1e3)})})}},zI={class:"buymecoffee_main_container"},VI={class:"wpm-template-inner"},HI={class:"buymecoffee-editor"},WI={class:"buymecoffee_menu_title"},jI=E("span",{style:{"font-style":"italic","font-size":"13px",color:"#929292","line-height":"1.6em"}},[fe(" Also you can use data params Ex: https://page-link&"),E("code",null,"for=John")],-1),KI={class:"buymecoffee_settings_image"},UI=["src"],qI=["src"],YI={key:1},GI=E("h3",null,"Preview Button Style",-1),XI={style:{display:"flex"}},QI={class:"wpm-btm-render-options"},JI=E("br",null,null,-1),ZI=E("h3",null,"Embed:",-1),eF=E("i",{class:"el-icon-info"},null,-1),tF=E("p",null,"Use Block editor or embed the shortcode on your posts/pages if you want to use the button above. Or use the URL bellow to collect payments from your supporters",-1),nF=E("br",null,null,-1),oF=["src"],sF=E("h4",null,"Or Use ShortCodes:",-1),iF={style:{display:"flex","align-items":"center"}},rF=E("p",null,"Button ShortCode:",-1),aF=E("code",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_button]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_button] ")],-1),lF={style:{display:"flex","align-items":"center"}},cF=E("p",null,"Form ShortCode:",-1),uF=E("code",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_form]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_form] ")],-1),dF={style:{display:"flex","align-items":"center"}},fF=E("p",null,"Form With Template: ",-1),hF=E("code",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_basic]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_basic] ")],-1),pF=["href"],gF=E("code",null,"[buymecoffee_basic custom=10]",-1),mF=["href"],vF=E("br",null,null,-1),bF=E("p",null,[fe("Also you can use custom amount template by adding "),E("code",null,"&custom"),fe(" \xA0 param with your page link like this:")],-1);function yF(e,t,n,o,s,i){const r=Me("CoffeeCup"),a=ls,l=$c,c=$o,u=jc,d=Wc,f=Zg,p=jE,g=Me("MediaButton"),h=Dn,v=Dg,m=Jg,y=Lc,w=fP,_=Rg,x=Io,S=Vc,C=ds("loading");return M(),N("div",zI,[We((M(),q(S,{class:"wpm-template"},{default:F(()=>[E("div",VI,[E("div",HI,[L(S,null,{default:F(()=>[L(_,{md:24,lg:12,style:{background:"linear-gradient(122deg, #ffffff87, #c4fff654)","border-radius":"6px",padding:"24px"}},{default:F(()=>[E("h1",WI,[fe("Buy Me "),L(r,{style:{width:"23px"}}),fe("- Global settings")]),s.fetching?(M(),N("div",YI,[L(w,{rows:5})])):(M(),q(y,{key:0,"label-position":"left","label-width":"140px"},{default:F(()=>[L(m,null,{default:F(()=>[L(f,{label:"General"},{default:F(()=>[L(l,null,{default:F(()=>[L(a,{"true-label":"yes","false-label":"no",modelValue:s.template.formTitle,"onUpdate:modelValue":t[0]||(t[0]=k=>s.template.formTitle=k)},{default:F(()=>[fe("Show form title section")]),_:1},8,["modelValue"])]),_:1}),s.template.formTitle==="yes"?(M(),q(l,{key:0,label:"You Name"},{default:F(()=>[L(c,{size:"small",type:"text",modelValue:s.template.yourName,"onUpdate:modelValue":t[1]||(t[1]=k=>s.template.yourName=k)},null,8,["modelValue"]),jI]),_:1})):X("",!0),L(l,null,{default:F(()=>[L(a,{"true-label":"yes","false-label":"no",modelValue:s.template.enableName,"onUpdate:modelValue":t[2]||(t[2]=k=>s.template.enableName=k)},{default:F(()=>[fe("Collect name of supporter")]),_:1},8,["modelValue"])]),_:1}),L(l,null,{default:F(()=>[L(a,{"true-label":"yes","false-label":"no",modelValue:s.template.enableEmail,"onUpdate:modelValue":t[3]||(t[3]=k=>s.template.enableEmail=k)},{default:F(()=>[fe("Collect email of supporter")]),_:1},8,["modelValue"])]),_:1}),L(l,null,{default:F(()=>[L(a,{"true-label":"yes","false-label":"no",modelValue:s.template.enableMessage,"onUpdate:modelValue":t[4]||(t[4]=k=>s.template.enableMessage=k)},{default:F(()=>[fe("Enable message option when donate")]),_:1},8,["modelValue"])]),_:1}),L(l,{label:"Per coffee price"},{default:F(()=>[L(c,{type:"number",modelValue:s.template.defaultAmount,"onUpdate:modelValue":t[5]||(t[5]=k=>s.template.defaultAmount=k)},null,8,["modelValue"])]),_:1}),L(l,{label:"Currency"},{default:F(()=>[L(d,{class:"wpm_currency_select",filterable:"",modelValue:s.template.currency,"onUpdate:modelValue":t[6]||(t[6]=k=>s.template.currency=k),placeholder:"Select Currency"},{default:F(()=>[(M(!0),N(Ge,null,Lt(s.currencies,(k,T)=>(M(),q(u,{key:T,label:k,value:T},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),L(f,{label:"Template Settings"},{default:F(()=>[L(l,{label:"Button text"},{default:F(()=>[L(c,{size:"small",type:"text",modelValue:s.template.buttonText,"onUpdate:modelValue":t[7]||(t[7]=k=>s.template.buttonText=k)},null,8,["modelValue"])]),_:1}),L(l,{label:"Button color"},{default:F(()=>[L(p,{size:"small",onActiveChange:i.changeBgColor,modelValue:s.template.advanced.bgColor,"onUpdate:modelValue":t[8]||(t[8]=k=>s.template.advanced.bgColor=k),"show-alpha":"",predefine:s.predefineColors},null,8,["onActiveChange","modelValue","predefine"])]),_:1}),L(l,{label:"Button Text color"},{default:F(()=>[L(p,{size:"small",onActiveChange:i.changeFontColor,modelValue:s.template.advanced.color,"onUpdate:modelValue":t[9]||(t[9]=k=>s.template.advanced.color=k),"show-alpha":"",predefine:s.predefineColors},null,8,["onActiveChange","modelValue","predefine"])]),_:1}),L(l,{label:"Button Radius(px)"},{default:F(()=>[L(c,{style:{width:"50%"},type:"number",size:"small",modelValue:s.template.advanced.radius,"onUpdate:modelValue":t[10]||(t[10]=k=>s.template.advanced.radius=k)},null,8,["modelValue"])]),_:1}),L(l,{label:"Your Quotes"},{default:F(()=>[L(c,{type:"textarea",size:"small",modelValue:s.template.advanced.quote,"onUpdate:modelValue":t[11]||(t[11]=k=>s.template.advanced.quote=k)},null,8,["modelValue"])]),_:1}),L(l,{label:""},{default:F(()=>[E("div",KI,[E("div",null,[L(g,{onOnMediaSelected:i.onMediaSelected},null,8,["onOnMediaSelected"])]),s.template.advanced.image?(M(),N("img",{key:0,width:"120",height:"120",src:s.template.advanced.image},null,8,UI)):(M(),N("img",{key:1,width:"120",height:"120",src:i.fullPath("profile.png")},null,8,qI))])]),_:1})]),_:1}),E("div",null,[L(v,{onConfirm:i.resetDefault,title:"Are you sure to reset to default settings?"},{reference:F(()=>[L(h,{plain:"",style:{"margin-top":"12px"},type:"warning",size:"default"},{default:F(()=>[fe(" Reset Default ")]),_:1})]),_:1},8,["onConfirm"]),L(h,{plain:"",style:{"margin-top":"12px"},onClick:i.saveTemplates,type:"success",size:"default"},{default:F(()=>[fe(" Save Settings ")]),_:1},8,["onClick"])])]),_:1})]),_:1}))]),_:1}),L(_,{md:24,lg:12,class:"wpm-btm-preview",style:{padding:"24px",background:"white","border-top-right-radius":"6px","border-bottom-right-radius":"6px"}},{default:F(()=>[GI,E("div",XI,[E("button",{style:Te([{cursor:"pointer"},{"background-color":s.template.advanced.bgColor,color:s.template.advanced.color,"border-radius":s.template.advanced.radius+"px",padding:"8px 20px",border:"none",height:"50px","font-size":s.template.advanced.fontSize+"px"}]),size:"default",onClick:t[12]||(t[12]=(...k)=>i.previewButton&&i.previewButton(...k))},ce(s.template.buttonText),5)]),E("div",QI,[JI,ZI,eF,tF,nF,E("img",{src:i.fullPath("blocks.jpeg"),alt:"Block editor",style:{width:"80%",opacity:"0.3"}},null,8,oF),sF,E("div",iF,[rF,E("div",null,[L(x,{effect:"dark",content:"Click to copy shortcode",title:"Click to copy shortcode",placement:"top"},{default:F(()=>[aF]),_:1})])]),E("div",lF,[cF,E("div",null,[L(x,{effect:"dark",content:"Click to copy shortcode",title:"Click to copy shortcode",placement:"top"},{default:F(()=>[uF]),_:1})])]),E("div",dF,[fF,E("div",null,[L(x,{effect:"dark",content:"Click to copy shortcode",title:"Click to copy shortcode",placement:"top"},{default:F(()=>[hF]),_:1})]),E("a",{style:{"margin-left":"12px",color:"#e88b0d","text-decoration":"none"},href:s.previewUrl,target:"_blank"},"Preview",8,pF)]),fe(" For custom amount: "),gF,E("a",{style:{color:"#e88b0d","text-decoration":"none"},target:"_blank",href:s.previewUrl+"&custom=10"},"Preview",8,mF),vF,bF,E("p",null,ce(s.previewUrl)+"&custom=10",1)])]),_:1})]),_:1})])])]),_:1})),[[C,s.saving]])])}const _F=kn(NI,[["render",yF]]),wF={name:"paypal_settings",data(){return{settings:{},saving:!1,fetching:!1,labelPosition:"right",webhook_url:""}},methods:{getSettings(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_data",data:{method:"paypal"},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.settings=e.data.settings,this.webhook_url=e.data.webhook_url,this.fetching=!1}).fail(e=>{this.$message.error(e.responseJSON.data.message)}).always(()=>{this.fetching=!1})},saveSettings(){this.saving=!0,this.$post({action:"buymecoffee_admin_ajax",route:"save_payment_settings",data:{method:"paypal",settings:this.settings},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{var t;this.$handleSuccess((t=e==null?void 0:e.data)==null?void 0:t.message)}).fail(e=>{var t,n;this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.saving=!1})}},mounted(){this.getSettings(),jQuery(document).ready(function(e){var t=new fu(".copy");t.on("success",function(n){e(n.trigger).text("Copied!"),n.clearSelection(),setTimeout(function(){e(n.trigger).text(n.text)},1e3)})})}},xF={class:"buymecoffee_main_container"},SF={class:"buymecoffee_wrapper buymecoffee_payment_settings"},CF={class:"buymecoffee_header"},kF={class:"buymecoffee_title"},EF={style:{"margin-bottom":"23px"}},MF={key:0},PF={key:1},TF=E("p",null,"If you are unable to use Payment Data Transfer and payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases.",-1),OF={class:"buymecoffee_settings_section"},AF=E("p",null,"Please use IPN url to get marked paid on you site.",-1),RF=E("b",null,"IPN URL: ",-1),LF=["data-clipboard-text"],$F=E("i",{class:"el-icon-document"},null,-1),IF={class:"action_right",style:{"margin-top":"24px"}};function FF(e,t,n,o,s,i){const r=Me("router-link"),a=Ng,l=Pg,c=Tg,u=$c,d=$o,f=Zg,p=Jg,g=Io,h=Dn,v=Lc,m=ds("loading");return We((M(),N("div",xF,[E("div",SF,[E("div",CF,[E("h3",kF,[L(r,{style:{"text-decoration":"none"},to:{name:"Gateway"}}),fe("PayPal Gateway Settings: ")])]),E("div",EF,[E("label",null,[fe("Enable PayPal Payment "),L(a,{"active-value":"yes","inactive-value":"no","active-text":"Enable PayPal",modelValue:s.settings.enable,"onUpdate:modelValue":t[0]||(t[0]=y=>s.settings.enable=y)},null,8,["modelValue"])])]),E("div",{class:R(["buymecoffee_section_body",s.settings.enable!=="yes"?"payment-inactive":""])},[L(v,{"label-position":s.labelPosition,rel:"paypal_settings",model:s.settings,"label-width":"220px"},{default:F(()=>[L(u,{label:"PayPal Payment Mode"},{default:F(()=>[L(c,{modelValue:s.settings.payment_mode,"onUpdate:modelValue":t[1]||(t[1]=y=>s.settings.payment_mode=y)},{default:F(()=>[L(l,{label:"test"},{default:F(()=>[fe("Sandbox Mode")]),_:1}),L(l,{label:"live"},{default:F(()=>[fe("Live Mode")]),_:1})]),_:1},8,["modelValue"])]),_:1}),L(p,{modelValue:s.settings.payment_type,"onUpdate:modelValue":t[6]||(t[6]=y=>s.settings.payment_type=y),class:"demo-tabs"},{default:F(()=>[L(f,{label:"PayPal pro",name:"pro"},{default:F(()=>[s.settings.payment_mode==="test"?(M(),N("div",MF,[L(u,{label:"Test Public key"},{default:F(()=>[L(d,{type:"text",size:"small",modelValue:s.settings.test_public_key,"onUpdate:modelValue":t[2]||(t[2]=y=>s.settings.test_public_key=y),placeholder:"Public key from paypal dashboard"},null,8,["modelValue"])]),_:1})])):(M(),N("div",PF,[L(u,{label:"Live Public key"},{default:F(()=>[L(d,{type:"text",size:"small",modelValue:s.settings.live_public_key,"onUpdate:modelValue":t[3]||(t[3]=y=>s.settings.live_public_key=y),placeholder:"Public key from paypal dashboard"},null,8,["modelValue"])]),_:1})]))]),_:1}),L(f,{label:"Paypal Standard",name:"standard"},{default:F(()=>[L(u,{label:"Paypal Email"},{default:F(()=>[L(d,{type:"text",size:"small",modelValue:s.settings.paypal_email,"onUpdate:modelValue":t[4]||(t[4]=y=>s.settings.paypal_email=y),placeholder:"Paypal Email Address"},null,8,["modelValue"])]),_:1}),L(u,{label:"Disable PayPal IPN Verification"},{default:F(()=>[L(a,{"active-value":"yes","inactive-value":"no",modelValue:s.settings.disable_ipn_verification,"onUpdate:modelValue":t[5]||(t[5]=y=>s.settings.disable_ipn_verification=y)},null,8,["modelValue"]),TF]),_:1})]),_:1})]),_:1},8,["modelValue"]),E("div",OF,[AF,RF,L(g,{effect:"dark",content:"Click to copy",title:"Click to copy",placement:"top"},{default:F(()=>[E("code",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":s.webhook_url},[$F,fe(" "+ce(s.webhook_url),1)],8,LF)]),_:1})]),E("div",IF,[L(h,{onClick:t[7]||(t[7]=y=>i.saveSettings()),type:"primary",size:"default"},{default:F(()=>[fe("Save PayPal Settings")]),_:1})])]),_:1},8,["label-position","model"])],2)])])),[[m,s.fetching]])}const DF=kn(wF,[["render",FF]]),BF={name:"settings",data(){return{settings:{},saving:!1,fetching:!1,labelPosition:"right",webhook_url:""}},methods:{getSettings(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_data",data:{method:"stripe"},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.settings=e.data.settings,this.webhook_url=e.data.webhook_url}).fail(e=>{var t,n;this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.fetching=!1})},saveSettings(){this.saving=!0,this.$post({action:"buymecoffee_admin_ajax",data:{settings:this.settings,method:"stripe"},route:"save_payment_settings",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.$handleSuccess(e.data.message)}).fail(e=>{var t,n;this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.saving=!1})}},mounted(){this.getSettings()}},NF={class:"buymecoffee_main_container"},zF={class:"buymecoffee_wrapper buymecoffee_payment_settings"},VF={class:"buymecoffee_title"},HF={style:{"margin-bottom":"23px"}},WF={key:0,class:"buymecoffee_settings_section"},jF=E("h3",null,"Stripe Test Keys",-1),KF={key:1,class:"buymecoffee_settings_section"},UF=E("h3",null,"Stripe Live Keys",-1),qF={class:"buymecoffee_settings_section"},YF=E("p",null,[fe("In order for Stripe to function completely for subscription/recurring payments, you must configure your Stripe webhooks. Visit your "),E("a",{href:"https://dashboard.stripe.com/account/webhooks",target:"_blank",rel:"noopener"},"account dashboard"),fe(" to configure them. Please add a webhook endpoint for the URL below.")],-1),GF=E("b",null,"Webhook URL: ",-1),XF={class:"action_right"};function QF(e,t,n,o,s,i){const r=Me("router-link"),a=Ng,l=Pg,c=Tg,u=$c,d=$o,f=Dn,p=Lc,g=ds("loading");return We((M(),N("div",NF,[E("div",zF,[E("h3",VF,[L(r,{style:{"text-decoration":"none"},to:{name:"Gateway"}}),fe("Stripe Gateway Settings: ")]),E("div",HF,[E("label",null,[fe("Enable Stripe Payment "),L(a,{"active-value":"yes","inactive-value":"no","active-text":"Enable stripe",modelValue:s.settings.enable,"onUpdate:modelValue":t[0]||(t[0]=h=>s.settings.enable=h)},null,8,["modelValue"])])]),E("div",{class:R(["buymecoffee_section_body",s.settings.enable!=="yes"?"payment-inactive":""])},[L(p,{"label-position":s.labelPosition,rel:"stripe_settings",model:s.settings,"label-width":"220px"},{default:F(()=>[L(u,{label:"Stripe Payment Mode"},{default:F(()=>[L(c,{modelValue:s.settings.payment_mode,"onUpdate:modelValue":t[1]||(t[1]=h=>s.settings.payment_mode=h)},{default:F(()=>[L(l,{label:"test"},{default:F(()=>[fe("Test Mode")]),_:1}),L(l,{label:"live"},{default:F(()=>[fe("Live Mode")]),_:1})]),_:1},8,["modelValue"])]),_:1}),s.settings.payment_mode!=="live"?(M(),N("div",WF,[jF,L(u,{label:"Test Publishable key"},{default:F(()=>[L(d,{type:"text",size:"small",modelValue:s.settings.test_pub_key,"onUpdate:modelValue":t[2]||(t[2]=h=>s.settings.test_pub_key=h),placeholder:"Test Publishable key"},null,8,["modelValue"])]),_:1}),L(u,{label:"Test Secret key"},{default:F(()=>[L(d,{type:"password",size:"small",modelValue:s.settings.test_secret_key,"onUpdate:modelValue":t[3]||(t[3]=h=>s.settings.test_secret_key=h),placeholder:"Test Secret key"},null,8,["modelValue"])]),_:1})])):(M(),N("div",KF,[UF,L(u,{label:"Live Publishable key"},{default:F(()=>[L(d,{type:"text",size:"small",modelValue:s.settings.live_pub_key,"onUpdate:modelValue":t[4]||(t[4]=h=>s.settings.live_pub_key=h),placeholder:"Live Publishable key"},null,8,["modelValue"])]),_:1}),L(u,{label:"Live Secret key"},{default:F(()=>[L(d,{type:"password",size:"small",modelValue:s.settings.live_secret_key,"onUpdate:modelValue":t[5]||(t[5]=h=>s.settings.live_secret_key=h),placeholder:"Live Secret key"},null,8,["modelValue"])]),_:1})])),E("div",qF,[YF,E("p",null,[GF,E("code",null,ce(s.webhook_url),1)])]),E("div",XF,[L(f,{onClick:t[6]||(t[6]=h=>i.saveSettings()),type:"primary",size:"default"},{default:F(()=>[fe("Save Settings")]),_:1})])]),_:1},8,["label-position","model"])],2)])])),[[g,s.fetching]])}const ov=kn(BF,[["render",QF]]),JF={name:"Gateway",data(){return{gateways:[],current_route:this.$route.name}},methods:{getImage(e){return window.BuyMeCoffeeAdmin.assets_url+"/images/"+e},goto(){this.$router.push({name:"stripe"})},getAllMethods(){this.$get({action:"buymecoffee_admin_ajax",route:"gateways",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.gateways=e.data}).catch(e=>{console.log(e)})}},computed:{},watch:{},mounted(){this.getAllMethods()}},ZF=e=>(Yi("data-v-3cbf6993"),e=e(),Gi(),e),eD={class:"buymecoffee_main_container"},tD=ZF(()=>E("h1",{class:"buymecoffee_menu_title"},"Payment Gateways",-1)),nD={class:"buymecoffee_gateway_menu"},oD=["onClick"],sD=["src"];function iD(e,t,n,o,s,i){const r=Me("router-view"),a=Vc;return M(),N("div",eD,[L(a,{class:"buymecoffee_gateways"},{default:F(()=>[tD,E("div",nD,[(M(!0),N(Ge,null,Lt(s.gateways,(l,c)=>(M(),N("div",{key:c,class:"buymecoffee_gateway_item",onClick:()=>this.$router.push({name:l.route})},[E("div",{class:R("buymecoffee_gateway_"+l.route+(l.route===s.current_route?" active":""))},[E("img",{src:l.image,style:{width:"70px","max-width":"70px"},class:"image"},null,8,sD)],2)],8,oD))),128))]),L(r)]),_:1})])}const rD=kn(JF,[["render",iD],["__scopeId","data-v-3cbf6993"]]),aD={name:"Supporter",data(){return{supporter:{},loading:!1,paymentStatus:"",val:"Hello from Supports",options:[{value:"pending",label:"Pending"},{value:"paid",label:"Paid"},{value:"refunded",label:"Refunded"},{value:"cancelled",label:"Cancelled"},{value:"failed",label:"Failed"},{value:"paid-initially",label:"Paid Initially"}]}},components:{ElMessageBox:jd,Coffee:Zh,User:ep,Money:tp},methods:{getTransactionUrl(){var e,t,n,o,s,i;return this.supporter.payment_method==="paypal"?this.supporter.payment_mode!=="live"?"https://www.sandbox.paypal.com/activity/payment/"+((t=(e=this.supporter)==null?void 0:e.transaction)==null?void 0:t.charge_id):"https://www.paypal.com/activity/payment/"+((o=(n=this.supporter)==null?void 0:n.transaction)==null?void 0:o.charge_id):"https://dashboard.stripe.com/test/payments/"+((i=(s=this.supporter)==null?void 0:s.transaction)==null?void 0:i.charge_id)},getImage(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e},updateStatus(){jd.confirm("Are you sure to change payment status?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(()=>{this.$post({action:"buymecoffee_admin_ajax",route:"update_payment_status",data:{id:this.$route.params.id,status:this.paymentStatus},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.getSupporter(),this.$handleSuccess("Updated Successfully")})}).catch(()=>{gO({type:"info",message:"Update canceled"})})},getSupporter(){this.loading=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_supporter",data:{id:this.$route.params.id},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.supporter=e.data,this.paymentStatus=e.data.payment_status,this.loading=!1}).catch(e=>{this.loading=!1,this.$handleError(e)})}},mounted(){this.getSupporter()}},lD={class:"buymecoffee_supporter_main_container"},cD={class:"buymecoffee_title"},uD={class:"wpm_supporter_profile_wrapper"},dD={class:"wpm_supporter_profile_section"},fD=["src"],hD={key:0,class:"wpm_supporter_profile_name"},pD={key:1,class:"wpm_supporter_profile_name"},gD={key:2,class:"wpm_supporter_profile_email"},mD=["href"],vD={key:3,class:"wpm_supporter_profile_email"},bD=E("p",{id:"supporters_email"},"No Email",-1),yD=[bD],_D={class:"wpm_supporter_message"},wD=E("div",{class:"wpm_supporter_payment_line"},null,-1),xD={class:"wpm_supporter_payment_wrapper"},SD={class:"wpm_supporter_items"},CD={class:"wpm_supporter_payments"},kD=E("thead",null,null,-1),ED=E("td",null,"Payment Method",-1),MD=["src"],PD={key:1},TD=E("td",null,"Payment Status",-1),OD=["href"],AD={key:0},RD=E("td",null,"Payment Mode",-1),LD=E("td",{style:{"text-transform":"capitalize"}},"Coffee For",-1),$D={key:1},ID=E("td",{style:{"text-transform":"capitalize"}},"Message",-1),FD=E("td",null,"Submission Hash:",-1),DD={style:{"font-family":"monospace"}},BD=E("td",null,"Transaction URL:",-1),ND={style:{"font-family":"monospace"}},zD=["href"],VD={style:{"font-family":"monospace"}},HD={class:"wpm_supporter_payment_actions"};function WD(e,t,n,o,s,i){var f,p,g,h,v,m,y,w,_,x,S,C,k;const r=Me("router-link"),a=Me("Coffee"),l=Me("Money"),c=jc,u=Wc,d=ds("loading");return We((M(),N("div",lD,[E("h3",cD,[L(r,{style:{"text-decoration":"none"},to:{name:"Dashboard"}},{default:F(()=>[fe("Supporters / ")]),_:1}),fe(ce(e.$route.params.id),1)]),E("div",uD,[E("div",dD,[(f=s.supporter)!=null&&f.supporters_image?(M(),N("img",{key:0,src:(p=s.supporter)==null?void 0:p.supporters_image,alt:"Supporter's Image",class:"wpm_supporter_profile_image"},null,8,fD)):X("",!0)]),E("div",null,[(g=s.supporter)!=null&&g.supporters_name?(M(),N("h3",hD,ce((h=s.supporter)==null?void 0:h.supporters_name),1)):(M(),N("h3",pD,"Anonymous")),(v=s.supporter)!=null&&v.supporters_email?(M(),N("p",gD,[E("a",{href:"mailto:"+((m=s.supporter)==null?void 0:m.supporters_email),id:"supporters_email"},ce((y=s.supporter)==null?void 0:y.supporters_email),9,mD)])):(M(),N("p",vD,yD)),E("p",_D,ce((w=s.supporter)==null?void 0:w.supporters_message),1)])]),wD,E("div",xD,[E("div",null,[E("div",SD,[E("div",null,[L(a),E("span",null,ce(parseInt((_=s.supporter)==null?void 0:_.coffee_count)),1)]),E("div",null,[L(l),E("span",null,ce(parseInt(((x=s.supporter)==null?void 0:x.payment_total)/100))+" "+ce((S=s.supporter)==null?void 0:S.currency),1)])]),E("table",CD,[kD,E("tbody",null,[E("tr",null,[ED,E("td",null,[s.supporter.payment_method==="paypal"?(M(),N("img",{key:0,width:"64",src:i.getImage("PayPal.svg")},null,8,MD)):(M(),N("span",PD,ce(s.supporter.payment_method),1))])]),E("tr",null,[TD,E("td",null,[E("span",{class:R("buymecoffee_status buymecoffee_status_"+s.supporter.payment_status)},[fe(ce(s.supporter.payment_status)+" ",1),s.supporter.payment_status==="paid-initially"?(M(),N("a",{key:0,href:i.getTransactionUrl()},"Needs to verify",8,OD)):X("",!0)],2)])]),s.supporter.payment_mode?(M(),N("tr",AD,[RD,E("td",null,ce(s.supporter.payment_mode),1)])):X("",!0),E("tr",null,[LD,E("td",null,ce(s.supporter.reference),1)]),s.supporter.supporters_message?(M(),N("tr",$D,[ID,E("td",null,ce(s.supporter.supporters_message),1)])):X("",!0),E("tr",null,[FD,E("td",DD,ce(s.supporter.entry_hash),1)]),E("tr",null,[BD,E("td",ND,[E("a",{target:"_blank",href:i.getTransactionUrl()},ce((k=(C=s.supporter)==null?void 0:C.transaction)==null?void 0:k.charge_id),9,zD)])]),E("tr",null,[E("td",VD,ce(s.supporter.created_at),1)])])])]),E("div",null,[E("div",HD,[L(u,{modelValue:s.paymentStatus,"onUpdate:modelValue":t[0]||(t[0]=T=>s.paymentStatus=T),onChange:i.updateStatus},{default:F(()=>[(M(!0),N(Ge,null,Lt(s.options,T=>(M(),q(c,{key:T.value,label:T.label,value:T.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])])])])),[[d,s.loading]])}const jD=kn(aD,[["render",WD]]),KD={name:"Onboarding",components:{DArrowLeft:qh,DArrowRight:Yh,MediaButton:nv,Share:sb,InfoFilled:ib,DocumentCopy:rb,Stripe:ov},data(){return{active:1,saving:!1,previewUrl:window.BuyMeCoffeeAdmin.preview_url,template:{advanced:{}},currencies:[],fetching:!1}},methods:{getSettings(){this.$get({action:"buymecoffee_admin_ajax",route:"get_settings",buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.template=e.data.template,this.currencies=e.data.currencies,this.fetching=!1})},onMediaSelected(e){e.length&&(this.template.advanced.image=e[0].url)},gotoPage(){window.open(this.previewUrl,"_blank")},fullPath(e){return window.BuyMeCoffeeAdmin.assets_url+"images/"+e},prev(){this.active>0&&(this.active=this.active-1)},next(){this.active==1&&(this.saving=!0,this.$post({action:"buymecoffee_admin_ajax",route:"save_settings",data:this.template,buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{this.saving=!1}).fail(e=>{console.log(e)}).always(()=>{this.saving=!1})),this.active===2&&this.$refs.stripeRef.saveSettings(),this.active<3&&(this.active=this.active+1)}},mounted(){this.getSettings(),jQuery(document).ready(function(e){var t=new fu(".copy");t.on("success",function(n){e(n.trigger).text("Copied!"),n.clearSelection(),setTimeout(function(){e(n.trigger).text(n.text)},1e3)})})}},Nn=e=>(Yi("data-v-a4748953"),e=e(),Gi(),e),UD={class:"buymecoffee_onboard_wrapper"},qD={class:"buymecoffee_onboard_content"},YD={key:0,class:"profile_section"},GD={class:"profile_image"},XD=["src"],QD=["src"],JD=Nn(()=>E("br",null,null,-1)),ZD={class:"profile_name",style:{"margin-top":"32px"}},eB=Nn(()=>E("label",null,"Collect donation for",-1)),tB={key:1,class:"quick_payment_section"},nB={key:2,class:"quick_done_section"},oB=Nn(()=>E("h1",{style:{"margin-bottom":"32px"}}," Congratulations \u{1F389} Everything done! ",-1)),sB={style:{display:"inline"}},iB={style:{"margin-bottom":"32px"}},rB=["href"],aB=Nn(()=>E("br",null,null,-1)),lB=Nn(()=>E("br",null,null,-1)),cB=Nn(()=>E("br",null,null,-1)),uB=Nn(()=>E("p",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_basic]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_basic] ")],-1)),dB=Nn(()=>E("p",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_form]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_form] ")],-1)),fB=Nn(()=>E("p",{class:"copy","data-clipboard-action":"copy","data-clipboard-text":"[buymecoffee_button]"},[E("i",{class:"el-icon-document"}),fe(" [buymecoffee_button] ")],-1)),hB={style:{"text-align":"center"}},pB={class:"buymecoffee_onboard_stepper"},gB=Nn(()=>E("h3",null,"Quick setup",-1));function mB(e,t,n,o,s,i){const r=Me("MediaButton"),a=$o,l=Me("Stripe"),c=Me("Share"),u=$e,d=Me("InfoFilled"),f=Io,p=Me("DArrowLeft"),g=Dn,h=Me("DArrowRight"),v=xP,m=wP;return M(),N("div",null,[E("div",UD,[E("div",qD,[E("div",null,[s.active==1?(M(),N("div",YD,[E("div",GD,[s.template.advanced.image?(M(),N("img",{key:0,width:"120",height:"120",src:s.template.advanced.image},null,8,XD)):(M(),N("img",{key:1,width:"120",height:"120",src:i.fullPath("profile.png")},null,8,QD)),L(r,{class:"quick_media",onOnMediaSelected:i.onMediaSelected},null,8,["onOnMediaSelected"]),fe(),JD]),E("div",ZD,[eB,L(a,{size:"large",modelValue:s.template.yourName,"onUpdate:modelValue":t[0]||(t[0]=y=>s.template.yourName=y)},null,8,["modelValue"])])])):s.active==2?(M(),N("div",tB,[L(l,{ref:"stripeRef",onSave_settings:e.saveSettings},null,8,["onSave_settings"])])):s.active==3?(M(),N("div",nB,[oB,E("div",null,[E("div",sB,[E("h3",iB,[L(u,null,{default:F(()=>[L(c)]),_:1}),fe(" Share your page "),E("a",{target:"_blank",href:s.previewUrl},ce(s.previewUrl),9,rB),aB])]),L(u,null,{default:F(()=>[L(d)]),_:1}),fe(' You can build your own page using block editor "BuyMeCoffee" or use available shortcodes '),lB,cB,L(f,{effect:"light",content:"Click to copy shortcode",title:"Click to copy shortcode","show-after":1e3,placement:"right"},{default:F(()=>[uB]),_:1}),L(f,{effect:"light","show-after":1e3,content:"Click to copy shortcode",title:"Click to copy shortcode",placement:"right"},{default:F(()=>[dB]),_:1}),L(f,{effect:"light","show-after":1e3,content:"Click to copy shortcode",title:"Click to copy shortcode",placement:"right"},{default:F(()=>[fB]),_:1})])])):X("",!0)]),E("div",hB,[L(g,{disabled:s.active<2,onClick:i.prev},{default:F(()=>[L(u,null,{default:F(()=>[L(p)]),_:1}),fe(" \xA0 Prev ")]),_:1},8,["disabled","onClick"]),s.active<3?(M(),q(g,{key:0,disabled:s.active>2,onClick:i.next},{default:F(()=>[fe("Next \xA0 "),L(u,null,{default:F(()=>[L(h)]),_:1})]),_:1},8,["disabled","onClick"])):X("",!0),s.active==3?(M(),q(g,{key:1,type:"success",plain:"",onClick:t[1]||(t[1]=y=>i.gotoPage())},{default:F(()=>[fe("View Page")]),_:1})):X("",!0)])]),E("div",pB,[gB,L(m,{direction:"vertical","finish-status":"success",style:{"margin-top":"23px"},active:s.active},{default:F(()=>[L(v,{title:"Profile"}),L(v,{title:"Payment"}),L(v,{title:"Done"})]),_:1},8,["active"]),L(g,{class:"el-button el-button--text",style:{"margin-top":"12px"},onClick:t[2]||(t[2]=y=>e.$router.push("/"))},{default:F(()=>[fe("Skip Setup for later")]),_:1})])])])}const vB=kn(KD,[["render",mB],["__scopeId","data-v-a4748953"]]),bB={name:"Supporters",data(){return{current:0,total:0,posts_per_page:10,supporters:[]}},components:{SupportersTable:nm},methods:{getSupporters(){this.fetching=!0,this.$get({action:"buymecoffee_admin_ajax",route:"get_supporters",data:{limit:this.limit,page:this.current,posts_per_page:this.posts_per_page},buymecoffee_nonce:window.BuyMeCoffeeAdmin.buymecoffee_nonce}).then(e=>{var t,n,o;this.supporters=(t=e==null?void 0:e.data)==null?void 0:t.supporters,this.total=(n=e==null?void 0:e.data)==null?void 0:n.total,this.reportData=(o=e==null?void 0:e.data)==null?void 0:o.reports,this.fetching=!1}).fail(e=>{var t,n;this.$message.error((n=(t=e==null?void 0:e.responseJSON)==null?void 0:t.data)==null?void 0:n.message)}).always(()=>{this.fetching=!1})}},mounted(){this.getSupporters()}},yB=e=>(Yi("data-v-e8e8ed3c"),e=e(),Gi(),e),_B={class:"buymecoffee_main_container"},wB={class:"buymecoffee_supporters"},xB=yB(()=>E("h1",{class:"buymecoffee_menu_title"},"Supporters",-1));function SB(e,t,n,o,s,i){const r=Rg,a=Vc,l=Me("SupportersTable");return M(),N("div",_B,[E("div",wB,[L(a,null,{default:F(()=>[L(r,{span:12},{default:F(()=>[xB]),_:1}),L(r,{span:12})]),_:1}),L(l,{onPageChanged:t[0]||(t[0]=c=>{s.current=c,i.getSupporters()}),onFetchSupporters:t[1]||(t[1]=()=>i.getSupporters()),supporters:s.supporters,posts_per_page:s.posts_per_page,current:s.current,total:s.total},null,8,["supporters","posts_per_page","current","total"])])])}const CB=kn(bB,[["render",SB],["__scopeId","data-v-e8e8ed3c"]]),kB=[{path:"/",name:"Dashboard",component:BI,meta:{active:"dashboard"}},{path:"/supporters",name:"Supporters",component:CB,meta:{active:"supporters"}},{path:"/settings",name:"Settings",component:_F},{path:"/supporter/:id",name:"Supporter",component:jD},{path:"/gateway",name:"Gateway",component:rD,exact:!0,children:[{path:"/paypal",name:"paypal",component:DF,exact:!0},{path:"/stripe",name:"stripe",component:ov,exact:!0}]},{path:"/quick-setup",name:"Onboarding",component:vB,exact:!0}];/*!
     61 */(function(e,t){(function(o,s){e.exports=s()})(fk,function(){return function(){var n={686:function(i,r,a){a.d(r,{default:function(){return de}});var l=a(279),c=a.n(l),u=a(370),d=a.n(u),f=a(817),p=a.n(f);function g(J){try{return document.execCommand(J)}catch{return!1}}var h=function(G){var B,exact:!0}];/*!
    6262  * vue-router v4.2.5
    6363  * (c) 2023 Eduardo San Martin Morote
    6464  * @license MIT
    65   */const ys=typeof window<"u";function EB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const je=Object.assign;function ol(e,t){const n={};for(const o in t){const s=t[o];n[o]=Sn(s)?s.map(e):e(s)}return n}const ki=()=>{},Sn=Array.isArray,MB=/\/$/,PB=e=>e.replace(MB,"");function sl(e,t,n="/"){let o,s={},i="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(o=o||t.slice(0,a),r=t.slice(a,t.length)),o=RB(o!=null?o:t,n),{fullPath:o+(i&&"?")+i+r,path:o,query:s,hash:r}}function TB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function gh(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function OB(e,t,n){const o=t.matched.length-1,s=n.matched.length-1;return o>-1&&o===s&&Bs(t.matched[o],n.matched[s])&&sv(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Bs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function sv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!AB(e[n],t[n]))return!1;return!0}function AB(e,t){return Sn(e)?mh(e,t):Sn(t)?mh(t,e):e===t}function mh(e,t){return Sn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function RB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),s=o[o.length-1];(s===".."||s===".")&&o.push("");let i=n.length-1,r,a;for(r=0;r<o.length;r++)if(a=o[r],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(r-(r===o.length?1:0)).join("/")}var Ki;(function(e){e.pop="pop",e.push="push"})(Ki||(Ki={}));var Ei;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ei||(Ei={}));function LB(e){if(!e)if(ys){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PB(e)}const $B=/^[^#]+#/;function IB(e,t){return e.replace($B,"#")+t}function FB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Oa=()=>({left:window.pageXOffset,top:window.pageYOffset});function DB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=FB(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function vh(e,t){return(history.state?history.state.position-t:-1)+e}const tc=new Map;function BB(e,t){tc.set(e,t)}function NB(e){const t=tc.get(e);return tc.delete(e),t}let zB=()=>location.protocol+"//"+location.host;function iv(e,t){const{pathname:n,search:o,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),gh(l,"")}return gh(n,e)+o+s}function VB(e,t,n,o){let s=[],i=[],r=null;const a=({state:f})=>{const p=iv(e,location),g=n.value,h=t.value;let v=0;if(f){if(n.value=p,t.value=f,r&&r===g){r=null;return}v=h?f.position-h.position:0}else o(p);s.forEach(m=>{m(n.value,g,{delta:v,type:Ki.pop,direction:v?v>0?Ei.forward:Ei.back:Ei.unknown})})};function l(){r=n.value}function c(f){s.push(f);const p=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(p),p}function u(){const{history:f}=window;!f.state||f.replaceState(je({},f.state,{scroll:Oa()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function bh(e,t,n,o=!1,s=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:s?Oa():null}}function HB(e){const{history:t,location:n}=window,o={value:iv(e,n)},s={value:t.state};s.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:zB()+e+l;try{t[u?"replaceState":"pushState"](c,"",f),s.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function r(l,c){const u=je({},t.state,bh(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});i(l,u,!0),o.value=l}function a(l,c){const u=je({},s.value,t.state,{forward:l,scroll:Oa()});i(u.current,u,!0);const d=je({},bh(o.value,l,null),{position:u.position+1},c);i(l,d,!1),o.value=l}return{location:o,state:s,push:a,replace:r}}function WB(e){e=LB(e);const t=HB(e),n=VB(e,t.state,t.location,t.replace);function o(i,r=!0){r||n.pauseListeners(),history.go(i)}const s=je({location:"",base:e,go:o,createHref:IB.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function jB(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),WB(e)}function KB(e){return typeof e=="string"||e&&typeof e=="object"}function rv(e){return typeof e=="string"||typeof e=="symbol"}const ho={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},av=Symbol("");var yh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(yh||(yh={}));function Ns(e,t){return je(new Error,{type:e,[av]:!0},t)}function Un(e,t){return e instanceof Error&&av in e&&(t==null||!!(e.type&t))}const _h="[^/]+?",UB={sensitive:!1,strict:!1,start:!0,end:!0},qB=/[.+*?^${}()[\]/\\]/g;function YB(e,t){const n=je({},UB,t),o=[];let s=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;d<c.length;d++){const f=c[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(s+="/"),s+=f.value.replace(qB,"\\$&"),p+=40;else if(f.type===1){const{value:g,repeatable:h,optional:v,regexp:m}=f;i.push({name:g,repeatable:h,optional:v});const y=m||_h;if(y!==_h){p+=10;try{new RegExp(`(${y})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${g}" (${y}): `+_.message)}}let w=h?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;d||(w=v&&c.length<2?`(?:/${w})`:"/"+w),v&&(w+="?"),s+=w,p+=20,v&&(p+=-8),h&&(p+=-20),y===".*"&&(p+=-50)}u.push(p)}o.push(u)}if(n.strict&&n.end){const c=o.length-1;o[c][o[c].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const r=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let f=1;f<u.length;f++){const p=u[f]||"",g=i[f-1];d[g.name]=p&&g.repeatable?p.split("/"):p}return d}function l(c){let u="",d=!1;for(const f of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const p of f)if(p.type===0)u+=p.value;else if(p.type===1){const{value:g,repeatable:h,optional:v}=p,m=g in c?c[g]:"";if(Sn(m)&&!h)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const y=Sn(m)?m.join("/"):m;if(!y)if(v)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);u+=y}}return u||"/"}return{re:r,score:o,keys:i,parse:a,stringify:l}}function GB(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function XB(e,t){let n=0;const o=e.score,s=t.score;for(;n<o.length&&n<s.length;){const i=GB(o[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-o.length)===1){if(wh(o))return 1;if(wh(s))return-1}return s.length-o.length}function wh(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const QB={type:0,value:""},JB=/[a-zA-Z0-9_]/;function ZB(e){if(!e)return[[]];if(e==="/")return[[QB]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,o=n;const s=[];let i;function r(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function d(){!c||(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):f();break;case 4:f(),n=o;break;case 1:l==="("?n=2:JB.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${c}"`),d(),r(),s}function eN(e,t,n){const o=YB(ZB(e.path),n),s=je(o,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function tN(e,t){const n=[],o=new Map;t=Ch({strict:!1,end:!0,sensitive:!1},t);function s(u){return o.get(u)}function i(u,d,f){const p=!f,g=nN(u);g.aliasOf=f&&f.record;const h=Ch(t,u),v=[g];if("alias"in u){const w=typeof u.alias=="string"?[u.alias]:u.alias;for(const _ of w)v.push(je({},g,{components:f?f.record.components:g.components,path:_,aliasOf:f?f.record:g}))}let m,y;for(const w of v){const{path:_}=w;if(d&&_[0]!=="/"){const x=d.record.path,S=x[x.length-1]==="/"?"":"/";w.path=d.record.path+(_&&S+_)}if(m=eN(w,d,h),f?f.alias.push(m):(y=y||m,y!==m&&y.alias.push(m),p&&u.name&&!Sh(m)&&r(u.name)),g.children){const x=g.children;for(let S=0;S<x.length;S++)i(x[S],m,f&&f.children[S])}f=f||m,(m.record.components&&Object.keys(m.record.components).length||m.record.name||m.record.redirect)&&l(m)}return y?()=>{r(y)}:ki}function r(u){if(rv(u)){const d=o.get(u);d&&(o.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&o.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return n}function l(u){let d=0;for(;d<n.length&&XB(u,n[d])>=0&&(u.record.path!==n[d].record.path||!lv(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!Sh(u)&&o.set(u.record.name,u)}function c(u,d){let f,p={},g,h;if("name"in u&&u.name){if(f=o.get(u.name),!f)throw Ns(1,{location:u});h=f.record.name,p=je(xh(d.params,f.keys.filter(y=>!y.optional).map(y=>y.name)),u.params&&xh(u.params,f.keys.map(y=>y.name))),g=f.stringify(p)}else if("path"in u)g=u.path,f=n.find(y=>y.re.test(g)),f&&(p=f.parse(g),h=f.record.name);else{if(f=d.name?o.get(d.name):n.find(y=>y.re.test(d.path)),!f)throw Ns(1,{location:u,currentLocation:d});h=f.record.name,p=je({},d.params,u.params),g=f.stringify(p)}const v=[];let m=f;for(;m;)v.unshift(m.record),m=m.parent;return{name:h,path:g,params:p,matched:v,meta:sN(v)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:s}}function xh(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function nN(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:oN(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function oN(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Sh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sN(e){return e.reduce((t,n)=>je(t,n.meta),{})}function Ch(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function lv(e,t){return t.children.some(n=>n===e||lv(e,n))}const cv=/#/g,iN=/&/g,rN=/\//g,aN=/=/g,lN=/\?/g,uv=/\+/g,cN=/%5B/g,uN=/%5D/g,dv=/%5E/g,dN=/%60/g,fv=/%7B/g,fN=/%7C/g,hv=/%7D/g,hN=/%20/g;function hu(e){return encodeURI(""+e).replace(fN,"|").replace(cN,"[").replace(uN,"]")}function pN(e){return hu(e).replace(fv,"{").replace(hv,"}").replace(dv,"^")}function nc(e){return hu(e).replace(uv,"%2B").replace(hN,"+").replace(cv,"%23").replace(iN,"%26").replace(dN,"`").replace(fv,"{").replace(hv,"}").replace(dv,"^")}function gN(e){return nc(e).replace(aN,"%3D")}function mN(e){return hu(e).replace(cv,"%23").replace(lN,"%3F")}function vN(e){return e==null?"":mN(e).replace(rN,"%2F")}function pa(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function bN(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<o.length;++s){const i=o[s].replace(uv," "),r=i.indexOf("="),a=pa(r<0?i:i.slice(0,r)),l=r<0?null:pa(i.slice(r+1));if(a in t){let c=t[a];Sn(c)||(c=t[a]=[c]),c.push(l)}else t[a]=l}return t}function kh(e){let t="";for(let n in e){const o=e[n];if(n=gN(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Sn(o)?o.map(i=>i&&nc(i)):[o&&nc(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function yN(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Sn(o)?o.map(s=>s==null?null:""+s):o==null?o:""+o)}return t}const _N=Symbol(""),Eh=Symbol(""),pu=Symbol(""),pv=Symbol(""),oc=Symbol("");function ii(){let e=[];function t(o){return e.push(o),()=>{const s=e.indexOf(o);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function vo(e,t,n,o,s){const i=o&&(o.enterCallbacks[s]=o.enterCallbacks[s]||[]);return()=>new Promise((r,a)=>{const l=d=>{d===!1?a(Ns(4,{from:n,to:t})):d instanceof Error?a(d):KB(d)?a(Ns(2,{from:t,to:d})):(i&&o.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),r())},c=e.call(o&&o.instances[s],t,n,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function il(e,t,n,o){const s=[];for(const i of e)for(const r in i.components){let a=i.components[r];if(!(t!=="beforeRouteEnter"&&!i.instances[r]))if(wN(a)){const c=(a.__vccOpts||a)[t];c&&s.push(vo(c,n,o,i,r))}else{let l=a();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${i.path}"`));const u=EB(c)?c.default:c;i.components[r]=u;const f=(u.__vccOpts||u)[t];return f&&vo(f,n,o,i,r)()}))}}return s}function wN(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Mh(e){const t=we(pu),n=we(pv),o=P(()=>t.resolve(b(e.to))),s=P(()=>{const{matched:l}=o.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Bs.bind(null,u));if(f>-1)return f;const p=Ph(l[c-2]);return c>1&&Ph(u)===p&&d[d.length-1].path!==p?d.findIndex(Bs.bind(null,l[c-2])):f}),i=P(()=>s.value>-1&&kN(n.params,o.value.params)),r=P(()=>s.value>-1&&s.value===n.matched.length-1&&sv(n.params,o.value.params));function a(l={}){return CN(l)?t[b(e.replace)?"replace":"push"](b(e.to)).catch(ki):Promise.resolve()}return{route:o,href:P(()=>o.value.href),isActive:i,isExactActive:r,navigate:a}}const xN=Y({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Mh,setup(e,{slots:t}){const n=Ht(Mh(e)),{options:o}=we(pu),s=P(()=>({[Th(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Th(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Ce("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),SN=xN;function CN(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function kN(e,t){for(const n in t){const o=t[n],s=e[n];if(typeof o=="string"){if(o!==s)return!1}else if(!Sn(s)||s.length!==o.length||o.some((i,r)=>i!==s[r]))return!1}return!0}function Ph(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Th=(e,t,n)=>e!=null?e:t!=null?t:n,EN=Y({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=we(oc),s=P(()=>e.route||o.value),i=we(Eh,0),r=P(()=>{let c=b(i);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=P(()=>s.value.matched[r.value]);rt(Eh,P(()=>r.value+1)),rt(_N,a),rt(oc,s);const l=A();return se(()=>[l.value,a.value,e.name],([c,u,d],[f,p,g])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!Bs(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(h=>h(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,d=a.value,f=d&&d.components[u];if(!f)return Oh(n.default,{Component:f,route:c});const p=d.props[u],g=p?p===!0?c.params:typeof p=="function"?p(c):p:null,v=Ce(f,je({},g,t,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return Oh(n.default,{Component:v,route:c})||v}}});function Oh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const MN=EN;function PN(e){const t=tN(e.routes,e),n=e.parseQuery||bN,o=e.stringifyQuery||kh,s=e.history,i=ii(),r=ii(),a=ii(),l=bn(ho);let c=ho;ys&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ol.bind(null,O=>""+O),d=ol.bind(null,vN),f=ol.bind(null,pa);function p(O,H){let K,te;return rv(O)?(K=t.getRecordMatcher(O),te=H):te=O,t.addRoute(te,K)}function g(O){const H=t.getRecordMatcher(O);H&&t.removeRoute(H)}function h(){return t.getRoutes().map(O=>O.record)}function v(O){return!!t.getRecordMatcher(O)}function m(O,H){if(H=je({},H||l.value),typeof O=="string"){const _e=sl(n,O,H.path),Ve=t.resolve({path:_e.path},H),gt=s.createHref(_e.fullPath);return je(_e,Ve,{params:f(Ve.params),hash:pa(_e.hash),redirectedFrom:void 0,href:gt})}let K;if("path"in O)K=je({},O,{path:sl(n,O.path,H.path).path});else{const _e=je({},O.params);for(const Ve in _e)_e[Ve]==null&&delete _e[Ve];K=je({},O,{params:d(_e)}),H.params=d(H.params)}const te=t.resolve(K,H),ge=O.hash||"";te.params=u(f(te.params));const Le=TB(o,je({},O,{hash:pN(ge),path:te.path})),Ee=s.createHref(Le);return je({fullPath:Le,hash:ge,query:o===kh?yN(O.query):O.query||{}},te,{redirectedFrom:void 0,href:Ee})}function y(O){return typeof O=="string"?sl(n,O,l.value.path):je({},O)}function w(O,H){if(c!==O)return Ns(8,{from:H,to:O})}function _(O){return C(O)}function x(O){return _(je(y(O),{replace:!0}))}function S(O){const H=O.matched[O.matched.length-1];if(H&&H.redirect){const{redirect:K}=H;let te=typeof K=="function"?K(O):K;return typeof te=="string"&&(te=te.includes("?")||te.includes("#")?te=y(te):{path:te},te.params={}),je({query:O.query,hash:O.hash,params:"path"in te?{}:O.params},te)}}function C(O,H){const K=c=m(O),te=l.value,ge=O.state,Le=O.force,Ee=O.replace===!0,_e=S(K);if(_e)return C(je(y(_e),{state:typeof _e=="object"?je({},ge,_e.state):ge,force:Le,replace:Ee}),H||K);const Ve=K;Ve.redirectedFrom=H;let gt;return!Le&&OB(o,te,K)&&(gt=Ns(16,{to:Ve,from:te}),de(te,te,!0,!1)),(gt?Promise.resolve(gt):B(Ve,te)).catch(Ye=>Un(Ye)?Un(Ye,2)?Ye:Z(Ye):le(Ye,Ve,te)).then(Ye=>{if(Ye){if(Un(Ye,2))return C(je({replace:Ee},y(Ye.to),{state:typeof Ye.to=="object"?je({},ge,Ye.to.state):ge,force:Le}),H||Ve)}else Ye=D(Ve,te,!0,Ee,ge);return $(Ve,te,Ye),Ye})}function k(O,H){const K=w(O,H);return K?Promise.reject(K):Promise.resolve()}function T(O){const H=U.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(O):O()}function B(O,H){let K;const[te,ge,Le]=TN(O,H);K=il(te.reverse(),"beforeRouteLeave",O,H);for(const _e of te)_e.leaveGuards.forEach(Ve=>{K.push(vo(Ve,O,H))});const Ee=k.bind(null,O,H);return K.push(Ee),ie(K).then(()=>{K=[];for(const _e of i.list())K.push(vo(_e,O,H));return K.push(Ee),ie(K)}).then(()=>{K=il(ge,"beforeRouteUpdate",O,H);for(const _e of ge)_e.updateGuards.forEach(Ve=>{K.push(vo(Ve,O,H))});return K.push(Ee),ie(K)}).then(()=>{K=[];for(const _e of Le)if(_e.beforeEnter)if(Sn(_e.beforeEnter))for(const Ve of _e.beforeEnter)K.push(vo(Ve,O,H));else K.push(vo(_e.beforeEnter,O,H));return K.push(Ee),ie(K)}).then(()=>(O.matched.forEach(_e=>_e.enterCallbacks={}),K=il(Le,"beforeRouteEnter",O,H),K.push(Ee),ie(K))).then(()=>{K=[];for(const _e of r.list())K.push(vo(_e,O,H));return K.push(Ee),ie(K)}).catch(_e=>Un(_e,8)?_e:Promise.reject(_e))}function $(O,H,K){a.list().forEach(te=>T(()=>te(O,H,K)))}function D(O,H,K,te,ge){const Le=w(O,H);if(Le)return Le;const Ee=H===ho,_e=ys?history.state:{};K&&(te||Ee?s.replace(O.fullPath,je({scroll:Ee&&_e&&_e.scroll},ge)):s.push(O.fullPath,ge)),l.value=O,de(O,H,K,Ee),Z()}let W;function ne(){W||(W=s.listen((O,H,K)=>{if(!re.listening)return;const te=m(O),ge=S(te);if(ge){C(je(ge,{replace:!0}),te).catch(ki);return}c=te;const Le=l.value;ys&&BB(vh(Le.fullPath,K.delta),Oa()),B(te,Le).catch(Ee=>Un(Ee,12)?Ee:Un(Ee,2)?(C(Ee.to,te).then(_e=>{Un(_e,20)&&!K.delta&&K.type===Ki.pop&&s.go(-1,!1)}).catch(ki),Promise.reject()):(K.delta&&s.go(-K.delta,!1),le(Ee,te,Le))).then(Ee=>{Ee=Ee||D(te,Le,!1),Ee&&(K.delta&&!Un(Ee,8)?s.go(-K.delta,!1):K.type===Ki.pop&&Un(Ee,20)&&s.go(-1,!1)),$(te,Le,Ee)}).catch(ki)}))}let j=ii(),Q=ii(),V;function le(O,H,K){Z(O);const te=Q.list();return te.length?te.forEach(ge=>ge(O,H,K)):console.error(O),Promise.reject(O)}function I(){return V&&l.value!==ho?Promise.resolve():new Promise((O,H)=>{j.add([O,H])})}function Z(O){return V||(V=!O,ne(),j.list().forEach(([H,K])=>O?K(O):H()),j.reset()),O}function de(O,H,K,te){const{scrollBehavior:ge}=e;if(!ys||!ge)return Promise.resolve();const Le=!K&&NB(vh(O.fullPath,0))||(te||!K)&&history.state&&history.state.scroll||null;return xe().then(()=>ge(O,H,Le)).then(Ee=>Ee&&DB(Ee)).catch(Ee=>le(Ee,O,H))}const J=O=>s.go(O);let G;const U=new Set,re={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,hasRoute:v,getRoutes:h,resolve:m,options:e,push:_,replace:x,go:J,back:()=>J(-1),forward:()=>J(1),beforeEach:i.add,beforeResolve:r.add,afterEach:a.add,onError:Q.add,isReady:I,install(O){const H=this;O.component("RouterLink",SN),O.component("RouterView",MN),O.config.globalProperties.$router=H,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>b(l)}),ys&&!G&&l.value===ho&&(G=!0,_(s.location).catch(ge=>{}));const K={};for(const ge in ho)Object.defineProperty(K,ge,{get:()=>l.value[ge],enumerable:!0});O.provide(pu,H),O.provide(pv,Xh(K)),O.provide(oc,l);const te=O.unmount;U.add(O),O.unmount=function(){U.delete(O),U.size<1&&(c=ho,W&&W(),W=null,l.value=ho,G=!1,V=!1),te()}}};function ie(O){return O.reduce((H,K)=>H.then(()=>T(K)),Promise.resolve())}return re}function TN(e,t){const n=[],o=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let r=0;r<i;r++){const a=t.matched[r];a&&(e.matched.find(c=>Bs(c,a))?o.push(a):n.push(a));const l=e.matched[r];l&&(t.matched.find(c=>Bs(c,l))||s.push(l))}return[n,o,s]}const gv=PN({history:jB(),routes:kB}),mv=new ab;mv.app.config.globalProperties.appVars=window.BuyMeCoffeeAdmin;window.BuyMeCoffeeApp=mv.app.use(gv).mount("#buy-me-coffee_app");gv.afterEach((e,t)=>{const n=["stripe","paypal"];jQuery(".buymecoffee_app_menu li").removeClass("active");let o=e.meta.active;if(e.name){o=e.name.toLowerCase(),n.includes(o)&&(jQuery(".buymecoffee_gateway_item div").removeClass("active"),jQuery(".buymecoffee_gateway_item .buymecoffee_gateway_"+o).addClass("active"),o="gateway");let s=".buymecoffee_menu_"+o;jQuery(".buymecoffee_app_menu "+s).addClass("active")}});jQuery(".update-nag,.notice, #wpbody-content > .updated, #wpbody-content > .error").remove()});export default ON();
     65  */const ys=typeof window<"u";function N();
  • buy-me-coffee/trunk/assets/manifest.json

    r3046504 r3048519  
    1616    ],
    1717    "css": [
    18       "assets/main.89f82630.css"
     18      "assets/main..css"
    1919    ]
    2020  },
     
    3030    "file": "js/BmcFormHandler.js",
    3131    "src": "src/js/BmcFormHandler.js",
     32
     33
     34
     35
     36
    3237    "isEntry": true
    3338  },
     
    5358    ]
    5459  },
    55   "src/scss/public/BasicTemplate.scss": {
    56     "file": "assets/BasicTemplate.584b8130.css",
    57     "src": "src/scss/public/BasicTemplate.scss",
     60  "src/scss/.scss": {
     61    "file": "assets/.css",
     62    "src": "src/scss/.scss",
    5863    "isEntry": true
    5964  },
     
    6368    "isEntry": true
    6469  },
     70
     71
     72
     73
     74
    6575  "plugin_main_js_file.css": {
    6676    "file": "assets/plugin_main_js_file.b6284581.css",
    6777    "src": "plugin_main_js_file.css"
    6878  },
     79
     80
     81
     82
    6983  "src/scss/admin/app.scss": {
    70     "file": "assets/app.059d1d5b.css",
     84    "file": "assets/app..css",
    7185    "src": "src/scss/admin/app.scss",
    7286    "isEntry": true
    73   },
    74   "src/js/main.css": {
    75     "file": "assets/main.89f82630.css",
    76     "src": "src/js/main.css"
    7787  }
    7888}
  • buy-me-coffee/trunk/buy-me-coffee.php

    r3046504 r3048519  
    55Plugin URI: http://www.wpminers.com/
    66Description: Easy way to collect donations like "buy me a coffee" directly your own Stripe and PayPal for free
    7 Version: 1.0.1
     7Version: 1.0.
    88Author: wpminers
    99Author URI: http://www.wpminers.com/
     
    3535if (!defined('BUYMECOFFEE_VERSION')) {
    3636    define('BUYMECOFFEE_VERSION_LITE', true);
    37     define('BUYMECOFFEE_VERSION', '1.0.1');
     37    define('BUYMECOFFEE_VERSION', '1.0.');
    3838    define('BUYMECOFFEE_MAIN_FILE', __FILE__);
    3939    define('BUYMECOFFEE_URL', plugin_dir_url(__FILE__));
  • buy-me-coffee/trunk/includes/Builder/Render.php

    r3044362 r3048519  
    281281        Vite::enqueueScript('buymecoffee_public_js',  'js/BmcPublic.js', array('jquery'), BUYMECOFFEE_VERSION, true);
    282282        wp_localize_script('buymecoffee_public_js', 'buymecoffee_general', array(
    283             'ajax_url' => admin_url('admin-ajax.php')
     283            'ajax_url' => admin_url('admin-ajax.php'),
     284            'buymecoffee_nonce' => wp_create_nonce('buymecoffee_nonce'),
    284285        ));
    285286    }
  • buy-me-coffee/trunk/includes/Classes/AdminAjaxHandler.php

    r3044362 r3048519  
    4343            'get_data' => 'getPaymentSettings',
    4444            'save_payment_settings' => 'savePaymentSettings',
    45 
     45            'save_form_design' => 'saveFormDesign',
    4646            'gateways' => 'getAllMethods',
    4747
     
    146146    }
    147147
    148     public function saveSettings($request)
    149     {
    150         $data = $request ?: array();
     148    public function saveSettings($)
     149    {
     150        $data = $ ?: array();
    151151
    152152        update_option('buymecoffee_payment_setting', $data, false);
     
    156156            'message' => __("Settings successfully updated", 'buy-me-coffee')
    157157        ), 200);
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
    158179    }
    159180
  • buy-me-coffee/trunk/includes/Classes/DemoPage.php

    r3044362 r3048519  
    6262            $this->loadDefaultPageTemplate();
    6363            $this->loadTemplateStyles();
     64
    6465
    6566            $btnController = new Buttons();
     
    7172                $profileImage = Vite::staticPath() . 'images/profile.png';
    7273            }
    73 
    7474            //escaped in template, ignoring phpcs here now
    7575            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    76             echo View::make('templates.BasicTemplate', [ 'template' => $template,
     76            echo View::make('templates.BasicTemplate', [
     77                'template' => $template,
    7778                'type' => 'button',
    7879                'quote' => esc_html($quote),
     
    8586            exit();
    8687        }
     88
     89
     90
     91
     92
     93
     94
    8795    }
    8896
  • buy-me-coffee/trunk/includes/Models/Buttons.php

    r3044362 r3048519  
    2727                "bgColor" => 'rgba(250, 212, 0, 1)',
    2828                "color" => 'rgba(0, 0, 0, 1)',
     29
    2930                "minWidth" => '180',
    3031                "textAlign" => 'center',
     
    3233                "fontSize" => 21,
    3334                "radius" => 4,
     35
     36
     37
    3438                "quote" => '🤝 Helping hands work together to accomplish great things.',
    3539            )
  • buy-me-coffee/trunk/includes/views/templates/BasicTemplate.php

    r3044362 r3048519  
    1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly   ?>
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     2?>
    23<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    34        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    1314    ?>
    1415    <?php
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
    1545
    1646    include BUYMECOFFEE_DIR . 'includes/views/templates/FormTemplate.php';
  • buy-me-coffee/trunk/includes/views/templates/FormSection.php

    r3044362 r3048519  
    11<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly   ?>
     2
    23
    3 <div class="buymecoffee_form_preview_wrapper">
     4<div class="buymecoffee_form_preview_wrapper">
    45    <?php
    56    if (isset($template['formTitle']) && sanitize_text_field($template['formTitle']) === 'yes'): ?>
  • buy-me-coffee/trunk/includes/views/templates/FormTemplate.php

    r3044362 r3048519  
    1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly   ?>
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     2
     3    use BuyMeCoffee\Helpers\ArrayHelper as Arr;
     4 ?>
    25
    36<div id="buymecoffee_preview_top">
    47    <div class="buymecoffee_profile_section">
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
    531        <div class="buymecoffee_profile_hr">
    632        </div>
     
    935                 alt="Profile Image">
    1036        </div>
    11 <!--        <h1 style="font-size:23px;text-align:center;color: #6b6b6b;" class="buymecoffee_profile_section_name">--><?php //echo esc_html($name); ?><!--</h1>-->
    12 
    1337    </div>
    1438    <div class="buymecoffee_preview_header">
     
    3054            <div class="buymecoffee_your_content_wrapper">
    3155                <div class="buymecoffee_your_content">
    32                     <div class="buymecoffee_your_content_title">
     56                    <div class="buymecoffee_your_content_title">
    3357                        <div style="margin:23px;">
    34                             <blockquote>
     58                            <?php if (current_user_can('manage_options')): ?>
     59                                <div class="buymecoffee_edit_action_wrapper" style="display: none;">
     60                                    <div class="buymecoffee_edit_action">✏️ Edit quotes</div>
     61                                    <blockquote style="display: none;">
     62                                        <input type="textarea" value="<?php echo esc_html($quote); ?>">
     63                                    </blockquote>
     64                                </div>
     65                            <?php endif; ?>
     66                            <blockquote class="buymecoffee_main_quote">
    3567                                <p class="bmc_appreciation_title"><?php echo esc_html($quote); ?></p>
    3668                            </blockquote>
  • buy-me-coffee/trunk/readme.txt

    r3046513 r3048519  
    44Requires at least: 4.5
    55Tested up to: 6.4.1
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    3131Features:
    3232Custom number of donations
    33 Accept donations using Stripe and PayPal
     33Accept donations using
    3434Customizable templates
    3535Form shortcode and widget
     
    3939Quick setup mode
    4040Buy Me a Coffee counter
     41
    4142
    4243## Installation
     
    7778
    7879## Changelog
     80
     81
     82
    7983= 1.0.1 March 7, 2024=
    8084- Adds PayPal Pro Payment Gateway
     
    110114  This is just a Database library for WordPress. It is not a full-fledged ORM. It is a simple database library that makes working with the database easier. It is inspired by Laravel's Eloquent ORM. It's not collect any data from your site.
    111115#### NPM Package used:
    112 [element-plus/icons-vue](https://www.npmjs.com/package/@element-plus/icons-vue),[element-plus](https://www.npmjs.com/package/element-plus/),[@wordpress/hooks](https://www.npmjs.com/package/@wordpress/hooks),[chart.js](https://www.npmjs.com/package/chart.js),[clipboard](https://www.npmjs.com/package/clipboard),[lodash](https://www.npmjs.com/package/lodash),[moment](https://www.npmjs.com/package/moment),[vue](https://www.npmjs.com/package/vue),[vue-router](https://www.npmjs.com/package/vue-router)
     116[element-plus/icons-vue](https://www.npmjs.com/package/@element-plus/icons-vue),[element-plus](https://www.npmjs.com/package/element-plus/),[@wordpress/hooks](https://www.npmjs.com/package/@wordpress/hooks),[chart.js](https://www.npmjs.com/package/chart.js),[clipboard](https://www.npmjs.com/package/clipboard),[lodash](https://www.npmjs.com/package/lodash),[vue](https://www.npmjs.com/package/vue),[vue-router](https://www.npmjs.com/package/vue-router)
    113117
    114118#### Contribution guideline:
Note: See TracChangeset for help on using the changeset viewer.