@n1k1t/mock-server 0.1.54 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.unitignore +2 -0
- package/README.md +3 -3
- package/lib/package.json +7 -6
- package/lib/src/client/onsite.d.ts +3 -3
- package/lib/src/client/onsite.d.ts.map +1 -1
- package/lib/src/client/onsite.js.map +1 -1
- package/lib/src/client/remote.d.ts +3 -3
- package/lib/src/client/remote.d.ts.map +1 -1
- package/lib/src/client/remote.js.map +1 -1
- package/lib/src/client/types.d.ts +2 -2
- package/lib/src/client/types.d.ts.map +1 -1
- package/lib/src/client/utils.d.ts.map +1 -1
- package/lib/src/client/utils.js.map +1 -1
- package/lib/src/config/index.d.ts +20 -1
- package/lib/src/config/index.d.ts.map +1 -1
- package/lib/src/config/index.js +26 -1
- package/lib/src/config/index.js.map +1 -1
- package/lib/src/config/model.d.ts +9 -25
- package/lib/src/config/model.d.ts.map +1 -1
- package/lib/src/config/model.js +6 -24
- package/lib/src/config/model.js.map +1 -1
- package/lib/src/expectations/models/expectation.d.ts +2 -2
- package/lib/src/expectations/models/storage.d.ts +1 -1
- package/lib/src/expectations/models/storage.d.ts.map +1 -1
- package/lib/src/expectations/models/storage.js +1 -1
- package/lib/src/expectations/models/storage.js.map +1 -1
- package/lib/src/expectations/operators/has.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/has.operator.js +1 -2
- package/lib/src/expectations/operators/has.operator.js.map +1 -1
- package/lib/src/expectations/operators/merge.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/merge.operator.js +1 -2
- package/lib/src/expectations/operators/merge.operator.js.map +1 -1
- package/lib/src/expectations/operators/remove.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/remove.operator.js +1 -2
- package/lib/src/expectations/operators/remove.operator.js.map +1 -1
- package/lib/src/expectations/operators/set.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/set.operator.js +1 -2
- package/lib/src/expectations/operators/set.operator.js.map +1 -1
- package/lib/src/expectations/utils/index.d.ts +4 -0
- package/lib/src/expectations/utils/index.d.ts.map +1 -0
- package/lib/src/expectations/utils/index.js +20 -0
- package/lib/src/expectations/utils/index.js.map +1 -0
- package/lib/src/{utils → expectations/utils}/json.d.ts +0 -9
- package/lib/src/expectations/utils/json.d.ts.map +1 -0
- package/lib/src/{utils → expectations/utils}/json.js +1 -16
- package/lib/src/expectations/utils/json.js.map +1 -0
- package/lib/src/expectations/{utils.d.ts → utils/location.d.ts} +2 -4
- package/lib/src/expectations/utils/location.d.ts.map +1 -0
- package/lib/src/expectations/{utils.js → utils/location.js} +2 -44
- package/lib/src/expectations/{utils.js.map → utils/location.js.map} +1 -1
- package/lib/src/expectations/utils/schema.d.ts +4 -0
- package/lib/src/expectations/utils/schema.d.ts.map +1 -0
- package/lib/src/expectations/utils/schema.js +50 -0
- package/lib/src/expectations/utils/schema.js.map +1 -0
- package/lib/src/gui/app/types/index.d.ts +2 -0
- package/lib/src/gui/app/types/index.d.ts.map +1 -0
- package/lib/src/gui/app/types/index.js +18 -0
- package/lib/src/gui/app/types/index.js.map +1 -0
- package/lib/src/server/endpoints/config.get.endpoint.d.ts +3 -3
- package/lib/src/server/endpoints/config.get.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.js +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.js.map +1 -1
- package/lib/src/server/index.d.ts +0 -1
- package/lib/src/server/index.d.ts.map +1 -1
- package/lib/src/server/index.js +3 -1
- package/lib/src/server/index.js.map +1 -1
- package/lib/src/server/models/context/index.d.ts +1 -1
- package/lib/src/server/models/context/index.d.ts.map +1 -1
- package/lib/src/server/models/context/index.js +1 -1
- package/lib/src/server/models/context/index.js.map +1 -1
- package/lib/src/server/models/executor/index.js +2 -2
- package/lib/src/server/models/executor/index.js.map +1 -1
- package/lib/src/server/models/history/model.d.ts +1 -1
- package/lib/src/server/models/history/model.d.ts.map +1 -1
- package/lib/src/server/models/history/model.js +1 -1
- package/lib/src/server/models/history/model.js.map +1 -1
- package/lib/src/server/models/history/storage.js +2 -2
- package/lib/src/server/models/history/storage.js.map +1 -1
- package/lib/src/server/models/providers/storage.js +2 -2
- package/lib/src/server/models/providers/storage.js.map +1 -1
- package/lib/src/server/models/router.d.ts +2 -2
- package/lib/src/server/models/router.d.ts.map +1 -1
- package/lib/src/server/models/router.js.map +1 -1
- package/lib/src/server/models/transports/storage.js +1 -1
- package/lib/src/server/models/transports/storage.js.map +1 -1
- package/lib/src/server/services/metrics.service.d.ts.map +1 -1
- package/lib/src/server/services/metrics.service.js +4 -1
- package/lib/src/server/services/metrics.service.js.map +1 -1
- package/lib/src/server/transports/http.transport/index.js +2 -2
- package/lib/src/server/transports/http.transport/index.js.map +1 -1
- package/lib/src/server/transports/ws.transport/index.js +2 -2
- package/lib/src/server/transports/ws.transport/index.js.map +1 -1
- package/lib/src/server/types/index.d.ts +1 -1
- package/lib/src/server/types/index.d.ts.map +1 -1
- package/lib/src/{utils/validation.d.ts → server/utils/index.d.ts} +2 -2
- package/lib/src/server/utils/index.d.ts.map +1 -0
- package/lib/src/{utils/validation.js → server/utils/index.js} +1 -1
- package/lib/src/{utils/validation.js.map → server/utils/index.js.map} +1 -1
- package/lib/src/utils/index.d.ts +25 -4
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/index.js +45 -17
- package/lib/src/utils/index.js.map +1 -1
- package/package.json +7 -6
- package/public/assets/index-Dt5tRBvw.js +496 -0
- package/public/assets/index-TxMiEbRI.css +4 -0
- package/public/index.html +3 -5
- package/lib/src/expectations/utils.d.ts.map +0 -1
- package/lib/src/extensions.d.ts +0 -2
- package/lib/src/extensions.d.ts.map +0 -1
- package/lib/src/extensions.js +0 -9
- package/lib/src/extensions.js.map +0 -1
- package/lib/src/utils/common.d.ts +0 -16
- package/lib/src/utils/common.d.ts.map +0 -1
- package/lib/src/utils/common.js +0 -30
- package/lib/src/utils/common.js.map +0 -1
- package/lib/src/utils/json.d.ts.map +0 -1
- package/lib/src/utils/json.js.map +0 -1
- package/lib/src/utils/regexp.d.ts +0 -2
- package/lib/src/utils/regexp.d.ts.map +0 -1
- package/lib/src/utils/regexp.js +0 -9
- package/lib/src/utils/regexp.js.map +0 -1
- package/lib/src/utils/validation.d.ts.map +0 -1
- package/public/assets/app-CgjcYeok.js +0 -468
- package/public/assets/index-DC0SVnuL.js +0 -1
- package/public/assets/index-dZYvh3s8.css +0 -4
- package/public/assets/styles-B6KoIIn4.css +0 -1
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
var kp=Object.defineProperty;var Cp=(n,t,e)=>t in n?kp(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var z=(n,t,e)=>Cp(n,typeof t!="symbol"?t+"":t,e);var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zi={exports:{}},Mp=zi.exports,sl;function Ep(){return sl||(sl=1,function(n,t){(function(e,i){n.exports=i()})(Mp,function(){return function(e,i,r){e=e||{};var s=i.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(u,c,p,h){return s.fromToBase(u,c,p,h)}r.en.relativeTime=o,s.fromToBase=function(u,c,p,h,d){for(var f,g,b,x=p.$locale().relativeTime||o,w=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],E=w.length,v=0;v<E;v+=1){var _=w[v];_.d&&(f=h?r(u).diff(p,_.d,!0):p.diff(u,_.d,!0));var k=(e.rounding||Math.round)(Math.abs(f));if(b=f>0,k<=_.r||!_.r){k<=1&&v>0&&(_=w[v-1]);var M=x[_.l];d&&(k=d(""+k)),g=typeof M=="string"?M.replace("%d",k):M(k,c,_.l,b);break}}if(c)return g;var P=b?x.future:x.past;return typeof P=="function"?P(g):P.replace("%s",g)},s.to=function(u,c){return a(u,c,this,!0)},s.from=function(u,c){return a(u,c,this)};var l=function(u){return u.$u?r.utc():r()};s.toNow=function(u){return this.to(l(this),u)},s.fromNow=function(u){return this.from(l(this),u)}}})}(zi)),zi.exports}var Pp=Ep();const Op=qt(Pp);var Vi={exports:{}},Ap=Vi.exports,ol;function Lp(){return ol||(ol=1,function(n,t){(function(e,i){n.exports=i()})(Ap,function(){var e=1e3,i=6e4,r=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",c="week",p="month",h="quarter",d="year",f="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var D=["th","st","nd","rd"],B=F%100;return"["+F+(D[(B-20)%10]||D[B]||D[0])+"]"}},E=function(F,D,B){var q=String(F);return!q||q.length>=D?F:""+Array(D+1-q.length).join(B)+F},v={s:E,z:function(F){var D=-F.utcOffset(),B=Math.abs(D),q=Math.floor(B/60),H=B%60;return(D<=0?"+":"-")+E(q,2,"0")+":"+E(H,2,"0")},m:function F(D,B){if(D.date()<B.date())return-F(B,D);var q=12*(B.year()-D.year())+(B.month()-D.month()),H=D.clone().add(q,p),V=B-H<0,W=D.clone().add(q+(V?-1:1),p);return+(-(q+(B-H)/(V?H-W:W-H))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:p,y:d,w:c,d:u,D:f,h:l,m:a,s:o,ms:s,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},_="en",k={};k[_]=w;var M="$isDayjsObject",P=function(F){return F instanceof I||!(!F||!F[M])},T=function F(D,B,q){var H;if(!D)return _;if(typeof D=="string"){var V=D.toLowerCase();k[V]&&(H=V),B&&(k[V]=B,H=V);var W=D.split("-");if(!H&&W.length>1)return F(W[0])}else{var Q=D.name;k[Q]=D,H=Q}return!q&&H&&(_=H),H||!q&&_},A=function(F,D){if(P(F))return F.clone();var B=typeof D=="object"?D:{};return B.date=F,B.args=arguments,new I(B)},L=v;L.l=T,L.i=P,L.w=function(F,D){return A(F,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var I=function(){function F(B){this.$L=T(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[M]=!0}var D=F.prototype;return D.parse=function(B){this.$d=function(q){var H=q.date,V=q.utc;if(H===null)return new Date(NaN);if(L.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var W=H.match(b);if(W){var Q=W[2]-1||0,et=(W[7]||"0").substring(0,3);return V?new Date(Date.UTC(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,et)):new Date(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,et)}}return new Date(H)}(B),this.init()},D.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},D.$utils=function(){return L},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(B,q){var H=A(B);return this.startOf(q)<=H&&H<=this.endOf(q)},D.isAfter=function(B,q){return A(B)<this.startOf(q)},D.isBefore=function(B,q){return this.endOf(q)<A(B)},D.$g=function(B,q,H){return L.u(B)?this[q]:this.set(H,B)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(B,q){var H=this,V=!!L.u(q)||q,W=L.p(B),Q=function(Yt,St){var Et=L.w(H.$u?Date.UTC(H.$y,St,Yt):new Date(H.$y,St,Yt),H);return V?Et:Et.endOf(u)},et=function(Yt,St){return L.w(H.toDate()[Yt].apply(H.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(St)),H)},rt=this.$W,U=this.$M,tt=this.$D,wt="set"+(this.$u?"UTC":"");switch(W){case d:return V?Q(1,0):Q(31,11);case p:return V?Q(1,U):Q(0,U+1);case c:var Gt=this.$locale().weekStart||0,pe=(rt<Gt?rt+7:rt)-Gt;return Q(V?tt-pe:tt+(6-pe),U);case u:case f:return et(wt+"Hours",0);case l:return et(wt+"Minutes",1);case a:return et(wt+"Seconds",2);case o:return et(wt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(B){return this.startOf(B,!1)},D.$set=function(B,q){var H,V=L.p(B),W="set"+(this.$u?"UTC":""),Q=(H={},H[u]=W+"Date",H[f]=W+"Date",H[p]=W+"Month",H[d]=W+"FullYear",H[l]=W+"Hours",H[a]=W+"Minutes",H[o]=W+"Seconds",H[s]=W+"Milliseconds",H)[V],et=V===u?this.$D+(q-this.$W):q;if(V===p||V===d){var rt=this.clone().set(f,1);rt.$d[Q](et),rt.init(),this.$d=rt.set(f,Math.min(this.$D,rt.daysInMonth())).$d}else Q&&this.$d[Q](et);return this.init(),this},D.set=function(B,q){return this.clone().$set(B,q)},D.get=function(B){return this[L.p(B)]()},D.add=function(B,q){var H,V=this;B=Number(B);var W=L.p(q),Q=function(U){var tt=A(V);return L.w(tt.date(tt.date()+Math.round(U*B)),V)};if(W===p)return this.set(p,this.$M+B);if(W===d)return this.set(d,this.$y+B);if(W===u)return Q(1);if(W===c)return Q(7);var et=(H={},H[a]=i,H[l]=r,H[o]=e,H)[W]||1,rt=this.$d.getTime()+B*et;return L.w(rt,this)},D.subtract=function(B,q){return this.add(-1*B,q)},D.format=function(B){var q=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var V=B||"YYYY-MM-DDTHH:mm:ssZ",W=L.z(this),Q=this.$H,et=this.$m,rt=this.$M,U=H.weekdays,tt=H.months,wt=H.meridiem,Gt=function(St,Et,ne,Me){return St&&(St[Et]||St(q,V))||ne[Et].slice(0,Me)},pe=function(St){return L.s(Q%12||12,St,"0")},Yt=wt||function(St,Et,ne){var Me=St<12?"AM":"PM";return ne?Me.toLowerCase():Me};return V.replace(x,function(St,Et){return Et||function(ne){switch(ne){case"YY":return String(q.$y).slice(-2);case"YYYY":return L.s(q.$y,4,"0");case"M":return rt+1;case"MM":return L.s(rt+1,2,"0");case"MMM":return Gt(H.monthsShort,rt,tt,3);case"MMMM":return Gt(tt,rt);case"D":return q.$D;case"DD":return L.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Gt(H.weekdaysMin,q.$W,U,2);case"ddd":return Gt(H.weekdaysShort,q.$W,U,3);case"dddd":return U[q.$W];case"H":return String(Q);case"HH":return L.s(Q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return Yt(Q,et,!0);case"A":return Yt(Q,et,!1);case"m":return String(et);case"mm":return L.s(et,2,"0");case"s":return String(q.$s);case"ss":return L.s(q.$s,2,"0");case"SSS":return L.s(q.$ms,3,"0");case"Z":return W}return null}(St)||W.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(B,q,H){var V,W=this,Q=L.p(q),et=A(B),rt=(et.utcOffset()-this.utcOffset())*i,U=this-et,tt=function(){return L.m(W,et)};switch(Q){case d:V=tt()/12;break;case p:V=tt();break;case h:V=tt()/3;break;case c:V=(U-rt)/6048e5;break;case u:V=(U-rt)/864e5;break;case l:V=U/r;break;case a:V=U/i;break;case o:V=U/e;break;default:V=U}return H?V:L.a(V)},D.daysInMonth=function(){return this.endOf(p).$D},D.$locale=function(){return k[this.$L]},D.locale=function(B,q){if(!B)return this.$L;var H=this.clone(),V=T(B,q,!0);return V&&(H.$L=V),H},D.clone=function(){return L.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},F}(),j=I.prototype;return A.prototype=j,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",p],["$y",d],["$D",f]].forEach(function(F){j[F[1]]=function(D){return this.$g(D,F[0],F[1])}}),A.extend=function(F,D){return F.$i||(F(D,I,A),F.$i=!0),A},A.locale=T,A.isDayjs=P,A.unix=function(F){return A(1e3*F)},A.en=k[_],A.Ls=k,A.p={},A})}(Vi)),Vi.exports}var Rp=Lp();const Xe=qt(Rp);Xe.extend(Op);const Tp=`
|
|
2
|
-
<div class="buttons"></div>
|
|
3
|
-
`;var Jn={exports:{}},al;function Ip(){if(al)return Jn.exports;al=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(_,k,M){return Function.prototype.apply.call(_,k,M)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:e=function(_){return Object.getOwnPropertyNames(_)};function i(v){console&&console.warn&&console.warn(v)}var r=Number.isNaN||function(_){return _!==_};function s(){s.init.call(this)}Jn.exports=s,Jn.exports.once=x,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");o=v}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(_){if(typeof _!="number"||_<0||r(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this};function l(v){return v._maxListeners===void 0?s.defaultMaxListeners:v._maxListeners}s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(_){for(var k=[],M=1;M<arguments.length;M++)k.push(arguments[M]);var P=_==="error",T=this._events;if(T!==void 0)P=P&&T.error===void 0;else if(!P)return!1;if(P){var A;if(k.length>0&&(A=k[0]),A instanceof Error)throw A;var L=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw L.context=A,L}var I=T[_];if(I===void 0)return!1;if(typeof I=="function")t(I,this,k);else for(var j=I.length,F=f(I,j),M=0;M<j;++M)t(F[M],this,k);return!0};function u(v,_,k,M){var P,T,A;if(a(k),T=v._events,T===void 0?(T=v._events=Object.create(null),v._eventsCount=0):(T.newListener!==void 0&&(v.emit("newListener",_,k.listener?k.listener:k),T=v._events),A=T[_]),A===void 0)A=T[_]=k,++v._eventsCount;else if(typeof A=="function"?A=T[_]=M?[k,A]:[A,k]:M?A.unshift(k):A.push(k),P=l(v),P>0&&A.length>P&&!A.warned){A.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=v,L.type=_,L.count=A.length,i(L)}return v}s.prototype.addListener=function(_,k){return u(this,_,k,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(_,k){return u(this,_,k,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(v,_,k){var M={fired:!1,wrapFn:void 0,target:v,type:_,listener:k},P=c.bind(M);return P.listener=k,M.wrapFn=P,P}s.prototype.once=function(_,k){return a(k),this.on(_,p(this,_,k)),this},s.prototype.prependOnceListener=function(_,k){return a(k),this.prependListener(_,p(this,_,k)),this},s.prototype.removeListener=function(_,k){var M,P,T,A,L;if(a(k),P=this._events,P===void 0)return this;if(M=P[_],M===void 0)return this;if(M===k||M.listener===k)--this._eventsCount===0?this._events=Object.create(null):(delete P[_],P.removeListener&&this.emit("removeListener",_,M.listener||k));else if(typeof M!="function"){for(T=-1,A=M.length-1;A>=0;A--)if(M[A]===k||M[A].listener===k){L=M[A].listener,T=A;break}if(T<0)return this;T===0?M.shift():g(M,T),M.length===1&&(P[_]=M[0]),P.removeListener!==void 0&&this.emit("removeListener",_,L||k)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(_){var k,M,P;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[_]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[_]),this;if(arguments.length===0){var T=Object.keys(M),A;for(P=0;P<T.length;++P)A=T[P],A!=="removeListener"&&this.removeAllListeners(A);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(k=M[_],typeof k=="function")this.removeListener(_,k);else if(k!==void 0)for(P=k.length-1;P>=0;P--)this.removeListener(_,k[P]);return this};function h(v,_,k){var M=v._events;if(M===void 0)return[];var P=M[_];return P===void 0?[]:typeof P=="function"?k?[P.listener||P]:[P]:k?b(P):f(P,P.length)}s.prototype.listeners=function(_){return h(this,_,!0)},s.prototype.rawListeners=function(_){return h(this,_,!1)},s.listenerCount=function(v,_){return typeof v.listenerCount=="function"?v.listenerCount(_):d.call(v,_)},s.prototype.listenerCount=d;function d(v){var _=this._events;if(_!==void 0){var k=_[v];if(typeof k=="function")return 1;if(k!==void 0)return k.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function f(v,_){for(var k=new Array(_),M=0;M<_;++M)k[M]=v[M];return k}function g(v,_){for(;_+1<v.length;_++)v[_]=v[_+1];v.pop()}function b(v){for(var _=new Array(v.length),k=0;k<_.length;++k)_[k]=v[k].listener||v[k];return _}function x(v,_){return new Promise(function(k,M){function P(A){v.removeListener(_,T),M(A)}function T(){typeof v.removeListener=="function"&&v.removeListener("error",P),k([].slice.call(arguments))}E(v,_,T,{once:!0}),_!=="error"&&w(v,P,{once:!0})})}function w(v,_,k){typeof v.on=="function"&&E(v,"error",_,k)}function E(v,_,k,M){if(typeof v.on=="function")M.once?v.once(_,k):v.on(_,k);else if(typeof v.addEventListener=="function")v.addEventListener(_,function P(T){M.once&&v.removeEventListener(_,P),k(T)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v)}return Jn.exports}var Pf=Ip();const Vn=qt(Pf);var Zn={exports:{}},Qn={exports:{}},jt={},Pt={},ll;function Tt(){if(ll)return Pt;ll=1,Pt.__esModule=!0,Pt.extend=r,Pt.indexOf=l,Pt.escapeExpression=u,Pt.isEmpty=c,Pt.createFrame=p,Pt.blockParams=h,Pt.appendContextPath=d;var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},t=/[&<>"'`=]/g,e=/[&<>"'`=]/;function i(f){return n[f]}function r(f){for(var g=1;g<arguments.length;g++)for(var b in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],b)&&(f[b]=arguments[g][b]);return f}var s=Object.prototype.toString;Pt.toString=s;var o=function(g){return typeof g=="function"};o(/x/)&&(Pt.isFunction=o=function(f){return typeof f=="function"&&s.call(f)==="[object Function]"}),Pt.isFunction=o;var a=Array.isArray||function(f){return f&&typeof f=="object"?s.call(f)==="[object Array]":!1};Pt.isArray=a;function l(f,g){for(var b=0,x=f.length;b<x;b++)if(f[b]===g)return b;return-1}function u(f){if(typeof f!="string"){if(f&&f.toHTML)return f.toHTML();if(f==null)return"";if(!f)return f+"";f=""+f}return e.test(f)?f.replace(t,i):f}function c(f){return!f&&f!==0?!0:!!(a(f)&&f.length===0)}function p(f){var g=r({},f);return g._parent=f,g}function h(f,g){return f.path=g,f}function d(f,g){return(f?f+".":"")+g}return Pt}var ti={exports:{}},cl;function $t(){return cl||(cl=1,function(n,t){t.__esModule=!0;var e=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function i(r,s){var o=s&&s.loc,a=void 0,l=void 0,u=void 0,c=void 0;o&&(a=o.start.line,l=o.end.line,u=o.start.column,c=o.end.column,r+=" - "+a+":"+u);for(var p=Error.prototype.constructor.call(this,r),h=0;h<e.length;h++)this[e[h]]=p[e[h]];Error.captureStackTrace&&Error.captureStackTrace(this,i);try{o&&(this.lineNumber=a,this.endLineNumber=l,Object.defineProperty?(Object.defineProperty(this,"column",{value:u,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:c,enumerable:!0})):(this.column=u,this.endColumn=c))}catch{}}i.prototype=new Error,t.default=i,n.exports=t.default}(ti,ti.exports)),ti.exports}var cn={},ei={exports:{}},ul;function Dp(){return ul||(ul=1,function(n,t){t.__esModule=!0;var e=Tt();t.default=function(i){i.registerHelper("blockHelperMissing",function(r,s){var o=s.inverse,a=s.fn;if(r===!0)return a(this);if(r===!1||r==null)return o(this);if(e.isArray(r))return r.length>0?(s.ids&&(s.ids=[s.name]),i.helpers.each(r,s)):o(this);if(s.data&&s.ids){var l=e.createFrame(s.data);l.contextPath=e.appendContextPath(s.data.contextPath,s.name),s={data:l}}return a(r,s)})},n.exports=t.default}(ei,ei.exports)),ei.exports}var ni={exports:{}},hl;function Bp(){return hl||(hl=1,function(n,t){t.__esModule=!0;function e(o){return o&&o.__esModule?o:{default:o}}var i=Tt(),r=$t(),s=e(r);t.default=function(o){o.registerHelper("each",function(a,l){if(!l)throw new s.default("Must pass iterator to #each");var u=l.fn,c=l.inverse,p=0,h="",d=void 0,f=void 0;l.data&&l.ids&&(f=i.appendContextPath(l.data.contextPath,l.ids[0])+"."),i.isFunction(a)&&(a=a.call(this)),l.data&&(d=i.createFrame(l.data));function g(v,_,k){d&&(d.key=v,d.index=_,d.first=_===0,d.last=!!k,f&&(d.contextPath=f+v)),h=h+u(a[v],{data:d,blockParams:i.blockParams([a[v],v],[f+v,null])})}if(a&&typeof a=="object")if(i.isArray(a))for(var b=a.length;p<b;p++)p in a&&g(p,p,p===a.length-1);else if(ue.Symbol&&a[ue.Symbol.iterator]){for(var x=[],w=a[ue.Symbol.iterator](),E=w.next();!E.done;E=w.next())x.push(E.value);a=x;for(var b=a.length;p<b;p++)g(p,p,p===a.length-1)}else(function(){var v=void 0;Object.keys(a).forEach(function(_){v!==void 0&&g(v,p-1),v=_,p++}),v!==void 0&&g(v,p-1,!0)})();return p===0&&(h=c(this)),h})},n.exports=t.default}(ni,ni.exports)),ni.exports}var ii={exports:{}},fl;function Np(){return fl||(fl=1,function(n,t){t.__esModule=!0;function e(s){return s&&s.__esModule?s:{default:s}}var i=$t(),r=e(i);t.default=function(s){s.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},n.exports=t.default}(ii,ii.exports)),ii.exports}var ri={exports:{}},dl;function Fp(){return dl||(dl=1,function(n,t){t.__esModule=!0;function e(o){return o&&o.__esModule?o:{default:o}}var i=Tt(),r=$t(),s=e(r);t.default=function(o){o.registerHelper("if",function(a,l){if(arguments.length!=2)throw new s.default("#if requires exactly one argument");return i.isFunction(a)&&(a=a.call(this)),!l.hash.includeZero&&!a||i.isEmpty(a)?l.inverse(this):l.fn(this)}),o.registerHelper("unless",function(a,l){if(arguments.length!=2)throw new s.default("#unless requires exactly one argument");return o.helpers.if.call(this,a,{fn:l.inverse,inverse:l.fn,hash:l.hash})})},n.exports=t.default}(ri,ri.exports)),ri.exports}var si={exports:{}},pl;function qp(){return pl||(pl=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var i=[void 0],r=arguments[arguments.length-1],s=0;s<arguments.length-1;s++)i.push(arguments[s]);var o=1;r.hash.level!=null?o=r.hash.level:r.data&&r.data.level!=null&&(o=r.data.level),i[0]=o,e.log.apply(e,i)})},n.exports=t.default}(si,si.exports)),si.exports}var oi={exports:{}},gl;function jp(){return gl||(gl=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(i,r,s){return i&&s.lookupProperty(i,r)})},n.exports=t.default}(oi,oi.exports)),oi.exports}var ai={exports:{}},ml;function Hp(){return ml||(ml=1,function(n,t){t.__esModule=!0;function e(o){return o&&o.__esModule?o:{default:o}}var i=Tt(),r=$t(),s=e(r);t.default=function(o){o.registerHelper("with",function(a,l){if(arguments.length!=2)throw new s.default("#with requires exactly one argument");i.isFunction(a)&&(a=a.call(this));var u=l.fn;if(i.isEmpty(a))return l.inverse(this);var c=l.data;return l.data&&l.ids&&(c=i.createFrame(l.data),c.contextPath=i.appendContextPath(l.data.contextPath,l.ids[0])),u(a,{data:c,blockParams:i.blockParams([a],[c&&c.contextPath])})})},n.exports=t.default}(ai,ai.exports)),ai.exports}var yl;function Of(){if(yl)return cn;yl=1,cn.__esModule=!0,cn.registerDefaultHelpers=g,cn.moveHelperToHooks=b;function n(x){return x&&x.__esModule?x:{default:x}}var t=Dp(),e=n(t),i=Bp(),r=n(i),s=Np(),o=n(s),a=Fp(),l=n(a),u=qp(),c=n(u),p=jp(),h=n(p),d=Hp(),f=n(d);function g(x){e.default(x),r.default(x),o.default(x),l.default(x),c.default(x),h.default(x),f.default(x)}function b(x,w,E){x.helpers[w]&&(x.hooks[w]=x.helpers[w],E||delete x.helpers[w])}return cn}var li={},ci={exports:{}},bl;function zp(){return bl||(bl=1,function(n,t){t.__esModule=!0;var e=Tt();t.default=function(i){i.registerDecorator("inline",function(r,s,o,a){var l=r;return s.partials||(s.partials={},l=function(u,c){var p=o.partials;o.partials=e.extend({},p,s.partials);var h=r(u,c);return o.partials=p,h}),s.partials[a.args[0]]=a.fn,l})},n.exports=t.default}(ci,ci.exports)),ci.exports}var vl;function Vp(){if(vl)return li;vl=1,li.__esModule=!0,li.registerDefaultDecorators=i;function n(r){return r&&r.__esModule?r:{default:r}}var t=zp(),e=n(t);function i(r){e.default(r)}return li}var ui={exports:{}},_l;function Af(){return _l||(_l=1,function(n,t){t.__esModule=!0;var e=Tt(),i={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(s){if(typeof s=="string"){var o=e.indexOf(i.methodMap,s.toLowerCase());o>=0?s=o:s=parseInt(s,10)}return s},log:function(s){if(s=i.lookupLevel(s),typeof console<"u"&&i.lookupLevel(i.level)<=s){var o=i.methodMap[s];console[o]||(o="log");for(var a=arguments.length,l=Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];console[o].apply(console,l)}}};t.default=i,n.exports=t.default}(ui,ui.exports)),ui.exports}var Ve={},hi={},xl;function Wp(){if(xl)return hi;xl=1,hi.__esModule=!0,hi.createNewLookupObject=t;var n=Tt();function t(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];return n.extend.apply(void 0,[Object.create(null)].concat(i))}return hi}var wl;function Lf(){if(wl)return Ve;wl=1,Ve.__esModule=!0,Ve.createProtoAccessControl=s,Ve.resultIsAllowed=o,Ve.resetLoggedProperties=u;function n(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(p[h]=c[h]);return p.default=c,p}var t=Wp(),e=Af(),i=n(e),r=Object.create(null);function s(c){var p=Object.create(null);p.constructor=!1,p.__defineGetter__=!1,p.__defineSetter__=!1,p.__lookupGetter__=!1;var h=Object.create(null);return h.__proto__=!1,{properties:{whitelist:t.createNewLookupObject(h,c.allowedProtoProperties),defaultValue:c.allowProtoPropertiesByDefault},methods:{whitelist:t.createNewLookupObject(p,c.allowedProtoMethods),defaultValue:c.allowProtoMethodsByDefault}}}function o(c,p,h){return a(typeof c=="function"?p.methods:p.properties,h)}function a(c,p){return c.whitelist[p]!==void 0?c.whitelist[p]===!0:c.defaultValue!==void 0?c.defaultValue:(l(p),!1)}function l(c){r[c]!==!0&&(r[c]=!0,i.log("error",'Handlebars: Access has been denied to resolve the property "'+c+`" because it is not an "own property" of its parent.
|
|
4
|
-
You can add a runtime option to disable the check or this warning:
|
|
5
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function u(){Object.keys(r).forEach(function(c){delete r[c]})}return Ve}var Sl;function Ma(){if(Sl)return jt;Sl=1,jt.__esModule=!0,jt.HandlebarsEnvironment=f;function n(b){return b&&b.__esModule?b:{default:b}}var t=Tt(),e=$t(),i=n(e),r=Of(),s=Vp(),o=Af(),a=n(o),l=Lf(),u="4.7.7";jt.VERSION=u;var c=8;jt.COMPILER_REVISION=c;var p=7;jt.LAST_COMPATIBLE_COMPILER_REVISION=p;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};jt.REVISION_CHANGES=h;var d="[object Object]";function f(b,x,w){this.helpers=b||{},this.partials=x||{},this.decorators=w||{},r.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}f.prototype={constructor:f,logger:a.default,log:a.default.log,registerHelper:function(x,w){if(t.toString.call(x)===d){if(w)throw new i.default("Arg not supported with multiple helpers");t.extend(this.helpers,x)}else this.helpers[x]=w},unregisterHelper:function(x){delete this.helpers[x]},registerPartial:function(x,w){if(t.toString.call(x)===d)t.extend(this.partials,x);else{if(typeof w>"u")throw new i.default('Attempting to register a partial called "'+x+'" as undefined');this.partials[x]=w}},unregisterPartial:function(x){delete this.partials[x]},registerDecorator:function(x,w){if(t.toString.call(x)===d){if(w)throw new i.default("Arg not supported with multiple decorators");t.extend(this.decorators,x)}else this.decorators[x]=w},unregisterDecorator:function(x){delete this.decorators[x]},resetLoggedPropertyAccesses:function(){l.resetLoggedProperties()}};var g=a.default.log;return jt.log=g,jt.createFrame=t.createFrame,jt.logger=a.default,jt}var fi={exports:{}},kl;function Up(){return kl||(kl=1,function(n,t){t.__esModule=!0;function e(i){this.string=i}e.prototype.toString=e.prototype.toHTML=function(){return""+this.string},t.default=e,n.exports=t.default}(fi,fi.exports)),fi.exports}var ie={},di={},Cl;function $p(){if(Cl)return di;Cl=1,di.__esModule=!0,di.wrapHelper=n;function n(t,e){if(typeof t!="function")return t;var i=function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)};return i}return di}var Ml;function Gp(){if(Ml)return ie;Ml=1,ie.__esModule=!0,ie.checkRevision=c,ie.template=p,ie.wrapProgram=h,ie.resolvePartial=d,ie.invokePartial=f,ie.noop=g;function n(v){return v&&v.__esModule?v:{default:v}}function t(v){if(v&&v.__esModule)return v;var _={};if(v!=null)for(var k in v)Object.prototype.hasOwnProperty.call(v,k)&&(_[k]=v[k]);return _.default=v,_}var e=Tt(),i=t(e),r=$t(),s=n(r),o=Ma(),a=Of(),l=$p(),u=Lf();function c(v){var _=v&&v[0]||1,k=o.COMPILER_REVISION;if(!(_>=o.LAST_COMPATIBLE_COMPILER_REVISION&&_<=o.COMPILER_REVISION))if(_<o.LAST_COMPATIBLE_COMPILER_REVISION){var M=o.REVISION_CHANGES[k],P=o.REVISION_CHANGES[_];throw new s.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+M+") or downgrade your runtime to an older version ("+P+").")}else throw new s.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+v[1]+").")}function p(v,_){if(!_)throw new s.default("No environment passed to template");if(!v||!v.main)throw new s.default("Unknown template object: "+typeof v);v.main.decorator=v.main_d,_.VM.checkRevision(v.compiler);var k=v.compiler&&v.compiler[0]===7;function M(A,L,I){I.hash&&(L=i.extend({},L,I.hash),I.ids&&(I.ids[0]=!0)),A=_.VM.resolvePartial.call(this,A,L,I);var j=i.extend({},I,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),F=_.VM.invokePartial.call(this,A,L,j);if(F==null&&_.compile&&(I.partials[I.name]=_.compile(A,v.compilerOptions,_),F=I.partials[I.name](L,j)),F!=null){if(I.indent){for(var D=F.split(`
|
|
6
|
-
`),B=0,q=D.length;B<q&&!(!D[B]&&B+1===q);B++)D[B]=I.indent+D[B];F=D.join(`
|
|
7
|
-
`)}return F}else throw new s.default("The partial "+I.name+" could not be compiled when running in runtime-only mode")}var P={strict:function(L,I,j){if(!L||!(I in L))throw new s.default('"'+I+'" not defined in '+L,{loc:j});return P.lookupProperty(L,I)},lookupProperty:function(L,I){var j=L[I];if(j==null||Object.prototype.hasOwnProperty.call(L,I)||u.resultIsAllowed(j,P.protoAccessControl,I))return j},lookup:function(L,I){for(var j=L.length,F=0;F<j;F++){var D=L[F]&&P.lookupProperty(L[F],I);if(D!=null)return L[F][I]}},lambda:function(L,I){return typeof L=="function"?L.call(I):L},escapeExpression:i.escapeExpression,invokePartial:M,fn:function(L){var I=v[L];return I.decorator=v[L+"_d"],I},programs:[],program:function(L,I,j,F,D){var B=this.programs[L],q=this.fn(L);return I||D||F||j?B=h(this,L,q,I,j,F,D):B||(B=this.programs[L]=h(this,L,q)),B},data:function(L,I){for(;L&&I--;)L=L._parent;return L},mergeIfNeeded:function(L,I){var j=L||I;return L&&I&&L!==I&&(j=i.extend({},I,L)),j},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:v.compiler};function T(A){var L=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],I=L.data;T._setup(L),!L.partial&&v.useData&&(I=b(A,I));var j=void 0,F=v.useBlockParams?[]:void 0;v.useDepths&&(L.depths?j=A!=L.depths[0]?[A].concat(L.depths):L.depths:j=[A]);function D(B){return""+v.main(P,B,P.helpers,P.partials,I,F,j)}return D=x(v.main,D,P,L.depths||[],I,F),D(A,L)}return T.isTop=!0,T._setup=function(A){if(A.partial)P.protoAccessControl=A.protoAccessControl,P.helpers=A.helpers,P.partials=A.partials,P.decorators=A.decorators,P.hooks=A.hooks;else{var L=i.extend({},_.helpers,A.helpers);w(L,P),P.helpers=L,v.usePartial&&(P.partials=P.mergeIfNeeded(A.partials,_.partials)),(v.usePartial||v.useDecorators)&&(P.decorators=i.extend({},_.decorators,A.decorators)),P.hooks={},P.protoAccessControl=u.createProtoAccessControl(A);var I=A.allowCallsToHelperMissing||k;a.moveHelperToHooks(P,"helperMissing",I),a.moveHelperToHooks(P,"blockHelperMissing",I)}},T._child=function(A,L,I,j){if(v.useBlockParams&&!I)throw new s.default("must pass block params");if(v.useDepths&&!j)throw new s.default("must pass parent depths");return h(P,A,v[A],L,0,I,j)},T}function h(v,_,k,M,P,T,A){function L(I){var j=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],F=A;return A&&I!=A[0]&&!(I===v.nullContext&&A[0]===null)&&(F=[I].concat(A)),k(v,I,v.helpers,v.partials,j.data||M,T&&[j.blockParams].concat(T),F)}return L=x(k,L,v,A,M,T),L.program=_,L.depth=A?A.length:0,L.blockParams=P||0,L}function d(v,_,k){return v?!v.call&&!k.name&&(k.name=v,v=k.partials[v]):k.name==="@partial-block"?v=k.data["partial-block"]:v=k.partials[k.name],v}function f(v,_,k){var M=k.data&&k.data["partial-block"];k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var P=void 0;if(k.fn&&k.fn!==g&&function(){k.data=o.createFrame(k.data);var T=k.fn;P=k.data["partial-block"]=function(L){var I=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return I.data=o.createFrame(I.data),I.data["partial-block"]=M,T(L,I)},T.partials&&(k.partials=i.extend({},k.partials,T.partials))}(),v===void 0&&P&&(v=P),v===void 0)throw new s.default("The partial "+k.name+" could not be found");if(v instanceof Function)return v(_,k)}function g(){return""}function b(v,_){return(!_||!("root"in _))&&(_=_?o.createFrame(_):{},_.root=v),_}function x(v,_,k,M,P,T){if(v.decorator){var A={};_=v.decorator(_,A,k,M&&M[0],P,T,M),i.extend(_,A)}return _}function w(v,_){Object.keys(v).forEach(function(k){var M=v[k];v[k]=E(M,_)})}function E(v,_){var k=_.lookupProperty;return l.wrapHelper(v,function(M){return i.extend({lookupProperty:k},M)})}return ie}var pi={exports:{}},El;function Rf(){return El||(El=1,function(n,t){t.__esModule=!0,t.default=function(e){var i=typeof ue<"u"?ue:window,r=i.Handlebars;e.noConflict=function(){return i.Handlebars===e&&(i.Handlebars=r),e}},n.exports=t.default}(pi,pi.exports)),pi.exports}var Pl;function Yp(){return Pl||(Pl=1,function(n,t){t.__esModule=!0;function e(w){return w&&w.__esModule?w:{default:w}}function i(w){if(w&&w.__esModule)return w;var E={};if(w!=null)for(var v in w)Object.prototype.hasOwnProperty.call(w,v)&&(E[v]=w[v]);return E.default=w,E}var r=Ma(),s=i(r),o=Up(),a=e(o),l=$t(),u=e(l),c=Tt(),p=i(c),h=Gp(),d=i(h),f=Rf(),g=e(f);function b(){var w=new s.HandlebarsEnvironment;return p.extend(w,s),w.SafeString=a.default,w.Exception=u.default,w.Utils=p,w.escapeExpression=p.escapeExpression,w.VM=d,w.template=function(E){return d.template(E,w)},w}var x=b();x.create=b,g.default(x),x.default=x,t.default=x,n.exports=t.default}(Qn,Qn.exports)),Qn.exports}var gi={exports:{}},Ol;function Tf(){return Ol||(Ol=1,function(n,t){t.__esModule=!0;var e={helpers:{helperExpression:function(r){return r.type==="SubExpression"||(r.type==="MustacheStatement"||r.type==="BlockStatement")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\.|this\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!e.helpers.scopedId(r)&&!r.depth}}};t.default=e,n.exports=t.default}(gi,gi.exports)),gi.exports}var We={},mi={exports:{}},Al;function Kp(){return Al||(Al=1,function(n,t){t.__esModule=!0;var e=function(){var i={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,l,u,c,p,h,d){var f=h.length-1;switch(p){case 1:return h[f-1];case 2:this.$=c.prepareProgram(h[f]);break;case 3:this.$=h[f];break;case 4:this.$=h[f];break;case 5:this.$=h[f];break;case 6:this.$=h[f];break;case 7:this.$=h[f];break;case 8:this.$=h[f];break;case 9:this.$={type:"CommentStatement",value:c.stripComment(h[f]),strip:c.stripFlags(h[f],h[f]),loc:c.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:h[f],value:h[f],loc:c.locInfo(this._$)};break;case 11:this.$=c.prepareRawBlock(h[f-2],h[f-1],h[f],this._$);break;case 12:this.$={path:h[f-3],params:h[f-2],hash:h[f-1]};break;case 13:this.$=c.prepareBlock(h[f-3],h[f-2],h[f-1],h[f],!1,this._$);break;case 14:this.$=c.prepareBlock(h[f-3],h[f-2],h[f-1],h[f],!0,this._$);break;case 15:this.$={open:h[f-5],path:h[f-4],params:h[f-3],hash:h[f-2],blockParams:h[f-1],strip:c.stripFlags(h[f-5],h[f])};break;case 16:this.$={path:h[f-4],params:h[f-3],hash:h[f-2],blockParams:h[f-1],strip:c.stripFlags(h[f-5],h[f])};break;case 17:this.$={path:h[f-4],params:h[f-3],hash:h[f-2],blockParams:h[f-1],strip:c.stripFlags(h[f-5],h[f])};break;case 18:this.$={strip:c.stripFlags(h[f-1],h[f-1]),program:h[f]};break;case 19:var g=c.prepareBlock(h[f-2],h[f-1],h[f],h[f],!1,this._$),b=c.prepareProgram([g],h[f-1].loc);b.chained=!0,this.$={strip:h[f-2].strip,program:b,chain:!0};break;case 20:this.$=h[f];break;case 21:this.$={path:h[f-1],strip:c.stripFlags(h[f-2],h[f])};break;case 22:this.$=c.prepareMustache(h[f-3],h[f-2],h[f-1],h[f-4],c.stripFlags(h[f-4],h[f]),this._$);break;case 23:this.$=c.prepareMustache(h[f-3],h[f-2],h[f-1],h[f-4],c.stripFlags(h[f-4],h[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:h[f-3],params:h[f-2],hash:h[f-1],indent:"",strip:c.stripFlags(h[f-4],h[f]),loc:c.locInfo(this._$)};break;case 25:this.$=c.preparePartialBlock(h[f-2],h[f-1],h[f],this._$);break;case 26:this.$={path:h[f-3],params:h[f-2],hash:h[f-1],strip:c.stripFlags(h[f-4],h[f])};break;case 27:this.$=h[f];break;case 28:this.$=h[f];break;case 29:this.$={type:"SubExpression",path:h[f-3],params:h[f-2],hash:h[f-1],loc:c.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:h[f],loc:c.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:c.id(h[f-2]),value:h[f],loc:c.locInfo(this._$)};break;case 32:this.$=c.id(h[f-1]);break;case 33:this.$=h[f];break;case 34:this.$=h[f];break;case 35:this.$={type:"StringLiteral",value:h[f],original:h[f],loc:c.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(h[f]),original:Number(h[f]),loc:c.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:h[f]==="true",original:h[f]==="true",loc:c.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:c.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:c.locInfo(this._$)};break;case 40:this.$=h[f];break;case 41:this.$=h[f];break;case 42:this.$=c.preparePath(!0,h[f],this._$);break;case 43:this.$=c.preparePath(!1,h[f],this._$);break;case 44:h[f-2].push({part:c.id(h[f]),original:h[f],separator:h[f-1]}),this.$=h[f-2];break;case 45:this.$=[{part:c.id(h[f]),original:h[f]}];break;case 46:this.$=[];break;case 47:h[f-1].push(h[f]);break;case 48:this.$=[];break;case 49:h[f-1].push(h[f]);break;case 50:this.$=[];break;case 51:h[f-1].push(h[f]);break;case 58:this.$=[];break;case 59:h[f-1].push(h[f]);break;case 64:this.$=[];break;case 65:h[f-1].push(h[f]);break;case 70:this.$=[];break;case 71:h[f-1].push(h[f]);break;case 78:this.$=[];break;case 79:h[f-1].push(h[f]);break;case 82:this.$=[];break;case 83:h[f-1].push(h[f]);break;case 86:this.$=[];break;case 87:h[f-1].push(h[f]);break;case 90:this.$=[];break;case 91:h[f-1].push(h[f]);break;case 94:this.$=[];break;case 95:h[f-1].push(h[f]);break;case 98:this.$=[h[f]];break;case 99:h[f-1].push(h[f]);break;case 100:this.$=[h[f]];break;case 101:h[f-1].push(h[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,l){throw new Error(a)},parse:function(a){var l=this,u=[0],c=[null],p=[],h=this.table,d="",f=0,g=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var b=this.lexer.yylloc;p.push(b);var x=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function w(){var j;return j=l.lexer.lex()||1,typeof j!="number"&&(j=l.symbols_[j]||j),j}for(var E,v,_,k,M={},P,T,A,L;;){if(v=u[u.length-1],this.defaultActions[v]?_=this.defaultActions[v]:((E===null||typeof E>"u")&&(E=w()),_=h[v]&&h[v][E]),typeof _>"u"||!_.length||!_[0]){var I="";{L=[];for(P in h[v])this.terminals_[P]&&P>2&&L.push("'"+this.terminals_[P]+"'");this.lexer.showPosition?I="Parse error on line "+(f+1)+`:
|
|
8
|
-
`+this.lexer.showPosition()+`
|
|
9
|
-
Expecting `+L.join(", ")+", got '"+(this.terminals_[E]||E)+"'":I="Parse error on line "+(f+1)+": Unexpected "+(E==1?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(I,{text:this.lexer.match,token:this.terminals_[E]||E,line:this.lexer.yylineno,loc:b,expected:L})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+E);switch(_[0]){case 1:u.push(E),c.push(this.lexer.yytext),p.push(this.lexer.yylloc),u.push(_[1]),E=null,g=this.lexer.yyleng,d=this.lexer.yytext,f=this.lexer.yylineno,b=this.lexer.yylloc;break;case 2:if(T=this.productions_[_[1]][1],M.$=c[c.length-T],M._$={first_line:p[p.length-(T||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(T||1)].first_column,last_column:p[p.length-1].last_column},x&&(M._$.range=[p[p.length-(T||1)].range[0],p[p.length-1].range[1]]),k=this.performAction.call(M,d,g,f,this.yy,_[1],c,p),typeof k<"u")return k;T&&(u=u.slice(0,-1*T*2),c=c.slice(0,-1*T),p=p.slice(0,-1*T)),u.push(this.productions_[_[1]][0]),c.push(M.$),p.push(M._$),A=h[u[u.length-2]][u[u.length-1]],u.push(A);break;case 3:return!0}}return!0}},r=function(){var o={EOF:1,parseError:function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},setInput:function(l){return this._input=l,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},unput:function(l){var u=l.length,c=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u-1),this.offset-=u;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-u]),this},more:function(){return this._more=!0,this},less:function(l){this.unput(this.match.slice(l))},pastInput:function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
10
|
-
`+u+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,c,p,h;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length&&(c=this._input.match(this.rules[d[f]]),!(c&&(!u||c[0].length>u[0].length)&&(u=c,p=f,!this.options.flex)));f++);return u?(h=u[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],l=this.performAction.call(this,this.yy,this,d[p],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
11
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return typeof l<"u"?l:this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(l){this.begin(l)}};return o.options={},o.performAction=function(l,u,c,p){function h(d,f){return u.yytext=u.yytext.substring(d,u.yyleng-f+d)}switch(c){case 0:if(u.yytext.slice(-2)==="\\\\"?(h(0,1),this.begin("mu")):u.yytext.slice(-1)==="\\"?(h(0,1),this.begin("emu")):this.begin("mu"),u.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(h(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(u.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return u.yytext=h(1,2).replace(/\\"/g,'"'),80;case 32:return u.yytext=h(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return u.yytext=u.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},o.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],o.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,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],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},o}();i.lexer=r;function s(){this.yy={}}return s.prototype=i,i.Parser=s,new s}();t.default=e,n.exports=t.default}(mi,mi.exports)),mi.exports}var yi={exports:{}},bi={exports:{}},Ll;function If(){return Ll||(Ll=1,function(n,t){t.__esModule=!0;function e(u){return u&&u.__esModule?u:{default:u}}var i=$t(),r=e(i);function s(){this.parents=[]}s.prototype={constructor:s,mutating:!1,acceptKey:function(c,p){var h=this.accept(c[p]);if(this.mutating){if(h&&!s.prototype[h.type])throw new r.default('Unexpected node type "'+h.type+'" found when accepting '+p+" on "+c.type);c[p]=h}},acceptRequired:function(c,p){if(this.acceptKey(c,p),!c[p])throw new r.default(c.type+" requires "+p)},acceptArray:function(c){for(var p=0,h=c.length;p<h;p++)this.acceptKey(c,p),c[p]||(c.splice(p,1),p--,h--)},accept:function(c){if(c){if(!this[c.type])throw new r.default("Unknown type: "+c.type,c);this.current&&this.parents.unshift(this.current),this.current=c;var p=this[c.type](c);if(this.current=this.parents.shift(),!this.mutating||p)return p;if(p!==!1)return c}},Program:function(c){this.acceptArray(c.body)},MustacheStatement:o,Decorator:o,BlockStatement:a,DecoratorBlock:a,PartialStatement:l,PartialBlockStatement:function(c){l.call(this,c),this.acceptKey(c,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:o,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(c){this.acceptArray(c.pairs)},HashPair:function(c){this.acceptRequired(c,"value")}};function o(u){this.acceptRequired(u,"path"),this.acceptArray(u.params),this.acceptKey(u,"hash")}function a(u){o.call(this,u),this.acceptKey(u,"program"),this.acceptKey(u,"inverse")}function l(u){this.acceptRequired(u,"name"),this.acceptArray(u.params),this.acceptKey(u,"hash")}t.default=s,n.exports=t.default}(bi,bi.exports)),bi.exports}var Rl;function Xp(){return Rl||(Rl=1,function(n,t){t.__esModule=!0;function e(c){return c&&c.__esModule?c:{default:c}}var i=If(),r=e(i);function s(){var c=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=c}s.prototype=new r.default,s.prototype.Program=function(c){var p=!this.options.ignoreStandalone,h=!this.isRootSeen;this.isRootSeen=!0;for(var d=c.body,f=0,g=d.length;f<g;f++){var b=d[f],x=this.accept(b);if(x){var w=o(d,f,h),E=a(d,f,h),v=x.openStandalone&&w,_=x.closeStandalone&&E,k=x.inlineStandalone&&w&&E;x.close&&l(d,f,!0),x.open&&u(d,f,!0),p&&k&&(l(d,f),u(d,f)&&b.type==="PartialStatement"&&(b.indent=/([ \t]+$)/.exec(d[f-1].original)[1])),p&&v&&(l((b.program||b.inverse).body),u(d,f)),p&&_&&(l(d,f),u((b.inverse||b.program).body))}}return c},s.prototype.BlockStatement=s.prototype.DecoratorBlock=s.prototype.PartialBlockStatement=function(c){this.accept(c.program),this.accept(c.inverse);var p=c.program||c.inverse,h=c.program&&c.inverse,d=h,f=h;if(h&&h.chained)for(d=h.body[0].program;f.chained;)f=f.body[f.body.length-1].program;var g={open:c.openStrip.open,close:c.closeStrip.close,openStandalone:a(p.body),closeStandalone:o((d||p).body)};if(c.openStrip.close&&l(p.body,null,!0),h){var b=c.inverseStrip;b.open&&u(p.body,null,!0),b.close&&l(d.body,null,!0),c.closeStrip.open&&u(f.body,null,!0),!this.options.ignoreStandalone&&o(p.body)&&a(d.body)&&(u(p.body),l(d.body))}else c.closeStrip.open&&u(p.body,null,!0);return g},s.prototype.Decorator=s.prototype.MustacheStatement=function(c){return c.strip},s.prototype.PartialStatement=s.prototype.CommentStatement=function(c){var p=c.strip||{};return{inlineStandalone:!0,open:p.open,close:p.close}};function o(c,p,h){p===void 0&&(p=c.length);var d=c[p-1],f=c[p-2];if(!d)return h;if(d.type==="ContentStatement")return(f||!h?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original)}function a(c,p,h){p===void 0&&(p=-1);var d=c[p+1],f=c[p+2];if(!d)return h;if(d.type==="ContentStatement")return(f||!h?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original)}function l(c,p,h){var d=c[p==null?0:p+1];if(!(!d||d.type!=="ContentStatement"||!h&&d.rightStripped)){var f=d.value;d.value=d.value.replace(h?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==f}}function u(c,p,h){var d=c[p==null?c.length-1:p-1];if(!(!d||d.type!=="ContentStatement"||!h&&d.leftStripped)){var f=d.value;return d.value=d.value.replace(h?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==f,d.leftStripped}}t.default=s,n.exports=t.default}(yi,yi.exports)),yi.exports}var It={},Tl;function Jp(){if(Tl)return It;Tl=1,It.__esModule=!0,It.SourceLocation=r,It.id=s,It.stripFlags=o,It.stripComment=a,It.preparePath=l,It.prepareMustache=u,It.prepareRawBlock=c,It.prepareBlock=p,It.prepareProgram=h,It.preparePartialBlock=d;function n(f){return f&&f.__esModule?f:{default:f}}var t=$t(),e=n(t);function i(f,g){if(g=g.path?g.path.original:g,f.path.original!==g){var b={loc:f.path.loc};throw new e.default(f.path.original+" doesn't match "+g,b)}}function r(f,g){this.source=f,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function s(f){return/^\[.*\]$/.test(f)?f.substring(1,f.length-1):f}function o(f,g){return{open:f.charAt(2)==="~",close:g.charAt(g.length-3)==="~"}}function a(f){return f.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function l(f,g,b){b=this.locInfo(b);for(var x=f?"@":"",w=[],E=0,v=0,_=g.length;v<_;v++){var k=g[v].part,M=g[v].original!==k;if(x+=(g[v].separator||"")+k,!M&&(k===".."||k==="."||k==="this")){if(w.length>0)throw new e.default("Invalid path: "+x,{loc:b});k===".."&&E++}else w.push(k)}return{type:"PathExpression",data:f,depth:E,parts:w,original:x,loc:b}}function u(f,g,b,x,w,E){var v=x.charAt(3)||x.charAt(2),_=v!=="{"&&v!=="&",k=/\*/.test(x);return{type:k?"Decorator":"MustacheStatement",path:f,params:g,hash:b,escaped:_,strip:w,loc:this.locInfo(E)}}function c(f,g,b,x){i(f,b),x=this.locInfo(x);var w={type:"Program",body:g,strip:{},loc:x};return{type:"BlockStatement",path:f.path,params:f.params,hash:f.hash,program:w,openStrip:{},inverseStrip:{},closeStrip:{},loc:x}}function p(f,g,b,x,w,E){x&&x.path&&i(f,x);var v=/\*/.test(f.open);g.blockParams=f.blockParams;var _=void 0,k=void 0;if(b){if(v)throw new e.default("Unexpected inverse block on decorator",b);b.chain&&(b.program.body[0].closeStrip=x.strip),k=b.strip,_=b.program}return w&&(w=_,_=g,g=w),{type:v?"DecoratorBlock":"BlockStatement",path:f.path,params:f.params,hash:f.hash,program:g,inverse:_,openStrip:f.strip,inverseStrip:k,closeStrip:x&&x.strip,loc:this.locInfo(E)}}function h(f,g){if(!g&&f.length){var b=f[0].loc,x=f[f.length-1].loc;b&&x&&(g={source:b.source,start:{line:b.start.line,column:b.start.column},end:{line:x.end.line,column:x.end.column}})}return{type:"Program",body:f,strip:{},loc:g}}function d(f,g,b,x){return i(f,b),{type:"PartialBlockStatement",name:f.path,params:f.params,hash:f.hash,program:g,openStrip:f.strip,closeStrip:b&&b.strip,loc:this.locInfo(x)}}return It}var Il;function Zp(){if(Il)return We;Il=1,We.__esModule=!0,We.parseWithoutProcessing=c,We.parse=p;function n(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(d[f]=h[f]);return d.default=h,d}function t(h){return h&&h.__esModule?h:{default:h}}var e=Kp(),i=t(e),r=Xp(),s=t(r),o=Jp(),a=n(o),l=Tt();We.parser=i.default;var u={};l.extend(u,a);function c(h,d){if(h.type==="Program")return h;i.default.yy=u,u.locInfo=function(g){return new u.SourceLocation(d&&d.srcName,g)};var f=i.default.parse(h);return f}function p(h,d){var f=c(h,d),g=new s.default(d);return g.accept(f)}return We}var Ue={},Dl;function Qp(){if(Dl)return Ue;Dl=1,Ue.__esModule=!0,Ue.Compiler=a,Ue.precompile=l,Ue.compile=u;function n(h){return h&&h.__esModule?h:{default:h}}var t=$t(),e=n(t),i=Tt(),r=Tf(),s=n(r),o=[].slice;function a(){}a.prototype={compiler:a,equals:function(d){var f=this.opcodes.length;if(d.opcodes.length!==f)return!1;for(var g=0;g<f;g++){var b=this.opcodes[g],x=d.opcodes[g];if(b.opcode!==x.opcode||!c(b.args,x.args))return!1}f=this.children.length;for(var g=0;g<f;g++)if(!this.children[g].equals(d.children[g]))return!1;return!0},guid:0,compile:function(d,f){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=f,this.stringParams=f.stringParams,this.trackIds=f.trackIds,f.blockParams=f.blockParams||[],f.knownHelpers=i.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},f.knownHelpers),this.accept(d)},compileProgram:function(d){var f=new this.compiler,g=f.compile(d,this.options),b=this.guid++;return this.usePartial=this.usePartial||g.usePartial,this.children[b]=g,this.useDepths=this.useDepths||g.useDepths,b},accept:function(d){if(!this[d.type])throw new e.default("Unknown type: "+d.type,d);this.sourceNode.unshift(d);var f=this[d.type](d);return this.sourceNode.shift(),f},Program:function(d){this.options.blockParams.unshift(d.blockParams);for(var f=d.body,g=f.length,b=0;b<g;b++)this.accept(f[b]);return this.options.blockParams.shift(),this.isSimple=g===1,this.blockParams=d.blockParams?d.blockParams.length:0,this},BlockStatement:function(d){p(d);var f=d.program,g=d.inverse;f=f&&this.compileProgram(f),g=g&&this.compileProgram(g);var b=this.classifySexpr(d);b==="helper"?this.helperSexpr(d,f,g):b==="simple"?(this.simpleSexpr(d),this.opcode("pushProgram",f),this.opcode("pushProgram",g),this.opcode("emptyHash"),this.opcode("blockValue",d.path.original)):(this.ambiguousSexpr(d,f,g),this.opcode("pushProgram",f),this.opcode("pushProgram",g),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(d){var f=d.program&&this.compileProgram(d.program),g=this.setupFullMustacheParams(d,f,void 0),b=d.path;this.useDecorators=!0,this.opcode("registerDecorator",g.length,b.original)},PartialStatement:function(d){this.usePartial=!0;var f=d.program;f&&(f=this.compileProgram(d.program));var g=d.params;if(g.length>1)throw new e.default("Unsupported number of partial arguments: "+g.length,d);g.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):g.push({type:"PathExpression",parts:[],depth:0}));var b=d.name.original,x=d.name.type==="SubExpression";x&&this.accept(d.name),this.setupFullMustacheParams(d,f,void 0,!0);var w=d.indent||"";this.options.preventIndent&&w&&(this.opcode("appendContent",w),w=""),this.opcode("invokePartial",x,b,w),this.opcode("append")},PartialBlockStatement:function(d){this.PartialStatement(d)},MustacheStatement:function(d){this.SubExpression(d),d.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(d){this.DecoratorBlock(d)},ContentStatement:function(d){d.value&&this.opcode("appendContent",d.value)},CommentStatement:function(){},SubExpression:function(d){p(d);var f=this.classifySexpr(d);f==="simple"?this.simpleSexpr(d):f==="helper"?this.helperSexpr(d):this.ambiguousSexpr(d)},ambiguousSexpr:function(d,f,g){var b=d.path,x=b.parts[0],w=f!=null||g!=null;this.opcode("getContext",b.depth),this.opcode("pushProgram",f),this.opcode("pushProgram",g),b.strict=!0,this.accept(b),this.opcode("invokeAmbiguous",x,w)},simpleSexpr:function(d){var f=d.path;f.strict=!0,this.accept(f),this.opcode("resolvePossibleLambda")},helperSexpr:function(d,f,g){var b=this.setupFullMustacheParams(d,f,g),x=d.path,w=x.parts[0];if(this.options.knownHelpers[w])this.opcode("invokeKnownHelper",b.length,w);else{if(this.options.knownHelpersOnly)throw new e.default("You specified knownHelpersOnly, but used the unknown helper "+w,d);x.strict=!0,x.falsy=!0,this.accept(x),this.opcode("invokeHelper",b.length,x.original,s.default.helpers.simpleId(x))}},PathExpression:function(d){this.addDepth(d.depth),this.opcode("getContext",d.depth);var f=d.parts[0],g=s.default.helpers.scopedId(d),b=!d.depth&&!g&&this.blockParamIndex(f);b?this.opcode("lookupBlockParam",b,d.parts):f?d.data?(this.options.data=!0,this.opcode("lookupData",d.depth,d.parts,d.strict)):this.opcode("lookupOnContext",d.parts,d.falsy,d.strict,g):this.opcode("pushContext")},StringLiteral:function(d){this.opcode("pushString",d.value)},NumberLiteral:function(d){this.opcode("pushLiteral",d.value)},BooleanLiteral:function(d){this.opcode("pushLiteral",d.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(d){var f=d.pairs,g=0,b=f.length;for(this.opcode("pushHash");g<b;g++)this.pushParam(f[g].value);for(;g--;)this.opcode("assignToHash",f[g].key);this.opcode("popHash")},opcode:function(d){this.opcodes.push({opcode:d,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(d){d&&(this.useDepths=!0)},classifySexpr:function(d){var f=s.default.helpers.simpleId(d.path),g=f&&!!this.blockParamIndex(d.path.parts[0]),b=!g&&s.default.helpers.helperExpression(d),x=!g&&(b||f);if(x&&!b){var w=d.path.parts[0],E=this.options;E.knownHelpers[w]?b=!0:E.knownHelpersOnly&&(x=!1)}return b?"helper":x?"ambiguous":"simple"},pushParams:function(d){for(var f=0,g=d.length;f<g;f++)this.pushParam(d[f])},pushParam:function(d){var f=d.value!=null?d.value:d.original||"";if(this.stringParams)f.replace&&(f=f.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),d.depth&&this.addDepth(d.depth),this.opcode("getContext",d.depth||0),this.opcode("pushStringParam",f,d.type),d.type==="SubExpression"&&this.accept(d);else{if(this.trackIds){var g=void 0;if(d.parts&&!s.default.helpers.scopedId(d)&&!d.depth&&(g=this.blockParamIndex(d.parts[0])),g){var b=d.parts.slice(1).join(".");this.opcode("pushId","BlockParam",g,b)}else f=d.original||f,f.replace&&(f=f.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",d.type,f)}this.accept(d)}},setupFullMustacheParams:function(d,f,g,b){var x=d.params;return this.pushParams(x),this.opcode("pushProgram",f),this.opcode("pushProgram",g),d.hash?this.accept(d.hash):this.opcode("emptyHash",b),x},blockParamIndex:function(d){for(var f=0,g=this.options.blockParams.length;f<g;f++){var b=this.options.blockParams[f],x=b&&i.indexOf(b,d);if(b&&x>=0)return[f,x]}}};function l(h,d,f){if(h==null||typeof h!="string"&&h.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+h);d=d||{},"data"in d||(d.data=!0),d.compat&&(d.useDepths=!0);var g=f.parse(h,d),b=new f.Compiler().compile(g,d);return new f.JavaScriptCompiler().compile(b,d)}function u(h,d,f){if(d===void 0&&(d={}),h==null||typeof h!="string"&&h.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+h);d=i.extend({},d),"data"in d||(d.data=!0),d.compat&&(d.useDepths=!0);var g=void 0;function b(){var w=f.parse(h,d),E=new f.Compiler().compile(w,d),v=new f.JavaScriptCompiler().compile(E,d,void 0,!0);return f.template(v)}function x(w,E){return g||(g=b()),g.call(this,w,E)}return x._setup=function(w){return g||(g=b()),g._setup(w)},x._child=function(w,E,v,_){return g||(g=b()),g._child(w,E,v,_)},x}function c(h,d){if(h===d)return!0;if(i.isArray(h)&&i.isArray(d)&&h.length===d.length){for(var f=0;f<h.length;f++)if(!c(h[f],d[f]))return!1;return!0}}function p(h){if(!h.path.parts){var d=h.path;h.path={type:"PathExpression",data:!1,depth:0,parts:[d.original+""],original:d.original+"",loc:d.loc}}}return Ue}var vi={exports:{}},_i={exports:{}},un={},Dr={},xi={},wi={},Bl;function tg(){if(Bl)return wi;Bl=1;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return wi.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},wi.decode=function(t){var e=65,i=90,r=97,s=122,o=48,a=57,l=43,u=47,c=26,p=52;return e<=t&&t<=i?t-e:r<=t&&t<=s?t-r+c:o<=t&&t<=a?t-o+p:t==l?62:t==u?63:-1},wi}var Nl;function Df(){if(Nl)return xi;Nl=1;var n=tg(),t=5,e=1<<t,i=e-1,r=e;function s(a){return a<0?(-a<<1)+1:(a<<1)+0}function o(a){var l=(a&1)===1,u=a>>1;return l?-u:u}return xi.encode=function(l){var u="",c,p=s(l);do c=p&i,p>>>=t,p>0&&(c|=r),u+=n.encode(c);while(p>0);return u},xi.decode=function(l,u,c){var p=l.length,h=0,d=0,f,g;do{if(u>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(g=n.decode(l.charCodeAt(u++)),g===-1)throw new Error("Invalid base64 digit: "+l.charAt(u-1));f=!!(g&r),g&=i,h=h+(g<<d),d+=t}while(f);c.value=o(h),c.rest=u},xi}var Br={},Fl;function Wn(){return Fl||(Fl=1,function(n){function t(v,_,k){if(_ in v)return v[_];if(arguments.length===3)return k;throw new Error('"'+_+'" is a required argument.')}n.getArg=t;var e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function r(v){var _=v.match(e);return _?{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}:null}n.urlParse=r;function s(v){var _="";return v.scheme&&(_+=v.scheme+":"),_+="//",v.auth&&(_+=v.auth+"@"),v.host&&(_+=v.host),v.port&&(_+=":"+v.port),v.path&&(_+=v.path),_}n.urlGenerate=s;function o(v){var _=v,k=r(v);if(k){if(!k.path)return v;_=k.path}for(var M=n.isAbsolute(_),P=_.split(/\/+/),T,A=0,L=P.length-1;L>=0;L--)T=P[L],T==="."?P.splice(L,1):T===".."?A++:A>0&&(T===""?(P.splice(L+1,A),A=0):(P.splice(L,2),A--));return _=P.join("/"),_===""&&(_=M?"/":"."),k?(k.path=_,s(k)):_}n.normalize=o;function a(v,_){v===""&&(v="."),_===""&&(_=".");var k=r(_),M=r(v);if(M&&(v=M.path||"/"),k&&!k.scheme)return M&&(k.scheme=M.scheme),s(k);if(k||_.match(i))return _;if(M&&!M.host&&!M.path)return M.host=_,s(M);var P=_.charAt(0)==="/"?_:o(v.replace(/\/+$/,"")+"/"+_);return M?(M.path=P,s(M)):P}n.join=a,n.isAbsolute=function(v){return v.charAt(0)==="/"||e.test(v)};function l(v,_){v===""&&(v="."),v=v.replace(/\/$/,"");for(var k=0;_.indexOf(v+"/")!==0;){var M=v.lastIndexOf("/");if(M<0||(v=v.slice(0,M),v.match(/^([^\/]+:\/)?\/*$/)))return _;++k}return Array(k+1).join("../")+_.substr(v.length+1)}n.relative=l;var u=function(){var v=Object.create(null);return!("__proto__"in v)}();function c(v){return v}function p(v){return d(v)?"$"+v:v}n.toSetString=u?c:p;function h(v){return d(v)?v.slice(1):v}n.fromSetString=u?c:h;function d(v){if(!v)return!1;var _=v.length;if(_<9||v.charCodeAt(_-1)!==95||v.charCodeAt(_-2)!==95||v.charCodeAt(_-3)!==111||v.charCodeAt(_-4)!==116||v.charCodeAt(_-5)!==111||v.charCodeAt(_-6)!==114||v.charCodeAt(_-7)!==112||v.charCodeAt(_-8)!==95||v.charCodeAt(_-9)!==95)return!1;for(var k=_-10;k>=0;k--)if(v.charCodeAt(k)!==36)return!1;return!0}function f(v,_,k){var M=b(v.source,_.source);return M!==0||(M=v.originalLine-_.originalLine,M!==0)||(M=v.originalColumn-_.originalColumn,M!==0||k)||(M=v.generatedColumn-_.generatedColumn,M!==0)||(M=v.generatedLine-_.generatedLine,M!==0)?M:b(v.name,_.name)}n.compareByOriginalPositions=f;function g(v,_,k){var M=v.generatedLine-_.generatedLine;return M!==0||(M=v.generatedColumn-_.generatedColumn,M!==0||k)||(M=b(v.source,_.source),M!==0)||(M=v.originalLine-_.originalLine,M!==0)||(M=v.originalColumn-_.originalColumn,M!==0)?M:b(v.name,_.name)}n.compareByGeneratedPositionsDeflated=g;function b(v,_){return v===_?0:v===null?1:_===null?-1:v>_?1:-1}function x(v,_){var k=v.generatedLine-_.generatedLine;return k!==0||(k=v.generatedColumn-_.generatedColumn,k!==0)||(k=b(v.source,_.source),k!==0)||(k=v.originalLine-_.originalLine,k!==0)||(k=v.originalColumn-_.originalColumn,k!==0)?k:b(v.name,_.name)}n.compareByGeneratedPositionsInflated=x;function w(v){return JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=w;function E(v,_,k){if(_=_||"",v&&(v[v.length-1]!=="/"&&_[0]!=="/"&&(v+="/"),_=v+_),k){var M=r(k);if(!M)throw new Error("sourceMapURL could not be parsed");if(M.path){var P=M.path.lastIndexOf("/");P>=0&&(M.path=M.path.substring(0,P+1))}_=a(s(M),_)}return o(_)}n.computeSourceURL=E}(Br)),Br}var Nr={},ql;function Bf(){if(ql)return Nr;ql=1;var n=Wn(),t=Object.prototype.hasOwnProperty,e=typeof Map<"u";function i(){this._array=[],this._set=e?new Map:Object.create(null)}return i.fromArray=function(s,o){for(var a=new i,l=0,u=s.length;l<u;l++)a.add(s[l],o);return a},i.prototype.size=function(){return e?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(s,o){var a=e?s:n.toSetString(s),l=e?this.has(s):t.call(this._set,a),u=this._array.length;(!l||o)&&this._array.push(s),l||(e?this._set.set(s,u):this._set[a]=u)},i.prototype.has=function(s){if(e)return this._set.has(s);var o=n.toSetString(s);return t.call(this._set,o)},i.prototype.indexOf=function(s){if(e){var o=this._set.get(s);if(o>=0)return o}else{var a=n.toSetString(s);if(t.call(this._set,a))return this._set[a]}throw new Error('"'+s+'" is not in the set.')},i.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},i.prototype.toArray=function(){return this._array.slice()},Nr.ArraySet=i,Nr}var Fr={},jl;function eg(){if(jl)return Fr;jl=1;var n=Wn();function t(i,r){var s=i.generatedLine,o=r.generatedLine,a=i.generatedColumn,l=r.generatedColumn;return o>s||o==s&&l>=a||n.compareByGeneratedPositionsInflated(i,r)<=0}function e(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return e.prototype.unsortedForEach=function(r,s){this._array.forEach(r,s)},e.prototype.add=function(r){t(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},e.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Fr.MappingList=e,Fr}var Hl;function Nf(){if(Hl)return Dr;Hl=1;var n=Df(),t=Wn(),e=Bf().ArraySet,i=eg().MappingList;function r(s){s||(s={}),this._file=t.getArg(s,"file",null),this._sourceRoot=t.getArg(s,"sourceRoot",null),this._skipValidation=t.getArg(s,"skipValidation",!1),this._sources=new e,this._names=new e,this._mappings=new i,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(o){var a=o.sourceRoot,l=new r({file:o.file,sourceRoot:a});return o.eachMapping(function(u){var c={generated:{line:u.generatedLine,column:u.generatedColumn}};u.source!=null&&(c.source=u.source,a!=null&&(c.source=t.relative(a,c.source)),c.original={line:u.originalLine,column:u.originalColumn},u.name!=null&&(c.name=u.name)),l.addMapping(c)}),o.sources.forEach(function(u){var c=u;a!==null&&(c=t.relative(a,u)),l._sources.has(c)||l._sources.add(c);var p=o.sourceContentFor(u);p!=null&&l.setSourceContent(u,p)}),l},r.prototype.addMapping=function(o){var a=t.getArg(o,"generated"),l=t.getArg(o,"original",null),u=t.getArg(o,"source",null),c=t.getArg(o,"name",null);this._skipValidation||this._validateMapping(a,l,u,c),u!=null&&(u=String(u),this._sources.has(u)||this._sources.add(u)),c!=null&&(c=String(c),this._names.has(c)||this._names.add(c)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:u,name:c})},r.prototype.setSourceContent=function(o,a){var l=o;this._sourceRoot!=null&&(l=t.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(o,a,l){var u=a;if(a==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);u=o.file}var c=this._sourceRoot;c!=null&&(u=t.relative(c,u));var p=new e,h=new e;this._mappings.unsortedForEach(function(d){if(d.source===u&&d.originalLine!=null){var f=o.originalPositionFor({line:d.originalLine,column:d.originalColumn});f.source!=null&&(d.source=f.source,l!=null&&(d.source=t.join(l,d.source)),c!=null&&(d.source=t.relative(c,d.source)),d.originalLine=f.line,d.originalColumn=f.column,f.name!=null&&(d.name=f.name))}var g=d.source;g!=null&&!p.has(g)&&p.add(g);var b=d.name;b!=null&&!h.has(b)&&h.add(b)},this),this._sources=p,this._names=h,o.sources.forEach(function(d){var f=o.sourceContentFor(d);f!=null&&(l!=null&&(d=t.join(l,d)),c!=null&&(d=t.relative(c,d)),this.setSourceContent(d,f))},this)},r.prototype._validateMapping=function(o,a,l,u){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!a&&!l&&!u)){if(o&&"line"in o&&"column"in o&&a&&"line"in a&&"column"in a&&o.line>0&&o.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:l,original:a,name:u}))}},r.prototype._serializeMappings=function(){for(var o=0,a=1,l=0,u=0,c=0,p=0,h="",d,f,g,b,x=this._mappings.toArray(),w=0,E=x.length;w<E;w++){if(f=x[w],d="",f.generatedLine!==a)for(o=0;f.generatedLine!==a;)d+=";",a++;else if(w>0){if(!t.compareByGeneratedPositionsInflated(f,x[w-1]))continue;d+=","}d+=n.encode(f.generatedColumn-o),o=f.generatedColumn,f.source!=null&&(b=this._sources.indexOf(f.source),d+=n.encode(b-p),p=b,d+=n.encode(f.originalLine-1-u),u=f.originalLine-1,d+=n.encode(f.originalColumn-l),l=f.originalColumn,f.name!=null&&(g=this._names.indexOf(f.name),d+=n.encode(g-c),c=g)),h+=d}return h},r.prototype._generateSourcesContent=function(o,a){return o.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=t.relative(a,l));var u=t.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,u)?this._sourcesContents[u]:null},this)},r.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},Dr.SourceMapGenerator=r,Dr}var hn={},qr={},zl;function ng(){return zl||(zl=1,function(n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2;function t(e,i,r,s,o,a){var l=Math.floor((i-e)/2)+e,u=o(r,s[l],!0);return u===0?l:u>0?i-l>1?t(l,i,r,s,o,a):a==n.LEAST_UPPER_BOUND?i<s.length?i:-1:l:l-e>1?t(e,l,r,s,o,a):a==n.LEAST_UPPER_BOUND?l:e<0?-1:e}n.search=function(i,r,s,o){if(r.length===0)return-1;var a=t(-1,r.length,i,r,s,o||n.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&s(r[a],r[a-1],!0)===0;)--a;return a}}(qr)),qr}var jr={},Vl;function ig(){if(Vl)return jr;Vl=1;function n(i,r,s){var o=i[r];i[r]=i[s],i[s]=o}function t(i,r){return Math.round(i+Math.random()*(r-i))}function e(i,r,s,o){if(s<o){var a=t(s,o),l=s-1;n(i,a,o);for(var u=i[o],c=s;c<o;c++)r(i[c],u)<=0&&(l+=1,n(i,l,c));n(i,l+1,c);var p=l+1;e(i,r,s,p-1),e(i,r,p+1,o)}}return jr.quickSort=function(i,r){e(i,r,0,i.length-1)},jr}var Wl;function rg(){if(Wl)return hn;Wl=1;var n=Wn(),t=ng(),e=Bf().ArraySet,i=Df(),r=ig().quickSort;function s(u,c){var p=u;return typeof u=="string"&&(p=n.parseSourceMapInput(u)),p.sections!=null?new l(p,c):new o(p,c)}s.fromSourceMap=function(u,c){return o.fromSourceMap(u,c)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(c,p){var h=c.charAt(p);return h===";"||h===","},s.prototype._parseMappings=function(c,p){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(c,p,h){var d=p||null,f=h||s.GENERATED_ORDER,g;switch(f){case s.GENERATED_ORDER:g=this._generatedMappings;break;case s.ORIGINAL_ORDER:g=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var b=this.sourceRoot;g.map(function(x){var w=x.source===null?null:this._sources.at(x.source);return w=n.computeSourceURL(b,w,this._sourceMapURL),{source:w,generatedLine:x.generatedLine,generatedColumn:x.generatedColumn,originalLine:x.originalLine,originalColumn:x.originalColumn,name:x.name===null?null:this._names.at(x.name)}},this).forEach(c,d)},s.prototype.allGeneratedPositionsFor=function(c){var p=n.getArg(c,"line"),h={source:n.getArg(c,"source"),originalLine:p,originalColumn:n.getArg(c,"column",0)};if(h.source=this._findSourceIndex(h.source),h.source<0)return[];var d=[],f=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(f>=0){var g=this._originalMappings[f];if(c.column===void 0)for(var b=g.originalLine;g&&g.originalLine===b;)d.push({line:n.getArg(g,"generatedLine",null),column:n.getArg(g,"generatedColumn",null),lastColumn:n.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++f];else for(var x=g.originalColumn;g&&g.originalLine===p&&g.originalColumn==x;)d.push({line:n.getArg(g,"generatedLine",null),column:n.getArg(g,"generatedColumn",null),lastColumn:n.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++f]}return d},hn.SourceMapConsumer=s;function o(u,c){var p=u;typeof u=="string"&&(p=n.parseSourceMapInput(u));var h=n.getArg(p,"version"),d=n.getArg(p,"sources"),f=n.getArg(p,"names",[]),g=n.getArg(p,"sourceRoot",null),b=n.getArg(p,"sourcesContent",null),x=n.getArg(p,"mappings"),w=n.getArg(p,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);g&&(g=n.normalize(g)),d=d.map(String).map(n.normalize).map(function(E){return g&&n.isAbsolute(g)&&n.isAbsolute(E)?n.relative(g,E):E}),this._names=e.fromArray(f.map(String),!0),this._sources=e.fromArray(d,!0),this._absoluteSources=this._sources.toArray().map(function(E){return n.computeSourceURL(g,E,c)}),this.sourceRoot=g,this.sourcesContent=b,this._mappings=x,this._sourceMapURL=c,this.file=w}o.prototype=Object.create(s.prototype),o.prototype.consumer=s,o.prototype._findSourceIndex=function(u){var c=u;if(this.sourceRoot!=null&&(c=n.relative(this.sourceRoot,c)),this._sources.has(c))return this._sources.indexOf(c);var p;for(p=0;p<this._absoluteSources.length;++p)if(this._absoluteSources[p]==u)return p;return-1},o.fromSourceMap=function(c,p){var h=Object.create(o.prototype),d=h._names=e.fromArray(c._names.toArray(),!0),f=h._sources=e.fromArray(c._sources.toArray(),!0);h.sourceRoot=c._sourceRoot,h.sourcesContent=c._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=c._file,h._sourceMapURL=p,h._absoluteSources=h._sources.toArray().map(function(k){return n.computeSourceURL(h.sourceRoot,k,p)});for(var g=c._mappings.toArray().slice(),b=h.__generatedMappings=[],x=h.__originalMappings=[],w=0,E=g.length;w<E;w++){var v=g[w],_=new a;_.generatedLine=v.generatedLine,_.generatedColumn=v.generatedColumn,v.source&&(_.source=f.indexOf(v.source),_.originalLine=v.originalLine,_.originalColumn=v.originalColumn,v.name&&(_.name=d.indexOf(v.name)),x.push(_)),b.push(_)}return r(h.__originalMappings,n.compareByOriginalPositions),h},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}o.prototype._parseMappings=function(c,p){for(var h=1,d=0,f=0,g=0,b=0,x=0,w=c.length,E=0,v={},_={},k=[],M=[],P,T,A,L,I;E<w;)if(c.charAt(E)===";")h++,E++,d=0;else if(c.charAt(E)===",")E++;else{for(P=new a,P.generatedLine=h,L=E;L<w&&!this._charIsMappingSeparator(c,L);L++);if(T=c.slice(E,L),A=v[T],A)E+=T.length;else{for(A=[];E<L;)i.decode(c,E,_),I=_.value,E=_.rest,A.push(I);if(A.length===2)throw new Error("Found a source, but no line and column");if(A.length===3)throw new Error("Found a source and line, but no column");v[T]=A}P.generatedColumn=d+A[0],d=P.generatedColumn,A.length>1&&(P.source=b+A[1],b+=A[1],P.originalLine=f+A[2],f=P.originalLine,P.originalLine+=1,P.originalColumn=g+A[3],g=P.originalColumn,A.length>4&&(P.name=x+A[4],x+=A[4])),M.push(P),typeof P.originalLine=="number"&&k.push(P)}r(M,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=M,r(k,n.compareByOriginalPositions),this.__originalMappings=k},o.prototype._findMapping=function(c,p,h,d,f,g){if(c[h]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[h]);if(c[d]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[d]);return t.search(c,p,f,g)},o.prototype.computeColumnSpans=function(){for(var c=0;c<this._generatedMappings.length;++c){var p=this._generatedMappings[c];if(c+1<this._generatedMappings.length){var h=this._generatedMappings[c+1];if(p.generatedLine===h.generatedLine){p.lastGeneratedColumn=h.generatedColumn-1;continue}}p.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(c){var p={generatedLine:n.getArg(c,"line"),generatedColumn:n.getArg(c,"column")},h=this._findMapping(p,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(c,"bias",s.GREATEST_LOWER_BOUND));if(h>=0){var d=this._generatedMappings[h];if(d.generatedLine===p.generatedLine){var f=n.getArg(d,"source",null);f!==null&&(f=this._sources.at(f),f=n.computeSourceURL(this.sourceRoot,f,this._sourceMapURL));var g=n.getArg(d,"name",null);return g!==null&&(g=this._names.at(g)),{source:f,line:n.getArg(d,"originalLine",null),column:n.getArg(d,"originalColumn",null),name:g}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},o.prototype.sourceContentFor=function(c,p){if(!this.sourcesContent)return null;var h=this._findSourceIndex(c);if(h>=0)return this.sourcesContent[h];var d=c;this.sourceRoot!=null&&(d=n.relative(this.sourceRoot,d));var f;if(this.sourceRoot!=null&&(f=n.urlParse(this.sourceRoot))){var g=d.replace(/^file:\/\//,"");if(f.scheme=="file"&&this._sources.has(g))return this.sourcesContent[this._sources.indexOf(g)];if((!f.path||f.path=="/")&&this._sources.has("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(p)return null;throw new Error('"'+d+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(c){var p=n.getArg(c,"source");if(p=this._findSourceIndex(p),p<0)return{line:null,column:null,lastColumn:null};var h={source:p,originalLine:n.getArg(c,"line"),originalColumn:n.getArg(c,"column")},d=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(c,"bias",s.GREATEST_LOWER_BOUND));if(d>=0){var f=this._originalMappings[d];if(f.source===h.source)return{line:n.getArg(f,"generatedLine",null),column:n.getArg(f,"generatedColumn",null),lastColumn:n.getArg(f,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},hn.BasicSourceMapConsumer=o;function l(u,c){var p=u;typeof u=="string"&&(p=n.parseSourceMapInput(u));var h=n.getArg(p,"version"),d=n.getArg(p,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new e,this._names=new e;var f={line:-1,column:0};this._sections=d.map(function(g){if(g.url)throw new Error("Support for url field in sections not implemented.");var b=n.getArg(g,"offset"),x=n.getArg(b,"line"),w=n.getArg(b,"column");if(x<f.line||x===f.line&&w<f.column)throw new Error("Section offsets must be ordered and non-overlapping.");return f=b,{generatedOffset:{generatedLine:x+1,generatedColumn:w+1},consumer:new s(n.getArg(g,"map"),c)}})}return l.prototype=Object.create(s.prototype),l.prototype.constructor=s,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var u=[],c=0;c<this._sections.length;c++)for(var p=0;p<this._sections[c].consumer.sources.length;p++)u.push(this._sections[c].consumer.sources[p]);return u}}),l.prototype.originalPositionFor=function(c){var p={generatedLine:n.getArg(c,"line"),generatedColumn:n.getArg(c,"column")},h=t.search(p,this._sections,function(f,g){var b=f.generatedLine-g.generatedOffset.generatedLine;return b||f.generatedColumn-g.generatedOffset.generatedColumn}),d=this._sections[h];return d?d.consumer.originalPositionFor({line:p.generatedLine-(d.generatedOffset.generatedLine-1),column:p.generatedColumn-(d.generatedOffset.generatedLine===p.generatedLine?d.generatedOffset.generatedColumn-1:0),bias:c.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(c){return c.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(c,p){for(var h=0;h<this._sections.length;h++){var d=this._sections[h],f=d.consumer.sourceContentFor(c,!0);if(f)return f}if(p)return null;throw new Error('"'+c+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(c){for(var p=0;p<this._sections.length;p++){var h=this._sections[p];if(h.consumer._findSourceIndex(n.getArg(c,"source"))!==-1){var d=h.consumer.generatedPositionFor(c);if(d){var f={line:d.line+(h.generatedOffset.generatedLine-1),column:d.column+(h.generatedOffset.generatedLine===d.line?h.generatedOffset.generatedColumn-1:0)};return f}}}return{line:null,column:null}},l.prototype._parseMappings=function(c,p){this.__generatedMappings=[],this.__originalMappings=[];for(var h=0;h<this._sections.length;h++)for(var d=this._sections[h],f=d.consumer._generatedMappings,g=0;g<f.length;g++){var b=f[g],x=d.consumer._sources.at(b.source);x=n.computeSourceURL(d.consumer.sourceRoot,x,this._sourceMapURL),this._sources.add(x),x=this._sources.indexOf(x);var w=null;b.name&&(w=d.consumer._names.at(b.name),this._names.add(w),w=this._names.indexOf(w));var E={source:x,generatedLine:b.generatedLine+(d.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(d.generatedOffset.generatedLine===b.generatedLine?d.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:w};this.__generatedMappings.push(E),typeof E.originalLine=="number"&&this.__originalMappings.push(E)}r(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),r(this.__originalMappings,n.compareByOriginalPositions)},hn.IndexedSourceMapConsumer=l,hn}var Hr={},Ul;function sg(){if(Ul)return Hr;Ul=1;var n=Nf().SourceMapGenerator,t=Wn(),e=/(\r?\n)/,i=10,r="$$$isSourceNode$$$";function s(o,a,l,u,c){this.children=[],this.sourceContents={},this.line=o??null,this.column=a??null,this.source=l??null,this.name=c??null,this[r]=!0,u!=null&&this.add(u)}return s.fromStringWithSourceMap=function(a,l,u){var c=new s,p=a.split(e),h=0,d=function(){var w=v(),E=v()||"";return w+E;function v(){return h<p.length?p[h++]:void 0}},f=1,g=0,b=null;return l.eachMapping(function(w){if(b!==null)if(f<w.generatedLine)x(b,d()),f++,g=0;else{var E=p[h]||"",v=E.substr(0,w.generatedColumn-g);p[h]=E.substr(w.generatedColumn-g),g=w.generatedColumn,x(b,v),b=w;return}for(;f<w.generatedLine;)c.add(d()),f++;if(g<w.generatedColumn){var E=p[h]||"";c.add(E.substr(0,w.generatedColumn)),p[h]=E.substr(w.generatedColumn),g=w.generatedColumn}b=w},this),h<p.length&&(b&&x(b,d()),c.add(p.splice(h).join(""))),l.sources.forEach(function(w){var E=l.sourceContentFor(w);E!=null&&(u!=null&&(w=t.join(u,w)),c.setSourceContent(w,E))}),c;function x(w,E){if(w===null||w.source===void 0)c.add(E);else{var v=u?t.join(u,w.source):w.source;c.add(new s(w.originalLine,w.originalColumn,v,E,w.name))}}},s.prototype.add=function(a){if(Array.isArray(a))a.forEach(function(l){this.add(l)},this);else if(a[r]||typeof a=="string")a&&this.children.push(a);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+a);return this},s.prototype.prepend=function(a){if(Array.isArray(a))for(var l=a.length-1;l>=0;l--)this.prepend(a[l]);else if(a[r]||typeof a=="string")this.children.unshift(a);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+a);return this},s.prototype.walk=function(a){for(var l,u=0,c=this.children.length;u<c;u++)l=this.children[u],l[r]?l.walk(a):l!==""&&a(l,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(a){var l,u,c=this.children.length;if(c>0){for(l=[],u=0;u<c-1;u++)l.push(this.children[u]),l.push(a);l.push(this.children[u]),this.children=l}return this},s.prototype.replaceRight=function(a,l){var u=this.children[this.children.length-1];return u[r]?u.replaceRight(a,l):typeof u=="string"?this.children[this.children.length-1]=u.replace(a,l):this.children.push("".replace(a,l)),this},s.prototype.setSourceContent=function(a,l){this.sourceContents[t.toSetString(a)]=l},s.prototype.walkSourceContents=function(a){for(var l=0,u=this.children.length;l<u;l++)this.children[l][r]&&this.children[l].walkSourceContents(a);for(var c=Object.keys(this.sourceContents),l=0,u=c.length;l<u;l++)a(t.fromSetString(c[l]),this.sourceContents[c[l]])},s.prototype.toString=function(){var a="";return this.walk(function(l){a+=l}),a},s.prototype.toStringWithSourceMap=function(a){var l={code:"",line:1,column:0},u=new n(a),c=!1,p=null,h=null,d=null,f=null;return this.walk(function(g,b){l.code+=g,b.source!==null&&b.line!==null&&b.column!==null?((p!==b.source||h!==b.line||d!==b.column||f!==b.name)&&u.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:l.line,column:l.column},name:b.name}),p=b.source,h=b.line,d=b.column,f=b.name,c=!0):c&&(u.addMapping({generated:{line:l.line,column:l.column}}),p=null,c=!1);for(var x=0,w=g.length;x<w;x++)g.charCodeAt(x)===i?(l.line++,l.column=0,x+1===w?(p=null,c=!1):c&&u.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:l.line,column:l.column},name:b.name})):l.column++}),this.walkSourceContents(function(g,b){u.setSourceContent(g,b)}),{code:l.code,map:u}},Hr.SourceNode=s,Hr}var $l;function og(){return $l||($l=1,un.SourceMapGenerator=Nf().SourceMapGenerator,un.SourceMapConsumer=rg().SourceMapConsumer,un.SourceNode=sg().SourceNode),un}var Gl;function ag(){return Gl||(Gl=1,function(n,t){t.__esModule=!0;var e=Tt(),i=void 0;try{var r=og();i=r.SourceNode}catch{}i||(i=function(a,l,u,c){this.src="",c&&this.add(c)},i.prototype={add:function(l){e.isArray(l)&&(l=l.join("")),this.src+=l},prepend:function(l){e.isArray(l)&&(l=l.join("")),this.src=l+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function s(a,l,u){if(e.isArray(a)){for(var c=[],p=0,h=a.length;p<h;p++)c.push(l.wrap(a[p],u));return c}else if(typeof a=="boolean"||typeof a=="number")return a+"";return a}function o(a){this.srcFile=a,this.source=[]}o.prototype={isEmpty:function(){return!this.source.length},prepend:function(l,u){this.source.unshift(this.wrap(l,u))},push:function(l,u){this.source.push(this.wrap(l,u))},merge:function(){var l=this.empty();return this.each(function(u){l.add([" ",u,`
|
|
12
|
-
`])}),l},each:function(l){for(var u=0,c=this.source.length;u<c;u++)l(this.source[u])},empty:function(){var l=this.currentLocation||{start:{}};return new i(l.start.line,l.start.column,this.srcFile)},wrap:function(l){var u=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return l instanceof i?l:(l=s(l,this,u),new i(u.start.line,u.start.column,this.srcFile,l))},functionCall:function(l,u,c){return c=this.generateList(c),this.wrap([l,u?"."+u+"(":"(",c,")"])},quotedString:function(l){return'"'+(l+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(l){var u=this,c=[];Object.keys(l).forEach(function(h){var d=s(l[h],u);d!=="undefined"&&c.push([u.quotedString(h),":",d])});var p=this.generateList(c);return p.prepend("{"),p.add("}"),p},generateList:function(l){for(var u=this.empty(),c=0,p=l.length;c<p;c++)c&&u.add(","),u.add(s(l[c],this));return u},generateArray:function(l){var u=this.generateList(l);return u.prepend("["),u.add("]"),u}},t.default=o,n.exports=t.default}(_i,_i.exports)),_i.exports}var Yl;function lg(){return Yl||(Yl=1,function(n,t){t.__esModule=!0;function e(h){return h&&h.__esModule?h:{default:h}}var i=Ma(),r=$t(),s=e(r),o=Tt(),a=ag(),l=e(a);function u(h){this.value=h}function c(){}c.prototype={nameLookup:function(d,f){return this.internalNameLookup(d,f)},depthedLookup:function(d){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(d),")"]},compilerInfo:function(){var d=i.COMPILER_REVISION,f=i.REVISION_CHANGES[d];return[d,f]},appendToBuffer:function(d,f,g){return o.isArray(d)||(d=[d]),d=this.source.wrap(d,f),this.environment.isSimple?["return ",d,";"]:g?["buffer += ",d,";"]:(d.appendToBuffer=!0,d)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(d,f){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",d,",",JSON.stringify(f),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(d,f,g,b){this.environment=d,this.options=f,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!b,this.name=this.environment.name,this.isChild=!!g,this.context=g||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(d,f),this.useDepths=this.useDepths||d.useDepths||d.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||d.useBlockParams;var x=d.opcodes,w=void 0,E=void 0,v=void 0,_=void 0;for(v=0,_=x.length;v<_;v++)w=x[v],this.source.currentLocation=w.loc,E=E||w.loc,this[w.opcode].apply(this,w.args);if(this.source.currentLocation=E,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new s.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
13
|
-
`]),this.decorators.push("return fn;"),b?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
14
|
-
`),this.decorators.push(`}
|
|
15
|
-
`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(b);if(this.isChild)return k;var M={compiler:this.compilerInfo(),main:k};this.decorators&&(M.main_d=this.decorators,M.useDecorators=!0);var P=this.context,T=P.programs,A=P.decorators;for(v=0,_=T.length;v<_;v++)T[v]&&(M[v]=T[v],A[v]&&(M[v+"_d"]=A[v],M.useDecorators=!0));return this.environment.usePartial&&(M.usePartial=!0),this.options.data&&(M.useData=!0),this.useDepths&&(M.useDepths=!0),this.useBlockParams&&(M.useBlockParams=!0),this.options.compat&&(M.compat=!0),b?M.compilerOptions=this.options:(M.compiler=JSON.stringify(M.compiler),this.source.currentLocation={start:{line:1,column:0}},M=this.objectLiteral(M),f.srcName?(M=M.toStringWithSourceMap({file:f.destName}),M.map=M.map&&M.map.toString()):M=M.toString()),M},preamble:function(){this.lastContext=0,this.source=new l.default(this.options.srcName),this.decorators=new l.default(this.options.srcName)},createFunctionContext:function(d){var f=this,g="",b=this.stackVars.concat(this.registers.list);b.length>0&&(g+=", "+b.join(", "));var x=0;Object.keys(this.aliases).forEach(function(v){var _=f.aliases[v];_.children&&_.referenceCount>1&&(g+=", alias"+ ++x+"="+v,_.children[0]="alias"+x)}),this.lookupPropertyFunctionIsUsed&&(g+=", "+this.lookupPropertyFunctionVarDeclaration());var w=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&w.push("blockParams"),this.useDepths&&w.push("depths");var E=this.mergeSource(g);return d?(w.push(E),Function.apply(this,w)):this.source.wrap(["function(",w.join(","),`) {
|
|
16
|
-
`,E,"}"])},mergeSource:function(d){var f=this.environment.isSimple,g=!this.forceBuffer,b=void 0,x=void 0,w=void 0,E=void 0;return this.source.each(function(v){v.appendToBuffer?(w?v.prepend(" + "):w=v,E=v):(w&&(x?w.prepend("buffer += "):b=!0,E.add(";"),w=E=void 0),x=!0,f||(g=!1))}),g?w?(w.prepend("return "),E.add(";")):x||this.source.push('return "";'):(d+=", buffer = "+(b?"":this.initializeBuffer()),w?(w.prepend("return buffer + "),E.add(";")):this.source.push("return buffer;")),d&&this.source.prepend("var "+d.substring(2)+(b?"":`;
|
|
17
|
-
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
18
|
-
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
19
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
-
return parent[propertyName];
|
|
21
|
-
}
|
|
22
|
-
return undefined
|
|
23
|
-
}
|
|
24
|
-
`.trim()},blockValue:function(d){var f=this.aliasable("container.hooks.blockHelperMissing"),g=[this.contextName(0)];this.setupHelperArgs(d,0,g);var b=this.popStack();g.splice(1,0,b),this.push(this.source.functionCall(f,"call",g))},ambiguousBlockValue:function(){var d=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs("",0,f,!0),this.flushInline();var g=this.topStack();f.splice(1,0,g),this.pushSource(["if (!",this.lastHelper,") { ",g," = ",this.source.functionCall(d,"call",f),"}"])},appendContent:function(d){this.pendingContent?d=this.pendingContent+d:this.pendingLocation=this.source.currentLocation,this.pendingContent=d},append:function(){if(this.isInline())this.replaceStack(function(f){return[" != null ? ",f,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var d=this.popStack();this.pushSource(["if (",d," != null) { ",this.appendToBuffer(d,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(d){this.lastContext=d},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(d,f,g,b){var x=0;!b&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(d[x++])):this.pushContext(),this.resolvePath("context",d,x,f,g)},lookupBlockParam:function(d,f){this.useBlockParams=!0,this.push(["blockParams[",d[0],"][",d[1],"]"]),this.resolvePath("context",f,1)},lookupData:function(d,f,g){d?this.pushStackLiteral("container.data(data, "+d+")"):this.pushStackLiteral("data"),this.resolvePath("data",f,0,!0,g)},resolvePath:function(d,f,g,b,x){var w=this;if(this.options.strict||this.options.assumeObjects){this.push(p(this.options.strict&&x,this,f,d));return}for(var E=f.length;g<E;g++)this.replaceStack(function(v){var _=w.nameLookup(v,f[g],d);return b?[" && ",_]:[" != null ? ",_," : ",v]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(d,f){this.pushContext(),this.pushString(f),f!=="SubExpression"&&(typeof d=="string"?this.pushString(d):this.pushStackLiteral(d))},emptyHash:function(d){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(d?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var d=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(d.ids)),this.stringParams&&(this.push(this.objectLiteral(d.contexts)),this.push(this.objectLiteral(d.types))),this.push(this.objectLiteral(d.values))},pushString:function(d){this.pushStackLiteral(this.quotedString(d))},pushLiteral:function(d){this.pushStackLiteral(d)},pushProgram:function(d){d!=null?this.pushStackLiteral(this.programExpression(d)):this.pushStackLiteral(null)},registerDecorator:function(d,f){var g=this.nameLookup("decorators",f,"decorator"),b=this.setupHelperArgs(f,d);this.decorators.push(["fn = ",this.decorators.functionCall(g,"",["fn","props","container",b])," || fn;"])},invokeHelper:function(d,f,g){var b=this.popStack(),x=this.setupHelper(d,f),w=[];g&&w.push(x.name),w.push(b),this.options.strict||w.push(this.aliasable("container.hooks.helperMissing"));var E=["(",this.itemsSeparatedBy(w,"||"),")"],v=this.source.functionCall(E,"call",x.callParams);this.push(v)},itemsSeparatedBy:function(d,f){var g=[];g.push(d[0]);for(var b=1;b<d.length;b++)g.push(f,d[b]);return g},invokeKnownHelper:function(d,f){var g=this.setupHelper(d,f);this.push(this.source.functionCall(g.name,"call",g.callParams))},invokeAmbiguous:function(d,f){this.useRegister("helper");var g=this.popStack();this.emptyHash();var b=this.setupHelper(0,d,f),x=this.lastHelper=this.nameLookup("helpers",d,"helper"),w=["(","(helper = ",x," || ",g,")"];this.options.strict||(w[0]="(helper = ",w.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",w,b.paramsInit?["),(",b.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",b.callParams)," : helper))"])},invokePartial:function(d,f,g){var b=[],x=this.setupParams(f,1,b);d&&(f=this.popStack(),delete x.name),g&&(x.indent=JSON.stringify(g)),x.helpers="helpers",x.partials="partials",x.decorators="container.decorators",d?b.unshift(f):b.unshift(this.nameLookup("partials",f,"partial")),this.options.compat&&(x.depths="depths"),x=this.objectLiteral(x),b.push(x),this.push(this.source.functionCall("container.invokePartial","",b))},assignToHash:function(d){var f=this.popStack(),g=void 0,b=void 0,x=void 0;this.trackIds&&(x=this.popStack()),this.stringParams&&(b=this.popStack(),g=this.popStack());var w=this.hash;g&&(w.contexts[d]=g),b&&(w.types[d]=b),x&&(w.ids[d]=x),w.values[d]=f},pushId:function(d,f,g){d==="BlockParam"?this.pushStackLiteral("blockParams["+f[0]+"].path["+f[1]+"]"+(g?" + "+JSON.stringify("."+g):"")):d==="PathExpression"?this.pushString(f):d==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:c,compileChildren:function(d,f){for(var g=d.children,b=void 0,x=void 0,w=0,E=g.length;w<E;w++){b=g[w],x=new this.compiler;var v=this.matchExistingProgram(b);if(v==null){this.context.programs.push("");var _=this.context.programs.length;b.index=_,b.name="program"+_,this.context.programs[_]=x.compile(b,f,this.context,!this.precompile),this.context.decorators[_]=x.decorators,this.context.environments[_]=b,this.useDepths=this.useDepths||x.useDepths,this.useBlockParams=this.useBlockParams||x.useBlockParams,b.useDepths=this.useDepths,b.useBlockParams=this.useBlockParams}else b.index=v.index,b.name="program"+v.index,this.useDepths=this.useDepths||v.useDepths,this.useBlockParams=this.useBlockParams||v.useBlockParams}},matchExistingProgram:function(d){for(var f=0,g=this.context.environments.length;f<g;f++){var b=this.context.environments[f];if(b&&b.equals(d))return b}},programExpression:function(d){var f=this.environment.children[d],g=[f.index,"data",f.blockParams];return(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths"),"container.program("+g.join(", ")+")"},useRegister:function(d){this.registers[d]||(this.registers[d]=!0,this.registers.list.push(d))},push:function(d){return d instanceof u||(d=this.source.wrap(d)),this.inlineStack.push(d),d},pushStackLiteral:function(d){this.push(new u(d))},pushSource:function(d){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),d&&this.source.push(d)},replaceStack:function(d){var f=["("],g=void 0,b=void 0,x=void 0;if(!this.isInline())throw new s.default("replaceStack on non-inline");var w=this.popStack(!0);if(w instanceof u)g=[w.value],f=["(",g],x=!0;else{b=!0;var E=this.incrStack();f=["((",this.push(E)," = ",w,")"],g=this.topStack()}var v=d.call(this,g);x||this.popStack(),b&&this.stackSlot--,this.push(f.concat(v,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var d=this.inlineStack;this.inlineStack=[];for(var f=0,g=d.length;f<g;f++){var b=d[f];if(b instanceof u)this.compileStack.push(b);else{var x=this.incrStack();this.pushSource([x," = ",b,";"]),this.compileStack.push(x)}}},isInline:function(){return this.inlineStack.length},popStack:function(d){var f=this.isInline(),g=(f?this.inlineStack:this.compileStack).pop();if(!d&&g instanceof u)return g.value;if(!f){if(!this.stackSlot)throw new s.default("Invalid stack pop");this.stackSlot--}return g},topStack:function(){var d=this.isInline()?this.inlineStack:this.compileStack,f=d[d.length-1];return f instanceof u?f.value:f},contextName:function(d){return this.useDepths&&d?"depths["+d+"]":"depth"+d},quotedString:function(d){return this.source.quotedString(d)},objectLiteral:function(d){return this.source.objectLiteral(d)},aliasable:function(d){var f=this.aliases[d];return f?(f.referenceCount++,f):(f=this.aliases[d]=this.source.wrap(d),f.aliasable=!0,f.referenceCount=1,f)},setupHelper:function(d,f,g){var b=[],x=this.setupHelperArgs(f,d,b,g),w=this.nameLookup("helpers",f,"helper"),E=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:b,paramsInit:x,name:w,callParams:[E].concat(b)}},setupParams:function(d,f,g){var b={},x=[],w=[],E=[],v=!g,_=void 0;v&&(g=[]),b.name=this.quotedString(d),b.hash=this.popStack(),this.trackIds&&(b.hashIds=this.popStack()),this.stringParams&&(b.hashTypes=this.popStack(),b.hashContexts=this.popStack());var k=this.popStack(),M=this.popStack();(M||k)&&(b.fn=M||"container.noop",b.inverse=k||"container.noop");for(var P=f;P--;)_=this.popStack(),g[P]=_,this.trackIds&&(E[P]=this.popStack()),this.stringParams&&(w[P]=this.popStack(),x[P]=this.popStack());return v&&(b.args=this.source.generateArray(g)),this.trackIds&&(b.ids=this.source.generateArray(E)),this.stringParams&&(b.types=this.source.generateArray(w),b.contexts=this.source.generateArray(x)),this.options.data&&(b.data="data"),this.useBlockParams&&(b.blockParams="blockParams"),b},setupHelperArgs:function(d,f,g,b){var x=this.setupParams(d,f,g);return x.loc=JSON.stringify(this.source.currentLocation),x=this.objectLiteral(x),b?(this.useRegister("options"),g.push("options"),["options=",x]):g?(g.push(x),""):x}},function(){for(var h="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),d=c.RESERVED_WORDS={},f=0,g=h.length;f<g;f++)d[h[f]]=!0}(),c.isValidJavaScriptVariableName=function(h){return!c.RESERVED_WORDS[h]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(h)};function p(h,d,f,g){var b=d.popStack(),x=0,w=f.length;for(h&&w--;x<w;x++)b=d.nameLookup(b,f[x],g);return h?[d.aliasable("container.strict"),"(",b,", ",d.quotedString(f[x]),", ",JSON.stringify(d.source.currentLocation)," )"]:b}t.default=c,n.exports=t.default}(vi,vi.exports)),vi.exports}var Kl;function cg(){return Kl||(Kl=1,function(n,t){t.__esModule=!0;function e(w){return w&&w.__esModule?w:{default:w}}var i=Yp(),r=e(i),s=Tf(),o=e(s),a=Zp(),l=Qp(),u=lg(),c=e(u),p=If(),h=e(p),d=Rf(),f=e(d),g=r.default.create;function b(){var w=g();return w.compile=function(E,v){return l.compile(E,v,w)},w.precompile=function(E,v){return l.precompile(E,v,w)},w.AST=o.default,w.Compiler=l.Compiler,w.JavaScriptCompiler=c.default,w.Parser=a.parser,w.parse=a.parse,w.parseWithoutProcessing=a.parseWithoutProcessing,w}var x=b();x.create=b,f.default(x),x.Visitor=h.default,x.default=x,t.default=x,n.exports=t.default}(Zn,Zn.exports)),Zn.exports}var ug=cg();const xt=qt(ug),hg=`
|
|
25
|
-
<div class="panel {{class}} {{#if width}}width-{{width}}{{else}}width-L{{/if}} {{#if height}}height-{{height}}{{else}}height-L{{/if}}">
|
|
26
|
-
<p class="title">
|
|
27
|
-
{{#if icon}}<i class="{{icon}}"></i>{{/if}}
|
|
28
|
-
<span class="title">{{{title}}}</span>
|
|
29
|
-
{{#if description}}<span class="description">{{{description}}}</span>{{/if}}
|
|
30
|
-
</p>
|
|
31
|
-
|
|
32
|
-
<div class="content"></div>
|
|
33
|
-
</div>
|
|
34
|
-
`;var zr,Xl;function Ff(){if(Xl)return zr;Xl=1;var n=typeof ue=="object"&&ue&&ue.Object===Object&&ue;return zr=n,zr}var Vr,Jl;function hr(){if(Jl)return Vr;Jl=1;var n=Ff(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Vr=e,Vr}var Wr,Zl;function fr(){if(Zl)return Wr;Zl=1;var n=hr(),t=n.Symbol;return Wr=t,Wr}var Ur,Ql;function fg(){if(Ql)return Ur;Ql=1;var n=fr(),t=Object.prototype,e=t.hasOwnProperty,i=t.toString,r=n?n.toStringTag:void 0;function s(o){var a=e.call(o,r),l=o[r];try{o[r]=void 0;var u=!0}catch{}var c=i.call(o);return u&&(a?o[r]=l:delete o[r]),c}return Ur=s,Ur}var $r,tc;function dg(){if(tc)return $r;tc=1;var n=Object.prototype,t=n.toString;function e(i){return t.call(i)}return $r=e,$r}var Gr,ec;function dr(){if(ec)return Gr;ec=1;var n=fr(),t=fg(),e=dg(),i="[object Null]",r="[object Undefined]",s=n?n.toStringTag:void 0;function o(a){return a==null?a===void 0?r:i:s&&s in Object(a)?t(a):e(a)}return Gr=o,Gr}var Yr,nc;function je(){if(nc)return Yr;nc=1;function n(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}return Yr=n,Yr}var Kr,ic;function pg(){if(ic)return Kr;ic=1;var n=dr(),t=je(),e="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",s="[object Proxy]";function o(a){if(!t(a))return!1;var l=n(a);return l==i||l==r||l==e||l==s}return Kr=o,Kr}var Xr,rc;function gg(){if(rc)return Xr;rc=1;var n=hr(),t=n["__core-js_shared__"];return Xr=t,Xr}var Jr,sc;function mg(){if(sc)return Jr;sc=1;var n=gg(),t=function(){var i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function e(i){return!!t&&t in i}return Jr=e,Jr}var Zr,oc;function yg(){if(oc)return Zr;oc=1;var n=Function.prototype,t=n.toString;function e(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return Zr=e,Zr}var Qr,ac;function bg(){if(ac)return Qr;ac=1;var n=pg(),t=mg(),e=je(),i=yg(),r=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,a=Object.prototype,l=o.toString,u=a.hasOwnProperty,c=RegExp("^"+l.call(u).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(h){if(!e(h)||t(h))return!1;var d=n(h)?c:s;return d.test(i(h))}return Qr=p,Qr}var ts,lc;function vg(){if(lc)return ts;lc=1;function n(t,e){return t==null?void 0:t[e]}return ts=n,ts}var es,cc;function Ea(){if(cc)return es;cc=1;var n=bg(),t=vg();function e(i,r){var s=t(i,r);return n(s)?s:void 0}return es=e,es}var ns,uc;function qf(){if(uc)return ns;uc=1;var n=Ea(),t=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch{}}();return ns=t,ns}var is,hc;function _g(){if(hc)return is;hc=1;var n=qf();function t(e,i,r){i=="__proto__"&&n?n(e,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[i]=r}return is=t,is}var rs,fc;function jf(){if(fc)return rs;fc=1;function n(t,e){return t===e||t!==t&&e!==e}return rs=n,rs}var ss,dc;function xg(){if(dc)return ss;dc=1;var n=_g(),t=jf(),e=Object.prototype,i=e.hasOwnProperty;function r(s,o,a){var l=s[o];(!(i.call(s,o)&&t(l,a))||a===void 0&&!(o in s))&&n(s,o,a)}return ss=r,ss}var os,pc;function Un(){if(pc)return os;pc=1;var n=Array.isArray;return os=n,os}var as,gc;function pr(){if(gc)return as;gc=1;function n(t){return t!=null&&typeof t=="object"}return as=n,as}var ls,mc;function gr(){if(mc)return ls;mc=1;var n=dr(),t=pr(),e="[object Symbol]";function i(r){return typeof r=="symbol"||t(r)&&n(r)==e}return ls=i,ls}var cs,yc;function wg(){if(yc)return cs;yc=1;var n=Un(),t=gr(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(s,o){if(n(s))return!1;var a=typeof s;return a=="number"||a=="symbol"||a=="boolean"||s==null||t(s)?!0:i.test(s)||!e.test(s)||o!=null&&s in Object(o)}return cs=r,cs}var us,bc;function mr(){if(bc)return us;bc=1;var n=Ea(),t=n(Object,"create");return us=t,us}var hs,vc;function Sg(){if(vc)return hs;vc=1;var n=mr();function t(){this.__data__=n?n(null):{},this.size=0}return hs=t,hs}var fs,_c;function kg(){if(_c)return fs;_c=1;function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}return fs=n,fs}var ds,xc;function Cg(){if(xc)return ds;xc=1;var n=mr(),t="__lodash_hash_undefined__",e=Object.prototype,i=e.hasOwnProperty;function r(s){var o=this.__data__;if(n){var a=o[s];return a===t?void 0:a}return i.call(o,s)?o[s]:void 0}return ds=r,ds}var ps,wc;function Mg(){if(wc)return ps;wc=1;var n=mr(),t=Object.prototype,e=t.hasOwnProperty;function i(r){var s=this.__data__;return n?s[r]!==void 0:e.call(s,r)}return ps=i,ps}var gs,Sc;function Eg(){if(Sc)return gs;Sc=1;var n=mr(),t="__lodash_hash_undefined__";function e(i,r){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=n&&r===void 0?t:r,this}return gs=e,gs}var ms,kc;function Pg(){if(kc)return ms;kc=1;var n=Sg(),t=kg(),e=Cg(),i=Mg(),r=Eg();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var u=o[a];this.set(u[0],u[1])}}return s.prototype.clear=n,s.prototype.delete=t,s.prototype.get=e,s.prototype.has=i,s.prototype.set=r,ms=s,ms}var ys,Cc;function Og(){if(Cc)return ys;Cc=1;function n(){this.__data__=[],this.size=0}return ys=n,ys}var bs,Mc;function yr(){if(Mc)return bs;Mc=1;var n=jf();function t(e,i){for(var r=e.length;r--;)if(n(e[r][0],i))return r;return-1}return bs=t,bs}var vs,Ec;function Ag(){if(Ec)return vs;Ec=1;var n=yr(),t=Array.prototype,e=t.splice;function i(r){var s=this.__data__,o=n(s,r);if(o<0)return!1;var a=s.length-1;return o==a?s.pop():e.call(s,o,1),--this.size,!0}return vs=i,vs}var _s,Pc;function Lg(){if(Pc)return _s;Pc=1;var n=yr();function t(e){var i=this.__data__,r=n(i,e);return r<0?void 0:i[r][1]}return _s=t,_s}var xs,Oc;function Rg(){if(Oc)return xs;Oc=1;var n=yr();function t(e){return n(this.__data__,e)>-1}return xs=t,xs}var ws,Ac;function Tg(){if(Ac)return ws;Ac=1;var n=yr();function t(e,i){var r=this.__data__,s=n(r,e);return s<0?(++this.size,r.push([e,i])):r[s][1]=i,this}return ws=t,ws}var Ss,Lc;function Ig(){if(Lc)return Ss;Lc=1;var n=Og(),t=Ag(),e=Lg(),i=Rg(),r=Tg();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var u=o[a];this.set(u[0],u[1])}}return s.prototype.clear=n,s.prototype.delete=t,s.prototype.get=e,s.prototype.has=i,s.prototype.set=r,Ss=s,Ss}var ks,Rc;function Dg(){if(Rc)return ks;Rc=1;var n=Ea(),t=hr(),e=n(t,"Map");return ks=e,ks}var Cs,Tc;function Bg(){if(Tc)return Cs;Tc=1;var n=Pg(),t=Ig(),e=Dg();function i(){this.size=0,this.__data__={hash:new n,map:new(e||t),string:new n}}return Cs=i,Cs}var Ms,Ic;function Ng(){if(Ic)return Ms;Ic=1;function n(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}return Ms=n,Ms}var Es,Dc;function br(){if(Dc)return Es;Dc=1;var n=Ng();function t(e,i){var r=e.__data__;return n(i)?r[typeof i=="string"?"string":"hash"]:r.map}return Es=t,Es}var Ps,Bc;function Fg(){if(Bc)return Ps;Bc=1;var n=br();function t(e){var i=n(this,e).delete(e);return this.size-=i?1:0,i}return Ps=t,Ps}var Os,Nc;function qg(){if(Nc)return Os;Nc=1;var n=br();function t(e){return n(this,e).get(e)}return Os=t,Os}var As,Fc;function jg(){if(Fc)return As;Fc=1;var n=br();function t(e){return n(this,e).has(e)}return As=t,As}var Ls,qc;function Hg(){if(qc)return Ls;qc=1;var n=br();function t(e,i){var r=n(this,e),s=r.size;return r.set(e,i),this.size+=r.size==s?0:1,this}return Ls=t,Ls}var Rs,jc;function zg(){if(jc)return Rs;jc=1;var n=Bg(),t=Fg(),e=qg(),i=jg(),r=Hg();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var u=o[a];this.set(u[0],u[1])}}return s.prototype.clear=n,s.prototype.delete=t,s.prototype.get=e,s.prototype.has=i,s.prototype.set=r,Rs=s,Rs}var Ts,Hc;function Vg(){if(Hc)return Ts;Hc=1;var n=zg(),t="Expected a function";function e(i,r){if(typeof i!="function"||r!=null&&typeof r!="function")throw new TypeError(t);var s=function(){var o=arguments,a=r?r.apply(this,o):o[0],l=s.cache;if(l.has(a))return l.get(a);var u=i.apply(this,o);return s.cache=l.set(a,u)||l,u};return s.cache=new(e.Cache||n),s}return e.Cache=n,Ts=e,Ts}var Is,zc;function Wg(){if(zc)return Is;zc=1;var n=Vg(),t=500;function e(i){var r=n(i,function(o){return s.size===t&&s.clear(),o}),s=r.cache;return r}return Is=e,Is}var Ds,Vc;function Ug(){if(Vc)return Ds;Vc=1;var n=Wg(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,i=n(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(t,function(o,a,l,u){s.push(l?u.replace(e,"$1"):a||o)}),s});return Ds=i,Ds}var Bs,Wc;function $g(){if(Wc)return Bs;Wc=1;function n(t,e){for(var i=-1,r=t==null?0:t.length,s=Array(r);++i<r;)s[i]=e(t[i],i,t);return s}return Bs=n,Bs}var Ns,Uc;function Hf(){if(Uc)return Ns;Uc=1;var n=fr(),t=$g(),e=Un(),i=gr(),r=n?n.prototype:void 0,s=r?r.toString:void 0;function o(a){if(typeof a=="string")return a;if(e(a))return t(a,o)+"";if(i(a))return s?s.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return Ns=o,Ns}var Fs,$c;function zf(){if($c)return Fs;$c=1;var n=Hf();function t(e){return e==null?"":n(e)}return Fs=t,Fs}var qs,Gc;function $n(){if(Gc)return qs;Gc=1;var n=Un(),t=wg(),e=Ug(),i=zf();function r(s,o){return n(s)?s:t(s,o)?[s]:e(i(s))}return qs=r,qs}var js,Yc;function Vf(){if(Yc)return js;Yc=1;var n=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function e(i,r){var s=typeof i;return r=r??n,!!r&&(s=="number"||s!="symbol"&&t.test(i))&&i>-1&&i%1==0&&i<r}return js=e,js}var Hs,Kc;function vr(){if(Kc)return Hs;Kc=1;var n=gr();function t(e){if(typeof e=="string"||n(e))return e;var i=e+"";return i=="0"&&1/e==-1/0?"-0":i}return Hs=t,Hs}var zs,Xc;function Wf(){if(Xc)return zs;Xc=1;var n=xg(),t=$n(),e=Vf(),i=je(),r=vr();function s(o,a,l,u){if(!i(o))return o;a=t(a,o);for(var c=-1,p=a.length,h=p-1,d=o;d!=null&&++c<p;){var f=r(a[c]),g=l;if(f==="__proto__"||f==="constructor"||f==="prototype")return o;if(c!=h){var b=d[f];g=u?u(b,f,d):void 0,g===void 0&&(g=i(b)?b:e(a[c+1])?[]:{})}n(d,f,g),d=d[f]}return o}return zs=s,zs}var Vs,Jc;function Gg(){if(Jc)return Vs;Jc=1;var n=Wf();function t(e,i,r){return e==null?e:n(e,i,r)}return Vs=t,Vs}var Yg=Gg();const Ze=qt(Yg);var Kg=je();const Xg=qt(Kg);var Si={exports:{}},Zc;function Jg(){return Zc||(Zc=1,function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),e.BASE=2166136261;function e(i,r=e.BASE){const s=i.length;for(let o=0;o<s;o++)r^=i.charCodeAt(o),r+=(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24);return r>>>0}t.default=e,n.exports=e}(Si,Si.exports)),Si.exports}var Zg=Jg();const Qg=qt(Zg),Pa=(n,t,e="")=>Object.entries(n).reduce((i,[r,s])=>{const o=`${e}${e?".":""}${r}`;return Xg(s)&&!t.includes(o)?i.concat(Pa(s,t,o)):i.concat([[o,s]])},[]),nr=n=>`hsl(${Math.floor(Qg(n))/5%360}, 100%, 74%)`;class Oa{constructor(t){this.key=t}extract(){return JSON.parse(localStorage.getItem(this.key)??"null")}store(t){return localStorage.setItem(this.key,JSON.stringify(t)),this}clear(){return localStorage.removeItem(this.key),this}static build(t){return new Oa(t)}}class pt{constructor(t){this.element=document.createElement("div"),t&&(this.element=this.compilePredicateToElement(t))}get isHidden(){return this.element.classList.contains("hidden")}get id(){return this.element.id}assignId(t){return this.element.id=t,this}show(){return this.element.classList.remove("hidden"),this}hide(){return this.element.classList.add("hidden"),this}append(t){return this.element.append(this.compilePredicateToElement(t)),this}prepend(t){return this.element.prepend(this.compilePredicateToElement(t)),this}replace(t){const e=this.compilePredicateToElement(t);return this.element.after(e),this.isHidden&&e.classList.add("hidden"),Object.assign(this.delete(),{element:e})}clear(){return this.element.innerHTML="",this}delete(){return this.element.remove(),this}compilePredicateToElement(t){return t instanceof pt?t.element:typeof t=="string"?this.compileHtmlStringToElement(t):t}compileHtmlStringToElement(t){return new DOMParser().parseFromString(t,"text/html").body.firstElementChild}}const Qc=(()=>{const n={password:String,number:Number,text:String};return(t,e)=>{if(t==="checkbox")return e||null;const i=e.trim();return i.length?(n[t]??String)(i):null}})();class _r extends pt{get paths(){return[...this.element.querySelectorAll("*[data-key]")].map(t=>t.getAttribute("data-key")).filter(Boolean)}extract(){return[...this.element.querySelectorAll("*[data-key]")].reduce((t,e)=>{const i=e.getAttribute("data-key"),r=e.getAttribute("cast")??e.getAttribute("type")??"text";if(!i||!("value"in e)||typeof e.value!="string")return t;if(e.hasAttribute("list")){const o=e.getAttribute("list")??",",a=e.value.split(o).map(l=>Qc(r,l)).filter(l=>l!==null);return a.length?Ze(t,i,a):t}const s=Qc(r,e.value);return r==="checkbox"&&"checked"in e?e.checked?Ze(t,i,s??!0):t:s!==null?Ze(t,i,s):t},{})}assign(t){return Pa(t,this.paths).map(([e,i])=>[e,i,this.element.querySelector(`*[data-key="${e}"]`)]).forEach(([e,i,r])=>Ze(r,"value",Array.isArray(i)?i.join(r.getAttribute("list")??","):i??"")),this}static build(t){return new _r(t)}}class xr{constructor(t,e){this.key=t,this.element=e,this.form=_r.build(this.element),this.client=Oa.build(this.key)}sync(){const t=this.client.extract()??[];return this.form.assign(t.reduce((e,[i,r])=>Ze(e,i,r),{})),this}save(){return this.client.store(Pa(this.form.extract(),this.form.paths)),this}clear(){return this.client.clear(),this}static build(t,e){return new xr(t,e)}}class sn{constructor(t){this.element=t,this.handlers=[],t.addEventListener("click",e=>this.trigger(e))}handle(t){return this.handlers.push(async e=>{this.element.classList.add("processed");try{await t(e)}finally{this.element.classList.remove("processed")}}),this}async trigger(t=new Event("manual")){for(const e of this.handlers)await e(t)}static build(t){return new sn(t)}}class on extends pt{constructor(t){super(),this.element=t,this.content=new pt(this.element.querySelector("div.content")),this.controls={main:new pt(this.element.querySelector("div.controls div.main")),additional:new pt(this.element.querySelector("div.controls div.additional"))},this.storage=xr.build(`config:${this.element.id}`,this.element.querySelector("div.storage")),this.meta={},this.events=new Vn;const e=this.element.querySelector("div.controls button#expand");e&&sn.build(e).handle(()=>this.controls.additional.isHidden?(this.controls.additional.show(),e.classList.add("toggled")):(this.controls.additional.hide(),e.classList.remove("toggled")))}assignMeta(t){return Object.assign(this,{meta:t})}initialize(){return this.storage.sync(),this.emit("initialize",this)}refresh(){return this.emit("refresh",this)}select(){return this.emit("select",this)}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new on(typeof t=="string"?new pt(t).element:t)}}const tm=xt.compile(hg);class Ne extends pt{constructor(t){super(tm(t)),this.content=new pt(this.element.querySelector("div.content"))}clear(){return this.content.clear(),this}append(t){return this.content.append(t),this}prepend(t){return this.content.prepend(t),this}replace(t){return this.content.replace(t),this}static build(t){return new Ne(t)}}class Mn extends pt{constructor(t){super(`
|
|
35
|
-
<button
|
|
36
|
-
style="${t!=null&&t.colorify?`color: ${nr(t.name)}`:""}"
|
|
37
|
-
class="${t.isEnabled?"checked":""}"
|
|
38
|
-
>${t.name}</button>
|
|
39
|
-
`),this.configuration=t,this.events=new Vn,this.element.addEventListener("click",()=>this.isEnabled?this.disable("click"):this.enable("click"))}get name(){return this.configuration.name}get isEnabled(){return this.element.classList.contains("checked")}enable(t="auto"){return this.isEnabled?this:(this.element.classList.add("checked"),this.emit("enable",this,t))}disable(t="auto"){return this.isEnabled?(this.element.classList.remove("checked"),this.emit("disable",this,t)):this}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new Mn(t)}}const Vt=n=>n,em=(n=0,t=1)=>(e=t)=>n+=e,nm=xt.compile(Tp);class In extends pt{constructor(t){super(),this.provided=t,this.buttons={all:Mn.build({name:"ALL",isEnabled:!0}),provided:Vt({})},this.events=new Vn,this.panel=new Ne({...this.provided,class:"checkbox-area"}).append(nm(this.provided)),this.area=new pt(this.panel.element.querySelector("div.buttons")).append(this.buttons.all),this.replace(this.panel),this.buttons.all.on("enable",(e,i)=>i==="click"?this.extract().forEach(r=>r.enable()):null),this.buttons.all.on("disable",(e,i)=>i==="click"?this.extract().forEach(r=>r.disable()):null)}extract(){return Object.values(this.buttons.provided)}provide(...t){return t.forEach(e=>{const i=e instanceof Mn?e:Mn.build(e);this.buttons.provided[i.name]=i,this.area.append(i),i.on("enable",(r,s)=>{this.extract().every(o=>o.isEnabled)&&this.buttons.all.enable(),s!=="silent"&&this.emit("enable",r)}),i.on("disable",(r,s)=>{this.extract().some(o=>!o.isEnabled)&&this.buttons.all.disable(),s!=="silent"&&this.emit("disable",r)})}),this}clear(){return this.extract().forEach(t=>t.delete()),this.buttons.provided={},this}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new In(t)}}const im=`
|
|
40
|
-
<div class="container expectation" id="{{id}}">
|
|
41
|
-
<div class="meta">{{> expectationMeta this}}</div>
|
|
42
|
-
</div>
|
|
43
|
-
`;var Ws,tu;function Uf(){if(tu)return Ws;tu=1;var n=$n(),t=vr();function e(i,r){r=n(r,i);for(var s=0,o=r.length;i!=null&&s<o;)i=i[t(r[s++])];return s&&s==o?i:void 0}return Ws=e,Ws}var Us,eu;function rm(){if(eu)return Us;eu=1;var n=Uf(),t=Wf(),e=$n();function i(r,s,o){for(var a=-1,l=s.length,u={};++a<l;){var c=s[a],p=n(r,c);o(p,c)&&t(u,e(c,r),p)}return u}return Us=i,Us}var $s,nu;function sm(){if(nu)return $s;nu=1;function n(t,e){return t!=null&&e in Object(t)}return $s=n,$s}var Gs,iu;function om(){if(iu)return Gs;iu=1;var n=dr(),t=pr(),e="[object Arguments]";function i(r){return t(r)&&n(r)==e}return Gs=i,Gs}var Ys,ru;function $f(){if(ru)return Ys;ru=1;var n=om(),t=pr(),e=Object.prototype,i=e.hasOwnProperty,r=e.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(o){return t(o)&&i.call(o,"callee")&&!r.call(o,"callee")};return Ys=s,Ys}var Ks,su;function am(){if(su)return Ks;su=1;var n=9007199254740991;function t(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=n}return Ks=t,Ks}var Xs,ou;function lm(){if(ou)return Xs;ou=1;var n=$n(),t=$f(),e=Un(),i=Vf(),r=am(),s=vr();function o(a,l,u){l=n(l,a);for(var c=-1,p=l.length,h=!1;++c<p;){var d=s(l[c]);if(!(h=a!=null&&u(a,d)))break;a=a[d]}return h||++c!=p?h:(p=a==null?0:a.length,!!p&&r(p)&&i(d,p)&&(e(a)||t(a)))}return Xs=o,Xs}var Js,au;function cm(){if(au)return Js;au=1;var n=sm(),t=lm();function e(i,r){return i!=null&&t(i,r,n)}return Js=e,Js}var Zs,lu;function um(){if(lu)return Zs;lu=1;var n=rm(),t=cm();function e(i,r){return n(i,r,function(s,o){return t(i,o)})}return Zs=e,Zs}var Qs,cu;function hm(){if(cu)return Qs;cu=1;function n(t,e){for(var i=-1,r=e.length,s=t.length;++i<r;)t[s+i]=e[i];return t}return Qs=n,Qs}var to,uu;function fm(){if(uu)return to;uu=1;var n=fr(),t=$f(),e=Un(),i=n?n.isConcatSpreadable:void 0;function r(s){return e(s)||t(s)||!!(i&&s&&s[i])}return to=r,to}var eo,hu;function dm(){if(hu)return eo;hu=1;var n=hm(),t=fm();function e(i,r,s,o,a){var l=-1,u=i.length;for(s||(s=t),a||(a=[]);++l<u;){var c=i[l];r>0&&s(c)?r>1?e(c,r-1,s,o,a):n(a,c):o||(a[a.length]=c)}return a}return eo=e,eo}var no,fu;function pm(){if(fu)return no;fu=1;var n=dm();function t(e){var i=e==null?0:e.length;return i?n(e,1):[]}return no=t,no}var io,du;function gm(){if(du)return io;du=1;function n(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}return io=n,io}var ro,pu;function mm(){if(pu)return ro;pu=1;var n=gm(),t=Math.max;function e(i,r,s){return r=t(r===void 0?i.length-1:r,0),function(){for(var o=arguments,a=-1,l=t(o.length-r,0),u=Array(l);++a<l;)u[a]=o[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=o[a];return c[r]=s(u),n(i,this,c)}}return ro=e,ro}var so,gu;function ym(){if(gu)return so;gu=1;function n(t){return function(){return t}}return so=n,so}var oo,mu;function bm(){if(mu)return oo;mu=1;function n(t){return t}return oo=n,oo}var ao,yu;function vm(){if(yu)return ao;yu=1;var n=ym(),t=qf(),e=bm(),i=t?function(r,s){return t(r,"toString",{configurable:!0,enumerable:!1,value:n(s),writable:!0})}:e;return ao=i,ao}var lo,bu;function _m(){if(bu)return lo;bu=1;var n=800,t=16,e=Date.now;function i(r){var s=0,o=0;return function(){var a=e(),l=t-(a-o);if(o=a,l>0){if(++s>=n)return arguments[0]}else s=0;return r.apply(void 0,arguments)}}return lo=i,lo}var co,vu;function xm(){if(vu)return co;vu=1;var n=vm(),t=_m(),e=t(n);return co=e,co}var uo,_u;function wm(){if(_u)return uo;_u=1;var n=pm(),t=mm(),e=xm();function i(r){return e(t(r,void 0,n),r+"")}return uo=i,uo}var ho,xu;function Sm(){if(xu)return ho;xu=1;var n=um(),t=wm(),e=t(function(i,r){return i==null?{}:n(i,r)});return ho=e,ho}var km=Sm();const Cm=qt(km),Mm=`
|
|
44
|
-
<div class="viewer container"></div>
|
|
45
|
-
`;function Em(n,t){var e,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,i&&(r=2&c[0]?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,i=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!((r=r.length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(c[0]===6&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(n,o)}catch(p){c=[6,p],i=0}finally{e=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([l,u])}}}function Gf(n){return n===null?"null":typeof n}function ea(n){return!!n&&typeof n=="object"}function Yf(n){if(n===void 0)return"";if(n===null||typeof n=="object"&&!n.constructor)return"Object";var t=/function ([^(]*)/.exec(n.constructor.toString());return t&&t.length>1?t[1]:""}function Kf(n,t,e){return n==="null"||n==="undefined"?n:(n!=="string"&&n!=="stringifiable"||(e=e.replace(/"/g,'\\"')),n==="function"?t.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":e)}function wu(n){var t="";return ea(n)?(t=Yf(n),Array.isArray(n)&&(t+="["+n.length+"]")):t=Kf(Gf(n),n,n),typeof t=="string"?'"'+t+'"':t}function Lt(n){return"json-formatter-"+n}function bt(n,t,e){var i=document.createElement(n);return t&&i.classList.add(Lt(t)),e!==void 0&&(e instanceof Node?i.appendChild(e):i.appendChild(document.createTextNode(String(e)))),i}(function(n){if(typeof window<"u"){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=n,document.head.appendChild(t)}})(`.json-formatter-row {
|
|
46
|
-
font-family: monospace;
|
|
47
|
-
}
|
|
48
|
-
.json-formatter-row,
|
|
49
|
-
.json-formatter-row a,
|
|
50
|
-
.json-formatter-row a:hover {
|
|
51
|
-
color: black;
|
|
52
|
-
text-decoration: none;
|
|
53
|
-
}
|
|
54
|
-
.json-formatter-row .json-formatter-row {
|
|
55
|
-
margin-left: 1rem;
|
|
56
|
-
}
|
|
57
|
-
.json-formatter-row .json-formatter-children.json-formatter-empty {
|
|
58
|
-
opacity: 0.5;
|
|
59
|
-
margin-left: 1rem;
|
|
60
|
-
}
|
|
61
|
-
.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
|
62
|
-
display: none;
|
|
63
|
-
}
|
|
64
|
-
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
|
65
|
-
content: "No properties";
|
|
66
|
-
}
|
|
67
|
-
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
|
68
|
-
content: "[]";
|
|
69
|
-
}
|
|
70
|
-
.json-formatter-row .json-formatter-string,
|
|
71
|
-
.json-formatter-row .json-formatter-stringifiable {
|
|
72
|
-
color: green;
|
|
73
|
-
white-space: pre;
|
|
74
|
-
word-wrap: break-word;
|
|
75
|
-
}
|
|
76
|
-
.json-formatter-row .json-formatter-number {
|
|
77
|
-
color: blue;
|
|
78
|
-
}
|
|
79
|
-
.json-formatter-row .json-formatter-boolean {
|
|
80
|
-
color: red;
|
|
81
|
-
}
|
|
82
|
-
.json-formatter-row .json-formatter-null {
|
|
83
|
-
color: #855A00;
|
|
84
|
-
}
|
|
85
|
-
.json-formatter-row .json-formatter-undefined {
|
|
86
|
-
color: #ca0b69;
|
|
87
|
-
}
|
|
88
|
-
.json-formatter-row .json-formatter-function {
|
|
89
|
-
color: #FF20ED;
|
|
90
|
-
}
|
|
91
|
-
.json-formatter-row .json-formatter-date {
|
|
92
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
93
|
-
}
|
|
94
|
-
.json-formatter-row .json-formatter-url {
|
|
95
|
-
text-decoration: underline;
|
|
96
|
-
color: blue;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
}
|
|
99
|
-
.json-formatter-row .json-formatter-bracket {
|
|
100
|
-
color: blue;
|
|
101
|
-
}
|
|
102
|
-
.json-formatter-row .json-formatter-key {
|
|
103
|
-
color: #00008B;
|
|
104
|
-
padding-right: 0.2rem;
|
|
105
|
-
}
|
|
106
|
-
.json-formatter-row .json-formatter-toggler-link {
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
}
|
|
109
|
-
.json-formatter-row .json-formatter-toggler {
|
|
110
|
-
line-height: 1.2rem;
|
|
111
|
-
font-size: 0.7rem;
|
|
112
|
-
vertical-align: middle;
|
|
113
|
-
opacity: 0.6;
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
padding-right: 0.2rem;
|
|
116
|
-
}
|
|
117
|
-
.json-formatter-row .json-formatter-toggler:after {
|
|
118
|
-
display: inline-block;
|
|
119
|
-
transition: transform 100ms ease-in;
|
|
120
|
-
content: "►";
|
|
121
|
-
}
|
|
122
|
-
.json-formatter-row > a > .json-formatter-preview-text {
|
|
123
|
-
opacity: 0;
|
|
124
|
-
transition: opacity 0.15s ease-in;
|
|
125
|
-
font-style: italic;
|
|
126
|
-
}
|
|
127
|
-
.json-formatter-row:hover > a > .json-formatter-preview-text {
|
|
128
|
-
opacity: 0.6;
|
|
129
|
-
}
|
|
130
|
-
.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
|
131
|
-
transform: rotate(90deg);
|
|
132
|
-
}
|
|
133
|
-
.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
|
134
|
-
display: inline-block;
|
|
135
|
-
}
|
|
136
|
-
.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
|
137
|
-
display: none;
|
|
138
|
-
}
|
|
139
|
-
.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
|
140
|
-
display: block;
|
|
141
|
-
}
|
|
142
|
-
.json-formatter-dark.json-formatter-row {
|
|
143
|
-
font-family: monospace;
|
|
144
|
-
}
|
|
145
|
-
.json-formatter-dark.json-formatter-row,
|
|
146
|
-
.json-formatter-dark.json-formatter-row a,
|
|
147
|
-
.json-formatter-dark.json-formatter-row a:hover {
|
|
148
|
-
color: white;
|
|
149
|
-
text-decoration: none;
|
|
150
|
-
}
|
|
151
|
-
.json-formatter-dark.json-formatter-row .json-formatter-row {
|
|
152
|
-
margin-left: 1rem;
|
|
153
|
-
}
|
|
154
|
-
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {
|
|
155
|
-
opacity: 0.5;
|
|
156
|
-
margin-left: 1rem;
|
|
157
|
-
}
|
|
158
|
-
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
|
159
|
-
display: none;
|
|
160
|
-
}
|
|
161
|
-
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
|
162
|
-
content: "No properties";
|
|
163
|
-
}
|
|
164
|
-
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
|
165
|
-
content: "[]";
|
|
166
|
-
}
|
|
167
|
-
.json-formatter-dark.json-formatter-row .json-formatter-string,
|
|
168
|
-
.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {
|
|
169
|
-
color: #31F031;
|
|
170
|
-
white-space: pre;
|
|
171
|
-
word-wrap: break-word;
|
|
172
|
-
}
|
|
173
|
-
.json-formatter-dark.json-formatter-row .json-formatter-number {
|
|
174
|
-
color: #66C2FF;
|
|
175
|
-
}
|
|
176
|
-
.json-formatter-dark.json-formatter-row .json-formatter-boolean {
|
|
177
|
-
color: #EC4242;
|
|
178
|
-
}
|
|
179
|
-
.json-formatter-dark.json-formatter-row .json-formatter-null {
|
|
180
|
-
color: #EEC97D;
|
|
181
|
-
}
|
|
182
|
-
.json-formatter-dark.json-formatter-row .json-formatter-undefined {
|
|
183
|
-
color: #ef8fbe;
|
|
184
|
-
}
|
|
185
|
-
.json-formatter-dark.json-formatter-row .json-formatter-function {
|
|
186
|
-
color: #FD48CB;
|
|
187
|
-
}
|
|
188
|
-
.json-formatter-dark.json-formatter-row .json-formatter-date {
|
|
189
|
-
background-color: rgba(255, 255, 255, 0.05);
|
|
190
|
-
}
|
|
191
|
-
.json-formatter-dark.json-formatter-row .json-formatter-url {
|
|
192
|
-
text-decoration: underline;
|
|
193
|
-
color: #027BFF;
|
|
194
|
-
cursor: pointer;
|
|
195
|
-
}
|
|
196
|
-
.json-formatter-dark.json-formatter-row .json-formatter-bracket {
|
|
197
|
-
color: #9494FF;
|
|
198
|
-
}
|
|
199
|
-
.json-formatter-dark.json-formatter-row .json-formatter-key {
|
|
200
|
-
color: #23A0DB;
|
|
201
|
-
padding-right: 0.2rem;
|
|
202
|
-
}
|
|
203
|
-
.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {
|
|
204
|
-
cursor: pointer;
|
|
205
|
-
}
|
|
206
|
-
.json-formatter-dark.json-formatter-row .json-formatter-toggler {
|
|
207
|
-
line-height: 1.2rem;
|
|
208
|
-
font-size: 0.7rem;
|
|
209
|
-
vertical-align: middle;
|
|
210
|
-
opacity: 0.6;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
padding-right: 0.2rem;
|
|
213
|
-
}
|
|
214
|
-
.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {
|
|
215
|
-
display: inline-block;
|
|
216
|
-
transition: transform 100ms ease-in;
|
|
217
|
-
content: "►";
|
|
218
|
-
}
|
|
219
|
-
.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {
|
|
220
|
-
opacity: 0;
|
|
221
|
-
transition: opacity 0.15s ease-in;
|
|
222
|
-
font-style: italic;
|
|
223
|
-
}
|
|
224
|
-
.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {
|
|
225
|
-
opacity: 0.6;
|
|
226
|
-
}
|
|
227
|
-
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
|
228
|
-
transform: rotate(90deg);
|
|
229
|
-
}
|
|
230
|
-
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
|
231
|
-
display: inline-block;
|
|
232
|
-
}
|
|
233
|
-
.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
|
234
|
-
display: none;
|
|
235
|
-
}
|
|
236
|
-
.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
|
237
|
-
display: block;
|
|
238
|
-
}
|
|
239
|
-
`);var Pm=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,Om=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,Am=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,ki=window.requestAnimationFrame||function(n){return n(),0},$e={hoverPreviewEnabled:!1,hoverPreviewArrayCount:10,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null,maxArrayItems:100,exposePath:!1,afterCopyHandler:function(){}},Lm=function(){function n(t,e,i,r,s,o,a,l){e===void 0&&(e=1),i===void 0&&(i=$e),o===void 0&&(o=[]),l===void 0&&(l=1),this.json=t,this.open=e,this.config=i,this.key=r,this.displayKey=s,this.path=o,this.arrayRange=a,this.level=l,this._isOpen=null,this.config.hoverPreviewEnabled===void 0&&(this.config.hoverPreviewEnabled=$e.hoverPreviewEnabled),this.config.hoverPreviewArrayCount===void 0&&(this.config.hoverPreviewArrayCount=$e.hoverPreviewArrayCount),this.config.hoverPreviewFieldCount===void 0&&(this.config.hoverPreviewFieldCount=$e.hoverPreviewFieldCount),this.config.useToJSON===void 0&&(this.config.useToJSON=$e.useToJSON),this.config.maxArrayItems===void 0&&(this.config.maxArrayItems=$e.maxArrayItems),this.key===""&&(this.key='""'),this.displayKey===void 0&&(this.displayKey=this.key)}return Object.defineProperty(n.prototype,"isOpen",{get:function(){return this._isOpen!==null?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDate",{get:function(){return this.json instanceof Date||this.type==="string"&&(Pm.test(this.json)||Am.test(this.json)||Om.test(this.json))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isUrl",{get:function(){return this.type==="string"&&this.json.indexOf("http")===0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLargeArray",{get:function(){return this.isArray&&this.json.length>this.config.maxArrayItems},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArrayRange",{get:function(){return this.isArray&&this.arrayRange!==void 0&&this.arrayRange.length==2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isObject",{get:function(){return ea(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&this.type==="stringifiable"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasKey",{get:function(){return this.key!==void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"constructorName",{get:function(){return Yf(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":Gf(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"keys",{get:function(){if(this.isObject){var t=Object.keys(this.json);if(this.isLargeArray){var e=Math.ceil(this.json.length/this.config.maxArrayItems);t=[];for(var i=0;i<e;i++){var r=i*this.config.maxArrayItems,s=Math.min(this.json.length-1,r+(this.config.maxArrayItems-1));t.push(r+" … "+s)}}return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!1,configurable:!0}),n.prototype.toggleOpen=function(t){var e,i;if(!((i=(e=t.target)===null||e===void 0?void 0:e.classList)===null||i===void 0)&&i.contains("json-formatter-copy"))return null;this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(Lt("open")))},n.prototype.onCopy=function(t){var e,i,r,s,o,a;return r=this,s=void 0,a=function(){return Em(this,function(l){switch(l.label){case 0:return[4,navigator.clipboard.writeText(ea(this.json)?JSON.stringify(this.json):this.json)];case 1:return l.sent(),(i=(e=this.config).afterCopyHandler)===null||i===void 0||i.call(e),[2]}})},new((o=void 0)||(o=Promise))(function(l,u){function c(d){try{h(a.next(d))}catch(f){u(f)}}function p(d){try{h(a.throw(d))}catch(f){u(f)}}function h(d){d.done?l(d.value):new o(function(f){f(d.value)}).then(c,p)}h((a=a.apply(r,s||[])).next())})},n.prototype.openAtDepth=function(t){t===void 0&&(t=1),t<0||(this.open=t,this.isOpen=t!==0,this.element&&(this.removeChildren(!1),t===0?this.element.classList.remove(Lt("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(Lt("open")))))},n.prototype.getInlinepreview=function(){var t=this;if(this.isArray){var e=this.json.slice(0,this.config.hoverPreviewArrayCount).map(wu);return e.length<this.json.length&&e.push("..."),"["+e.join(", ")+"]"}var i=this.keys,r=i.slice(0,this.config.hoverPreviewFieldCount).map(function(o){var a=(o+": "+wu(t.json[o])).replace(/\n/g,"");return a.length>35?a.substring(0,32)+"...":a}),s=i.length>=this.config.hoverPreviewFieldCount?", …":"";return"{ "+r.join(", ")+s+" }"},n.prototype.render=function(){this.element=bt("div","row");var t=this.isObject?bt("a","toggler-link"):bt("span");if(this.isArrayRange?t.appendChild(bt("span","range","["+this.displayKey+"]")):this.hasKey&&(t.appendChild(bt("span","key",this.displayKey+":")).classList.add("level-"+this.level),this.config.exposePath&&(this.element.dataset.path=JSON.stringify(this.path))),this.isObject&&!this.useToJSON&&t.appendChild(bt("span","toggler")),this.isObject&&!this.useToJSON){var e=bt("span","value"),i=bt("span");if(!this.isArrayRange){var r=bt("span","constructor-name",this.constructorName);i.appendChild(r)}if(this.isArray&&!this.isArrayRange){var s=bt("span");s.appendChild(bt("span","bracket","[")),s.appendChild(bt("span","number",this.json.length)),s.appendChild(bt("span","bracket","]")),i.appendChild(s)}var o=bt("span","preview",this.getInlinepreview());i.appendChild(o),e.appendChild(i),t.appendChild(e)}else{(e=this.isUrl?bt("a"):bt("span")).classList.add(Lt(this.type)),this.isDate&&e.classList.add(Lt("date")),this.isUrl&&(e.classList.add(Lt("url")),e.setAttribute("href",this.json));var a=Kf(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(a)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var l=bt("span","preview-text");l.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(l)}var u=bt("div","children");this.isObject&&u.classList.add(Lt("object")),this.isArray&&u.classList.add(Lt("array")),this.isEmpty&&u.classList.add(Lt("empty")),this.config&&this.config.theme&&this.element.classList.add(Lt(this.config.theme)),this.isOpen&&this.element.classList.add(Lt("open"));var c=bt("button","copy");return c.classList.add("fas"),c.classList.add("fa-clone"),c.addEventListener("click",this.onCopy.bind(this)),t.prepend(c),this.element.appendChild(t),this.element.appendChild(u),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener("click",this.toggleOpen.bind(this)),this.element},n.prototype.appendChildren=function(t){var e=this;t===void 0&&(t=!1);var i=this.element.querySelector("div."+Lt("children"));if(i&&!this.isEmpty){var r=function(a,l){var u=e.isLargeArray?[l*e.config.maxArrayItems,Math.min(e.json.length-1,l*e.config.maxArrayItems+(e.config.maxArrayItems-1))]:void 0,c=e.isArrayRange?(e.arrayRange[0]+l).toString():a,p=new n(u?e.json.slice(u[0],u[1]+1):e.json[a],e.open-1,e.config,a,c,u?e.path:e.path.concat(c),u,e.level+1);i.appendChild(p.render())};if(t){var s=0,o=function(){var a=e.keys[s];r(a,s),(s+=1)<e.keys.length&&(s>10?o():ki(o))};ki(o)}else this.keys.forEach(function(a,l){return r(a,l)})}},n.prototype.removeChildren=function(t){t===void 0&&(t=!1);var e=this.element.querySelector("div."+Lt("children"));if(t){var i=0,r=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(i+=1)>10?r():ki(r))};ki(r)}else e&&(e.innerHTML="")},n}();const ee=Object.create(null);ee.open="0";ee.close="1";ee.ping="2";ee.pong="3";ee.message="4";ee.upgrade="5";ee.noop="6";const Wi=Object.create(null);Object.keys(ee).forEach(n=>{Wi[ee[n]]=n});const Rm={type:"error",data:"parser error"},Tm=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Im=typeof ArrayBuffer=="function",Dm=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Xf=({type:n,data:t},e,i)=>Tm&&t instanceof Blob?e?i(t):Su(t,i):Im&&(t instanceof ArrayBuffer||Dm(t))?e?i(t):Su(new Blob([t]),i):i(ee[n]+(t||"")),Su=(n,t)=>{const e=new FileReader;return e.onload=function(){const i=e.result.split(",")[1];t("b"+i)},e.readAsDataURL(n)},ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<ku.length;n++)bn[ku.charCodeAt(n)]=n;const Bm=n=>{let t=n.length*.75,e=n.length,i,r=0,s,o,a,l;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(i=0;i<e;i+=4)s=bn[n.charCodeAt(i)],o=bn[n.charCodeAt(i+1)],a=bn[n.charCodeAt(i+2)],l=bn[n.charCodeAt(i+3)],c[r++]=s<<2|o>>4,c[r++]=(o&15)<<4|a>>2,c[r++]=(a&3)<<6|l&63;return u},Nm=typeof ArrayBuffer=="function",Jf=(n,t)=>{if(typeof n!="string")return{type:"message",data:Zf(n,t)};const e=n.charAt(0);return e==="b"?{type:"message",data:Fm(n.substring(1),t)}:Wi[e]?n.length>1?{type:Wi[e],data:n.substring(1)}:{type:Wi[e]}:Rm},Fm=(n,t)=>{if(Nm){const e=Bm(n);return Zf(e,t)}else return{base64:!0,data:n}},Zf=(n,t)=>{switch(t){case"blob":return n instanceof ArrayBuffer?new Blob([n]):n;case"arraybuffer":default:return n}},Qf="",qm=(n,t)=>{const e=n.length,i=new Array(e);let r=0;n.forEach((s,o)=>{Xf(s,!1,a=>{i[o]=a,++r===e&&t(i.join(Qf))})})},jm=(n,t)=>{const e=n.split(Qf),i=[];for(let r=0;r<e.length;r++){const s=Jf(e[r],t);if(i.push(s),s.type==="error")break}return i},td=4;function yt(n){if(n)return Hm(n)}function Hm(n){for(var t in yt.prototype)n[t]=yt.prototype[t];return n}yt.prototype.on=yt.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};yt.prototype.once=function(n,t){function e(){this.off(n,e),t.apply(this,arguments)}return e.fn=t,this.on(n,e),this};yt.prototype.off=yt.prototype.removeListener=yt.prototype.removeAllListeners=yt.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+n];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,r=0;r<e.length;r++)if(i=e[r],i===t||i.fn===t){e.splice(r,1);break}return e.length===0&&delete this._callbacks["$"+n],this};yt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+n],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(e){e=e.slice(0);for(var i=0,r=e.length;i<r;++i)e[i].apply(this,t)}return this};yt.prototype.emitReserved=yt.prototype.emit;yt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};yt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const ye=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ed(n,...t){return t.reduce((e,i)=>(n.hasOwnProperty(i)&&(e[i]=n[i]),e),{})}const zm=setTimeout,Vm=clearTimeout;function wr(n,t){t.useNativeTimers?(n.setTimeoutFn=zm.bind(ye),n.clearTimeoutFn=Vm.bind(ye)):(n.setTimeoutFn=setTimeout.bind(ye),n.clearTimeoutFn=clearTimeout.bind(ye))}const Wm=1.33;function Um(n){return typeof n=="string"?$m(n):Math.ceil((n.byteLength||n.size)*Wm)}function $m(n){let t=0,e=0;for(let i=0,r=n.length;i<r;i++)t=n.charCodeAt(i),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(i++,e+=4);return e}class Gm extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}}class nd extends yt{constructor(t){super(),this.writable=!1,wr(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e,i){return super.emitReserved("error",new Gm(t,e,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Jf(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const id="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),na=64,Ym={};let Cu=0,Ci=0,Mu;function Eu(n){let t="";do t=id[n%na]+t,n=Math.floor(n/na);while(n>0);return t}function rd(){const n=Eu(+new Date);return n!==Mu?(Cu=0,Mu=n):n+"."+Eu(Cu++)}for(;Ci<na;Ci++)Ym[id[Ci]]=Ci;function sd(n){let t="";for(let e in n)n.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return t}function Km(n){let t={},e=n.split("&");for(let i=0,r=e.length;i<r;i++){let s=e[i].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}let od=!1;try{od=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Xm=od;function ad(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Xm))return new XMLHttpRequest}catch{}if(!t)try{return new ye[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Jm(){}const Zm=function(){return new ad({xdomain:!1}).responseType!=null}();class Qm extends nd{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const i=location.protocol==="https:";let r=location.port;r||(r=i?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port,this.xs=t.secure!==i}const e=t&&t.forceBase64;this.supportsBinary=Zm&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||e()})),this.writable||(i++,this.once("drain",function(){--i||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};jm(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,qm(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=rd()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(e==="https"&&Number(this.opts.port)!==443||e==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const r=sd(t),s=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Qt(this.uri(),t)}doWrite(t,e){const i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(r,s)=>{this.onError("xhr post error",r,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,i)=>{this.onError("xhr poll error",e,i)}),this.pollXhr=t}}class Qt extends yt{constructor(t,e){super(),wr(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.create()}create(){const t=ed(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new ad(t);try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&e.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{e.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{e.readyState===4&&(e.status===200||e.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof e.status=="number"?e.status:0)},0))},e.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Qt.requestsCount++,Qt.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Jm,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Qt.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Qt.requestsCount=0;Qt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pu);else if(typeof addEventListener=="function"){const n="onpagehide"in ye?"pagehide":"unload";addEventListener(n,Pu,!1)}}function Pu(){for(let n in Qt.requests)Qt.requests.hasOwnProperty(n)&&Qt.requests[n].abort()}var t0={},Sr={};Sr.byteLength=i0;Sr.toByteArray=s0;Sr.fromByteArray=l0;var Zt=[],Ft=[],e0=typeof Uint8Array<"u"?Uint8Array:Array,fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ge=0,n0=fo.length;Ge<n0;++Ge)Zt[Ge]=fo[Ge],Ft[fo.charCodeAt(Ge)]=Ge;Ft[45]=62;Ft[95]=63;function ld(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var i=e===t?0:4-e%4;return[e,i]}function i0(n){var t=ld(n),e=t[0],i=t[1];return(e+i)*3/4-i}function r0(n,t,e){return(t+e)*3/4-e}function s0(n){var t,e=ld(n),i=e[0],r=e[1],s=new e0(r0(n,i,r)),o=0,a=r>0?i-4:i,l;for(l=0;l<a;l+=4)t=Ft[n.charCodeAt(l)]<<18|Ft[n.charCodeAt(l+1)]<<12|Ft[n.charCodeAt(l+2)]<<6|Ft[n.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return r===2&&(t=Ft[n.charCodeAt(l)]<<2|Ft[n.charCodeAt(l+1)]>>4,s[o++]=t&255),r===1&&(t=Ft[n.charCodeAt(l)]<<10|Ft[n.charCodeAt(l+1)]<<4|Ft[n.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function o0(n){return Zt[n>>18&63]+Zt[n>>12&63]+Zt[n>>6&63]+Zt[n&63]}function a0(n,t,e){for(var i,r=[],s=t;s<e;s+=3)i=(n[s]<<16&16711680)+(n[s+1]<<8&65280)+(n[s+2]&255),r.push(o0(i));return r.join("")}function l0(n){for(var t,e=n.length,i=e%3,r=[],s=16383,o=0,a=e-i;o<a;o+=s)r.push(a0(n,o,o+s>a?a:o+s));return i===1?(t=n[e-1],r.push(Zt[t>>2]+Zt[t<<4&63]+"==")):i===2&&(t=(n[e-2]<<8)+n[e-1],r.push(Zt[t>>10]+Zt[t>>4&63]+Zt[t<<2&63]+"=")),r.join("")}var Aa={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Aa.read=function(n,t,e,i,r){var s,o,a=r*8-i-1,l=(1<<a)-1,u=l>>1,c=-7,p=e?r-1:0,h=e?-1:1,d=n[t+p];for(p+=h,s=d&(1<<-c)-1,d>>=-c,c+=a;c>0;s=s*256+n[t+p],p+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=i;c>0;o=o*256+n[t+p],p+=h,c-=8);if(s===0)s=1-u;else{if(s===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-u}return(d?-1:1)*o*Math.pow(2,s-i)};Aa.write=function(n,t,e,i,r,s){var o,a,l,u=s*8-r-1,c=(1<<u)-1,p=c>>1,h=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,f=i?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+p>=1?t+=h/l:t+=h*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(a=0,o=c):o+p>=1?(a=(t*l-1)*Math.pow(2,r),o=o+p):(a=t*Math.pow(2,p-1)*Math.pow(2,r),o=0));r>=8;n[e+d]=a&255,d+=f,a/=256,r-=8);for(o=o<<r|a,u+=r;u>0;n[e+d]=o&255,d+=f,o/=256,u-=8);n[e+d-f]|=g*128};/*!
|
|
240
|
-
* The buffer module from node.js, for the browser.
|
|
241
|
-
*
|
|
242
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
243
|
-
* @license MIT
|
|
244
|
-
*/(function(n){const t=Sr,e=Aa,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=c,n.SlowBuffer=_,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;c.TYPED_ARRAY_SUPPORT=l(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const S=new s(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,s.prototype),Object.setPrototypeOf(S,m),S.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function u(S){if(S>r)throw new RangeError('The value "'+S+'" is invalid for option "size"');const m=new s(S);return Object.setPrototypeOf(m,c.prototype),m}function c(S,m,y){if(typeof S=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(S)}return p(S,m,y)}c.poolSize=8192;function p(S,m,y){if(typeof S=="string")return g(S,m);if(o.isView(S))return x(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(Kt(S,o)||S&&Kt(S.buffer,o)||typeof a<"u"&&(Kt(S,a)||S&&Kt(S.buffer,a)))return w(S,m,y);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const C=S.valueOf&&S.valueOf();if(C!=null&&C!==S)return c.from(C,m,y);const O=E(S);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return c.from(S[Symbol.toPrimitive]("string"),m,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}c.from=function(S,m,y){return p(S,m,y)},Object.setPrototypeOf(c.prototype,s.prototype),Object.setPrototypeOf(c,s);function h(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function d(S,m,y){return h(S),S<=0?u(S):m!==void 0?typeof y=="string"?u(S).fill(m,y):u(S).fill(m):u(S)}c.alloc=function(S,m,y){return d(S,m,y)};function f(S){return h(S),u(S<0?0:v(S)|0)}c.allocUnsafe=function(S){return f(S)},c.allocUnsafeSlow=function(S){return f(S)};function g(S,m){if((typeof m!="string"||m==="")&&(m="utf8"),!c.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const y=k(S,m)|0;let C=u(y);const O=C.write(S,m);return O!==y&&(C=C.slice(0,O)),C}function b(S){const m=S.length<0?0:v(S.length)|0,y=u(m);for(let C=0;C<m;C+=1)y[C]=S[C]&255;return y}function x(S){if(Kt(S,s)){const m=new s(S);return w(m.buffer,m.byteOffset,m.byteLength)}return b(S)}function w(S,m,y){if(m<0||S.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<m+(y||0))throw new RangeError('"length" is outside of buffer bounds');let C;return m===void 0&&y===void 0?C=new s(S):y===void 0?C=new s(S,m):C=new s(S,m,y),Object.setPrototypeOf(C,c.prototype),C}function E(S){if(c.isBuffer(S)){const m=v(S.length)|0,y=u(m);return y.length===0||S.copy(y,0,0,m),y}if(S.length!==void 0)return typeof S.length!="number"||Ir(S.length)?u(0):b(S);if(S.type==="Buffer"&&Array.isArray(S.data))return b(S.data)}function v(S){if(S>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return S|0}function _(S){return+S!=S&&(S=0),c.alloc(+S)}c.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==c.prototype},c.compare=function(m,y){if(Kt(m,s)&&(m=c.from(m,m.offset,m.byteLength)),Kt(y,s)&&(y=c.from(y,y.offset,y.byteLength)),!c.isBuffer(m)||!c.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===y)return 0;let C=m.length,O=y.length;for(let R=0,N=Math.min(C,O);R<N;++R)if(m[R]!==y[R]){C=m[R],O=y[R];break}return C<O?-1:O<C?1:0},c.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(m,y){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return c.alloc(0);let C;if(y===void 0)for(y=0,C=0;C<m.length;++C)y+=m[C].length;const O=c.allocUnsafe(y);let R=0;for(C=0;C<m.length;++C){let N=m[C];if(Kt(N,s))R+N.length>O.length?(c.isBuffer(N)||(N=c.from(N)),N.copy(O,R)):s.prototype.set.call(O,N,R);else if(c.isBuffer(N))N.copy(O,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=N.length}return O};function k(S,m){if(c.isBuffer(S))return S.length;if(o.isView(S)||Kt(S,o))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const y=S.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&y===0)return 0;let O=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return Tr(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return rl(S).length;default:if(O)return C?-1:Tr(S).length;m=(""+m).toLowerCase(),O=!0}}c.byteLength=k;function M(S,m,y){let C=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,m>>>=0,y<=m))return"";for(S||(S="utf8");;)switch(S){case"hex":return et(this,m,y);case"utf8":case"utf-8":return q(this,m,y);case"ascii":return W(this,m,y);case"latin1":case"binary":return Q(this,m,y);case"base64":return B(this,m,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,m,y);default:if(C)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),C=!0}}c.prototype._isBuffer=!0;function P(S,m,y){const C=S[m];S[m]=S[y],S[y]=C}c.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let y=0;y<m;y+=2)P(this,y,y+1);return this},c.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let y=0;y<m;y+=4)P(this,y,y+3),P(this,y+1,y+2);return this},c.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let y=0;y<m;y+=8)P(this,y,y+7),P(this,y+1,y+6),P(this,y+2,y+5),P(this,y+3,y+4);return this},c.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?q(this,0,m):M.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(m){if(!c.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:c.compare(this,m)===0},c.prototype.inspect=function(){let m="";const y=n.INSPECT_MAX_BYTES;return m=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(m+=" ... "),"<Buffer "+m+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(m,y,C,O,R){if(Kt(m,s)&&(m=c.from(m,m.offset,m.byteLength)),!c.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(y===void 0&&(y=0),C===void 0&&(C=m?m.length:0),O===void 0&&(O=0),R===void 0&&(R=this.length),y<0||C>m.length||O<0||R>this.length)throw new RangeError("out of range index");if(O>=R&&y>=C)return 0;if(O>=R)return-1;if(y>=C)return 1;if(y>>>=0,C>>>=0,O>>>=0,R>>>=0,this===m)return 0;let N=R-O,Y=C-y;const ft=Math.min(N,Y),lt=this.slice(O,R),dt=m.slice(y,C);for(let it=0;it<ft;++it)if(lt[it]!==dt[it]){N=lt[it],Y=dt[it];break}return N<Y?-1:Y<N?1:0};function T(S,m,y,C,O){if(S.length===0)return-1;if(typeof y=="string"?(C=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Ir(y)&&(y=O?0:S.length-1),y<0&&(y=S.length+y),y>=S.length){if(O)return-1;y=S.length-1}else if(y<0)if(O)y=0;else return-1;if(typeof m=="string"&&(m=c.from(m,C)),c.isBuffer(m))return m.length===0?-1:A(S,m,y,C,O);if(typeof m=="number")return m=m&255,typeof s.prototype.indexOf=="function"?O?s.prototype.indexOf.call(S,m,y):s.prototype.lastIndexOf.call(S,m,y):A(S,[m],y,C,O);throw new TypeError("val must be string, number or Buffer")}function A(S,m,y,C,O){let R=1,N=S.length,Y=m.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(S.length<2||m.length<2)return-1;R=2,N/=2,Y/=2,y/=2}function ft(dt,it){return R===1?dt[it]:dt.readUInt16BE(it*R)}let lt;if(O){let dt=-1;for(lt=y;lt<N;lt++)if(ft(S,lt)===ft(m,dt===-1?0:lt-dt)){if(dt===-1&&(dt=lt),lt-dt+1===Y)return dt*R}else dt!==-1&&(lt-=lt-dt),dt=-1}else for(y+Y>N&&(y=N-Y),lt=y;lt>=0;lt--){let dt=!0;for(let it=0;it<Y;it++)if(ft(S,lt+it)!==ft(m,it)){dt=!1;break}if(dt)return lt}return-1}c.prototype.includes=function(m,y,C){return this.indexOf(m,y,C)!==-1},c.prototype.indexOf=function(m,y,C){return T(this,m,y,C,!0)},c.prototype.lastIndexOf=function(m,y,C){return T(this,m,y,C,!1)};function L(S,m,y,C){y=Number(y)||0;const O=S.length-y;C?(C=Number(C),C>O&&(C=O)):C=O;const R=m.length;C>R/2&&(C=R/2);let N;for(N=0;N<C;++N){const Y=parseInt(m.substr(N*2,2),16);if(Ir(Y))return N;S[y+N]=Y}return N}function I(S,m,y,C){return Xn(Tr(m,S.length-y),S,y,C)}function j(S,m,y,C){return Xn(_p(m),S,y,C)}function F(S,m,y,C){return Xn(rl(m),S,y,C)}function D(S,m,y,C){return Xn(xp(m,S.length-y),S,y,C)}c.prototype.write=function(m,y,C,O){if(y===void 0)O="utf8",C=this.length,y=0;else if(C===void 0&&typeof y=="string")O=y,C=this.length,y=0;else if(isFinite(y))y=y>>>0,isFinite(C)?(C=C>>>0,O===void 0&&(O="utf8")):(O=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const R=this.length-y;if((C===void 0||C>R)&&(C=R),m.length>0&&(C<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");O||(O="utf8");let N=!1;for(;;)switch(O){case"hex":return L(this,m,y,C);case"utf8":case"utf-8":return I(this,m,y,C);case"ascii":case"latin1":case"binary":return j(this,m,y,C);case"base64":return F(this,m,y,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,m,y,C);default:if(N)throw new TypeError("Unknown encoding: "+O);O=(""+O).toLowerCase(),N=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(S,m,y){return m===0&&y===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(m,y))}function q(S,m,y){y=Math.min(S.length,y);const C=[];let O=m;for(;O<y;){const R=S[O];let N=null,Y=R>239?4:R>223?3:R>191?2:1;if(O+Y<=y){let ft,lt,dt,it;switch(Y){case 1:R<128&&(N=R);break;case 2:ft=S[O+1],(ft&192)===128&&(it=(R&31)<<6|ft&63,it>127&&(N=it));break;case 3:ft=S[O+1],lt=S[O+2],(ft&192)===128&&(lt&192)===128&&(it=(R&15)<<12|(ft&63)<<6|lt&63,it>2047&&(it<55296||it>57343)&&(N=it));break;case 4:ft=S[O+1],lt=S[O+2],dt=S[O+3],(ft&192)===128&&(lt&192)===128&&(dt&192)===128&&(it=(R&15)<<18|(ft&63)<<12|(lt&63)<<6|dt&63,it>65535&&it<1114112&&(N=it))}}N===null?(N=65533,Y=1):N>65535&&(N-=65536,C.push(N>>>10&1023|55296),N=56320|N&1023),C.push(N),O+=Y}return V(C)}const H=4096;function V(S){const m=S.length;if(m<=H)return String.fromCharCode.apply(String,S);let y="",C=0;for(;C<m;)y+=String.fromCharCode.apply(String,S.slice(C,C+=H));return y}function W(S,m,y){let C="";y=Math.min(S.length,y);for(let O=m;O<y;++O)C+=String.fromCharCode(S[O]&127);return C}function Q(S,m,y){let C="";y=Math.min(S.length,y);for(let O=m;O<y;++O)C+=String.fromCharCode(S[O]);return C}function et(S,m,y){const C=S.length;(!m||m<0)&&(m=0),(!y||y<0||y>C)&&(y=C);let O="";for(let R=m;R<y;++R)O+=wp[S[R]];return O}function rt(S,m,y){const C=S.slice(m,y);let O="";for(let R=0;R<C.length-1;R+=2)O+=String.fromCharCode(C[R]+C[R+1]*256);return O}c.prototype.slice=function(m,y){const C=this.length;m=~~m,y=y===void 0?C:~~y,m<0?(m+=C,m<0&&(m=0)):m>C&&(m=C),y<0?(y+=C,y<0&&(y=0)):y>C&&(y=C),y<m&&(y=m);const O=this.subarray(m,y);return Object.setPrototypeOf(O,c.prototype),O};function U(S,m,y){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+m>y)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(m,y,C){m=m>>>0,y=y>>>0,C||U(m,y,this.length);let O=this[m],R=1,N=0;for(;++N<y&&(R*=256);)O+=this[m+N]*R;return O},c.prototype.readUintBE=c.prototype.readUIntBE=function(m,y,C){m=m>>>0,y=y>>>0,C||U(m,y,this.length);let O=this[m+--y],R=1;for(;y>0&&(R*=256);)O+=this[m+--y]*R;return O},c.prototype.readUint8=c.prototype.readUInt8=function(m,y){return m=m>>>0,y||U(m,1,this.length),this[m]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(m,y){return m=m>>>0,y||U(m,2,this.length),this[m]|this[m+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(m,y){return m=m>>>0,y||U(m,2,this.length),this[m]<<8|this[m+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(m,y){return m=m>>>0,y||U(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(m,y){return m=m>>>0,y||U(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},c.prototype.readBigUInt64LE=ge(function(m){m=m>>>0,ze(m,"offset");const y=this[m],C=this[m+7];(y===void 0||C===void 0)&&ln(m,this.length-8);const O=y+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,R=this[++m]+this[++m]*2**8+this[++m]*2**16+C*2**24;return BigInt(O)+(BigInt(R)<<BigInt(32))}),c.prototype.readBigUInt64BE=ge(function(m){m=m>>>0,ze(m,"offset");const y=this[m],C=this[m+7];(y===void 0||C===void 0)&&ln(m,this.length-8);const O=y*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],R=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+C;return(BigInt(O)<<BigInt(32))+BigInt(R)}),c.prototype.readIntLE=function(m,y,C){m=m>>>0,y=y>>>0,C||U(m,y,this.length);let O=this[m],R=1,N=0;for(;++N<y&&(R*=256);)O+=this[m+N]*R;return R*=128,O>=R&&(O-=Math.pow(2,8*y)),O},c.prototype.readIntBE=function(m,y,C){m=m>>>0,y=y>>>0,C||U(m,y,this.length);let O=y,R=1,N=this[m+--O];for(;O>0&&(R*=256);)N+=this[m+--O]*R;return R*=128,N>=R&&(N-=Math.pow(2,8*y)),N},c.prototype.readInt8=function(m,y){return m=m>>>0,y||U(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},c.prototype.readInt16LE=function(m,y){m=m>>>0,y||U(m,2,this.length);const C=this[m]|this[m+1]<<8;return C&32768?C|4294901760:C},c.prototype.readInt16BE=function(m,y){m=m>>>0,y||U(m,2,this.length);const C=this[m+1]|this[m]<<8;return C&32768?C|4294901760:C},c.prototype.readInt32LE=function(m,y){return m=m>>>0,y||U(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},c.prototype.readInt32BE=function(m,y){return m=m>>>0,y||U(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},c.prototype.readBigInt64LE=ge(function(m){m=m>>>0,ze(m,"offset");const y=this[m],C=this[m+7];(y===void 0||C===void 0)&&ln(m,this.length-8);const O=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(C<<24);return(BigInt(O)<<BigInt(32))+BigInt(y+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),c.prototype.readBigInt64BE=ge(function(m){m=m>>>0,ze(m,"offset");const y=this[m],C=this[m+7];(y===void 0||C===void 0)&&ln(m,this.length-8);const O=(y<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(O)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+C)}),c.prototype.readFloatLE=function(m,y){return m=m>>>0,y||U(m,4,this.length),e.read(this,m,!0,23,4)},c.prototype.readFloatBE=function(m,y){return m=m>>>0,y||U(m,4,this.length),e.read(this,m,!1,23,4)},c.prototype.readDoubleLE=function(m,y){return m=m>>>0,y||U(m,8,this.length),e.read(this,m,!0,52,8)},c.prototype.readDoubleBE=function(m,y){return m=m>>>0,y||U(m,8,this.length),e.read(this,m,!1,52,8)};function tt(S,m,y,C,O,R){if(!c.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>O||m<R)throw new RangeError('"value" argument is out of bounds');if(y+C>S.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(m,y,C,O){if(m=+m,y=y>>>0,C=C>>>0,!O){const Y=Math.pow(2,8*C)-1;tt(this,m,y,C,Y,0)}let R=1,N=0;for(this[y]=m&255;++N<C&&(R*=256);)this[y+N]=m/R&255;return y+C},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(m,y,C,O){if(m=+m,y=y>>>0,C=C>>>0,!O){const Y=Math.pow(2,8*C)-1;tt(this,m,y,C,Y,0)}let R=C-1,N=1;for(this[y+R]=m&255;--R>=0&&(N*=256);)this[y+R]=m/N&255;return y+C},c.prototype.writeUint8=c.prototype.writeUInt8=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,1,255,0),this[y]=m&255,y+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,2,65535,0),this[y]=m&255,this[y+1]=m>>>8,y+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,2,65535,0),this[y]=m>>>8,this[y+1]=m&255,y+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,4,4294967295,0),this[y+3]=m>>>24,this[y+2]=m>>>16,this[y+1]=m>>>8,this[y]=m&255,y+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,4,4294967295,0),this[y]=m>>>24,this[y+1]=m>>>16,this[y+2]=m>>>8,this[y+3]=m&255,y+4};function wt(S,m,y,C,O){il(m,C,O,S,y,7);let R=Number(m&BigInt(4294967295));S[y++]=R,R=R>>8,S[y++]=R,R=R>>8,S[y++]=R,R=R>>8,S[y++]=R;let N=Number(m>>BigInt(32)&BigInt(4294967295));return S[y++]=N,N=N>>8,S[y++]=N,N=N>>8,S[y++]=N,N=N>>8,S[y++]=N,y}function Gt(S,m,y,C,O){il(m,C,O,S,y,7);let R=Number(m&BigInt(4294967295));S[y+7]=R,R=R>>8,S[y+6]=R,R=R>>8,S[y+5]=R,R=R>>8,S[y+4]=R;let N=Number(m>>BigInt(32)&BigInt(4294967295));return S[y+3]=N,N=N>>8,S[y+2]=N,N=N>>8,S[y+1]=N,N=N>>8,S[y]=N,y+8}c.prototype.writeBigUInt64LE=ge(function(m,y=0){return wt(this,m,y,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ge(function(m,y=0){return Gt(this,m,y,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(m,y,C,O){if(m=+m,y=y>>>0,!O){const ft=Math.pow(2,8*C-1);tt(this,m,y,C,ft-1,-ft)}let R=0,N=1,Y=0;for(this[y]=m&255;++R<C&&(N*=256);)m<0&&Y===0&&this[y+R-1]!==0&&(Y=1),this[y+R]=(m/N>>0)-Y&255;return y+C},c.prototype.writeIntBE=function(m,y,C,O){if(m=+m,y=y>>>0,!O){const ft=Math.pow(2,8*C-1);tt(this,m,y,C,ft-1,-ft)}let R=C-1,N=1,Y=0;for(this[y+R]=m&255;--R>=0&&(N*=256);)m<0&&Y===0&&this[y+R+1]!==0&&(Y=1),this[y+R]=(m/N>>0)-Y&255;return y+C},c.prototype.writeInt8=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,1,127,-128),m<0&&(m=255+m+1),this[y]=m&255,y+1},c.prototype.writeInt16LE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,2,32767,-32768),this[y]=m&255,this[y+1]=m>>>8,y+2},c.prototype.writeInt16BE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,2,32767,-32768),this[y]=m>>>8,this[y+1]=m&255,y+2},c.prototype.writeInt32LE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,4,2147483647,-2147483648),this[y]=m&255,this[y+1]=m>>>8,this[y+2]=m>>>16,this[y+3]=m>>>24,y+4},c.prototype.writeInt32BE=function(m,y,C){return m=+m,y=y>>>0,C||tt(this,m,y,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[y]=m>>>24,this[y+1]=m>>>16,this[y+2]=m>>>8,this[y+3]=m&255,y+4},c.prototype.writeBigInt64LE=ge(function(m,y=0){return wt(this,m,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ge(function(m,y=0){return Gt(this,m,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pe(S,m,y,C,O,R){if(y+C>S.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function Yt(S,m,y,C,O){return m=+m,y=y>>>0,O||pe(S,m,y,4),e.write(S,m,y,C,23,4),y+4}c.prototype.writeFloatLE=function(m,y,C){return Yt(this,m,y,!0,C)},c.prototype.writeFloatBE=function(m,y,C){return Yt(this,m,y,!1,C)};function St(S,m,y,C,O){return m=+m,y=y>>>0,O||pe(S,m,y,8),e.write(S,m,y,C,52,8),y+8}c.prototype.writeDoubleLE=function(m,y,C){return St(this,m,y,!0,C)},c.prototype.writeDoubleBE=function(m,y,C){return St(this,m,y,!1,C)},c.prototype.copy=function(m,y,C,O){if(!c.isBuffer(m))throw new TypeError("argument should be a Buffer");if(C||(C=0),!O&&O!==0&&(O=this.length),y>=m.length&&(y=m.length),y||(y=0),O>0&&O<C&&(O=C),O===C||m.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("sourceEnd out of bounds");O>this.length&&(O=this.length),m.length-y<O-C&&(O=m.length-y+C);const R=O-C;return this===m&&typeof s.prototype.copyWithin=="function"?this.copyWithin(y,C,O):s.prototype.set.call(m,this.subarray(C,O),y),R},c.prototype.fill=function(m,y,C,O){if(typeof m=="string"){if(typeof y=="string"?(O=y,y=0,C=this.length):typeof C=="string"&&(O=C,C=this.length),O!==void 0&&typeof O!="string")throw new TypeError("encoding must be a string");if(typeof O=="string"&&!c.isEncoding(O))throw new TypeError("Unknown encoding: "+O);if(m.length===1){const N=m.charCodeAt(0);(O==="utf8"&&N<128||O==="latin1")&&(m=N)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(y<0||this.length<y||this.length<C)throw new RangeError("Out of range index");if(C<=y)return this;y=y>>>0,C=C===void 0?this.length:C>>>0,m||(m=0);let R;if(typeof m=="number")for(R=y;R<C;++R)this[R]=m;else{const N=c.isBuffer(m)?m:c.from(m,O),Y=N.length;if(Y===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(R=0;R<C-y;++R)this[R+y]=N[R%Y]}return this};const Et={};function ne(S,m,y){Et[S]=class extends y{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(O){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:O,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}ne("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ne("ERR_INVALID_ARG_TYPE",function(S,m){return`The "${S}" argument must be of type number. Received type ${typeof m}`},TypeError),ne("ERR_OUT_OF_RANGE",function(S,m,y){let C=`The value of "${S}" is out of range.`,O=y;return Number.isInteger(y)&&Math.abs(y)>2**32?O=Me(String(y)):typeof y=="bigint"&&(O=String(y),(y>BigInt(2)**BigInt(32)||y<-(BigInt(2)**BigInt(32)))&&(O=Me(O)),O+="n"),C+=` It must be ${m}. Received ${O}`,C},RangeError);function Me(S){let m="",y=S.length;const C=S[0]==="-"?1:0;for(;y>=C+4;y-=3)m=`_${S.slice(y-3,y)}${m}`;return`${S.slice(0,y)}${m}`}function yp(S,m,y){ze(m,"offset"),(S[m]===void 0||S[m+y]===void 0)&&ln(m,S.length-(y+1))}function il(S,m,y,C,O,R){if(S>y||S<m){const N=typeof m=="bigint"?"n":"";let Y;throw m===0||m===BigInt(0)?Y=`>= 0${N} and < 2${N} ** ${(R+1)*8}${N}`:Y=`>= -(2${N} ** ${(R+1)*8-1}${N}) and < 2 ** ${(R+1)*8-1}${N}`,new Et.ERR_OUT_OF_RANGE("value",Y,S)}yp(C,O,R)}function ze(S,m){if(typeof S!="number")throw new Et.ERR_INVALID_ARG_TYPE(m,"number",S)}function ln(S,m,y){throw Math.floor(S)!==S?(ze(S,y),new Et.ERR_OUT_OF_RANGE("offset","an integer",S)):m<0?new Et.ERR_BUFFER_OUT_OF_BOUNDS:new Et.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,S)}const bp=/[^+/0-9A-Za-z-_]/g;function vp(S){if(S=S.split("=")[0],S=S.trim().replace(bp,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Tr(S,m){m=m||1/0;let y;const C=S.length;let O=null;const R=[];for(let N=0;N<C;++N){if(y=S.charCodeAt(N),y>55295&&y<57344){if(!O){if(y>56319){(m-=3)>-1&&R.push(239,191,189);continue}else if(N+1===C){(m-=3)>-1&&R.push(239,191,189);continue}O=y;continue}if(y<56320){(m-=3)>-1&&R.push(239,191,189),O=y;continue}y=(O-55296<<10|y-56320)+65536}else O&&(m-=3)>-1&&R.push(239,191,189);if(O=null,y<128){if((m-=1)<0)break;R.push(y)}else if(y<2048){if((m-=2)<0)break;R.push(y>>6|192,y&63|128)}else if(y<65536){if((m-=3)<0)break;R.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((m-=4)<0)break;R.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return R}function _p(S){const m=[];for(let y=0;y<S.length;++y)m.push(S.charCodeAt(y)&255);return m}function xp(S,m){let y,C,O;const R=[];for(let N=0;N<S.length&&!((m-=2)<0);++N)y=S.charCodeAt(N),C=y>>8,O=y%256,R.push(O),R.push(C);return R}function rl(S){return t.toByteArray(vp(S))}function Xn(S,m,y,C){let O;for(O=0;O<C&&!(O+y>=m.length||O>=S.length);++O)m[O+y]=S[O];return O}function Kt(S,m){return S instanceof m||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===m.name}function Ir(S){return S!==S}const wp=function(){const S="0123456789abcdef",m=new Array(256);for(let y=0;y<16;++y){const C=y*16;for(let O=0;O<16;++O)m[C+O]=S[y]+S[O]}return m}();function ge(S){return typeof BigInt>"u"?Sp:S}function Sp(){throw new Error("BigInt not supported")}})(t0);const cd=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Mi=ye.WebSocket||ye.MozWebSocket,Ou=!0,c0="arraybuffer",Au=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class u0 extends nd{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,i=Au?{}:ed(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=Ou&&!Au?e?new Mi(t,e):new Mi(t):new Mi(t,e,i)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType||c0,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const i=t[e],r=e===t.length-1;Xf(i,this.supportsBinary,s=>{const o={};try{Ou&&this.ws.send(s)}catch{}r&&cd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(e==="wss"&&Number(this.opts.port)!==443||e==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=rd()),this.supportsBinary||(t.b64=1);const r=sd(t),s=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(r.length?"?"+r:"")}check(){return!!Mi}}const h0={websocket:u0,polling:Qm},f0=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,d0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ia(n){const t=n,e=n.indexOf("["),i=n.indexOf("]");e!=-1&&i!=-1&&(n=n.substring(0,e)+n.substring(e,i).replace(/:/g,";")+n.substring(i,n.length));let r=f0.exec(n||""),s={},o=14;for(;o--;)s[d0[o]]=r[o]||"";return e!=-1&&i!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=p0(s,s.path),s.queryKey=g0(s,s.query),s}function p0(n,t){const e=/\/{2,9}/g,i=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function g0(n,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,s){r&&(e[r]=s)}),e}let ud=class Je extends yt{constructor(t,e={}){super(),t&&typeof t=="object"&&(e=t,t=null),t?(t=ia(t),e.hostname=t.host,e.secure=t.protocol==="https"||t.protocol==="wss",e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=ia(e.host).host),wr(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Km(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=td,e.transport=t,this.id&&(e.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new h0[t](i)}open(){let t;if(this.opts.rememberUpgrade&&Je.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",e=>this.onClose("transport close",e))}probe(t){let e=this.createTransport(t),i=!1;Je.priorWebsocketSuccess=!1;const r=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",p=>{if(!i)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Je.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=e.name,this.emitReserved("upgradeError",h)}}))};function s(){i||(i=!0,c(),e.close(),e=null)}const o=p=>{const h=new Error("probe error: "+p);h.transport=e.name,s(),this.emitReserved("upgradeError",h)};function a(){o("transport closed")}function l(){o("socket closed")}function u(p){e&&p.name!==e.name&&s()}const c=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};e.once("open",r),e.once("error",o),e.once("close",a),this.once("close",l),this.once("upgrading",u),e.open()}onOpen(){if(this.readyState="open",Je.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let i=0;i<this.writeBuffer.length;i++){const r=this.writeBuffer[i].data;if(r&&(e+=Um(r)),i>0&&e>this.maxPayload)return this.writeBuffer.slice(0,i);e+=2}return this.writeBuffer}write(t,e,i){return this.sendPacket("message",t,e,i),this}send(t,e,i){return this.sendPacket("message",t,e,i),this}sendPacket(t,e,i,r){if(typeof e=="function"&&(r=e,e=void 0),typeof i=="function"&&(r=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const s={type:t,data:e,options:i};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},i=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){Je.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let i=0;const r=t.length;for(;i<r;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}};ud.protocol=td;function m0(n,t="",e){let i=n;e=e||typeof location<"u"&&location,n==null&&(n=e.protocol+"//"+e.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=e.protocol+n:n=e.host+n),/^(https?|wss?):\/\//.test(n)||(typeof e<"u"?n=e.protocol+"//"+n:n="https://"+n),i=ia(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const s=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port+t,i.href=i.protocol+"://"+s+(e&&e.port===i.port?"":":"+i.port),i}const y0=typeof ArrayBuffer=="function",b0=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,hd=Object.prototype.toString,v0=typeof Blob=="function"||typeof Blob<"u"&&hd.call(Blob)==="[object BlobConstructor]",_0=typeof File=="function"||typeof File<"u"&&hd.call(File)==="[object FileConstructor]";function La(n){return y0&&(n instanceof ArrayBuffer||b0(n))||v0&&n instanceof Blob||_0&&n instanceof File}function Ui(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;e++)if(Ui(n[e]))return!0;return!1}if(La(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Ui(n.toJSON(),!0);for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&Ui(n[e]))return!0;return!1}function x0(n){const t=[],e=n.data,i=n;return i.data=ra(e,t),i.attachments=t.length,{packet:i,buffers:t}}function ra(n,t){if(!n)return n;if(La(n)){const e={_placeholder:!0,num:t.length};return t.push(n),e}else if(Array.isArray(n)){const e=new Array(n.length);for(let i=0;i<n.length;i++)e[i]=ra(n[i],t);return e}else if(typeof n=="object"&&!(n instanceof Date)){const e={};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=ra(n[i],t));return e}return n}function w0(n,t){return n.data=sa(n.data,t),n.attachments=void 0,n}function sa(n,t){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<t.length)return t[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let e=0;e<n.length;e++)n[e]=sa(n[e],t);else if(typeof n=="object")for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=sa(n[e],t));return n}const S0=5;var Z;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Z||(Z={}));class k0{constructor(t){this.replacer=t}encode(t){return(t.type===Z.EVENT||t.type===Z.ACK)&&Ui(t)?(t.type=t.type===Z.EVENT?Z.BINARY_EVENT:Z.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===Z.BINARY_EVENT||t.type===Z.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=x0(t),i=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(i),r}}class Ra extends yt{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t),e.type===Z.BINARY_EVENT||e.type===Z.BINARY_ACK?(this.reconstructor=new C0(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(La(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0;const i={type:Number(t.charAt(0))};if(Z[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===Z.BINARY_EVENT||i.type===Z.BINARY_ACK){const s=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);const o=t.substring(s,e);if(o!=Number(o)||t.charAt(e)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(e+1)==="/"){const s=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););i.nsp=t.substring(s,e)}else i.nsp="/";const r=t.charAt(e+1);if(r!==""&&Number(r)==r){const s=e+1;for(;++e;){const o=t.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===t.length)break}i.id=Number(t.substring(s,e+1))}if(t.charAt(++e)){const s=this.tryParse(t.substr(e));if(Ra.isPayloadValid(i.type,s))i.data=s;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case Z.CONNECT:return typeof e=="object";case Z.DISCONNECT:return e===void 0;case Z.CONNECT_ERROR:return typeof e=="string"||typeof e=="object";case Z.EVENT:case Z.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case Z.ACK:case Z.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class C0{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const e=w0(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const M0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ra,Encoder:k0,get PacketType(){return Z},protocol:S0},Symbol.toStringTag,{value:"Module"}));function Ht(n,t,e){return n.on(t,e),function(){n.off(t,e)}}const E0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class fd extends yt{constructor(t,e,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ht(t,"open",this.onopen.bind(this)),Ht(t,"packet",this.onpacket.bind(this)),Ht(t,"error",this.onerror.bind(this)),Ht(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(E0.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');e.unshift(t);const i={type:Z.EVENT,data:e};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const o=this.ids++,a=e.pop();this._registerAckCallback(o,a),i.id=o}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,e){const i=this.flags.timeout;if(i===void 0){this.acks[t]=e;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);e.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...s)=>{this.io.clearTimeoutFn(r),e.apply(this,[null,...s])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:Z.CONNECT,data:t})}):this.packet({type:Z.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Z.CONNECT:if(t.data&&t.data.sid){const r=t.data.sid;this.onconnect(r)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Z.EVENT:case Z.BINARY_EVENT:this.onevent(t);break;case Z.ACK:case Z.BINARY_ACK:this.onack(t);break;case Z.DISCONNECT:this.ondisconnect();break;case Z.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const i of e)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let i=!1;return function(...r){i||(i=!0,e.packet({type:Z.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const i of e)i.apply(this,t.data)}}}function an(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}an.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-e:n+e}return Math.min(n,this.max)|0};an.prototype.reset=function(){this.attempts=0};an.prototype.setMin=function(n){this.ms=n};an.prototype.setMax=function(n){this.max=n};an.prototype.setJitter=function(n){this.jitter=n};class oa extends yt{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,wr(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new an({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||M0;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ud(this.uri,this.opts);const e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const r=Ht(e,"open",function(){i.onopen(),t&&t()}),s=Ht(e,"error",o=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",o),t?t(o):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&r();const a=this.setTimeoutFn(()=>{r(),e.close(),e.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ht(t,"ping",this.onping.bind(this)),Ht(t,"data",this.ondata.bind(this)),Ht(t,"error",this.onerror.bind(this)),Ht(t,"close",this.onclose.bind(this)),Ht(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){cd(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i||(i=new fd(this,t,e),this.nsps[t]=i),i}_destroy(t){const e=Object.keys(this.nsps);for(const i of e)if(this.nsps[i].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fn={};function $i(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const e=m0(n,t.path||"/socket.io"),i=e.source,r=e.id,s=e.path,o=fn[r]&&s in fn[r].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new oa(i,t):(fn[r]||(fn[r]=new oa(i,t)),l=fn[r]),e.query&&!t.query&&(t.query=e.queryKey),l.socket(e.path,t)}Object.assign($i,{Manager:oa,Socket:fd,io:$i,connect:$i});class P0{constructor(){var t,e;this.config=Vt({history:{limit:100}}),this.instances={io:$i(((t=window.DEV)==null?void 0:t.io.origin)??location.origin,{path:((e=window.DEV)==null?void 0:e.io.path)??`${location.pathname.split("/").slice(0,-3).join("/")}/socket.io/`})},this.services={io:{exec:(i,r)=>new Promise(s=>this.instances.io.emit(i,r,s)),subscribe:(i,r)=>this.instances.io.on(i,r)}},this.storage=xr.build("void",document.body),this.shared={},this.events=new Vn}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}assignConfig(t){return Object.assign(this,{config:t})}share(t){return Object.assign(this,{shared:t})}switchStorage(t){return Object.assign(this,{storage:t})}}const G=new P0,O0=xt.compile(Mm);class kr extends pt{constructor(t){var e;super(O0({})),this.options=t,this.instance=new Lm({},((e=this.options)==null?void 0:e.depth)??3,{theme:"custom",afterCopyHandler:()=>G.shared.popups.push("Copied!")}),this.provide({})}provide(t){return this.instance.json=t,this.clear().append(this.instance.render())}static build(t){return new kr(t)}}const A0=xt.compile(im);class En extends pt{constructor(t){super(),this.data=t,this.viewer=kr.build({depth:3}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){return this.replace(A0(this.data)).append(this.viewer),this.viewer.provide(Cm(this.data,["id","type","transports","schema"])),sn.build(this.element.querySelector("button.activity")).handle(()=>G.services.io.exec("expectations:update",{id:this.data.id,set:{isEnabled:!this.data.isEnabled}})),this.element.querySelector("div.meta").addEventListener("click",t=>t.composedPath().some(e=>{var i;return(i=e==null?void 0:e.classList)==null?void 0:i.contains("meta")})&&t.target.nodeName!=="BUTTON"?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var e,i;return[this.data.group,this.data.name,(e=this.data.schema.forward)==null?void 0:e.baseUrl,(i=this.data.schema.forward)==null?void 0:i.url,this.data.meta.tags.map(({value:r})=>r).join()].some(r=>r==null?void 0:r.includes(t))}static build(t){return new En(t)}}const L0=`
|
|
245
|
-
<div class="container history" id="{{id}}">
|
|
246
|
-
<div class="meta">
|
|
247
|
-
<div class="segment">
|
|
248
|
-
<span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
|
|
249
|
-
|
|
250
|
-
{{#if snapshot.error}}
|
|
251
|
-
<span class="error">
|
|
252
|
-
{{#compare snapshot.error.code.length 'lte' 24}}{{snapshot.error.code}}{{/compare}}
|
|
253
|
-
{{#compare snapshot.error.code.length 'gt' 24}}Error{{/compare}}
|
|
254
|
-
</span>
|
|
255
|
-
{{/if}}
|
|
256
|
-
|
|
257
|
-
{{#compare status 'eq' 'pending'}}
|
|
258
|
-
<span class="pending"><i class="fas fa-hourglass-start"></i></span>
|
|
259
|
-
{{/compare}}
|
|
260
|
-
|
|
261
|
-
{{#compare status 'eq' 'completed'}}
|
|
262
|
-
<span class="status
|
|
263
|
-
{{#compare snapshot.transport 'eq' 'http'}}
|
|
264
|
-
{{#compare snapshot.outgoing.status 'lt' 400}}green{{/compare}}
|
|
265
|
-
{{#compare snapshot.outgoing.status 'gte' 400}}red{{/compare}}
|
|
266
|
-
{{/compare}}
|
|
267
|
-
"><b>{{snapshot.outgoing.status}}</b> {{toSeconds duration}}s</span>
|
|
268
|
-
{{/compare}}
|
|
269
|
-
|
|
270
|
-
<span class="method" style="color: {{toColor snapshot.incoming.method}};">{{snapshot.incoming.method}}</span>
|
|
271
|
-
<span class="path">{{> truncated value=snapshot.incoming.path length=45}}</span>
|
|
272
|
-
|
|
273
|
-
{{#if snapshot.seed}}<span class="seed">{{snapshot.seed}}</span>{{/if}}
|
|
274
|
-
</div>
|
|
275
|
-
|
|
276
|
-
<span class="arrow"><i class="fas fa-chevron-right"></i></span>
|
|
277
|
-
|
|
278
|
-
{{#if expectation}}
|
|
279
|
-
{{>expectationMeta expectation format='short' isCached=snapshot.forwarded.isCached}}
|
|
280
|
-
{{else}}
|
|
281
|
-
<div class="segment"><span class="handled-with red">Nowhere</span></div>
|
|
282
|
-
{{/if}}
|
|
283
|
-
</div>
|
|
284
|
-
|
|
285
|
-
{{!-- {{#if snapshot.messages}}
|
|
286
|
-
<p class="messages-title">
|
|
287
|
-
<span class="count">Total messages <b>{{snapshot.messages.length}}</b></span>
|
|
288
|
-
</p>
|
|
289
|
-
|
|
290
|
-
<div class="messages">
|
|
291
|
-
{{#each snapshot.messages}}
|
|
292
|
-
<div id="{{id}}" class="message {{location}}">
|
|
293
|
-
<p class="header">
|
|
294
|
-
{{#compare location 'eq' 'incoming'}}<i class="fas fa-angle-right"></i>{{/compare}}
|
|
295
|
-
{{#compare location 'eq' 'outgoing'}}<i class="fas fa-angle-left"></i>{{/compare}}
|
|
296
|
-
<span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
|
|
297
|
-
</p>
|
|
298
|
-
|
|
299
|
-
<pre class="panel hidden"></pre>
|
|
300
|
-
</div>
|
|
301
|
-
{{/each}}
|
|
302
|
-
</div>
|
|
303
|
-
{{/if}} --}}
|
|
304
|
-
</div>
|
|
305
|
-
`,R0=xt.compile(L0);class Pn extends pt{constructor(t){super(),this.data=t,this.viewer=kr.build({depth:2}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){var t,e;return this.replace(R0(this.data)).append(this.viewer),this.viewer.provide({event:this.data.snapshot.event,transport:this.data.snapshot.transport,...Object.keys(this.data.snapshot.flags).length&&{flags:this.data.snapshot.flags},...this.data.expectation&&{expectation:{id:this.data.expectation.id,group:this.data.expectation.group,...this.data.expectation.schema.forward&&{forward:this.data.expectation.schema.forward}}},...((t=this.data.snapshot.cache)==null?void 0:t.isEnabled)&&{cache:this.data.snapshot.cache},...this.data.snapshot.seed&&{seed:this.data.snapshot.seed},...this.data.snapshot.container&&{container:this.data.snapshot.container},incoming:this.data.snapshot.incoming,...this.data.snapshot.error&&{error:this.data.snapshot.error},...this.data.status==="completed"&&{outgoing:this.data.snapshot.outgoing},...this.data.snapshot.forwarded&&{forwarded:this.data.snapshot.forwarded},...((e=this.data.snapshot.messages)==null?void 0:e.length)&&{messages:this.data.snapshot.messages}}),this.element.querySelector("div.meta").addEventListener("click",i=>i.composedPath().some(r=>{var s;return(s=r==null?void 0:r.classList)==null?void 0:s.contains("meta")})?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var i;return[this.data.group,(i=this.data.expectation)==null?void 0:i.name,this.data.snapshot.incoming.path,this.data.snapshot.incoming.method,this.data.snapshot.incoming.dataRaw,this.data.snapshot.incoming.error,String(this.data.snapshot.outgoing.status),String(this.data.snapshot.seed??""),this.data.snapshot.outgoing.dataRaw].some(r=>r==null?void 0:r.includes(t))||[this.data.snapshot.incoming.query,this.data.snapshot.incoming.headers,this.data.snapshot.outgoing.headers,this.data.snapshot.container,this.data.snapshot.state,this.data.snapshot.cache].some(r=>{var s;return(s=JSON.stringify(r))==null?void 0:s.includes(t)})}static build(t){return new Pn(t)}}class Ta extends pt{constructor(t={}){super('<div class="curtain hidden"></div>'),this.options=t,t.isPreventedToManualClose||this.element.addEventListener("click",e=>e.target===this.element?this.hide():null)}static build(t){return new Ta(t)}}class Ia extends Ta{constructor(){super({isPreventedToManualClose:!0}),this.append('<div><p>Ping pong</p><div class="loader"></div></div>').assignId("loader")}static build(){return new Ia}}const T0=`
|
|
306
|
-
<div class="popup-message {{level}}">
|
|
307
|
-
{{#compare level 'eq' 'info'}}<i class="fas fa-check"></i>{{/compare}}
|
|
308
|
-
{{#compare level 'eq' 'warning'}}<i class="fas fa-exclamation-triangle"></i>{{/compare}}
|
|
309
|
-
{{#compare level 'eq' 'error'}}<i class="fas fa-times"></i>{{/compare}}
|
|
310
|
-
|
|
311
|
-
<span>{{{message}}}</span>
|
|
312
|
-
</div>
|
|
313
|
-
`,I0=xt.compile(T0);class Da extends pt{constructor(){super(),this.element.classList.add("popups")}push(t,e={}){const i=this.compileHtmlStringToElement(I0({message:t,level:e.level??"info"}));this.element.prepend(i),setTimeout(()=>i.remove(),3e3)}static build(){return new Da}}const D0=`
|
|
314
|
-
<div class="search">
|
|
315
|
-
<i class="fas fa-search"></i>
|
|
316
|
-
<div class="input" title="{{title}}"><input data-key="search" type="text"></div>
|
|
317
|
-
<button><i class="far fa-times-circle"></i></button>
|
|
318
|
-
</div>
|
|
319
|
-
`;var po,Lu;function B0(){if(Lu)return po;Lu=1;var n=hr(),t=function(){return n.Date.now()};return po=t,po}var go,Ru;function N0(){if(Ru)return go;Ru=1;var n=/\s/;function t(e){for(var i=e.length;i--&&n.test(e.charAt(i)););return i}return go=t,go}var mo,Tu;function F0(){if(Tu)return mo;Tu=1;var n=N0(),t=/^\s+/;function e(i){return i&&i.slice(0,n(i)+1).replace(t,"")}return mo=e,mo}var yo,Iu;function Ba(){if(Iu)return yo;Iu=1;var n=F0(),t=je(),e=gr(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(e(u))return i;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=n(u);var p=s.test(u);return p||o.test(u)?a(u.slice(2),p?2:8):r.test(u)?i:+u}return yo=l,yo}var bo,Du;function q0(){if(Du)return bo;Du=1;var n=je(),t=B0(),e=Ba(),i="Expected a function",r=Math.max,s=Math.min;function o(a,l,u){var c,p,h,d,f,g,b=0,x=!1,w=!1,E=!0;if(typeof a!="function")throw new TypeError(i);l=e(l)||0,n(u)&&(x=!!u.leading,w="maxWait"in u,h=w?r(e(u.maxWait)||0,l):h,E="trailing"in u?!!u.trailing:E);function v(j){var F=c,D=p;return c=p=void 0,b=j,d=a.apply(D,F),d}function _(j){return b=j,f=setTimeout(P,l),x?v(j):d}function k(j){var F=j-g,D=j-b,B=l-F;return w?s(B,h-D):B}function M(j){var F=j-g,D=j-b;return g===void 0||F>=l||F<0||w&&D>=h}function P(){var j=t();if(M(j))return T(j);f=setTimeout(P,k(j))}function T(j){return f=void 0,E&&c?v(j):(c=p=void 0,d)}function A(){f!==void 0&&clearTimeout(f),b=0,c=g=p=f=void 0}function L(){return f===void 0?d:T(t())}function I(){var j=t(),F=M(j);if(c=arguments,p=this,g=j,F){if(f===void 0)return _(g);if(w)return clearTimeout(f),f=setTimeout(P,l),v(g)}return f===void 0&&(f=setTimeout(P,l)),d}return I.cancel=A,I.flush=L,I}return bo=o,bo}var j0=q0();const H0=qt(j0),z0=xt.compile(D0);class Cr extends pt{constructor(t){super(z0({title:(t==null?void 0:t.title)??"Type something"})),this.options=t,this.events=new Pf.EventEmitter,this.input=this.element.querySelector("input"),this.button=this.element.querySelector("button"),this.button.classList.add("hidden"),this.button.addEventListener("click",()=>this.clear()),this.on("input",()=>{this.button.classList.remove("hidden"),this.element.classList.add("filled")}),this.on("clear",()=>{this.button.classList.add("hidden"),this.element.classList.remove("filled")}),this.input.addEventListener("keydown",H0(()=>this.input.value?this.emit("input",this.input.value):this.clear(),350))}clear(){return this.input.value="",this.emit("clear")}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new Cr(t)}}const V0=`
|
|
320
|
-
<header>
|
|
321
|
-
<div id="tabs">
|
|
322
|
-
{{#each tabs}}
|
|
323
|
-
{{#compare type 'eq' 'separator'}}<hr>{{/compare}}
|
|
324
|
-
|
|
325
|
-
{{#compare type 'eq' 'section'}}
|
|
326
|
-
<button class="{{#unless entity.meta.name}}icon-only{{/unless}} {{#if isSelected}}checked{{/if}}" id="{{id}}">
|
|
327
|
-
<i class="{{entity.meta.icon}}"></i>{{entity.meta.name}}
|
|
328
|
-
</button>
|
|
329
|
-
{{/compare}}
|
|
330
|
-
{{/each}}
|
|
331
|
-
</div>
|
|
332
|
-
</header>
|
|
333
|
-
`,W0=xt.compile(V0);class Na extends pt{constructor(t){super(W0({tabs:t.map(e=>e.type==="section"?Object.assign(e,{id:e.entity.id,isSelected:!e.entity.isHidden}):e)})),this.tabs=t,this.events=new Vn,this.sections=this.tabs.map(e=>e.type==="section"?e.entity:null).filter(Boolean).reduce((e,i)=>Ze(e,i.id,i),{}),this.element.querySelector("div#tabs").addEventListener("click",e=>{var r,s;const i=e;if(((r=i.target)==null?void 0:r.nodeName)!=="BUTTON"||!this.sections[i.target.id])return null;(s=i.target.parentNode)==null||s.querySelectorAll("button.checked").forEach(o=>o.classList.remove("checked")),i.target.classList.add("checked"),this.emit("select",this.sections[i.target.id])})}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new Na(t)}}const U0=`
|
|
334
|
-
<div class="empty">
|
|
335
|
-
<i class="fas fa-hourglass-start"></i>
|
|
336
|
-
<p>There's still nothing...</p>
|
|
337
|
-
</div>
|
|
338
|
-
`,$0=xt.compile(U0);class Mr extends pt{static build(){return new Mr($0({}))}}/*!
|
|
339
|
-
* @kurkle/color v0.3.4
|
|
340
|
-
* https://github.com/kurkle/color#readme
|
|
341
|
-
* (c) 2024 Jukka Kurkela
|
|
342
|
-
* Released under the MIT License
|
|
343
|
-
*/function Gn(n){return n+.5|0}const be=(n,t,e)=>Math.max(Math.min(n,e),t);function vn(n){return be(Gn(n*2.55),0,255)}function we(n){return be(Gn(n*255),0,255)}function ae(n){return be(Gn(n/2.55)/100,0,1)}function Bu(n){return be(Gn(n*100),0,100)}const Nt={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},aa=[..."0123456789ABCDEF"],G0=n=>aa[n&15],Y0=n=>aa[(n&240)>>4]+aa[n&15],Ei=n=>(n&240)>>4===(n&15),K0=n=>Ei(n.r)&&Ei(n.g)&&Ei(n.b)&&Ei(n.a);function X0(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Nt[n[1]]*17,g:255&Nt[n[2]]*17,b:255&Nt[n[3]]*17,a:t===5?Nt[n[4]]*17:255}:(t===7||t===9)&&(e={r:Nt[n[1]]<<4|Nt[n[2]],g:Nt[n[3]]<<4|Nt[n[4]],b:Nt[n[5]]<<4|Nt[n[6]],a:t===9?Nt[n[7]]<<4|Nt[n[8]]:255})),e}const J0=(n,t)=>n<255?t(n):"";function Z0(n){var t=K0(n)?G0:Y0;return n?"#"+t(n.r)+t(n.g)+t(n.b)+J0(n.a,t):void 0}const Q0=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dd(n,t,e){const i=t*Math.min(e,1-e),r=(s,o=(s+n/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function ty(n,t,e){const i=(r,s=(r+n/60)%6)=>e-e*t*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function ey(n,t,e){const i=dd(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function ny(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function Fa(n){const e=n.r/255,i=n.g/255,r=n.b/255,s=Math.max(e,i,r),o=Math.min(e,i,r),a=(s+o)/2;let l,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=ny(e,i,r,c,s),l=l*60+.5),[l|0,u||0,a]}function qa(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(we)}function ja(n,t,e){return qa(dd,n,t,e)}function iy(n,t,e){return qa(ey,n,t,e)}function ry(n,t,e){return qa(ty,n,t,e)}function pd(n){return(n%360+360)%360}function sy(n){const t=Q0.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?vn(+t[5]):we(+t[5]));const r=pd(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=iy(r,s,o):t[1]==="hsv"?i=ry(r,s,o):i=ja(r,s,o),{r:i[0],g:i[1],b:i[2],a:e}}function oy(n,t){var e=Fa(n);e[0]=pd(e[0]+t),e=ja(e),n.r=e[0],n.g=e[1],n.b=e[2]}function ay(n){if(!n)return;const t=Fa(n),e=t[0],i=Bu(t[1]),r=Bu(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${ae(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const Nu={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"},Fu={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 ly(){const n={},t=Object.keys(Fu),e=Object.keys(Nu);let i,r,s,o,a;for(i=0;i<t.length;i++){for(o=a=t[i],r=0;r<e.length;r++)s=e[r],a=a.replace(s,Nu[s]);s=parseInt(Fu[o],16),n[a]=[s>>16&255,s>>8&255,s&255]}return n}let Pi;function cy(n){Pi||(Pi=ly(),Pi.transparent=[0,0,0,0]);const t=Pi[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const uy=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function hy(n){const t=uy.exec(n);let e=255,i,r,s;if(t){if(t[7]!==i){const o=+t[7];e=t[8]?vn(o):be(o*255,0,255)}return i=+t[1],r=+t[3],s=+t[5],i=255&(t[2]?vn(i):be(i,0,255)),r=255&(t[4]?vn(r):be(r,0,255)),s=255&(t[6]?vn(s):be(s,0,255)),{r:i,g:r,b:s,a:e}}}function fy(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ae(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const vo=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Ye=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function dy(n,t,e){const i=Ye(ae(n.r)),r=Ye(ae(n.g)),s=Ye(ae(n.b));return{r:we(vo(i+e*(Ye(ae(t.r))-i))),g:we(vo(r+e*(Ye(ae(t.g))-r))),b:we(vo(s+e*(Ye(ae(t.b))-s))),a:n.a+e*(t.a-n.a)}}function Oi(n,t,e){if(n){let i=Fa(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=ja(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function gd(n,t){return n&&Object.assign(t||{},n)}function qu(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=we(n[3]))):(t=gd(n,{r:0,g:0,b:0,a:1}),t.a=we(t.a)),t}function py(n){return n.charAt(0)==="r"?hy(n):sy(n)}class Dn{constructor(t){if(t instanceof Dn)return t;const e=typeof t;let i;e==="object"?i=qu(t):e==="string"&&(i=X0(t)||cy(t)||py(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=gd(this._rgb);return t&&(t.a=ae(t.a)),t}set rgb(t){this._rgb=qu(t)}rgbString(){return this._valid?fy(this._rgb):void 0}hexString(){return this._valid?Z0(this._rgb):void 0}hslString(){return this._valid?ay(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let s;const o=e===s?.5:e,a=2*o-1,l=i.a-r.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,i.r=255&u*i.r+s*r.r+.5,i.g=255&u*i.g+s*r.g+.5,i.b=255&u*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=dy(this._rgb,t._rgb,e)),this}clone(){return new Dn(this.rgb)}alpha(t){return this._rgb.a=we(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Gn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.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 Oi(this._rgb,2,t),this}darken(t){return Oi(this._rgb,2,-t),this}saturate(t){return Oi(this._rgb,1,t),this}desaturate(t){return Oi(this._rgb,1,-t),this}rotate(t){return oy(this._rgb,t),this}}/*!
|
|
344
|
-
* Chart.js v4.4.8
|
|
345
|
-
* https://www.chartjs.org
|
|
346
|
-
* (c) 2025 Chart.js Contributors
|
|
347
|
-
* Released under the MIT License
|
|
348
|
-
*/function re(){}const gy=(()=>{let n=0;return()=>n++})();function X(n){return n==null}function ct(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function J(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function gt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Dt(n,t){return gt(n)?n:t}function $(n,t){return typeof n>"u"?t:n}const my=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,md=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function st(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function nt(n,t,e,i){let r,s,o;if(ct(n))for(s=n.length,r=0;r<s;r++)t.call(e,n[r],r);else if(J(n))for(o=Object.keys(n),s=o.length,r=0;r<s;r++)t.call(e,n[o[r]],o[r])}function ir(n,t){let e,i,r,s;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],s=t[e],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function rr(n){if(ct(n))return n.map(rr);if(J(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=rr(n[e[r]]);return t}return n}function yd(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function yy(n,t,e,i){if(!yd(n))return;const r=t[n],s=e[n];J(r)&&J(s)?Bn(r,s,i):t[n]=rr(s)}function Bn(n,t,e){const i=ct(t)?t:[t],r=i.length;if(!J(n))return n;e=e||{};const s=e.merger||yy;let o;for(let a=0;a<r;++a){if(o=i[a],!J(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],n,o,e)}return n}function On(n,t){return Bn(n,t,{merger:by})}function by(n,t,e){if(!yd(n))return;const i=t[n],r=e[n];J(i)&&J(r)?On(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=rr(r))}const ju={"":n=>n,x:n=>n.x,y:n=>n.y};function vy(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function _y(n){const t=vy(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Se(n,t){return(ju[t]||(ju[t]=_y(t)))(n)}function Ha(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Nn=n=>typeof n<"u",ke=n=>typeof n=="function",Hu=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function xy(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const at=Math.PI,ot=2*at,wy=ot+at,sr=Number.POSITIVE_INFINITY,Sy=at/180,mt=at/2,Ee=at/4,zu=at*2/3,ve=Math.log10,te=Math.sign;function An(n,t,e){return Math.abs(n-t)<e}function Vu(n){const t=Math.round(n);n=An(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(ve(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function ky(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,s)=>r-s).pop(),t}function Cy(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function en(n){return!Cy(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function My(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function bd(n,t,e){let i,r,s;for(i=0,r=n.length;i<r;i++)s=n[i][e],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function zt(n){return n*(at/180)}function za(n){return n*(180/at)}function Wu(n){if(!gt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function vd(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let s=Math.atan2(i,e);return s<-.5*at&&(s+=ot),{angle:s,distance:r}}function la(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Ey(n,t){return(n-t+wy)%ot-at}function Bt(n){return(n%ot+ot)%ot}function Fn(n,t,e,i){const r=Bt(n),s=Bt(t),o=Bt(e),a=Bt(s-r),l=Bt(o-r),u=Bt(r-s),c=Bt(r-o);return r===s||r===o||i&&s===o||a>l&&u<c}function _t(n,t,e){return Math.max(t,Math.min(e,n))}function Py(n){return _t(n,-32768,32767)}function he(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Va(n,t,e){e=e||(o=>n[o]<t);let i=n.length-1,r=0,s;for(;i-r>1;)s=r+i>>1,e(s)?r=s:i=s;return{lo:r,hi:i}}const fe=(n,t,e,i)=>Va(n,e,i?r=>{const s=n[r][t];return s<e||s===e&&n[r+1][t]===e}:r=>n[r][t]<e),Oy=(n,t,e)=>Va(n,e,i=>n[i][t]>=e);function Ay(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const _d=["push","pop","shift","splice","unshift"];function Ly(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),_d.forEach(e=>{const i="_onData"+Ha(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return n._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...s)}),o}})})}function Uu(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(_d.forEach(s=>{delete n[s]}),delete n._chartjs)}function xd(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const wd=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Sd(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,wd.call(window,()=>{i=!1,n.apply(t,e)}))}}function Ry(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const Wa=n=>n==="start"?"left":n==="end"?"right":"center",kt=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Ty=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function kd(n,t,e){const i=t.length;let r=0,s=i;if(n._sorted){const{iScale:o,vScale:a,_parsed:l}=n,u=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,c=o.axis,{min:p,max:h,minDefined:d,maxDefined:f}=o.getUserBounds();if(d){if(r=Math.min(fe(l,c,p).lo,e?i:fe(t,c,o.getPixelForValue(p)).lo),u){const g=l.slice(0,r+1).reverse().findIndex(b=>!X(b[a.axis]));r-=Math.max(0,g)}r=_t(r,0,i-1)}if(f){let g=Math.max(fe(l,o.axis,h,!0).hi+1,e?0:fe(t,c,o.getPixelForValue(h),!0).hi+1);if(u){const b=l.slice(g-1).findIndex(x=>!X(x[a.axis]));g+=Math.max(0,b)}s=_t(g,r,i)-r}else s=i-r}return{start:r,count:s}}function Cd(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const s=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),s}const Ai=n=>n===0||n===1,$u=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*ot/e)),Gu=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*ot/e)+1,Ln={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*mt)+1,easeOutSine:n=>Math.sin(n*mt),easeInOutSine:n=>-.5*(Math.cos(at*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ai(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ai(n)?n:$u(n,.075,.3),easeOutElastic:n=>Ai(n)?n:Gu(n,.075,.3),easeInOutElastic(n){return Ai(n)?n:n<.5?.5*$u(n*2,.1125,.45):.5+.5*Gu(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Ln.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Ln.easeInBounce(n*2)*.5:Ln.easeOutBounce(n*2-1)*.5+.5};function Ua(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Yu(n){return Ua(n)?n:new Dn(n)}function _o(n){return Ua(n)?n:new Dn(n).saturate(.5).darken(.1).hexString()}const Iy=["x","y","borderWidth","radius","tension"],Dy=["color","borderColor","backgroundColor"];function By(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:Dy},numbers:{type:"number",properties:Iy}}),n.describe("animations",{_fallback:"animation"}),n.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 Ny(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ku=new Map;function Fy(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Ku.get(e);return i||(i=new Intl.NumberFormat(n,t),Ku.set(e,i)),i}function Yn(n,t,e){return Fy(t,e).format(n)}const Md={values(n){return ct(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,s=n;if(e.length>1){const u=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),s=qy(n,e)}const o=ve(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Yn(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(ve(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Md.numeric.call(this,n,t,e):""}};function qy(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var Er={formatters:Md};function jy(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Er.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Fe=Object.create(null),ca=Object.create(null);function Rn(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const s=e[i];n=n[s]||(n[s]=Object.create(null))}return n}function xo(n,t,e){return typeof t=="string"?Bn(Rn(n,t),e):Bn(Rn(n,""),t)}class Hy{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>_o(r.backgroundColor),this.hoverBorderColor=(i,r)=>_o(r.borderColor),this.hoverColor=(i,r)=>_o(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return xo(this,t,e)}get(t){return Rn(this,t)}describe(t,e){return xo(ca,t,e)}override(t,e){return xo(Fe,t,e)}route(t,e,i,r){const s=Rn(this,t),o=Rn(this,i),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],u=o[r];return J(l)?Object.assign({},u,l):$(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var ut=new Hy({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[By,Ny,jy]);function zy(n){return!n||X(n.size)||X(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function or(n,t,e,i,r){let s=t[r];return s||(s=t[r]=n.measureText(r).width,e.push(r)),s>i&&(i=s),i}function Vy(n,t,e,i){i=i||{};let r=i.data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},s=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let o=0;const a=e.length;let l,u,c,p,h;for(l=0;l<a;l++)if(p=e[l],p!=null&&!ct(p))o=or(n,r,s,o,p);else if(ct(p))for(u=0,c=p.length;u<c;u++)h=p[u],h!=null&&!ct(h)&&(o=or(n,r,s,o,h));n.restore();const d=s.length/2;if(d>e.length){for(l=0;l<d;l++)delete r[s[l]];s.splice(0,d)}return o}function Pe(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function Xu(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function ua(n,t,e,i){Ed(n,t,e,i,null)}function Ed(n,t,e,i,r){let s,o,a,l,u,c,p,h;const d=t.pointStyle,f=t.rotation,g=t.radius;let b=(f||0)*Sy;if(d&&typeof d=="object"&&(s=d.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(b),n.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),n.restore();return}if(!(isNaN(g)||g<=0)){switch(n.beginPath(),d){default:r?n.ellipse(e,i,r/2,g,0,0,ot):n.arc(e,i,g,0,ot),n.closePath();break;case"triangle":c=r?r/2:g,n.moveTo(e+Math.sin(b)*c,i-Math.cos(b)*g),b+=zu,n.lineTo(e+Math.sin(b)*c,i-Math.cos(b)*g),b+=zu,n.lineTo(e+Math.sin(b)*c,i-Math.cos(b)*g),n.closePath();break;case"rectRounded":u=g*.516,l=g-u,o=Math.cos(b+Ee)*l,p=Math.cos(b+Ee)*(r?r/2-u:l),a=Math.sin(b+Ee)*l,h=Math.sin(b+Ee)*(r?r/2-u:l),n.arc(e-p,i-a,u,b-at,b-mt),n.arc(e+h,i-o,u,b-mt,b),n.arc(e+p,i+a,u,b,b+mt),n.arc(e-h,i+o,u,b+mt,b+at),n.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*g,c=r?r/2:l,n.rect(e-c,i-l,2*c,2*l);break}b+=Ee;case"rectRot":p=Math.cos(b)*(r?r/2:g),o=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(r?r/2:g),n.moveTo(e-p,i-a),n.lineTo(e+h,i-o),n.lineTo(e+p,i+a),n.lineTo(e-h,i+o),n.closePath();break;case"crossRot":b+=Ee;case"cross":p=Math.cos(b)*(r?r/2:g),o=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(r?r/2:g),n.moveTo(e-p,i-a),n.lineTo(e+p,i+a),n.moveTo(e+h,i-o),n.lineTo(e-h,i+o);break;case"star":p=Math.cos(b)*(r?r/2:g),o=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(r?r/2:g),n.moveTo(e-p,i-a),n.lineTo(e+p,i+a),n.moveTo(e+h,i-o),n.lineTo(e-h,i+o),b+=Ee,p=Math.cos(b)*(r?r/2:g),o=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(r?r/2:g),n.moveTo(e-p,i-a),n.lineTo(e+p,i+a),n.moveTo(e+h,i-o),n.lineTo(e-h,i+o);break;case"line":o=r?r/2:Math.cos(b)*g,a=Math.sin(b)*g,n.moveTo(e-o,i-a),n.lineTo(e+o,i+a);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(b)*(r?r/2:g),i+Math.sin(b)*g);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function de(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Pr(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Or(n){n.restore()}function Wy(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const s=(t.x+e.x)/2;n.lineTo(s,t.y),n.lineTo(s,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function Uy(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function $y(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),X(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function Gy(n,t,e,i,r){if(r.strikethrough||r.underline){const s=n.measureText(i),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=e-s.actualBoundingBoxAscent,u=e+s.actualBoundingBoxDescent,c=r.strikethrough?(l+u)/2:u;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(o,c),n.lineTo(a,c),n.stroke()}}function Yy(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function qe(n,t,e,i,r,s={}){const o=ct(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(n.save(),n.font=r.string,$y(n,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&Yy(n,s.backdrop),a&&(s.strokeColor&&(n.strokeStyle=s.strokeColor),X(s.strokeWidth)||(n.lineWidth=s.strokeWidth),n.strokeText(u,e,i,s.maxWidth)),n.fillText(u,e,i,s.maxWidth),Gy(n,e,i,u,s),i+=Number(r.lineHeight);n.restore()}function qn(n,t){const{x:e,y:i,w:r,h:s,radius:o}=t;n.arc(e+o.topLeft,i+o.topLeft,o.topLeft,1.5*at,at,!0),n.lineTo(e,i+s-o.bottomLeft),n.arc(e+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,at,mt,!0),n.lineTo(e+r-o.bottomRight,i+s),n.arc(e+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,mt,0,!0),n.lineTo(e+r,i+o.topRight),n.arc(e+r-o.topRight,i+o.topRight,o.topRight,0,-mt,!0),n.lineTo(e+o.topLeft,i)}const Ky=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Xy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Jy(n,t){const e=(""+n).match(Ky);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Zy=n=>+n||0;function $a(n,t){const e={},i=J(t),r=i?Object.keys(t):t,s=J(n)?i?o=>$(n[o],n[t[o]]):o=>n[o]:()=>n;for(const o of r)e[o]=Zy(s(o));return e}function Pd(n){return $a(n,{top:"y",right:"x",bottom:"y",left:"x"})}function De(n){return $a(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(n){const t=Pd(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function vt(n,t){n=n||{},t=t||ut.font;let e=$(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=$(n.style,t.style);i&&!(""+i).match(Xy)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:$(n.family,t.family),lineHeight:Jy($(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:$(n.weight,t.weight),string:""};return r.string=zy(r),r}function _n(n,t,e,i){let r,s,o;for(r=0,s=n.length;r<s;++r)if(o=n[r],o!==void 0&&o!==void 0)return o}function Qy(n,t,e){const{min:i,max:r}=n,s=md(t,(r-i)/2),o=(a,l)=>e&&a===0?0:a+l;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function Ce(n,t){return Object.assign(Object.create(n),t)}function Ga(n,t=[""],e,i,r=()=>n[0]){const s=e||n;typeof i>"u"&&(i=Rd("_fallback",n));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:s,_fallback:i,_getTarget:r,override:a=>Ga([a,...n],t,s,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete n[0][l],!0},get(a,l){return Ad(a,l,()=>ab(l,t,n,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(a,l){return Zu(a).includes(l)},ownKeys(a){return Zu(a)},set(a,l,u){const c=a._storage||(a._storage=r());return a[l]=c[l]=u,delete a._keys,!0}})}function nn(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Od(n,i),setContext:s=>nn(n,s,e,i),override:s=>nn(n.override(s),t,e,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete n[o],!0},get(s,o,a){return Ad(s,o,()=>eb(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(s,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(s,o,a){return n[o]=a,delete s[o],!0}})}function Od(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:ke(e)?e:()=>e,isIndexable:ke(i)?i:()=>i}}const tb=(n,t)=>n?n+Ha(t):t,Ya=(n,t)=>J(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ad(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function eb(n,t,e){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=n;let a=i[t];return ke(a)&&o.isScriptable(t)&&(a=nb(t,a,n,e)),ct(a)&&a.length&&(a=ib(t,a,n,o.isIndexable)),Ya(t,a)&&(a=nn(a,r,s&&s[t],o)),a}function nb(n,t,e,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=e;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);a.add(n);let l=t(s,o||i);return a.delete(n),Ya(n,l)&&(l=Ka(r._scopes,r,n,l)),l}function ib(n,t,e,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=e;if(typeof s.index<"u"&&i(n))return t[s.index%t.length];if(J(t[0])){const l=t,u=r._scopes.filter(c=>c!==l);t=[];for(const c of l){const p=Ka(u,r,n,c);t.push(nn(p,s,o&&o[n],a))}}return t}function Ld(n,t,e){return ke(n)?n(t,e):n}const rb=(n,t)=>n===!0?t:typeof n=="string"?Se(t,n):void 0;function sb(n,t,e,i,r){for(const s of t){const o=rb(e,s);if(o){n.add(o);const a=Ld(o._fallback,e,r);if(typeof a<"u"&&a!==e&&a!==i)return a}else if(o===!1&&typeof i<"u"&&e!==i)return null}return!1}function Ka(n,t,e,i){const r=t._rootScopes,s=Ld(t._fallback,e,i),o=[...n,...r],a=new Set;a.add(i);let l=Ju(a,o,e,s||e,i);return l===null||typeof s<"u"&&s!==e&&(l=Ju(a,o,s,l,i),l===null)?!1:Ga(Array.from(a),[""],r,s,()=>ob(t,e,i))}function Ju(n,t,e,i,r){for(;e;)e=sb(n,t,e,i,r);return e}function ob(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return ct(r)&&J(e)?e:r||{}}function ab(n,t,e,i){let r;for(const s of t)if(r=Rd(tb(s,n),e),typeof r<"u")return Ya(n,r)?Ka(e,i,n,r):r}function Rd(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Zu(n){let t=n._keys;return t||(t=n._keys=lb(n._scopes)),t}function lb(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Td(n,t,e,i){const{iScale:r}=n,{key:s="r"}=this._parsing,o=new Array(i);let a,l,u,c;for(a=0,l=i;a<l;++a)u=a+e,c=t[u],o[a]={r:r.parse(Se(c,s),u)};return o}const cb=Number.EPSILON||1e-14,rn=(n,t)=>t<n.length&&!n[t].skip&&n[t],Id=n=>n==="x"?"y":"x";function ub(n,t,e,i){const r=n.skip?t:n,s=t,o=e.skip?t:e,a=la(s,r),l=la(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const p=i*u,h=i*c;return{previous:{x:s.x-p*(o.x-r.x),y:s.y-p*(o.y-r.y)},next:{x:s.x+h*(o.x-r.x),y:s.y+h*(o.y-r.y)}}}function hb(n,t,e){const i=n.length;let r,s,o,a,l,u=rn(n,0);for(let c=0;c<i-1;++c)if(l=u,u=rn(n,c+1),!(!l||!u)){if(An(t[c],0,cb)){e[c]=e[c+1]=0;continue}r=e[c]/t[c],s=e[c+1]/t[c],a=Math.pow(r,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),e[c]=r*o*t[c],e[c+1]=s*o*t[c])}}function fb(n,t,e="x"){const i=Id(e),r=n.length;let s,o,a,l=rn(n,0);for(let u=0;u<r;++u){if(o=a,a=l,l=rn(n,u+1),!a)continue;const c=a[e],p=a[i];o&&(s=(c-o[e])/3,a[`cp1${e}`]=c-s,a[`cp1${i}`]=p-s*t[u]),l&&(s=(l[e]-c)/3,a[`cp2${e}`]=c+s,a[`cp2${i}`]=p+s*t[u])}}function db(n,t="x"){const e=Id(t),i=n.length,r=Array(i).fill(0),s=Array(i);let o,a,l,u=rn(n,0);for(o=0;o<i;++o)if(a=l,l=u,u=rn(n,o+1),!!l){if(u){const c=u[t]-l[t];r[o]=c!==0?(u[e]-l[e])/c:0}s[o]=a?u?te(r[o-1])!==te(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}hb(n,r,s),fb(n,s,t)}function Li(n,t,e){return Math.max(Math.min(n,e),t)}function pb(n,t){let e,i,r,s,o,a=de(n[0],t);for(e=0,i=n.length;e<i;++e)o=s,s=a,a=e<i-1&&de(n[e+1],t),s&&(r=n[e],o&&(r.cp1x=Li(r.cp1x,t.left,t.right),r.cp1y=Li(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=Li(r.cp2x,t.left,t.right),r.cp2y=Li(r.cp2y,t.top,t.bottom)))}function gb(n,t,e,i,r){let s,o,a,l;if(t.spanGaps&&(n=n.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")db(n,r);else{let u=i?n[n.length-1]:n[0];for(s=0,o=n.length;s<o;++s)a=n[s],l=ub(u,a,n[Math.min(s+1,o-(i?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}t.capBezierPoints&&pb(n,e)}function Xa(){return typeof window<"u"&&typeof document<"u"}function Ja(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ar(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const Ar=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function mb(n,t){return Ar(n).getPropertyValue(t)}const yb=["top","right","bottom","left"];function Be(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const s=yb[r];i[s]=parseFloat(n[t+"-"+s+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const bb=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function vb(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:s}=i;let o=!1,a,l;if(bb(r,s,n.target))a=r,l=s;else{const u=t.getBoundingClientRect();a=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function Le(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=Ar(e),s=r.boxSizing==="border-box",o=Be(r,"padding"),a=Be(r,"border","width"),{x:l,y:u,box:c}=vb(n,e),p=o.left+(c&&a.left),h=o.top+(c&&a.top);let{width:d,height:f}=t;return s&&(d-=o.width+a.width,f-=o.height+a.height),{x:Math.round((l-p)/d*e.width/i),y:Math.round((u-h)/f*e.height/i)}}function _b(n,t,e){let i,r;if(t===void 0||e===void 0){const s=n&&Ja(n);if(!s)t=n.clientWidth,e=n.clientHeight;else{const o=s.getBoundingClientRect(),a=Ar(s),l=Be(a,"border","width"),u=Be(a,"padding");t=o.width-u.width-l.width,e=o.height-u.height-l.height,i=ar(a.maxWidth,s,"clientWidth"),r=ar(a.maxHeight,s,"clientHeight")}}return{width:t,height:e,maxWidth:i||sr,maxHeight:r||sr}}const Ri=n=>Math.round(n*10)/10;function xb(n,t,e,i){const r=Ar(n),s=Be(r,"margin"),o=ar(r.maxWidth,n,"clientWidth")||sr,a=ar(r.maxHeight,n,"clientHeight")||sr,l=_b(n,t,e);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const h=Be(r,"border","width"),d=Be(r,"padding");u-=d.width+h.width,c-=d.height+h.height}return u=Math.max(0,u-s.width),c=Math.max(0,i?u/i:c-s.height),u=Ri(Math.min(u,o,l.maxWidth)),c=Ri(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Ri(u/2)),(t!==void 0||e!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,u=Ri(Math.floor(c*i))),{width:u,height:c}}function Qu(n,t,e){const i=t||1,r=Math.floor(n.height*i),s=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const o=n.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(n.currentDevicePixelRatio=i,o.height=r,o.width=s,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const wb=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Xa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function th(n,t){const e=mb(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Re(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Sb(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function kb(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},s={x:t.cp1x,y:t.cp1y},o=Re(n,r,e),a=Re(r,s,e),l=Re(s,t,e),u=Re(o,a,e),c=Re(a,l,e);return Re(u,c,e)}const Cb=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Mb=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function tn(n,t,e){return n?Cb(t,e):Mb()}function Dd(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Bd(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Nd(n){return n==="angle"?{between:Fn,compare:Ey,normalize:Bt}:{between:he,compare:(t,e)=>t-e,normalize:t=>t}}function eh({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function Eb(n,t,e){const{property:i,start:r,end:s}=e,{between:o,normalize:a}=Nd(i),l=t.length;let{start:u,end:c,loop:p}=n,h,d;if(p){for(u+=l,c+=l,h=0,d=l;h<d&&o(a(t[u%l][i]),r,s);++h)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:p,style:n.style}}function Fd(n,t,e){if(!e)return[n];const{property:i,start:r,end:s}=e,o=t.length,{compare:a,between:l,normalize:u}=Nd(i),{start:c,end:p,loop:h,style:d}=Eb(n,t,e),f=[];let g=!1,b=null,x,w,E;const v=()=>l(r,E,x)&&a(r,E)!==0,_=()=>a(s,x)===0||l(s,E,x),k=()=>g||v(),M=()=>!g||_();for(let P=c,T=c;P<=p;++P)w=t[P%o],!w.skip&&(x=u(w[i]),x!==E&&(g=l(x,r,s),b===null&&k()&&(b=a(x,r)===0?P:T),b!==null&&M()&&(f.push(eh({start:b,end:P,loop:h,count:o,style:d})),b=null),T=P,E=x));return b!==null&&f.push(eh({start:b,end:p,loop:h,count:o,style:d})),f}function qd(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const s=Fd(i[r],n.points,t);s.length&&e.push(...s)}return e}function Pb(n,t,e,i){let r=0,s=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(s+=r);s>r&&n[s%t].skip;)s--;return s%=t,{start:r,end:s}}function Ob(n,t,e,i){const r=n.length,s=[];let o=t,a=n[t],l;for(l=t+1;l<=e;++l){const u=n[l%r];u.skip||u.stop?a.skip||(i=!1,s.push({start:t%r,end:(l-1)%r,loop:i}),t=o=u.stop?l:null):(o=l,a.skip&&(t=l)),a=u}return o!==null&&s.push({start:t%r,end:o%r,loop:i}),s}function Ab(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const s=!!n._loop,{start:o,end:a}=Pb(e,r,s,i);if(i===!0)return nh(n,[{start:o,end:a,loop:s}],e,t);const l=a<o?a+r:a,u=!!n._fullLoop&&o===0&&a===r-1;return nh(n,Ob(e,o,l,u),e,t)}function nh(n,t,e,i){return!i||!i.setContext||!e?t:Lb(n,t,e,i)}function Lb(n,t,e,i){const r=n._chart.getContext(),s=ih(n.options),{_datasetIndex:o,options:{spanGaps:a}}=n,l=e.length,u=[];let c=s,p=t[0].start,h=p;function d(f,g,b,x){const w=a?-1:1;if(f!==g){for(f+=l;e[f%l].skip;)f-=w;for(;e[g%l].skip;)g+=w;f%l!==g%l&&(u.push({start:f%l,end:g%l,loop:b,style:x}),c=x,p=g%l)}}for(const f of t){p=a?p:f.start;let g=e[p%l],b;for(h=p+1;h<=f.end;h++){const x=e[h%l];b=ih(i.setContext(Ce(r,{type:"segment",p0:g,p1:x,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),Rb(b,c)&&d(p,h-1,f.loop,c),g=x,c=b}p<h-1&&d(p,h-1,f.loop,c)}return u}function ih(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function Rb(n,t){if(!t)return!1;const e=[],i=function(r,s){return Ua(s)?(e.includes(s)||e.push(s),e.indexOf(s)):s};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
|
|
349
|
-
* Chart.js v4.4.8
|
|
350
|
-
* https://www.chartjs.org
|
|
351
|
-
* (c) 2025 Chart.js Contributors
|
|
352
|
-
* Released under the MIT License
|
|
353
|
-
*/class Tb{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const s=e.listeners[r],o=e.duration;s.forEach(a=>a({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=wd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const s=i.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),s.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=s.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var se=new Tb;const rh="transparent",Ib={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=Yu(n||rh),r=i.valid&&Yu(t||rh);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class Db{constructor(t,e,i,r){const s=e[i];r=_n([t.to,r,s,t.from]);const o=_n([t.from,s,r]);this._active=!0,this._fn=t.fn||Ib[t.type||typeof o],this._easing=Ln[t.easing]||Ln.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=_n([t.to,e,r,t.from]),this._from=_n([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||e<i),!this._active){this._target[r]=a,this._notify(!0);return}if(e<0){this._target[r]=s;return}l=e/i%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class jd{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!J(t))return;const e=Object.keys(ut.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const s=t[r];if(!J(s))return;const o={};for(const a of e)o[a]=s[a];(ct(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,e){const i=e.options,r=Nb(t,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&Bb(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,e){const i=this._properties,r=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(t,e));continue}const c=e[u];let p=s[u];const h=i.get(u);if(p)if(h&&p.active()){p.update(h,c,a);continue}else p.cancel();if(!h||!h.duration){t[u]=c;continue}s[u]=p=new Db(h,t,u,c),r.push(p)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return se.add(this._chart,i),!0}}function Bb(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const s=n[i[r]];s&&s.active()&&e.push(s.wait())}return Promise.all(e)}function Nb(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function sh(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,s=e.max===void 0?t:0;return{start:i?s:r,end:i?r:s}}function Fb(n,t,e){if(e===!1)return!1;const i=sh(n,e),r=sh(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function qb(n){let t,e,i,r;return J(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function Hd(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,s;for(r=0,s=i.length;r<s;++r)e.push(i[r].index);return e}function oh(n,t,e,i={}){const r=n.keys,s=i.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===e){if(c=!0,i.all)continue;break}u=n.values[l],gt(u)&&(s||t===0||te(t)===te(u))&&(t+=u)}return!c&&!i.all?0:t}function jb(n,t){const{iScale:e,vScale:i}=t,r=e.axis==="x"?"x":"y",s=i.axis==="x"?"x":"y",o=Object.keys(n),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[r]:c,[s]:n[c]};return a}function wo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Hb(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function zb(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function Vb(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function ah(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const s=n[r.index];if(e&&s>0||!e&&s<0)return r.index}return null}function lh(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,u=o.axis,c=Hb(s,o,i),p=t.length;let h;for(let d=0;d<p;++d){const f=t[d],{[l]:g,[u]:b}=f,x=f._stacks||(f._stacks={});h=x[u]=Vb(r,c,g),h[a]=b,h._top=ah(h,o,!0,i.type),h._bottom=ah(h,o,!1,i.type);const w=h._visualValues||(h._visualValues={});w[a]=b}}function So(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function Wb(n,t){return Ce(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ub(n,t,e){return Ce(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function dn(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const s=r._stacks;if(!s||s[i]===void 0||s[i][e]===void 0)return;delete s[i][e],s[i]._visualValues!==void 0&&s[i]._visualValues[e]!==void 0&&delete s[i]._visualValues[e]}}}const ko=n=>n==="reset"||n==="none",ch=(n,t)=>t?n:Object.assign({},n),$b=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Hd(e,!0),values:null};class Wt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=wo(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&&dn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(p,h,d,f)=>p==="x"?h:p==="r"?f:d,s=e.xAxisID=$(i.xAxisID,So(t,"x")),o=e.yAxisID=$(i.yAxisID,So(t,"y")),a=e.rAxisID=$(i.rAxisID,So(t,"r")),l=e.indexAxis,u=e.iAxisID=r(l,s,o,a),c=e.vAxisID=r(l,o,s,a);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Uu(this._data,this),t._stacked&&dn(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(J(e)){const r=this._cachedMeta;this._data=jb(e,r)}else if(i!==e){if(i){Uu(i,this);const r=this._cachedMeta;dn(r),r._parsed=[]}e&&Object.isExtensible(e)&&Ly(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const s=e._stacked;e._stacked=wo(e.vScale,e),e.stack!==i.stack&&(r=!0,dn(e),e.stack=i.stack),this._resyncElements(t),(r||s!==e._stacked)&&(lh(this,e._parsed),e._stacked=wo(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,a=s.axis;let l=t===0&&e===r.length?!0:i._sorted,u=t>0&&i._parsed[t-1],c,p,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{ct(r[t])?h=this.parseArrayData(i,r,t,e):J(r[t])?h=this.parseObjectData(i,r,t,e):h=this.parsePrimitiveData(i,r,t,e);const d=()=>p[a]===null||u&&p[a]<u[a];for(c=0;c<e;++c)i._parsed[c+t]=p=h[c],l&&(d()&&(l=!1),u=p);i._sorted=l}o&&lh(this,h)}parsePrimitiveData(t,e,i,r){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,p=new Array(r);let h,d,f;for(h=0,d=r;h<d;++h)f=h+i,p[h]={[a]:c||s.parse(u[f],f),[l]:o.parse(e[f],f)};return p}parseArrayData(t,e,i,r){const{xScale:s,yScale:o}=t,a=new Array(r);let l,u,c,p;for(l=0,u=r;l<u;++l)c=l+i,p=e[c],a[l]={x:s.parse(p[0],c),y:o.parse(p[1],c)};return a}parseObjectData(t,e,i,r){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(r);let c,p,h,d;for(c=0,p=r;c<p;++c)h=c+i,d=e[h],u[c]={x:s.parse(Se(d,a),h),y:o.parse(Se(d,l),h)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,s=this._cachedMeta,o=e[t.axis],a={keys:Hd(r,!0),values:e._stacks[t.axis]._visualValues};return oh(a,o,s.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const s=i[e.axis];let o=s===null?NaN:s;const a=r&&i._stacks[e.axis];r&&a&&(r.values=a,o=oh(r,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,s=i._sorted&&t===i.iScale,o=r.length,a=this._getOtherScale(t),l=$b(e,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:p}=zb(a);let h,d;function f(){d=r[h];const g=d[a.axis];return!gt(d[t.axis])||c>g||p<g}for(h=0;h<o&&!(!f()&&(this.updateRangeFromParsed(u,t,d,l),s));++h);if(s){for(h=o-1;h>=0;--h)if(!f()){this.updateRangeFromParsed(u,t,d,l);break}}return u}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,s,o;for(r=0,s=e.length;r<s;++r)o=e[r][t.axis],gt(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:r?""+r.getLabelForValue(s[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=qb($(this.options.clip,Fb(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],s=e.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||r.length-a,u=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,s,a,l),c=a;c<a+l;++c){const p=r[c];p.hidden||(p.active&&u?o.push(p):p.draw(t,s))}for(c=0;c<o.length;++c)o[c].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=Ub(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=r.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Wb(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",s=this._cachedDataOpts,o=t+"-"+e,a=s[o],l=this.enableOptionSharing&&Nn(i);if(a)return ch(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),p=r?[`${t}Hover`,"hover",t,""]:[t,""],h=u.getOptionScopes(this.getDataset(),c),d=Object.keys(ut.elements[t]),f=()=>this.getContext(i,r,e),g=u.resolveNamedOptions(h,d,f,p);return g.$shared&&(g.$shared=l,s[o]=Object.freeze(ch(g,l))),g}_resolveAnimations(t,e,i){const r=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,a=s[o];if(a)return a;let l;if(r.options.animation!==!1){const c=this.chart.config,p=c.datasetAnimationScopeKeys(this._type,e),h=c.getOptionScopes(this.getDataset(),p);l=c.createResolver(h,this.getContext(t,i,e))}const u=new jd(r,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ko(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==r;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,r){ko(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!ko(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const s=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const r=i.length,s=e.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,t):s<r&&this._removeElements(s,r-s)}_insertElements(t,e,i=!0){const r=this._cachedMeta,s=r.data,o=t+e;let a;const l=u=>{for(u.length+=e,a=u.length-1;a>=o;a--)u[a]=u[a-e]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&dn(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}z(Wt,"defaults",{}),z(Wt,"datasetElementType",null),z(Wt,"dataElementType",null);function Gb(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,s=e.length;r<s;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=xd(i.sort((r,s)=>r-s))}return n._cache.$bar}function Yb(n){const t=n.iScale,e=Gb(t,n.type);let i=t._length,r,s,o,a;const l=()=>{o===32767||o===-32768||(Nn(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(r=0,s=e.length;r<s;++r)o=t.getPixelForValue(e[r]),l();for(a=void 0,r=0,s=t.ticks.length;r<s;++r)o=t.getPixelForTick(r),l();return i}function Kb(n,t,e,i){const r=e.barThickness;let s,o;return X(r)?(s=t.min*e.categoryPercentage,o=e.barPercentage):(s=r*i,o=1),{chunk:s/i,ratio:o,start:t.pixels[n]-s/2}}function Xb(n,t,e,i){const r=t.pixels,s=r[n];let o=n>0?r[n-1]:null,a=n<r.length-1?r[n+1]:null;const l=e.categoryPercentage;o===null&&(o=s-(a===null?t.end-t.start:a-s)),a===null&&(a=s+s-o);const u=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/i,ratio:e.barPercentage,start:u}}function Jb(n,t,e,i){const r=e.parse(n[0],i),s=e.parse(n[1],i),o=Math.min(r,s),a=Math.max(r,s);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),t[e.axis]=u,t._custom={barStart:l,barEnd:u,start:r,end:s,min:o,max:a}}function zd(n,t,e,i){return ct(n)?Jb(n,t,e,i):t[e.axis]=e.parse(n,i),t}function uh(n,t,e,i){const r=n.iScale,s=n.vScale,o=r.getLabels(),a=r===s,l=[];let u,c,p,h;for(u=e,c=e+i;u<c;++u)h=t[u],p={},p[r.axis]=a||r.parse(o[u],u),l.push(zd(h,p,s,u));return l}function Co(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Zb(n,t,e){return n!==0?te(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Qb(n){let t,e,i,r,s;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",s="start"):(r="start",s="end"),{start:e,end:i,reverse:t,top:r,bottom:s}}function tv(n,t,e,i){let r=t.borderSkipped;const s={};if(!r){n.borderSkipped=s;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=Qb(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=u:(e._bottom||0)===i?r=c:(s[hh(c,o,a,l)]=!0,r=u)),s[hh(r,o,a,l)]=!0,n.borderSkipped=s}function hh(n,t,e,i){return i?(n=ev(n,t,e),n=fh(n,e,t)):n=fh(n,t,e),n}function ev(n,t,e){return n===t?e:n===e?t:n}function fh(n,t,e){return n==="start"?t:n==="end"?e:n}function nv(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Gi extends Wt{parsePrimitiveData(t,e,i,r){return uh(t,e,i,r)}parseArrayData(t,e,i,r){return uh(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=s.axis==="x"?a:l,c=o.axis==="x"?a:l,p=[];let h,d,f,g;for(h=i,d=i+r;h<d;++h)g=e[h],f={},f[s.axis]=s.parse(Se(g,u),h),p.push(zd(Se(g,c),f,o,h));return p}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,s=this.getParsed(t),o=s._custom,a=Co(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(s[r.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const s=r==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:p,includeOptions:h}=this._getSharedOptions(e,r);for(let d=e;d<e+i;d++){const f=this.getParsed(d),g=s||X(f[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),b=this._calculateBarIndexPixels(d,c),x=(f._stacks||{})[a.axis],w={horizontal:u,base:g.base,enableBorderRadius:!x||Co(f._custom)||o===x._top||o===x._bottom,x:u?g.head:b.center,y:u?b.center:g.head,height:u?b.size:Math.abs(g.size),width:u?Math.abs(g.size):b.size};h&&(w.options=p||this.resolveDataElementOptions(d,t[d].active?"active":r));const E=w.options||t[d].options;tv(w,E,x,o),nv(w,E,c.ratio),this.updateElement(t[d],d,w,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),s=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[i.axis],u=c=>{const p=c._parsed.find(d=>d[i.axis]===l),h=p&&p[c.vScale.axis];if(X(h)||isNaN(h))return!0};for(const c of r)if(!(e!==void 0&&u(c))&&((s===!1||o.indexOf(c.stack)===-1||s===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),s=e!==void 0?r.indexOf(e):-1;return s===-1?r.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let s,o;for(s=0,o=e.data.length;s<o;++s)r.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const a=t.barThickness;return{min:a||Yb(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(t),u=l._custom,c=Co(u);let p=l[e.axis],h=0,d=i?this.applyStack(e,l,i):p,f,g;d!==p&&(h=d-p,d=p),c&&(p=u.barStart,d=u.barEnd-u.barStart,p!==0&&te(p)!==te(u.barEnd)&&(h=0),h+=p);const b=!X(s)&&!c?s:h;let x=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?f=e.getPixelForValue(h+d):f=x,g=f-x,Math.abs(g)<o){g=Zb(g,e,a)*o,p===a&&(x-=g/2);const w=e.getPixelForDecimal(0),E=e.getPixelForDecimal(1),v=Math.min(w,E),_=Math.max(w,E);x=Math.max(Math.min(x,_),v),f=x+g,i&&!c&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(f)-e.getValueForPixel(x))}if(x===e.getPixelForValue(a)){const w=te(g)*e.getLineWidthForValue(a)/2;x+=w,g-=w}return{size:g,base:x,head:f,center:f+g/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,s=r.skipNull,o=$(r.maxBarThickness,1/0);let a,l;if(e.grouped){const u=s?this._getStackCount(t):e.stackCount,c=r.barThickness==="flex"?Xb(t,e,r,u):Kb(t,e,r,u),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);a=c.start+c.chunk*p+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(o,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let s=0;for(;s<r;++s)this.getParsed(s)[e.axis]!==null&&!i[s].hidden&&i[s].draw(this._ctx)}}z(Gi,"id","bar"),z(Gi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),z(Gi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Yi extends Wt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const s=super.parsePrimitiveData(t,e,i,r);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+i).radius;return s}parseArrayData(t,e,i,r){const s=super.parseArrayData(t,e,i,r);for(let o=0;o<s.length;o++){const a=e[i+o];s[o]._custom=$(a[2],this.resolveDataElementOptions(o+i).radius)}return s}parseObjectData(t,e,i,r){const s=super.parseObjectData(t,e,i,r);for(let o=0;o<s.length;o++){const a=e[i+o];s[o]._custom=$(a&&a.r&&+a.r,this.resolveDataElementOptions(o+i).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:s}=e,o=this.getParsed(t),a=r.getLabelForValue(o.x),l=s.getLabelForValue(o.y),u=o._custom;return{label:i[t]||"",value:"("+a+", "+l+(u?", "+u:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const s=r==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,r),c=o.axis,p=a.axis;for(let h=e;h<e+i;h++){const d=t[h],f=!s&&this.getParsed(h),g={},b=g[c]=s?o.getPixelForDecimal(.5):o.getPixelForValue(f[c]),x=g[p]=s?a.getBasePixel():a.getPixelForValue(f[p]);g.skip=isNaN(b)||isNaN(x),u&&(g.options=l||this.resolveDataElementOptions(h,d.active?"active":r),s&&(g.options.radius=0)),this.updateElement(d,h,g,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const s=r.radius;return e!=="active"&&(r.radius=0),r.radius+=$(i&&i._custom,s),r}}z(Yi,"id","bubble"),z(Yi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),z(Yi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function iv(n,t,e){let i=1,r=1,s=0,o=0;if(t<ot){const a=n,l=a+t,u=Math.cos(a),c=Math.sin(a),p=Math.cos(l),h=Math.sin(l),d=(E,v,_)=>Fn(E,a,l,!0)?1:Math.max(v,v*e,_,_*e),f=(E,v,_)=>Fn(E,a,l,!0)?-1:Math.min(v,v*e,_,_*e),g=d(0,u,p),b=d(mt,c,h),x=f(at,u,p),w=f(at+mt,c,h);i=(g-x)/2,r=(b-w)/2,s=-(g+x)/2,o=-(b+w)/2}return{ratioX:i,ratioY:r,offsetX:s,offsetY:o}}class Ie extends Wt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let s=l=>+i[l];if(J(i[t])){const{key:l="value"}=this._parsing;s=u=>+Se(i[u],l)}let o,a;for(o=t,a=t+e;o<a;++o)r._parsed[o]=s(o)}}_getRotation(){return zt(this.options.rotation-90)}_getCircumference(){return zt(this.options.circumference)}_getRotationExtents(){let t=ot,e=-ot;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,s=r._getRotation(),o=r._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,s=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-o)/2,0),l=Math.min(my(this.options.cutout,a),1),u=this._getRingWeight(this.index),{circumference:c,rotation:p}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:f,offsetY:g}=iv(p,c,l),b=(i.width-o)/h,x=(i.height-o)/d,w=Math.max(Math.min(b,x)/2,0),E=md(this.options.radius,w),v=Math.max(E*l,0),_=(E-v)/this._getVisibleDatasetWeightTotal();this.offsetX=f*E,this.offsetY=g*E,r.total=this.calculateTotal(),this.outerRadius=E-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*u,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*s/ot)}updateElements(t,e,i,r){const s=r==="reset",o=this.chart,a=o.chartArea,u=o.options.animation,c=(a.left+a.right)/2,p=(a.top+a.bottom)/2,h=s&&u.animateScale,d=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(e,r);let x=this._getRotation(),w;for(w=0;w<e;++w)x+=this._circumference(w,s);for(w=e;w<e+i;++w){const E=this._circumference(w,s),v=t[w],_={x:c+this.offsetX,y:p+this.offsetY,startAngle:x,endAngle:x+E,circumference:E,outerRadius:f,innerRadius:d};b&&(_.options=g||this.resolveDataElementOptions(w,v.active?"active":r)),x+=E,this.updateElement(v,w,_,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const s=t._parsed[r];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(s))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?ot*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],s=Yn(e._parsed[t],i.options.locale);return{label:r[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,s,o,a,l;if(!t){for(r=0,s=i.data.datasets.length;r<s;++r)if(i.isDatasetVisible(r)){o=i.getDatasetMeta(r),t=o.data,a=o.controller;break}}if(!t)return 0;for(r=0,s=t.length;r<s;++r)l=a.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const s=this.resolveDataElementOptions(i);e=Math.max(e,s.offset||0,s.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max($(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}z(Ie,"id","doughnut"),z(Ie,"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"}),z(Ie,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),z(Ie,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((s,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class Ki extends Wt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:a,count:l}=kd(e,r,o);this._drawStart=a,this._drawCount=l,Cd(e)&&(a=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=r;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},t),this.updateElements(r,a,l,t)}updateElements(t,e,i,r){const s=r==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:p}=this._getSharedOptions(e,r),h=o.axis,d=a.axis,{spanGaps:f,segment:g}=this.options,b=en(f)?f:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||r==="none",w=e+i,E=t.length;let v=e>0&&this.getParsed(e-1);for(let _=0;_<E;++_){const k=t[_],M=x?k:{};if(_<e||_>=w){M.skip=!0;continue}const P=this.getParsed(_),T=X(P[d]),A=M[h]=o.getPixelForValue(P[h],_),L=M[d]=s||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,P,l):P[d],_);M.skip=isNaN(A)||isNaN(L)||T,M.stop=_>0&&Math.abs(P[h]-v[h])>b,g&&(M.parsed=P,M.raw=u.data[_]),p&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":r)),x||this.updateElement(k,_,M,r),v=P}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const s=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}z(Ki,"id","line"),z(Ki,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),z(Ki,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Tn extends Wt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],s=Yn(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:s}}parseObjectData(t,e,i,r){return Td.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const s=this.getParsed(r).r;!isNaN(s)&&this.chart.getDataVisibility(r)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(r/2,0),o=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),a=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,r){const s=r==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,p=u.yCenter,h=u.getIndexAngle(0)-.5*at;let d=h,f;const g=360/this.countVisibleElements();for(f=0;f<e;++f)d+=this._computeAngle(f,r,g);for(f=e;f<e+i;f++){const b=t[f];let x=d,w=d+this._computeAngle(f,r,g),E=o.getDataVisibility(f)?u.getDistanceFromCenterForValue(this.getParsed(f).r):0;d=w,s&&(l.animateScale&&(E=0),l.animateRotate&&(x=w=h));const v={x:c,y:p,innerRadius:0,outerRadius:E,startAngle:x,endAngle:w,options:this.resolveDataElementOptions(f,b.active?"active":r)};this.updateElement(b,f,v,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?zt(this.resolveDataElementOptions(t,e).angle||i):0}}z(Tn,"id","polarArea"),z(Tn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),z(Tn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((s,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ha extends Ie{}z(ha,"id","pie"),z(ha,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Xi extends Wt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return Td.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],s=e.iScale.getLabels();if(i.points=r,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===r.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const s=this._cachedMeta.rScale,o=r==="reset";for(let a=e;a<e+i;a++){const l=t[a],u=this.resolveDataElementOptions(a,l.active?"active":r),c=s.getPointPositionForValue(a,this.getParsed(a).r),p=o?s.xCenter:c.x,h=o?s.yCenter:c.y,d={x:p,y:h,angle:c.angle,skip:isNaN(p)||isNaN(h),options:u};this.updateElement(l,a,d,r)}}}z(Xi,"id","radar"),z(Xi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),z(Xi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ji extends Wt{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:s}=e,o=this.getParsed(t),a=r.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:i[t]||"",value:"("+a+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:s,count:o}=kd(e,i,r);if(this._drawStart=s,this._drawCount=o,Cd(e)&&(s=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=i;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(a,void 0,{animated:!r,options:u},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const s=r==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(e,r),p=this.getSharedOptions(c),h=this.includeOptions(r,p),d=o.axis,f=a.axis,{spanGaps:g,segment:b}=this.options,x=en(g)?g:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||s||r==="none";let E=e>0&&this.getParsed(e-1);for(let v=e;v<e+i;++v){const _=t[v],k=this.getParsed(v),M=w?_:{},P=X(k[f]),T=M[d]=o.getPixelForValue(k[d],v),A=M[f]=s||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[f],v);M.skip=isNaN(T)||isNaN(A)||P,M.stop=v>0&&Math.abs(k[d]-E[d])>x,b&&(M.parsed=k,M.raw=u.data[v]),h&&(M.options=p||this.resolveDataElementOptions(v,_.active?"active":r)),w||this.updateElement(_,v,M,r),E=k}this.updateSharedOptions(p,r,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,s,o)/2}}z(Ji,"id","scatter"),z(Ji,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),z(Ji,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var rv=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Yi,DoughnutController:Ie,LineController:Ki,PieController:ha,PolarAreaController:Tn,RadarController:Xi,ScatterController:Ji});function Oe(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Za{constructor(t){z(this,"options");this.options=t||{}}static override(t){Object.assign(Za.prototype,t)}init(){}formats(){return Oe()}parse(){return Oe()}format(){return Oe()}add(){return Oe()}diff(){return Oe()}startOf(){return Oe()}endOf(){return Oe()}}var sv={_date:Za};function ov(n,t,e,i){const{controller:r,data:s,_sorted:o}=n,a=r._cachedMeta.iScale,l=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const u=a._reversePixels?Oy:fe;if(i){if(r._sharedOptions){const c=s[0],p=typeof c.getRange=="function"&&c.getRange(t);if(p){const h=u(s,t,e-p),d=u(s,t,e+p);return{lo:h.lo,hi:d.hi}}}}else{const c=u(s,t,e);if(l){const{vScale:p}=r._cachedMeta,{_parsed:h}=n,d=h.slice(0,c.lo+1).reverse().findIndex(g=>!X(g[p.axis]));c.lo-=Math.max(0,d);const f=h.slice(c.hi).findIndex(g=>!X(g[p.axis]));c.hi+=Math.max(0,f)}return c}}return{lo:0,hi:s.length-1}}function Lr(n,t,e,i,r){const s=n.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:p,hi:h}=ov(s[a],t,o,r);for(let d=p;d<=h;++d){const f=c[d];f.skip||i(f,u,d)}}}function av(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const s=t?Math.abs(i.x-r.x):0,o=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Mo(n,t,e,i,r){const s=[];return!r&&!n.isPointInArea(t)||Lr(n,e,t,function(a,l,u){!r&&!de(a,n.chartArea,0)||a.inRange(t.x,t.y,i)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function lv(n,t,e,i){let r=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],i),{angle:p}=vd(o,{x:t.x,y:t.y});Fn(p,u,c)&&r.push({element:o,datasetIndex:a,index:l})}return Lr(n,e,t,s),r}function cv(n,t,e,i,r,s){let o=[];const a=av(e);let l=Number.POSITIVE_INFINITY;function u(c,p,h){const d=c.inRange(t.x,t.y,r);if(i&&!d)return;const f=c.getCenterPoint(r);if(!(!!s||n.isPointInArea(f))&&!d)return;const b=a(t,f);b<l?(o=[{element:c,datasetIndex:p,index:h}],l=b):b===l&&o.push({element:c,datasetIndex:p,index:h})}return Lr(n,e,t,u),o}function Eo(n,t,e,i,r,s){return!s&&!n.isPointInArea(t)?[]:e==="r"&&!i?lv(n,t,e,r):cv(n,t,e,i,r,s)}function dh(n,t,e,i,r){const s=[],o=e==="x"?"inXRange":"inYRange";let a=!1;return Lr(n,e,t,(l,u,c)=>{l[o]&&l[o](t[e],r)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,r))}),i&&!a?[]:s}var uv={modes:{index(n,t,e,i){const r=Le(t,n),s=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?Mo(n,r,s,i,o):Eo(n,r,s,!1,i,o),l=[];return a.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,p=u.data[c];p&&!p.skip&&l.push({element:p,datasetIndex:u.index,index:c})}),l):[]},dataset(n,t,e,i){const r=Le(t,n),s=e.axis||"xy",o=e.includeInvisible||!1;let a=e.intersect?Mo(n,r,s,i,o):Eo(n,r,s,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,u=n.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(n,t,e,i){const r=Le(t,n),s=e.axis||"xy",o=e.includeInvisible||!1;return Mo(n,r,s,i,o)},nearest(n,t,e,i){const r=Le(t,n),s=e.axis||"xy",o=e.includeInvisible||!1;return Eo(n,r,s,e.intersect,i,o)},x(n,t,e,i){const r=Le(t,n);return dh(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=Le(t,n);return dh(n,r,"y",e.intersect,i)}}};const Vd=["left","top","right","bottom"];function pn(n,t){return n.filter(e=>e.pos===t)}function ph(n,t){return n.filter(e=>Vd.indexOf(e.pos)===-1&&e.box.axis===t)}function gn(n,t){return n.sort((e,i)=>{const r=t?i:e,s=t?e:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function hv(n){const t=[];let e,i,r,s,o,a;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:s,options:{stack:o,stackWeight:a=1}}=r,t.push({index:e,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return t}function fv(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:s}=e;if(!i||!Vd.includes(r))continue;const o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function dv(n,t){const e=fv(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let s,o,a;for(s=0,o=n.length;s<o;++s){a=n[s];const{fullSize:l}=a.box,u=e[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*i:l&&t.availableWidth,a.height=r):(a.width=i,a.height=c?c*r:l&&t.availableHeight)}return e}function pv(n){const t=hv(n),e=gn(t.filter(u=>u.box.fullSize),!0),i=gn(pn(t,"left"),!0),r=gn(pn(t,"right")),s=gn(pn(t,"top"),!0),o=gn(pn(t,"bottom")),a=ph(t,"x"),l=ph(t,"y");return{fullSize:e,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:pn(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function gh(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Wd(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function gv(n,t,e,i){const{pos:r,box:s}=e,o=n.maxPadding;if(!J(r)){e.size&&(n[r]-=e.size);const p=i[e.stack]||{size:0,count:1};p.size=Math.max(p.size,e.horizontal?s.height:s.width),e.size=p.size/p.count,n[r]+=e.size}s.getPadding&&Wd(o,s.getPadding());const a=Math.max(0,t.outerWidth-gh(o,n,"left","right")),l=Math.max(0,t.outerHeight-gh(o,n,"top","bottom")),u=a!==n.w,c=l!==n.h;return n.w=a,n.h=l,e.horizontal?{same:u,other:c}:{same:c,other:u}}function mv(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function yv(n,t){const e=t.maxPadding;function i(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],e[o])}),s}return i(n?["left","right"]:["top","bottom"])}function xn(n,t,e,i){const r=[];let s,o,a,l,u,c;for(s=0,o=n.length,u=0;s<o;++s){a=n[s],l=a.box,l.update(a.width||t.w,a.height||t.h,yv(a.horizontal,t));const{same:p,other:h}=gv(t,e,a,i);u|=p&&r.length,c=c||h,l.fullSize||r.push(a)}return u&&xn(r,t,e,i)||c}function Ti(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function mh(n,t,e,i){const r=e.padding;let{x:s,y:o}=t;for(const a of n){const l=a.box,u=i[a.stack]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const p=t.w*c,h=u.size||l.height;Nn(u.start)&&(o=u.start),l.fullSize?Ti(l,r.left,o,e.outerWidth-r.right-r.left,h):Ti(l,t.left+u.placed,o,p,h),u.start=o,u.placed+=p,o=l.bottom}else{const p=t.h*c,h=u.size||l.width;Nn(u.start)&&(s=u.start),l.fullSize?Ti(l,s,r.top,h,e.outerHeight-r.bottom-r.top):Ti(l,s,t.top+u.placed,h,p),u.start=s,u.placed+=p,s=l.right}}t.x=s,t.y=o}var Ct={addBox(n,t){n.boxes||(n.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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=Mt(n.options.layout.padding),s=Math.max(t-r.width,0),o=Math.max(e-r.height,0),a=pv(n.boxes),l=a.vertical,u=a.horizontal;nt(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const c=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),h=Object.assign({},r);Wd(h,Mt(i));const d=Object.assign({maxPadding:h,w:s,h:o,x:r.left,y:r.top},r),f=dv(l.concat(u),p);xn(a.fullSize,d,p,f),xn(l,d,p,f),xn(u,d,p,f)&&xn(l,d,p,f),mv(d),mh(a.leftAndTop,d,p,f),d.x+=d.w,d.y+=d.h,mh(a.rightAndBottom,d,p,f),n.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},nt(a.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Ud{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class bv extends Ud{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Zi="$chartjs",vv={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},yh=n=>n===null||n==="";function _v(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Zi]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",yh(r)){const s=th(n,"width");s!==void 0&&(n.width=s)}if(yh(i))if(n.style.height==="")n.height=n.width/(t||2);else{const s=th(n,"height");s!==void 0&&(n.height=s)}return n}const $d=wb?{passive:!0}:!1;function xv(n,t,e){n&&n.addEventListener(t,e,$d)}function wv(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,$d)}function Sv(n,t){const e=vv[n.type]||n.type,{x:i,y:r}=Le(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function lr(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function kv(n,t,e){const i=n.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||lr(a.addedNodes,i),o=o&&!lr(a.removedNodes,i);o&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Cv(n,t,e){const i=n.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||lr(a.removedNodes,i),o=o&&!lr(a.addedNodes,i);o&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const jn=new Map;let bh=0;function Gd(){const n=window.devicePixelRatio;n!==bh&&(bh=n,jn.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Mv(n,t){jn.size||window.addEventListener("resize",Gd),jn.set(n,t)}function Ev(n){jn.delete(n),jn.size||window.removeEventListener("resize",Gd)}function Pv(n,t,e){const i=n.canvas,r=i&&Ja(i);if(!r)return;const s=Sd((a,l)=>{const u=r.clientWidth;e(a,l),u<r.clientWidth&&e()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(r),Mv(n,s),o}function Po(n,t,e){e&&e.disconnect(),t==="resize"&&Ev(n)}function Ov(n,t,e){const i=n.canvas,r=Sd(s=>{n.ctx!==null&&e(Sv(s,n))},n);return xv(i,t,r),r}class Av extends Ud{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(_v(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Zi])return!1;const i=e[Zi].initial;["height","width"].forEach(s=>{const o=i[s];X(o)?e.removeAttribute(s):e.setAttribute(s,o)});const r=i.style||{};return Object.keys(r).forEach(s=>{e.style[s]=r[s]}),e.width=e.width,delete e[Zi],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),o={attach:kv,detach:Cv,resize:Pv}[e]||Ov;r[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:Po,detach:Po,resize:Po}[e]||wv)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return xb(t,e,i,r)}isAttached(t){const e=t&&Ja(t);return!!(e&&e.isConnected)}}function Lv(n){return!Xa()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?bv:Av}class Ut{constructor(){z(this,"x");z(this,"y");z(this,"active",!1);z(this,"options");z(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return en(this.x)&&en(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}}z(Ut,"defaults",{}),z(Ut,"defaultRoutes");function Rv(n,t){const e=n.options.ticks,i=Tv(n),r=Math.min(e.maxTicksLimit||i,i),s=e.major.enabled?Dv(t):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>r)return Bv(t,u,s,o/r),u;const c=Iv(s,t,r);if(o>0){let p,h;const d=o>1?Math.round((l-a)/(o-1)):null;for(Ii(t,u,c,X(d)?0:a-d,a),p=0,h=o-1;p<h;p++)Ii(t,u,c,s[p],s[p+1]);return Ii(t,u,c,l,X(d)?t.length:l+d),u}return Ii(t,u,c),u}function Tv(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function Iv(n,t,e){const i=Nv(n),r=t.length/e;if(!i)return Math.max(r,1);const s=ky(i);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>r)return l}return Math.max(r,1)}function Dv(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Bv(n,t,e,i){let r=0,s=e[0],o;for(i=Math.ceil(i),o=0;o<n.length;o++)o===s&&(t.push(n[o]),r++,s=e[r*i])}function Ii(n,t,e,i,r){const s=$(i,0),o=Math.min($(r,n.length),n.length);let a=0,l,u,c;for(e=Math.ceil(e),r&&(l=r-i,e=l/Math.floor(l/e)),c=s;c<0;)a++,c=Math.round(s+a*e);for(u=Math.max(s,0);u<o;u++)u===c&&(t.push(n[u]),a++,c=Math.round(s+a*e))}function Nv(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const Fv=n=>n==="left"?"right":n==="right"?"left":n,vh=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,_h=(n,t)=>Math.min(t||n,n);function xh(n,t){const e=[],i=n.length/t,r=n.length;let s=0;for(;s<r;s+=i)e.push(n[Math.floor(s)]);return e}function qv(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),s=n._startPixel,o=n._endPixel,a=1e-6;let l=n.getPixelForTick(r),u;if(!(e&&(i===1?u=Math.max(l-s,o-l):t===0?u=(n.getPixelForTick(1)-l)/2:u=(l-n.getPixelForTick(r-1))/2,l+=r<t?u:-u,l<s-a||l>o+a)))return l}function jv(n,t){nt(n,e=>{const i=e.gc,r=i.length/2;let s;if(r>t){for(s=0;s<r;++s)delete e.data[i[s]];i.splice(0,r)}})}function mn(n){return n.drawTicks?n.tickLength:0}function wh(n,t){if(!n.display)return 0;const e=vt(n.font,t),i=Mt(n.padding);return(ct(n.text)?n.text.length:1)*e.lineHeight+i.height}function Hv(n,t){return Ce(n,{scale:t,type:"scale"})}function zv(n,t,e){return Ce(n,{tick:e,index:t,type:"tick"})}function Vv(n,t,e){let i=Wa(n);return(e&&t!=="right"||!e&&t==="right")&&(i=Fv(i)),i}function Wv(n,t,e,i){const{top:r,left:s,bottom:o,right:a,chart:l}=n,{chartArea:u,scales:c}=l;let p=0,h,d,f;const g=o-r,b=a-s;if(n.isHorizontal()){if(d=kt(i,s,a),J(e)){const x=Object.keys(e)[0],w=e[x];f=c[x].getPixelForValue(w)+g-t}else e==="center"?f=(u.bottom+u.top)/2+g-t:f=vh(n,e,t);h=a-s}else{if(J(e)){const x=Object.keys(e)[0],w=e[x];d=c[x].getPixelForValue(w)-b+t}else e==="center"?d=(u.left+u.right)/2-b+t:d=vh(n,e,t);f=kt(i,o,r),p=e==="left"?-mt:mt}return{titleX:d,titleY:f,maxWidth:h,rotation:p}}class He extends Ut{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=Dt(t,Number.POSITIVE_INFINITY),e=Dt(e,Number.NEGATIVE_INFINITY),i=Dt(i,Number.POSITIVE_INFINITY),r=Dt(r,Number.NEGATIVE_INFINITY),{min:Dt(t,i),max:Dt(e,r),minDefined:gt(t),maxDefined:gt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:s}=this.getUserBounds(),o;if(r&&s)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),r||(e=Math.min(e,o.min)),s||(i=Math.max(i,o.max));return e=s&&e>i?i:e,i=r&&e>i?e:i,{min:Dt(e,Dt(i,e)),max:Dt(i,Dt(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){st(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Qy(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?xh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Rv(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,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){st(this.options.afterUpdate,[this])}beforeSetDimensions(){st(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(){st(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),st(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){st(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i],s.label=st(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){st(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){st(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=_h(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,s=e.maxRotation;let o=r,a,l,u;if(!this._isVisible()||!e.display||r>=s||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),p=c.widest.width,h=c.highest.height,d=_t(this.chart.width-p,0,this.maxWidth);a=t.offset?this.maxWidth/i:d/(i-1),p+6>a&&(a=d/(i-(t.offset?.5:1)),l=this.maxHeight-mn(t.grid)-e.padding-wh(t.title,this.chart.options.font),u=Math.sqrt(p*p+h*h),o=za(Math.min(Math.asin(_t((c.highest.height+6)/a,-1,1)),Math.asin(_t(l/u,-1,1))-Math.asin(_t(h/u,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){st(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){st(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=wh(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=mn(s)+l):(t.height=this.maxHeight,t.width=mn(s)+l),i.display&&this.ticks.length){const{first:u,last:c,widest:p,highest:h}=this._getLabelSizes(),d=i.padding*2,f=zt(this.labelRotation),g=Math.cos(f),b=Math.sin(f);if(a){const x=i.mirror?0:b*p.width+g*h.height;t.height=Math.min(this.maxHeight,t.height+x+d)}else{const x=i.mirror?0:g*p.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+x+d)}this._calculatePadding(u,c,b,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;l?u?(h=r*t.width,d=i*e.height):(h=i*t.height,d=r*e.width):s==="start"?d=e.width:s==="end"?h=t.width:s!=="inner"&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-p+o)*this.width/(this.width-p),0)}else{let c=e.height/2,p=t.height/2;s==="start"?(c=0,p=t.height):s==="end"&&(c=e.height,p=0),this.paddingTop=c+o,this.paddingBottom=p+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){st(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)X(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=xh(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(e/_h(e,i));let u=0,c=0,p,h,d,f,g,b,x,w,E,v,_;for(p=0;p<e;p+=l){if(f=t[p].label,g=this._resolveTickFontOptions(p),r.font=b=g.string,x=s[b]=s[b]||{data:{},gc:[]},w=g.lineHeight,E=v=0,!X(f)&&!ct(f))E=or(r,x.data,x.gc,E,f),v=w;else if(ct(f))for(h=0,d=f.length;h<d;++h)_=f[h],!X(_)&&!ct(_)&&(E=or(r,x.data,x.gc,E,_),v+=w);o.push(E),a.push(v),u=Math.max(E,u),c=Math.max(v,c)}jv(s,e);const k=o.indexOf(u),M=a.indexOf(c),P=T=>({width:o[T]||0,height:a[T]||0});return{first:P(0),last:P(e-1),widest:P(k),highest:P(M),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Py(this._alignToPixels?Pe(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=zv(this.getContext(),t,i))}return this.$context||(this.$context=Hv(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=zt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*i>a*r?a/i:l/r:l*r<a*i?l/i:a/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:s,position:o,border:a}=r,l=s.offset,u=this.isHorizontal(),p=this.ticks.length+(l?1:0),h=mn(s),d=[],f=a.setContext(this.getContext()),g=f.display?f.width:0,b=g/2,x=function(B){return Pe(i,B,g)};let w,E,v,_,k,M,P,T,A,L,I,j;if(o==="top")w=x(this.bottom),M=this.bottom-h,T=w-b,L=x(t.top)+b,j=t.bottom;else if(o==="bottom")w=x(this.top),L=t.top,j=x(t.bottom)-b,M=w+b,T=this.top+h;else if(o==="left")w=x(this.right),k=this.right-h,P=w-b,A=x(t.left)+b,I=t.right;else if(o==="right")w=x(this.left),A=t.left,I=x(t.right)-b,k=w+b,P=this.left+h;else if(e==="x"){if(o==="center")w=x((t.top+t.bottom)/2+.5);else if(J(o)){const B=Object.keys(o)[0],q=o[B];w=x(this.chart.scales[B].getPixelForValue(q))}L=t.top,j=t.bottom,M=w+b,T=M+h}else if(e==="y"){if(o==="center")w=x((t.left+t.right)/2);else if(J(o)){const B=Object.keys(o)[0],q=o[B];w=x(this.chart.scales[B].getPixelForValue(q))}k=w-b,P=k-h,A=t.left,I=t.right}const F=$(r.ticks.maxTicksLimit,p),D=Math.max(1,Math.ceil(p/F));for(E=0;E<p;E+=D){const B=this.getContext(E),q=s.setContext(B),H=a.setContext(B),V=q.lineWidth,W=q.color,Q=H.dash||[],et=H.dashOffset,rt=q.tickWidth,U=q.tickColor,tt=q.tickBorderDash||[],wt=q.tickBorderDashOffset;v=qv(this,E,l),v!==void 0&&(_=Pe(i,v,V),u?k=P=A=I=_:M=T=L=j=_,d.push({tx1:k,ty1:M,tx2:P,ty2:T,x1:A,y1:L,x2:I,y2:j,width:V,color:W,borderDash:Q,borderDashOffset:et,tickWidth:rt,tickColor:U,tickBorderDash:tt,tickBorderDashOffset:wt}))}return this._ticksLength=p,this._borderValue=w,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:s}=i,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:p}=s,h=mn(i.grid),d=h+c,f=p?-c:d,g=-zt(this.labelRotation),b=[];let x,w,E,v,_,k,M,P,T,A,L,I,j="middle";if(r==="top")k=this.bottom-f,M=this._getXAxisLabelAlignment();else if(r==="bottom")k=this.top+f,M=this._getXAxisLabelAlignment();else if(r==="left"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,_=D.x}else if(r==="right"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,_=D.x}else if(e==="x"){if(r==="center")k=(t.top+t.bottom)/2+d;else if(J(r)){const D=Object.keys(r)[0],B=r[D];k=this.chart.scales[D].getPixelForValue(B)+d}M=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")_=(t.left+t.right)/2-d;else if(J(r)){const D=Object.keys(r)[0],B=r[D];_=this.chart.scales[D].getPixelForValue(B)}M=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const F=this._getLabelSizes();for(x=0,w=a.length;x<w;++x){E=a[x],v=E.label;const D=s.setContext(this.getContext(x));P=this.getPixelForTick(x)+s.labelOffset,T=this._resolveTickFontOptions(x),A=T.lineHeight,L=ct(v)?v.length:1;const B=L/2,q=D.color,H=D.textStrokeColor,V=D.textStrokeWidth;let W=M;o?(_=P,M==="inner"&&(x===w-1?W=this.options.reverse?"left":"right":x===0?W=this.options.reverse?"right":"left":W="center"),r==="top"?u==="near"||g!==0?I=-L*A+A/2:u==="center"?I=-F.highest.height/2-B*A+A:I=-F.highest.height+A/2:u==="near"||g!==0?I=A/2:u==="center"?I=F.highest.height/2-B*A:I=F.highest.height-L*A,p&&(I*=-1),g!==0&&!D.showLabelBackdrop&&(_+=A/2*Math.sin(g))):(k=P,I=(1-L)*A/2);let Q;if(D.showLabelBackdrop){const et=Mt(D.backdropPadding),rt=F.heights[x],U=F.widths[x];let tt=I-et.top,wt=0-et.left;switch(j){case"middle":tt-=rt/2;break;case"bottom":tt-=rt;break}switch(M){case"center":wt-=U/2;break;case"right":wt-=U;break;case"inner":x===w-1?wt-=U:x>0&&(wt-=U/2);break}Q={left:wt,top:tt,width:U+et.width,height:rt+et.height,color:D.backdropColor}}b.push({label:v,font:T,textOffset:I,options:{rotation:g,color:q,strokeColor:H,strokeWidth:V,textAlign:W,textBaseline:j,translation:[_,k],backdrop:Q}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-zt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let u,c;return e==="left"?r?(c=this.right+s,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c=this.left)):e==="right"?r?(c=this.left+s,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(s=>s.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=r.length;s<o;++s){const l=r[s];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.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:e,options:{border:i,grid:r}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,p,h;this.isHorizontal()?(u=Pe(t,this.left,o)-o/2,c=Pe(t,this.right,a)+a/2,p=h=l):(p=Pe(t,this.top,o)-o/2,h=Pe(t,this.bottom,a)+a/2,u=c=l),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(u,p),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Pr(i,r);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;qe(i,u,0,c,l,a)}r&&Or(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const s=vt(i.font),o=Mt(i.padding),a=i.align;let l=s.lineHeight/2;e==="bottom"||e==="center"||J(e)?(l+=o.bottom,ct(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:p,rotation:h}=Wv(this,l,e,a);qe(t,i.text,0,0,s,{color:i.color,maxWidth:p,rotation:h,textAlign:Vv(a,e,r),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=$(t.grid&&t.grid.z,-1),r=$(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==He.prototype.draw?[{z:e,draw:s=>{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let s,o;for(s=0,o=e.length;s<o;++s){const a=e[s];a[i]===this.id&&(!t||a.type===t)&&r.push(a)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return vt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Di{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;Gv(e)&&(i=this.register(e));const r=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in r||(r[s]=t,Uv(t,o,i),this.override&&ut.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in ut[r]&&(delete ut[r][i],this.override&&delete Fe[i])}}function Uv(n,t,e){const i=Bn(Object.create(null),[e?ut.get(e):{},ut.get(t),n.defaults]);ut.set(t,i),n.defaultRoutes&&$v(t,n.defaultRoutes),n.descriptors&&ut.describe(t,n.descriptors)}function $v(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),s=[n].concat(i).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");ut.route(s,r,l,a)})}function Gv(n){return"id"in n&&"defaults"in n}class Yv{constructor(){this.controllers=new Di(Wt,"datasets",!0),this.elements=new Di(Ut,"elements"),this.plugins=new Di(Object,"plugins"),this.scales=new Di(He,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):nt(r,o=>{const a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,i){const r=Ha(t);st(i["before"+r],[],i),e[t](i),st(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var Jt=new Yv;class Kv{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(s,t,e,i);return e==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,r){r=r||{};for(const s of t){const o=s.plugin,a=o[i],l=[e,r,s.options];if(st(a,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){X(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=$(i.options&&i.options.plugins,{}),s=Xv(i);return r===!1&&!e?[]:Zv(t,s,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function Xv(n){const t={},e=[],i=Object.keys(Jt.plugins.items);for(let s=0;s<i.length;s++)e.push(Jt.getPlugin(i[s]));const r=n.plugins||[];for(let s=0;s<r.length;s++){const o=r[s];e.indexOf(o)===-1&&(e.push(o),t[o.id]=!0)}return{plugins:e,localIds:t}}function Jv(n,t){return!t&&n===!1?null:n===!0?{}:n}function Zv(n,{plugins:t,localIds:e},i,r){const s=[],o=n.getContext();for(const a of t){const l=a.id,u=Jv(i[l],r);u!==null&&s.push({plugin:a,options:Qv(n.config,{plugin:a,local:e[l]},u,o)})}return s}function Qv(n,{plugin:t,local:e},i,r){const s=n.pluginScopeKeys(t),o=n.getOptionScopes(i,s);return e&&t.defaults&&o.push(t.defaults),n.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function fa(n,t){const e=ut.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function t_(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function e_(n,t){return n===t?"_index_":"_value_"}function Sh(n){if(n==="x"||n==="y"||n==="r")return n}function n_(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function da(n,...t){if(Sh(n))return n;for(const e of t){const i=e.axis||n_(e.position)||n.length>1&&Sh(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function kh(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function i_(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return kh(n,"x",e[0])||kh(n,"y",e[0])}return{}}function r_(n,t){const e=Fe[n.type]||{scales:{}},i=t.scales||{},r=fa(n.type,t),s=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!J(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=da(o,a,i_(o,n),ut.scales[a.type]),u=e_(l,r),c=e.scales||{};s[o]=On(Object.create(null),[{axis:l},a,c[l],c[u]])}),n.data.datasets.forEach(o=>{const a=o.type||n.type,l=o.indexAxis||fa(a,t),c=(Fe[a]||{}).scales||{};Object.keys(c).forEach(p=>{const h=t_(p,l),d=o[h+"AxisID"]||h;s[d]=s[d]||Object.create(null),On(s[d],[{axis:h},i[d],c[p]])})}),Object.keys(s).forEach(o=>{const a=s[o];On(a,[ut.scales[a.type],ut.scale])}),s}function Yd(n){const t=n.options||(n.options={});t.plugins=$(t.plugins,{}),t.scales=r_(n,t)}function Kd(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function s_(n){return n=n||{},n.data=Kd(n.data),Yd(n),n}const Ch=new Map,Xd=new Set;function Bi(n,t){let e=Ch.get(n);return e||(e=t(),Ch.set(n,e),Xd.add(e)),e}const yn=(n,t,e)=>{const i=Se(t,e);i!==void 0&&n.add(i)};class o_{constructor(t){this._config=s_(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=Kd(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(),Yd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Bi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Bi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Bi(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:s}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const l=new Set;e.forEach(c=>{t&&(l.add(t),c.forEach(p=>yn(l,t,p))),c.forEach(p=>yn(l,r,p)),c.forEach(p=>yn(l,Fe[s]||{},p)),c.forEach(p=>yn(l,ut,p)),c.forEach(p=>yn(l,ca,p))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Xd.has(e)&&o.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,Fe[e]||{},ut.datasets[e]||{},{type:e},ut,ca]}resolveNamedOptions(t,e,i,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Mh(this._resolverCache,t,r);let l=o;if(l_(o,e)){s.$shared=!1,i=ke(i)?i():i;const u=this.createResolver(t,i,a);l=nn(o,i,u)}for(const u of e)s[u]=l[u];return s}createResolver(t,e,i=[""],r){const{resolver:s}=Mh(this._resolverCache,t,i);return J(e)?nn(s,e,void 0,r):s}}function Mh(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let s=i.get(r);return s||(s={resolver:Ga(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,s)),s}const a_=n=>J(n)&&Object.getOwnPropertyNames(n).some(t=>ke(n[t]));function l_(n,t){const{isScriptable:e,isIndexable:i}=Od(n);for(const r of t){const s=e(r),o=i(r),a=(o||s)&&n[r];if(s&&(ke(a)||a_(a))||o&&ct(a))return!0}return!1}var c_="4.4.8";const u_=["top","bottom","left","right","chartArea"];function Eh(n,t){return n==="top"||n==="bottom"||u_.indexOf(n)===-1&&t==="x"}function Ph(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Oh(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),st(e&&e.onComplete,[n],t)}function h_(n){const t=n.chart,e=t.options.animation;st(e&&e.onProgress,[n],t)}function Jd(n){return Xa()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Qi={},Ah=n=>{const t=Jd(n);return Object.values(Qi).filter(e=>e.canvas===t).pop()};function f_(n,t,e){const i=Object.keys(n);for(const r of i){const s=+r;if(s>=t){const o=n[r];delete n[r],(e>0||s>t)&&(n[s+e]=o)}}}function d_(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Ni(n,t,e){return n.options.clip?n[e]:t[e]}function p_(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Ni(e,t,"left"),right:Ni(e,t,"right"),top:Ni(i,t,"top"),bottom:Ni(i,t,"bottom")}:t}class le{static register(...t){Jt.add(...t),Lh()}static unregister(...t){Jt.remove(...t),Lh()}constructor(t,e){const i=this.config=new o_(e),r=Jd(t),s=Ah(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Lv(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=gy(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Kv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ry(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],Qi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}se.listen(this,"complete",Oh),se.listen(this,"progress",h_),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:s}=this;return X(t)?e&&s?s:r?i/r: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 Jt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Xu(this.canvas,this.ctx),this}stop(){return se.stop(this),this}resize(t,e){se.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,e,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Qu(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),st(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};nt(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let s=[];e&&(s=s.concat(Object.keys(e).map(o=>{const a=e[o],l=da(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),nt(s,o=>{const a=o.options,l=a.id,u=da(l,a),c=$(a.type,o.dtype);(a.position===void 0||Eh(a.position,u)!==Eh(o.dposition))&&(a.position=o.dposition),r[l]=!0;let p=null;if(l in i&&i[l].type===c)p=i[l];else{const h=Jt.getScale(c);p=new h({id:l,type:c,ctx:this.ctx,chart:this}),i[p.id]=p}p.init(a,t)}),nt(r,(o,a)=>{o||delete i[a]}),nt(i,o=>{Ct.configure(this,o,o.options),Ct.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,s)=>r.index-s.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ph("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const s=e[i];let o=this.getDatasetMeta(i);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=s.indexAxis||fa(a,this.options),o.order=s.order||0,o.index=i,o.label=""+s.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const l=Jt.getController(a),{datasetElementType:u,dataElementType:c}=ut.datasets[a];Object.assign(l,{dataElementType:Jt.getElement(c),datasetElementType:u&&Jt.getElement(u)}),o.controller=new l(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){nt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:p}=this.getDatasetMeta(u),h=!r&&s.indexOf(p)===-1;p.buildOrUpdateElements(h),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),r||nt(s,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ph("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){nt(this.scales,t=>{Ct.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Hu(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:s}of e){const o=i==="_removeElements"?-s:s;f_(t,r,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),r=i(0);for(let s=1;s<e;s++)if(!Hu(r,i(s)))return;return Array.from(r).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ct.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],nt(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,ke(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(se.has(this)?this.attached&&!se.running(this)&&se.start(this):(this.draw(),Oh({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,s;for(r=0,s=e.length;r<s;++r){const o=e[r];(!t||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,s=p_(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Pr(e,{left:i.left===!1?0:s.left-i.left,right:i.right===!1?this.width:s.right+i.right,top:i.top===!1?0:s.top-i.top,bottom:i.bottom===!1?this.height:s.bottom+i.bottom}),t.controller.draw(),r&&Or(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return de(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const s=uv.modes[e];return typeof s=="function"?s(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(s=>s&&s._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=Ce(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);Nn(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),se.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Xu(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Qi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(s,o)=>{e.addEventListener(this,s,o),t[s]=o},r=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};nt(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,u)=>{e.addEventListener(this,l,u),t[l]=u},r=(l,u)=>{t[l]&&(e.removeEventListener(this,l,u),delete t[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){nt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},nt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let s,o,a,l;for(e==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!ir(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(p=>c.datasetIndex===p.datasetIndex&&c.index===p.index)),o=s(e,t),a=i?t:s(t,e);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:s}=this,o=e,a=this._getActiveElements(t,r,i,o),l=xy(t),u=d_(t,this._lastEvent,i,l);i&&(this._lastEvent=null,st(s.onHover,[t,a,this],this),l&&st(s.onClick,[t,a,this],this));const c=!ir(a,r);return(c||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=u,c}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,r)}}z(le,"defaults",ut),z(le,"instances",Qi),z(le,"overrides",Fe),z(le,"registry",Jt),z(le,"version",c_),z(le,"getChart",Ah);function Lh(){return nt(le.instances,n=>n._plugins.invalidate())}function g_(n,t,e){const{startAngle:i,pixelMargin:r,x:s,y:o,outerRadius:a,innerRadius:l}=t;let u=r/a;n.beginPath(),n.arc(s,o,a,i-u,e+u),l>r?(u=r/l,n.arc(s,o,l,e+u,i-u,!0)):n.arc(s,o,r,e+mt,i-mt),n.closePath(),n.clip()}function m_(n){return $a(n,["outerStart","outerEnd","innerStart","innerEnd"])}function y_(n,t,e,i){const r=m_(n.options.borderRadius),s=(e-t)/2,o=Math.min(s,i*t/2),a=l=>{const u=(e-Math.min(s,l))*i/2;return _t(l,0,Math.min(s,u))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:_t(r.innerStart,0,o),innerEnd:_t(r.innerEnd,0,o)}}function Ke(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function cr(n,t,e,i,r,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=t,p=Math.max(t.outerRadius+i+e-u,0),h=c>0?c+i+e+u:0;let d=0;const f=r-l;if(i){const D=c>0?c-i:0,B=p>0?p-i:0,q=(D+B)/2,H=q!==0?f*q/(q+i):f;d=(f-H)/2}const g=Math.max(.001,f*p-e/at)/p,b=(f-g)/2,x=l+b+d,w=r-b-d,{outerStart:E,outerEnd:v,innerStart:_,innerEnd:k}=y_(t,h,p,w-x),M=p-E,P=p-v,T=x+E/M,A=w-v/P,L=h+_,I=h+k,j=x+_/L,F=w-k/I;if(n.beginPath(),s){const D=(T+A)/2;if(n.arc(o,a,p,T,D),n.arc(o,a,p,D,A),v>0){const V=Ke(P,A,o,a);n.arc(V.x,V.y,v,A,w+mt)}const B=Ke(I,w,o,a);if(n.lineTo(B.x,B.y),k>0){const V=Ke(I,F,o,a);n.arc(V.x,V.y,k,w+mt,F+Math.PI)}const q=(w-k/h+(x+_/h))/2;if(n.arc(o,a,h,w-k/h,q,!0),n.arc(o,a,h,q,x+_/h,!0),_>0){const V=Ke(L,j,o,a);n.arc(V.x,V.y,_,j+Math.PI,x-mt)}const H=Ke(M,x,o,a);if(n.lineTo(H.x,H.y),E>0){const V=Ke(M,T,o,a);n.arc(V.x,V.y,E,x-mt,T)}}else{n.moveTo(o,a);const D=Math.cos(T)*p+o,B=Math.sin(T)*p+a;n.lineTo(D,B);const q=Math.cos(A)*p+o,H=Math.sin(A)*p+a;n.lineTo(q,H)}n.closePath()}function b_(n,t,e,i,r){const{fullCircles:s,startAngle:o,circumference:a}=t;let l=t.endAngle;if(s){cr(n,t,e,i,l,r);for(let u=0;u<s;++u)n.fill();isNaN(a)||(l=o+(a%ot||ot))}return cr(n,t,e,i,l,r),n.fill(),l}function v_(n,t,e,i,r){const{fullCircles:s,startAngle:o,circumference:a,options:l}=t,{borderWidth:u,borderJoinStyle:c,borderDash:p,borderDashOffset:h}=l,d=l.borderAlign==="inner";if(!u)return;n.setLineDash(p||[]),n.lineDashOffset=h,d?(n.lineWidth=u*2,n.lineJoin=c||"round"):(n.lineWidth=u,n.lineJoin=c||"bevel");let f=t.endAngle;if(s){cr(n,t,e,i,f,r);for(let g=0;g<s;++g)n.stroke();isNaN(a)||(f=o+(a%ot||ot))}d&&g_(n,t,f),s||(cr(n,t,e,i,f,r),n.stroke())}class wn extends Ut{constructor(e){super();z(this,"circumference");z(this,"endAngle");z(this,"fullCircles");z(this,"innerRadius");z(this,"outerRadius");z(this,"pixelMargin");z(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,e&&Object.assign(this,e)}inRange(e,i,r){const s=this.getProps(["x","y"],r),{angle:o,distance:a}=vd(s,{x:e,y:i}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:p,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),d=(this.options.spacing+this.options.borderWidth)/2,f=$(h,u-l),g=Fn(o,l,u)&&l!==u,b=f>=ot||g,x=he(a,c+d,p+d);return b&&x}getCenterPoint(e){const{x:i,y:r,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:c}=this.options,p=(s+o)/2,h=(a+l+c+u)/2;return{x:i+Math.cos(p)*h,y:r+Math.sin(p)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,s=(i.offset||0)/4,o=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>ot?Math.floor(r/ot):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*s,Math.sin(l)*s);const u=1-Math.sin(Math.min(at,r||0)),c=s*u;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,b_(e,this,c,o,a),v_(e,this,c,o,a),e.restore()}}z(wn,"id","arc"),z(wn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),z(wn,"defaultRoutes",{backgroundColor:"backgroundColor"}),z(wn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Zd(n,t,e=t){n.lineCap=$(e.borderCapStyle,t.borderCapStyle),n.setLineDash($(e.borderDash,t.borderDash)),n.lineDashOffset=$(e.borderDashOffset,t.borderDashOffset),n.lineJoin=$(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=$(e.borderWidth,t.borderWidth),n.strokeStyle=$(e.borderColor,t.borderColor)}function __(n,t,e){n.lineTo(e.x,e.y)}function x_(n){return n.stepped?Wy:n.tension||n.cubicInterpolationMode==="monotone"?Uy:__}function Qd(n,t,e={}){const i=n.length,{start:r=0,end:s=i-1}=e,{start:o,end:a}=t,l=Math.max(r,o),u=Math.min(s,a),c=r<o&&s<o||r>a&&s>a;return{count:i,start:l,loop:t.loop,ilen:u<l&&!c?i+u-l:u-l}}function w_(n,t,e,i){const{points:r,options:s}=t,{count:o,start:a,loop:l,ilen:u}=Qd(r,e,i),c=x_(s);let{move:p=!0,reverse:h}=i||{},d,f,g;for(d=0;d<=u;++d)f=r[(a+(h?u-d:d))%o],!f.skip&&(p?(n.moveTo(f.x,f.y),p=!1):c(n,g,f,h,s.stepped),g=f);return l&&(f=r[(a+(h?u:0))%o],c(n,g,f,h,s.stepped)),!!l}function S_(n,t,e,i){const r=t.points,{count:s,start:o,ilen:a}=Qd(r,e,i),{move:l=!0,reverse:u}=i||{};let c=0,p=0,h,d,f,g,b,x;const w=v=>(o+(u?a-v:v))%s,E=()=>{g!==b&&(n.lineTo(c,b),n.lineTo(c,g),n.lineTo(c,x))};for(l&&(d=r[w(0)],n.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=r[w(h)],d.skip)continue;const v=d.x,_=d.y,k=v|0;k===f?(_<g?g=_:_>b&&(b=_),c=(p*c+v)/++p):(E(),n.lineTo(v,_),f=k,p=0,g=b=_),x=_}E()}function pa(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?S_:w_}function k_(n){return n.stepped?Sb:n.tension||n.cubicInterpolationMode==="monotone"?kb:Re}function C_(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),Zd(n,t.options),n.stroke(r)}function M_(n,t,e,i){const{segments:r,options:s}=t,o=pa(t);for(const a of r)Zd(n,s,a.style),n.beginPath(),o(n,t,a,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const E_=typeof Path2D=="function";function P_(n,t,e,i){E_&&!t.options.segment?C_(n,t,e,i):M_(n,t,e,i)}class _e extends Ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;gb(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ab(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],s=this.points,o=qd(this,{property:e,start:r,end:r});if(!o.length)return;const a=[],l=k_(i);let u,c;for(u=0,c=o.length;u<c;++u){const{start:p,end:h}=o[u],d=s[p],f=s[h];if(d===f){a.push(d);continue}const g=Math.abs((r-d[e])/(f[e]-d[e])),b=l(d,f,g,i.stepped);b[e]=t[e],a.push(b)}return a.length===1?a[0]:a}pathSegment(t,e,i){return pa(this)(t,this,e,i)}path(t,e,i){const r=this.segments,s=pa(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const a of r)o&=s(t,this,a,{start:e,end:e+i-1});return!!o}draw(t,e,i,r){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),P_(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}z(_e,"id","line"),z(_e,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),z(_e,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),z(_e,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Rh(n,t,e,i){const r=n.options,{[e]:s}=n.getProps([e],i);return Math.abs(t-s)<r.radius+r.hitRadius}class tr extends Ut{constructor(e){super();z(this,"parsed");z(this,"skip");z(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,r){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(e-o,2)+Math.pow(i-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,i){return Rh(this,e,"x",i)}inYRange(e,i){return Rh(this,e,"y",i)}getCenterPoint(e){const{x:i,y:r}=this.getProps(["x","y"],e);return{x:i,y:r}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const r=i&&e.borderWidth||0;return(i+r)*2}draw(e,i){const r=this.options;this.skip||r.radius<.1||!de(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,ua(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}z(tr,"id","point"),z(tr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),z(tr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function tp(n,t){const{x:e,y:i,base:r,width:s,height:o}=n.getProps(["x","y","base","width","height"],t);let a,l,u,c,p;return n.horizontal?(p=o/2,a=Math.min(e,r),l=Math.max(e,r),u=i-p,c=i+p):(p=s/2,a=e-p,l=e+p,u=Math.min(i,r),c=Math.max(i,r)),{left:a,top:u,right:l,bottom:c}}function xe(n,t,e,i){return n?0:_t(t,e,i)}function O_(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,s=Pd(i);return{t:xe(r.top,s.top,0,e),r:xe(r.right,s.right,0,t),b:xe(r.bottom,s.bottom,0,e),l:xe(r.left,s.left,0,t)}}function A_(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,s=De(r),o=Math.min(t,e),a=n.borderSkipped,l=i||J(r);return{topLeft:xe(!l||a.top||a.left,s.topLeft,0,o),topRight:xe(!l||a.top||a.right,s.topRight,0,o),bottomLeft:xe(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:xe(!l||a.bottom||a.right,s.bottomRight,0,o)}}function L_(n){const t=tp(n),e=t.right-t.left,i=t.bottom-t.top,r=O_(n,e/2,i/2),s=A_(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:s},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}function Oo(n,t,e,i){const r=t===null,s=e===null,a=n&&!(r&&s)&&tp(n,i);return a&&(r||he(t,a.left,a.right))&&(s||he(e,a.top,a.bottom))}function R_(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function T_(n,t){n.rect(t.x,t.y,t.w,t.h)}function Ao(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,s=(n.x+n.w!==e.x+e.w?t:0)-i,o=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+s,h:n.h+o,radius:n.radius}}class er extends Ut{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:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:s,outer:o}=L_(this),a=R_(o.radius)?qn:T_;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),a(t,Ao(o,e,s)),t.clip(),a(t,Ao(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Ao(s,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Oo(this,t,e,i)}inXRange(t,e){return Oo(this,t,null,e)}inYRange(t,e){return Oo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+r)/2:e,y:s?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}z(er,"id","bar"),z(er,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),z(er,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var I_=Object.freeze({__proto__:null,ArcElement:wn,BarElement:er,LineElement:_e,PointElement:tr});const ga=["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)"],Th=ga.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function ep(n){return ga[n%ga.length]}function np(n){return Th[n%Th.length]}function D_(n,t){return n.borderColor=ep(t),n.backgroundColor=np(t),++t}function B_(n,t){return n.backgroundColor=n.data.map(()=>ep(t++)),t}function N_(n,t){return n.backgroundColor=n.data.map(()=>np(t++)),t}function F_(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof Ie?t=B_(e,t):r instanceof Tn?t=N_(e,t):r&&(t=D_(e,t))}}function Ih(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function q_(n){return n&&(n.borderColor||n.backgroundColor)}function j_(){return ut.borderColor!=="rgba(0,0,0,0.1)"||ut.backgroundColor!=="rgba(0,0,0,0.1)"}var H_={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:s}=r,o=Ih(i)||q_(r)||s&&Ih(s)||j_();if(!e.forceOverride&&o)return;const a=F_(n);i.forEach(a)}};function z_(n,t,e,i,r){const s=r.samples||i;if(s>=e)return n.slice(t,t+e);const o=[],a=(e-2)/(s-2);let l=0;const u=t+e-1;let c=t,p,h,d,f,g;for(o[l++]=n[c],p=0;p<s-2;p++){let b=0,x=0,w;const E=Math.floor((p+1)*a)+1+t,v=Math.min(Math.floor((p+2)*a)+1,e)+t,_=v-E;for(w=E;w<v;w++)b+=n[w].x,x+=n[w].y;b/=_,x/=_;const k=Math.floor(p*a)+1+t,M=Math.min(Math.floor((p+1)*a)+1,e)+t,{x:P,y:T}=n[c];for(d=f=-1,w=k;w<M;w++)f=.5*Math.abs((P-b)*(n[w].y-T)-(P-n[w].x)*(x-T)),f>d&&(d=f,h=n[w],g=w);o[l++]=h,c=g}return o[l++]=n[u],o}function V_(n,t,e,i){let r=0,s=0,o,a,l,u,c,p,h,d,f,g;const b=[],x=t+e-1,w=n[t].x,v=n[x].x-w;for(o=t;o<t+e;++o){a=n[o],l=(a.x-w)/v*i,u=a.y;const _=l|0;if(_===c)u<f?(f=u,p=o):u>g&&(g=u,h=o),r=(s*r+a.x)/++s;else{const k=o-1;if(!X(p)&&!X(h)){const M=Math.min(p,h),P=Math.max(p,h);M!==d&&M!==k&&b.push({...n[M],x:r}),P!==d&&P!==k&&b.push({...n[P],x:r})}o>0&&k!==d&&b.push(n[k]),b.push(a),c=_,s=0,f=g=u,p=h=d=o}}return b}function ip(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Dh(n){n.data.datasets.forEach(t=>{ip(t)})}function W_(n,t){const e=t.length;let i=0,r;const{iScale:s}=n,{min:o,max:a,minDefined:l,maxDefined:u}=s.getUserBounds();return l&&(i=_t(fe(t,s.axis,o).lo,0,e-1)),u?r=_t(fe(t,s.axis,a).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var U_={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Dh(n);return}const i=n.width;n.data.datasets.forEach((r,s)=>{const{_data:o,indexAxis:a}=r,l=n.getDatasetMeta(s),u=o||r.data;if(_n([a,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=n.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||n.options.parsing)return;let{start:p,count:h}=W_(l,u);const d=e.threshold||4*i;if(h<=d){ip(r);return}X(o)&&(r._data=u,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let f;switch(e.algorithm){case"lttb":f=z_(u,p,h,i,e);break;case"min-max":f=V_(u,p,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=f})},destroy(n){Dh(n)}};function $_(n,t,e){const i=n.segments,r=n.points,s=t.points,o=[];for(const a of i){let{start:l,end:u}=a;u=Qa(l,u,r);const c=ma(e,r[l],r[u],a.loop);if(!t.segments){o.push({source:a,target:c,start:r[l],end:r[u]});continue}const p=qd(t,c);for(const h of p){const d=ma(e,s[h.start],s[h.end],h.loop),f=Fd(a,r,d);for(const g of f)o.push({source:g,target:h,start:{[e]:Bh(c,d,"start",Math.max)},end:{[e]:Bh(c,d,"end",Math.min)}})}}return o}function ma(n,t,e,i){if(i)return;let r=t[n],s=e[n];return n==="angle"&&(r=Bt(r),s=Bt(s)),{property:n,start:r,end:s}}function G_(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Qa(o,a,r);const l=r[o],u=r[a];i!==null?(s.push({x:l.x,y:i}),s.push({x:u.x,y:i})):e!==null&&(s.push({x:e,y:l.y}),s.push({x:e,y:u.y}))}),s}function Qa(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Bh(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function rp(n,t){let e=[],i=!1;return ct(n)?(i=!0,e=n):e=G_(n,t),e.length?new _e({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Nh(n){return n&&n.fill!==!1}function Y_(n,t,e){let r=n[t].fill;const s=[t];let o;if(!e)return r;for(;r!==!1&&s.indexOf(r)===-1;){if(!gt(r))return r;if(o=n[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function K_(n,t,e){const i=Q_(n);if(J(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return gt(r)&&Math.floor(r)===r?X_(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function X_(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function J_(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:J(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Z_(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:J(n)?i=n.value:i=t.getBaseValue(),i}function Q_(n){const t=n.options,e=t.fill;let i=$(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function t1(n){const{scale:t,index:e,line:i}=n,r=[],s=i.segments,o=i.points,a=e1(t,e);a.push(rp({x:null,y:t.bottom},i));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)n1(r,o[c],a)}return new _e({points:r,options:{}})}function e1(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const s=i[r];if(s.index===t)break;s.hidden||e.unshift(s.dataset)}return e}function n1(n,t,e){const i=[];for(let r=0;r<e.length;r++){const s=e[r],{first:o,last:a,point:l}=i1(s,t,"x");if(!(!l||o&&a)){if(o)i.unshift(l);else if(n.push(l),!a)break}}n.push(...i)}function i1(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],s=n.segments,o=n.points;let a=!1,l=!1;for(let u=0;u<s.length;u++){const c=s[u],p=o[c.start][e],h=o[c.end][e];if(he(r,p,h)){a=r===p,l=r===h;break}}return{first:a,last:l,point:i}}class sp{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:s,radius:o}=this;return e=e||{start:0,end:ot},t.arc(r,s,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,s=t.angle;return{x:e+Math.cos(s)*r,y:i+Math.sin(s)*r,angle:s}}}function r1(n){const{chart:t,fill:e,line:i}=n;if(gt(e))return s1(t,e);if(e==="stack")return t1(n);if(e==="shape")return!0;const r=o1(n);return r instanceof sp?r:rp(r,i)}function s1(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function o1(n){return(n.scale||{}).getPointPositionForValue?l1(n):a1(n)}function a1(n){const{scale:t={},fill:e}=n,i=J_(e,t);if(gt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function l1(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,s=i.reverse?t.max:t.min,o=Z_(e,t,s),a=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,s);return new sp({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<r;++l)a.push(t.getPointPositionForValue(l,o));return a}function Lo(n,t,e){const i=r1(t),{line:r,scale:s,axis:o}=t,a=r.options,l=a.fill,u=a.backgroundColor,{above:c=u,below:p=u}=l||{};i&&r.points.length&&(Pr(n,e),c1(n,{line:r,target:i,above:c,below:p,area:e,scale:s,axis:o}),Or(n))}function c1(n,t){const{line:e,target:i,above:r,below:s,area:o,scale:a}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&s!==r&&(Fh(n,i,o.top),qh(n,{line:e,target:i,color:r,scale:a,property:l}),n.restore(),n.save(),Fh(n,i,o.bottom)),qh(n,{line:e,target:i,color:s,scale:a,property:l}),n.restore()}function Fh(n,t,e){const{segments:i,points:r}=t;let s=!0,o=!1;n.beginPath();for(const a of i){const{start:l,end:u}=a,c=r[l],p=r[Qa(l,u,r)];s?(n.moveTo(c.x,c.y),s=!1):(n.lineTo(c.x,e),n.lineTo(c.x,c.y)),o=!!t.pathSegment(n,a,{move:o}),o?n.closePath():n.lineTo(p.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function qh(n,t){const{line:e,target:i,property:r,color:s,scale:o}=t,a=$_(e,i,r);for(const{source:l,target:u,start:c,end:p}of a){const{style:{backgroundColor:h=s}={}}=l,d=i!==!0;n.save(),n.fillStyle=h,u1(n,o,d&&ma(r,c,p)),n.beginPath();const f=!!e.pathSegment(n,l);let g;if(d){f?n.closePath():jh(n,i,p,r);const b=!!i.pathSegment(n,u,{move:f,reverse:!0});g=f&&b,g||jh(n,i,c,r)}n.closePath(),n.fill(g?"evenodd":"nonzero"),n.restore()}}function u1(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:s,start:o,end:a}=e||{};s==="x"&&(n.beginPath(),n.rect(o,i,a-o,r-i),n.clip())}function jh(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var h1={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let s,o,a,l;for(o=0;o<i;++o)s=n.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof _e&&(l={visible:n.isDatasetVisible(o),index:o,fill:K_(a,o,i),chart:n,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,r.push(l);for(o=0;o<i;++o)l=r[o],!(!l||l.fill===!1)&&(l.fill=Y_(r,o,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),s=n.chartArea;for(let o=r.length-1;o>=0;--o){const a=r[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),i&&a.fill&&Lo(n.ctx,a,s))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const s=i[r].$filler;Nh(s)&&Lo(n.ctx,s,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Nh(i)||e.drawTime!=="beforeDatasetDraw"||Lo(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Hh=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},f1=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class zh extends Ut{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,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=st(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=vt(i.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Hh(i,s);let u,c;e.font=r.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,r,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=r+a;let p=t;s.textAlign="left",s.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach((f,g)=>{const b=i+e/2+s.measureText(f.text).width;(g===0||u[u.length-1]+b+2*a>o)&&(p+=c,u[u.length-(g>0?0:1)]=0,d+=c,h++),l[g]={left:0,top:d,row:h,width:b,height:r},u[u.length-1]+=b+a}),p}_fitCols(t,e,i,r){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let p=a,h=0,d=0,f=0,g=0;return this.legendItems.forEach((b,x)=>{const{itemWidth:w,itemHeight:E}=d1(i,e,s,b,r);x>0&&d+E+2*a>c&&(p+=h+a,u.push({width:h,height:d}),f+=h+a,g++,h=d=0),l[x]={left:f,top:d,col:g,width:w,height:E},h=Math.max(h,w),d+=E+a}),p+=h,u.push({width:h,height:d}),p}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:s}}=this,o=tn(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=kt(i,this.left+r,this.right-this.lineWidths[a]);for(const u of e)a!==u.row&&(a=u.row,l=kt(i,this.left+r,this.right-this.lineWidths[a])),u.top+=this.top+t+r,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+r}else{let a=0,l=kt(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(const u of e)u.col!==a&&(a=u.col,l=kt(i,this.top+t+r,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+r,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Or(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:s,labels:o}=t,a=ut.color,l=tn(t.rtl,this.left,this.width),u=vt(o.font),{padding:c}=o,p=u.size,h=p/2;let d;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=u.string;const{boxWidth:f,boxHeight:g,itemHeight:b}=Hh(o,p),x=function(k,M,P){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;r.save();const T=$(P.lineWidth,1);if(r.fillStyle=$(P.fillStyle,a),r.lineCap=$(P.lineCap,"butt"),r.lineDashOffset=$(P.lineDashOffset,0),r.lineJoin=$(P.lineJoin,"miter"),r.lineWidth=T,r.strokeStyle=$(P.strokeStyle,a),r.setLineDash($(P.lineDash,[])),o.usePointStyle){const A={radius:g*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:T},L=l.xPlus(k,f/2),I=M+h;Ed(r,A,L,I,o.pointStyleWidth&&f)}else{const A=M+Math.max((p-g)/2,0),L=l.leftForLtr(k,f),I=De(P.borderRadius);r.beginPath(),Object.values(I).some(j=>j!==0)?qn(r,{x:L,y:A,w:f,h:g,radius:I}):r.rect(L,A,f,g),r.fill(),T!==0&&r.stroke()}r.restore()},w=function(k,M,P){qe(r,P.text,k,M+b/2,u,{strikethrough:P.hidden,textAlign:l.textAlign(P.textAlign)})},E=this.isHorizontal(),v=this._computeTitleHeight();E?d={x:kt(s,this.left+c,this.right-i[0]),y:this.top+c+v,line:0}:d={x:this.left+c,y:kt(s,this.top+v+c,this.bottom-e[0].height),line:0},Dd(this.ctx,t.textDirection);const _=b+c;this.legendItems.forEach((k,M)=>{r.strokeStyle=k.fontColor,r.fillStyle=k.fontColor;const P=r.measureText(k.text).width,T=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),A=f+h+P;let L=d.x,I=d.y;l.setWidth(this.width),E?M>0&&L+A+c>this.right&&(I=d.y+=_,d.line++,L=d.x=kt(s,this.left+c,this.right-i[d.line])):M>0&&I+_>this.bottom&&(L=d.x=L+e[d.line].width+c,d.line++,I=d.y=kt(s,this.top+v+c,this.bottom-e[d.line].height));const j=l.x(L);if(x(j,I,k),L=Ty(T,L+f+h,E?L+A:this.right,t.rtl),w(l.x(L),I,k),E)d.x+=A+c;else if(typeof k.text!="string"){const F=u.lineHeight;d.y+=op(k,F)+c}else d.y+=_}),Bd(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=vt(e.font),r=Mt(e.padding);if(!e.display)return;const s=tn(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=i.size/2,u=r.top+l;let c,p=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+u,p=kt(t.align,p,this.right-h);else{const f=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);c=u+kt(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}const d=kt(a,p,p+h);o.textAlign=s.textAlign(Wa(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,qe(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=vt(t.font),i=Mt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,s;if(he(t,this.left,this.right)&&he(e,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(r=s[i],he(t,r.left,r.left+r.width)&&he(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!m1(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,s=f1(r,i);r&&!s&&st(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!s&&st(e.onHover,[t,i,this],this)}else i&&st(e.onClick,[t,i,this],this)}}function d1(n,t,e,i,r){const s=p1(i,n,t,e),o=g1(r,i,t.lineHeight);return{itemWidth:s,itemHeight:o}}function p1(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),t+e.size/2+i.measureText(r).width}function g1(n,t,e){let i=n;return typeof t.text!="string"&&(i=op(t,e)),i}function op(n,t){const e=n.text?n.text.length:0;return t*e}function m1(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var y1={id:"legend",_element:zh,start(n,t,e){const i=n.legend=new zh({ctx:n.ctx,options:e,chart:n});Ct.configure(n,i,e),Ct.addBox(n,i)},stop(n){Ct.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;Ct.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(e?0:void 0),c=Mt(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:i||u.pointStyle,rotation:u.rotation,textAlign:r||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class tl extends Ut{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,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=ct(i.text)?i.text.length:1;this._padding=Mt(i.padding);const s=r*vt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:s,options:o}=this,a=o.align;let l=0,u,c,p;return this.isHorizontal()?(c=kt(a,i,s),p=e+t,u=s-i):(o.position==="left"?(c=i+t,p=kt(a,r,e),l=at*-.5):(c=s-t,p=kt(a,e,r),l=at*.5),u=r-e),{titleX:c,titleY:p,maxWidth:u,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=vt(e.font),s=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);qe(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:u,textAlign:Wa(e.align),textBaseline:"middle",translation:[o,a]})}}function b1(n,t){const e=new tl({ctx:n.ctx,options:t,chart:n});Ct.configure(n,e,t),Ct.addBox(n,e),n.titleBlock=e}var v1={id:"title",_element:tl,start(n,t,e){b1(n,e)},stop(n){const t=n.titleBlock;Ct.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;Ct.configure(n,i,e),i.options=e},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 Fi=new WeakMap;var _1={id:"subtitle",start(n,t,e){const i=new tl({ctx:n.ctx,options:e,chart:n});Ct.configure(n,i,e),Ct.addBox(n,i),Fi.set(n,i)},stop(n){Ct.removeBox(n,Fi.get(n)),Fi.delete(n)},beforeUpdate(n,t,e){const i=Fi.get(n);Ct.configure(n,i,e),i.options=e},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 Sn={average(n){if(!n.length)return!1;let t,e,i=new Set,r=0,s=0;for(t=0,e=n.length;t<e;++t){const a=n[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),r+=l.y,++s}}return s===0||i.size===0?!1:{x:[...i].reduce((a,l)=>a+l)/i.size,y:r/s}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=n.length;s<o;++s){const l=n[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=la(t,u);c<r&&(r=c,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function Xt(n,t){return t&&(ct(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function oe(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
354
|
-
`)>-1?n.split(`
|
|
355
|
-
`):n}function x1(n,t){const{element:e,datasetIndex:i,index:r}=t,s=n.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:n,label:o,parsed:s.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Vh(n,t){const e=n.chart.ctx,{body:i,footer:r,title:s}=n,{boxWidth:o,boxHeight:a}=t,l=vt(t.bodyFont),u=vt(t.titleFont),c=vt(t.footerFont),p=s.length,h=r.length,d=i.length,f=Mt(t.padding);let g=f.height,b=0,x=i.reduce((v,_)=>v+_.before.length+_.lines.length+_.after.length,0);if(x+=n.beforeBody.length+n.afterBody.length,p&&(g+=p*u.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),x){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=d*v+(x-d)*l.lineHeight+(x-1)*t.bodySpacing}h&&(g+=t.footerMarginTop+h*c.lineHeight+(h-1)*t.footerSpacing);let w=0;const E=function(v){b=Math.max(b,e.measureText(v).width+w)};return e.save(),e.font=u.string,nt(n.title,E),e.font=l.string,nt(n.beforeBody.concat(n.afterBody),E),w=t.displayColors?o+2+t.boxPadding:0,nt(i,v=>{nt(v.before,E),nt(v.lines,E),nt(v.after,E)}),w=0,e.font=c.string,nt(n.footer,E),e.restore(),b+=f.width,{width:b,height:g}}function w1(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function S1(n,t,e,i){const{x:r,width:s}=i,o=e.caretSize+e.caretPadding;if(n==="left"&&r+s+o>t.width||n==="right"&&r-s-o<0)return!0}function k1(n,t,e,i){const{x:r,width:s}=e,{width:o,chartArea:{left:a,right:l}}=n;let u="center";return i==="center"?u=r<=(a+l)/2?"left":"right":r<=s/2?u="left":r>=o-s/2&&(u="right"),S1(u,n,t,e)&&(u="center"),u}function Wh(n,t,e){const i=e.yAlign||t.yAlign||w1(n,e);return{xAlign:e.xAlign||t.xAlign||k1(n,t,e,i),yAlign:i}}function C1(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function M1(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Uh(n,t,e,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=n,{xAlign:a,yAlign:l}=e,u=r+s,{topLeft:c,topRight:p,bottomLeft:h,bottomRight:d}=De(o);let f=C1(t,a);const g=M1(t,l,u);return l==="center"?a==="left"?f+=u:a==="right"&&(f-=u):a==="left"?f-=Math.max(c,h)+r:a==="right"&&(f+=Math.max(p,d)+r),{x:_t(f,0,i.width-t.width),y:_t(g,0,i.height-t.height)}}function qi(n,t,e){const i=Mt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function $h(n){return Xt([],oe(n))}function E1(n,t,e){return Ce(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Gh(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ap={beforeTitle:re,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:re,beforeBody:re,beforeLabel:re,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return X(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:re,afterBody:re,beforeFooter:re,footer:re,afterFooter:re};function Ot(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?ap[t].call(e,i):r}class ya extends Ut{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 e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,s=new jd(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=E1(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=Ot(i,"beforeTitle",this,t),s=Ot(i,"title",this,t),o=Ot(i,"afterTitle",this,t);let a=[];return a=Xt(a,oe(r)),a=Xt(a,oe(s)),a=Xt(a,oe(o)),a}getBeforeBody(t,e){return $h(Ot(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return nt(t,s=>{const o={before:[],lines:[],after:[]},a=Gh(i,s);Xt(o.before,oe(Ot(a,"beforeLabel",this,s))),Xt(o.lines,Ot(a,"label",this,s)),Xt(o.after,oe(Ot(a,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,e){return $h(Ot(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=Ot(i,"beforeFooter",this,t),s=Ot(i,"footer",this,t),o=Ot(i,"afterFooter",this,t);let a=[];return a=Xt(a,oe(r)),a=Xt(a,oe(s)),a=Xt(a,oe(o)),a}_createItems(t){const e=this._active,i=this.chart.data,r=[],s=[],o=[];let a=[],l,u;for(l=0,u=e.length;l<u;++l)a.push(x1(this.chart,e[l]));return t.filter&&(a=a.filter((c,p,h)=>t.filter(c,p,h,i))),t.itemSort&&(a=a.sort((c,p)=>t.itemSort(c,p,i))),nt(a,c=>{const p=Gh(t.callbacks,c);r.push(Ot(p,"labelColor",this,c)),s.push(Ot(p,"labelPointStyle",this,c)),o.push(Ot(p,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const a=Sn[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=Vh(this,i),u=Object.assign({},a,l),c=Wh(this.chart,i,u),p=Uh(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:p.x,y:p.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const s=this.getCaretPosition(t,i,r);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:p}=De(a),{x:h,y:d}=t,{width:f,height:g}=e;let b,x,w,E,v,_;return s==="center"?(v=d+g/2,r==="left"?(b=h,x=b-o,E=v+o,_=v-o):(b=h+f,x=b+o,E=v-o,_=v+o),w=b):(r==="left"?x=h+Math.max(l,c)+o:r==="right"?x=h+f-Math.max(u,p)-o:x=this.caretX,s==="top"?(E=d,v=E-o,b=x-o,w=x+o):(E=d+g,v=E+o,b=x+o,w=x-o),_=E),{x1:b,x2:x,x3:w,y1:E,y2:v,y3:_}}drawTitle(t,e,i){const r=this.title,s=r.length;let o,a,l;if(s){const u=tn(i.rtl,this.x,this.width);for(t.x=qi(this,i.titleAlign,i),e.textAlign=u.textAlign(i.titleAlign),e.textBaseline="middle",o=vt(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,l=0;l<s;++l)e.fillText(r[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,r,s){const o=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:u}=s,c=vt(s.bodyFont),p=qi(this,"left",s),h=r.x(p),d=l<c.lineHeight?(c.lineHeight-l)/2:0,f=e.y+d;if(s.usePointStyle){const g={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=r.leftForLtr(h,u)+u/2,x=f+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,ua(t,g,b,x),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,ua(t,g,b,x)}else{t.lineWidth=J(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const g=r.leftForLtr(h,u),b=r.leftForLtr(r.xPlus(h,1),u-2),x=De(o.borderRadius);Object.values(x).some(w=>w!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,qn(t,{x:g,y:f,w:u,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),qn(t,{x:b,y:f+1,w:u-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(g,f,u,l),t.strokeRect(g,f,u,l),t.fillStyle=o.backgroundColor,t.fillRect(b,f+1,u-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=i,p=vt(i.bodyFont);let h=p.lineHeight,d=0;const f=tn(i.rtl,this.x,this.width),g=function(P){e.fillText(P,f.x(t.x+d),t.y+h/2),t.y+=h+s},b=f.textAlign(o);let x,w,E,v,_,k,M;for(e.textAlign=o,e.textBaseline="middle",e.font=p.string,t.x=qi(this,b,i),e.fillStyle=i.bodyColor,nt(this.beforeBody,g),d=a&&b!=="right"?o==="center"?u/2+c:u+2+c:0,v=0,k=r.length;v<k;++v){for(x=r[v],w=this.labelTextColors[v],e.fillStyle=w,nt(x.before,g),E=x.lines,a&&E.length&&(this._drawColorBox(e,t,v,f,i),h=Math.max(p.lineHeight,l)),_=0,M=E.length;_<M;++_)g(E[_]),h=p.lineHeight;nt(x.after,g)}d=0,h=p.lineHeight,nt(this.afterBody,g),t.y-=s}drawFooter(t,e,i){const r=this.footer,s=r.length;let o,a;if(s){const l=tn(i.rtl,this.x,this.width);for(t.x=qi(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",o=vt(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,a=0;a<s;++a)e.fillText(r[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=i,{topLeft:p,topRight:h,bottomLeft:d,bottomRight:f}=De(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+p,l),o==="top"&&this.drawCaret(t,e,i,r),e.lineTo(a+u-h,l),e.quadraticCurveTo(a+u,l,a+u,l+h),o==="center"&&s==="right"&&this.drawCaret(t,e,i,r),e.lineTo(a+u,l+c-f),e.quadraticCurveTo(a+u,l+c,a+u-f,l+c),o==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(a+d,l+c),e.quadraticCurveTo(a,l+c,a,l+c-d),o==="center"&&s==="left"&&this.drawCaret(t,e,i,r),e.lineTo(a,l+p),e.quadraticCurveTo(a,l,a+p,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){const o=Sn[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Vh(this,t),l=Object.assign({},o,this._size),u=Wh(e,t,l),c=Uh(t,l,u,e);(r._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Mt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,r,e),Dd(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Bd(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!ir(i,r),o=this._positionChanged(r,e);(s||o)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,i),a=this._positionChanged(o,t),l=e||!ir(o,s)||a;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,r){const s=this.options;if(t.type==="mouseout")return[];if(!r)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:r,options:s}=this,o=Sn[s.position].call(this,t,e);return o!==!1&&(i!==o.x||r!==o.y)}}z(ya,"positioners",Sn);var P1={id:"tooltip",_element:ya,positioners:Sn,afterInit(n,t,e){e&&(n.tooltip=new ya({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:ap},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},O1=Object.freeze({__proto__:null,Colors:H_,Decimation:U_,Filler:h1,Legend:y1,SubTitle:_1,Title:v1,Tooltip:P1});const A1=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function L1(n,t,e,i){const r=n.indexOf(t);if(r===-1)return A1(n,t,e,i);const s=n.lastIndexOf(t);return r!==s?e:r}const R1=(n,t)=>n===null?null:_t(Math.round(n),0,t);function Yh(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class ba extends He{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:s}of e)i[r]===s&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(X(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:L1(i,t,$(e,t),this._addedLabels),R1(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let s=this.getLabels();s=t===0&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)r.push({value:o});return r}getLabelForValue(t){return Yh.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 e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}z(ba,"id","category"),z(ba,"defaults",{ticks:{callback:Yh}});function T1(n,t){const e=[],{bounds:r,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:p,includeBounds:h}=n,d=s||1,f=c-1,{min:g,max:b}=t,x=!X(o),w=!X(a),E=!X(u),v=(b-g)/(p+1);let _=Vu((b-g)/f/d)*d,k,M,P,T;if(_<1e-14&&!x&&!w)return[{value:g},{value:b}];T=Math.ceil(b/_)-Math.floor(g/_),T>f&&(_=Vu(T*_/f/d)*d),X(l)||(k=Math.pow(10,l),_=Math.ceil(_*k)/k),r==="ticks"?(M=Math.floor(g/_)*_,P=Math.ceil(b/_)*_):(M=g,P=b),x&&w&&s&&My((a-o)/s,_/1e3)?(T=Math.round(Math.min((a-o)/_,c)),_=(a-o)/T,M=o,P=a):E?(M=x?o:M,P=w?a:P,T=u-1,_=(P-M)/T):(T=(P-M)/_,An(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const A=Math.max(Wu(_),Wu(M));k=Math.pow(10,X(l)?A:l),M=Math.round(M*k)/k,P=Math.round(P*k)/k;let L=0;for(x&&(h&&M!==o?(e.push({value:o}),M<o&&L++,An(Math.round((M+L*_)*k)/k,o,Kh(o,v,n))&&L++):M<o&&L++);L<T;++L){const I=Math.round((M+L*_)*k)/k;if(w&&I>a)break;e.push({value:I})}return w&&h&&P!==a?e.length&&An(e[e.length-1].value,a,Kh(a,v,n))?e[e.length-1].value=a:e.push({value:a}):(!w||P===a)&&e.push({value:P}),e}function Kh(n,t,{horizontal:e,minRotation:i}){const r=zt(i),s=(e?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+n).length;return Math.min(t/s,o)}class ur extends He{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return X(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:s}=this;const o=l=>r=e?r:l,a=l=>s=i?s:l;if(t){const l=te(r),u=te(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(r===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(r-l)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},s=this._range||this,o=T1(r,s);return t.bounds==="ticks"&&bd(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Yn(t,this.chart.options.locale,this.options.ticks.format)}}class va extends ur{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?t:0,this.max=gt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=zt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}z(va,"id","linear"),z(va,"defaults",{ticks:{callback:Er.formatters.numeric}});const Hn=n=>Math.floor(ve(n)),Ae=(n,t)=>Math.pow(10,Hn(n)+t);function Xh(n){return n/Math.pow(10,Hn(n))===1}function Jh(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function I1(n,t){const e=t-n;let i=Hn(e);for(;Jh(n,t,i)>10;)i++;for(;Jh(n,t,i)<10;)i--;return Math.min(i,Hn(n))}function D1(n,{min:t,max:e}){t=Dt(n.min,t);const i=[],r=Hn(t);let s=I1(t,e),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,u=Math.round((t-l)*o)/o,c=Math.floor((t-l)/a/10)*a*10;let p=Math.floor((u-c)/Math.pow(10,s)),h=Dt(n.min,Math.round((l+c+p*Math.pow(10,s))*o)/o);for(;h<e;)i.push({value:h,major:Xh(h),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(s++,p=2,o=s>=0?1:o),h=Math.round((l+c+p*Math.pow(10,s))*o)/o;const d=Dt(n.max,h);return i.push({value:d,major:Xh(d),significand:p}),i}class _a extends He{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ur.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return gt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?Math.max(0,t):null,this.max=gt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!gt(this._userMin)&&(this.min=t===Ae(this.min,0)?Ae(this.min,-1):Ae(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const s=a=>i=t?i:a,o=a=>r=e?r:a;i===r&&(i<=0?(s(1),o(10)):(s(Ae(i,-1)),o(Ae(r,1)))),i<=0&&s(Ae(r,-1)),r<=0&&o(Ae(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=D1(e,this);return t.bounds==="ticks"&&bd(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Yn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ve(t),this._valueRange=ve(this.max)-ve(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ve(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}z(_a,"id","logarithmic"),z(_a,"defaults",{ticks:{callback:Er.formatters.logarithmic,major:{enabled:!0}}});function xa(n){const t=n.ticks;if(t.display&&n.display){const e=Mt(t.backdropPadding);return $(t.font&&t.font.size,ut.font.size)+e.height}return 0}function B1(n,t,e){return e=ct(e)?e:[e],{w:Vy(n,t.string,e),h:e.length*t.lineHeight}}function Zh(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function N1(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],s=n._pointLabels.length,o=n.options.pointLabels,a=o.centerPointLabels?at/s:0;for(let l=0;l<s;l++){const u=o.setContext(n.getPointLabelContext(l));r[l]=u.padding;const c=n.getPointPosition(l,n.drawingArea+r[l],a),p=vt(u.font),h=B1(n.ctx,p,n._pointLabels[l]);i[l]=h;const d=Bt(n.getIndexAngle(l)+a),f=Math.round(za(d)),g=Zh(f,c.x,h.w,0,180),b=Zh(f,c.y,h.h,90,270);F1(e,t,d,g,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=H1(n,i,r)}function F1(n,t,e,i,r){const s=Math.abs(Math.sin(e)),o=Math.abs(Math.cos(e));let a=0,l=0;i.start<t.l?(a=(t.l-i.start)/s,n.l=Math.min(n.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/s,n.r=Math.max(n.r,t.r+a)),r.start<t.t?(l=(t.t-r.start)/o,n.t=Math.min(n.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/o,n.b=Math.max(n.b,t.b+l))}function q1(n,t,e){const i=n.drawingArea,{extra:r,additionalAngle:s,padding:o,size:a}=e,l=n.getPointPosition(t,i+r+o,s),u=Math.round(za(Bt(l.angle+mt))),c=W1(l.y,a.h,u),p=z1(u),h=V1(l.x,a.w,p);return{visible:!0,x:l.x,y:c,textAlign:p,left:h,top:c,right:h+a.w,bottom:c+a.h}}function j1(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:s}=n;return!(de({x:e,y:i},t)||de({x:e,y:s},t)||de({x:r,y:i},t)||de({x:r,y:s},t))}function H1(n,t,e){const i=[],r=n._pointLabels.length,s=n.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:xa(s)/2,additionalAngle:o?at/r:0};let u;for(let c=0;c<r;c++){l.padding=e[c],l.size=t[c];const p=q1(n,c,l);i.push(p),a==="auto"&&(p.visible=j1(p,u),p.visible&&(u=p))}return i}function z1(n){return n===0||n===180?"center":n<180?"left":"right"}function V1(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function W1(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function U1(n,t,e){const{left:i,top:r,right:s,bottom:o}=e,{backdropColor:a}=t;if(!X(a)){const l=De(t.borderRadius),u=Mt(t.backdropPadding);n.fillStyle=a;const c=i-u.left,p=r-u.top,h=s-i+u.width,d=o-r+u.height;Object.values(l).some(f=>f!==0)?(n.beginPath(),qn(n,{x:c,y:p,w:h,h:d,radius:l}),n.fill()):n.fillRect(c,p,h,d)}}function $1(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const s=n._pointLabelItems[r];if(!s.visible)continue;const o=i.setContext(n.getPointLabelContext(r));U1(e,o,s);const a=vt(o.font),{x:l,y:u,textAlign:c}=s;qe(e,n._pointLabels[r],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function lp(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,ot);else{let s=n.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o<i;o++)s=n.getPointPosition(o,t),r.lineTo(s.x,s.y)}}function G1(n,t,e,i,r){const s=n.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!i||!a||!l||e<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),lp(n,e,o,i),s.closePath(),s.stroke(),s.restore())}function Y1(n,t,e){return Ce(n,{label:e,index:t,type:"pointLabel"})}class kn extends ur{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(xa(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=gt(t)&&!isNaN(t)?t:0,this.max=gt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/xa(this.options))}generateTickLabels(t){ur.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=st(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?N1(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return Bt(t*e+zt(i))}getDistanceFromCenterForValue(t){if(X(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(X(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return Y1(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-mt+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),lp(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:s}=e,o=this._pointLabels.length;let a,l,u;if(e.pointLabels.display&&$1(this,o),r.display&&this.ticks.forEach((c,p)=>{if(p!==0||p===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const h=this.getContext(p),d=r.setContext(h),f=s.setContext(h);G1(this,d,l,o,f)}}),i.display){for(t.save(),a=o-1;a>=0;a--){const c=i.setContext(this.getPointLabelContext(a)),{color:p,lineWidth:h}=c;!h||!p||(t.lineWidth=h,t.strokeStyle=p,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),u=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const u=i.setContext(this.getContext(l)),c=vt(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(a.label).width,t.fillStyle=u.backdropColor;const p=Mt(u.backdropPadding);t.fillRect(-o/2-p.left,-s-c.size/2-p.top,o+p.width,c.size+p.height)}qe(t,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}z(kn,"id","radialLinear"),z(kn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Er.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),z(kn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),z(kn,"descriptors",{angleLines:{_fallback:"grid"}});const Rr={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}},Rt=Object.keys(Rr);function Qh(n,t){return n-t}function tf(n,t){if(X(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:s}=n._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),gt(o)||(o=typeof i=="string"?e.parse(o,i):e.parse(o)),o===null?null:(r&&(o=r==="week"&&(en(s)||s===!0)?e.startOf(o,"isoWeek",s):e.startOf(o,r)),+o)}function ef(n,t,e,i){const r=Rt.length;for(let s=Rt.indexOf(n);s<r-1;++s){const o=Rr[Rt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((e-t)/(a*o.size))<=i)return Rt[s]}return Rt[r-1]}function K1(n,t,e,i,r){for(let s=Rt.length-1;s>=Rt.indexOf(e);s--){const o=Rt[s];if(Rr[o].common&&n._adapter.diff(r,i,o)>=t-1)return o}return Rt[e?Rt.indexOf(e):0]}function X1(n){for(let t=Rt.indexOf(n)+1,e=Rt.length;t<e;++t)if(Rr[Rt[t]].common)return Rt[t]}function nf(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Va(e,t),s=e[i]>=t?e[i]:e[r];n[s]=!0}}function J1(n,t,e,i){const r=n._adapter,s=+r.startOf(t[0].value,i),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=e[a],l>=0&&(t[l].major=!0);return t}function rf(n,t,e){const i=[],r={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],r[a]=o,i.push({value:a,major:!1});return s===0||!e?i:J1(n,i,r,e)}class zn extends He{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,e={}){const i=t.time||(t.time={}),r=this._adapter=new sv._date(t.adapters.date);r.init(e),On(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:tf(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=gt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),s=gt(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,a=Ay(r,s,o);return this._unit=e.unit||(i.autoSkip?ef(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):K1(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:X1(this._unit),this.initOffsets(r),t.reverse&&a.reverse(),rf(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?i=s:i=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=_t(e,0,o),i=_t(i,0,o),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||ef(s.minUnit,e,i,this._getLabelCapacity(e)),a=$(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=en(l)||l===!0,c={};let p=e,h,d;if(u&&(p=+t.startOf(p,"isoWeek",l)),p=+t.startOf(p,u?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const f=r.ticks.source==="data"&&this.getDataTimestamps();for(h=p,d=0;h<i;h=+t.add(h,a,o),d++)nf(c,h,f);return(h===i||r.bounds==="ticks"||d===1)&&nf(c,h,f),Object.keys(c).sort(Qh).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,s=this._unit,o=e||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,r){const s=this.options,o=s.ticks.callback;if(o)return st(o,[t,e,i],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],p=u&&a[u],h=i[e],d=u&&p&&h&&h.major;return this._adapter.format(t,r||(d?p:c))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=zt(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(r),o=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*s+a*o,h:i*o+a*s}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,rf(this,[t],this._majorUnit),r),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(tf(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return xd(t.sort(Qh))}}z(zn,"id","time"),z(zn,"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 ji(n,t,e){let i=0,r=n.length-1,s,o,a,l;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=fe(n,"pos",t)),{pos:s,time:a}=n[i],{pos:o,time:l}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=fe(n,"time",t)),{time:s,pos:a}=n[i],{time:o,pos:l}=n[r]);const u=o-s;return u?a+(l-a)*(t-s)/u:a}class wa extends zn{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ji(e,this.min),this._tableRange=ji(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],s=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=e&&u<=i&&r.push(u);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=r.length;o<a;++o)c=r[o+1],l=r[o-1],u=r[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((r,s)=>r-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ji(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ji(this._table,i*this._tableRange+this._minPos,!0)}}z(wa,"id","timeseries"),z(wa,"defaults",zn.defaults);var Z1=Object.freeze({__proto__:null,CategoryScale:ba,LinearScale:va,LogarithmicScale:_a,RadialLinearScale:kn,TimeScale:zn,TimeSeriesScale:wa});const Q1=[rv,I_,O1,Z1];le.register(...Q1);var Ro,sf;function t2(){if(sf)return Ro;sf=1;function n(t,e,i){return t===t&&(i!==void 0&&(t=t<=i?t:i),e!==void 0&&(t=t>=e?t:e)),t}return Ro=n,Ro}var To,of;function e2(){if(of)return To;of=1;var n=t2(),t=Ba();function e(i,r,s){return s===void 0&&(s=r,r=void 0),s!==void 0&&(s=t(s),s=s===s?s:0),r!==void 0&&(r=t(r),r=r===r?r:0),n(t(i),r,s)}return To=e,To}var n2=e2();const i2=qt(n2);var Io,af;function r2(){if(af)return Io;af=1;function n(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}return Io=n,Io}var Do,lf;function cp(){if(lf)return Do;lf=1;function n(t,e,i){var r=-1,s=t.length;e<0&&(e=-e>s?0:s+e),i=i>s?s:i,i<0&&(i+=s),s=e>i?0:i-e>>>0,e>>>=0;for(var o=Array(s);++r<s;)o[r]=t[r+e];return o}return Do=n,Do}var Bo,cf;function s2(){if(cf)return Bo;cf=1;var n=Uf(),t=cp();function e(i,r){return r.length<2?i:n(i,t(r,0,-1))}return Bo=e,Bo}var No,uf;function o2(){if(uf)return No;uf=1;var n=$n(),t=r2(),e=s2(),i=vr();function r(s,o){return o=n(o,s),s=e(s,o),s==null||delete s[i(t(o))]}return No=r,No}var Fo,hf;function a2(){if(hf)return Fo;hf=1;var n=o2();function t(e,i){return e==null?!0:n(e,i)}return Fo=t,Fo}var l2=a2();const c2=qt(l2),u2=n=>Vt({L:20,M:10,S:7,XS:5})[n],h2=n=>Vt({L:200,M:100,S:60,XS:40})[n];class Qe extends pt{constructor(t){super(),this.provided=t,this.counter=em(),this.aliases={},this.stack=[],this.points=new Map,this.labels=new Set,this.limits={legend:u2(this.provided.width??"L"),point:this.provided.limit??h2(this.provided.width??"L")},this.source=new le(document.createElement("canvas"),{type:"line",data:{labels:Vt([]),datasets:[]},options:{scales:{y:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend*2}},x:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend}}},plugins:{legend:{labels:{usePointStyle:!0,pointStyle:"circle",boxHeight:5,boxWidth:5}}}}}),this.panel=Ne.build({...this.provided,class:"chart"}).replace(this.source.canvas),this.replace(this.panel)}provide(t){t.forEach(i=>{if(this.provided.mode==="aggregation"){const s=this.aliases[i.legend]??this.counter(),o=this.points.get(s)??Vt({legend:i.legend,values:{}});return this.aliases[i.legend]||(this.aliases[i.legend]=s,this.points.set(s,o),this.stack.push(s)),Object.entries(i.values).forEach(([a,l])=>{o.values[a]=(o.values[a]??0)+l,this.labels.add(a)})}const r=this.counter();this.stack.push(r),this.points.set(r,i),Object.keys(i.values).forEach(s=>this.labels.add(s))}),this.stack.slice(0,i2(this.stack.length-this.limits.point,0,1/0)).forEach(i=>{const r=this.points.get(i);r&&c2(this.aliases,r.legend),this.points.delete(i),this.stack.shift()});const e=[...this.points.values()];return this.source.data={labels:e.map(i=>i.legend),datasets:[...this.labels.values()].map(i=>({label:i,data:Array(e.length).fill(null).map((r,s)=>e[s].values[i]??null),tension:.3,pointRadius:2,pointHitRadius:20,pointHoverRadius:5,borderWidth:1,borderColor:nr(i),backgroundColor:nr(i)}))},this.source.update("none"),this}clear(){return this.source.reset(),this.points.clear(),this.labels.clear(),this.aliases={},this.stack=[],this}static build(t){return new Qe(t)}}const f2=`
|
|
356
|
-
<section id="expectations">
|
|
357
|
-
<div class="storage"></div>
|
|
358
|
-
|
|
359
|
-
<div class="controls">
|
|
360
|
-
<div class="main">
|
|
361
|
-
<button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
|
|
362
|
-
</div>
|
|
363
|
-
|
|
364
|
-
<div class="additional container hidden"></div>
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
<div class="content"></div>
|
|
368
|
-
</section>
|
|
369
|
-
`,d2=xt.compile(f2),ce=new Map,Sa=Mr.build(),ht={state:{filters:{search:Vt(null),groups:Vt(null)}},search:Cr.build({title:"Search expectations"}).on("clear",()=>{ht.state.filters.search=null,Te()}).on("input",n=>{ht.state.filters.search=n,Te()}),filter:In.build({title:"Groups filter",description:"shows/hides items in the list below",width:"M",icon:"fas fa-filter"}),switcher:In.build({title:"Groups switcher",description:"turnes on/off items in the list below",width:"M",icon:"fas fa-power-off"})},p2=n=>{let t=n;return ht.state.filters.groups&&(t=t.filter(e=>ht.state.filters.groups.includes(e.data.group))),ht.state.filters.search&&(t=t.filter(e=>e.match(ht.state.filters.search))),t},Te=(n=[...ce.values()])=>{const t=p2(n.map(e=>e.hide())).map(e=>e.show());n.length===ce.size&&(t.length?Sa.hide():Sa.show())},qo=n=>(n??G.shared.groups).forEach(t=>{var i,r;[...ce.values()].filter(s=>s.data.group===t).every(s=>!s.data.isEnabled)?(i=ht.switcher.buttons.provided[t])==null||i.disable("silent"):(r=ht.switcher.buttons.provided[t])==null||r.enable("silent")}),el=on.build(d2({})).assignMeta({name:"Expectations",icon:"fas fa-magic"}).once("initialize",n=>{n.append(Sa),n.controls.main.append(ht.search),n.controls.additional.append(ht.filter),n.controls.additional.append(ht.switcher),G.on("group:register",t=>{ht.switcher.provide({name:t,isEnabled:!0,colorify:!0}),ht.filter.provide({name:t,isEnabled:!0,colorify:!0})}),ht.switcher.on("enable",t=>G.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!0}})),ht.switcher.on("disable",t=>G.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!1}})),ht.filter.on("enable",()=>{ht.state.filters.groups=ht.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),Te()}),ht.filter.on("disable",()=>{ht.state.filters.groups=ht.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),Te()}),G.services.io.subscribe("expectation:added",t=>{const e=En.build(t);ce.set(t.id,e),n.content.append(e),G.shared.groups.has(t.group)||(G.shared.groups.add(t.group),G.emit("group:register",t.group)),Te([e]),qo([e.data.group])}),G.services.io.subscribe("expectation:updated",t=>{const e=ce.get(t.id)??En.build(t);ce.has(t.id)&&e.provide(t).refresh(),n.content.element.querySelector(`div.expectation[id="${t.id}"]`)||(n.content.append(e),Te([e])),G.shared.groups.has(t.group)||(G.shared.groups.add(t.group),G.emit("group:register",t.group)),ce.set(t.id,e),qo([e.data.group])})}).on("initialize",async n=>{G.shared.groups.clear(),n.content.clear(),ht.switcher.clear(),ht.filter.clear(),ce.clear();const{data:t}=await G.services.io.exec("expectations:get-list");t.forEach(e=>{const i=En.build(e);G.shared.groups.has(e.group)||(G.shared.groups.add(e.group),G.emit("group:register",e.group)),ce.set(e.id,i),n.content.append(i)}),Te(),qo()}),g2=`
|
|
370
|
-
<section id="analytics">
|
|
371
|
-
<div class="storage"></div>
|
|
372
|
-
<div class="content container"></div>
|
|
373
|
-
</section>
|
|
374
|
-
`,m2=xt.compile(g2),At={memory:Qe.build({title:"Server memory usage",icon:"fas fa-memory",description:"updates every 5 seconds",width:"M"}),cache:Qe.build({title:"Cache memory usage",icon:"fas fa-database",description:"updates every 10 minutes",width:"M"}),containers:Qe.build({title:"Registred containers",icon:"fas fa-box",description:"updates every 5 seconds",width:"S"}),rate:Qe.build({title:"Requests rate",icon:"fas fa-rocket",mode:"aggregation",description:"updates instantly",width:"S"})},up=on.build(m2({})).assignMeta({icon:"fas fa-chart-line"}).once("initialize",n=>{n.content.append(At.memory),n.content.append(At.cache),n.content.append(At.containers),n.content.append(At.rate),G.services.io.subscribe("metric:registred",({name:t,point:{timestamp:e,values:i}})=>t in At?At[t].provide([{values:i,legend:Xe(e).format("HH:mm")}]):null)}).on("initialize",async()=>{At.containers.clear(),At.memory.clear(),At.cache.clear(),At.rate.clear();const{data:n}=await G.services.io.exec("metrics:get");At.memory.provide(n.memory.map(({timestamp:t,values:e})=>({values:e,legend:Xe(t).format("HH:mm")}))),At.cache.provide(n.cache.map(({timestamp:t,values:e})=>({values:e,legend:Xe(t).format("HH:mm")}))),At.rate.provide(n.rate.map(({timestamp:t,values:e})=>({values:e,legend:Xe(t).format("HH:mm")}))),At.containers.provide(n.containers.map(({timestamp:t,values:e})=>({values:e,legend:Xe(t).format("HH:mm")})))}),y2=`
|
|
375
|
-
<section id="settings">
|
|
376
|
-
<div class="storage"></div>
|
|
377
|
-
<div class="content container"></div>
|
|
378
|
-
</section>
|
|
379
|
-
`,b2=`
|
|
380
|
-
<div class="content">
|
|
381
|
-
<div class="input size-L" title="prefix"><input type="text" data-key="cache.prefix" value="*"></div>
|
|
382
|
-
<button id="delete"><i class="fas fa-trash-alt"></i>Delete</button>
|
|
383
|
-
</div>
|
|
384
|
-
`,v2=`
|
|
385
|
-
<div class="content">
|
|
386
|
-
<p class="version"><span>Version</span><b>{{version}}</b></p>
|
|
387
|
-
<p class="version"><span>Uptime</span><b>{{uptime}}</b></p>
|
|
388
|
-
</div>
|
|
389
|
-
`,ka={section:xt.compile(y2),cache:xt.compile(b2),stats:xt.compile(v2)},Hi={stats:Ne.build({title:"Stats",icon:"fas fa-server",class:"stats",height:"XS",width:"M"}),cache:Ne.build({title:"Cache",icon:"fas fa-database",class:"cache",height:"XS",width:"M"}).replace(ka.cache({}))},hp=on.build(ka.section({})).assignMeta({icon:"fas fa-cog"}).once("initialize",async n=>{const t=_r.build(n.content);n.content.append(Hi.stats),n.content.append(Hi.cache),sn.build(Hi.cache.element.querySelector("button#delete")).handle(async()=>{var i;const{data:e}=await G.services.io.exec("cache:delete",t.extract().cache);G.shared.popups.push(`Deleted <b>${((i=e.redis)==null?void 0:i.count)??0}</b> cache keys`)})}).on("select",async()=>{const{data:n}=await G.services.io.exec("stats");Hi.stats.replace(ka.stats(n))}),_2=`
|
|
390
|
-
<section id="history">
|
|
391
|
-
<div class="storage"></div>
|
|
392
|
-
|
|
393
|
-
<div class="controls">
|
|
394
|
-
<div class="main">
|
|
395
|
-
<button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
<div class="additional container hidden"></div>
|
|
399
|
-
</div>
|
|
400
|
-
|
|
401
|
-
<div class="content"></div>
|
|
402
|
-
</section>
|
|
403
|
-
`,x2=`
|
|
404
|
-
<div class="buttons">
|
|
405
|
-
<button id="clear"><i class="fas fa-trash-alt"></i>Clear list</button>
|
|
406
|
-
</div>
|
|
407
|
-
`,fp={section:xt.compile(_2),actions:xt.compile(x2)},Ca=Mr.build(),K={state:{storage:new Map,stack:Vt([]),filters:{search:Vt(null),groups:Vt(null)}},search:Cr.build({title:"Search history"}).on("clear",()=>{K.state.filters.search=null,me()}).on("input",n=>{K.state.filters.search=n,me()}),filter:In.build({title:"Groups filter",description:"shows/hides items in the list below",width:"M",icon:"fas fa-filter"}),actions:Ne.build({title:"Actions",class:"actions",width:"M",icon:"fas fa-sliders-h"}).append(fp.actions({}))},w2=n=>{let t=n;return K.state.filters.groups&&(t=t.filter(e=>K.state.filters.groups.includes(e.data.group))),K.state.filters.search&&(t=t.filter(e=>e.match(K.state.filters.search))),t},me=(n=[...K.state.storage.values()])=>{const t=w2(n.map(e=>e.hide())).map(e=>e.show());n.length===K.state.storage.size&&(t.length?Ca.hide():Ca.show())},dp=on.build(fp.section({})).assignMeta({name:"History",icon:"fas fa-history"}).once("initialize",n=>{n.append(Ca),n.controls.main.append(K.search),n.controls.additional.append(K.filter),n.controls.additional.append(K.actions),sn.build(K.actions.element.querySelector("button#clear")).handle(async()=>{if(!K.state.stack.length)return G.shared.popups.push("Nothing to clear",{level:"warning"});await G.services.io.exec("history:delete"),K.state.storage.clear(),K.state.stack=[],n.content.clear(),G.shared.popups.push("History has cleared"),me()}),G.on("group:register",t=>K.filter.provide({name:t,isEnabled:!0,colorify:!0})),K.filter.on("enable",()=>{K.state.filters.groups=K.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),me()}),K.filter.on("disable",()=>{K.state.filters.groups=K.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),me()}),G.services.io.subscribe("history:added",t=>{var i;const e=Pn.build(t);if(K.state.storage.set(t.id,e),K.state.stack.push(t.id),K.state.stack.length>G.config.history.limit*G.shared.groups.size){const r=K.state.stack.shift();(i=K.state.storage.get(r))==null||i.delete(),K.state.storage.delete(r)}n.content.prepend(e),me([e])}),G.services.io.subscribe("history:updated",t=>{const e=K.state.storage.get(t.id)??Pn.build(t);K.state.storage.has(t.id)?e.provide(t).refresh():K.state.stack.push(t.id),K.state.storage.set(t.id,e),n.element.querySelector(`div.history[id="${t.id}"]`)||(n.content.prepend(e),me([e]))})}).on("initialize",async n=>{K.filter.clear(),K.state.stack=[],n.content.clear(),K.state.storage.clear();const{data:t}=await G.services.io.exec("history:get-list");t.forEach(e=>{const i=Pn.build(e);K.state.storage.set(e.id,i),K.state.stack.push(e.id),n.content.append(i)}),me()}),pp=Object.freeze(Object.defineProperty({__proto__:null,analytics:up,expectations:el,history:dp,settings:hp},Symbol.toStringTag,{value:"Module"}));var jo,ff;function S2(){if(ff)return jo;ff=1;var n=cp();function t(e,i,r){var s=e.length;return r=r===void 0?s:r,!i&&r>=s?e:n(e,i,r)}return jo=t,jo}var Ho,df;function nl(){if(df)return Ho;df=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=t+e+i,s="\\ufe0e\\ufe0f",o="\\u200d",a=RegExp("["+o+n+r+s+"]");function l(u){return a.test(u)}return Ho=l,Ho}var zo,pf;function k2(){if(pf)return zo;pf=1;var n=dr(),t=pr(),e="[object RegExp]";function i(r){return t(r)&&n(r)==e}return zo=i,zo}var Vo,gf;function C2(){if(gf)return Vo;gf=1;function n(t){return function(e){return t(e)}}return Vo=n,Vo}var Cn={exports:{}};Cn.exports;var mf;function M2(){return mf||(mf=1,function(n,t){var e=Ff(),i=t&&!t.nodeType&&t,r=i&&!0&&n&&!n.nodeType&&n,s=r&&r.exports===i,o=s&&e.process,a=function(){try{var l=r&&r.require&&r.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();n.exports=a}(Cn,Cn.exports)),Cn.exports}var Wo,yf;function E2(){if(yf)return Wo;yf=1;var n=k2(),t=C2(),e=M2(),i=e&&e.isRegExp,r=i?t(i):n;return Wo=r,Wo}var Uo,bf;function P2(){if(bf)return Uo;bf=1;function n(t){return function(e){return e==null?void 0:e[t]}}return Uo=n,Uo}var $o,vf;function O2(){if(vf)return $o;vf=1;var n=P2(),t=n("length");return $o=t,$o}var Go,_f;function A2(){if(_f)return Go;_f=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=t+e+i,s="\\ufe0e\\ufe0f",o="["+n+"]",a="["+r+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",c="[^"+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",f=u+"?",g="["+s+"]?",b="(?:"+d+"(?:"+[c,p,h].join("|")+")"+g+f+")*",x=g+f+b,w="(?:"+[c+a+"?",a,p,h,o].join("|")+")",E=RegExp(l+"(?="+l+")|"+w+x,"g");function v(_){for(var k=E.lastIndex=0;E.test(_);)++k;return k}return Go=v,Go}var Yo,xf;function L2(){if(xf)return Yo;xf=1;var n=O2(),t=nl(),e=A2();function i(r){return t(r)?e(r):n(r)}return Yo=i,Yo}var Ko,wf;function R2(){if(wf)return Ko;wf=1;function n(t){return t.split("")}return Ko=n,Ko}var Xo,Sf;function T2(){if(Sf)return Xo;Sf=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=t+e+i,s="\\ufe0e\\ufe0f",o="["+n+"]",a="["+r+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",c="[^"+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",f=u+"?",g="["+s+"]?",b="(?:"+d+"(?:"+[c,p,h].join("|")+")"+g+f+")*",x=g+f+b,w="(?:"+[c+a+"?",a,p,h,o].join("|")+")",E=RegExp(l+"(?="+l+")|"+w+x,"g");function v(_){return _.match(E)||[]}return Xo=v,Xo}var Jo,kf;function I2(){if(kf)return Jo;kf=1;var n=R2(),t=nl(),e=T2();function i(r){return t(r)?e(r):n(r)}return Jo=i,Jo}var Zo,Cf;function D2(){if(Cf)return Zo;Cf=1;var n=Ba(),t=1/0,e=17976931348623157e292;function i(r){if(!r)return r===0?r:0;if(r=n(r),r===t||r===-1/0){var s=r<0?-1:1;return s*e}return r===r?r:0}return Zo=i,Zo}var Qo,Mf;function B2(){if(Mf)return Qo;Mf=1;var n=D2();function t(e){var i=n(e),r=i%1;return i===i?r?i-r:i:0}return Qo=t,Qo}var ta,Ef;function N2(){if(Ef)return ta;Ef=1;var n=Hf(),t=S2(),e=nl(),i=je(),r=E2(),s=L2(),o=I2(),a=B2(),l=zf(),u=30,c="...",p=/\w*$/;function h(d,f){var g=u,b=c;if(i(f)){var x="separator"in f?f.separator:x;g="length"in f?a(f.length):g,b="omission"in f?n(f.omission):b}d=l(d);var w=d.length;if(e(d)){var E=o(d);w=E.length}if(g>=w)return d;var v=g-s(b);if(v<1)return b;var _=E?t(E,0,v).join(""):d.slice(0,v);if(x===void 0)return _+b;if(E&&(v+=_.length-v),r(x)){if(d.slice(v).search(x)){var k,M=_;for(x.global||(x=RegExp(x.source,l(p.exec(x))+"g")),x.lastIndex=0;k=x.exec(M);)var P=k.index;_=_.slice(0,P===void 0?v:P)}}else if(d.indexOf(n(x),v)!=v){var T=_.lastIndexOf(x);T>-1&&(_=_.slice(0,T))}return _+b}return ta=h,ta}var F2=N2();const q2=qt(F2),Kn=n=>function(...t){return n(this)(...t)},j2=Kn(n=>(t,e,i,{fn:r,inverse:s})=>{const a=(()=>{switch(e){case"eq":return t===i;case"neq":return t!==i;case"lt":return t<i;case"lte":return t<=i;case"gt":return t>i;case"gte":return t>=i;default:return!1}})();return a?r?r(n):s?s(n):a:null}),H2=Kn(()=>(n,t)=>q2(n,{length:t})),z2=Kn(()=>n=>new Date(n).toLocaleTimeString()),V2=Kn(()=>n=>(n/1e3).toFixed(3)),W2=Kn(()=>n=>nr(n)),U2=Object.freeze(Object.defineProperty({__proto__:null,compare:j2,toColor:W2,toLocaleTime:z2,toSeconds:V2,truncate:H2},Symbol.toStringTag,{value:"Module"})),$2=`
|
|
408
|
-
<div class="segment">
|
|
409
|
-
{{#compare format 'neq' 'short'}}
|
|
410
|
-
<button class="activity">
|
|
411
|
-
{{#if isEnabled}}
|
|
412
|
-
<i class="fas fa-plug"></i>
|
|
413
|
-
{{else}}
|
|
414
|
-
<i class="fas fa-power-off"></i>
|
|
415
|
-
{{/if}}
|
|
416
|
-
</button>
|
|
417
|
-
|
|
418
|
-
<span class="calls-count {{#compare meta.executionsCount 'gt' 0}}active{{/compare}}">
|
|
419
|
-
<i class="fas fa-undo-alt"></i>{{meta.executionsCount}}
|
|
420
|
-
</span>
|
|
421
|
-
{{/compare}}
|
|
422
|
-
|
|
423
|
-
<span class="name"><b style="color: {{toColor group}};">{{group}}</b> {{name}}</span>
|
|
424
|
-
</div>
|
|
425
|
-
|
|
426
|
-
{{#compare format 'neq' 'short'}}
|
|
427
|
-
{{#compare meta.tags.length 'gt' 0}}<span class="arrow"><i class="fas fa-chevron-right"></i></span>{{/compare}}
|
|
428
|
-
|
|
429
|
-
<div class="segment">
|
|
430
|
-
{{#each transports}}<span class="transport">{{this}}</span>{{/each}}
|
|
431
|
-
|
|
432
|
-
{{#each meta.tags}}
|
|
433
|
-
{{#compare @index 'lte' 5}}
|
|
434
|
-
{{#if (compare location 'eq' 'outgoing.status')}}
|
|
435
|
-
<span class="status
|
|
436
|
-
{{#compare value 'lt' 400}}green{{/compare}}
|
|
437
|
-
{{#compare value 'gte' 400}}red{{/compare}}
|
|
438
|
-
"><b>{{value}}</b></span>
|
|
439
|
-
{{else if (compare location 'eq' 'method')}}
|
|
440
|
-
<span class="method" style="color: {{toColor value}};">{{value}}</span>
|
|
441
|
-
{{else}}
|
|
442
|
-
<span class="{{location}}">{{> truncated this length=45}}</span>
|
|
443
|
-
{{/if}}
|
|
444
|
-
{{/compare}}
|
|
445
|
-
{{/each}}
|
|
446
|
-
</div>
|
|
447
|
-
{{/compare}}
|
|
448
|
-
|
|
449
|
-
{{#with schema.forward}}
|
|
450
|
-
<span class="arrow"><i class="fas fa-chevron-right"></i></span>
|
|
451
|
-
|
|
452
|
-
<div class="segment">
|
|
453
|
-
{{#if baseUrl}}<span class="forward">{{> truncated value=baseUrl length=45}}</span>{{/if}}
|
|
454
|
-
{{#if url}}<span class="forward">{{> truncated value=url length=45}}</span>{{/if}}
|
|
455
|
-
|
|
456
|
-
{{#if ../isCached}}<span class="cache"><i class="fas fa-database"></i></span>{{/if}}
|
|
457
|
-
</div>
|
|
458
|
-
{{/with}}
|
|
459
|
-
`,G2=`
|
|
460
|
-
{{#if (compare value.length 'gt' length)}}
|
|
461
|
-
<span class="truncated">
|
|
462
|
-
<span class="full">{{value}}</span>
|
|
463
|
-
<span class="short">{{truncate value length}}</span>
|
|
464
|
-
</span>
|
|
465
|
-
{{else}}
|
|
466
|
-
{{value}}
|
|
467
|
-
{{/if}}
|
|
468
|
-
`,Y2=$2,K2=G2,X2=Object.freeze(Object.defineProperty({__proto__:null,expectationMeta:Y2,truncated:K2},Symbol.toStringTag,{value:"Module"})),J2={init:()=>{Object.entries(U2).forEach(([n,t])=>xt.registerHelper(n,t)),Object.entries(X2).forEach(([n,t])=>xt.registerPartial(n,t))}};J2.init();const gp=Ia.build().show(),mp=Na.build([{type:"section",entity:hp.hide()},{type:"section",entity:up.hide()},{type:"separator"},{type:"section",entity:el},{type:"section",entity:dp.hide()}]).on("select",n=>{Object.values(mp.sections).forEach(t=>t.hide()),G.switchStorage(n.storage),n.show().select()});G.switchStorage(el.storage).share({popups:Da.build(),groups:new Set});document.body.prepend(mp.element);document.body.append(gp.element);document.body.append(G.shared.popups.element);Object.values(pp).forEach(n=>document.body.append(n.element));G.instances.io.on("connect",async()=>{console.log("WebSocket has connected"),await G.services.io.exec("ping");const{data:n}=await G.services.io.exec("config:get");G.assignConfig(n),G.shared.popups.push("Connected!"),Object.values(pp).forEach(t=>t.initialize()),gp.hide()});
|