UNPKG

mp-lens

Version:

微信小程序分析工具 (Unused Code, Dependencies, Visualization)

11 lines 1.58 MB
var Gz=Object.defineProperty;var jz=(r,e,t)=>e in r?Gz(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var at=(r,e,t)=>jz(r,typeof e!="symbol"?e+"":e,t);function Uz(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const bb=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return aa},get Circle(){return $Z},get Ellipse(){return VZ},get Image(){return WZ},get Line(){return XZ},get Marker(){return HZ},get Path(){return R_},get Polygon(){return tQ},get Polyline(){return rQ},get Rect(){return aQ},get Text(){return oQ}},Symbol.toStringTag,{value:"Module"})),_b=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Li},get Circle(){return fQ},get Dom(){return cQ},get Ellipse(){return hQ},get Image(){return dQ},get Line(){return vQ},get Marker(){return pQ},get Path(){return gQ},get Polygon(){return mQ},get Polyline(){return yQ},get Rect(){return _Q},get Text(){return SQ}},Symbol.toStringTag,{value:"Module"}));var Wp,Dr,jI,Ys,uE,UI,$I,VI,xb,Ny,Dy,Ec={},WI=[],$z=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xp=Array.isArray;function ro(r,e){for(var t in e)r[t]=e[t];return r}function wb(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function Vz(r,e,t){var n,i,a,o={};for(a in e)a=="key"?n=e[a]:a=="ref"?i=e[a]:o[a]=e[a];if(arguments.length>2&&(o.children=arguments.length>3?Wp.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(a in r.defaultProps)o[a]===void 0&&(o[a]=r.defaultProps[a]);return yv(r,o,n,i,null)}function yv(r,e,t,n,i){var a={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++jI,__i:-1,__u:0};return i==null&&Dr.vnode!=null&&Dr.vnode(a),a}function qp(r){return r.children}function bv(r,e){this.props=r,this.context=e}function El(r,e){if(e==null)return r.__?El(r.__,r.__i+1):null;for(var t;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null)return t.__e;return typeof r.type=="function"?El(r):null}function XI(r){var e,t;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,e=0;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null){r.__e=r.__c.base=t.__e;break}return XI(r)}}function lE(r){(!r.__d&&(r.__d=!0)&&Ys.push(r)&&!Zv.__r++||uE!=Dr.debounceRendering)&&((uE=Dr.debounceRendering)||UI)(Zv)}function Zv(){for(var r,e,t,n,i,a,o,s=1;Ys.length;)Ys.length>s&&Ys.sort($I),r=Ys.shift(),s=Ys.length,r.__d&&(t=void 0,i=(n=(e=r).__v).__e,a=[],o=[],e.__P&&((t=ro({},n)).__v=n.__v+1,Dr.vnode&&Dr.vnode(t),Eb(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,a,i??El(n),!!(32&n.__u),o),t.__v=n.__v,t.__.__k[t.__i]=t,YI(a,t,o),t.__e!=i&&XI(t)));Zv.__r=0}function qI(r,e,t,n,i,a,o,s,u,l,f){var c,h,d,v,p,g,m=n&&n.__k||WI,b=e.length;for(u=Wz(t,e,m,u,b),c=0;c<b;c++)(d=t.__k[c])!=null&&(h=d.__i==-1?Ec:m[d.__i]||Ec,d.__i=c,g=Eb(r,d,h,i,a,o,s,u,l,f),v=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&Sb(h.ref,null,d),f.push(d.ref,d.__c||v,d)),p==null&&v!=null&&(p=v),4&d.__u||h.__k===d.__k?u=HI(d,u,r):typeof d.type=="function"&&g!==void 0?u=g:v&&(u=v.nextSibling),d.__u&=-7);return t.__e=p,u}function Wz(r,e,t,n,i){var a,o,s,u,l,f=t.length,c=f,h=0;for(r.__k=new Array(i),a=0;a<i;a++)(o=e[a])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=a+h,(o=r.__k[a]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?yv(null,o,null,null,null):Xp(o)?yv(qp,{children:o},null,null,null):o.constructor==null&&o.__b>0?yv(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=r,o.__b=r.__b+1,s=null,(l=o.__i=Xz(o,t,u,c))!=-1&&(c--,(s=t[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>f?h--:i<f&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,o.__u|=4))):r.__k[a]=null;if(c)for(a=0;a<f;a++)(s=t[a])!=null&&(2&s.__u)==0&&(s.__e==n&&(n=El(s)),ZI(s,s));return n}function HI(r,e,t){var n,i;if(typeof r.type=="function"){for(n=r.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=r,e=HI(n[i],e,t));return e}r.__e!=e&&(e&&r.type&&!t.contains(e)&&(e=El(r)),t.insertBefore(r.__e,e||null),e=r.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Xz(r,e,t,n){var i,a,o=r.key,s=r.type,u=e[t];if(u===null&&r.key==null||u&&o==u.key&&s==u.type&&(2&u.__u)==0)return t;if(n>(u!=null&&(2&u.__u)==0?1:0))for(i=t-1,a=t+1;i>=0||a<e.length;){if(i>=0){if((u=e[i])&&(2&u.__u)==0&&o==u.key&&s==u.type)return i;i--}if(a<e.length){if((u=e[a])&&(2&u.__u)==0&&o==u.key&&s==u.type)return a;a++}}return-1}function fE(r,e,t){e[0]=="-"?r.setProperty(e,t??""):r[e]=t==null?"":typeof t!="number"||$z.test(e)?t:t+"px"}function Vh(r,e,t,n,i){var a,o;e:if(e=="style")if(typeof t=="string")r.style.cssText=t;else{if(typeof n=="string"&&(r.style.cssText=n=""),n)for(e in n)t&&e in t||fE(r.style,e,"");if(t)for(e in t)n&&t[e]==n[e]||fE(r.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(VI,"$1")),o=e.toLowerCase(),e=o in r||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),r.l||(r.l={}),r.l[e+a]=t,t?n?t.u=n.u:(t.u=xb,r.addEventListener(e,a?Dy:Ny,a)):r.removeEventListener(e,a?Dy:Ny,a);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in r)try{r[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?r.removeAttribute(e):r.setAttribute(e,e=="popover"&&t==1?"":t))}}function cE(r){return function(e){if(this.l){var t=this.l[e.type+r];if(e.t==null)e.t=xb++;else if(e.t<t.u)return;return t(Dr.event?Dr.event(e):e)}}}function Eb(r,e,t,n,i,a,o,s,u,l){var f,c,h,d,v,p,g,m,b,_,y,x,w,S,E,C,M,A=e.type;if(e.constructor!=null)return null;128&t.__u&&(u=!!(32&t.__u),a=[s=e.__e=t.__e]),(f=Dr.__b)&&f(e);e:if(typeof A=="function")try{if(m=e.props,b="prototype"in A&&A.prototype.render,_=(f=A.contextType)&&n[f.__c],y=f?_?_.props.value:f.__:n,t.__c?g=(c=e.__c=t.__c).__=c.__E:(b?e.__c=c=new A(m,y):(e.__c=c=new bv(m,y),c.constructor=A,c.render=Hz),_&&_.sub(c),c.props=m,c.state||(c.state={}),c.context=y,c.__n=n,h=c.__d=!0,c.__h=[],c._sb=[]),b&&c.__s==null&&(c.__s=c.state),b&&A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ro({},c.__s)),ro(c.__s,A.getDerivedStateFromProps(m,c.__s))),d=c.props,v=c.state,c.__v=e,h)b&&A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),b&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b&&A.getDerivedStateFromProps==null&&m!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,y),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,y)===!1||e.__v==t.__v){for(e.__v!=t.__v&&(c.props=m,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(k){k&&(k.__=e)}),x=0;x<c._sb.length;x++)c.__h.push(c._sb[x]);c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(m,c.__s,y),b&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,v,p)})}if(c.context=y,c.props=m,c.__P=r,c.__e=!1,w=Dr.__r,S=0,b){for(c.state=c.__s,c.__d=!1,w&&w(e),f=c.render(c.props,c.state,c.context),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[]}else do c.__d=!1,w&&w(e),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++S<25);c.state=c.__s,c.getChildContext!=null&&(n=ro(ro({},n),c.getChildContext())),b&&!h&&c.getSnapshotBeforeUpdate!=null&&(p=c.getSnapshotBeforeUpdate(d,v)),C=f,f!=null&&f.type===qp&&f.key==null&&(C=KI(f.props.children)),s=qI(r,Xp(C)?C:[C],e,t,n,i,a,o,s,u,l),c.base=e.__e,e.__u&=-161,c.__h.length&&o.push(c),g&&(c.__E=c.__=null)}catch(k){if(e.__v=null,u||a!=null)if(k.then){for(e.__u|=u?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,e.__e=s}else for(M=a.length;M--;)wb(a[M]);else e.__e=t.__e,e.__k=t.__k;Dr.__e(k,e,t)}else a==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):s=e.__e=qz(t.__e,e,t,n,i,a,o,u,l);return(f=Dr.diffed)&&f(e),128&e.__u?void 0:s}function YI(r,e,t){for(var n=0;n<t.length;n++)Sb(t[n],t[++n],t[++n]);Dr.__c&&Dr.__c(e,r),r.some(function(i){try{r=i.__h,i.__h=[],r.some(function(a){a.call(i)})}catch(a){Dr.__e(a,i.__v)}})}function KI(r){return typeof r!="object"||r==null||r.__b&&r.__b>0?r:Xp(r)?r.map(KI):ro({},r)}function qz(r,e,t,n,i,a,o,s,u){var l,f,c,h,d,v,p,g=t.props,m=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((d=a[l])&&"setAttribute"in d==!!b&&(b?d.localName==b:d.nodeType==3)){r=d,a[l]=null;break}}if(r==null){if(b==null)return document.createTextNode(m);r=document.createElementNS(i,b,m.is&&m),s&&(Dr.__m&&Dr.__m(e,a),s=!1),a=null}if(b==null)g===m||s&&r.data==m||(r.data=m);else{if(a=a&&Wp.call(r.childNodes),g=t.props||Ec,!s&&a!=null)for(g={},l=0;l<r.attributes.length;l++)g[(d=r.attributes[l]).name]=d.value;for(l in g)if(d=g[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=d;else if(!(l in m)){if(l=="value"&&"defaultValue"in m||l=="checked"&&"defaultChecked"in m)continue;Vh(r,l,null,d,i)}}for(l in m)d=m[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?f=d:l=="value"?v=d:l=="checked"?p=d:s&&typeof d!="function"||g[l]===d||Vh(r,l,d,g[l],i);if(f)s||c&&(f.__html==c.__html||f.__html==r.innerHTML)||(r.innerHTML=f.__html),e.__k=[];else if(c&&(r.innerHTML=""),qI(e.type=="template"?r.content:r,Xp(h)?h:[h],e,t,n,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,a,o,a?a[0]:t.__k&&El(t,0),s,u),a!=null)for(l=a.length;l--;)wb(a[l]);s||(l="value",b=="progress"&&v==null?r.removeAttribute("value"):v!=null&&(v!==r[l]||b=="progress"&&!v||b=="option"&&v!=g[l])&&Vh(r,l,v,g[l],i),l="checked",p!=null&&p!=r[l]&&Vh(r,l,p,g[l],i))}return r}function Sb(r,e,t){try{if(typeof r=="function"){var n=typeof r.__u=="function";n&&r.__u(),n&&e==null||(r.__u=r(e))}else r.current=e}catch(i){Dr.__e(i,t)}}function ZI(r,e,t){var n,i;if(Dr.unmount&&Dr.unmount(r),(n=r.ref)&&(n.current&&n.current!=r.__e||Sb(n,null,e)),(n=r.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){Dr.__e(a,e)}n.base=n.__P=null}if(n=r.__k)for(i=0;i<n.length;i++)n[i]&&ZI(n[i],e,t||typeof r.type!="function");t||wb(r.__e),r.__c=r.__=r.__e=void 0}function Hz(r,e,t){return this.constructor(r,t)}function hE(r,e,t){var n,i,a,o;e==document&&(e=document.documentElement),Dr.__&&Dr.__(r,e),i=(n=!1)?null:e.__k,a=[],o=[],Eb(e,r=e.__k=Vz(qp,null,[r]),i||Ec,Ec,e.namespaceURI,i?null:e.firstChild?Wp.call(e.childNodes):null,a,i?i.__e:e.firstChild,n,o),YI(a,r,o)}Wp=WI.slice,Dr={__e:function(r,e,t,n){for(var i,a,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(r)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(r,n||{}),o=i.__d),o)return i.__E=i}catch(s){r=s}throw r}},jI=0,bv.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ro({},this.state),typeof r=="function"&&(r=r(ro({},t),this.props)),r&&ro(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),lE(this))},bv.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),lE(this))},bv.prototype.render=qp,Ys=[],UI=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$I=function(r,e){return r.__v.__b-e.__v.__b},Zv.__r=0,VI=/(PointerCapture)$|Capture$/i,xb=0,Ny=cE(!1),Dy=cE(!0);var Yz=0;function Se(r,e,t,n,i,a){e||(e={});var o,s,u=e;if("ref"in u)for(s in u={},e)s=="ref"?o=e[s]:u[s]=e[s];var l={type:r,props:u,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Yz,__i:-1,__u:0,__source:i,__self:a};if(typeof r=="function"&&(o=r.defaultProps))for(s in o)u[s]===void 0&&(u[s]=o[s]);return Dr.vnode&&Dr.vnode(l),l}/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License */function Qc(r){return r+.5|0}const Bo=(r,e,t)=>Math.max(Math.min(r,t),e);function Hf(r){return Bo(Qc(r*2.55),0,255)}function Wo(r){return Bo(Qc(r*255),0,255)}function Ja(r){return Bo(Qc(r/2.55)/100,0,1)}function dE(r){return Bo(Qc(r*100),0,100)}const Ei={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},Py=[..."0123456789ABCDEF"],Kz=r=>Py[r&15],Zz=r=>Py[(r&240)>>4]+Py[r&15],Wh=r=>(r&240)>>4===(r&15),Qz=r=>Wh(r.r)&&Wh(r.g)&&Wh(r.b)&&Wh(r.a);function Jz(r){var e=r.length,t;return r[0]==="#"&&(e===4||e===5?t={r:255&Ei[r[1]]*17,g:255&Ei[r[2]]*17,b:255&Ei[r[3]]*17,a:e===5?Ei[r[4]]*17:255}:(e===7||e===9)&&(t={r:Ei[r[1]]<<4|Ei[r[2]],g:Ei[r[3]]<<4|Ei[r[4]],b:Ei[r[5]]<<4|Ei[r[6]],a:e===9?Ei[r[7]]<<4|Ei[r[8]]:255})),t}const e4=(r,e)=>r<255?e(r):"";function t4(r){var e=Qz(r)?Kz:Zz;return r?"#"+e(r.r)+e(r.g)+e(r.b)+e4(r.a,e):void 0}const r4=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function QI(r,e,t){const n=e*Math.min(t,1-t),i=(a,o=(a+r/30)%12)=>t-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function n4(r,e,t){const n=(i,a=(i+r/60)%6)=>t-t*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function i4(r,e,t){const n=QI(r,1,.5);let i;for(e+t>1&&(i=1/(e+t),e*=i,t*=i),i=0;i<3;i++)n[i]*=1-e-t,n[i]+=e;return n}function a4(r,e,t,n,i){return r===i?(e-t)/n+(e<t?6:0):e===i?(t-r)/n+2:(r-e)/n+4}function Mb(r){const t=r.r/255,n=r.g/255,i=r.b/255,a=Math.max(t,n,i),o=Math.min(t,n,i),s=(a+o)/2;let u,l,f;return a!==o&&(f=a-o,l=s>.5?f/(2-a-o):f/(a+o),u=a4(t,n,i,f,a),u=u*60+.5),[u|0,l||0,s]}function Cb(r,e,t,n){return(Array.isArray(e)?r(e[0],e[1],e[2]):r(e,t,n)).map(Wo)}function Ab(r,e,t){return Cb(QI,r,e,t)}function o4(r,e,t){return Cb(i4,r,e,t)}function s4(r,e,t){return Cb(n4,r,e,t)}function JI(r){return(r%360+360)%360}function u4(r){const e=r4.exec(r);let t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?Hf(+e[5]):Wo(+e[5]));const i=JI(+e[2]),a=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=o4(i,a,o):e[1]==="hsv"?n=s4(i,a,o):n=Ab(i,a,o),{r:n[0],g:n[1],b:n[2],a:t}}function l4(r,e){var t=Mb(r);t[0]=JI(t[0]+e),t=Ab(t),r.r=t[0],r.g=t[1],r.b=t[2]}function f4(r){if(!r)return;const e=Mb(r),t=e[0],n=dE(e[1]),i=dE(e[2]);return r.a<255?`hsla(${t}, ${n}%, ${i}%, ${Ja(r.a)})`:`hsl(${t}, ${n}%, ${i}%)`}const vE={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"},pE={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 c4(){const r={},e=Object.keys(pE),t=Object.keys(vE);let n,i,a,o,s;for(n=0;n<e.length;n++){for(o=s=e[n],i=0;i<t.length;i++)a=t[i],s=s.replace(a,vE[a]);a=parseInt(pE[o],16),r[s]=[a>>16&255,a>>8&255,a&255]}return r}let Xh;function h4(r){Xh||(Xh=c4(),Xh.transparent=[0,0,0,0]);const e=Xh[r.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const d4=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function v4(r){const e=d4.exec(r);let t=255,n,i,a;if(e){if(e[7]!==n){const o=+e[7];t=e[8]?Hf(o):Bo(o*255,0,255)}return n=+e[1],i=+e[3],a=+e[5],n=255&(e[2]?Hf(n):Bo(n,0,255)),i=255&(e[4]?Hf(i):Bo(i,0,255)),a=255&(e[6]?Hf(a):Bo(a,0,255)),{r:n,g:i,b:a,a:t}}}function p4(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${Ja(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}const O0=r=>r<=.0031308?r*12.92:Math.pow(r,1/2.4)*1.055-.055,$u=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function g4(r,e,t){const n=$u(Ja(r.r)),i=$u(Ja(r.g)),a=$u(Ja(r.b));return{r:Wo(O0(n+t*($u(Ja(e.r))-n))),g:Wo(O0(i+t*($u(Ja(e.g))-i))),b:Wo(O0(a+t*($u(Ja(e.b))-a))),a:r.a+t*(e.a-r.a)}}function qh(r,e,t){if(r){let n=Mb(r);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=Ab(n),r.r=n[0],r.g=n[1],r.b=n[2]}}function eL(r,e){return r&&Object.assign(e||{},r)}function gE(r){var e={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(e={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(e.a=Wo(r[3]))):(e=eL(r,{r:0,g:0,b:0,a:1}),e.a=Wo(e.a)),e}function m4(r){return r.charAt(0)==="r"?v4(r):u4(r)}let tL=class Ry{constructor(e){if(e instanceof Ry)return e;const t=typeof e;let n;t==="object"?n=gE(e):t==="string"&&(n=Jz(e)||h4(e)||m4(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=eL(this._rgb);return e&&(e.a=Ja(e.a)),e}set rgb(e){this._rgb=gE(e)}rgbString(){return this._valid?p4(this._rgb):void 0}hexString(){return this._valid?t4(this._rgb):void 0}hslString(){return this._valid?f4(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,i=e.rgb;let a;const o=t===a?.5:t,s=2*o-1,u=n.a-i.a,l=((s*u===-1?s:(s+u)/(1+s*u))+1)/2;a=1-l,n.r=255&l*n.r+a*i.r+.5,n.g=255&l*n.g+a*i.g+.5,n.b=255&l*n.b+a*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=g4(this._rgb,e._rgb,t)),this}clone(){return new Ry(this.rgb)}alpha(e){return this._rgb.a=Wo(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Qc(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return qh(this._rgb,2,e),this}darken(e){return qh(this._rgb,2,-e),this}saturate(e){return qh(this._rgb,1,e),this}desaturate(e){return qh(this._rgb,1,-e),this}rotate(e){return l4(this._rgb,e),this}};/*! * Chart.js v4.4.9 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */function za(){}const y4=(()=>{let r=0;return()=>r++})();function yr(r){return r==null}function Xr(r){if(Array.isArray&&Array.isArray(r))return!0;const e=Object.prototype.toString.call(r);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function _r(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}function nn(r){return(typeof r=="number"||r instanceof Number)&&isFinite(+r)}function di(r,e){return nn(r)?r:e}function er(r,e){return typeof r>"u"?e:r}const b4=(r,e)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:+r/e,rL=(r,e)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*e:+r;function Fr(r,e,t){if(r&&typeof r.call=="function")return r.apply(t,e)}function Ir(r,e,t,n){let i,a,o;if(Xr(r))for(a=r.length,i=0;i<a;i++)e.call(t,r[i],i);else if(_r(r))for(o=Object.keys(r),a=o.length,i=0;i<a;i++)e.call(t,r[o[i]],o[i])}function Qv(r,e){let t,n,i,a;if(!r||!e||r.length!==e.length)return!1;for(t=0,n=r.length;t<n;++t)if(i=r[t],a=e[t],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Jv(r){if(Xr(r))return r.map(Jv);if(_r(r)){const e=Object.create(null),t=Object.keys(r),n=t.length;let i=0;for(;i<n;++i)e[t[i]]=Jv(r[t[i]]);return e}return r}function nL(r){return["__proto__","prototype","constructor"].indexOf(r)===-1}function _4(r,e,t,n){if(!nL(r))return;const i=e[r],a=t[r];_r(i)&&_r(a)?Sc(i,a,n):e[r]=Jv(a)}function Sc(r,e,t){const n=Xr(e)?e:[e],i=n.length;if(!_r(r))return r;t=t||{};const a=t.merger||_4;let o;for(let s=0;s<i;++s){if(o=n[s],!_r(o))continue;const u=Object.keys(o);for(let l=0,f=u.length;l<f;++l)a(u[l],r,o,t)}return r}function lc(r,e){return Sc(r,e,{merger:x4})}function x4(r,e,t){if(!nL(r))return;const n=e[r],i=t[r];_r(n)&&_r(i)?lc(n,i):Object.prototype.hasOwnProperty.call(e,r)||(e[r]=Jv(i))}const mE={"":r=>r,x:r=>r.x,y:r=>r.y};function w4(r){const e=r.split("."),t=[];let n="";for(const i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function E4(r){const e=w4(r);return t=>{for(const n of e){if(n==="")break;t=t&&t[n]}return t}}function Ho(r,e){return(mE[e]||(mE[e]=E4(e)))(r)}function Tb(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Mc=r=>typeof r<"u",Yo=r=>typeof r=="function",yE=(r,e)=>{if(r.size!==e.size)return!1;for(const t of r)if(!e.has(t))return!1;return!0};function S4(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}const Ur=Math.PI,Gr=2*Ur,M4=Gr+Ur,ep=Number.POSITIVE_INFINITY,C4=Ur/180,dn=Ur/2,ys=Ur/4,bE=Ur*2/3,zo=Math.log10,Ca=Math.sign;function fc(r,e,t){return Math.abs(r-e)<t}function _E(r){const e=Math.round(r);r=fc(r,e,r/1e3)?e:r;const t=Math.pow(10,Math.floor(zo(r))),n=r/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function A4(r){const e=[],t=Math.sqrt(r);let n;for(n=1;n<t;n++)r%n===0&&(e.push(n),e.push(r/n));return t===(t|0)&&e.push(t),e.sort((i,a)=>i-a).pop(),e}function T4(r){return typeof r=="symbol"||typeof r=="object"&&r!==null&&!(Symbol.toPrimitive in r||"toString"in r||"valueOf"in r)}function Sl(r){return!T4(r)&&!isNaN(parseFloat(r))&&isFinite(r)}function k4(r,e){const t=Math.round(r);return t-e<=r&&t+e>=r}function iL(r,e,t){let n,i,a;for(n=0,i=r.length;n<i;n++)a=r[n][t],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Qi(r){return r*(Ur/180)}function kb(r){return r*(180/Ur)}function xE(r){if(!nn(r))return;let e=1,t=0;for(;Math.round(r*e)/e!==r;)e*=10,t++;return t}function aL(r,e){const t=e.x-r.x,n=e.y-r.y,i=Math.sqrt(t*t+n*n);let a=Math.atan2(n,t);return a<-.5*Ur&&(a+=Gr),{angle:a,distance:i}}function Fy(r,e){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function I4(r,e){return(r-e+M4)%Gr-Ur}function gi(r){return(r%Gr+Gr)%Gr}function Cc(r,e,t,n){const i=gi(r),a=gi(e),o=gi(t),s=gi(a-i),u=gi(o-i),l=gi(i-a),f=gi(i-o);return i===a||i===o||n&&a===o||s>u&&l<f}function Pn(r,e,t){return Math.max(e,Math.min(t,r))}function L4(r){return Pn(r,-32768,32767)}function no(r,e,t,n=1e-6){return r>=Math.min(e,t)-n&&r<=Math.max(e,t)+n}function Ib(r,e,t){t=t||(o=>r[o]<e);let n=r.length-1,i=0,a;for(;n-i>1;)a=i+n>>1,t(a)?i=a:n=a;return{lo:i,hi:n}}const io=(r,e,t,n)=>Ib(r,t,n?i=>{const a=r[i][e];return a<t||a===t&&r[i+1][e]===t}:i=>r[i][e]<t),O4=(r,e,t)=>Ib(r,t,n=>r[n][e]>=t);function N4(r,e,t){let n=0,i=r.length;for(;n<i&&r[n]<e;)n++;for(;i>n&&r[i-1]>t;)i--;return n>0||i<r.length?r.slice(n,i):r}const oL=["push","pop","shift","splice","unshift"];function D4(r,e){if(r._chartjs){r._chartjs.listeners.push(e);return}Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),oL.forEach(t=>{const n="_onData"+Tb(t),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return r._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...a)}),o}})})}function wE(r,e){const t=r._chartjs;if(!t)return;const n=t.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(oL.forEach(a=>{delete r[a]}),delete r._chartjs)}function sL(r){const e=new Set(r);return e.size===r.length?r:Array.from(e)}const uL=function(){return typeof window>"u"?function(r){return r()}:window.requestAnimationFrame}();function lL(r,e){let t=[],n=!1;return function(...i){t=i,n||(n=!0,uL.call(window,()=>{n=!1,r.apply(e,t)}))}}function P4(r,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(r,e,n)):r.apply(this,n),e}}const Lb=r=>r==="start"?"left":r==="end"?"right":"center",Bn=(r,e,t)=>r==="start"?e:r==="end"?t:(e+t)/2,R4=(r,e,t,n)=>r===(n?"left":"right")?t:r==="center"?(e+t)/2:e;function fL(r,e,t){const n=e.length;let i=0,a=n;if(r._sorted){const{iScale:o,vScale:s,_parsed:u}=r,l=r.dataset&&r.dataset.options?r.dataset.options.spanGaps:null,f=o.axis,{min:c,max:h,minDefined:d,maxDefined:v}=o.getUserBounds();if(d){if(i=Math.min(io(u,f,c).lo,t?n:io(e,f,o.getPixelForValue(c)).lo),l){const p=u.slice(0,i+1).reverse().findIndex(g=>!yr(g[s.axis]));i-=Math.max(0,p)}i=Pn(i,0,n-1)}if(v){let p=Math.max(io(u,o.axis,h,!0).hi+1,t?0:io(e,f,o.getPixelForValue(h),!0).hi+1);if(l){const g=u.slice(p-1).findIndex(m=>!yr(m[s.axis]));p+=Math.max(0,g)}a=Pn(p,i,n)-i}else a=n-i}return{start:i,count:a}}function cL(r){const{xScale:e,yScale:t,_scaleRanges:n}=r,i={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!n)return r._scaleRanges=i,!0;const a=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,i),a}const Hh=r=>r===0||r===1,EE=(r,e,t)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-e)*Gr/t)),SE=(r,e,t)=>Math.pow(2,-10*r)*Math.sin((r-e)*Gr/t)+1,cc={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*dn)+1,easeOutSine:r=>Math.sin(r*dn),easeInOutSine:r=>-.5*(Math.cos(Ur*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>Hh(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>Hh(r)?r:EE(r,.075,.3),easeOutElastic:r=>Hh(r)?r:SE(r,.075,.3),easeInOutElastic(r){return Hh(r)?r:r<.5?.5*EE(r*2,.1125,.45):.5+.5*SE(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let e=1.70158;return(r/=.5)<1?.5*(r*r*(((e*=1.525)+1)*r-e)):.5*((r-=2)*r*(((e*=1.525)+1)*r+e)+2)},easeInBounce:r=>1-cc.easeOutBounce(1-r),easeOutBounce(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},easeInOutBounce:r=>r<.5?cc.easeInBounce(r*2)*.5:cc.easeOutBounce(r*2-1)*.5+.5};function Ob(r){if(r&&typeof r=="object"){const e=r.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function ME(r){return Ob(r)?r:new tL(r)}function N0(r){return Ob(r)?r:new tL(r).saturate(.5).darken(.1).hexString()}const F4=["x","y","borderWidth","radius","tension"],B4=["color","borderColor","backgroundColor"];function z4(r){r.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),r.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),r.set("animations",{colors:{type:"color",properties:B4},numbers:{type:"number",properties:F4}}),r.describe("animations",{_fallback:"animation"}),r.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:e=>e|0}}}})}function G4(r){r.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const CE=new Map;function j4(r,e){e=e||{};const t=r+JSON.stringify(e);let n=CE.get(t);return n||(n=new Intl.NumberFormat(r,e),CE.set(t,n)),n}function Jc(r,e,t){return j4(e,t).format(r)}const hL={values(r){return Xr(r)?r:""+r},numeric(r,e,t){if(r===0)return"0";const n=this.chart.options.locale;let i,a=r;if(t.length>1){const l=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(l<1e-4||l>1e15)&&(i="scientific"),a=U4(r,t)}const o=zo(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(u,this.options.ticks.format),Jc(r,n,u)},logarithmic(r,e,t){if(r===0)return"0";const n=t[e].significand||r/Math.pow(10,Math.floor(zo(r)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?hL.numeric.call(this,r,e,t):""}};function U4(r,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&r!==Math.floor(r)&&(t=r-Math.floor(r)),t}var Hp={formatters:hL};function $4(r){r.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:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.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:Hp.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),r.route("scale.ticks","color","","color"),r.route("scale.grid","color","","borderColor"),r.route("scale.border","color","","borderColor"),r.route("scale.title","color","","color"),r.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),r.describe("scales",{_fallback:"scale"}),r.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const ou=Object.create(null),By=Object.create(null);function hc(r,e){if(!e)return r;const t=e.split(".");for(let n=0,i=t.length;n<i;++n){const a=t[n];r=r[a]||(r[a]=Object.create(null))}return r}function D0(r,e,t){return typeof e=="string"?Sc(hc(r,e),t):Sc(hc(r,""),e)}class V4{constructor(e,t){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=n=>n.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=(n,i)=>N0(i.backgroundColor),this.hoverBorderColor=(n,i)=>N0(i.borderColor),this.hoverColor=(n,i)=>N0(i.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(e),this.apply(t)}set(e,t){return D0(this,e,t)}get(e){return hc(this,e)}describe(e,t){return D0(By,e,t)}override(e,t){return D0(ou,e,t)}route(e,t,n,i){const a=hc(this,e),o=hc(this,n),s="_"+t;Object.defineProperties(a,{[s]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){const u=this[s],l=o[i];return _r(u)?Object.assign({},l,u):er(u,l)},set(u){this[s]=u}}})}apply(e){e.forEach(t=>t(this))}}var qr=new V4({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[z4,G4,$4]);function W4(r){return!r||yr(r.size)||yr(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}function tp(r,e,t,n,i){let a=e[i];return a||(a=e[i]=r.measureText(i).width,t.push(i)),a>n&&(n=a),n}function X4(r,e,t,n){n=n||{};let i=n.data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},a=n.garbageCollect=[],n.font=e),r.save(),r.font=e;let o=0;const s=t.length;let u,l,f,c,h;for(u=0;u<s;u++)if(c=t[u],c!=null&&!Xr(c))o=tp(r,i,a,o,c);else if(Xr(c))for(l=0,f=c.length;l<f;l++)h=c[l],h!=null&&!Xr(h)&&(o=tp(r,i,a,o,h));r.restore();const d=a.length/2;if(d>t.length){for(u=0;u<d;u++)delete i[a[u]];a.splice(0,d)}return o}function bs(r,e,t){const n=r.currentDevicePixelRatio,i=t!==0?Math.max(t/2,.5):0;return Math.round((e-i)*n)/n+i}function AE(r,e){!e&&!r||(e=e||r.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,r.width,r.height),e.restore())}function zy(r,e,t,n){dL(r,e,t,n,null)}function dL(r,e,t,n,i){let a,o,s,u,l,f,c,h;const d=e.pointStyle,v=e.rotation,p=e.radius;let g=(v||0)*C4;if(d&&typeof d=="object"&&(a=d.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){r.save(),r.translate(t,n),r.rotate(g),r.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),r.restore();return}if(!(isNaN(p)||p<=0)){switch(r.beginPath(),d){default:i?r.ellipse(t,n,i/2,p,0,0,Gr):r.arc(t,n,p,0,Gr),r.closePath();break;case"triangle":f=i?i/2:p,r.moveTo(t+Math.sin(g)*f,n-Math.cos(g)*p),g+=bE,r.lineTo(t+Math.sin(g)*f,n-Math.cos(g)*p),g+=bE,r.lineTo(t+Math.sin(g)*f,n-Math.cos(g)*p),r.closePath();break;case"rectRounded":l=p*.516,u=p-l,o=Math.cos(g+ys)*u,c=Math.cos(g+ys)*(i?i/2-l:u),s=Math.sin(g+ys)*u,h=Math.sin(g+ys)*(i?i/2-l:u),r.arc(t-c,n-s,l,g-Ur,g-dn),r.arc(t+h,n-o,l,g-dn,g),r.arc(t+c,n+s,l,g,g+dn),r.arc(t-h,n+o,l,g+dn,g+Ur),r.closePath();break;case"rect":if(!v){u=Math.SQRT1_2*p,f=i?i/2:u,r.rect(t-f,n-u,2*f,2*u);break}g+=ys;case"rectRot":c=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(i?i/2:p),r.moveTo(t-c,n-s),r.lineTo(t+h,n-o),r.lineTo(t+c,n+s),r.lineTo(t-h,n+o),r.closePath();break;case"crossRot":g+=ys;case"cross":c=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(i?i/2:p),r.moveTo(t-c,n-s),r.lineTo(t+c,n+s),r.moveTo(t+h,n-o),r.lineTo(t-h,n+o);break;case"star":c=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(i?i/2:p),r.moveTo(t-c,n-s),r.lineTo(t+c,n+s),r.moveTo(t+h,n-o),r.lineTo(t-h,n+o),g+=ys,c=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(i?i/2:p),r.moveTo(t-c,n-s),r.lineTo(t+c,n+s),r.moveTo(t+h,n-o),r.lineTo(t-h,n+o);break;case"line":o=i?i/2:Math.cos(g)*p,s=Math.sin(g)*p,r.moveTo(t-o,n-s),r.lineTo(t+o,n+s);break;case"dash":r.moveTo(t,n),r.lineTo(t+Math.cos(g)*(i?i/2:p),n+Math.sin(g)*p);break;case!1:r.closePath();break}r.fill(),e.borderWidth>0&&r.stroke()}}function ao(r,e,t){return t=t||.5,!e||r&&r.x>e.left-t&&r.x<e.right+t&&r.y>e.top-t&&r.y<e.bottom+t}function Yp(r,e){r.save(),r.beginPath(),r.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),r.clip()}function Kp(r){r.restore()}function q4(r,e,t,n,i){if(!e)return r.lineTo(t.x,t.y);if(i==="middle"){const a=(e.x+t.x)/2;r.lineTo(a,e.y),r.lineTo(a,t.y)}else i==="after"!=!!n?r.lineTo(e.x,t.y):r.lineTo(t.x,e.y);r.lineTo(t.x,t.y)}function H4(r,e,t,n){if(!e)return r.lineTo(t.x,t.y);r.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y)}function Y4(r,e){e.translation&&r.translate(e.translation[0],e.translation[1]),yr(e.rotation)||r.rotate(e.rotation),e.color&&(r.fillStyle=e.color),e.textAlign&&(r.textAlign=e.textAlign),e.textBaseline&&(r.textBaseline=e.textBaseline)}function K4(r,e,t,n,i){if(i.strikethrough||i.underline){const a=r.measureText(n),o=e-a.actualBoundingBoxLeft,s=e+a.actualBoundingBoxRight,u=t-a.actualBoundingBoxAscent,l=t+a.actualBoundingBoxDescent,f=i.strikethrough?(u+l)/2:l;r.strokeStyle=r.fillStyle,r.beginPath(),r.lineWidth=i.decorationWidth||2,r.moveTo(o,f),r.lineTo(s,f),r.stroke()}}function Z4(r,e){const t=r.fillStyle;r.fillStyle=e.color,r.fillRect(e.left,e.top,e.width,e.height),r.fillStyle=t}function su(r,e,t,n,i,a={}){const o=Xr(e)?e:[e],s=a.strokeWidth>0&&a.strokeColor!=="";let u,l;for(r.save(),r.font=i.string,Y4(r,a),u=0;u<o.length;++u)l=o[u],a.backdrop&&Z4(r,a.backdrop),s&&(a.strokeColor&&(r.strokeStyle=a.strokeColor),yr(a.strokeWidth)||(r.lineWidth=a.strokeWidth),r.strokeText(l,t,n,a.maxWidth)),r.fillText(l,t,n,a.maxWidth),K4(r,t,n,l,a),n+=Number(i.lineHeight);r.restore()}function Ac(r,e){const{x:t,y:n,w:i,h:a,radius:o}=e;r.arc(t+o.topLeft,n+o.topLeft,o.topLeft,1.5*Ur,Ur,!0),r.lineTo(t,n+a-o.bottomLeft),r.arc(t+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,Ur,dn,!0),r.lineTo(t+i-o.bottomRight,n+a),r.arc(t+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,dn,0,!0),r.lineTo(t+i,n+o.topRight),r.arc(t+i-o.topRight,n+o.topRight,o.topRight,0,-dn,!0),r.lineTo(t+o.topLeft,n)}const Q4=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,J4=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function eG(r,e){const t=(""+r).match(Q4);if(!t||t[1]==="normal")return e*1.2;switch(r=+t[2],t[3]){case"px":return r;case"%":r/=100;break}return e*r}const tG=r=>+r||0;function Nb(r,e){const t={},n=_r(e),i=n?Object.keys(e):e,a=_r(r)?n?o=>er(r[o],r[e[o]]):o=>r[o]:()=>r;for(const o of i)t[o]=tG(a(o));return t}function vL(r){return Nb(r,{top:"y",right:"x",bottom:"y",left:"x"})}function ru(r){return Nb(r,["topLeft","topRight","bottomLeft","bottomRight"])}function Vn(r){const e=vL(r);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function wn(r,e){r=r||{},e=e||qr.font;let t=er(r.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=er(r.style,e.style);n&&!(""+n).match(J4)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:er(r.family,e.family),lineHeight:eG(er(r.lineHeight,e.lineHeight),t),size:t,style:n,weight:er(r.weight,e.weight),string:""};return i.string=W4(i),i}function Yf(r,e,t,n){let i,a,o;for(i=0,a=r.length;i<a;++i)if(o=r[i],o!==void 0&&o!==void 0)return o}function rG(r,e,t){const{min:n,max:i}=r,a=rL(e,(i-n)/2),o=(s,u)=>t&&s===0?0:s+u;return{min:o(n,-Math.abs(a)),max:o(i,a)}}function Qo(r,e){return Object.assign(Object.create(r),e)}function Db(r,e=[""],t,n,i=()=>r[0]){const a=t||r;typeof n>"u"&&(n=yL("_fallback",r));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>Db([s,...r],e,a,n)};return new Proxy(o,{deleteProperty(s,u){return delete s[u],delete s._keys,delete r[0][u],!0},get(s,u){return gL(s,u,()=>fG(u,e,r,s))},getOwnPropertyDescriptor(s,u){return Reflect.getOwnPropertyDescriptor(s._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(s,u){return kE(s).includes(u)},ownKeys(s){return kE(s)},set(s,u,l){const f=s._storage||(s._storage=i());return s[u]=f[u]=l,delete s._keys,!0}})}function Ml(r,e,t,n){const i={_cacheable:!1,_proxy:r,_context:e,_subProxy:t,_stack:new Set,_descriptors:pL(r,n),setContext:a=>Ml(r,a,t,n),override:a=>Ml(r.override(a),e,t,n)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete r[o],!0},get(a,o,s){return gL(a,o,()=>iG(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(r,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,o)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(a,o){return Reflect.has(r,o)},ownKeys(){return Reflect.ownKeys(r)},set(a,o,s){return r[o]=s,delete a[o],!0}})}function pL(r,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=r;return{allKeys:i,scriptable:t,indexable:n,isScriptable:Yo(t)?t:()=>t,isIndexable:Yo(n)?n:()=>n}}const nG=(r,e)=>r?r+Tb(e):e,Pb=(r,e)=>_r(e)&&r!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function gL(r,e,t){if(Object.prototype.hasOwnProperty.call(r,e)||e==="constructor")return r[e];const n=t();return r[e]=n,n}function iG(r,e,t){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=r;let s=n[e];return Yo(s)&&o.isScriptable(e)&&(s=aG(e,s,r,t)),Xr(s)&&s.length&&(s=oG(e,s,r,o.isIndexable)),Pb(e,s)&&(s=Ml(s,i,a&&a[e],o)),s}function aG(r,e,t,n){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=t;if(s.has(r))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+r);s.add(r);let u=e(a,o||n);return s.delete(r),Pb(r,u)&&(u=Rb(i._scopes,i,r,u)),u}function oG(r,e,t,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=t;if(typeof a.index<"u"&&n(r))return e[a.index%e.length];if(_r(e[0])){const u=e,l=i._scopes.filter(f=>f!==u);e=[];for(const f of u){const c=Rb(l,i,r,f);e.push(Ml(c,a,o&&o[r],s))}}return e}function mL(r,e,t){return Yo(r)?r(e,t):r}const sG=(r,e)=>r===!0?e:typeof r=="string"?Ho(e,r):void 0;function uG(r,e,t,n,i){for(const a of e){const o=sG(t,a);if(o){r.add(o);const s=mL(o._fallback,t,i);if(typeof s<"u"&&s!==t&&s!==n)return s}else if(o===!1&&typeof n<"u"&&t!==n)return null}return!1}function Rb(r,e,t,n){const i=e._rootScopes,a=mL(e._fallback,t,n),o=[...r,...i],s=new Set;s.add(n);let u=TE(s,o,t,a||t,n);return u===null||typeof a<"u"&&a!==t&&(u=TE(s,o,a,u,n),u===null)?!1:Db(Array.from(s),[""],i,a,()=>lG(e,t,n))}function TE(r,e,t,n,i){for(;t;)t=uG(r,e,t,n,i);return t}function lG(r,e,t){const n=r._getTarget();e in n||(n[e]={});const i=n[e];return Xr(i)&&_r(t)?t:i||{}}function fG(r,e,t,n){let i;for(const a of e)if(i=yL(nG(a,r),t),typeof i<"u")return Pb(r,i)?Rb(t,n,r,i):i}function yL(r,e){for(const t of e){if(!t)continue;const n=t[r];if(typeof n<"u")return n}}function kE(r){let e=r._keys;return e||(e=r._keys=cG(r._scopes)),e}function cG(r){const e=new Set;for(const t of r)for(const n of Object.keys(t).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function bL(r,e,t,n){const{iScale:i}=r,{key:a="r"}=this._parsing,o=new Array(n);let s,u,l,f;for(s=0,u=n;s<u;++s)l=s+t,f=e[l],o[s]={r:i.parse(Ho(f,a),l)};return o}const hG=Number.EPSILON||1e-14,Cl=(r,e)=>e<r.length&&!r[e].skip&&r[e],_L=r=>r==="x"?"y":"x";function dG(r,e,t,n){const i=r.skip?e:r,a=e,o=t.skip?e:t,s=Fy(a,i),u=Fy(o,a);let l=s/(s+u),f=u/(s+u);l=isNaN(l)?0:l,f=isNaN(f)?0:f;const c=n*l,h=n*f;return{previous:{x:a.x-c*(o.x-i.x),y:a.y-c*(o.y-i.y)},next:{x:a.x+h*(o.x-i.x),y:a.y+h*(o.y-i.y)}}}function vG(r,e,t){const n=r.length;let i,a,o,s,u,l=Cl(r,0);for(let f=0;f<n-1;++f)if(u=l,l=Cl(r,f+1),!(!u||!l)){if(fc(e[f],0,hG)){t[f]=t[f+1]=0;continue}i=t[f]/e[f],a=t[f+1]/e[f],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),t[f]=i*o*e[f],t[f+1]=a*o*e[f])}}function pG(r,e,t="x"){const n=_L(t),i=r.length;let a,o,s,u=Cl(r,0);for(let l=0;l<i;++l){if(o=s,s=u,u=Cl(r,l+1),!s)continue;const f=s[t],c=s[n];o&&(a=(f-o[t])/3,s[`cp1${t}`]=f-a,s[`cp1${n}`]=c-a*e[l]),u&&(a=(u[t]-f)/3,s[`cp2${t}`]=f+a,s[`cp2${n}`]=c+a*e[l])}}function gG(r,e="x"){const t=_L(e),n=r.length,i=Array(n).fill(0),a=Array(n);let o,s,u,l=Cl(r,0);for(o=0;o<n;++o)if(s=u,u=l,l=Cl(r,o+1),!!u){if(l){const f=l[e]-u[e];i[o]=f!==0?(l[t]-u[t])/f:0}a[o]=s?l?Ca(i[o-1])!==Ca(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}vG(r,i,a),pG(r,a,e)}function Yh(r,e,t){return Math.max(Math.min(r,t),e)}function mG(r,e){let t,n,i,a,o,s=ao(r[0],e);for(t=0,n=r.length;t<n;++t)o=a,a=s,s=t<n-1&&ao(r[t+1],e),a&&(i=r[t],o&&(i.cp1x=Yh(i.cp1x,e.left,e.right),i.cp1y=Yh(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=Yh(i.cp2x,e.left,e.right),i.cp2y=Yh(i.cp2y,e.top,e.bottom)))}function yG(r,e,t,n,i){let a,o,s,u;if(e.spanGaps&&(r=r.filter(l=>!l.skip)),e.cubicInterpolationMode==="monotone")gG(r,i);else{let l=n?r[r.length-1]:r[0];for(a=0,o=r.length;a<o;++a)s=r[a],u=dG(l,s,r[Math.min(a+1,o-(n?0:1))%o],e.tension),s.cp1x=u.previous.x,s.cp1y=u.previous.y,s.cp2x=u.next.x,s.cp2y=u.next.y,l=s}e.capBezierPoints&&mG(r,t)}function Fb(){return typeof window<"u"&&typeof document<"u"}function Bb(r){let e=r.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function rp(r,e,t){let n;return typeof r=="string"?(n=parseInt(r,10),r.indexOf("%")!==-1&&(n=n/100*e.parentNode[t])):n=r,n}const Zp=r=>r.ownerDocument.defaultView.getComputedStyle(r,null);function bG(r,e){return Zp(r).getPropertyValue(e)}const _G=["top","right","bottom","left"];function nu(r,e,t){const n={};t=t?"-"+t:"";for(let i=0;i<4;i++){const a=_G[i];n[a]=parseFloat(r[e+"-"+a+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const xG=(r,e,t)=>(r>0||e>0)&&(!t||!t.shadowRoot);function wG(r,e){const t=r.touches,n=t&&t.length?t[0]:r,{offsetX:i,offsetY:a}=n;let o=!1,s,u;if(xG(i,a,r.target))s=i,u=a;else{const l=e.getBoundingClientRect();s=n.clientX-l.left,u=n.clientY-l.top,o=!0}return{x:s,y:u,box:o}}function Vs(r,e){if("native"in r)return r;const{canvas:t,currentDevicePixelRatio:n}=e,i=Zp(t),a=i.boxSizing==="border-box",o=nu(i,"padding"),s=nu(i,"border","width"),{x:u,y:l,box:f}=wG(r,t),c=o.left+(f&&s.left),h=o.top+(f&&s.top);let{width:d,height:v}=e;return a&&(d-=o.width+s.width,v-=o.height+s.height),{x:Math.round((u-c)/d*t.width/n),y:Math.round((l-h)/v*t.height/n)}}function EG(r,e,t){let n,i;if(e===void 0||t===void 0){const a=r&&Bb(r);if(!a)e=r.clientWidth,t=r.clientHeight;else{const o=a.getBoundingClientRect(),s=Zp(a),u=nu(s,"border","width"),l=nu(s,"padding");e=o.width-l.width-u.width,t=o.height-l.height-u.height,n=rp(s.maxWidth,a,"clientWidth"),i=rp(s.maxHeight,a,"clientHeight")}}return{width:e,height:t,maxWidth:n||ep,maxHeight:i||ep}}const Kh=r=>Math.round(r*10)/10;function SG(r,e,t,n){const i=Zp(r),a=nu(i,"margin"),o=rp(i.maxWidth,r,"clientWidth")||ep,s=rp(i.maxHeight,r,"clientHeight")||ep,u=EG(r,e,t);let{width:l,height:f}=u;if(i.boxSizing==="content-box"){const h=nu(i,"border","width"),d=nu(i,"padding");l-=d.width+h.width,f-=d.height+h.height}return l=Math.max(0,l-a.width),f=Math.max(0,n?l/n:f-a.height),l=Kh(Math.min(l,o,u.maxWidth)),f=Kh(Math.min(f,s,u.maxHeight)),l&&!f&&(f=Kh(l/2)),(e!==void 0||t!==void 0)&&n&&u.height&&f>u.height&&(f=u.height,l=Kh(Math.floor(f*n))),{width:l,height:f}}function IE(r,e,t){const n=e||1,i=Math.floor(r.height*n),a=Math.floor(r.width*n);r.height=Math.floor(r.height),r.width=Math.floor(r.width);const o=r.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${r.height}px`,o.style.width=`${r.width}px`),r.currentDevicePixelRatio!==n||o.height!==i||o.width!==a?(r.currentDevicePixelRatio=n,o.height=i,o.width=a,r.ctx.setTransform(n,0,0,n,0,0),!0):!1}const MG=function(){let r=!1;try{const e={get passive(){return r=!0,!1}};Fb()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return r}();function LE(r,e){const t=bG(r,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ws(r,e,t,n){return{x:r.x+t*(e.x-r.x),y:r.y+t*(e.y-r.y)}}function CG(r,e,t,n){return{x:r.x+t*(e.x-r.x),y:n==="middle"?t<.5?r.y:e.y:n==="after"?t<1?r.y:e.y:t>0?e.y:r.y}}function AG(r,e,t,n){const i={x:r.cp2x,y:r.cp2y},a={x:e.cp1x,y:e.cp1y},o=Ws(r,i,t),s=Ws(i,a,t),u=Ws(a,e,t),l=Ws(o,s,t),f=Ws(s,u,t);return Ws(l,f,t)}const TG=function(r,e){return{x(t){return r+r+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},kG=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,e){return r+e},leftForLtr(r,e){return r}}};function vl(r,e,t){return r?TG(e,t):kG()}function xL(r,e){let t,n;(e==="ltr"||e==="rtl")&&(t=r.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),r.prevTextDirection=n)}function wL(r,e){e!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",e[0],e[1]))}function EL(r){return r==="angle"?{between:Cc,compare:I4,normalize:gi}:{between:no,compare:(e,t)=>e-t,normalize:e=>e}}function OE({start:r,end:e,count:t,loop:n,style:i}){return{start:r%t,end:e%t,loop:n&&(e-r+1)%t===0,style:i}}function IG(r,e,t){const{property:n,start:i,end:a}=t,{between:o,normalize:s}=EL(n),u=e.length;let{start:l,end:f,loop:c}=r,h,d;if(c){for(l+=u,f+=u,h=0,d=u;h<d&&o(s(e[l%u][n]),i,a);++h)l--,f--;l%=u,f%=u}return f<l&&(f+=u),{start:l,end:f,loop:c,style:r.style}}function SL(r,e,t){if(!t)return[r];const{property:n,start:i,end:a}=t,o=e.length,{compare:s,between:u,normalize:l}=EL(n),{start:f,end:c,loop:h,style:d}=IG(r,e,t),v=[];let p=!1,g=null,m,b,_;const y=()=>u(i,_,m)&&s(i,_)!==0,x=()=>s(a,m)===0||u(a,_,m),w=()=>p||y(),S=()=>!p||x();for(let E=f,C=f;E<=c;++E)b=e[E%o],!b.skip&&(m=l(b[n]),m!==_&&(p=u(m,i,a),g===null&&w()&&(g=s(m,i)===0?E:C),g!==null&&S()&&(v.push(OE({start:g,end:E,loop:h,count:o,style:d})),g=null),C=E,_=m));return g!==null&&v.push(OE({start:g,end:c,loop:h,count:o,style:d})),v}function ML(r,e){const t=[],n=r.segments;for(let i=0;i<n.length;i++){const a=SL(n[i],r.points,e);a.length&&t.push(...a)}return t}function LG(r,e,t,n){let i=0,a=e-1;if(t&&!n)for(;i<e&&!r[i].skip;)i++;for(;i<e&&r[i].skip;)i++;for(i%=e,t&&(a+=i);a>i&&r[a%e].skip;)a--;return a%=e,{start:i,end:a}}function OG(r,e,t,n){const i=r.length,a=[];let o=e,s=r[e],u;for(u=e+1;u<=t;++u){const l=r[u%i];l.skip||l.stop?s.skip||(n=!1,a.push({start:e%i,end:(u-1)%i,loop:n}),e=o=l.stop?u:null):(o=u,s.skip&&(e=u)),s=l}return o!==null&&a.push({start:e%i,end:o%i,loop:n}),a}function NG(r,e){const t=r.poin