-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-KBA63WJQ.js
More file actions
175 lines (175 loc) · 672 KB
/
chunk-KBA63WJQ.js
File metadata and controls
175 lines (175 loc) · 672 KB
1
2
3
4
5
6
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
import{$ as u,$a as Mi,A as bi,Aa as qt,Ba as Nc,Bb as gs,C as rr,Ca as ee,Cb as Gc,D as _t,Db as dr,E as yi,Ea as ne,Eb as Yc,F as yc,Fa as Vc,Fb as ur,Gb as Uc,H as vc,Hb as qc,I as b,Ib as zc,J as y,L as hs,La as le,M as Ic,Ma as Dt,N as Pc,Na as Nt,O as Mc,Oa as Lc,Pa as zt,Qa as sr,Qb as kt,R as ar,Ra as lr,S as f,Sa as Rc,Sb as Ot,T as z,Tb as jc,Ub as mr,V as E,Vb as ce,W as S,X as ps,Y as wc,Z as Tc,_ as d,a as Pe,aa as F,ab as jt,b as ze,ba as Ac,ca as Dc,cb as Vt,da as O,ea as P,fa as x,fb as Lt,g as Sc,ga as $t,ha as kc,hb as cr,ia as Oc,ja as vi,ka as Ii,kb as Rt,la as Pi,lb as Wt,ma as Ec,mb as Ht,oa as h,pa as T,pb as Wc,qa as vt,ra as At,sa as me,ta as Un,u as bc,ua as Fc,ub as Me,va as B,vb as Hc,wa as N,wb as wt,xa as V,xb as Sn,yb as fs,z as po,za as Bc,zb as Tt}from"./chunk-WOCH5H6L.js";var bp=()=>["/mgnh"],yp=()=>["/mgnh/checkoutcounter"],vp=()=>["/mgnh/customerorders"],Ip=()=>["/mgnh/shoppingcartmanagement"],Pp=()=>["/mgnh/payments"],Mp=()=>["/mgnh/customermanagement"],wp=()=>["/mgnh/accounting"],Tp=()=>["/mgnh/finance"];function Ap(n,e){if(n&1){let t=O();d(0,"li")(1,"a",8),P("click",function(){b(t);let o=x(2);return y(o.gotoBias())}),h(2,"Bias"),u()()}}function Dp(n,e){if(n&1){let t=O();d(0,"div",1)(1,"div",2)(2,"div",3)(3,"a",4),F(4,"i",5),h(5,"\u7BA1\u7406\u529F\u80FD\u9996\u9801 "),u()(),d(6,"ul",6),E(7,Ap,3,0,"li",7),d(8,"li")(9,"a",4),h(10,"\u6536\u9280\u53F0"),u()(),d(11,"li")(12,"a",4),h(13,"\u8A02\u55AE\u7BA1\u7406"),u()(),d(14,"li")(15,"a",4),h(16,"\u8CFC\u7269\u8ECA\u7BA1\u7406"),u()(),d(17,"li")(18,"a",4),h(19,"\u652F\u51FA\u7BA1\u7406"),u()(),d(20,"li")(21,"a",8),P("click",function(){b(t);let o=x();return y(o.chkIfGoToCourse())}),h(22,"\u5546\u54C1\u57FA\u672C\u8CC7\u6599"),u()(),d(23,"li")(24,"a",4),h(25,"\u6703\u54E1\u7BA1\u7406"),u()(),d(26,"li")(27,"a",4),h(28,"\u6703\u8A08\u7CFB\u7D71"),u()(),d(29,"li")(30,"a",4),h(31,"\u8CA1\u52D9"),u()()()()()}if(n&2){let t=x();f(3),S("routerLink",qt(9,bp)),f(4),S("ngIf",t.Private==1),f(2),S("routerLink",qt(10,yp)),f(3),S("routerLink",qt(11,vp)),f(3),S("routerLink",qt(12,Ip)),f(3),S("routerLink",qt(13,Pp)),f(6),S("routerLink",qt(14,Mp)),f(3),S("routerLink",qt(15,wp)),f(3),S("routerLink",qt(16,Tp))}}var Kc=(()=>{let e=class e{constructor(i,o){this.global=i,this.router=o}ngOnInit(){}get Private(){return this.global.superdavid_Private}get print(){return this.global.print}get posX(){return this.global.posX}gotoBias(){this.global.print=1,this.router.navigate(["/mgnh/bias"])}chkIfGoToCourse(){var i=confirm("\u60A8\u8981\u9032\u884C\u5546\u54C1\u8CC7\u6599\u7BA1\u7406\u55CE\uFF1F");i==!0?this.router.navigateByUrl("/mgnh/productprofile"):this.router.navigateByUrl("/mgnh/coursemanagement")}};e.\u0275fac=function(o){return new(o||e)(z(Tt),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-mgnh"]],decls:2,vars:1,consts:[["class","navbar",4,"ngIf"],[1,"navbar"],[1,"container-mgnh"],[1,"logo"],[3,"routerLink"],[1,"fas","fa-music"],[1,"menu"],[4,"ngIf"],[3,"click"]],template:function(o,r){o&1&&(E(0,Dp,32,17,"div",0),F(1,"router-outlet")),o&2&&S("ngIf",r.print==0)},dependencies:[Nt,Hc,Sn],styles:[".navbar[_ngcontent-%COMP%]{background-color:#fff;height:50px;margin-top:5px}.container-mgnh[_ngcontent-%COMP%]{width:100%;margin:0 auto}.logo[_ngcontent-%COMP%]{display:inline;margin-left:100px}.logo[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#0a8cbf;margin-top:1em;margin-bottom:1em;text-decoration:none;line-height:50px;font-size:24px}.logo[_ngcontent-%COMP%] .fa-music[_ngcontent-%COMP%]{color:#0a8cbf;margin-right:1em}.menu[_ngcontent-%COMP%]{float:right;margin-top:0}.menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;list-style:none}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;margin-right:0;color:#0a8cbf;text-decoration:none;line-height:50px;padding:0 1em}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background-color:#0a8cbf;color:#fff}"]});let n=e;return n})();var Xc=()=>["/mgnh/accounting/"],kp=()=>["/mgnh/accounting/rpt1"],Op=()=>["/mgnh/accounting/rpt2"],Ep=()=>["/mgnh/accounting/rpt3"];function Fp(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),h(12),u(),F(13,"td"),u()),n&2){let t=e.$implicit;f(2),T(t.accountNo),f(2),T(t.subAccountNo),f(2),T(t.accountName),f(2),T(t.accountNameEng),f(2),T(t.note),f(2),T(t.stopUse==!0?"\u505C\u7528":"")}}function Bp(n,e){if(n&1&&(d(0,"div",4)(1,"h1"),h(2,"\u6703\u8A08\u79D1\u76EE\u7DAD\u8B77"),u(),d(3,"table")(4,"thead")(5,"tr")(6,"td"),h(7,"\u79D1\u76EE\u7DE8\u865F"),u(),d(8,"td"),h(9,"\u7D30\u76EE\u7DE8\u865F"),u(),d(10,"td"),h(11,"\u79D1\u76EE\u540D\u7A31"),u(),d(12,"td"),h(13,"\u79D1\u76EE\u82F1\u6587\u540D\u7A31"),u(),d(14,"td"),h(15,"\u5099\u8A3B"),u(),d(16,"td"),h(17,"\u72C0\u614B"),u(),F(18,"td"),u()(),d(19,"tbody"),E(20,Fp,14,6,"tr",5),u()()()),n&2){let t=x();f(20),S("ngForOf",t.accountlist)}}function Np(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),ee(7,"date"),u(),d(8,"td")(9,"button",9),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.getAVBill(o.AvbillId))}),h(10,"\u67E5\u770B"),u()()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.AvbillId),f(2),T(ne(7,3,t.Avdate,"yyyy-MM-dd"))}}function Vp(n,e){if(n&1&&(d(0,"div")(1,"table")(2,"thead")(3,"tr")(4,"td"),h(5,"\u9805\u6B21"),u(),d(6,"td"),h(7,"\u50B3\u7968\u865F\u78BC"),u(),d(8,"td"),h(9,"\u50B3\u7968\u65E5\u671F"),u(),F(10,"td"),u()(),d(11,"tbody"),E(12,Np,11,6,"tr",5),u()()()),n&2){let t=x(2);f(12),S("ngForOf",t.AVBillList)}}function Lp(n,e){if(n&1){let t=O();d(0,"div",13),h(1," \u50B3\u7968\u65E5\u671F\uFF1A"),d(2,"input",14),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.AVDate,o)||(r.AVDate=o),y(o)}),u(),d(3,"button",9),P("click",function(){b(t);let o=x(2);return y(o.getNewAVId())}),h(4,"\u78BA\u5B9A"),u()()}if(n&2){let t=x(2);f(2),B("ngModel",t.AVDate)}}function Rp(n,e){if(n&1){let t=O();d(0,"button",9),P("click",function(){b(t);let o=x(3);return y(o.DeleteAVBill(o.AVBill.AVMS.AvbillId))}),h(1,"\u522A\u9664\u50B3\u7968"),u()}}function Wp(n,e){if(n&1){let t=O();d(0,"button",9),P("click",function(){b(t);let o=x(3);return o.AVEdit=!0,y(o.initAVDS())}),h(1,"\u4FEE\u6539"),u()}}function Hp(n,e){if(n&1){let t=O();d(0,"button",9),P("click",function(){b(t);let o=x(3);return o.AVEdit=!1,y(o.AVBill=null)}),h(1,"\u95DC\u9589\u50B3\u7968"),u()}}function Gp(n,e){if(n&1){let t=O();d(0,"button",9),P("click",function(){b(t);let o=x(3);return y(o.AVEdit=!1)}),h(1,"\u4FEE\u6539\u5B8C\u6210"),u()}}function Yp(n,e){if(n&1){let t=O();d(0,"tr",13)(1,"td",16),h(2," \u501F\u65B9 / \u8CB8\u65B9 \uFF1A "),d(3,"select",24),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.DorC,o)||(r.DorC=o),y(o)}),d(4,"option",25),h(5,"\u501F"),u(),d(6,"option",26),h(7,"\u8CB8"),u()()()()}if(n&2){let t=x(3);f(3),B("ngModel",t.DorC)}}function Up(n,e){n&1&&(d(0,"tr",13)(1,"td"),h(2,"\u9806\u5E8F"),u(),d(3,"td"),h(4,"\u79D1\u76EE"),u(),d(5,"td"),h(6,"\u91D1\u984D"),u(),d(7,"td"),h(8,"\u5099\u8A3B"),u(),F(9,"td"),u())}function qp(n,e){if(n&1){let t=O();d(0,"tr",13)(1,"td")(2,"input",27),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.AVDSSNId,o)||(r.AVDSSNId=o),y(o)}),u()(),d(3,"td")(4,"input",28),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.AccountNoShow,o)||(r.AccountNoShow=o),y(o)}),u(),d(5,"input",29),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.AccountName,o)||(r.AccountName=o),y(o)}),u(),d(6,"span",30),P("click",function(){b(t);let o=x(3);return y(o.getAccountListShort())}),h(7,"\u67E5"),u()(),d(8,"td")(9,"input",31),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.Amount,o)||(r.Amount=o),y(o)}),u()(),d(10,"td")(11,"input",31),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.Note,o)||(r.Note=o),y(o)}),u()(),d(12,"td")(13,"button",9),P("click",function(){b(t);let o=x(3);return y(o.AVDSSave())}),h(14,"\u9001\u51FA"),u(),d(15,"button",9),P("click",function(){b(t);let o=x(3);return y(o.initAVDS())}),h(16,"\u53D6\u6D88"),u()()()}if(n&2){let t=x(3);f(2),B("ngModel",t.AVDSSNId),f(2),B("ngModel",t.AccountNoShow),f(),B("ngModel",t.AccountName),f(4),B("ngModel",t.Amount),f(2),B("ngModel",t.Note)}}function zp(n,e){if(n&1){let t=O();d(0,"span")(1,"button",9),P("click",function(){b(t);let o=x().$implicit,r=x(3);return y(r.EditAV(o))}),h(2,"\u4FEE\u6539"),u(),d(3,"button",9),P("click",function(){b(t);let o=x().$implicit,r=x(3);return y(r.DeleteAV(o))}),h(4,"\u522A\u9664"),u()()}}function jp(n,e){if(n&1&&(d(0,"tr",21)(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),E(10,zp,5,0,"span",10),u()()),n&2){let t=e.$implicit,i=x(3);S("ngClass",t.DorC=="D"?"AVD":"AVC"),f(2),At("",t.Avsnid,"",t.DorC=="D"?"\u501F":"\u8CB8",""),f(2),me("",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName,""),f(2),T(t.Amount),f(2),T(t.Note),f(2),S("ngIf",i.AVEdit==!0)}}function Kp(n,e){if(n&1&&(d(0,"div")(1,"table",15)(2,"thead")(3,"tr")(4,"td",16)(5,"p"),h(6),u(),d(7,"p"),h(8),ee(9,"date"),u(),d(10,"p",17),E(11,Rp,2,0,"button",18),F(12,"span",19),E(13,Wp,2,0,"button",18)(14,Hp,2,0,"button",18)(15,Gp,2,0,"button",18),u()()(),E(16,Yp,8,1,"tr",11)(17,Up,10,0,"tr",11)(18,qp,17,5,"tr",11),u(),d(19,"tbody"),E(20,jp,11,9,"tr",20),d(21,"tr"),F(22,"td"),d(23,"td")(24,"span",21),h(25),u()(),d(26,"td")(27,"span",22),h(28),u(),d(29,"span",23),h(30),u()(),F(31,"td")(32,"td"),u()()()()),n&2){let t=x(2);f(6),vt("\u50B3\u7968\u7DE8\u865F\uFF1A",t.AVBill.AVMS.AvbillId,""),f(2),vt("\u50B3\u7968\u65E5\u671F\uFF1A",ne(9,14,t.AVBill.AVMS.Avdate,"yyyy-MM-dd"),""),f(3),S("ngIf",t.AVEdit==!1),f(2),S("ngIf",t.AVEdit==!1),f(),S("ngIf",t.AVEdit==!1),f(),S("ngIf",t.AVEdit!=!1),f(),S("ngIf",t.AVEdit==!0&&t.AVBill!=null),f(),S("ngIf",t.AVEdit==!0&&t.AVBill!=null),f(),S("ngIf",t.AVEdit==!0&&t.AVBill!=null),f(2),S("ngForOf",t.AVBill.AVDS),f(4),S("ngClass",t.AVBill.DSum!=t.AVBill.CSum?"error":"normal"),f(),T(t.AVBill.DSum==t.AVBill.CSum?"\u501F\u8CB8\u5E73\u8861":"\u501F\u8CB8\u4E0D\u5E73\u8861"),f(3),vt("\u501F\uFF1A",t.AVBill.DSum,""),f(2),vt("\u8CB8\uFF1A",t.AVBill.CSum,"")}}function Xp(n,e){if(n&1&&(d(0,"td"),h(1),u()),n&2){let t=x().$implicit;f(),me("",t.accountNo,"",t.subAccountNo!=null?"-"+t.subAccountNo:""," ",t.accountName,"")}}function Qp(n,e){if(n&1){let t=O();d(0,"td")(1,"button",9),P("click",function(){b(t);let o=x().$implicit,r=x(3);return y(r.AccountNoSelect(o))}),h(2,"\u9078\u53D6"),u()()}}function $p(n,e){if(n&1&&(d(0,"tr"),E(1,Xp,2,3,"td",10)(2,Qp,3,0,"td",10),u()),n&2){let t=e.$implicit;f(),S("ngIf",t.subAccountNo!=null),f(),S("ngIf",t.subAccountNo!=null)}}function Zp(n,e){if(n&1){let t=O();d(0,"div",32),P("dblclick",function(){b(t);let o=x(2);return y(o.AccountListShort=!1)}),F(1,"div",33),d(2,"div",34)(3,"table",35)(4,"thead")(5,"tr")(6,"td"),h(7,"\u79D1\u76EE"),u(),F(8,"td"),u()(),d(9,"tbody"),E(10,$p,3,2,"tr",5),u()()()()}if(n&2){let t=x(2);f(10),S("ngForOf",t.accountlist)}}function Jp(n,e){if(n&1){let t=O();d(0,"div",4)(1,"h1"),h(2,"\u50B3\u7968\u4F5C\u696D"),u(),d(3,"div",6)(4,"div")(5,"span",7),P("click",function(){b(t);let o=x();return y(o.NewAV())}),h(6,"\u65B0\u589E\u50B3\u7968"),u()(),d(7,"div"),h(8," \u67E5\u8A62\u50B3\u7968\uFF1A"),d(9,"input",8),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),P("keypress",function(o){b(t);let r=x();return y(r.onKeyPress(o))}),u(),d(10,"button",9),P("click",function(){b(t);let o=x();return y(o.qryAVBillList())}),h(11,"\u67E5\u8A62"),u()()(),E(12,Vp,13,1,"div",10)(13,Lp,5,1,"div",11)(14,Kp,33,17,"div",10)(15,Zp,11,1,"div",12),u()}if(n&2){let t=x();f(9),B("ngModel",t.qryString),f(3),S("ngIf",t.AVBillList!=null&&t.AVBill==null),f(),S("ngIf",t.AVEdit==!0&&t.AVBill==null),f(),S("ngIf",t.AVBill!=null),f(),S("ngIf",t.AccountListShort==!0)}}function tf(n,e){n&1&&(d(0,"div",4)(1,"h1"),h(2,"\u65E5\u8A18\u5E33"),u()())}function ef(n,e){n&1&&(d(0,"div",4)(1,"h1"),h(2,"\u7E3D\u5206\u985E\u5E33"),u()())}function nf(n,e){n&1&&(d(0,"div",4)(1,"h1"),h(2,"\u660E\u7D30\u5206\u985E"),u()())}var _s=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.route=a,this.router=s,this.qryString="",this.AccountNoShow="",this.AccountNo="",this.SubAccountNo="",this.AccountName="",this.DorC="",this.Amount="",this.Note="",this.AVEdit=!1,this.AVBillId="",this.AccountListShort=!1,this.AVDSId="",this.AVDSSNId="",this.newAVId=!1,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1}ngOnInit(){this.func=this.route.snapshot.queryParamMap.get("func"),this.doDefaultFunction(),this.AVDate=new Date().toISOString().split("T")[0];let i=this.route.snapshot.queryParamMap.get("AVBillId");i&&this.getAVBill(i)}doDefaultFunction(){switch(this.func){case"fun1":this.getAccountList();break;case"fun2":break;case"fun3":break;case"fun4":break;case"fun5":break}}getAccountList(){var i=this.global.serverip+"/api/Accounting/qryAccountList",o={qryAccountName:this.AccountName};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.accountlist=r,console.log(this.accountlist),!0),r=>!1))}qryAVBillList(){this.AVEdit=!1,this.AVBill=null;var i=this.global.serverip+"/api/Accounting/qryAVBillList",o={AVBillId:this.qryString};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.AVBillList=r,!0),r=>!1))}getAVBill(i){var o=this.global.serverip+"/api/Accounting/getAVBillDetail",r={AVBillId:i};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(o,r).then(a=>(this.toastr.clear(),this.AVBill=a,this.newAVId==!0&&(this.AVEdit=!0,this.newAVId=!1),!0),a=>!1))}NewAV(){this.AVEdit=!0,this.newAVId=!0,this.initAVDS()}initAVDS(){this.AVDSId="",this.AccountNo="",this.SubAccountNo="",this.AccountNoShow="",this.AccountName="",this.DorC="D",this.Amount="",this.Note="",this.AVDSSNId=""}EditAV(i){this.AVDSId=i.Id,this.AccountNo=i.AccountNo,this.SubAccountNo=i.SubAccountNo,this.AccountNoShow=i.AccountNo+"-"+i.SubAccountNo,this.AccountName=i.AccountName,this.DorC=i.DorC,this.Amount=i.Amount,this.Note=i.Note,this.AVEdit=!0,this.AVDSSNId=i.Avsnid}getNewAVId(){var i=this.global.serverip+"/api/Accounting/getNewAVId",o={AVDate:this.AVDate};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.AVBillId=r,this.getAVBill(this.AVBillId),!0),r=>!1))}getAccountListShort(){this.AccountListShort=!0,this.getAccountList()}AccountNoSelect(i){this.AccountNo=i.accountNo,this.SubAccountNo=i.subAccountNo,this.AccountNoShow=i.accountNo+"-"+i.subAccountNo,this.AccountName=i.accountName,this.AccountListShort=!1}AVDSSave(){var i=this.global.serverip+"/api/Accounting/savdAVDS",o={AVBillId:this.AVBill.AVMS.AvbillId,AVDSId:this.AVDSId,AccountNo:this.AccountNo,SubAccountNo:this.SubAccountNo,DorC:this.DorC,Amount:this.Amount,Note:this.Note,Avsnid:this.AVDSSNId};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.initAVDS(),this.getAVBill(this.AVBill.AVBillId),!0),r=>!1))}DeleteAV(i){var o=confirm("\u78BA\u5B9A\u8981\u522A\u9664\u8CC7\u6599\u55CE\uFF1F");if(o==!0){var r=this.global.serverip+"/api/Accounting/deleteAVDS",a={AVDSId:i.Id};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(r,a).then(s=>(this.toastr.clear(),this.initAVDS(),this.getAVBill(this.AVBill.AVBillId),!0),s=>!1))}}DeleteAVBill(i){var o=confirm("\u78BA\u5B9A\u8981\u522A\u9664\u8CC7\u6599\u55CE\uFF1F");if(o==!0){var r=this.global.serverip+"/api/Accounting/deleteAVBill",a={AVBillId:i};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(r,a).then(s=>(this.toastr.clear(),this.AVBill=null,this.qryAVBillList(),!0),s=>!1))}}onKeyPress(i){var o=i.key;o=="Enter"&&this.qryAVBillList()}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(Me),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-accounting"]],decls:18,vars:15,consts:[[1,"all"],[1,"submenu"],[3,"click","routerLink"],["class","main",4,"ngIf"],[1,"main"],[4,"ngFor","ngForOf"],[1,"function_bar"],[1,"span_href",3,"click"],["type","text",3,"ngModelChange","keypress","ngModel"],[3,"click"],[4,"ngIf"],["class","AVInputBar",4,"ngIf"],[3,"dblclick",4,"ngIf"],[1,"AVInputBar"],["type","date",3,"ngModelChange","ngModel"],[1,"AVBill"],["colspan","5"],["align","right"],[3,"click",4,"ngIf"],[1,"w40"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"DorCD"],[1,"DorCC"],[3,"ngModelChange","ngModel"],["value","D"],["value","C"],["type","text",1,"w40",3,"ngModelChange","ngModel"],["type","text","disabled","",1,"w70",3,"ngModelChange","ngModel"],["type","text",1,"w200",3,"ngModelChange","ngModel"],[1,"button",3,"click"],["type","text",3,"ngModelChange","ngModel"],[3,"dblclick"],[1,"mask"],[1,"accountlist"],[2,"width","100%","background-color","lightgreen","border","1px solid black"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"div",1)(2,"span",2),P("click",function(){return r.func="fun1",r.doDefaultFunction()}),h(3,"\u6703\u8A08\u79D1\u76EE\u7DAD\u8B77"),u(),d(4,"span",2),P("click",function(){return r.func="fun2",r.doDefaultFunction()}),h(5,"\u6703\u8A08\u50B3\u7968\u4F5C\u696D"),u(),d(6,"span",2),P("click",function(){return r.func=""}),h(7,"\u6703\u8A08\u65E5\u8A18\u5E33"),u(),d(8,"span",2),P("click",function(){return r.func=""}),h(9,"\u6703\u8A08\u7E3D\u5206\u985E\u5E33"),u(),d(10,"span",2),P("click",function(){return r.func=""}),h(11,"\u6703\u8A08\u660E\u7D30\u5206\u985E\u5E33"),u()()(),d(12,"div",0),E(13,Bp,21,1,"div",3)(14,Jp,16,5,"div",3)(15,tf,3,0,"div",3)(16,ef,3,0,"div",3)(17,nf,3,0,"div",3),u()),o&2&&(f(2),S("routerLink",qt(10,Xc)),f(2),S("routerLink",qt(11,Xc)),f(2),S("routerLink",qt(12,kp)),f(2),S("routerLink",qt(13,Op)),f(2),S("routerLink",qt(14,Ep)),f(3),S("ngIf",r.func=="fun1"),f(),S("ngIf",r.func=="fun2"),f(),S("ngIf",r.func=="fun3"),f(),S("ngIf",r.func=="fun4"),f(),S("ngIf",r.func=="fun5"))},dependencies:[le,Dt,Nt,Sn,Wt,Ht,jt,Rt,Vt,Lt,zt],styles:[".all[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:100%}.submenu[_ngcontent-%COMP%]{display:flex;justify-content:left}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;margin:5px;color:#00008b;border-bottom:1px solid darkblue}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{background-color:#ff0}.span_href[_ngcontent-%COMP%]{margin-left:5px;margin-right:5px;color:#00008b;border-bottom:1px solid darkblue}.function_bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:5px}.main[_ngcontent-%COMP%]{left:0;right:0;bottom:0}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid black}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}.AVD[_ngcontent-%COMP%]{text-align:left;background-color:#add8e6}.AVC[_ngcontent-%COMP%]{text-align:right;background-color:#90ee90}.AVInputBar[_ngcontent-%COMP%]{background-color:#feb090}.mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:1000%;height:1000%;background-color:#fff;z-index:100}.accountlist[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:101}.w40[_ngcontent-%COMP%]{width:40px;display:inline-block}.w70[_ngcontent-%COMP%]{width:70px;display:inline-block}.w200[_ngcontent-%COMP%]{width:200px;display:inline-block}.error[_ngcontent-%COMP%]{display:block;text-align:right;color:red;font-size:18px}.normal[_ngcontent-%COMP%]{display:block;text-align:right;color:green;font-size:18px}.DorCD[_ngcontent-%COMP%]{display:block;text-align:left}.DorCC[_ngcontent-%COMP%]{display:block;text-align:right}@media only screen and (max-width: 375px){.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100px}.function_bar[_ngcontent-%COMP%]{flex-direction:column}.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:375px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:35px}}@media only screen and (max-width: 667px){.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:667px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:70px}}"]});let n=e;return n})();function of(n,e){if(n&1){let t=O();Ac(0),d(1,"a",22),P("click",function(){b(t);let o=x().$implicit,r=x();return y(r.gotoAVBill(o.AvbillId))}),h(2),u(),Dc()}if(n&2){let t=x().$implicit;f(2),T(t.AvbillId)}}function rf(n,e){}function af(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),ee(3,"date"),u(),d(4,"td"),E(5,of,3,1,"ng-container",21)(6,rf,0,0,"ng-template",null,0,Vc),u(),d(8,"td"),h(9),u(),d(10,"td"),h(11),u(),d(12,"td"),h(13),u(),d(14,"td")(15,"span",20),h(16),u()(),d(17,"td"),h(18),u(),d(19,"td"),h(20),u()()),n&2){let t=e.$implicit,i=e.index,o=Ec(7),r=x();f(2),T(i==0||t.AvbillId!=r.AVs[i-1>=0?i-1:0].AvbillId?t.strAVDate:ne(3,10,"","yyyy-MM-dd")),f(3),S("ngIf",i==0||t.AvbillId!=r.AVs[i-1>=0?i-1:0].AvbillId)("ngIfElse",o),f(4),T(t.AccountNo),f(2),T(t.SubAccountNo),f(2),T(t.AccountName),f(2),S("ngClass",t.Note=="\u501F\u8CB8\u4E0D\u5E73\u8861"?"error":"normal"),f(),T(t.Note),f(2),T(t.DAmount),f(2),T(t.CAmount)}}var Qc=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.route=a,this.router=s,this.Year=new Date().getFullYear(),this.Month=new Date().getMonth()+1,this.AVDAmount=0,this.AVCAmount=0}ngOnInit(){}getMonthlyReport(){var i=this.global.serverip+"/api/Accounting/getMonthlyReport",o={Year:this.Year,Month:this.Month};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),r!=!1&&(this.AVs=r,this.getFilteredAVBillsInC(this.AVs),this.getFilteredAVBillsInD(this.AVs)),!0),r=>!1))}getFilteredAVBillsInD(i){this.AVDAmount=i.filter(o=>o.DorC==="D").reduce((o,r)=>o+Number(r.DAmount),0),console.log(this.AVDAmount)}getFilteredAVBillsInC(i){this.AVCAmount=i.filter(o=>o.DorC==="C").reduce((o,r)=>o+Number(r.CAmount),0),console.log(this.AVCAmount)}gotoAVBill(i){var o="/mgnh/accounting";this.router.navigate([o],{queryParams:{AVBillId:i,func:"fun2"}})}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(Me),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-accounting-rpt1"]],decls:70,vars:9,consts:[["empty",""],[1,"all"],[1,"function_bar"],["type","text",1,"w40",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","1"],["value","2"],["value","3"],["value","4"],["value","5"],["value","6"],["value","7"],["value","8"],["value","9"],["value","10"],["value","11"],["value","12"],[3,"click"],["colspan","8","align","center"],[4,"ngFor","ngForOf"],[3,"ngClass"],[4,"ngIf","ngIfElse"],["href","javascript:void(0)",3,"click"]],template:function(o,r){o&1&&(d(0,"div",1)(1,"div",2),h(2," \u8CC7\u6599\u67E5\u8A62\uFF1A "),d(3,"input",3),V("ngModelChange",function(s){return N(r.Year,s)||(r.Year=s),s}),u(),h(4,"\u5E74 "),d(5,"select",4),V("ngModelChange",function(s){return N(r.Month,s)||(r.Month=s),s}),d(6,"option",5),h(7,"01"),u(),d(8,"option",6),h(9,"02"),u(),d(10,"option",7),h(11,"03"),u(),d(12,"option",8),h(13,"04"),u(),d(14,"option",9),h(15,"05"),u(),d(16,"option",10),h(17,"06"),u(),d(18,"option",11),h(19,"07"),u(),d(20,"option",12),h(21,"08"),u(),d(22,"option",13),h(23,"09"),u(),d(24,"option",14),h(25,"10"),u(),d(26,"option",15),h(27,"11"),u(),d(28,"option",16),h(29,"12"),u()(),d(30,"button",17),P("click",function(){return r.getMonthlyReport()}),h(31,"\u67E5\u8A62"),u()(),d(32,"div")(33,"table")(34,"thead")(35,"tr")(36,"td",18),h(37),u()(),d(38,"tr")(39,"td"),h(40,"\u65E5\u671F"),u(),d(41,"td"),h(42,"\u50B3\u7968\u7DE8\u865F"),u(),d(43,"td"),h(44,"\u7E3D\u5E33\u7DE8\u865F"),u(),d(45,"td"),h(46,"\u5B50\u76EE\u7DE8\u865F"),u(),d(47,"td"),h(48,"\u6703\u8A08\u79D1\u76EE"),u(),d(49,"td"),h(50,"\u6458\u8981"),u(),d(51,"td"),h(52,"\u501F\u65B9\u91D1\u984D"),u(),d(53,"td"),h(54,"\u8CB8\u65B9\u91D1\u984D"),u()()(),d(55,"tbody"),E(56,af,21,13,"tr",19),d(57,"tr"),F(58,"td")(59,"td")(60,"td")(61,"td")(62,"td"),d(63,"td")(64,"span",20),h(65),u()(),d(66,"td"),h(67),u(),d(68,"td"),h(69),u()()()()()()),o&2&&(f(3),B("ngModel",r.Year),f(2),B("ngModel",r.Month),f(32),At(" ",r.Year," / ",r.Month," \u65E5\u8A18\u5E33 "),f(19),S("ngForOf",r.AVs),f(8),S("ngClass",r.AVDAmount==r.AVCAmount?"normal":"error"),f(),T(r.AVDAmount==r.AVCAmount?"\u5408\u8A08\u91D1\u984D":"\u501F\u8CB8\u4E0D\u5E73\u8861"),f(2),T(r.AVDAmount),f(2),T(r.AVCAmount))},dependencies:[le,Dt,Nt,Wt,Ht,jt,Rt,Vt,Lt,zt],styles:[".all[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:100%}.submenu[_ngcontent-%COMP%]{display:flex;justify-content:left}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;margin:5px;color:#00008b;border-bottom:1px solid darkblue}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{background-color:#ff0}.span_href[_ngcontent-%COMP%]{margin-left:5px;margin-right:5px;color:#00008b;border-bottom:1px solid darkblue}.function_bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:5px}.main[_ngcontent-%COMP%]{left:0;right:0;bottom:0}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid black}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}.AVD[_ngcontent-%COMP%]{text-align:left;background-color:#add8e6}.AVC[_ngcontent-%COMP%]{text-align:right;background-color:#90ee90}.AVInputBar[_ngcontent-%COMP%]{background-color:#feb090}.mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:1000%;height:1000%;background-color:#fff;z-index:100}.accountlist[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:101}.w40[_ngcontent-%COMP%]{width:40px;display:inline-block}.w70[_ngcontent-%COMP%]{width:70px;display:inline-block}.w200[_ngcontent-%COMP%]{width:200px;display:inline-block}.error[_ngcontent-%COMP%]{display:block;text-align:right;color:red;font-size:18px}.normal[_ngcontent-%COMP%]{display:block;text-align:right;color:green;font-size:18px}.DorCD[_ngcontent-%COMP%]{display:block;text-align:left}.DorCC[_ngcontent-%COMP%]{display:block;text-align:right}@media only screen and (max-width: 375px){.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100px}.function_bar[_ngcontent-%COMP%]{flex-direction:column}.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:375px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:35px}}@media only screen and (max-width: 667px){.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:667px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:70px}}"]});let n=e;return n})();function sf(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.AccountNo),f(),At("",t.AccountNo,"",t.AccountName,"")}}function lf(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),ee(3,"date"),u(),d(4,"td"),h(5),u(),d(6,"td"),h(7),u(),d(8,"td"),h(9),u(),d(10,"td"),h(11),u(),d(12,"td")(13,"span",24),h(14),u()(),d(15,"td"),h(16),u(),d(17,"td"),h(18),u()()),n&2){let t=e.$implicit,i=e.index,o=x();f(2),T(i==0||t.AvbillId!=o.AVs[i-1>=0?i-1:0].AvbillId?t.strAVDate:ne(3,9,"","yyyy-MM-dd")),f(3),T(i==0||t.AvbillId!=o.AVs[i-1>=0?i-1:0].AvbillId?t.AvbillId:""),f(2),T(t.AccountNo),f(2),T(t.SubAccountNo),f(2),T(t.AccountName),f(2),S("ngClass",t.Note=="\u501F\u8CB8\u4E0D\u5E73\u8861"?"error":"normal"),f(),T(t.Note),f(2),T(t.DAmount),f(2),T(t.CAmount)}}var $c=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.route=a,this.router=s,this.Year=new Date().getFullYear(),this.Month=new Date().getMonth()+1,this.Account="",this.AccountNo="",this.AccountName="",this.qryAll=!1}ngOnInit(){this.getMainAccount(),this.getAccountReport()}getMainAccount(){var i=this.global.serverip+"/api/Accounting/qryMainAccounts",o={};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.AccountNos=r,!0),r=>!1))}getAccountReport(){var i=this.global.serverip+"/api/Accounting/getAccountReport",o={Year:this.Year,Month:this.Month,AccountNo:this.AccountNo,qryAll:this.qryAll};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.AVs=r,!0),r=>!1))}getAccountName(i){this.AccountNos.forEach(o=>{o.AccountNo==this.AccountNo&&(this.AccountName=o.AccountName)})}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(Me),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-accounting-rpt2"]],decls:65,vars:10,consts:[[1,"all"],[1,"function_bar"],["type","text",1,"w40",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","1"],["value","2"],["value","3"],["value","4"],["value","5"],["value","6"],["value","7"],["value","8"],["value","9"],["value","10"],["value","11"],["value","12"],[3,"ngModelChange","change","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"w40"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"click"],["colspan","8","align","center"],[4,"ngFor","ngForOf"],[3,"value"],[3,"ngClass"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"div",1),h(2," \u8CC7\u6599\u67E5\u8A62\uFF1A "),d(3,"input",2),V("ngModelChange",function(s){return N(r.Year,s)||(r.Year=s),s}),u(),h(4,"\u5E74 "),d(5,"select",3),V("ngModelChange",function(s){return N(r.Month,s)||(r.Month=s),s}),d(6,"option",4),h(7,"01"),u(),d(8,"option",5),h(9,"02"),u(),d(10,"option",6),h(11,"03"),u(),d(12,"option",7),h(13,"04"),u(),d(14,"option",8),h(15,"05"),u(),d(16,"option",9),h(17,"06"),u(),d(18,"option",10),h(19,"07"),u(),d(20,"option",11),h(21,"08"),u(),d(22,"option",12),h(23,"09"),u(),d(24,"option",13),h(25,"10"),u(),d(26,"option",14),h(27,"11"),u(),d(28,"option",15),h(29,"12"),u()(),h(30," \u7E3D\u5E33\u540D\u7A31\uFF1A"),d(31,"select",16),V("ngModelChange",function(s){return N(r.AccountNo,s)||(r.AccountNo=s),s}),P("change",function(s){return r.getAccountName(s)}),E(32,sf,2,3,"option",17),u(),F(33,"span",18),d(34,"input",19),V("ngModelChange",function(s){return N(r.qryAll,s)||(r.qryAll=s),s}),u(),h(35,"\u67E5\u8A62\u5168\u90E8\u8CC7\u6599 "),d(36,"button",20),P("click",function(){return r.getAccountReport()}),h(37,"\u67E5\u8A62"),u()(),d(38,"div")(39,"table")(40,"thead")(41,"tr")(42,"td",21),h(43),F(44,"span",18),h(45),u()(),d(46,"tr")(47,"td"),h(48,"\u65E5\u671F"),u(),d(49,"td"),h(50,"\u50B3\u7968\u7DE8\u865F"),u(),d(51,"td"),h(52,"\u7E3D\u5E33\u7DE8\u865F"),u(),d(53,"td"),h(54,"\u5B50\u76EE\u7DE8\u865F"),u(),d(55,"td"),h(56,"\u6703\u8A08\u79D1\u76EE"),u(),d(57,"td"),h(58,"\u6458\u8981"),u(),d(59,"td"),h(60,"\u501F\u65B9\u91D1\u984D"),u(),d(61,"td"),h(62,"\u8CB8\u65B9\u91D1\u984D"),u()()(),d(63,"tbody"),E(64,lf,19,12,"tr",22),u()()()()),o&2&&(f(3),B("ngModel",r.Year),f(2),B("ngModel",r.Month),f(26),B("ngModel",r.AccountNo),f(),S("ngForOf",r.AccountNos),f(2),B("ngModel",r.qryAll),f(9),At(" ",r.Year," / ",r.Month,""),f(2),At("\u7E3D\u5E33\u79D1\u76EE\uFF1A",r.AccountNo," ",r.AccountName," \u7E3D\u5206\u985E\u5E33 "),f(19),S("ngForOf",r.AVs))},dependencies:[le,Dt,Wt,Ht,jt,Mi,Rt,Vt,Lt,zt],styles:[".all[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:100%}.submenu[_ngcontent-%COMP%]{display:flex;justify-content:left}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;margin:5px;color:#00008b;border-bottom:1px solid darkblue}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{background-color:#ff0}.span_href[_ngcontent-%COMP%]{margin-left:5px;margin-right:5px;color:#00008b;border-bottom:1px solid darkblue}.function_bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:5px}.main[_ngcontent-%COMP%]{left:0;right:0;bottom:0}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid black}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}.AVD[_ngcontent-%COMP%]{text-align:left;background-color:#add8e6}.AVC[_ngcontent-%COMP%]{text-align:right;background-color:#90ee90}.AVInputBar[_ngcontent-%COMP%]{background-color:#feb090}.mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:1000%;height:1000%;background-color:#fff;z-index:100}.accountlist[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:101}.w40[_ngcontent-%COMP%]{width:40px;display:inline-block}.w70[_ngcontent-%COMP%]{width:70px;display:inline-block}.w200[_ngcontent-%COMP%]{width:200px;display:inline-block}.error[_ngcontent-%COMP%]{display:block;text-align:right;color:red;font-size:18px}.normal[_ngcontent-%COMP%]{display:block;text-align:right;color:green;font-size:18px}.DorCD[_ngcontent-%COMP%]{display:block;text-align:left}.DorCC[_ngcontent-%COMP%]{display:block;text-align:right}@media only screen and (max-width: 375px){.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100px}.function_bar[_ngcontent-%COMP%]{flex-direction:column}.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:375px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:35px}}@media only screen and (max-width: 667px){.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:667px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:70px}}"]});let n=e;return n})();function cf(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.AccountNo),f(),At("",t.AccountNo,"",t.AccountName,"")}}function df(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.SubAccountNo),f(),At("",t.SubAccountNo,"",t.AccountName,"")}}function uf(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),ee(3,"date"),u(),d(4,"td"),h(5),u(),d(6,"td"),h(7),u(),d(8,"td"),h(9),u(),d(10,"td"),h(11),u(),d(12,"td")(13,"span",24),h(14),u()(),d(15,"td"),h(16),u(),d(17,"td"),h(18),u()()),n&2){let t=e.$implicit,i=e.index,o=x();f(2),T(i==0||t.AvbillId!=o.AVs[i-1>=0?i-1:0].AvbillId?t.strAVDate:ne(3,9,"","yyyy-MM-dd")),f(3),T(i==0||t.AvbillId!=o.AVs[i-1>=0?i-1:0].AvbillId?t.AvbillId:""),f(2),T(t.AccountNo),f(2),T(t.SubAccountNo),f(2),T(t.AccountName),f(2),S("ngClass",t.Note=="\u501F\u8CB8\u4E0D\u5E73\u8861"?"error":"normal"),f(),T(t.Note),f(2),T(t.DAmount),f(2),T(t.CAmount)}}var Zc=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.route=a,this.router=s,this.Year=new Date().getFullYear(),this.Month=new Date().getMonth()+1,this.Account="",this.AccountNo="",this.AccountName="",this.SubAccountNo="001",this.qryAll=!1}ngOnInit(){this.getAccountList(),this.getAccountReport()}getAccountList(){var i=this.global.serverip+"/api/Accounting/qryAccountList",o={};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>{this.toastr.clear(),this.ACList=r,this.AccountNos=[];for(var a=0;a<this.ACList.length;a++){var s=this.ACList[a];(s.SubAccountNo==null||s.SubAccountNo=="")&&this.AccountNos.push(s)}return!0},r=>!1))}getAccountReport(){var i=this.global.serverip+"/api/Accounting/getAccountReport",o={Year:this.Year,Month:this.Month,AccountNo:this.AccountNo,SubAccountNo:this.SubAccountNo,qryAll:this.qryAll};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D..."),Promise.resolve(this.auth.httpDo(i,o).then(r=>(this.toastr.clear(),this.AVs=r,!0),r=>!1))}makeMakeSubAccountNos(i){this.SubAccountNos=[];for(var o=0;o<this.ACList.length;o++)this.ACList[o].AccountNo==this.AccountNo&&this.SubAccountNos.push(this.ACList[o]);this.SubAccountNo="001",this.getAccountName(i)}getAccountName(i){for(var o=0;o<this.SubAccountNos.length;o++){var r=this.SubAccountNos[o];r.AccountNo==this.AccountNo&&r.SubAccountNo==this.SubAccountNo&&(this.AccountName=r.AccountName)}}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(Me),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-accounting-rpt3"]],decls:67,vars:13,consts:[[1,"all"],[1,"function_bar"],["type","text",1,"w40",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","1"],["value","2"],["value","3"],["value","4"],["value","5"],["value","6"],["value","7"],["value","8"],["value","9"],["value","10"],["value","11"],["value","12"],[3,"ngModelChange","change","ngModel"],[3,"value",4,"ngFor","ngForOf"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"click"],["colspan","8","align","center"],[1,"w40"],[4,"ngFor","ngForOf"],[3,"value"],[3,"ngClass"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"div",1),h(2," \u8CC7\u6599\u67E5\u8A62\uFF1A "),d(3,"input",2),V("ngModelChange",function(s){return N(r.Year,s)||(r.Year=s),s}),u(),h(4,"\u5E74 "),d(5,"select",3),V("ngModelChange",function(s){return N(r.Month,s)||(r.Month=s),s}),d(6,"option",4),h(7,"01"),u(),d(8,"option",5),h(9,"02"),u(),d(10,"option",6),h(11,"03"),u(),d(12,"option",7),h(13,"04"),u(),d(14,"option",8),h(15,"05"),u(),d(16,"option",9),h(17,"06"),u(),d(18,"option",10),h(19,"07"),u(),d(20,"option",11),h(21,"08"),u(),d(22,"option",12),h(23,"09"),u(),d(24,"option",13),h(25,"10"),u(),d(26,"option",14),h(27,"11"),u(),d(28,"option",15),h(29,"12"),u()(),h(30," \u7E3D\u5E33\u540D\u7A31\uFF1A"),d(31,"select",16),V("ngModelChange",function(s){return N(r.AccountNo,s)||(r.AccountNo=s),s}),P("change",function(s){return r.makeMakeSubAccountNos(s)}),E(32,cf,2,3,"option",17),u(),h(33," \u660E\u7D30\u79D1\u76EE\uFF1A"),d(34,"select",16),V("ngModelChange",function(s){return N(r.SubAccountNo,s)||(r.SubAccountNo=s),s}),P("change",function(s){return r.getAccountName(s)}),E(35,df,2,3,"option",17),u(),d(36,"input",18),V("ngModelChange",function(s){return N(r.qryAll,s)||(r.qryAll=s),s}),u(),h(37,"\u67E5\u8A62\u5168\u90E8\u8CC7\u6599 "),d(38,"button",19),P("click",function(){return r.getAccountReport()}),h(39,"\u67E5\u8A62"),u()(),d(40,"div")(41,"table")(42,"thead")(43,"tr")(44,"td",20),h(45),F(46,"span",21),h(47),u()(),d(48,"tr")(49,"td"),h(50,"\u65E5\u671F"),u(),d(51,"td"),h(52,"\u50B3\u7968\u7DE8\u865F"),u(),d(53,"td"),h(54,"\u7E3D\u5E33\u7DE8\u865F"),u(),d(55,"td"),h(56,"\u5B50\u76EE\u7DE8\u865F"),u(),d(57,"td"),h(58,"\u6703\u8A08\u79D1\u76EE"),u(),d(59,"td"),h(60,"\u6458\u8981"),u(),d(61,"td"),h(62,"\u501F\u65B9\u91D1\u984D"),u(),d(63,"td"),h(64,"\u8CB8\u65B9\u91D1\u984D"),u()()(),d(65,"tbody"),E(66,uf,19,12,"tr",22),u()()()()),o&2&&(f(3),B("ngModel",r.Year),f(2),B("ngModel",r.Month),f(26),B("ngModel",r.AccountNo),f(),S("ngForOf",r.AccountNos),f(2),B("ngModel",r.SubAccountNo),f(),S("ngForOf",r.SubAccountNos),f(),B("ngModel",r.qryAll),f(9),At(" ",r.Year," / ",r.Month,""),f(2),me("\u5206\u985E\u5E33\u79D1\u76EE\uFF1A",r.AccountNo,"-",r.SubAccountNo," ",r.AccountName," \u7E3D\u5206\u985E\u5E33 "),f(19),S("ngForOf",r.AVs))},dependencies:[le,Dt,Wt,Ht,jt,Mi,Rt,Vt,Lt,zt],styles:[".all[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:100%}.submenu[_ngcontent-%COMP%]{display:flex;justify-content:left}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;margin:5px;color:#00008b;border-bottom:1px solid darkblue}.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{background-color:#ff0}.span_href[_ngcontent-%COMP%]{margin-left:5px;margin-right:5px;color:#00008b;border-bottom:1px solid darkblue}.function_bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:5px}.main[_ngcontent-%COMP%]{left:0;right:0;bottom:0}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid black}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}.AVD[_ngcontent-%COMP%]{text-align:left;background-color:#add8e6}.AVC[_ngcontent-%COMP%]{text-align:right;background-color:#90ee90}.AVInputBar[_ngcontent-%COMP%]{background-color:#feb090}.mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:1000%;height:1000%;background-color:#fff;z-index:100}.accountlist[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:101}.w40[_ngcontent-%COMP%]{width:40px;display:inline-block}.w70[_ngcontent-%COMP%]{width:70px;display:inline-block}.w200[_ngcontent-%COMP%]{width:200px;display:inline-block}.error[_ngcontent-%COMP%]{display:block;text-align:right;color:red;font-size:18px}.normal[_ngcontent-%COMP%]{display:block;text-align:right;color:green;font-size:18px}.DorCD[_ngcontent-%COMP%]{display:block;text-align:left}.DorCC[_ngcontent-%COMP%]{display:block;text-align:right}@media only screen and (max-width: 375px){.submenu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100px}.function_bar[_ngcontent-%COMP%]{flex-direction:column}.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:375px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:35px}}@media only screen and (max-width: 667px){.AVBill[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{max-width:667px}.AVBill[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:70px}}"]});let n=e;return n})();var hf=["fileInput"];function pf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(2);return y(o.NewProduct())}),h(1,"\u65B0\u589E\u5546\u54C1"),u()}}function ff(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(2);return y(o.EditProduct())}),h(1,"\u4FEE\u6539\u8CC7\u6599"),u()}}function gf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(2);return y(o.gotoProductPage())}),h(1,"\u67E5\u770B\u5546\u54C1\u9801"),u()}}function _f(n,e){if(n&1){let t=O();d(0,"tr",15),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.setProduct(o))})("focus",function(){let o=b(t).$implicit,r=x(2);return y(r.setProduct(o))})("keyup.arrowdown",function(o){b(t);let r=x(2);return y(r.onKeydown(o))})("keyup.arrowup",function(o){b(t);let r=x(2);return y(r.onKeydown(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),h(12),u()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.ProductId),f(2),T(t.ProdName),f(2),T(t.ProductSpec),f(2),T(t.BrandName),f(2),T(t.Author)}}function Cf(n,e){if(n&1){let t=O();d(0,"div",3)(1,"table")(2,"thead")(3,"tr")(4,"th",4)(5,"h3",5),h(6,"\u5546\u54C1\u8CC7\u6599\u7BA1\u7406"),u(),E(7,pf,2,0,"span",6)(8,ff,2,0,"span",6)(9,gf,2,0,"span",6),u()(),d(10,"tr")(11,"th",4)(12,"div",7)(13,"span")(14,"select",8),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryType,o)||(r.qryType=o),y(o)}),d(15,"option",9),h(16,"\u54C1\u865F"),u(),d(17,"option",10),h(18,"\u54C1\u540D"),u(),d(19,"option",11),h(20,"\u898F\u683C"),u()()(),d(21,"span")(22,"input",12),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),P("keypress",function(o){b(t);let r=x();return y(r.onKeyPress(o))}),u()(),d(23,"span",13),P("click",function(){b(t);let o=x();return y(o.qryProducts())}),h(24,"\u67E5\u8A62"),u()()()(),d(25,"tr")(26,"th"),h(27,"\u9805\u6B21"),u(),d(28,"th"),h(29,"\u54C1\u865F"),u(),d(30,"th"),h(31,"\u54C1\u540D"),u(),d(32,"th"),h(33,"\u898F\u683C"),u(),d(34,"th"),h(35,"\u54C1\u724C"),u(),d(36,"th"),h(37,"\u4F5C\u8005"),u()()(),d(38,"tbody"),E(39,_f,13,6,"tr",14),u()()()}if(n&2){let t=x();S("ngClass",t.p==null?"tableContainerFull":"tableContainerTop"),f(7),S("ngIf",!t.newProduct),f(),S("ngIf",!t.editProduct),f(),S("ngIf",t.showProductDetail),f(5),B("ngModel",t.qryType),f(8),B("ngModel",t.qryString),f(17),S("ngForOf",t.Products)}}function xf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(3);return y(o.NewProduct())}),h(1,"\u65B0\u589E\u5546\u54C1"),u()}}function Sf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(3);return y(o.NewProduct())}),h(1,"\u4FEE\u6539\u8CC7\u6599"),u()}}function bf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(3);return y(o.SaveProduct())}),h(1,"\u8CC7\u6599\u5B58\u6A94"),u()}}function yf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(3);return y(o.DeleteProduct())}),h(1,"\u522A\u9664\u8CC7\u6599"),u()}}function vf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x(3);return y(o.CancelEdit())}),h(1,"\u53D6\u6D88\u4FEE\u6539"),u()}}function If(n,e){if(n&1&&(d(0,"td",43),E(1,xf,2,0,"span",6)(2,Sf,2,0,"span",6)(3,bf,2,0,"span",6)(4,yf,2,0,"span",6)(5,vf,2,0,"span",6),u()),n&2){let t=x(2);f(),S("ngIf",!t.newProduct),f(),S("ngIf",!t.editProduct),f(),S("ngIf",t.editProduct),f(),S("ngIf",t.editProduct),f(),S("ngIf",t.editProduct)}}function Pf(n,e){if(n&1){let t=O();d(0,"button",41),P("click",function(){b(t);let o=x(2);return y(o.AddToPromoteList())}),h(1,"\u9032\u884C\u4E0A\u67B6"),u()}if(n&2){let t=x(2);S("disabled",!t.editProduct)}}function Mf(n,e){if(n&1){let t=O();d(0,"button",41),P("click",function(){b(t);let o=x(2);return y(o.RemoveFromPromoteList())}),h(1,"\u53D6\u6D88\u4E0A\u67B6"),u()}if(n&2){let t=x(2);S("disabled",!t.editProduct)}}function wf(n,e){if(n&1){let t=O();d(0,"input",44,0),P("change",function(o){b(t);let r=x(2);return y(r.handleFileInput(o))}),u()}}function Tf(n,e){if(n&1){let t=O();d(0,"span",45),P("mousedown",function(){b(t);let o=x(2);return y(o.checkFileType())}),h(1,"\u4E0A\u50B3\u6A94\u6848"),u()}}function Af(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.DeleteProductImage(o.filename,"ImageList",o.FileType))}),h(1,"\u522A\u9664\u7167\u7247"),u()}}function Df(n,e){if(n&1){let t=O();d(0,"div",46)(1,"div",47)(2,"span",48),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.modifyIndex(o.FileUuid,o.ShowIndex!=null?o.ShowIndex:""))}),h(3),u(),d(4,"span"),h(5),u(),h(6),u(),F(7,"img",49),d(8,"div",50),h(9),u(),E(10,Af,2,0,"span",6),u()}if(n&2){let t=e.$implicit,i=e.index,o=x(2);f(3),vt("\u8A2D\u5B9A\u64AD\u653E\u9806\u5E8F",t.showIndex,""),f(2),vt("\u7B2C",i+1,"\u5F35"),f(),vt(" / \u5171",o.Imgs.length,"\u5F35"),f(),S("src",t.file,ar),f(2),T(t.filename),f(),S("ngIf",o.editProduct)}}function kf(n,e){if(n&1){let t=O();d(0,"span",51),P("click",function(){let o=b(t).index,r=x(2);return y(r.currentSlide(o))}),u()}}function Of(n,e){if(n&1&&(d(0,"option",21),h(1),u()),n&2){let t=e.$implicit;$t("value",t.ProductId),f(),T(t.ProdName)}}function Ef(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.DeleteFromAlbum(o.ProductId))}),h(1,"\u522A\u9664"),u()}}function Ff(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.ModifyShowIndexInAlbum(o.ShowIndex))}),h(1,"\u6539\u9806\u5E8F"),u()}}function Bf(n,e){if(n&1){let t=O();d(0,"li",52)(1,"a",53),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.gotoMediaPlayer(o))}),h(2),u(),F(3,"br"),E(4,Ef,2,0,"span",6)(5,Ff,2,0,"span",6),u()}if(n&2){let t=e.$implicit,i=x(2);f(2),T(t.ProductName),f(2),S("ngIf",i.editProduct),f(),S("ngIf",i.editProduct)}}function Nf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.DeleteProductImage(o.FileUuid,"PlayList",o.FileType))}),h(1,"\u522A\u9664"),u()}}function Vf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.modifyIndex(o.FileUuid,o.ShowIndex!=null?o.ShowIndex:""))}),h(1,"\u6539\u9806\u5E8F"),u()}}function Lf(n,e){if(n&1){let t=O();d(0,"span",13),P("click",function(){b(t);let o=x().$implicit,r=x(2);return y(r.modifyFreePromote(o.FileUuid,o.FreePromote=="1"?"0":"1"))}),h(1),u()}if(n&2){let t=x().$implicit,i=x(2);wc(i.styleFreePromote(t.FreePromote)),f(),T(t.FreePromote=="1"?"\u53D6\u6D88\u514D\u8CBB\u63A8\u5EE3":"\u4F5C\u70BA\u514D\u8CBB\u63A8\u5EE3")}}function Rf(n,e){if(n&1){let t=O();d(0,"li",52)(1,"a",53),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.gotoMediaPlayer(o))}),h(2),u(),F(3,"br"),E(4,Nf,2,0,"span",6)(5,Vf,2,0,"span",6)(6,Lf,2,3,"span",54),u()}if(n&2){let t=e.$implicit,i=x(2);f(2),T(t.FileTitle),f(2),S("ngIf",i.editProduct),f(),S("ngIf",i.editProduct),f(),S("ngIf",i.editProduct)}}function Wf(n,e){if(n&1){let t=O();d(0,"div",16)(1,"table",17)(2,"tr"),E(3,If,6,5,"td",18),u(),d(4,"tr")(5,"td")(6,"p")(7,"span"),h(8,"\u54C1\u865F\uFF1A"),u(),d(9,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductId,o)||(r.ProductId=o),y(o)}),u(),F(10,"br"),d(11,"span"),h(12,"\u54C1\u540D\uFF1A"),u(),d(13,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProdName,o)||(r.ProdName=o),y(o)}),u(),F(14,"br"),d(15,"span"),h(16,"\u898F\u683C\uFF1A"),u(),d(17,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductSpec,o)||(r.ProductSpec=o),y(o)}),u(),F(18,"br"),d(19,"span"),h(20,"\u5225\u540D\uFF1A"),u(),d(21,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.Alias,o)||(r.Alias=o),y(o)}),u(),F(22,"br"),d(23,"span"),h(24,"\u54C1\u724C\uFF1A"),u(),d(25,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.BrandName,o)||(r.BrandName=o),y(o)}),u(),F(26,"br"),d(27,"span"),h(28,"\u4F5C\u8005\uFF1A"),u(),d(29,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.Author,o)||(r.Author=o),y(o)}),u(),F(30,"br"),d(31,"span"),h(32,"\u7DE8\u865F\uFF1A"),u(),d(33,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.ShortId,o)||(r.ShortId=o),y(o)}),u(),F(34,"br"),u()(),d(35,"td")(36,"p")(37,"span"),h(38,"\u6A19\u6E96\u552E\u50F9\uFF1A"),u(),d(39,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.StdPrice,o)||(r.StdPrice=o),y(o)}),u(),F(40,"br"),d(41,"span"),h(42,"\u6B64\u552E\u50F9\u662F\u5426\u5DF2\u7D93\u542B\u7A05\uFF1A"),d(43,"select",20),V("ngModelChange",function(o){b(t);let r=x();return N(r.StdPriceHadIncludeTax,o)||(r.StdPriceHadIncludeTax=o),y(o)}),d(44,"option",21),h(45,"\u662F"),u(),d(46,"option",21),h(47,"\u5426"),u()()(),F(48,"br")(49,"br"),d(50,"span"),h(51,"\u6A19\u6E96\u6210\u672C\uFF1A"),u(),d(52,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.StdCost,o)||(r.StdCost=o),y(o)}),u(),F(53,"br")(54,"br"),d(55,"span"),h(56,"\u5546\u54C1\u985E\u578B\uFF1A"),d(57,"select",20),V("ngModelChange",function(o){b(t);let r=x();return N(r.PhysicalProduct,o)||(r.PhysicalProduct=o),y(o)}),d(58,"option",21),h(59,"\u5F71\u97F3\u5546\u54C1"),u(),d(60,"option",21),h(61,"\u5BE6\u9AD4\u5546\u54C1"),u(),d(62,"option",21),h(63,"\u670D\u52D9\u578B\u5546\u54C1"),u()()(),F(64,"br"),u(),d(65,"p")(66,"span"),h(67,"\u5546\u54C1\u4E0A\u67B6\u8A2D\u5B9A"),u(),F(68,"br"),d(69,"span"),h(70,"\u4E0A\u67B6\u958B\u59CB\uFF1A"),u(),d(71,"input",22),V("ngModelChange",function(o){b(t);let r=x();return N(r.PromoteStartDate,o)||(r.PromoteStartDate=o),y(o)}),P("click",function(){b(t);let o=x();return y(o.chkPromote())}),u(),F(72,"br"),d(73,"span"),h(74,"\u4E0A\u67B6\u7D50\u675F\uFF1A"),u(),d(75,"input",22),V("ngModelChange",function(o){b(t);let r=x();return N(r.PromoteEndDate,o)||(r.PromoteEndDate=o),y(o)}),P("click",function(){b(t);let o=x();return y(o.chkPromote())}),u(),F(76,"br"),E(77,Pf,2,1,"button",23)(78,Mf,2,1,"button",23),u()(),d(79,"td")(80,"p")(81,"span"),h(82,"\u5167\u5BB9\u8AAA\u660E\uFF1A"),u(),F(83,"br"),d(84,"textarea",20),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductContents,o)||(r.ProductContents=o),y(o)}),u()()()()(),d(85,"div",24)(86,"label",25),h(87,"\u4E0A\u50B3\u5546\u54C1\u5167\u5BB9"),u(),d(88,"select",20),V("ngModelChange",function(o){b(t);let r=x();return N(r.FileType,o)||(r.FileType=o),y(o)}),d(89,"option",26),h(90,"\u8ACB\u9078\u64C7"),u(),d(91,"option",27),h(92,"\u7167\u7247"),u(),d(93,"option",28),h(94,"\u8072\u97F3"),u(),d(95,"option",29),h(96,"\u5F71\u7247"),u()(),E(97,wf,2,0,"input",30)(98,Tf,2,0,"span",31),u(),d(99,"div",32)(100,"div",33),E(101,Df,11,6,"div",34),d(102,"a",35),P("click",function(){b(t);let o=x();return y(o.plusSlides(-1))}),h(103,"\u276E"),u(),d(104,"a",36),P("click",function(){b(t);let o=x();return y(o.plusSlides(1))}),h(105,"\u276F"),u()(),F(106,"br"),d(107,"div",37),E(108,kf,1,0,"span",38),u()(),d(109,"div",39)(110,"h4"),h(111,"\u5957\u88DD\u5C08\u8F2F"),u(),d(112,"select",20),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProdToAdd,o)||(r.ProdToAdd=o),y(o)}),d(113,"option"),h(114,"\u8ACB\u9078\u53D6"),u(),E(115,Of,2,2,"option",40),u(),d(116,"button",41),P("click",function(){b(t);let o=x();return y(o.AddToAlbum())}),h(117,"\u78BA\u5B9A\u52A0\u5165"),u(),d(118,"ul"),E(119,Bf,6,3,"li",42),u()(),d(120,"div",39)(121,"h4"),h(122,"\u64AD\u653E\u6E05\u55AE"),u(),d(123,"ul"),E(124,Rf,7,4,"li",42),u()()()}if(n&2){let t=x();S("ngClass",t.p!=null&&t.editProduct==!0?"tableContainerFull":"tableContainerBottom"),f(3),S("ngIf",t.editProduct&&t.showProductDetail),f(6),B("ngModel",t.ProductId),S("disabled",t.p.ProductId!=""),f(4),B("ngModel",t.ProdName),S("disabled",!t.editProduct),f(4),B("ngModel",t.ProductSpec),S("disabled",!t.editProduct),f(4),B("ngModel",t.Alias),S("disabled",!t.editProduct),f(4),B("ngModel",t.BrandName),S("disabled",!t.editProduct),f(4),B("ngModel",t.Author),S("disabled",!t.editProduct),f(4),B("ngModel",t.ShortId),S("disabled",!t.editProduct),f(6),B("ngModel",t.StdPrice),S("disabled",!t.editProduct),f(4),B("ngModel",t.StdPriceHadIncludeTax),S("disabled",!t.editProduct),f(),S("value",1),f(2),S("value",0),f(6),B("ngModel",t.StdCost),S("disabled",!t.editProduct),f(5),B("ngModel",t.PhysicalProduct),S("disabled",!t.editProduct),f(),S("value",2),f(2),S("value",1),f(2),S("value",0),f(9),B("ngModel",t.PromoteStartDate),S("disabled",!t.editProduct||t.p.PromoteStartDate!=null),f(4),B("ngModel",t.PromoteEndDate),S("disabled",!t.editProduct||t.p.PromoteEndDate!=null),f(2),S("ngIf",t.PromoteListId==null),f(),S("ngIf",t.PromoteListId!=null),f(6),B("ngModel",t.ProductContents),S("disabled",!t.editProduct),f(4),B("ngModel",t.FileType),S("disabled",!t.editProduct),f(9),S("ngIf",t.editProduct),f(),S("ngIf",t.editProduct),f(3),S("ngForOf",t.Imgs),f(7),S("ngForOf",t.Imgs),f(4),B("ngModel",t.ProdToAdd),S("disabled",!t.editProduct),f(3),S("ngForOf",t.ProductsToAdd),f(),S("disabled",!t.editProduct),f(3),S("ngForOf",t.AlbumList),f(5),S("ngForOf",t.PlayList)}}var Jc=(()=>{let e=class e{constructor(i,o,r,a,s,l){this.signalrService=i,this.media=o,this.auth=r,this.toastr=a,this.global=s,this.router=l,this.Imgs=[],this.fileToUpload=null,this.GettingProductImage=!1,this.PlayList=[],this.ProductId="",this.ProdName="",this.Alias="",this.BrandName="",this.Author="",this.ShortId="",this.ProductSpec="",this.StdPrice="0",this.StdCost="0",this.ProductContents="",this.StdPriceHadIncludeTax="0",this.PhysicalProduct="0",this.qryType="ProductName",this.qryString="",this.qryProductId="",this.qryProdName="",this.qryProductSpec="",this.showProductDetail=!1,this.newProduct=!1,this.editProduct=!1,this.FileType="",this.today=new Date,this.PromoteStartDate=this.today.getFullYear()+"/"+("0"+(this.today.getMonth()+1)).slice(-2)+"/"+("0"+this.today.getDate()).slice(-2),this.PromoteEndDate="",this.slideIndex=1,this.ProductsToAdd=[],this.ProdToAdd="",this.AlbumList=[],this.timer=setTimeout(()=>{this.plusSlides(1)},5e3)}ngOnInit(){this.initial()}checkFileType(){if(this.FileType==""){this.toastr.warning("\u8ACB\u9078\u64C7\u4E0A\u50B3\u6A94\u6848\u985E\u578B\uFF01");return}this.fileInput.nativeElement.value=null,this.fileInput.nativeElement.click()}handleFileInput(i){if(this.FileType==""){alert("\u8ACB\u9078\u64C7\u4E0A\u50B3\u6A94\u6848\u985E\u578B\uFF01"),this.toastr.warning("\u8ACB\u9078\u64C7\u4E0A\u50B3\u6A94\u6848\u985E\u578B\uFF01\u6A94\u6848\u4E0A\u50B3\u5931\u6557\uFF01");return}var o=i.target.files[0];return this.toastr.info("\u6A94\u6848\u4E0A\u50B3\u8655\u7406\u4E2D"),new Promise((r,a)=>{this.media.UploadFile(o,this.ProductId,"",this.FileType).then(s=>{this.toastr.clear(),s==!0?(this.toastr.info("\u6A94\u6848\u4E0A\u50B3\u5B8C\u6210"),this.getProductImageLists(),r(!0)):(this.toastr.info("\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u5617\u8A66"),a(new Error("Upload failed"))),r(!0)}).catch(s=>{this.toastr.clear(),this.toastr.error(`\u4E0A\u50B3\u5931\u6557: ${s.message||"\u8ACB\u91CD\u65B0\u5617\u8A66"}`),a(s)})})}setProduct(i){this.p=i,this.showProductDetail=!0,this.ProductId=i.ProductId,this.ProdName=i.ProdName,this.Alias=i.Alias,this.BrandName=i.BrandName,this.Author=i.Author,this.ShortId=i.ShortId,this.ProductSpec=i.ProductSpec,this.StdPrice=i.StdPrice,this.StdCost=i.StdCost,this.ProductContents=i.ProductContents,this.StdPriceHadIncludeTax=i.StdPriceHadIncludeTax,this.PhysicalProduct=i.PhysicalProduct,this.PromoteListId=i.PromoteListId,this.PromoteStartDate=i.PromoteStartDate!=null?new Date(i.PromoteStartDate).toISOString().split("T")[0]:"",this.PromoteEndDate=i.PromoteEndDate!=null?new Date(i.PromoteEndDate).toISOString().split("T")[0]:"",this.getProductImageLists(),this.qryProductsToAdd(),this.qryAlbum()}onKeydown(i){}initial(){this.showProductDetail=!1,this.newProduct=!1,this.editProduct=!1,this.p=null,this.ProductId="",this.ProdName="",this.Alias="",this.BrandName="",this.Author="",this.ShortId="",this.ProductSpec="",this.StdPrice="0",this.StdCost="0",this.ProductContents="",this.StdPriceHadIncludeTax="0",this.PhysicalProduct="0"}qryProducts(){switch(this.qryProductId="",this.qryProdName="",this.qryProductSpec="",this.qryType){case"ProductId":this.qryProductId=this.qryString;break;case"ProductName":this.qryProdName=this.qryString;break;case"ProductSpec":this.qryProductSpec=this.qryString;break}var i=this.global.serverip+"/api/Product/qryProducts",o={ProductId:this.qryProductId,ProdName:this.qryProdName,ProductSpec:this.qryProductSpec};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D"),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u5546\u54C1\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),this.Products=s,r(!0)},s=>{a(!1)})})}NewProduct(){if(this.editProduct==!0&&this.p.ProductId!=""){this.toastr.warning("\u8ACB\u5148\u7D50\u675F\u5546\u54C1\u4FEE\u6539\u624D\u80FD\u9032\u884C\u65B0\u589E\u5546\u54C1\u8CC7\u6599\uFF01");return}this.initial(),this.newProduct=!0,this.editProduct=!0,this.showProductDetail=!0,this.p=new Object,this.p.ProductId="",this.p.ProdName="",this.p.Alias="",this.p.BrandName="",this.p.Author="",this.p.ShortId="",this.p.ProductSpec="",this.p.StdPrice="0",this.p.StdCos="0",this.p.Content="",this.p.StdPriceHadIncludeTax="0",this.p.PhysicalProduct="0"}EditProduct(){this.editProduct=!0}CancelEdit(){var i=confirm("\u78BA\u5B9A\u8981\u7D50\u675F\u4FEE\u6539\u55CE\uFF1F");i&&this.initial()}SaveProduct(){if(!(this.ProductId==null||this.ProductId=="")){var i=this.global.serverip+"/api/Product/UpdateProduct",o={ProductId:this.ProductId,ProdName:this.ProdName!=null?this.ProdName:"",Alias:this.Alias!=null?this.Alias:"",BrandName:this.BrandName!=null?this.BrandName:"",Author:this.Author!=null?this.Author:"",ShortId:this.ShortId!=null?this.ShortId:"",ProductSpec:this.ProductSpec!=null?this.ProductSpec:"",StdPrice:this.StdPrice,StdCost:this.StdCost,ProductContents:this.ProductContents!=null?this.ProductContents:"",StdPriceHadIncludeTax:this.StdPriceHadIncludeTax,PhysicalProduct:this.PhysicalProduct};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u5546\u54C1\u8CC7\u6599\u66F4\u65B0\u6210\u529F"),this.editProduct=!1,this.newProduct=!1,this.qryProductId=this.ProductId,this.qryProducts(),r(!0)},s=>{a(!1)})})}}DeleteProduct(){if(!(this.ProductId==null||this.ProductId=="")){var i=confirm("\u78BA\u5B9A\u8981\u522A\u9664\u8CC7\u6599\u55CE\uFF1F");if(i){var o=this.global.serverip+"/api/Product/DeleteProduct",r={ProductId:this.ProductId};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),this.toastr.info("\u5546\u54C1\u8CC7\u6599\u66F4\u65B0\u6210\u529F"),this.editProduct=!1,this.newProduct=!1,this.initial(),this.qryProducts(),a(!0)},l=>{s(!1)})})}}}getImgFile(i){var o=i.FileUuid,r=i.showIndex;this.media.getMedia(o,"images").then(a=>{this.theImage=a;var s=new Cs;return s.file=a,s.filename=o,s.showIndex=r,this.Imgs.push(s),a})}getProductImageLists(){if(this.GettingProductImage!=!0&&(this.GettingProductImage=!0,!(this.ProductId==null||this.ProductId==""))){var i=this.global.serverip+"/api/Product/GetProductImageList",o={ProductId:this.ProductId};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.info("\u5546\u54C1\u7167\u7247\u6293\u53D6\u5B8C\u6210"),this.PImages=s.ImageList,this.PlayList=s.PlayList,this.GettingProductImage=!1,this.LoadImage(),r(!0)},s=>{a(!1)})})}}LoadImage(){this.Imgs=[],this.PImages.forEach(i=>{setTimeout(()=>{var o=this.getImgFile(i)},500)})}DeleteProductImage(i,o,r){return!this.ProductId||this.ProductId===""?(this.toastr.error("\u7121\u6548\u7684\u5546\u54C1 ID"),Promise.reject(!1)):!i||i===""?(this.toastr.error("\u7121\u6548\u7684\u6A94\u6848\u540D\u7A31"),Promise.reject(!1)):confirm("\u78BA\u5B9A\u8981\u522A\u9664\u5546\u54C1\u6A94\u6848\u55CE\uFF1F")?(this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.signalrService.ensureConnected().then(()=>{this.media.DeleteProductImage(this.ProductId,i,o,r).subscribe({next:c=>{this.signalrService.listenForTaskUpdates(c.taskId).subscribe({next:m=>{m.status==="Processing"?this.toastr.info("\u6B63\u5728\u8655\u7406\u522A\u9664..."):m.status==="Completed"?(this.toastr.clear(),this.toastr.info("\u5546\u54C1\u8CC7\u6599\u66F4\u65B0\u6210\u529F"),this.getProductImageLists(),s(!0)):m.status==="Failed"&&(this.toastr.clear(),this.toastr.error(`\u522A\u9664\u5931\u6557: ${m.error||"\u8ACB\u91CD\u65B0\u5617\u8A66"}`),l(!1))},error:m=>{this.toastr.clear(),this.toastr.error(`\u522A\u9664\u5931\u6557: ${m.message||"\u8ACB\u91CD\u65B0\u5617\u8A66"}`),l(!1)}})},error:c=>{this.toastr.clear(),this.toastr.error(`\u522A\u9664\u5931\u6557: ${c.message||"\u8ACB\u91CD\u65B0\u5617\u8A66"}`),l(!1)}})}).catch(c=>{this.toastr.clear(),this.toastr.error(`SignalR \u9023\u7DDA\u5931\u6557: ${c.message||"\u8ACB\u91CD\u65B0\u5617\u8A66"}`),l(!1)})})):Promise.reject(!1)}plusSlides(i){this.showSlides(this.slideIndex=this.slideIndex+i)}currentSlide(i){this.showSlides(this.slideIndex=i)}showSlides(i){var o,r=Array.from(document.getElementsByClassName("mySlides")),a=document.getElementsByClassName("dot");if(r.length==0){setTimeout(()=>{this.showSlides(this.slideIndex)},5e3);return}for(this.slideIndex>r.length&&(this.slideIndex=1),this.slideIndex<1&&(this.slideIndex=r.length),o=0;o<r.length;o++)r[o].style.display="none";for(o=0;o<a.length;o++)a[o].className=a[o].className.replace(" active","");r[this.slideIndex-1].style.display="block",a[this.slideIndex-1].className+=" active",this.timer=setTimeout(()=>{this.plusSlides(1)},5e3)}gotoProductPage(){let i=this.router.serializeUrl(this.router.createUrlTree(["/product/"+this.p.ProductId],{queryParams:{}}));window.open(i,"_blank")}modifyIndex(i,o){var r=prompt("\u8ACB\u8F38\u5165\u65B0\u7684\u64AD\u653E\u9806\u5E8F",o.toString());if(o!=null){var a=this.global.serverip+"/api/Product/updateImageShowIndex",s={ProductId:this.ProductId,ImageFileName:i,showIndex:r};return new Promise((l,c)=>{this.auth.httpDo(a,s).then(m=>{this.toastr.info("\u9806\u5E8F\u66F4\u65B0\u5B8C\u6210"),this.getProductImageLists(),l(!0)},m=>{c(!1)})})}}gotoMediaPlayer(i){var o=i.ProductId,r=i.FileUuid;this.router.navigate(["/users/mediaplayer",{ProductId:o}])}modifyFreePromote(i,o){var r=o=="1"?"\u8B8A\u66F4\u4F5C\u70BA\u514D\u8CBB\u63A8\u5EE3\u9805\u76EE\uFF1F":"\u53D6\u6D88\u6B64\u9805\u514D\u8CBB\u63A8\u5EE3\uFF1F",a=confirm("\u78BA\u5B9A\u8981"+r);if(a!=!1){var s=this.global.serverip+"/api/Product/ModifyFreePromote",l={ProductId:this.ProductId,ImageFileName:i,FreePromote:o};return new Promise((c,m)=>{this.auth.httpDo(s,l).then(p=>{this.toastr.info("\u66F4\u65B0\u5B8C\u6210"),this.getProductImageLists(),c(!0)},p=>{m(!1)})})}}styleFreePromote(i){var o=i=="1"?"background-color:orange;color:white":"background-color:default;color:default";return o}AddToPromoteList(){var i=this.global.serverip+"/api/Product/AddToPromoteList",o={ProductId:this.ProductId,StartDate:this.PromoteStartDate,EndDate:this.PromoteEndDate};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.info("\u66F4\u65B0\u5B8C\u6210"),this.PromoteListId=s,this.getProductImageLists(),r(!0)},s=>{a(!1)})})}RemoveFromPromoteList(){var i=this.global.serverip+"/api/Product/DeleteFromPromoteList",o={ProductId:this.ProductId};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.info("\u66F4\u65B0\u5B8C\u6210"),this.p.PromoteStartDate=null,this.p.PromoteEndDate=null,this.PromoteStartDate="",this.PromoteEndDate="",this.PromoteListId=null,r(!0)},s=>{a(!1)})})}onKeyPress(i){var o=i.key;o=="Enter"&&this.qryProducts()}qryProductsToAdd(){var i=this.global.serverip+"/api/Product/qrySameProductNameToAddToAlbum",o={ProductId:this.ProductId,ProdName:this.ProdName};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.ProductsToAdd=s,r(!0)},s=>{a(!1)})})}qryAlbum(){var i=this.global.serverip+"/api/Product/qryAlbum",o={MainProductId:this.ProductId};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.AlbumList=s,r(!0)},s=>{a(!1)})})}AddToAlbum(){var i=this.global.serverip+"/api/Product/AddToAlbum",o={MainProductId:this.ProductId,ProductId:this.ProdToAdd};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.AlbumList=s,r(!0)},s=>{a(!1)})})}ModifyShowIndexInAlbum(i){if(this.editProduct){var o=prompt("\u8ACB\u8F38\u5165\u65B0\u7684\u9806\u5E8F",i.toString()),r=this.global.serverip+"/api/Product/ModifyShowIndexInAlbum",a={MainProductId:this.ProductId,ProductId:this.ProdToAdd,ShowIndex:o};return new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.AlbumList=c,s(!0)},c=>{l(!1)})})}}DeleteFromAlbum(i){if(this.editProduct&&confirm("\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u5408\u8F2F\u8CC7\u6599\uFF1F")){var o=this.global.serverip+"/api/Product/DeleteFromAlbum",r={MainProductId:this.ProductId,ProductId:i};return new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.AlbumList=l,a(!0)},l=>{s(!1)})})}}chkPromote(){if(this.p.PromoteStartDate!=null||this.p.PromoteEndDate!=null){this.toastr.warning("\u6B64\u6B04\u4F4D\u4E0D\u53EF\u4FEE\u6539\uFF0C\u8ACB\u5148\u4E0B\u67B6\u5F8C\uFF0C\u91CD\u65B0\u8A2D\u5B9A\u4E0A\u67B6\u8CC7\u8A0A");return}}};e.\u0275fac=function(o){return new(o||e)(z(jc),z(mr),z(Ot),z(kt),z(Tt),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-productprofile"]],viewQuery:function(o,r){if(o&1&&vi(hf,5),o&2){let a;Ii(a=Pi())&&(r.fileInput=a.first)}},decls:2,vars:2,consts:[["fileInput",""],["class","tableContainer tableTotalList",3,"ngClass",4,"ngIf"],["class","tableContainer tableEdit",3,"ngClass",4,"ngIf"],[1,"tableContainer","tableTotalList",3,"ngClass"],["colspan","6","align","left"],["align","center"],["class","button wFree",3,"click",4,"ngIf"],[1,"qryData"],[3,"ngModelChange","ngModel"],["value","ProductId"],["value","ProductName"],["value","ProductSpec"],["type","text",3,"ngModelChange","keypress","ngModel"],[1,"button","wFree",3,"click"],["class","Data",3,"click","focus","keyup.arrowdown","keyup.arrowup",4,"ngFor","ngForOf"],[1,"Data",3,"click","focus","keyup.arrowdown","keyup.arrowup"],[1,"tableContainer","tableEdit",3,"ngClass"],[1,"ProductDetail"],["colspan","3",4,"ngIf"],["type","text",3,"ngModelChange","ngModel","disabled"],[3,"ngModelChange","ngModel","disabled"],[3,"value"],["type","date",3,"ngModelChange","click","ngModel","disabled"],[3,"disabled","click",4,"ngIf"],[1,"form-group"],["for","file"],["value",""],["value","images"],["value","audios"],["value","videos"],["type","file","style","background-color:lightblue;display:none",3,"change",4,"ngIf"],["class","button wFree",3,"mousedown",4,"ngIf"],[2,"width","50%","float","left"],[1,"slideshow-container"],["class","mySlides fade",4,"ngFor","ngForOf"],[1,"prev",3,"click"],[1,"next",3,"click"],[2,"text-align","center"],["class","dot",3,"click",4,"ngFor","ngForOf"],[2,"width","50%","float","left","text-align","center"],[3,"value",4,"ngFor","ngForOf"],[3,"click","disabled"],["style","margin-bottom:10px;padding:5px;;background-color:yellowgreen;",4,"ngFor","ngForOf"],["colspan","3"],["type","file",2,"background-color","lightblue","display","none",3,"change"],[1,"button","wFree",3,"mousedown"],[1,"mySlides","fade"],[1,"numbertext"],[2,"margin-right","20px",3,"click"],[2,"width","100%",3,"src"],[1,"text"],[1,"dot",3,"click"],[2,"margin-bottom","10px","padding","5px",";background-color","yellowgreen"],["href","javascript:void();",3,"click"],["class","button wFree",3,"style","click",4,"ngIf"]],template:function(o,r){o&1&&E(0,Cf,40,7,"div",1)(1,Wf,125,49,"div",2),o&2&&(S("ngIf",!(r.editProduct&&r.showProductDetail)),f(),S("ngIf",r.showProductDetail))},dependencies:[le,Dt,Nt,Wt,Ht,jt,Rt,Vt,Lt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{font-size:18px}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:80px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:500px;height:150px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}']});let n=e;return n})(),Cs=class{constructor(){this.file=null,this.filename="",this.showIndex=""}};function Hf(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x();return y(o.NewProduct())}),h(1,"\u65B0\u589E\u8AB2\u7A0B"),u()}}function Gf(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x();return y(o.EditProduct())}),h(1,"\u4FEE\u6539\u8CC7\u6599"),u()}}function Yf(n,e){if(n&1&&(d(0,"option",18),h(1),u()),n&2){let t=e.$implicit;$t("value",t.DepartmentId),f(),T(t.DepartmentName)}}function Uf(n,e){if(n&1){let t=O();d(0,"select",5),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),E(1,Yf,2,2,"option",17),u()}if(n&2){let t=x();B("ngModel",t.qryString),f(),S("ngForOf",t.Departments)}}function qf(n,e){if(n&1){let t=O();d(0,"span")(1,"input",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),P("keydown.enter",function(){b(t);let o=x();return y(o.qryCourse())}),u()()}if(n&2){let t=x();f(),B("ngModel",t.qryString)}}function zf(n,e){if(n&1&&(d(0,"option",21),h(1),u()),n&2){let t=e.$implicit;f(),T(t.CName)}}function jf(n,e){if(n&1){let t=O();d(0,"span")(1,"select",5),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),E(2,zf,2,1,"option",20),u()()}if(n&2){let t=x();f(),B("ngModel",t.qryString),f(),S("ngForOf",t.Teachers)}}function Kf(n,e){if(n&1){let t=O();d(0,"span")(1,"input",22),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),u()()}if(n&2){let t=x();f(),B("ngModel",t.qryString)}}function Xf(n,e){if(n&1&&(d(0,"span"),h(1),u()),n&2){let t=e.$implicit;f(),T(t.UserCName)}}function Qf(n,e){if(n&1){let t=O();d(0,"tr",23),P("click",function(){let o=b(t).$implicit,r=x();return y(r.setProduct(o))})("focus",function(){let o=b(t).$implicit,r=x();return y(r.setProduct(o))})("keyup.arrowdown",function(o){b(t);let r=x();return y(r.onKeydown(o))})("keyup.arrowup",function(o){b(t);let r=x();return y(r.onKeydown(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),E(12,Xf,2,1,"span",24),u(),d(13,"td",25),h(14),u(),d(15,"td"),h(16),u(),d(17,"td"),h(18),u()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.DepartmentName),f(2),T(t.ProductId),f(2),T(t.ProdName),f(2),T(t.Teachers.length),f(2),S("ngForOf",t.Teachers),f(),S("ngClass",t.QtyOfLessons!=t.LessonDates.length?"Warning":"Normal"),f(),At("",t.QtyOfLessons," / ",t.LessonDates.length,""),f(2),T(t.PricePerLesson),f(2),T(t.PricePerSemester)}}function $f(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x(3);return y(o.NewProduct())}),h(1,"\u65B0\u589E\u8AB2\u7A0B"),u()}}function Zf(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x(3);return y(o.NewProduct())}),h(1,"\u4FEE\u6539\u8CC7\u6599"),u()}}function Jf(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x(3);return y(o.SaveProduct())}),h(1,"\u8CC7\u6599\u5B58\u6A94"),u()}}function tg(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x(3);return y(o.DeleteProduct())}),h(1,"\u522A\u9664\u8CC7\u6599"),u()}}function eg(n,e){if(n&1){let t=O();d(0,"span",16),P("click",function(){b(t);let o=x(3);return y(o.CancelEdit())}),h(1,"\u7D50\u675F\u4FEE\u6539"),u()}}function ng(n,e){if(n&1&&(d(0,"td",38),E(1,$f,2,0,"span",3)(2,Zf,2,0,"span",3)(3,Jf,2,0,"span",3)(4,tg,2,0,"span",3)(5,eg,2,0,"span",3),u()),n&2){let t=x(2);f(),S("ngIf",!t.newProduct),f(),S("ngIf",!t.editProduct),f(),S("ngIf",t.editProduct),f(),S("ngIf",t.editProduct),f(),S("ngIf",t.editProduct)}}function ig(n,e){if(n&1&&(d(0,"option",39),h(1),u()),n&2){let t=e.$implicit,i=x(2);$t("value",t.DepartmentId),S("selected",t.DepartmentId==i.Department),f(),T(t.DepartmentName)}}function og(n,e){if(n&1){let t=O();d(0,"div")(1,"span"),h(2),u(),d(3,"button",13),P("click",function(){let o=b(t).$implicit,r=x(4);return y(r.AddTeacherToCourse(o))}),h(4,"\u9078\u53D6"),u()()}if(n&2){let t=e.$implicit;f(2),At("",t.UserCName," ",t.UserTel,"")}}function rg(n,e){if(n&1&&(d(0,"div"),E(1,og,5,2,"div",24),u()),n&2){let t=x(3);f(),S("ngForOf",t.qryTeacherByCNameResult)}}function ag(n,e){if(n&1){let t=O();d(0,"span",43),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.DeleteTheTeacher(o))}),h(1),u()}if(n&2){let t=e.$implicit;f(),At("",t.UserCName,":",t.ProfitRatio,"")}}function sg(n,e){if(n&1){let t=O();d(0,"div")(1,"span"),h(2,"\u8B1B\u5E2B\u4EBA\u6578\uFF1A"),u(),d(3,"input",40),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.p.Teachers.length,o)||(r.p.Teachers.length=o),y(o)}),u(),F(4,"br"),d(5,"span"),h(6,"\u8B1B\u5E2B\u59D3\u540D\uFF1A"),u(),d(7,"input",34),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.qryTeacherName,o)||(r.qryTeacherName=o),y(o)}),u(),d(8,"button",41),P("click",function(){b(t);let o=x(2);return y(o.qryTeacherByCName())}),h(9,"\u641C\u5C0B"),u(),F(10,"br"),E(11,rg,2,1,"div",12)(12,ag,2,2,"span",42),F(13,"br")(14,"br"),u()}if(n&2){let t=x(2);f(3),B("ngModel",t.p.Teachers.length),f(4),B("ngModel",t.qryTeacherName),S("disabled",!t.editProduct),f(),S("disabled",!t.editProduct),f(3),S("ngIf",t.qryTeacherByCNameResult!=null&&t.showQryTeachersByCName==!0),f(),S("ngForOf",t.TeacherInThisCourse)}}function lg(n,e){if(n&1){let t=O();d(0,"span",46),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.deleteLessonDate(o.LessonDate))}),h(1),u()}if(n&2){let t=e.$implicit;f(),T(t.LessonDate)}}function cg(n,e){if(n&1){let t=O();d(0,"div")(1,"span"),h(2,"\u5DF2\u8A2D\u5B9A\u8AB2\u5802\u6578\uFF1A"),u(),d(3,"input",32),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.LessonDates.length,o)||(r.LessonDates.length=o),y(o)}),u(),F(4,"br"),d(5,"span"),h(6,"\u8AB2\u5802\u65E5\u671F\uFF1A"),u(),d(7,"input",44),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.setLessonDate,o)||(r.setLessonDate=o),y(o)}),u(),d(8,"button",41),P("click",function(){b(t);let o=x(2);return y(o.addLessonDate())}),h(9,"\u8A2D\u5B9A"),u(),F(10,"br"),E(11,lg,2,1,"span",45),F(12,"br")(13,"br"),u()}if(n&2){let t=x(2);f(3),B("ngModel",t.LessonDates.length),S("ngClass",t.LessonDates.length!=t.QtyOfLessons?"Warning":"Normal"),f(4),B("ngModel",t.setLessonDate),S("disabled",!t.editProduct),f(),S("disabled",!t.editProduct),f(3),S("ngForOf",t.LessonDates)}}function dg(n,e){if(n&1){let t=O();d(0,"div",26)(1,"table",27)(2,"tr",28),E(3,ng,6,5,"td",29),u(),d(4,"tr")(5,"td")(6,"span"),h(7,"\u958B\u8AB2\u90E8\u9580\uFF1A"),u(),d(8,"select",30),V("ngModelChange",function(o){b(t);let r=x();return N(r.Department,o)||(r.Department=o),y(o)}),E(9,ig,2,3,"option",31),u(),d(10,"input",32),V("ngModelChange",function(o){b(t);let r=x();return N(r.DepartmentName,o)||(r.DepartmentName=o),y(o)}),u(),F(11,"br"),d(12,"span"),h(13,"\u8AB2\u7A0B\u7DE8\u865F\uFF1A"),u(),d(14,"input",33),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductId,o)||(r.ProductId=o),y(o)}),u(),F(15,"br"),d(16,"span"),h(17,"\u8AB2\u7A0B\u540D\u7A31\uFF1A"),u(),d(18,"input",34),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProdName,o)||(r.ProdName=o),y(o)}),u(),F(19,"br"),d(20,"span"),h(21,"\u5168\u671F\u7E3D\u5802\u6578\uFF1A"),u(),d(22,"input",35),V("ngModelChange",function(o){b(t);let r=x();return N(r.QtyOfLessons,o)||(r.QtyOfLessons=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.countPricePerSemester())}),u(),F(23,"br"),d(24,"span"),h(25,"\u55AE\u5802\u8AB2\u552E\u50F9\uFF1A"),u(),d(26,"input",35),V("ngModelChange",function(o){b(t);let r=x();return N(r.PricePerLesson,o)||(r.PricePerLesson=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.countPricePerSemester())}),u(),h(27,"\u5143 \uFF0A\u6B64\u50F9\u9322\u542B\u7A05\uFF0C "),d(28,"span"),h(29,"\u6BCF\u5802\u8AB2\u5305\u542B\u6750\u6599\u8CBB\uFF1A"),u(),d(30,"input",36),V("ngModelChange",function(o){b(t);let r=x();return N(r.MaterialCostPerLesson,o)||(r.MaterialCostPerLesson=o),y(o)}),u(),h(31,"\u5143 "),F(32,"br"),d(33,"span"),h(34,"\u5168\u671F\u8AB2\u552E\u50F9\uFF1A"),u(),d(35,"input",37),V("ngModelChange",function(o){b(t);let r=x();return N(r.PricePerSemester,o)||(r.PricePerSemester=o),y(o)}),u(),h(36,"\u5143 \uFF0A\u6B64\u50F9\u9322\u542B\u7A05"),F(37,"br"),d(38,"span"),h(39,"\u6BCF\u6708\u56FA\u5B9A\u8CBB\u7528\uFF1A"),u(),h(40,"\u8CBB\u7528\u540D\u7A31\uFF1A"),d(41,"input",34),V("ngModelChange",function(o){b(t);let r=x();return N(r.FixedCostName,o)||(r.FixedCostName=o),y(o)}),u(),d(42,"span"),h(43,"\u8CBB\u7528\u91D1\u984D\uFF1A"),u(),d(44,"input",36),V("ngModelChange",function(o){b(t);let r=x();return N(r.FixedCostAmount,o)||(r.FixedCostAmount=o),y(o)}),u(),h(45,"\u5143 "),F(46,"br"),d(47,"span"),h(48,"\u8B1B\u5E2B\u7684\u5206\u6F64\u6BD4\u4F8B\uFF1A"),u(),d(49,"input",36),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProfitRatio,o)||(r.ProfitRatio=o),y(o)}),u(),h(50,"\uFF05"),F(51,"br"),E(52,sg,15,6,"div",12)(53,cg,14,6,"div",12),u()()()()}if(n&2){let t=x();S("ngClass",t.p!=null&&t.editProduct==!0?"tableContainerFull":"tableContainerBottom"),f(3),S("ngIf",t.editProduct&&t.showProductDetail),f(5),B("ngModel",t.Department),S("ngClass",t.ProductId==""?"visibleTrue":"visibleFalse"),f(),S("ngForOf",t.Departments),f(),B("ngModel",t.DepartmentName),S("ngClass",t.ProductId!=""?"visibleTrue":"visibleFalse"),f(4),B("ngModel",t.ProductId),f(4),B("ngModel",t.ProdName),S("disabled",!t.editProduct),f(4),B("ngModel",t.QtyOfLessons),S("disabled",!t.editProduct),f(4),B("ngModel",t.PricePerLesson),S("disabled",!t.editProduct),f(4),B("ngModel",t.MaterialCostPerLesson),S("disabled",!t.editProduct),f(5),B("ngModel",t.PricePerSemester),S("disabled",!t.editProduct),f(6),B("ngModel",t.FixedCostName),S("disabled",!t.editProduct),f(3),B("ngModel",t.FixedCostAmount),S("disabled",!t.editProduct),f(5),B("ngModel",t.ProfitRatio),S("disabled",!t.editProduct),f(3),S("ngIf",t.ProductId!=""),f(),S("ngIf",t.ProductId!="")}}var td=(()=>{let e=class e{constructor(i,o,r,a){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.showProductDetail=!1,this.newProduct=!1,this.editProduct=!1,this.qryTeachersByCName="",this.Department="",this.DepartmentName="",this.ProductId="",this.ProdName="",this.Teacher="",this.QtyOfLessons=1,this.PricePerLesson=500,this.MaterialCostPerLesson=0,this.PricePerSemester=this.QtyOfLessons*this.PricePerLesson,this.FixedCostName="",this.FixedCostAmount=0,this.ProfitRatio=50,this.qryType="ProductId",this.qryString="",this.showQryTeachersByCName=!1,this.QtyOfTeacher=0,this.setLessonDate="",this.LessonDates=[],this.QtyOfLessonDate=0,this.TeacherInThisCourse=[],this.qryDepartment="",this.qryProductId="",this.qryProdName="",this.qryTeacherName="",this.qryDateOfLesson=""}ngOnInit(){this.qryDepartments(),this.qryTeachers(),this.initial()}initial(){this.showProductDetail=!1,this.newProduct=!1,this.editProduct=!1,this.p=null,this.Department="",this.ProductId="",this.ProdName="",this.QtyOfLessons=1,this.PricePerLesson=500,this.MaterialCostPerLesson=0,this.PricePerSemester=this.QtyOfLessons*this.PricePerLesson,this.FixedCostName="",this.FixedCostAmount=0,this.ProfitRatio=50,this.LessonDates=[],this.setLessonDate=""}qryDepartments(){var i=this.global.serverip+"/api/Product/qryDepartments",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Departments=s,r(!0)},s=>{a(!1)})})}qryTeachers(){var i=this.global.serverip+"/api/Product/qryTeachers",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Teachers=s,r(!0)},s=>{a(!1)})})}qryTeacherByCName(){var i=this.global.serverip+"/api/Users/qryUserByCName",o={qryCName:this.qryTeacherName};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.showQryTeachersByCName=!0,this.qryTeacherByCNameResult=s,r(!0)},s=>{a(!1)})})}qryCourse(){if(this.qryString!=""){switch(this.qryDepartment="",this.qryProductId="",this.qryProdName="",this.qryTeacherName="",this.qryDateOfLesson="",this.qryType){case"Department":this.qryDepartment=this.qryString;break;case"ProductId":this.qryProductId=this.qryString;break;case"ProductName":this.qryProdName=this.qryString;break;case"TeacherName":this.qryTeacherName=this.qryString;break;case"DateOfLesson":this.qryDateOfLesson=this.qryString;break}var i=this.global.serverip+"/api/Product/qryCourse",o={Department:this.qryDepartment,ProductId:this.qryProductId,ProdName:this.qryProdName,TeacherName:this.qryTeacherName,DateOfLesson:this.qryDateOfLesson};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D"),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u8AB2\u7A0B\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),this.Products=s,r(!0)},s=>{a(!1)})})}}setProduct(i){this.p=i,this.showProductDetail=!0,this.ProductId=i.ProductId,this.ProdName=i.ProdName,this.Department=i.DepartmentId,this.DepartmentName=i.DepartmentName,this.QtyOfLessons=i.QtyOfLessons,this.PricePerLesson=i.PricePerLesson,this.MaterialCostPerLesson=i.MaterialCostPerLesson,this.PricePerSemester=i.PricePerSemester,this.TeacherInThisCourse=i.Teachers,this.LessonDates=i.LessonDates,this.FixedCostName=i.FixedCostName,this.FixedCostAmount=i.FixedCostAmount,this.ProfitRatio=i.ProfitRatio}onKeydown(i){}countPricePerSemester(){this.PricePerSemester=this.QtyOfLessons*this.PricePerLesson}NewProduct(){if(this.editProduct==!0&&this.p.ProductId!=""){this.toastr.warning("\u8ACB\u5148\u7D50\u675F\u8AB2\u7A0B\u4FEE\u6539\u624D\u80FD\u9032\u884C\u65B0\u589E\u8AB2\u7A0B\u8CC7\u6599\uFF01");return}this.initial(),this.newProduct=!0,this.editProduct=!0,this.showProductDetail=!0,this.p=new Object,this.p.Department="",this.p.ProductId="",this.p.ProdName="",this.p.Teachers=new Object,this.p.QtyOfLessons=1,this.p.PricePerLesson=1,this.p.MaterialCostPerLesson=0,this.p.PricePerSemester=this.p.QtyOfLessons*this.p.PricePerLesson,this.p.FixedCostName="",this.p.FixedCostAmount=0,this.p.ProfitRatio=50}EditProduct(){this.editProduct=!0}CancelEdit(){var i=confirm("\u78BA\u5B9A\u8981\u7D50\u675F\u4FEE\u6539\u55CE\uFF1F");i&&this.initial()}SaveProduct(){this.editProduct=!1,this.ProductId==null||this.ProductId=="";var i=this.global.serverip+"/api/Product/UpdateCourseMS",o={Department:this.Department,ProductId:this.ProductId,ProdName:this.ProdName,QtyOfLessons:this.QtyOfLessons,PricePerLesson:this.PricePerLesson,MaterialCostPerLesson:this.MaterialCostPerLesson,PricePerSemester:this.PricePerSemester,FixedCostName:this.FixedCostName,FixedCostAmount:this.FixedCostAmount,ProfitRatio:this.ProfitRatio};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{var l=s;this.ProductId=l.ProductId,this.qryCourse(),r(!0)},s=>{a(!1)})})}DeleteProduct(){if(!(this.ProductId==null||this.ProductId=="")){var i=confirm("\u78BA\u5B9A\u8981\u522A\u9664\u8CC7\u6599\u55CE\uFF1F");if(i){var o=this.global.serverip+"/api/Product/DeleteCourse",r={ProductId:this.ProductId};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),this.toastr.info("\u5546\u54C1\u8CC7\u6599\u66F4\u65B0\u6210\u529F"),this.editProduct=!1,this.newProduct=!1,this.initial(),this.qryCourse(),a(!0)},l=>{s(!1)})})}}}AddTeacherToCourse(i){if(this.editProduct!=!0)return;var o=prompt("\u8ACB\u8F38\u5165\u6388\u8AB2\u8001\u5E2B\u65BC\u6B64\u8AB2\u7A0B\u4E2D\u8DDF\u914D\u5408\u7684\u53E6\u5916\u8001\u5E2B\u7684\u5206\u6F64\u6BD4\u4F8B\uFF0C\u5168\u90E8\u8ACB\u8F38\u5165100","100");if(o==""||o==null||isNaN(Number(o)))return;this.showQryTeachersByCName=!1;let r=new gs;r.UserCName=i.UserCName,r.UserProfileId=i.UserProfileId,r.UserTel=i.UserTel,r.ProfitRatio=o;var a=this.TeacherInThisCourse.find(c=>c.UserCName==r.UserCName);if(a==null){var s=this.global.serverip+"/api/Product/AddCourseManagementTeacherOfCourse",l={ProductId:this.ProductId,TeacherUserProfileId:r.UserProfileId,ProfitRatio:r.ProfitRatio};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((c,m)=>{this.auth.httpDo(s,l).then(p=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.TeacherInThisCourse.push(r),this.QtyOfTeacher=this.TeacherInThisCourse.length,c(!0)},p=>{m(!1)})})}}DeleteTheTeacher(i){if(this.editProduct!=!0||!confirm("\u8981\u522A\u9664\u8001\u5E2B\u55CE\uFF1F"))return;let o=new gs;o.UserCName=i.UserCName,o.UserProfileId=i.UserProfileId,o.UserTel=i.UserTel;var r=this.TeacherInThisCourse.findIndex(l=>l.UserCName==o.UserCName);if(r!=null){var a=this.global.serverip+"/api/Product/deleteCourseManagementTeacherOfCourse",s={ProductId:this.ProductId,TeacherUserProfileId:o.UserProfileId};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((l,c)=>{this.auth.httpDo(a,s).then(m=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.TeacherInThisCourse.splice(r,1),this.QtyOfTeacher=this.TeacherInThisCourse.length,l(!0)},m=>{c(!1)})})}}addLessonDate(){if(this.editProduct==!0&&this.setLessonDate!=""){var i=this.LessonDates.find(a=>a.LessonDate==this.setLessonDate);if(i==null){var o=this.global.serverip+"/api/Product/addLessonDate",r={ProductId:this.ProductId,LessonDate:this.setLessonDate};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F");var c=new Gc;c.LessonDate=this.setLessonDate,c.ProductId=this.ProductId,this.LessonDates.push(c),this.LessonDates=this.LessonDates.sort(function(m,p){var g=new Date(m.LessonDate),_=new Date(p.LessonDate);return g<_?-1:g>_?1:0}),this.QtyOfLessonDate=this.LessonDates.length,a(!0)},l=>{s(!1)})})}}}deleteLessonDate(i){if(this.editProduct==!0&&confirm("\u8981\u522A\u9664\u8AB2\u7A0B\u6642\u9593\u55CE\uFF1F")){var o=this.LessonDates.findIndex(s=>s.LessonDate==i);if(o>=0){var r=this.global.serverip+"/api/Product/deleteLessonDate",a={ProductId:this.ProductId,LessonDate:i};return this.toastr.info("\u8CC7\u6599\u66F4\u65B0\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.LessonDates.splice(o,1),this.LessonDates=this.LessonDates.sort(function(m,p){var g=new Date(m.LessonDate),_=new Date(p.LessonDate);return g<_?-1:g>_?1:0}),this.QtyOfLessonDate=this.LessonDates.length,s(!0)},c=>{l(!1)})})}}}gotoProductPage(){}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt))},e.\u0275cmp=_t({type:e,selectors:[["app-course-management"]],decls:52,vars:9,consts:[[1,"tableContainer","tableTotalList"],["colspan","9","align","left"],["align","center"],["class","button wFree",3,"click",4,"ngIf"],[1,"qryData"],[3,"ngModelChange","ngModel"],["value","Department"],["value","ProductId"],["value","ProductName"],["value","TeacherName"],["value","DateOfLesson"],[3,"ngModel","ngModelChange",4,"ngIf"],[4,"ngIf"],[3,"click"],["class","Data",3,"click","focus","keyup.arrowdown","keyup.arrowup",4,"ngFor","ngForOf"],["class","tableContainer tableEdit",3,"ngClass",4,"ngIf"],[1,"button","wFree",3,"click"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["type","text",3,"ngModelChange","keydown.enter","ngModel"],["value","tTeacher.UserProfileId",4,"ngFor","ngForOf"],["value","tTeacher.UserProfileId"],["type","date",3,"ngModelChange","ngModel"],[1,"Data",3,"click","focus","keyup.arrowdown","keyup.arrowup"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"tableContainer","tableEdit",3,"ngClass"],[1,"ProductDetail"],[1,"commandbuttonrow"],["colspan","3",4,"ngIf"],[3,"ngModelChange","ngModel","ngClass"],[3,"value","selected",4,"ngFor","ngForOf"],["type","text","disabled","",3,"ngModelChange","ngModel","ngClass"],["type","text","disabled","",3,"ngModelChange","ngModel"],["type","text",3,"ngModelChange","ngModel","disabled"],["type","text",2,"width","60px",3,"ngModelChange","change","ngModel","disabled"],["type","text",2,"width","60px",3,"ngModelChange","ngModel","disabled"],["type","text","disabled","",2,"width","60px",3,"ngModelChange","ngModel","disabled"],["colspan","3"],[3,"value","selected"],["type","text","disabled","",2,"width","60px",3,"ngModelChange","ngModel"],[3,"click","disabled"],["class","Teacher",3,"click",4,"ngFor","ngForOf"],[1,"Teacher",3,"click"],["type","date",3,"ngModelChange","ngModel","disabled"],["class","LessonDate",3,"click",4,"ngFor","ngForOf"],[1,"LessonDate",3,"click"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"table")(2,"thead")(3,"tr")(4,"th",1)(5,"h3",2),h(6,"\u8AB2\u7A0B\u8CC7\u6599\u7BA1\u7406"),u(),E(7,Hf,2,0,"span",3)(8,Gf,2,0,"span",3),u()(),d(9,"tr")(10,"th",1)(11,"div",4)(12,"span")(13,"select",5),V("ngModelChange",function(s){return N(r.qryType,s)||(r.qryType=s),s}),d(14,"option",6),h(15,"\u958B\u8AB2\u90E8\u9580"),u(),d(16,"option",7),h(17,"\u8AB2\u7A0B\u7DE8\u865F"),u(),d(18,"option",8),h(19,"\u8AB2\u7A0B\u540D\u7A31"),u(),d(20,"option",9),h(21,"\u8B1B\u5E2B"),u(),d(22,"option",10),h(23,"\u4E0A\u8AB2\u65E5\u671F"),u()()(),E(24,Uf,2,2,"select",11)(25,qf,2,1,"span",12)(26,jf,3,2,"span",12)(27,Kf,2,1,"span",12),d(28,"button",13),P("click",function(){return r.qryCourse()}),h(29,"\u67E5\u8A62"),u()()()(),d(30,"tr")(31,"th"),h(32,"\u9805\u6B21"),u(),d(33,"th"),h(34,"\u958B\u8AB2\u90E8\u9580"),u(),d(35,"th"),h(36,"\u8AB2\u7A0B\u7DE8\u865F"),u(),d(37,"th"),h(38,"\u8AB2\u7A0B\u540D\u7A31"),u(),d(39,"th"),h(40,"\u8B1B\u5E2B\u4EBA\u6578"),u(),d(41,"th"),h(42,"\u8B1B\u5E2B\u59D3\u540D"),u(),d(43,"th"),h(44,"\u5168\u671F\u7E3D\u5802\u6578"),u(),d(45,"th"),h(46,"\u55AE\u5802\u8AB2\u552E\u50F9"),u(),d(47,"th"),h(48,"\u5168\u671F\u8AB2\u552E\u50F9"),u()()(),d(49,"tbody"),E(50,Qf,19,11,"tr",14),u()()(),E(51,dg,54,26,"div",15)),o&2&&(f(7),S("ngIf",!r.newProduct),f(),S("ngIf",!r.editProduct),f(5),B("ngModel",r.qryType),f(11),S("ngIf",r.qryType=="Department"),f(),S("ngIf",r.qryType=="ProductId"||r.qryType=="ProductName"),f(),S("ngIf",r.qryType=="TeacherName"),f(),S("ngIf",r.qryType=="DateOfLesson"),f(23),S("ngForOf",r.Products),f(),S("ngIf",r.showProductDetail))},dependencies:[le,Dt,Nt,Wt,Ht,jt,Rt,Vt,Lt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-size:18px}button[_ngcontent-%COMP%]{font-size:15px;background-color:#e7e7e7}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:730px;height:280px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.Teacher[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#ff0;font-size:20px;height:25px}.Teacher[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#f29c2b;font-size:24px;height:25px}.LessonDate[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#aff256;font-size:20px;height:25px}.LessonDate[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#78bb21;font-size:24px;height:25px}.Warning[_ngcontent-%COMP%]{background-color:red;color:#fff}.Normal[_ngcontent-%COMP%]{background-color:inherit;color:inherit}.visibleTrue[_ngcontent-%COMP%]{display:inline}.visibleFalse[_ngcontent-%COMP%]{display:none}.commandbuttonrow[_ngcontent-%COMP%]{background-color:#fdc969;text-align:right}.commandbuttonrow[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:5px}.w50[_ngcontent-%COMP%]{width:50px}.w100[_ngcontent-%COMP%]{width:100px}.w150[_ngcontent-%COMP%]{width:150px}.w200[_ngcontent-%COMP%]{width:200px}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}']});let n=e;return n})();var ug=["qProduct"];function mg(n,e){n&1&&(d(0,"span",13),h(1,"\u624B\u52D5\u958B\u767C\u7968"),u())}function hg(n,e){n&1&&(d(0,"span",14),h(1,"\u81EA\u52D5\u958B\u767C\u7968"),u())}function pg(n,e){n&1&&(d(0,"span",13),h(1,"\u6E2C\u8A66\u958B\u767C\u7968"),u())}function fg(n,e){n&1&&(d(0,"span",14),h(1,"\u6B63\u5F0F\u958B\u767C\u7968"),u())}function gg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(2);return y(o.goQryCustomer())}),h(1,"\u67E5\u8A62"),u()}}function _g(n,e){if(n&1){let t=O();d(0,"span")(1,"select",7),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryCustomerType,o)||(r.qryCustomerType=o),y(o)}),d(2,"option",15),h(3,"\u59D3\u540D"),u(),d(4,"option",16),h(5,"\u624B\u6A5F\u865F\u78BC"),u()(),d(6,"input",17),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryCustomer,o)||(r.qryCustomer=o),y(o)}),P("keydown.enter",function(){b(t);let o=x();return y(o.goQryCustomer())}),u(),E(7,gg,2,0,"button",11),u()}if(n&2){let t=x();f(),B("ngModel",t.qryCustomerType),f(3),S("selected",t.qryCustomerType==="Tel"),f(2),B("ngModel",t.qryCustomer),S("ngClass",t.customers.length==0?"Warning":"Normal"),f(),S("ngIf",t.customers.length<1)}}function Cg(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.id),f(),At("",t.CName," ",t.Tel,"")}}function xg(n,e){if(n&1){let t=O();d(0,"span")(1,"select",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.TheCustomer,o)||(r.TheCustomer=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.qryShoppingCart())}),d(2,"option",20),h(3,"\u8ACB\u9078\u53D6\u5BA2\u4EBA"),u(),E(4,Cg,2,3,"option",21),u(),d(5,"button",22),P("click",function(){b(t);let o=x();return y(o.initial())}),h(6,"\u91CD\u9078"),u()()}if(n&2){let t=x();f(),B("ngModel",t.TheCustomer),S("disabled",t.TheCustomer!=null),f(3),S("ngForOf",t.customers)}}function Sg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x();return y(o.goQryProduct())}),h(1,"\u67E5\u8A62"),u()}}function bg(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.ProductId),f(),At("",t.ProductId," ",t.ProductName,"")}}function yg(n,e){if(n&1){let t=O();d(0,"button",22),P("click",function(){b(t);let o=x(2);return y(o.ProductReset())}),h(1,"\u91CD\u9078"),u()}}function vg(n,e){if(n&1){let t=O();d(0,"span")(1,"select",19),V("ngModelChange",function(o){b(t);let r=x();return N(r.TheProduct,o)||(r.TheProduct=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.setProduct())}),d(2,"option",20),h(3,"\u8ACB\u9078\u53D6\u5546\u54C1"),u(),E(4,bg,2,3,"option",21),u(),E(5,yg,2,0,"button",24),u()}if(n&2){let t=x();f(),B("ngModel",t.TheProduct),S("disabled",t.TheProduct!=""),f(3),S("ngForOf",t.Products),f(),S("ngIf",t.ProductResetButtonValue!="\u53D6\u6D88\u4FEE\u6539")}}function Ig(n,e){if(n&1){let t=O();d(0,"span")(1,"span"),h(2,"\u5546\u54C1\u552E\u50F9\uFF1A"),u(),d(3,"input",26),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.StdPrice,o)||(r.StdPrice=o),y(o)}),u(),F(4,"br"),d(5,"span"),h(6,"\u8CFC\u8CB7\u6578\u91CF\uFF1A"),u(),d(7,"input",26),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.QtyOfProduct,o)||(r.QtyOfProduct=o),y(o)}),u(),F(8,"br"),u()}if(n&2){let t=x(2);f(3),B("ngModel",t.StdPrice),f(4),B("ngModel",t.QtyOfProduct)}}function Pg(n,e){if(n&1){let t=O();d(0,"span")(1,"span"),h(2,"\u6574\u671F\u552E\u50F9\uFF1A"),u(),d(3,"input",27),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PricePerSemester,o)||(r.PricePerSemester=o),y(o)}),P("change",function(){b(t);let o=x(2);return y(o.PricePerSemesterChange())}),u(),F(4,"br"),d(5,"span"),h(6,"\u7E3D\u5802\u6578\uFF1A"),u(),d(7,"input",28),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.QtyOfLessons,o)||(r.QtyOfLessons=o),y(o)}),u(),d(8,"a",29),P("click",function(){b(t);let o=x(2);return y(o.showModifyPurchaseClassDiv())}),h(9,"\u6539"),u(),F(10,"br"),d(11,"span"),h(12,"\u55AE\u5802\u552E\u50F9\uFF1A"),u(),d(13,"input",30),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PricePerLesson,o)||(r.PricePerLesson=o),y(o)}),P("change",function(){b(t);let o=x(2);return y(o.PricePerLessonChange())}),u(),F(14,"br"),u()}if(n&2){let t=x(2);f(3),B("ngModel",t.PricePerSemester),f(4),B("ngModel",t.QtyOfLessons),f(6),B("ngModel",t.PricePerLesson)}}function Mg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.ProductReset())}),h(1,"\u53D6\u6D88\u4FEE\u6539"),u()}}function wg(n,e){if(n&1){let t=O();d(0,"span"),h(1," \u5099\u8A3B\uFF1A"),d(2,"input",31),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.note,o)||(r.note=o),y(o)}),u(),d(3,"input",32),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.varStaffOnly,o)||(r.varStaffOnly=o),y(o)}),P("click",function(){b(t);let o=x(2);return y(o.staffOnly())}),u(),h(4,"\u54E1\u5DE5\u50F9 "),d(5,"button",18),P("click",function(){b(t);let o=x(2);return y(o.AddToCart())}),h(6,"\u5546\u54C1\u78BA\u8A8D"),u(),E(7,Mg,2,0,"button",11),u()}if(n&2){let t=x(2);f(2),B("ngModel",t.note),S("disabled",t.varStaffOnly),f(),B("ngModel",t.varStaffOnly),f(4),S("ngIf",t.ProductResetButtonValue=="\u53D6\u6D88\u4FEE\u6539")}}function Tg(n,e){if(n&1){let t=O();d(0,"span",34),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.deleteLessonDate(o.LessonDate))}),h(1),u()}if(n&2){let t=e.$implicit;f(),T(t.LessonDate)}}function Ag(n,e){if(n&1&&(d(0,"div"),E(1,Tg,2,1,"span",33),u()),n&2){let t=x(2);f(),S("ngForOf",t.LessonDates)}}function Dg(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t),f(),T(t=="\u9280\u884C\u5B58\u6B3E"?"\u532F\u6B3E":t)}}function kg(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),h(12),u(),d(13,"td"),h(14),u(),d(15,"td"),h(16),u(),d(17,"td")(18,"button",18),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.deleteProductInShoppingCart(o.ProductId))}),h(19,"\u522A\u9664"),u(),d(20,"button",18),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.ModifyProduct(o))}),h(21,"\u4FEE\u6539"),u()()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.ProductName),f(2),T(t.UnitPrice),f(2),T(t.Qty),f(2),T(t.Amount),f(2),T(t.TaxAmount),f(2),T(t.Amount+t.TaxAmount),f(2),T(t.note)}}function Og(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td")(10,"button",18),P("click",function(){let o=b(t).$implicit,r=x(3);return y(r.deletePayDetail(o))}),h(11,"\u522A\u9664"),u()()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.PayType),f(2),T(t.PayAmount),f(2),T(t.PayNote)}}function Eg(n,e){if(n&1){let t=O();d(0,"input",44),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.InvoiceCompanyInvoiceId,o)||(r.InvoiceCompanyInvoiceId=o),y(o)}),u()}if(n&2){let t=x(3);B("ngModel",t.InvoiceCompanyInvoiceId)}}function Fg(n,e){if(n&1){let t=O();d(0,"input",45),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.InvoiceCompanyName,o)||(r.InvoiceCompanyName=o),y(o)}),u()}if(n&2){let t=x(3);B("ngModel",t.InvoiceCompanyName)}}function Bg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.InvoiceNeedToPrintout())}),h(1,"\u5370\u51FA\u4F86"),u()}}function Ng(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.qryInvoiceCompanyInfo())}),h(1,"\u6253\u7D71\u7DE8"),u()}}function Vg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.InputCarriageId())}),h(1,"\u624B\u6A5F\u8F09\u5177"),u()}}function Lg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.InputDonateCode())}),h(1,"\u6350\u8D08\u78BC"),u()}}function Rg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.ResetInvoiceCompanyInvoiceId())}),h(1,"\u91CD\u65B0\u8F38\u5165"),u()}}function Wg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.addCashChangeToPayDetail())}),h(1,"\u627E\u96F6\u5B8C\u6210"),u()}}function Hg(n,e){if(n&1){let t=O();d(0,"button",18),P("click",function(){b(t);let o=x(3);return y(o.ConfirmPayment())}),h(1,"\u78BA\u5B9A\u7D50\u5E33"),u()}}function Gg(n,e){if(n&1){let t=O();d(0,"div")(1,"div",35)(2,"span"),h(3,"\u6536\u6B3E\u65B9\u5F0F\uFF1A"),u(),d(4,"select",36),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayType,o)||(r.PayType=o),y(o)}),E(5,Dg,2,2,"option",21),u(),d(6,"input",37),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayAmount,o)||(r.PayAmount=o),y(o)}),P("focus",function(o){b(t);let r=x(2);return y(r.onFocus(o))})("keydown.enter",function(){b(t);let o=x(2);return y(o.addPayDetail())}),u(),d(7,"input",38),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayNote,o)||(r.PayNote=o),y(o)}),P("focus",function(o){b(t);let r=x(2);return y(r.onFocus(o))})("keydown.enter",function(){b(t);let o=x(2);return y(o.addPayDetail())}),u(),d(8,"button",18),P("click",function(){b(t);let o=x(2);return y(o.addPayDetail())}),h(9,"\u78BA\u5B9A"),u(),F(10,"br"),u(),d(11,"div")(12,"table")(13,"tr")(14,"td"),h(15,"\u9805\u6B21"),u(),d(16,"td"),h(17,"\u5546\u54C1\u540D\u7A31"),u(),d(18,"td"),h(19,"\u55AE\u50F9"),u(),d(20,"td"),h(21,"\u6578\u91CF"),u(),d(22,"td"),h(23,"\u8907\u50F9"),u(),d(24,"td"),h(25,"\u7A05\u91D1"),u(),d(26,"td"),h(27,"\u5C0F\u8A08"),u(),d(28,"td"),h(29,"\u5099\u8A3B"),u(),F(30,"td"),u(),E(31,kg,22,8,"tr",39),u(),d(32,"table")(33,"tr")(34,"td"),h(35,"\u9805\u6B21"),u(),d(36,"td"),h(37,"\u4ED8\u6B3E\u65B9\u5F0F"),u(),d(38,"td"),h(39,"\u4ED8\u6B3E\u91D1\u984D"),u(),F(40,"td")(41,"td"),u(),E(42,Og,12,4,"tr",39),d(43,"tr"),F(44,"td")(45,"td")(46,"td")(47,"td")(48,"td"),u(),d(49,"tr"),F(50,"td"),d(51,"td"),h(52,"\u8907\u50F9\u5408\u8A08\uFF1A"),u(),d(53,"td"),h(54),u(),F(55,"td")(56,"td"),u(),d(57,"tr"),F(58,"td"),d(59,"td"),h(60,"\u7A05\u91D1\u5408\u8A08\uFF1A"),u(),d(61,"td"),h(62),u(),F(63,"td")(64,"td"),u(),d(65,"tr"),F(66,"td"),d(67,"td")(68,"span"),h(69,"\u61C9\u6536\u5408\u8A08\uFF1A"),u()(),d(70,"td")(71,"span",40),h(72),u()(),F(73,"td")(74,"td"),u(),d(75,"tr"),F(76,"td"),d(77,"td")(78,"span"),h(79,"\u5BE6\u6536\u5408\u8A08\uFF1A"),u()(),d(80,"td")(81,"span",40),h(82),u()(),F(83,"td"),d(84,"td"),E(85,Eg,1,1,"input",41)(86,Fg,1,1,"input",42),F(87,"br"),E(88,Bg,2,0,"button",11)(89,Ng,2,0,"button",11)(90,Vg,2,0,"button",11)(91,Lg,2,0,"button",11)(92,Rg,2,0,"button",11),u()(),d(93,"tr"),F(94,"td"),d(95,"td")(96,"span"),h(97,"\u5DEE\u984D\u5408\u8A08\uFF1A"),u()(),d(98,"td")(99,"span",43),h(100),u()(),F(101,"td"),d(102,"td"),E(103,Wg,2,0,"button",11)(104,Hg,2,0,"button",11),u()()()()()}if(n&2){let t=x(2);f(4),B("ngModel",t.PayType),f(),S("ngForOf",t.PayMethod),f(),B("ngModel",t.PayAmount),f(),B("ngModel",t.PayNote),f(24),S("ngForOf",t.ShoppingCart),f(11),S("ngForOf",t.PayDetail),f(12),T(t.TotalAmount),f(8),T(t.TotalTaxAmount),f(10),T(t.TotalPriceShouldPay),f(10),T(t.TotalPayAmount),f(3),S("ngIf",t.InvoiceCompanyName!=null),f(),S("ngIf",t.InvoiceCompanyName!=null),f(2),S("ngIf",!t.InvoceCompanyLock),f(),S("ngIf",!t.InvoceCompanyLock),f(),S("ngIf",!t.InvoceCompanyLock),f(),S("ngIf",!t.InvoceCompanyLock),f(),S("ngIf",t.InvoceCompanyLock),f(7),S("ngClass",t.TotalDiff!=0?"ImportantNotice Warning":"ImportantNotice Normal"),f(),T(t.TotalDiff),f(3),S("ngIf",t.PayDetail.length>0&&t.TotalDiff<0),f(),S("ngIf",t.TotalPayAmount>0&&t.TotalDiff==0)}}function Yg(n,e){if(n&1){let t=O();d(0,"span")(1,"span"),h(2,"\u5546\u54C1\u7DE8\u865F\uFF1A"),u(),d(3,"input",25),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductId,o)||(r.ProductId=o),y(o)}),u(),F(4,"br"),d(5,"span"),h(6,"\u5546\u54C1\u540D\u7A31\uFF1A"),u(),d(7,"input",25),V("ngModelChange",function(o){b(t);let r=x();return N(r.ProductName,o)||(r.ProductName=o),y(o)}),u(),F(8,"br"),E(9,Ig,9,2,"span",6)(10,Pg,15,3,"span",6)(11,wg,8,4,"span",6)(12,Ag,2,1,"div",6)(13,Gg,105,21,"div",6),u()}if(n&2){let t=x();f(3),B("ngModel",t.ProductId),f(4),B("ngModel",t.ProductName),f(2),S("ngIf",t.ProductName!=""),f(),S("ngIf",t.ProductName!=""&&t.CourseMS!=null),f(),S("ngIf",t.ProductName!=""),f(),S("ngIf",t.CourseMS!=null),f(),S("ngIf",t.ShoppingCart.length>0&&t.ShowShoppingCart==!0)}}function Ug(n,e){if(n&1&&(d(0,"option",23),h(1),u()),n&2){let t=e.$implicit;$t("value",t.LessonDate),f(),T(t.LessonDate)}}function qg(n,e){if(n&1){let t=O();d(0,"span",52),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.deleteLessonDateModify(o))}),h(1),u()}if(n&2){let t=e.$implicit;f(),T(t)}}function zg(n,e){if(n&1){let t=O();d(0,"div",46)(1,"div",47),h(2," \u8ACB\u8F38\u5165\u8CFC\u8CB7\u8AB2\u5802\u6578\u91CF:"),d(3,"input",48),V("ngModelChange",function(o){b(t);let r=x();return N(r.QtyOfLessons,o)||(r.QtyOfLessons=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.chkQtyOfLesson())}),u(),F(4,"br"),h(5," \u8ACB\u9078\u53D6\u8AB2\u5802\u65E5\u671F:"),d(6,"select",49),V("ngModelChange",function(o){b(t);let r=x();return N(r.ModifySelectDate,o)||(r.ModifySelectDate=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.addCourseDateToModify())}),F(7,"option"),E(8,Ug,2,2,"option",21),u(),F(9,"br"),d(10,"div"),h(11," \u5DF2\u9078\u53D6\u8AB2\u7A0B\u65E5\u671F: "),E(12,qg,2,1,"span",50),u(),d(13,"p",51)(14,"button",18),P("click",function(){b(t);let o=x();return y(o.hideModifyPurchaseClassDiv())}),h(15,"\u4FEE\u6539\u5B8C\u6210"),u()()()()}if(n&2){let t=x();f(3),B("ngModel",t.QtyOfLessons),f(3),B("ngModel",t.ModifySelectDate),f(2),S("ngForOf",t.LessonDates),f(4),S("ngForOf",t.CourseDateModify)}}var ed=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.datePipe=s,this.CheckoutDate=new Date().toLocaleString(),this.qryCustomerType="Tel",this.qryCustomer="",this.customers=[],this.TheCustomer=null,this.qryProductType="ProductId",this.qryProduct="",this.TheProduct="",this.Products=[],this.TotalAmount=0,this.TotalTaxAmount=0,this.ProductResetButtonValue="\u91CD\u9078",this.ProductId="",this.ProductName="",this.StdPrice=0,this.StdPriceHadIncludeTax="0",this.UnitPrice=0,this.QtyOfProduct=1,this.Amount=0,this.TaxAmount=0,this.CourseMS=null,this.PricePerLesson=0,this.PricePerSemester=0,this.QtyOfLessons=0,this.LessonDates=null,this.CustomerOrderId="",this.note="",this.PayMethod=["\u73FE\u91D1","\u4FE1\u7528\u5361","\u9280\u884C\u5B58\u6B3E","LinePay","\u8857\u53E3","\u5B78\u54E1\u5B58\u647A","\u6298\u50F9\u5238","\u9AD4\u9A57\u5238","Paypal","\u7279\u6B8A\u6298\u6263","\u61C9\u6536\u5E33\u6B3E"],this.PayDetail=[],this.PayType="\u73FE\u91D1",this.PayAmount=0,this.PayNote="",this.TotalPriceShouldPay=0,this.TotalPayAmount=0,this.TotalDiff=0,this.CustomerPaymentBillId="",this.CourseDateModify=[],this.varShowModifyPurchaseClassDiv=!1,this.ModifySelectDate="",this.ShowShoppingCart=!1,this.varStaffOnly=!1,this.InvoiceCompanyInvoiceId="",this.InvoiceCompanyName="",this.InvoceCompanyLock=!1,this.InvoiceCompanyOrCarriageOrDonate="",this.InvoiceUrl="",this.msg="",this.AutoIssueInvoice="",this.InvoiceIssueOfficial=""}ngOnInit(){this.initial()}onFocus(i){i.target.select()}initial(){this.CheckoutDate=new Date().toISOString().substring(0,10),this.qryAutoIssueInvoice(),this.qryInvoiceIssueOfficial(),this.CustomerReset(),this.ProductReset(),this.qryShoppingCart(),this.ShoppingCart=null,this.PayDetail=[],this.TotalAmount=0,this.TotalTaxAmount=0,this.TotalPriceShouldPay=0,this.TotalPayAmount=0,this.TotalDiff=0,this.ShowShoppingCart=!0,this.varStaffOnly=!1}CustomerReset(){this.qryCustomer="",this.TheCustomer=null,this.customers=[]}ProductReset(){this.qryProduct="",this.TheProduct="",this.Products=[],this.ProductId="",this.ProductName="",this.StdPrice=0,this.QtyOfProduct=1,this.CourseMS=[],this.PricePerSemester=0,this.PricePerLesson=0,this.QtyOfLessons=0,this.LessonDates=[],this.ProductResetButtonValue="\u91CD\u9078",this.note="",this.ShoppingCart!=null&&(this.ShowShoppingCart=!0)}goQryCustomer(){if(this.InvoiceUrl="",this.qryCustomer!=""){var i=this.global.serverip+"/api/CheckoutCounter/qryCustomer",o={qryCustomerType:this.qryCustomerType,qryCustomer:this.qryCustomer};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u67E5\u8A62\u6210\u529F"),this.customers=s,this.inputElement.nativeElement.focus(),this.customers.length==1&&(this.TheCustomer=this.customers[0].id,this.qryShoppingCart()),r(!0)},s=>{a(!1)})})}}checkBuyer(){if(this.TheCustomer==null){this.toastr.warning("\u8ACB\u5148\u9078\u53D6\u7D50\u5E33\u5BA2\u4EBA"),this.qryProduct="";return}}goQryProduct(){if(this.qryProduct!=""){var i=this.global.serverip+"/api/CheckoutCounter/qryProduct",o={qryProductType:this.qryProductType,qryProduct:this.qryProduct};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u67E5\u8A62\u6210\u529F"),this.Products=s,this.Products.length==1,r(!0)},s=>{a(!1)})})}}setProduct(){var i=this.Products.find(o=>o.ProductId==this.TheProduct);this.ProductId=i.ProductId,this.ProductName=i.ProductName,this.StdPrice=i.stdPrice,this.StdPriceHadIncludeTax=i.StdPriceHadIncludeTax,this.CourseMS=i.CourseMS[0],this.CourseMS!=null&&(this.PricePerSemester=this.CourseMS.PricePerSemester,this.QtyOfLessons=this.CourseMS.QtyOfLessons,this.PricePerLesson=this.PricePerSemester/this.QtyOfLessons,this.LessonDates=this.CourseMS.LessonDates,this.StdPrice=this.PricePerSemester)}deleteLessonDate(i){var o=confirm("\u78BA\u5B9A\u8981\u522A\u9664\u9019\u500B\u65E5\u671F\u55CE\uFF1F");if(o){var r=this.LessonDates.findIndex(a=>a.LessonDate==i);r>=0&&(this.LessonDates.splice(r,1),this.QtyOfLessons=this.LessonDates.length,this.countPricePerSemester())}}countPricePerSemester(){this.PricePerSemester=this.QtyOfLessons*this.PricePerLesson,this.UnitPrice=this.PricePerSemester,this.StdPrice=this.UnitPrice}qryShoppingCart(){if(!(this.TheCustomer==null||this.TheCustomer==null)){var i=this.global.serverip+"/api/ShoppingCart/qryShoppingCart",o={CustomerRowId:this.TheCustomer};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.info("\u67E5\u8A62\u6210\u529F"),this.ShoppingCart=s.CustomerOrderDS,this.ShoppingCart.length==0&&this.ResetInvoiceCompanyInvoiceId(),this.TotalAmount=0,this.TotalTaxAmount=0;for(var l=0;l<this.ShoppingCart.length;l++)this.TotalAmount+=this.ShoppingCart[l].Amount,this.TotalTaxAmount+=this.ShoppingCart[l].TaxAmount;this.TotalPriceShouldPay=this.TotalAmount+this.TotalTaxAmount,this.TotalDiff=this.TotalPayAmount-this.TotalPriceShouldPay,r(!0)},s=>{a(!1)})})}}AddToCart(){if(this.TheCustomer!=null){var i=this.global.serverip+"/api/ShoppingCart/AddToCart";this.UnitPrice=0,this.StdPriceHadIncludeTax=="0"?this.UnitPrice=this.StdPrice:this.UnitPrice=this.StdPrice/1.05,this.Amount=this.QtyOfProduct*this.UnitPrice,this.TaxAmount=this.Amount*.05,this.note!=null&&this.note.indexOf("\u54E1\u5DE5\u50F9")!=-1&&(this.UnitPrice=this.StdPrice,this.Amount=this.QtyOfProduct*this.UnitPrice,this.TaxAmount=0),this.note==null&&(this.note="");var o={ProductId:this.TheProduct,Qty:this.QtyOfProduct,UnitPrice:this.StdPrice,Amount:this.Amount,TaxAmount:this.TaxAmount,CustomerRowId:this.TheCustomer,note:this.note};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{if(this.CourseMS==null||this.CourseMS==null||this.CourseMS.length==0){this.ProductReset(),this.qryShoppingCart(),this.ShowShoppingCart=!0,this.varStaffOnly=!1,this.PayType="\u73FE\u91D1",r(!0);return}for(var l=this.global.serverip+"/api/ShoppingCart/addDateLessonsToShoppingCartCourseDS",c=[],m=0;m<this.LessonDates.length;m++){var p=this.LessonDates[m].LessonDate;c.push(p)}var g=this.PricePerLesson;(this.note==null||this.note!=null&&this.note.indexOf("\u54E1\u5DE5\u50F9")==-1)&&(g=Math.round(g/1.05));var _={CustomerRowId:this.TheCustomer,ProductId:this.TheProduct,LessonDates:c,PricePerLesson:g};return new Promise((C,v)=>{this.auth.httpDo(l,_).then(I=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.ProductReset(),this.qryShoppingCart(),this.ShowShoppingCart=!0,this.varStaffOnly=!1,C(!0)},I=>{v(!1)})})},s=>{a(!1)})})}}deleteProductInShoppingCart(i){if(this.TheCustomer!=null&&i!=null&&confirm("\u8981\u522A\u9664\u6B64\u9078\u8CFC\u5546\u54C1\u55CE\uFF1F")){var o=this.global.serverip+"/api/ShoppingCart/deleteItem",r={CustomerRowId:this.TheCustomer,ProductId:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.qryShoppingCart(),a(!0)},l=>{s(!1)})})}}ModifyProduct(i){this.ProductResetButtonValue="\u53D6\u6D88\u4FEE\u6539",this.qryProductType="ProductId",this.qryProduct=i.ProductId;var o=new Promise((s,l)=>{this.goQryProduct()?.then(c=>{this.TheProduct=i.ProductId;var m=this.Products.find(p=>p.ProductId==this.TheProduct);this.ProductId=i.ProductId,this.ProductName=i.ProductName,this.note=i.note,this.StdPriceHadIncludeTax=m.StdPriceHadIncludeTax,this.CourseMS=m.CourseMS[0],this.StdPriceHadIncludeTax=="1"?this.PricePerSemester=i.Amount+i.TaxAmount:this.PricePerSemester=i.Amount,this.PricePerLesson=this.PricePerSemester/this.QtyOfLessons,this.StdPrice=this.PricePerSemester,this.ShowShoppingCart=!1,this.note.indexOf("\u54E1\u5DE5\u50F9")!=-1?this.varStaffOnly=!0:this.varStaffOnly=!1})}),r=this.global.serverip+"/api/ShoppingCart/qryShoppingCartCourseDS",a={CustomerRowId:this.TheCustomer,ProductId:i.ProductId};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.toastr.clear(),this.toastr.info("\u66F4\u65B0\u6210\u529F"),this.LessonDates=c,this.QtyOfLessons=this.LessonDates.length,s(!0)},c=>{l(!1)})})}PricePerSemesterChange(){this.PricePerLesson=this.PricePerSemester/this.QtyOfLessons,this.StdPrice=this.PricePerSemester}PricePerLessonChange(){this.PricePerSemester=this.PricePerLesson*this.QtyOfLessons,this.StdPrice=this.PricePerSemester}addPayDetail(){if(!(this.PayAmount==0||this.PayAmount==null||this.PayAmount==null)){var i=new dr;i.PayType=this.PayType,i.PayAmount=this.PayAmount,i.PayNote=this.PayNote,this.PayDetail.push(i),this.countTotalPayAmount(),this.PayAmount=0,this.scrollToBottom(),this.PayType="\u73FE\u91D1",this.PayNote=""}}deletePayDetail(i){if(confirm("\u8981\u522A\u9664\u6B64\u9805\u4ED8\u6B3E\u65B9\u5F0F\u55CE\uFF1F")){var o=this.PayDetail.findIndex(r=>r.PayType==i.PayType&&r.PayAmount==i.PayAmount);o>=0&&this.PayDetail.splice(o,1),this.countTotalPayAmount()}}countTotalPayAmount(){this.TotalPayAmount=0;for(var i=0;i<this.PayDetail.length;i++)this.TotalPayAmount+=this.PayDetail[i].PayAmount;this.TotalDiff=this.TotalPriceShouldPay-this.TotalPayAmount}addCashChangeToPayDetail(){this.PayType="\u627E\u96F6",this.PayAmount=this.TotalDiff,this.addPayDetail(),this.scrollToBottom()}ConfirmPayment(){if(confirm("\u78BA\u8A8D\u7D50\u5E33\u55CE\uFF1F"))var i=new Promise((o,r)=>{this.CreateCustomerPaymentMS().then(a=>{this.CreateCustomerPaymentDS(),this.CreateCustomerOrderMS()})})}CreateCustomerPaymentMS(){var i=this.global.serverip+"/api/CheckoutCounter/CreateCustomerPaymentMS",o={CustomerRowId:this.TheCustomer,CheckoutDate:this.CheckoutDate,TotalPayAmount:this.TotalPayAmount,TotalAmount:this.TotalAmount,TotalTaxAmount:this.TotalTaxAmount};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.CustomerPaymentBillId=s,r(!0)},s=>{a(!1)})})}CreateCustomerPaymentDS(){for(var i=this.global.serverip+"/api/CheckoutCounter/CreateCustomerPaymentDS",o=[],r=[],a=[],s=0;s<this.PayDetail.length;s++){var l=this.PayDetail[s].PayType;o.push(l);var c=this.PayDetail[s].PayAmount;r.push(c);var m=this.PayDetail[s].PayNote;a.push(m)}var p={CustomerPaymentBillId:this.CustomerPaymentBillId,PayTypeArray:o,PayAmountArray:r,PayNoteArray:a};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((g,_)=>{this.auth.httpDo(i,p).then(C=>{g(!0)},C=>{_(!1)})})}CreateCustomerOrderMS(){var i=this.global.serverip+"/api/CheckoutCounter/CreateCustomerOrderMS",o={CustomerRowId:this.TheCustomer,CheckoutDate:this.CheckoutDate,TotalPayAmount:this.TotalPayAmount,TotalAmount:this.TotalAmount,TotalTaxAmount:this.TotalTaxAmount,CustomerPaymentBillId:this.CustomerPaymentBillId,InvoiceCompanyOrCarriageOrDonate:this.InvoiceCompanyOrCarriageOrDonate,InvoiceCompanyInvoiceId:this.InvoiceCompanyInvoiceId,InvoiceCompanyName:this.InvoiceCompanyName};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{var l=s.Result;if(s!="false"){if(this.toastr.info("\u7D50\u5E33\u5DF2\u5B8C\u6210"),l!=null){var c=l.invoice_number;c!=null&&c!=null&&this.DownloadInvoice(c)}this.initial()}else this.toastr.warning("\u7D50\u5E33\u5931\u6557\uFF01");r(!0)},s=>{a(!1)})})}QtyOfLessonsModifyDisable(){blur()}showModifyPurchaseClassDiv(){this.CourseDateModify=[],this.varShowModifyPurchaseClassDiv=!0}hideModifyPurchaseClassDiv(){this.modifyLessonDates(),this.varShowModifyPurchaseClassDiv=!1}chkQtyOfLesson(){this.QtyOfLessons>this.CourseMS.QtyOfLessons&&(this.QtyOfLessons=this.CourseMS.QtyOfLessons),this.QtyOfLessons<1&&(this.QtyOfLessons=1)}addCourseDateToModify(){this.CourseDateModify.length==this.QtyOfLessons,this.CourseDateModify.push(this.ModifySelectDate),this.QtyOfLessons=this.CourseDateModify.length}deleteLessonDateModify(i){var o=this.CourseDateModify.findIndex(r=>r.LessonDate==i.LessonDate);this.CourseDateModify.splice(o,1)}modifyLessonDates(){for(var i=[],o=0;o<this.CourseDateModify.length;o++)for(var r=this.CourseDateModify[o],a=0;a<this.LessonDates.length;a++)this.LessonDates[a].LessonDate==r&&i.push(this.LessonDates[a]);this.LessonDates=i,this.countPricePerSemester()}staffOnly(){if(this.note.indexOf("\u54E1\u5DE5\u50F9")==-1)this.note="\u54E1\u5DE5\u50F9 "+this.note,this.varStaffOnly=!0;else{var i=this.note.indexOf("\u54E1\u5DE5\u50F9")+4;this.note=this.note.slice(i,this.note.length),this.varStaffOnly=!1}}qryInvoiceCompanyInfo(){var i=prompt("\u8ACB\u8F38\u5165\u7D71\u7DE8\u865F\u78BC","");if(!(i==null||i=="")){var o=this.global.serverip+"/api/Invoice/QryInvoiceCompanyInfo",r={ban:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{var c=l;c.code!="0"?this.toastr.warning("\u7D71\u4E00\u7DE8\u865F\u4E0D\u6B63\u78BA\uFF0C\u8ACB\u91CD\u65B0\u78BA\u8A8D"):(this.InvoiceCompanyInvoiceId=i??"",this.InvoiceCompanyName=c.data[0].name,this.InvoceCompanyLock=!0,this.InvoiceCompanyOrCarriageOrDonate="InvoiceCompany"),a(!0)},l=>{s(!1)})})}}ResetInvoiceCompanyInvoiceId(){this.InvoiceCompanyInvoiceId="",this.InvoiceCompanyName="",this.InvoiceCompanyOrCarriageOrDonate="",this.InvoceCompanyLock=!1}InputCarriageId(){var i=prompt("\u8ACB\u8F38\u5165\u624B\u6A5F\u8F09\u5177\u865F\u78BC","");if(i==""||i==null||i.substring(0,1)!="/"){this.toastr.warning("\u624B\u6A5F\u8F09\u5177\u865F\u78BC\u4E0D\u6B63\u78BA\uFF0C\u8ACB\u91CD\u65B0\u8F38\u5165");return}this.InvoiceCompanyInvoiceId=i,this.InvoceCompanyLock=!0,this.InvoiceCompanyOrCarriageOrDonate="Carriage"}InputDonateCode(){var i=prompt("\u8ACB\u8F38\u5165\u6350\u8D08\u4EE3\u78BC","");i==""||i==null||(this.InvoiceCompanyInvoiceId=i,this.InvoceCompanyLock=!0,this.InvoiceCompanyOrCarriageOrDonate="Donate")}InvoiceNeedToPrintout(){this.InvoiceCompanyInvoiceId="",this.InvoiceCompanyName="\u767C\u7968\u9700\u8981\u5370\u51FA\u4F86",this.InvoceCompanyLock=!0,this.InvoiceCompanyOrCarriageOrDonate="InvoiceNeedToPrintout"}DownloadInvoice(i){if(!(i==null||i=="")){var o=this.global.serverip+"/api/Invoice/DownloadInvoice",r={type:"invoice",invoice_number:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{var c=l;if(c.Code!="0")this.toastr.warning("\u767C\u7968\u4E0B\u8F09\u5931\u6557\uFF01");else if(c.data!=null){var m=c.data.file_url;this.InvoiceUrl=m,navigator.clipboard.writeText(m).then(()=>{this.toastr.info("\u767C\u7968\u4E0B\u8F09\u7DB2\u5740\u5DF2\u8907\u88FD\uFF0C\u8ACB\u958B\u65B0\u5206\u9801\u8CBC\u4E0A\u7DB2\u5740\u4E0B\u8F09"),this.msg="\u767C\u7968\u4E0B\u8F09\u7DB2\u5740\u5DF2\u8907\u88FD\uFF0C\u8ACB\u958B\u65B0\u5206\u9801\u8CBC\u4E0A\u7DB2\u5740\u4E0B\u8F09",alert("\u767C\u7968\u4E0B\u8F09\u7DB2\u5740\u5DF2\u8907\u88FD\uFF0C\u8ACB\u958B\u65B0\u5206\u9801\u8CBC\u4E0A\u7DB2\u5740\u4E0B\u8F09")}).catch(p=>{console.error("Error copying text: ",p)})}a(!0)},l=>{s(!1)})})}}qryAutoIssueInvoice(){var i=this.global.serverip+"/api/Orders/qryAutoIssueInvoice",o={};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.AutoIssueInvoice=s,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),r(!0)},s=>{a(!1)})})}qryInvoiceIssueOfficial(){var i=this.global.serverip+"/api/Orders/qryInvoiceIssueOfficial",o={};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.InvoiceIssueOfficial=s,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),r(!0)},s=>{a(!1)})})}scrollToBottom(){window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(zt))},e.\u0275cmp=_t({type:e,selectors:[["app-checkout-counter"]],viewQuery:function(o,r){if(o&1&&vi(ug,5),o&2){let a;Ii(a=Pi())&&(r.inputElement=a.first)}},decls:31,vars:16,consts:[["qProduct",""],[1,"tableContainer","CheckoutCounter"],["class","StatusLight",4,"ngIf"],["class","StatusLight official",4,"ngIf"],["type","date",3,"ngModelChange","ngModel"],["type","text",2,"width","90px",3,"ngModelChange","ngModel"],[4,"ngIf"],[3,"ngModelChange","ngModel"],["value","ProductId",3,"selected"],["value","ProductName"],["type","text",3,"ngModelChange","keyup","keydown.enter","ngModel","ngClass"],[3,"click",4,"ngIf"],["id","ModifyLessonSelectDate","class","wFull dark-back",4,"ngIf"],[1,"StatusLight"],[1,"StatusLight","official"],["value","CName"],["value","Tel",3,"selected"],["type","text",3,"ngModelChange","keydown.enter","ngModel","ngClass"],[3,"click"],[3,"ngModelChange","change","ngModel","disabled","value"],["value",""],[3,"value",4,"ngFor","ngForOf"],[2,"margin-left","100px","right","0",3,"click"],[3,"value"],["style","margin-left:100px; right:0;",3,"click",4,"ngIf"],["type","text","disabled","",3,"ngModelChange","ngModel"],["type","number",3,"ngModelChange","ngModel"],["type","number",3,"ngModelChange","change","ngModel"],["type","number","disabled","",1,"w50",3,"ngModelChange","ngModel"],["href","javascript:void()",1,"w50","margin-right-10",3,"click"],["type","number",1,"w100",3,"ngModelChange","change","ngModel"],["type","text",1,"w150",3,"ngModelChange","ngModel","disabled"],["type","checkbox","value","\u54E1\u5DE5\u50F9",3,"ngModelChange","click","ngModel"],["class","LessonDate",3,"click",4,"ngFor","ngForOf"],[1,"LessonDate",3,"click"],[2,"background-color","lightgreen","padding","10px"],[1,"ImportantNotice",3,"ngModelChange","ngModel"],["type","number",1,"ImportantNotice",3,"ngModelChange","focus","keydown.enter","ngModel"],["type","text",1,"ImportantNotice","Note",3,"ngModelChange","focus","keydown.enter","ngModel"],[4,"ngFor","ngForOf"],[1,"ImportantNotice"],["type","text","style","width:100px","disabled","",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","style","width:250px","disabled","",3,"ngModel","ngModelChange",4,"ngIf"],[3,"ngClass"],["type","text","disabled","",2,"width","100px",3,"ngModelChange","ngModel"],["type","text","disabled","",2,"width","250px",3,"ngModelChange","ngModel"],["id","ModifyLessonSelectDate",1,"wFull","dark-back"],[1,"x-center","y-center"],["type","number","disabled","",1,"w50",3,"ngModelChange","change","ngModel"],[3,"ngModelChange","change","ngModel"],["class","margin-right-10",3,"click",4,"ngFor","ngForOf"],["align","left"],[1,"margin-right-10",3,"click"]],template:function(o,r){if(o&1){let a=O();d(0,"div",1)(1,"table")(2,"thead")(3,"tr")(4,"td"),E(5,mg,2,0,"span",2)(6,hg,2,0,"span",3)(7,pg,2,0,"span",2)(8,fg,2,0,"span",3),h(9," \u7D50\u5E33\u65E5\u671F\uFF1A"),d(10,"input",4),V("ngModelChange",function(l){return b(a),N(r.CheckoutDate,l)||(r.CheckoutDate=l),y(l)}),u(),d(11,"input",5),V("ngModelChange",function(l){return b(a),N(r.InvoiceUrl,l)||(r.InvoiceUrl=l),y(l)}),u(),F(12,"br"),h(13," \u7D50\u5E33\u5BA2\u4EBA\uFF1A "),E(14,_g,8,5,"span",6)(15,xg,7,3,"span",6),F(16,"br"),h(17," \u8CFC\u8CB7\u5546\u54C1\uFF1A "),d(18,"span")(19,"select",7),V("ngModelChange",function(l){return b(a),N(r.qryProductType,l)||(r.qryProductType=l),y(l)}),d(20,"option",8),h(21,"\u5546\u54C1\u7DE8\u865F"),u(),d(22,"option",9),h(23,"\u5546\u54C1\u540D\u7A31"),u()(),d(24,"input",10,0),V("ngModelChange",function(l){return b(a),N(r.qryProduct,l)||(r.qryProduct=l),y(l)}),P("keyup",function(){return b(a),y(r.checkBuyer())})("keydown.enter",function(){return b(a),y(r.goQryProduct())}),u(),E(26,Sg,2,0,"button",11),u(),E(27,vg,6,4,"span",6),F(28,"br"),E(29,Yg,14,7,"span",6),u()()()(),E(30,zg,16,4,"div",12),u()}o&2&&(f(5),S("ngIf",!r.AutoIssueInvoice),f(),S("ngIf",r.AutoIssueInvoice),f(),S("ngIf",!r.InvoiceIssueOfficial),f(),S("ngIf",r.InvoiceIssueOfficial),f(2),B("ngModel",r.CheckoutDate),f(),B("ngModel",r.InvoiceUrl),f(3),S("ngIf",r.TheCustomer==null),f(),S("ngIf",r.customers.length>0),f(4),B("ngModel",r.qryProductType),f(),S("selected",r.qryProductType==="ProductId"),f(4),B("ngModel",r.qryProduct),S("ngClass",r.Products.length==0?"Warning":r.TheProduct!=null?"visibleFalse":"Normal"),f(2),S("ngIf",r.Products.length<1),f(),S("ngIf",r.Products.length>0),f(2),S("ngIf",r.TheProduct!=""||r.ShoppingCart!=null),f(),S("ngIf",r.varShowModifyPurchaseClassDiv))},dependencies:[le,Dt,Nt,Wt,Ht,jt,cr,Mi,Rt,Vt,Lt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.ImportantNotice[_ngcontent-%COMP%]{font-size:48px;font-weight:700}.Note[_ngcontent-%COMP%]{width:300px}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-size:18px}button[_ngcontent-%COMP%]{font-size:15px;background-color:#e7e7e7;margin-right:15px}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:730px;height:280px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.Teacher[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#ff0;font-size:20px;height:25px}.Teacher[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#f29c2b;font-size:24px;height:25px}.LessonDate[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#aff256;font-size:20px;height:25px}.LessonDate[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#78bb21;font-size:24px;height:25px}.Warning[_ngcontent-%COMP%]{background-color:red;color:#fff}.Normal[_ngcontent-%COMP%]{background-color:inherit;color:inherit}.visibleTrue[_ngcontent-%COMP%]{display:inline}.visibleFalse[_ngcontent-%COMP%]{display:none}.w25[_ngcontent-%COMP%]{width:25px}.w50[_ngcontent-%COMP%]{width:50px}.w100[_ngcontent-%COMP%]{width:100px}.w150[_ngcontent-%COMP%]{width:150px}.w200[_ngcontent-%COMP%]{width:200px}.wFull[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%}.margin-left-10[_ngcontent-%COMP%]{margin-left:10px}.margin-right-10[_ngcontent-%COMP%]{margin-right:10px}.dark-back[_ngcontent-%COMP%]{background-color:#a9a9a9}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.CheckoutCounter[_ngcontent-%COMP%]{font-size:24px;font-weight:700}select[_ngcontent-%COMP%]:disabled{color:#00008b;background-color:#ff0}input[_ngcontent-%COMP%]:disabled{color:#00008b;background:#ff0}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%]{width:150px}.official[_ngcontent-%COMP%]{background-color:red;color:#fff}.StatusLight[_ngcontent-%COMP%]{display:block;float:right;border:solid 1px black;font-size:24px;margin:5px;padding:5px}']});let n=e;return n})();var jg=n=>({"background-color":n}),nd=()=>[];function Kg(n,e){n&1&&(d(0,"span",15),h(1,"\u624B\u52D5\u958B\u767C\u7968"),u())}function Xg(n,e){n&1&&(d(0,"span",16),h(1,"\u81EA\u52D5\u958B\u767C\u7968"),u())}function Qg(n,e){n&1&&(d(0,"span",15),h(1,"\u6E2C\u8A66\u958B\u767C\u7968"),u())}function $g(n,e){n&1&&(d(0,"span",16),h(1,"\u6B63\u5F0F\u958B\u767C\u7968"),u())}function Zg(n,e){n&1&&(d(0,"span",20),h(1,"\u6B64\u8A02\u55AE\u5DF2\u4F5C\u5EE2"),u())}function Jg(n,e){if(n&1&&(d(0,"span"),h(1),F(2,"br"),h(3),ee(4,"date"),F(5,"br"),h(6),u()),n&2){let t=x().$implicit;f(),vt("\u767C\u7968\u865F\u78BC\uFF1A",t.InvoiceNo,""),f(2),vt("\u767C\u7968\u65E5\u671F\uFF1A",ne(4,3,t.InvoiceDate,"yyyy-MM-dd"),""),f(3),vt("\u96A8\u6A5F\u78BC\uFF1A",t.InvoiceRandomNo,"")}}function t_(n,e){if(n&1&&(d(0,"span",21),h(1),u()),n&2){let t=x().$implicit;S("ngStyle",Nc(2,jg,t.RealProductTransport.indexOf("\u5C1A\u672A\u5BC4\u9001")!==-1?"red":"lightgreen")),f(),T(t.RealProductTransport)}}function e_(n,e){if(n&1){let t=O();d(0,"tr",17),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.showCustomerOrderDS(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),F(5,"br"),h(6),ee(7,"date"),E(8,Zg,2,0,"span",18),u(),d(9,"td"),h(10),F(11,"br"),h(12),u(),d(13,"td"),h(14),u(),d(15,"td"),h(16),u(),d(17,"td"),h(18),u(),d(19,"td"),h(20),F(21,"br"),E(22,Jg,7,6,"span",0)(23,t_,2,4,"span",19),u()()}if(n&2){let t=e.$implicit,i=e.index,o=x(2);ps("background-color",o.chkOrderVoided(t.CustomerOrderVoided)),f(2),T(i+1),f(2),T(t.CustomerOrderId),f(2),T(ne(7,16,t.OrderDate,"yyyy-MM-dd")),f(2),S("ngIf",t.CustomerOrderVoided=="1"),f(2),T(t.CustomerCname),f(2),T(t.CustomerTel),f(2),T(t.OrderAmount),f(2),T(t.TaxAmount),f(2),T(t.TotalAmount),f(2),me(" ",t.TradeBy,":",t.TradeNo," ",t.Status,""),f(2),S("ngIf",t.InvoiceNo!=null),f(),S("ngIf",t.RealProductTransport!="")}}function n_(n,e){if(n&1){let t=O();d(0,"table")(1,"thead")(2,"tr")(3,"td",2),h(4," \u67E5\u8A62\u7A2E\u985E\uFF1A"),d(5,"select",3),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryType,o)||(r.qryType=o),y(o)}),d(6,"option",4),h(7,"\u8A02\u55AE\u7DE8\u865F"),u(),d(8,"option",5),h(9,"\u5BA2\u4EBA\u59D3\u540D"),u(),d(10,"option",6),h(11,"\u5BA2\u4EBA\u96FB\u8A71"),u(),d(12,"option",7),h(13,"\u8A02\u55AE\u91D1\u984D"),u(),d(14,"option",8),h(15,"\u5546\u54C1\u7DE8\u865F"),u()(),d(16,"input",9),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),P("keydown.enter",function(){b(t);let o=x();return y(o.qryCustomerOrders())}),u(),d(17,"button",10),P("click",function(){b(t);let o=x();return y(o.qryCustomerOrders())}),h(18,"\u67E5\u8A62"),u()(),d(19,"td",11),E(20,Kg,2,0,"span",12)(21,Xg,2,0,"span",13)(22,Qg,2,0,"span",12)(23,$g,2,0,"span",13),u()(),d(24,"tr")(25,"td"),h(26,"\u9805\u6B21"),u(),d(27,"td"),h(28,"\u8A02\u55AE\u7DE8\u865F"),F(29,"br"),h(30,"\u8A02\u55AE\u65E5\u671F"),u(),d(31,"td"),h(32,"\u8A02\u8CFC\u4EBA"),u(),d(33,"td"),h(34,"\u672A\u7A05\u91D1\u984D"),u(),d(35,"td"),h(36,"\u7A05\u91D1"),u(),d(37,"td"),h(38,"\u8A02\u55AE\u91D1\u984D"),u(),d(39,"td"),h(40,"\u7D50\u5E33\u72C0\u614B"),u()()(),d(41,"tbody"),E(42,e_,24,19,"tr",14),u()()}if(n&2){let t=x();f(5),B("ngModel",t.qryType),f(11),B("ngModel",t.qryString),f(4),S("ngIf",!t.AutoIssueInvoice),f(),S("ngIf",t.AutoIssueInvoice),f(),S("ngIf",!t.InvoiceIssueOfficial),f(),S("ngIf",t.InvoiceIssueOfficial),f(19),S("ngForOf",t.CustomerOrders)}}function i_(n,e){if(n&1){let t=O();d(0,"button",32),P("click",function(){b(t);let o=x(2);return y(o.deleteCustomerOrderDetailByOrderId(o.CustomerOrderMS.CustomerOrderId))}),h(1,"\u8A02\u55AE\u4F5C\u5EE2"),u()}}function o_(n,e){if(n&1){let t=O();d(0,"button",32),P("click",function(){b(t);let o=x(2);return y(o.ForceDeleteCustomerOrderDetailByOrderId(o.CustomerOrderMS.CustomerOrderId))}),h(1,"\u5F37\u5236\u522A\u9664\u8A02\u55AE"),u()}}function r_(n,e){n&1&&(d(0,"span",33),h(1,"\u6B64\u8A02\u55AE\u5DF2\u4F5C\u5EE2"),u())}function a_(n,e){n&1&&(d(0,"span",33),h(1,"\u624B\u52D5\u586B\u5BEB\u767C\u7968\u8CC7\u8A0A"),u())}function s_(n,e){n&1&&(d(0,"span",33),h(1,"\u7CFB\u7D71\u81EA\u52D5\u958B\u767C\u7968"),u())}function l_(n,e){n&1&&(d(0,"span",34),h(1,"\u672A\u4ED8\u6B3E"),u())}function c_(n,e){if(n&1){let t=O();d(0,"button",10),P("click",function(){b(t);let o=x(3);return y(o.DownloadInvoice(o.CustomerOrderMS.InvoiceNo))}),h(1,"\u4E0B\u8F09\u767C\u7968"),u()}}function d_(n,e){if(n&1){let t=O();d(0,"input",37),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.InvoiceUrl,o)||(r.InvoiceUrl=o),y(o)}),u()}if(n&2){let t=x(3);B("ngModel",t.InvoiceUrl)}}function u_(n,e){if(n&1){let t=O();d(0,"button",10),P("click",function(){b(t);let o=x(3);return y(o.InvoiceVoided(o.CustomerOrderMS.CustomerOrderId))}),h(1,"\u767C\u7968\u4F5C\u5EE2"),u()}}function m_(n,e){n&1&&(d(0,"span"),h(1,"\u767C\u7968\u5DF2\u4F5C\u5EE2"),u())}function h_(n,e){if(n&1&&(d(0,"span"),h(1),E(2,c_,2,0,"button",35),h(3),E(4,d_,1,1,"input",36)(5,u_,2,0,"button",35)(6,m_,2,0,"span",0),u()),n&2){let t=x(2);f(),me(" \u767C\u7968\u865F\u78BC\uFF1A",t.CustomerOrderMS.InvoiceNo,", \u767C\u7968\u65E5\u671F\uFF1A",t.CustomerOrderMS.InvoiceDate,", \u96A8\u6A5F\u78BC\uFF1A",t.CustomerOrderMS.InvoiceRandomNo," "),f(),S("ngIf",t.CustomerOrderMS.InvoiceVoided!="1"&&t.CustomerOrderMS.TradeBy!="Newebpay"),f(),T(t.msg),f(),S("ngIf",t.InvoiceUrl!=""),f(),S("ngIf",t.CustomerOrderMS.InvoiceVoided!="1"),f(),S("ngIf",t.CustomerOrderMS.InvoiceVoided=="1")}}function p_(n,e){n&1&&(d(0,"span"),h(1,"\u767C\u7968\u5DF2\u4F5C\u5EE2"),u())}function f_(n,e){if(n&1){let t=O();d(0,"span"),h(1," \u767C\u7968\u865F\u78BC\uFF1A"),d(2,"input",37),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.InvoiceNo,o)||(r.InvoiceNo=o),y(o)}),u(),h(3,", \u767C\u7968\u65E5\u671F\uFF1A"),d(4,"input",38),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.InvoiceDate,o)||(r.InvoiceDate=o),y(o)}),u(),h(5,", \u96A8\u6A5F\u78BC\uFF1A"),d(6,"input",37),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.InvoiceRandomNo,o)||(r.InvoiceRandomNo=o),y(o)}),u(),d(7,"button",10),P("click",function(){b(t);let o=x(2);return y(o.ManualUpdateInvoiceInfo())}),h(8,"\u767C\u7968\u5B58\u6A94"),u(),h(9),d(10,"input",37),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.InvoiceUrl,o)||(r.InvoiceUrl=o),y(o)}),u(),E(11,p_,2,0,"span",0),u()}if(n&2){let t=x(2);f(2),B("ngModel",t.InvoiceNo),f(2),B("ngModel",t.InvoiceDate),f(2),B("ngModel",t.InvoiceRandomNo),f(3),T(t.msg),f(),B("ngModel",t.InvoiceUrl),f(),S("ngIf",t.CustomerOrderMS.InvoiceVoided=="1")}}function g_(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u()()),n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.PayType),f(2),T(t.PayAmount),f(2),T(t.Note)}}function __(n,e){if(n&1&&(d(0,"table",39)(1,"tr")(2,"td"),h(3,"\u9805\u6B21"),u(),d(4,"td"),h(5,"\u4ED8\u6B3E\u65B9\u5F0F"),u(),d(6,"td"),h(7,"\u4ED8\u6B3E\u91D1\u984D"),u(),d(8,"td"),h(9,"\u5099\u8A3B"),u()(),E(10,g_,9,4,"tr",40),u()),n&2){let t=x(2);f(10),S("ngForOf",t.CustomerPaymentDS)}}function C_(n,e){if(n&1){let t=O();d(0,"span",46),P("click",function(){b(t);let o=x().$implicit,r=x(3);return y(r.InputTransportSN(r.CustomerOrderMS.CustomerOrderId,o.ProductId))}),h(1),u()}if(n&2){let t=x().$implicit,i=x(3);S("ngClass",i.chkTransportItem(t.ProductId,t.note,1)?"blink":"ModifyLink"),f(),T(i.chkTransportItem(t.ProductId,t.note,1)?"\u5C1A\u672A\u5BC4\u9001":"\u4FEE\u6539")}}function x_(n,e){if(n&1&&(d(0,"span",47),h(1),ee(2,"date"),u()),n&2){let t=e.$implicit;f(),At("",ne(2,2,t.LessonDate,"yyyy-MM-dd"),":$",t.PricePerLesson,"")}}function S_(n,e){if(n&1&&(d(0,"tr",43)(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),h(12),u(),d(13,"td"),h(14),u(),d(15,"td"),h(16),E(17,C_,2,2,"span",44),u(),d(18,"td"),E(19,x_,3,5,"span",45),u()()),n&2){let t=e.$implicit,i=e.index,o=x(3);S("ngStyle",o.chkTransportItem(t.ProductId,t.note,0)),f(2),T(i+1),f(2),T(t.ProductName),f(2),T(t.UnitPrice),f(2),T(t.Qty),f(2),T(t.Amount),f(2),T(t.TaxAmount),f(2),T(t.Amount+t.TaxAmount),f(2),T(t.note),f(),S("ngIf",o.chkTransportItem(t.ProductId,t.note,2)),f(2),S("ngForOf",t.CourseDS)}}function b_(n,e){if(n&1&&(d(0,"table",41)(1,"tr")(2,"td"),h(3,"\u9805\u6B21"),u(),d(4,"td"),h(5,"\u5546\u54C1\u540D\u7A31"),u(),d(6,"td"),h(7,"\u55AE\u50F9"),u(),d(8,"td"),h(9,"\u6578\u91CF"),u(),d(10,"td"),h(11,"\u8907\u50F9"),u(),d(12,"td"),h(13,"\u7A05\u91D1"),u(),d(14,"td"),h(15,"\u5C0F\u8A08"),u(),d(16,"td"),h(17,"\u5099\u8A3B"),u(),F(18,"td"),u(),E(19,S_,20,11,"tr",42),u()),n&2){let t=x(2);f(19),S("ngForOf",t.CustomerOrderDS)}}function y_(n,e){if(n&1){let t=O();d(0,"div",22)(1,"h1",23),h(2,"\u8A02\u55AE\u660E\u7D30"),u(),d(3,"p",24),E(4,i_,2,0,"button",25)(5,o_,2,0,"button",25)(6,r_,2,0,"span",26),d(7,"button",27),P("click",function(){b(t);let o=x();return y(o.CustomerOrderReset())}),h(8,"\u95DC\u9589\u8A02\u55AE\u660E\u7D30"),u(),E(9,a_,2,0,"span",26)(10,s_,2,0,"span",26),u(),d(11,"table")(12,"tr")(13,"td"),h(14),F(15,"br"),h(16),F(17,"br"),h(18),ee(19,"date"),F(20,"br"),h(21),F(22,"br"),h(23),F(24,"br"),h(25),F(26,"br"),h(27," \u4ED8\u6B3E\u6B3E\u72C0\u614B\uFF1A"),E(28,l_,2,0,"span",28),h(29),F(30,"br"),E(31,h_,7,8,"span",0)(32,f_,12,6,"span",0),F(33,"br"),d(34,"span"),h(35,"\u6703\u8A08\u50B3\u7968\u865F\u78BC\uFF1A"),d(36,"a",29),P("click",function(){b(t);let o=x();return y(o.gotoAVBill(o.CustomerOrderMS.AVBillId))}),h(37),u()()()()(),E(38,__,11,1,"table",30)(39,b_,20,1,"table",31),u()}if(n&2){let t=x();ps("background-color",t.chkOrderVoided(t.CustomerOrderMS.CustomerOrderVoided)),f(4),S("ngIf",t.CustomerOrderMS.CustomerOrderVoided!="1"),f(),S("ngIf",t.Private==1),f(),S("ngIf",t.CustomerOrderMS.CustomerOrderVoided=="1"),f(3),S("ngIf",!t.AutoIssueInvoice),f(),S("ngIf",t.AutoIssueInvoice),f(),Tc(t.CustomerOrderMS.Status=="\u4ED8\u6B3E\u5B8C\u6210"?"DS1":"Warning"),f(3),vt(" \u8A02\u55AE\u7DE8\u865F\uFF1A",t.CustomerOrderMS.CustomerOrderId,""),f(2),At(" \u8A02\u8CFC\u4EBA\uFF1A",t.CustomerOrderMS.CustomerUserCName,"",t.CustomerOrderMS.CustomerTel,""),f(2),vt(" \u8A02\u55AE\u65E5\u671F\uFF1A",ne(19,25,t.CustomerOrderMS.CustomerOrderDate,"yyyy-MM-dd"),""),f(3),vt(" \u91D1\u984D\uFF1A$",t.CustomerOrderMS.Amount,""),f(2),vt(" \u7A05\u91D1\uFF1A$",t.CustomerOrderMS.TaxAmount,""),f(2),vt(" \u5408\u8A08\uFF1A$",t.CustomerOrderMS.TotalAmount,""),f(3),S("ngIf",t.CustomerOrderMS.Status!="\u4ED8\u6B3E\u5B8C\u6210"),f(),me("",t.CustomerOrderMS.Status,", ",t.CustomerOrderMS.TradeBy,", ",t.CustomerOrderMS.TradeNo,""),f(2),S("ngIf",t.CustomerOrderMS.InvoiceNo!=null&&t.CustomerOrderMS.InvoiceNo!=""),f(),S("ngIf",!t.AutoIssueInvoice&&(t.CustomerOrderMS.InvoiceNo==null||t.CustomerOrderMS.InvoiceNo=="")),f(5),T(t.CustomerOrderMS.AVBillId),f(),S("ngIf",t.CustomerPaymentDS!=null&&t.CustomerPaymentDS!=qt(28,nd)),f(),S("ngIf",t.CustomerOrderDS!=null&&t.CustomerOrderDS!=qt(29,nd))}}var id=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.datePipe=s,this.qryType="\u8A02\u55AE\u7DE8\u865F",this.qryString="",this.msg="",this.InvoiceUrl="",this.AutoIssueInvoice="",this.InvoiceIssueOfficial="",this.InvoiceNo="",this.InvoiceDate=new Date().toISOString().substring(0,10),this.InvoiceRandomNo=""}ngOnInit(){this.qryTransportItem(),this.qryAutoIssueInvoice(),this.qryInvoiceIssueOfficial(),this.qryCustomerOrders(),navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then(function(i){for(let o of i)o.unregister()})}qryAutoIssueInvoice(){var i=this.global.serverip+"/api/Orders/qryAutoIssueInvoice",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.AutoIssueInvoice=s,r(!0)},s=>{a(!1)})})}qryInvoiceIssueOfficial(){var i=this.global.serverip+"/api/Orders/qryInvoiceIssueOfficial",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.InvoiceIssueOfficial=s,r(!0)},s=>{a(!1)})})}qryCustomerOrders(){var i=this.global.serverip+"/api/Orders/qryOrders",o={qryType:this.qryType,qryString:this.qryString};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.CustomerOrders=s,r(!0)},s=>{a(!1)})})}showCustomerOrderDS(i){this.CustomerOrderMS=i;var o=this.global.serverip+"/api/Orders/qryOrderDetail",r={CustomerOrderId:i.CustomerOrderId};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),this.CustomerOrderMS=l.CustomerOrderMS,this.CustomerOrderDS=l.CustomerOrderDS,this.CustomerPaymentDS=l.CustomerPaymentDS,this.InvoiceNo=this.CustomerOrderMS.InvoiceNo,this.InvoiceDate=this.CustomerOrderMS.InvoiceDate!="0001-01-01"?this.CustomerOrderMS.InvoiceDate:this.InvoiceDate,this.InvoiceRandomNo=this.CustomerOrderMS.InvoiceRandomNo,a(!0)},l=>{s(!1)})})}ManualUpdateInvoiceInfo(){if(!(this.InvoiceNo==""||this.InvoiceNo==null)&&!(this.InvoiceDate==null||this.InvoiceDate=="0001-01-01")){var i=this.global.serverip+"/api/Orders/ManualUpdateInvoiceInfo",o={CustomerOrderId:this.CustomerOrderMS.CustomerOrderId,InvoiceNo:this.InvoiceNo,InvoiceDate:this.datePipe.transform(this.InvoiceDate,"yyyy-MM-dd"),InvoiceRandomNo:this.InvoiceRandomNo};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{s==!0&&(this.toastr.clear(),this.CustomerOrderMS.InvoiceNo=this.InvoiceNo,this.CustomerOrderMS.InvoiceDate=this.InvoiceDate,this.CustomerOrderMS.InvoiceRandomNo=this.InvoiceRandomNo),r(!0)},s=>{a(!1)})})}}deleteCustomerOrderDetailByOrderId(i){if(this.CustomerOrderMS.InvoiceNo!=""&&this.CustomerOrderMS.InvoiceNo!=null&&this.CustomerOrderMS.InvoiceVoided!="1"){this.toastr.warning("\u6B64\u8A02\u55AE\u5DF2\u7D93\u958B\u767C\u7968\uFF01\u767C\u7968\u9700\u8981\u5148\u4F5C\u5EE2\u624D\u80FD\u4F5C\u5EE2\u8A02\u55AE\uFF01\u8ACB\u5C0F\u5FC3\u64CD\u4F5C\uFF01"),alert("\u6B64\u8A02\u55AE\u5DF2\u7D93\u958B\u767C\u7968\uFF01\u767C\u7968\u9700\u8981\u5148\u4F5C\u5EE2\u624D\u80FD\u4F5C\u5EE2\u8A02\u55AE\uFF01\u8ACB\u5C0F\u5FC3\u64CD\u4F5C\uFF01");return}var o=confirm("\u60A8\u78BA\u8A8D\u8981\u4F5C\u5EE2\u6B64\u5BA2\u4EBA\u8A02\u55AE\u55CE\uFF1F");if(o==!0){var r=this.global.serverip+"/api/Orders/deleteOrderDetailByOrderId",a={CustomerOrderId:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.toastr.clear(),this.CustomerOrderReset(),this.qryCustomerOrders(),s(!0)},c=>{l(!1)})})}}get Private(){return this.global.superdavid_Private}ForceDeleteCustomerOrderDetailByOrderId(i){if(this.CustomerOrderMS.InvoiceNo!=""&&this.CustomerOrderMS.InvoiceNo!=null&&this.CustomerOrderMS.InvoiceVoided!="1"){this.toastr.warning("\u6B64\u8A02\u55AE\u5DF2\u7D93\u958B\u767C\u7968\uFF01\u767C\u7968\u9700\u8981\u5148\u4F5C\u5EE2\u624D\u80FD\u5F37\u5236\u522A\u9664\u8A02\u55AE\uFF01\u8ACB\u5C0F\u5FC3\u64CD\u4F5C\uFF01"),alert("\u6B64\u8A02\u55AE\u5DF2\u7D93\u958B\u767C\u7968\uFF01\u767C\u7968\u9700\u8981\u5148\u4F5C\u5EE2\u624D\u80FD\u5F37\u5236\u522A\u9664\u8A02\u55AE\uFF01\u8ACB\u5C0F\u5FC3\u64CD\u4F5C\uFF01");return}var o=confirm("\u60A8\u78BA\u8A8D\u8981\u5F37\u5236\u522A\u9664\u6B64\u5BA2\u4EBA\u8A02\u55AE\u55CE\uFF1F");if(o==!0){var r=this.global.serverip+"/api/Orders/ForceDeleteOrderDetailByOrderId",a={CustomerOrderId:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.toastr.clear(),this.CustomerOrderReset(),this.qryCustomerOrders(),s(!0)},c=>{l(!1)})})}}CustomerOrderReset(){this.CustomerOrderMS=null,this.CustomerOrderDS=null,this.CustomerPaymentDS=null,this.InvoiceUrl="",this.msg=""}DownloadInvoice(i){if(!(i==null||i=="")){var o=this.global.serverip+"/api/Invoice/DownloadInvoice",r={type:"invoice",invoice_number:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear();var c=l;if(this.msg=c.msg,c.Code!="0")this.toastr.warning("\u767C\u7968\u4E0B\u8F09\u5931\u6557\uFF01");else if(c.data!=null){var m=c.data.file_url;this.InvoiceUrl=m,navigator.clipboard.writeText(m).then(()=>{this.toastr.info("\u767C\u7968\u4E0B\u8F09\u7DB2\u5740\u5DF2\u8907\u88FD\uFF0C\u8ACB\u958B\u65B0\u5206\u9801\u8CBC\u4E0A\u7DB2\u5740\u4E0B\u8F09"),this.msg="\u767C\u7968\u4E0B\u8F09\u7DB2\u5740\u5DF2\u8907\u88FD\uFF0C\u8ACB\u958B\u65B0\u5206\u9801\u8CBC\u4E0A\u7DB2\u5740\u4E0B\u8F09"}).catch(p=>{console.error("Error copying text: ",p)})}a(!0)},l=>{s(!1)})})}}InvoiceVoided(i){if(!(i==null||i=="")){alert("\u8ACB\u78BA\u8A8D\u8A72\u7B46\u4EA4\u6613\u78BA\u5BE6\u6709\u932F\u8AA4\u9700\u8981\u4F5C\u5EE2\u767C\u7968\uFF0C\u8ACB\u5C0F\u5FC3\u64CD\u4F5C");var o=confirm("\u78BA\u8A8D\u8981\u4F5C\u5EE2\u767C\u7968\u55CE\uFF1F");if(o==!0){var r=this.global.serverip+"/api/Orders/goInvoiceVoided",a={CustomerOrderId:i};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(r,a).then(c=>{this.toastr.clear();var m=c;m!=!0?(this.toastr.warning("\u767C\u7968\u4F5C\u5EE2\u5931\u6557\uFF01"),this.msg="\u767C\u7968\u4F5C\u5EE2\u5931\u6557\uFF01"):(this.msg="\u767C\u7968\u4F5C\u5EE2\u5B8C\u6210",this.CustomerOrderMS.InvoiceVoided="1",this.showCustomerOrderDS(this.CustomerOrderMS)),s(!0)},c=>{l(!1)})})}}}chkOrderVoided(i){return i==="1"?"red":"transparent"}gotoAVBill(i){var o="/mgnh/accounting";this.router.navigate([o],{queryParams:{AVBillId:i,func:"fun2"}})}qryTransportItem(){var i=this.global.serverip+"/api/ShoppingCart/qryTransportItem",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.TransportItem=s,r(!0)},s=>{a(!1)})})}chkTransportItem(i,o,r){if(r==0)return{"background-color":this.TransportItem.some(a=>a.ProductId==i)&&(o==""||o==null)?"red":"default"};if(r==1)return this.TransportItem.some(a=>a.ProductId==i)&&(o==""||o==null);if(r==2)return this.TransportItem.some(a=>a.ProductId==i)}InputTransportSN(i,o){var r=prompt("\u8ACB\u8F38\u5165\u5BC4\u9001\u8FFD\u8E64\u5E8F\u865F","");if(!(r==null||r==null)){var a=this.global.serverip+"/api/orders/updateTransportSN",s={CustomerOrderId:i,ProductId:o,TransportSN:r};return this.toastr.info("\u66F4\u65B0\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((l,c)=>{this.auth.httpDo(a,s).then(m=>{this.toastr.clear(),this.showCustomerOrderDS(this.CustomerOrderMS),this.qryCustomerOrders(),l(!0)},m=>{c(!1)})})}}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(zt))},e.\u0275cmp=_t({type:e,selectors:[["app-customer-orders"]],decls:3,vars:2,consts:[[4,"ngIf"],["class","OrderDS",3,"backgroundColor",4,"ngIf"],["colspan","5"],[3,"ngModelChange","ngModel"],["value","\u8A02\u55AE\u7DE8\u865F"],["value","\u5BA2\u4EBA\u59D3\u540D"],["value","\u5BA2\u4EBA\u96FB\u8A71"],["value","\u8A02\u55AE\u91D1\u984D"],["value","\u5546\u54C1\u7DE8\u865F"],["type","text",3,"ngModelChange","keydown.enter","ngModel"],[3,"click"],["colspan","2"],["class","StatusLight",4,"ngIf"],["class","StatusLight official",4,"ngIf"],["class","Data",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"StatusLight"],[1,"StatusLight","official"],[1,"Data",3,"click"],["style","margin-left:5px;font-size:24px;",4,"ngIf"],["class","TransportItem",3,"ngStyle",4,"ngIf"],[2,"margin-left","5px","font-size","24px"],[1,"TransportItem",3,"ngStyle"],[1,"OrderDS"],["align","center"],["align","right"],["style","background-color: orange;",3,"click",4,"ngIf"],["style","font-size:24px;",4,"ngIf"],[2,"margin-left","10px",3,"click"],["Class","Warning BigFont",4,"ngIf"],["href","javascript:void(0);",3,"click"],["class","DS2",4,"ngIf"],["class","DS3",4,"ngIf"],[2,"background-color","orange",3,"click"],[2,"font-size","24px"],["Class","Warning BigFont"],[3,"click",4,"ngIf"],["type","text",3,"ngModel","ngModelChange",4,"ngIf"],["type","text",3,"ngModelChange","ngModel"],["type","date",3,"ngModelChange","ngModel"],[1,"DS2"],[4,"ngFor","ngForOf"],[1,"DS3"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"ngClass","click",4,"ngIf"],["class","LessonDate",4,"ngFor","ngForOf"],[3,"click","ngClass"],[1,"LessonDate"]],template:function(o,r){o&1&&(d(0,"div"),E(1,n_,43,7,"table",0),u(),E(2,y_,40,30,"div",1)),o&2&&(f(),S("ngIf",r.CustomerOrderDS==null),f(),S("ngIf",r.CustomerOrderDS!=null))},dependencies:[le,Dt,Nt,Lc,Wt,Ht,jt,Rt,Vt,Lt,zt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-size:18px}button[_ngcontent-%COMP%]{font-size:15px;background-color:#e7e7e7;margin-right:15px}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:730px;height:280px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.Teacher[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#ff0;font-size:20px;height:25px}.Teacher[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#f29c2b;font-size:24px;height:25px}.LessonDate[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#aff256;font-size:20px;height:25px}.Warning[_ngcontent-%COMP%]{background-color:red;color:#fff}.BigFont[_ngcontent-%COMP%]{font-size:72px;font-weight:700}.Normal[_ngcontent-%COMP%]{background-color:inherit;color:inherit}.visibleTrue[_ngcontent-%COMP%]{display:inline}.visibleFalse[_ngcontent-%COMP%]{display:none}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.CheckoutCounter[_ngcontent-%COMP%]{font-size:24px;font-weight:700}select[_ngcontent-%COMP%]:disabled{color:#00008b;background-color:#ff0}input[_ngcontent-%COMP%]:disabled{color:#00008b;background:#ff0}.OrderDS[_ngcontent-%COMP%]{font-size:20px}.DS1[_ngcontent-%COMP%]{background-color:#caf6ca}.DS2[_ngcontent-%COMP%]{background-color:#d1edf6}.DS3[_ngcontent-%COMP%]{background-color:#fafad2}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}.official[_ngcontent-%COMP%]{background-color:red;color:#fff}.StatusLight[_ngcontent-%COMP%]{float:right;border:solid 1px black;font-size:24px;margin:5px;padding:5px}.ModifyLink[_ngcontent-%COMP%]{background-color:#90ee90;cursor:pointer}.TransportItem[_ngcontent-%COMP%]{display:block;float:left}.blink[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1s infinite}.blink[_ngcontent-%COMP%]:hover{cursor:pointer}@keyframes _ngcontent-%COMP%_blink{0%{color:red}50%{color:#fff}to{color:red}0%{background-color:#fff}50%{background-color:red}to{background-color:#fff}}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}']});let n=e;return n})();function v_(n,e){if(n&1){let t=O();d(0,"tr",3),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.editUser(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),u(),d(11,"td"),h(12),u(),d(13,"td"),h(14),u()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.Cname),f(2),T(t.Tel),f(2),T(t.Email),f(2),T(t.Lineid),f(2),T(t.Fbname),f(2),T(t.Address)}}function I_(n,e){if(n&1){let t=O();d(0,"div")(1,"table")(2,"thead")(3,"tr")(4,"td",2)(5,"button",3),P("click",function(){b(t);let o=x();return y(o.NewUser())}),h(6,"\u65B0\u589E\u6703\u54E1"),u(),h(7," \u67E5\u8A62\u7A2E\u985E\uFF1A"),d(8,"select",4),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryType,o)||(r.qryType=o),y(o)}),d(9,"option",5),h(10,"\u6703\u54E1\u59D3\u540D"),u(),d(11,"option",6),h(12,"\u6703\u54E1\u96FB\u8A71"),u()(),d(13,"input",7),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryString,o)||(r.qryString=o),y(o)}),P("keydown.enter",function(){b(t);let o=x();return y(o.qryCustomers())}),u(),d(14,"button",3),P("click",function(){b(t);let o=x();return y(o.qryCustomers())}),h(15,"\u67E5\u8A62"),u()()(),d(16,"tr")(17,"td"),h(18,"\u9805\u6B21"),u(),d(19,"td"),h(20,"\u6703\u54E1\u59D3\u540D"),u(),d(21,"td"),h(22,"\u6703\u54E1\u96FB\u8A71"),u(),d(23,"td"),h(24,"email"),u(),d(25,"td"),h(26,"LineId"),u(),d(27,"td"),h(28,"\u81C9\u66F8\u540D\u7A31"),u(),d(29,"td"),h(30,"\u90F5\u5BC4\u5730\u5740"),u()()(),d(31,"tbody"),E(32,v_,15,7,"tr",8),u()()()}if(n&2){let t=x();f(8),B("ngModel",t.qryType),f(5),B("ngModel",t.qryString),f(19),S("ngForOf",t.Customers)}}function P_(n,e){n&1&&F(0,"span",19)}function M_(n,e){n&1&&F(0,"img",20)}function w_(n,e){n&1&&F(0,"img",21)}function T_(n,e){n&1&&F(0,"span",19)}function A_(n,e){n&1&&F(0,"img",20)}function D_(n,e){n&1&&F(0,"img",21)}function k_(n,e){if(n&1){let t=O();d(0,"button",22),P("click",function(){b(t);let o=x(2);return y(o.deleteUserProfileByRowId())}),h(1,"\u522A\u9664\u6703\u54E1"),u()}}function O_(n,e){if(n&1){let t=O();d(0,"div",9)(1,"span"),h(2,"\u6703\u54E1\u7DE8\u865F\uFF1A"),d(3,"input",10),V("ngModelChange",function(o){b(t);let r=x();return N(r.UserId,o)||(r.UserId=o),y(o)}),u()(),F(4,"br"),d(5,"span"),h(6,"\u6703\u54E1\u59D3\u540D\uFF1A"),d(7,"input",11),V("ngModelChange",function(o){b(t);let r=x();return N(r.Cname,o)||(r.Cname=o),y(o)}),u()(),d(8,"span",12),h(9,"*"),u(),F(10,"br"),d(11,"span"),h(12,"\u96FB\u8A71\uFF1A"),d(13,"input",13),V("ngModelChange",function(o){b(t);let r=x();return N(r.Tel,o)||(r.Tel=o),y(o)}),P("keyup",function(){b(t);let o=x();return y(o.chkTel())}),u()(),d(14,"span",12),h(15,"*"),u(),F(16,"br"),E(17,P_,1,0,"span",14)(18,M_,1,0,"img",15)(19,w_,1,0,"img",16),d(20,"span"),h(21,"Email\uFF1A"),d(22,"input",13),V("ngModelChange",function(o){b(t);let r=x();return N(r.Email,o)||(r.Email=o),y(o)}),P("keyup",function(){b(t);let o=x();return y(o.chkEmail())}),u()(),F(23,"br"),E(24,T_,1,0,"span",14)(25,A_,1,0,"img",15)(26,D_,1,0,"img",16),d(27,"span"),h(28,"Lineid\uFF1A"),d(29,"input",11),V("ngModelChange",function(o){b(t);let r=x();return N(r.Lineid,o)||(r.Lineid=o),y(o)}),u()(),F(30,"br"),d(31,"span"),h(32,"\u81C9\u66F8\u540D\u7A31\uFF1A"),d(33,"input",11),V("ngModelChange",function(o){b(t);let r=x();return N(r.Fbname,o)||(r.Fbname=o),y(o)}),u()(),F(34,"br"),d(35,"span"),h(36,"\u90F5\u5BC4\u5730\u5740\uFF1A"),d(37,"input",11),V("ngModelChange",function(o){b(t);let r=x();return N(r.Address,o)||(r.Address=o),y(o)}),u()(),F(38,"br")(39,"br"),E(40,k_,2,0,"button",17),d(41,"button",3),P("click",function(){b(t);let o=x();return y(o.resetUser())}),h(42,"\u53D6\u6D88\u4FEE\u6539"),u(),d(43,"button",3),P("click",function(){b(t);let o=x();return y(o.UserProfileUpdateByUserId())}),h(44,"\u78BA\u5B9A\u5B58\u6A94"),u(),d(45,"p",18)(46,"span",12),h(47,"* \u70BA\u5FC5\u9808\u586B\u5BEB\u8CC7\u6599"),u()()()}if(n&2){let t=x();f(3),B("ngModel",t.UserId),f(4),B("ngModel",t.Cname),f(6),B("ngModel",t.Tel),f(4),S("ngIf",!(t.Tel!=""&&t.TelOK||t.Tel!=""&&!t.TelOK)),f(),S("ngIf",t.Tel!=""&&t.TelOK),f(),S("ngIf",t.Tel!=""&&!t.TelOK),f(3),B("ngModel",t.Email),f(2),S("ngIf",!(t.Email!=""&&t.EmailOK||t.Email!=""&&!t.EmailOK)),f(),S("ngIf",t.Email!=""&&t.EmailOK),f(),S("ngIf",t.Email!=""&&!t.EmailOK),f(3),B("ngModel",t.Lineid),f(4),B("ngModel",t.Fbname),f(4),B("ngModel",t.Address),f(3),S("ngIf",t.UserCanBeDelete)}}var od=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.datePipe=s,this.qryType="\u96FB\u8A71",this.qryString="",this.RowId="",this.UserId="",this.Cname="",this.Tel="",this.UserName="",this.Password="",this.Email="",this.Lineid="",this.Fbname="",this.Address="",this.EditUser=0,this.UserNameOK=!1,this.EmailOK=!1,this.TelOK=!1,this.UserProfile=null,this.UserCanBeDelete=!1}ngOnInit(){this.resetUser()}qryCustomers(){var i=this.global.serverip+"/api/Users/qryUsers",o={qryType:this.qryType,qryString:this.qryString};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Customers=s,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),r(!0)},s=>{a(!1)})})}editUser(i){this.EditUser=1,this.EmailOK=!0,this.TelOK=!0,this.UserNameOK=!0,this.RowId=i.Id,this.UserId=i.UserId,this.Cname=i.Cname,this.Tel=i.Tel,this.Email=i.Email!=null?i.Email:"",this.Lineid=i.Lineid!=null?i.Lineid:"",this.Fbname=i.Fbname!=null?i.Fbname:"",this.Address=i.Address,this.UserCanBeDelete=!1,this.ChkIfUserCanBeDelete()}resetUser(){this.EditUser=0,this.EmailOK=!1,this.TelOK=!1,this.UserNameOK=!1,this.UserId="",this.Cname="",this.Tel="",this.UserName="",this.Email="",this.Lineid="",this.Fbname="",this.Address=""}NewUser(){this.EditUser=1}chkTel(){var i=this.global.serverip+"/api/Users/chkTelWithUserId",o={UserId:this.UserId,Tel:this.Tel};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{s==!0?this.TelOK=!0:this.TelOK=!1,r(!0)},s=>{a(!1)})})}chkEmail(){var i=this.global.serverip+"/api/Users/chkEmailWithUserId",o={UserId:this.UserId,Email:this.Email};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{s==!0?this.EmailOK=!0:this.EmailOK=!1,r(!0)},s=>{a(!1)})})}UserProfileUpdateByUserId(){var i=this.global.serverip+"/api/Users/UserProfileUpdateByUserId";if(!(this.Cname==""||this.Cname==null||this.Cname==null)&&!(this.Tel==""||this.TelOK==!1)){var o={UserId:this.UserId,Email:this.Email,CName:this.Cname,Tel:this.Tel,Address:this.Address,LineId:this.Lineid,FBName:this.Fbname};return this.toastr.info("\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{s==!0?(this.toastr.info("\u4F7F\u7528\u8005\u5B58\u6A94\u6210\u529F"),this.qryCustomers(),this.resetUser()):this.toastr.warning("\u932F\u8AA4\uFF01\u8ACB\u91CD\u8A66..."),r(!0)},s=>{a(!1)})})}}ChkIfUserCanBeDelete(){var i=this.global.serverip+"/api/Users/ChkIfUserCanBeDelete",o={UserId:this.UserId};return this.toastr.info("\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.UserCanBeDelete=s,r(!0)},s=>{a(!1)})})}deleteUserProfileByRowId(){var i=confirm("\u60A8\u78BA\u5B9A\u8981\u522A\u9664\u9019\u7B46\u6703\u54E1\u57FA\u672C\u8CC7\u6599\u55CE\uFF1F");if(i==!0){var o=this.global.serverip+"/api/Users/deleteUserProfileByRowId",r={id:this.RowId};return this.toastr.info("\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{l==!0?(this.toastr.info("\u6703\u54E1\u8CC7\u6599\u522A\u9664\u6210\u529F"),this.qryCustomers(),this.EditUser=0):this.toastr.warning("\u932F\u8AA4\uFF01\u8ACB\u91CD\u8A66..."),a(!0)},l=>{s(!1)})})}}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(zt))},e.\u0275cmp=_t({type:e,selectors:[["app-customer-management"]],decls:2,vars:2,consts:[[4,"ngIf"],["class","xy-center",4,"ngIf"],["colspan","8"],[3,"click"],[3,"ngModelChange","ngModel"],["value","\u59D3\u540D"],["value","\u96FB\u8A71"],["type","text",3,"ngModelChange","keydown.enter","ngModel"],[3,"click",4,"ngFor","ngForOf"],[1,"xy-center"],["type","text","disabled","",1,"TextEdit",3,"ngModelChange","ngModel"],["type","text",1,"TextEdit",3,"ngModelChange","ngModel"],[1,"mustfill"],["type","text",1,"TextEdit",2,"width","500px",3,"ngModelChange","keyup","ngModel"],["style","display:inline-block;width:18px;",4,"ngIf"],["style","width:18px;","src","./assets/images/OK.png",4,"ngIf"],["style","width:18px","src","./assets/images/Not_OK.png",4,"ngIf"],["class","font-medium margin-right-10","style","background-color: orange;",3,"click",4,"ngIf"],["align","left"],[2,"display","inline-block","width","18px"],["src","./assets/images/OK.png",2,"width","18px"],["src","./assets/images/Not_OK.png",2,"width","18px"],[1,"font-medium","margin-right-10",2,"background-color","orange",3,"click"]],template:function(o,r){o&1&&E(0,I_,33,3,"div",0)(1,O_,48,14,"div",1),o&2&&(S("ngIf",r.EditUser==0),f(),S("ngIf",r.EditUser==1))},dependencies:[Dt,Nt,Wt,Ht,jt,Rt,Vt,Lt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.TextEdit[_ngcontent-%COMP%]{width:500px}.xy-center[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{float:right}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-size:18px}button[_ngcontent-%COMP%]{font-size:15px;background-color:#e7e7e7;margin-right:15px}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:730px;height:280px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.Teacher[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#ff0;font-size:20px;height:25px}.Teacher[_ngcontent-%COMP%]:hover{display:inline-block;margin-right:10px;margin-top:10px;background-color:#f29c2b;font-size:24px;height:25px}.LessonDate[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#aff256;font-size:20px;height:25px}.Warning[_ngcontent-%COMP%]{background-color:red;color:#fff}.BigFont[_ngcontent-%COMP%]{font-size:72px;font-weight:700}.Normal[_ngcontent-%COMP%]{background-color:inherit;color:inherit}.visibleTrue[_ngcontent-%COMP%]{display:inline}.visibleFalse[_ngcontent-%COMP%]{display:none}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.CheckoutCounter[_ngcontent-%COMP%]{font-size:24px;font-weight:700}select[_ngcontent-%COMP%]:disabled{color:#00008b;background-color:#ff0}.OrderDS[_ngcontent-%COMP%]{font-size:20px}.DS1[_ngcontent-%COMP%]{background-color:#caf6ca}.DS2[_ngcontent-%COMP%]{background-color:#d1edf6}.DS3[_ngcontent-%COMP%]{background-color:#fafad2}.margin-left-10[_ngcontent-%COMP%]{margin-left:10px}.margin-right-10[_ngcontent-%COMP%]{margin-right:10px}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}']});let n=e;return n})();var E_=()=>["/mgnh/finance/financereport"],rd=(()=>{let e=class e{constructor(){}ngOnInit(){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=_t({type:e,selectors:[["app-finance"]],decls:6,vars:2,consts:[[1,"navbar"],[1,"container-mgnh"],[1,"menu"],[3,"routerLink"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),h(5,"\u8CA1\u52D9\u5831\u8868"),u()()()()()),o&2&&(f(4),S("routerLink",qt(1,E_)))},dependencies:[Sn],styles:[".navbar[_ngcontent-%COMP%]{background-color:#fff;height:50px;margin-top:5px}.container-mgnh[_ngcontent-%COMP%]{width:100%;margin:0 auto}.logo[_ngcontent-%COMP%]{display:inline;margin-left:100px}.logo[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#0a8cbf;margin-top:1em;margin-bottom:1em;text-decoration:none;line-height:50px;font-size:24px}.logo[_ngcontent-%COMP%] .fa-music[_ngcontent-%COMP%]{color:#0a8cbf;margin-right:1em}.menu[_ngcontent-%COMP%]{float:left;margin-top:0}.menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;list-style:none}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;margin-right:0;color:#0a8cbf;text-decoration:none;line-height:50px;padding:0 1em}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background-color:#0a8cbf;color:#fff}"]});let n=e;return n})();var F_=()=>["/mgnh/finance/financereport/rpt1"],ad=(()=>{let e=class e{constructor(){}ngOnInit(){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=_t({type:e,selectors:[["app-finance-report"]],decls:6,vars:2,consts:[[1,"navbar"],[1,"container-mgnh"],[1,"menu"],[3,"routerLink"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),h(5,"\u8AB2\u7A0B\u8CA1\u52D9\u5206\u6790\u8868"),u()()()()()),o&2&&(f(4),S("routerLink",qt(1,F_)))},dependencies:[Sn],styles:[".navbar[_ngcontent-%COMP%]{background-color:#fff;height:50px;margin-top:5px}.container-mgnh[_ngcontent-%COMP%]{width:100%;margin:0 auto}.logo[_ngcontent-%COMP%]{display:inline;margin-left:100px}.logo[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#0a8cbf;margin-top:1em;margin-bottom:1em;text-decoration:none;line-height:50px;font-size:24px}.logo[_ngcontent-%COMP%] .fa-music[_ngcontent-%COMP%]{color:#0a8cbf;margin-right:1em}.menu[_ngcontent-%COMP%]{float:left;margin-top:0}.menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;list-style:none}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;margin-right:0;color:#0a8cbf;text-decoration:none;line-height:50px;padding:0 1em}.menu[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background-color:#0a8cbf;color:#fff}"]});let n=e;return n})();function B_(n,e){if(n&1&&(d(0,"option",12),h(1),u()),n&2){let t=e.$implicit;$t("value",t.UserProfileId),f(),T(t.CName)}}function N_(n,e){if(n&1){let t=O();d(0,"select",10),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.qryString,o)||(r.qryString=o),y(o)}),F(1,"option"),E(2,B_,2,2,"option",11),u()}if(n&2){let t=x(2);B("ngModel",t.qryString),f(2),S("ngForOf",t.Teachers)}}function V_(n,e){if(n&1&&(d(0,"option",12),h(1),u()),n&2){let t=e.$implicit;$t("value",t.DepartmentId),f(),T(t.DepartmentName)}}function L_(n,e){if(n&1){let t=O();d(0,"select",10),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.qryString,o)||(r.qryString=o),y(o)}),F(1,"option"),E(2,V_,2,2,"option",11),u()}if(n&2){let t=x(2);B("ngModel",t.qryString),f(2),S("ngForOf",t.Departments)}}function R_(n,e){if(n&1&&(d(0,"span",15),h(1),u()),n&2){let t=e.$implicit;f(),T(t.UserCName)}}function W_(n,e){if(n&1){let t=O();d(0,"tr",13),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.showRpt1(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),E(10,R_,2,1,"span",14),u(),d(11,"td"),h(12),u()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.DepartmentName),f(2),T(t.ProductId),f(2),T(t.ProdName),f(2),S("ngForOf",t.Teachers),f(2),T(t.QtyOfLessons)}}function H_(n,e){if(n&1){let t=O();d(0,"div")(1,"table")(2,"thead")(3,"tr")(4,"td",2)(5,"h1",3),h(6,"\u5206\u6790\u8868"),u(),h(7," \u67E5\u8A62\u7A2E\u985E\uFF1A"),d(8,"select",4),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryType,o)||(r.qryType=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.qryString="")}),d(9,"option",5),h(10,"\u958B\u8AB2\u8001\u5E2B"),u(),d(11,"option",6),h(12,"\u958B\u8AB2\u90E8\u9580"),u()(),E(13,N_,3,2,"select",7)(14,L_,3,2,"select",7),d(15,"button",8),P("click",function(){b(t);let o=x();return y(o.qryCourseMS())}),h(16,"\u67E5\u8A62"),u()()(),d(17,"tr")(18,"td"),h(19,"\u9805\u6B21"),u(),d(20,"td"),h(21,"\u958B\u8AB2\u90E8\u9580"),u(),d(22,"td"),h(23,"\u8AB2\u7A0B\u7DE8\u865F"),u(),d(24,"td"),h(25,"\u8AB2\u7A0B\u540D\u7A31"),u(),d(26,"td"),h(27,"\u5E36\u9818\u8001\u5E2B"),u(),d(28,"td"),h(29,"\u8AB2\u7A0B\u6B21\u6578"),u()()(),d(30,"tbody"),E(31,W_,13,6,"tr",9),u()()()}if(n&2){let t=x();f(8),B("ngModel",t.qryType),f(5),S("ngIf",t.qryType=="\u958B\u8AB2\u8001\u5E2B"),f(),S("ngIf",t.qryType=="\u958B\u8AB2\u90E8\u9580"),f(17),S("ngForOf",t.Products)}}function G_(n,e){if(n&1){let t=O();d(0,"p",3)(1,"a",25),P("click",function(){b(t);let o=x(2);return y(o.gotoBefore())}),h(2,"\u524D\u4E00\u500B\u6708"),u(),d(3,"a",25),P("click",function(){b(t);let o=x(2);return y(o.gotoNow())}),h(4,"\u56DE\u5230\u7576\u6708"),u(),d(5,"a",25),P("click",function(){b(t);let o=x(2);return y(o.gotoAfter())}),h(6,"\u4E0B\u4E00\u500B\u6708"),u()()}}function Y_(n,e){if(n&1){let t=O();d(0,"p",26)(1,"button",8),P("click",function(){b(t);let o=x(2);return y(o.goPrint())}),h(2,"\u5217\u5370"),u(),d(3,"button",8),P("click",function(){b(t);let o=x(2);return y(o.closeRpt1())}),h(4,"\u95DC\u9589\u5206\u6790\u8868"),u()()}}function U_(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),ee(7,"date"),u(),d(8,"td"),h(9),u(),d(10,"td"),h(11),u(),d(12,"td"),h(13),u()()),n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.CName),f(2),T(ne(7,6,t.Date,"yyyy-MM-dd")),f(3),T(t.Amount),f(2),T(t.MaterialCost),f(2),T(t.note)}}function q_(n,e){if(n&1&&(d(0,"tr")(1,"td",24),h(2),u(),d(3,"td",24),h(4),u()()),n&2){let t=x(2);f(2),vt("\u56FA\u5B9A\u8CBB\u7528\uFF1A",t.Rpt1MS.FixedCostName,""),f(2),T(t.Rpt1MS.FixedCostAmount)}}function z_(n,e){if(n&1&&(d(0,"tr")(1,"td",24),h(2),u(),d(3,"td",24),h(4),u()()),n&2){let t=e.$implicit,i=x(2);f(2),vt("\u8AB2\u7A0B\u8B1B\u5E2B ",t.UserCName," \u5BE6\u9818"),f(2),Fc("(",i.Rpt1MS.TotalProfit," * ",i.Rpt1MS.ProfitRatio,"\uFF05 + ",i.Rpt1MS.StaffOnlyAmount,") X ",t.ProfitRatio,"\uFF05 = ",(i.Rpt1MS.TotalProfit*(i.Rpt1MS.ProfitRatio/100)+i.Rpt1MS.StaffOnlyAmount)*(t.ProfitRatio/100),"")}}function j_(n,e){if(n&1){let t=O();d(0,"div",16)(1,"h1",3),h(2),u(),E(3,G_,7,0,"p",17)(4,Y_,5,0,"p",18),d(5,"table",8),P("click",function(){b(t);let o=x();return y(o.localprint=0)}),d(6,"tr")(7,"td",19),h(8,"\u9805\u6B21"),u(),d(9,"td",20),h(10,"\u59D3\u540D"),u(),d(11,"td",21),h(12,"\u8AB2\u7A0B\u65E5\u671F"),u(),d(13,"td",22),h(14,"\u91D1\u984D"),u(),d(15,"td",22),h(16,"\u6750\u6599\u8CBB"),u(),d(17,"td",22),h(18,"\u5099\u8A3B"),u()(),E(19,U_,14,9,"tr",23)(20,q_,5,2,"tr",0),d(21,"tr")(22,"td",24),h(23,"\u5408\u8A08"),u(),d(24,"td",24),h(25),u()(),E(26,z_,5,6,"tr",23),d(27,"tr")(28,"td",24),h(29,"\u516C\u53F8\u5229\u6F64"),u(),d(30,"td",24),h(31),u()()()()}if(n&2){let t=x();f(2),me("",t.Rpt1MS.ProductName,"\u5206\u6790\u8868 ",t.Year,"-",t.Month,""),f(),S("ngIf",t.localprint==0),f(),S("ngIf",t.localprint==0),f(15),S("ngForOf",t.Rpt1DS),f(),S("ngIf",t.Rpt1MS.FixedCostAmount!=0),f(5),Un("",t.Rpt1MS.AmountWithTax," - ",t.Rpt1MS.MaterialCost," - ",t.Rpt1MS.FixedCostAmount," = ",t.Rpt1MS.TotalProfit,""),f(),S("ngForOf",t.Rpt1MS.Teachers),f(5),me("",t.Rpt1MS.TotalProfit," X ",1-t.Rpt1MS.ProfitRatio/100,"\uFF05 = ",t.Rpt1MS.TotalProfit*(1-t.Rpt1MS.ProfitRatio/100),"")}}var sd=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.route=s,this.qryType="\u958B\u8AB2\u8001\u5E2B",this.qryString="",this.DepartmentName="",this.CourseName="",this.localprint=0}get print(){return this.global.print}ngOnInit(){this.tDate=new Date,this.Year=new Date().getFullYear(),this.Month=new Date().getMonth()+1,this.qryDepartments(),this.qryTeachers()}qryDepartments(){var i=this.global.serverip+"/api/Product/qryDepartments",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Departments=s,r(!0)},s=>{a(!1)})})}qryTeachers(){var i=this.global.serverip+"/api/Product/qryTeachers",o={};return new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Teachers=s,r(!0)},s=>{a(!1)})})}qryCourseMS(){var i=this.global.serverip+"/api/Product/qryCourse",o={Department:this.qryString,TeacherUserProfileId:this.qryString};return this.qryType=="\u958B\u8AB2\u8001\u5E2B"?o={Department:"",TeacherUserProfileId:this.qryString}:o={Department:this.qryString,TeacherUserProfileId:""},this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D"),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u8AB2\u7A0B\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),this.Products=s,r(!0)},s=>{a(!1)})})}showRpt1(i){this.global.print=1,this.CourseMS=i,this.qryFinanceRpt1()}closeRpt1(){this.global.print=0,this.CourseMS=null,this.localprint=0}qryFinanceRpt1(){var i=this.global.serverip+"/api/Finance/qryRpt1",o={ProductId:this.CourseMS.ProductId,Year:this.Year,Month:this.Month};return this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D"),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.toastr.info("\u8AB2\u7A0B\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"),this.Rpt1=s,this.Rpt1MS=this.Rpt1.Rpt1MS,this.Rpt1DS=this.Rpt1.Rpt1DS,r(!0)},s=>{a(!1)})})}gotoBefore(){this.tDate.setMonth(this.tDate.getMonth()-1),this.Year=this.tDate.getFullYear(),this.Month=this.tDate.getMonth()+1==0?1:this.tDate.getMonth()+1,this.qryFinanceRpt1()}gotoNow(){this.tDate=new Date,this.Year=new Date().getFullYear(),this.Month=new Date().getMonth()+1,this.qryFinanceRpt1()}gotoAfter(){this.tDate.setMonth(this.tDate.getMonth()+1),this.Year=this.tDate.getFullYear(),this.Month=this.tDate.getMonth()+1==0?1:this.tDate.getMonth()+1,this.qryFinanceRpt1()}goPrint(){this.localprint=1,setTimeout(()=>{window.print()},1e3)}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(Me))},e.\u0275cmp=_t({type:e,selectors:[["app-finance-rpt1"]],decls:2,vars:2,consts:[[4,"ngIf"],["class","CourseMS",4,"ngIf"],["colspan","8"],["align","center"],[3,"ngModelChange","change","ngModel"],["value","\u958B\u8AB2\u8001\u5E2B"],["value","\u958B\u8AB2\u90E8\u9580"],[3,"ngModel","ngModelChange",4,"ngIf"],[3,"click"],["class","Data",3,"click",4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"Data",3,"click"],["class","Teacher",4,"ngFor","ngForOf"],[1,"Teacher"],[1,"CourseMS"],["align","center",4,"ngIf"],["align","right",4,"ngIf"],[2,"width","5%"],[2,"width","10%"],[2,"width","25%"],[2,"width","20%"],[4,"ngFor","ngForOf"],["colspan","3"],["href","javascript:void(0);",1,"nav",3,"click"],["align","right"]],template:function(o,r){o&1&&E(0,H_,32,4,"div",0)(1,j_,32,15,"div",1),o&2&&(S("ngIf",r.CourseMS==null),f(),S("ngIf",r.CourseMS!=null))},dependencies:[Dt,Nt,Wt,Ht,Rt,Vt,Lt,zt],styles:['@charset "UTF-8";.tableContainer[_ngcontent-%COMP%]{width:99.8%;border:1px solid rgb(127,127,127);overflow:auto}.tableContainerFull[_ngcontent-%COMP%]{height:90%}.tableContainerTop[_ngcontent-%COMP%]{height:30%}.tableContainerBottom[_ngcontent-%COMP%]{height:57%}.tableTotalList[_ngcontent-%COMP%]{background-color:#f3f7f6}.tableEdit[_ngcontent-%COMP%]{background-color:#ecfaec}table[_ngcontent-%COMP%]{width:100%}thead[_ngcontent-%COMP%]{position:sticky;top:0;background-color:#add8e6}th[_ngcontent-%COMP%]{background-color:#c9f9f8}td[_ngcontent-%COMP%]{width:60px;vertical-align:top}tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid rgb(191,191,191);border-collapse:collapse}.qryData[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.qryData[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;margin-right:20px}.qryData[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-size:18px}button[_ngcontent-%COMP%]{font-size:15px;background-color:#e7e7e7;margin-right:15px}.qryData[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100px}.qryData[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{float:left}.ProductDetail[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:30%}.ProductDetail[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:240px}.ProductDetail[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:730px;height:280px;overflow-x:auto;font-size:16px}.Data[_ngcontent-%COMP%]:hover{background-color:#ff0}.PictureBox[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:scroll;border:red 2px solid}.Picture[_ngcontent-%COMP%]{width:400px;flex-shrink:0;height:100%;border:yellow 5px solid}.Teacher[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#ff0;font-size:20px;height:25px}.LessonDate[_ngcontent-%COMP%]{display:inline-block;margin-right:10px;margin-top:10px;background-color:#aff256;font-size:20px;height:25px}.Warning[_ngcontent-%COMP%]{background-color:red;color:#fff}.BigFont[_ngcontent-%COMP%]{font-size:72px;font-weight:700}.Normal[_ngcontent-%COMP%]{background-color:inherit;color:inherit}.visibleTrue[_ngcontent-%COMP%]{display:inline}.visibleFalse[_ngcontent-%COMP%]{display:none}.nav[_ngcontent-%COMP%]{margin-left:20px}.slider_container[_ngcontent-%COMP%]{margin:30px auto;width:400px;height:280px;position:relative;border:20px solid;border-color:#fff;border-bottom-width:100px;background-color:#f5f5f5;box-shadow:#666 0 0 5px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;opacity:0;filter:alpha(opacity=0)}.slider_container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;max-height:280px}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_round 25s linear infinite;animation:_ngcontent-%COMP%_round 25s linear infinite}@-webkit-keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}@keyframes _ngcontent-%COMP%_round{4%{opacity:1;filter:alpha(opacity=100)}20%{opacity:1;filter:alpha(opacity=100)}24%{opacity:0;filter:alpha(opacity=0)}}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:5s;animation-delay:5s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:10s;animation-delay:10s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:15s;animation-delay:15s}.slider_container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:20s;animation-delay:20s}.slider_container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;background:#fff;position:absolute;left:0%;top:280px;width:400px;height:100px;font-size:30px;text-align:center;line-height:100px;-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.slider_container[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{width:100%;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.slider_container[_ngcontent-%COMP%]:hover div[_ngcontent-%COMP%]{-webkit-animation-play-state:paused;animation-play-state:paused}.span-block[_ngcontent-%COMP%]{display:block}.CheckoutCounter[_ngcontent-%COMP%]{font-size:24px;font-weight:700}select[_ngcontent-%COMP%]:disabled{color:#00008b;background-color:#ff0}input[_ngcontent-%COMP%]:disabled{color:#00008b;background:#ff0}.CourseMS[_ngcontent-%COMP%]{font-size:20px}.DS1[_ngcontent-%COMP%]{background-color:#caf6ca}.DS2[_ngcontent-%COMP%]{background-color:#d1edf6}.DS3[_ngcontent-%COMP%]{background-color:#fafad2}.mySlides[_ngcontent-%COMP%]{display:none}img[_ngcontent-%COMP%]{vertical-align:middle}.slideshow-container[_ngcontent-%COMP%]{max-width:600px;position:relative;margin:auto}.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:50%;width:auto;padding:16px;margin-top:-22px;color:#fff;font-weight:700;font-size:18px;transition:.6s ease;border-radius:0 3px 3px 0;-webkit-user-select:none;user-select:none}.next[_ngcontent-%COMP%]{right:0;border-radius:3px 0 0 3px}.prev[_ngcontent-%COMP%]:hover, .next[_ngcontent-%COMP%]:hover{background-color:#000c}.text[_ngcontent-%COMP%]{color:#f2f2f2;font-size:15px;padding:8px 12px;position:absolute;bottom:8px;width:100%;text-align:center}.numbertext[_ngcontent-%COMP%]{color:#f2f2f2;font-size:12px;padding:8px 12px;position:absolute;top:0}.dot[_ngcontent-%COMP%]{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color .6s ease}.active[_ngcontent-%COMP%], .dot[_ngcontent-%COMP%]:hover{background-color:#717171}.fade[_ngcontent-%COMP%]{-webkit-animation-name:_ngcontent-%COMP%_fade;-webkit-animation-duration:1.5s;animation-name:_ngcontent-%COMP%_fade;animation-duration:1.5s}@-webkit-keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@keyframes _ngcontent-%COMP%_fade{0%{opacity:.4}to{opacity:1}}@media only screen and (max-width: 300px){.prev[_ngcontent-%COMP%], .next[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{font-size:11px}}']});let n=e;return n})();function He(){}var Ps=function(){let n=0;return function(){return n++}}();function ht(n){return n===null||typeof n>"u"}function pt(n){if(Array.isArray&&Array.isArray(n))return!0;let e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function st(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}var Et=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function _e(n,e){return Et(n)?n:e}function tt(n,e){return typeof n>"u"?e:n}var Ms=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Sr=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function St(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function yt(n,e,t,i){let o,r,a;if(pt(n))if(r=n.length,i)for(o=r-1;o>=0;o--)e.call(t,n[o],o);else for(o=0;o<r;o++)e.call(t,n[o],o);else if(st(n))for(a=Object.keys(n),r=a.length,o=0;o<r;o++)e.call(t,n[a[o]],a[o])}function ki(n,e){let t,i,o,r;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(o=n[t],r=e[t],o.datasetIndex!==r.datasetIndex||o.index!==r.index)return!1;return!0}function _o(n){if(pt(n))return n.map(_o);if(st(n)){let e=Object.create(null),t=Object.keys(n),i=t.length,o=0;for(;o<i;++o)e[t[o]]=_o(n[t[o]]);return e}return n}function bd(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function yd(n,e,t,i){if(!bd(n))return;let o=e[n],r=t[n];st(o)&&st(r)?ke(o,r,i):e[n]=_o(r)}function ke(n,e,t){let i=pt(e)?e:[e],o=i.length;if(!st(n))return n;t=t||{};let r=t.merger||yd;for(let a=0;a<o;++a){if(e=i[a],!st(e))continue;let s=Object.keys(e);for(let l=0,c=s.length;l<c;++l)r(s[l],n,e,t)}return n}function Kn(n,e){return ke(n,e,{merger:vd})}function vd(n,e,t){if(!bd(n))return;let i=e[n],o=t[n];st(i)&&st(o)?Kn(i,o):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=_o(o))}var ld={"":n=>n,x:n=>n.x,y:n=>n.y};function je(n,e){return(ld[e]||(ld[e]=K_(e)))(n)}function K_(n){let e=Id(n);return t=>{for(let i of e){if(i==="")break;t=t&&t[i]}return t}}function Id(n){let e=n.split("."),t=[],i="";for(let o of e)i+=o,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function xo(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Gt=n=>typeof n<"u",oe=n=>typeof n=="function",br=(n,e)=>{if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0};function ws(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}var mt=Math.PI,xt=2*mt,Pd=xt+mt,Co=Number.POSITIVE_INFINITY,So=mt/180,It=mt/2,De=mt/4,Ti=mt*2/3,Ce=Math.log10,Oe=Math.sign;function yr(n){let e=Math.round(n);n=Xn(n,e,n/1e3)?e:n;let t=Math.pow(10,Math.floor(Ce(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Ts(n){let e=[],t=Math.sqrt(n),i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((o,r)=>o-r).pop(),e}function Ge(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Xn(n,e,t){return Math.abs(n-e)<t}function As(n,e){let t=Math.round(n);return t-e<=n&&t+e>=n}function vr(n,e,t){let i,o,r;for(i=0,o=n.length;i<o;i++)r=n[i][t],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Yt(n){return n*(mt/180)}function Qn(n){return n*(180/mt)}function Ir(n){if(!Et(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function Pr(n,e){let t=e.x-n.x,i=e.y-n.y,o=Math.sqrt(t*t+i*i),r=Math.atan2(i,t);return r<-.5*mt&&(r+=xt),{angle:r,distance:o}}function cn(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Md(n,e){return(n-e+Pd)%xt-mt}function pe(n){return(n%xt+xt)%xt}function $n(n,e,t,i){let o=pe(n),r=pe(e),a=pe(t),s=pe(r-o),l=pe(a-o),c=pe(o-r),m=pe(o-a);return o===r||o===a||i&&r===a||s>l&&c<m}function Jt(n,e,t){return Math.max(e,Math.min(t,n))}function Ds(n){return Jt(n,-32768,32767)}function Ye(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function bo(n,e,t){t=t||(a=>n[a]<e);let i=n.length-1,o=0,r;for(;i-o>1;)r=o+i>>1,t(r)?o=r:i=r;return{lo:o,hi:i}}var We=(n,e,t,i)=>bo(n,t,i?o=>n[o][e]<=t:o=>n[o][e]<t),ks=(n,e,t)=>bo(n,t,i=>n[i][e]>=t);function Os(n,e,t){let i=0,o=n.length;for(;i<o&&n[i]<e;)i++;for(;o>i&&n[o-1]>t;)o--;return i>0||o<n.length?n.slice(i,o):n}var wd=["push","pop","shift","splice","unshift"];function Es(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),wd.forEach(t=>{let i="_onData"+xo(t),o=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...r){let a=o.apply(this,r);return n._chartjs.listeners.forEach(s=>{typeof s[i]=="function"&&s[i](...r)}),a}})})}function Mr(n,e){let t=n._chartjs;if(!t)return;let i=t.listeners,o=i.indexOf(e);o!==-1&&i.splice(o,1),!(i.length>0)&&(wd.forEach(r=>{delete n[r]}),delete n._chartjs)}function wr(n){let e=new Set,t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}var Tr=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Ar(n,e,t){let i=t||(a=>Array.prototype.slice.call(a)),o=!1,r=[];return function(...a){r=i(a),o||(o=!0,Tr.call(window,()=>{o=!1,n.apply(e,r)}))}}function Fs(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}var yo=n=>n==="start"?"left":n==="end"?"right":"center",ie=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2,Bs=(n,e,t,i)=>n===(i?"left":"right")?t:n==="center"?(e+t)/2:e;function Dr(n,e,t){let i=e.length,o=0,r=i;if(n._sorted){let{iScale:a,_parsed:s}=n,l=a.axis,{min:c,max:m,minDefined:p,maxDefined:g}=a.getUserBounds();p&&(o=Jt(Math.min(We(s,a.axis,c).lo,t?i:We(e,l,a.getPixelForValue(c)).lo),0,i-1)),g?r=Jt(Math.max(We(s,a.axis,m,!0).hi+1,t?0:We(e,l,a.getPixelForValue(m),!0).hi+1),o,i)-o:r=i-o}return{start:o,count:r}}function kr(n){let{xScale:e,yScale:t,_scaleRanges:i}=n,o={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=o,!0;let r=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,o),r}var hr=n=>n===0||n===1,cd=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*xt/t)),dd=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*xt/t)+1,qn={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*It)+1,easeOutSine:n=>Math.sin(n*It),easeInOutSine:n=>-.5*(Math.cos(mt*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=>hr(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=>hr(n)?n:cd(n,.075,.3),easeOutElastic:n=>hr(n)?n:dd(n,.075,.3),easeInOutElastic(n){return hr(n)?n:n<.5?.5*cd(n*2,.1125,.45):.5+.5*dd(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 e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-qn.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?qn.easeInBounce(n*2)*.5:qn.easeOutBounce(n*2-1)*.5+.5};function vo(n){return n+.5|0}var bn=(n,e,t)=>Math.max(Math.min(n,t),e);function fo(n){return bn(vo(n*2.55),0,255)}function yn(n){return bn(vo(n*255),0,255)}function sn(n){return bn(vo(n/2.55)/100,0,1)}function ud(n){return bn(vo(n*100),0,100)}var Ae={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},ys=[..."0123456789ABCDEF"],X_=n=>ys[n&15],Q_=n=>ys[(n&240)>>4]+ys[n&15],pr=n=>(n&240)>>4===(n&15),$_=n=>pr(n.r)&&pr(n.g)&&pr(n.b)&&pr(n.a);function Z_(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Ae[n[1]]*17,g:255&Ae[n[2]]*17,b:255&Ae[n[3]]*17,a:e===5?Ae[n[4]]*17:255}:(e===7||e===9)&&(t={r:Ae[n[1]]<<4|Ae[n[2]],g:Ae[n[3]]<<4|Ae[n[4]],b:Ae[n[5]]<<4|Ae[n[6]],a:e===9?Ae[n[7]]<<4|Ae[n[8]]:255})),t}var J_=(n,e)=>n<255?e(n):"";function t1(n){var e=$_(n)?X_:Q_;return n?"#"+e(n.r)+e(n.g)+e(n.b)+J_(n.a,e):void 0}var e1=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Td(n,e,t){let i=e*Math.min(t,1-t),o=(r,a=(r+n/30)%12)=>t-i*Math.max(Math.min(a-3,9-a,1),-1);return[o(0),o(8),o(4)]}function n1(n,e,t){let i=(o,r=(o+n/60)%6)=>t-t*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function i1(n,e,t){let i=Td(n,1,.5),o;for(e+t>1&&(o=1/(e+t),e*=o,t*=o),o=0;o<3;o++)i[o]*=1-e-t,i[o]+=e;return i}function o1(n,e,t,i,o){return n===o?(e-t)/i+(e<t?6:0):e===o?(t-n)/i+2:(n-e)/i+4}function Ns(n){let t=n.r/255,i=n.g/255,o=n.b/255,r=Math.max(t,i,o),a=Math.min(t,i,o),s=(r+a)/2,l,c,m;return r!==a&&(m=r-a,c=s>.5?m/(2-r-a):m/(r+a),l=o1(t,i,o,m,r),l=l*60+.5),[l|0,c||0,s]}function Vs(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(yn)}function Ls(n,e,t){return Vs(Td,n,e,t)}function r1(n,e,t){return Vs(i1,n,e,t)}function a1(n,e,t){return Vs(n1,n,e,t)}function Ad(n){return(n%360+360)%360}function s1(n){let e=e1.exec(n),t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?fo(+e[5]):yn(+e[5]));let o=Ad(+e[2]),r=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?i=r1(o,r,a):e[1]==="hsv"?i=a1(o,r,a):i=Ls(o,r,a),{r:i[0],g:i[1],b:i[2],a:t}}function l1(n,e){var t=Ns(n);t[0]=Ad(t[0]+e),t=Ls(t),n.r=t[0],n.g=t[1],n.b=t[2]}function c1(n){if(!n)return;let e=Ns(n),t=e[0],i=ud(e[1]),o=ud(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${o}%, ${sn(n.a)})`:`hsl(${t}, ${i}%, ${o}%)`}var md={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"},hd={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 d1(){let n={},e=Object.keys(hd),t=Object.keys(md),i,o,r,a,s;for(i=0;i<e.length;i++){for(a=s=e[i],o=0;o<t.length;o++)r=t[o],s=s.replace(r,md[r]);r=parseInt(hd[a],16),n[s]=[r>>16&255,r>>8&255,r&255]}return n}var fr;function u1(n){fr||(fr=d1(),fr.transparent=[0,0,0,0]);let e=fr[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var m1=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function h1(n){let e=m1.exec(n),t=255,i,o,r;if(e){if(e[7]!==i){let a=+e[7];t=e[8]?fo(a):bn(a*255,0,255)}return i=+e[1],o=+e[3],r=+e[5],i=255&(e[2]?fo(i):bn(i,0,255)),o=255&(e[4]?fo(o):bn(o,0,255)),r=255&(e[6]?fo(r):bn(r,0,255)),{r:i,g:o,b:r,a:t}}}function p1(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${sn(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}var xs=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,wi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function f1(n,e,t){let i=wi(sn(n.r)),o=wi(sn(n.g)),r=wi(sn(n.b));return{r:yn(xs(i+t*(wi(sn(e.r))-i))),g:yn(xs(o+t*(wi(sn(e.g))-o))),b:yn(xs(r+t*(wi(sn(e.b))-r))),a:n.a+t*(e.a-n.a)}}function gr(n,e,t){if(n){let i=Ns(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Ls(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Dd(n,e){return n&&Object.assign(e||{},n)}function pd(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=yn(n[3]))):(e=Dd(n,{r:0,g:0,b:0,a:1}),e.a=yn(e.a)),e}function g1(n){return n.charAt(0)==="r"?h1(n):s1(n)}var vs=class n{constructor(e){if(e instanceof n)return e;let t=typeof e,i;t==="object"?i=pd(e):t==="string"&&(i=Z_(e)||u1(e)||g1(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Dd(this._rgb);return e&&(e.a=sn(e.a)),e}set rgb(e){this._rgb=pd(e)}rgbString(){return this._valid?p1(this._rgb):void 0}hexString(){return this._valid?t1(this._rgb):void 0}hslString(){return this._valid?c1(this._rgb):void 0}mix(e,t){if(e){let i=this.rgb,o=e.rgb,r,a=t===r?.5:t,s=2*a-1,l=i.a-o.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;r=1-c,i.r=255&c*i.r+r*o.r+.5,i.g=255&c*i.g+r*o.g+.5,i.b=255&c*i.b+r*o.b+.5,i.a=a*i.a+(1-a)*o.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=f1(this._rgb,e._rgb,t)),this}clone(){return new n(this.rgb)}alpha(e){return this._rgb.a=yn(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=vo(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return gr(this._rgb,2,e),this}darken(e){return gr(this._rgb,2,-e),this}saturate(e){return gr(this._rgb,1,e),this}desaturate(e){return gr(this._rgb,1,-e),this}rotate(e){return l1(this._rgb,e),this}};function kd(n){return new vs(n)}function Rs(n){if(n&&typeof n=="object"){let e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Or(n){return Rs(n)?n:kd(n)}function Cr(n){return Rs(n)?n:kd(n).saturate(.5).darken(.1).hexString()}var In=Object.create(null),Er=Object.create(null);function go(n,e){if(!e)return n;let t=e.split(".");for(let i=0,o=t.length;i<o;++i){let r=t[i];n=n[r]||(n[r]=Object.create(null))}return n}function Ss(n,e,t){return typeof e=="string"?ke(go(n,e),t):ke(go(n,""),e)}var Is=class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>Cr(i.backgroundColor),this.hoverBorderColor=(t,i)=>Cr(i.borderColor),this.hoverColor=(t,i)=>Cr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return Ss(this,e,t)}get(e){return go(this,e)}describe(e,t){return Ss(Er,e,t)}override(e,t){return Ss(In,e,t)}route(e,t,i,o){let r=go(this,e),a=go(this,i),s="_"+t;Object.defineProperties(r,{[s]:{value:r[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[s],c=a[o];return st(l)?Object.assign({},c,l):tt(l,c)},set(l){this[s]=l}}})}},dt=new Is({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Od(n){return!n||ht(n.size)||ht(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ai(n,e,t,i,o){let r=e[o];return r||(r=e[o]=n.measureText(o).width,t.push(o)),r>i&&(i=r),i}function Ws(n,e,t,i){i=i||{};let o=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(o=i.data={},r=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let a=0,s=t.length,l,c,m,p,g;for(l=0;l<s;l++)if(p=t[l],p!=null&&pt(p)!==!0)a=Ai(n,o,r,a,p);else if(pt(p))for(c=0,m=p.length;c<m;c++)g=p[c],g!=null&&!pt(g)&&(a=Ai(n,o,r,a,g));n.restore();let _=r.length/2;if(_>t.length){for(l=0;l<_;l++)delete o[r[l]];r.splice(0,_)}return a}function dn(n,e,t){let i=n.currentDevicePixelRatio,o=t!==0?Math.max(t/2,.5):0;return Math.round((e-o)*i)/i+o}function Fr(n,e){e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore()}function Io(n,e,t,i){Br(n,e,t,i,null)}function Br(n,e,t,i,o){let r,a,s,l,c,m,p=e.pointStyle,g=e.rotation,_=e.radius,C=(g||0)*So;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){n.save(),n.translate(t,i),n.rotate(C),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(_)||_<=0)){switch(n.beginPath(),p){default:o?n.ellipse(t,i,o/2,_,0,0,xt):n.arc(t,i,_,0,xt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(C)*_,i-Math.cos(C)*_),C+=Ti,n.lineTo(t+Math.sin(C)*_,i-Math.cos(C)*_),C+=Ti,n.lineTo(t+Math.sin(C)*_,i-Math.cos(C)*_),n.closePath();break;case"rectRounded":c=_*.516,l=_-c,a=Math.cos(C+De)*l,s=Math.sin(C+De)*l,n.arc(t-a,i-s,c,C-mt,C-It),n.arc(t+s,i-a,c,C-It,C),n.arc(t+a,i+s,c,C,C+It),n.arc(t-s,i+a,c,C+It,C+mt),n.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*_,m=o?o/2:l,n.rect(t-m,i-l,2*m,2*l);break}C+=De;case"rectRot":a=Math.cos(C)*_,s=Math.sin(C)*_,n.moveTo(t-a,i-s),n.lineTo(t+s,i-a),n.lineTo(t+a,i+s),n.lineTo(t-s,i+a),n.closePath();break;case"crossRot":C+=De;case"cross":a=Math.cos(C)*_,s=Math.sin(C)*_,n.moveTo(t-a,i-s),n.lineTo(t+a,i+s),n.moveTo(t+s,i-a),n.lineTo(t-s,i+a);break;case"star":a=Math.cos(C)*_,s=Math.sin(C)*_,n.moveTo(t-a,i-s),n.lineTo(t+a,i+s),n.moveTo(t+s,i-a),n.lineTo(t-s,i+a),C+=De,a=Math.cos(C)*_,s=Math.sin(C)*_,n.moveTo(t-a,i-s),n.lineTo(t+a,i+s),n.moveTo(t+s,i-a),n.lineTo(t-s,i+a);break;case"line":a=o?o/2:Math.cos(C)*_,s=Math.sin(C)*_,n.moveTo(t-a,i-s),n.lineTo(t+a,i+s);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(C)*_,i+Math.sin(C)*_);break}n.fill(),e.borderWidth>0&&n.stroke()}}function jn(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function Ke(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function Xe(n){n.restore()}function Hs(n,e,t,i,o){if(!e)return n.lineTo(t.x,t.y);if(o==="middle"){let r=(e.x+t.x)/2;n.lineTo(r,e.y),n.lineTo(r,t.y)}else o==="after"!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function Gs(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function un(n,e,t,i,o,r={}){let a=pt(e)?e:[e],s=r.strokeWidth>0&&r.strokeColor!=="",l,c;for(n.save(),n.font=o.string,_1(n,r),l=0;l<a.length;++l)c=a[l],s&&(r.strokeColor&&(n.strokeStyle=r.strokeColor),ht(r.strokeWidth)||(n.lineWidth=r.strokeWidth),n.strokeText(c,t,i,r.maxWidth)),n.fillText(c,t,i,r.maxWidth),C1(n,t,i,c,r),i+=o.lineHeight;n.restore()}function _1(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),ht(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function C1(n,e,t,i,o){if(o.strikethrough||o.underline){let r=n.measureText(i),a=e-r.actualBoundingBoxLeft,s=e+r.actualBoundingBoxRight,l=t-r.actualBoundingBoxAscent,c=t+r.actualBoundingBoxDescent,m=o.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=o.decorationWidth||2,n.moveTo(a,m),n.lineTo(s,m),n.stroke()}}function mn(n,e){let{x:t,y:i,w:o,h:r,radius:a}=e;n.arc(t+a.topLeft,i+a.topLeft,a.topLeft,-It,mt,!0),n.lineTo(t,i+r-a.bottomLeft),n.arc(t+a.bottomLeft,i+r-a.bottomLeft,a.bottomLeft,mt,It,!0),n.lineTo(t+o-a.bottomRight,i+r),n.arc(t+o-a.bottomRight,i+r-a.bottomRight,a.bottomRight,It,0,!0),n.lineTo(t+o,i+a.topRight),n.arc(t+o-a.topRight,i+a.topRight,a.topRight,0,-It,!0),n.lineTo(t+a.topLeft,i)}var x1=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),S1=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ed(n,e){let t=(""+n).match(x1);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}var b1=n=>+n||0;function Po(n,e){let t={},i=st(e),o=i?Object.keys(e):e,r=st(n)?i?a=>tt(n[a],n[e[a]]):a=>n[a]:()=>n;for(let a of o)t[a]=b1(r(a));return t}function Nr(n){return Po(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Ue(n){return Po(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Ut(n){let e=Nr(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ft(n,e){n=n||{},e=e||dt.font;let t=tt(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=tt(n.style,e.style);i&&!(""+i).match(S1)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");let o={family:tt(n.family,e.family),lineHeight:Ed(tt(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:tt(n.weight,e.weight),string:""};return o.string=Od(o),o}function Zn(n,e,t,i){let o=!0,r,a,s;for(r=0,a=n.length;r<a;++r)if(s=n[r],s!==void 0&&(e!==void 0&&typeof s=="function"&&(s=s(e),o=!1),t!==void 0&&pt(s)&&(s=s[t%s.length],o=!1),s!==void 0))return i&&!o&&(i.cacheable=!1),s}function Ys(n,e,t){let{min:i,max:o}=n,r=Sr(e,(o-i)/2),a=(s,l)=>t&&s===0?0:s+l;return{min:a(i,-Math.abs(r)),max:a(o,r)}}function Qe(n,e){return Object.assign(Object.create(n),e)}function Mo(n,e=[""],t=n,i,o=()=>n[0]){Gt(i)||(i=Nd("_fallback",n));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:o,override:a=>Mo([a,...n],e,t,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete a._keys,delete n[0][s],!0},get(a,s){return Fd(a,s,()=>A1(s,e,n,a))},getOwnPropertyDescriptor(a,s){return Reflect.getOwnPropertyDescriptor(a._scopes[0],s)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(a,s){return gd(a).includes(s)},ownKeys(a){return gd(a)},set(a,s,l){let c=a._storage||(a._storage=o());return a[s]=c[s]=l,delete a._keys,!0}})}function vn(n,e,t,i){let o={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Vr(n,i),setContext:r=>vn(n,r,t,i),override:r=>vn(n.override(r),e,t,i)};return new Proxy(o,{deleteProperty(r,a){return delete r[a],delete n[a],!0},get(r,a,s){return Fd(r,a,()=>v1(r,a,s))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(r,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(r,a,s){return n[a]=s,delete r[a],!0}})}function Vr(n,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:o=e.allKeys}=n;return{allKeys:o,scriptable:t,indexable:i,isScriptable:oe(t)?t:()=>t,isIndexable:oe(i)?i:()=>i}}var y1=(n,e)=>n?n+xo(e):e,Us=(n,e)=>st(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Fd(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];let i=t();return n[e]=i,i}function v1(n,e,t){let{_proxy:i,_context:o,_subProxy:r,_descriptors:a}=n,s=i[e];return oe(s)&&a.isScriptable(e)&&(s=I1(e,s,n,t)),pt(s)&&s.length&&(s=P1(e,s,n,a.isIndexable)),Us(e,s)&&(s=vn(s,o,r&&r[e],a)),s}function I1(n,e,t,i){let{_proxy:o,_context:r,_subProxy:a,_stack:s}=t;if(s.has(n))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+n);return s.add(n),e=e(r,a||i),s.delete(n),Us(n,e)&&(e=qs(o._scopes,o,n,e)),e}function P1(n,e,t,i){let{_proxy:o,_context:r,_subProxy:a,_descriptors:s}=t;if(Gt(r.index)&&i(n))e=e[r.index%e.length];else if(st(e[0])){let l=e,c=o._scopes.filter(m=>m!==l);e=[];for(let m of l){let p=qs(c,o,n,m);e.push(vn(p,r,a&&a[n],s))}}return e}function Bd(n,e,t){return oe(n)?n(e,t):n}var M1=(n,e)=>n===!0?e:typeof n=="string"?je(e,n):void 0;function w1(n,e,t,i,o){for(let r of e){let a=M1(t,r);if(a){n.add(a);let s=Bd(a._fallback,t,o);if(Gt(s)&&s!==t&&s!==i)return s}else if(a===!1&&Gt(i)&&t!==i)return null}return!1}function qs(n,e,t,i){let o=e._rootScopes,r=Bd(e._fallback,t,i),a=[...n,...o],s=new Set;s.add(i);let l=fd(s,a,t,r||t,i);return l===null||Gt(r)&&r!==t&&(l=fd(s,a,r,l,i),l===null)?!1:Mo(Array.from(s),[""],o,r,()=>T1(e,t,i))}function fd(n,e,t,i,o){for(;t;)t=w1(n,e,t,i,o);return t}function T1(n,e,t){let i=n._getTarget();e in i||(i[e]={});let o=i[e];return pt(o)&&st(t)?t:o}function A1(n,e,t,i){let o;for(let r of e)if(o=Nd(y1(r,n),t),Gt(o))return Us(n,o)?qs(t,i,n,o):o}function Nd(n,e){for(let t of e){if(!t)continue;let i=t[n];if(Gt(i))return i}}function gd(n){let e=n._keys;return e||(e=n._keys=D1(n._scopes)),e}function D1(n){let e=new Set;for(let t of n)for(let i of Object.keys(t).filter(o=>!o.startsWith("_")))e.add(i);return Array.from(e)}function Lr(n,e,t,i){let{iScale:o}=n,{key:r="r"}=this._parsing,a=new Array(i),s,l,c,m;for(s=0,l=i;s<l;++s)c=s+t,m=e[c],a[s]={r:o.parse(je(m,r),c)};return a}var k1=Number.EPSILON||1e-14,Di=(n,e)=>e<n.length&&!n[e].skip&&n[e],Vd=n=>n==="x"?"y":"x";function Ld(n,e,t,i){let o=n.skip?e:n,r=e,a=t.skip?e:t,s=cn(r,o),l=cn(a,r),c=s/(s+l),m=l/(s+l);c=isNaN(c)?0:c,m=isNaN(m)?0:m;let p=i*c,g=i*m;return{previous:{x:r.x-p*(a.x-o.x),y:r.y-p*(a.y-o.y)},next:{x:r.x+g*(a.x-o.x),y:r.y+g*(a.y-o.y)}}}function O1(n,e,t){let i=n.length,o,r,a,s,l,c=Di(n,0);for(let m=0;m<i-1;++m)if(l=c,c=Di(n,m+1),!(!l||!c)){if(Xn(e[m],0,k1)){t[m]=t[m+1]=0;continue}o=t[m]/e[m],r=t[m+1]/e[m],s=Math.pow(o,2)+Math.pow(r,2),!(s<=9)&&(a=3/Math.sqrt(s),t[m]=o*a*e[m],t[m+1]=r*a*e[m])}}function E1(n,e,t="x"){let i=Vd(t),o=n.length,r,a,s,l=Di(n,0);for(let c=0;c<o;++c){if(a=s,s=l,l=Di(n,c+1),!s)continue;let m=s[t],p=s[i];a&&(r=(m-a[t])/3,s[`cp1${t}`]=m-r,s[`cp1${i}`]=p-r*e[c]),l&&(r=(l[t]-m)/3,s[`cp2${t}`]=m+r,s[`cp2${i}`]=p+r*e[c])}}function Rd(n,e="x"){let t=Vd(e),i=n.length,o=Array(i).fill(0),r=Array(i),a,s,l,c=Di(n,0);for(a=0;a<i;++a)if(s=l,l=c,c=Di(n,a+1),!!l){if(c){let m=c[e]-l[e];o[a]=m!==0?(c[t]-l[t])/m:0}r[a]=s?c?Oe(o[a-1])!==Oe(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}O1(n,o,r),E1(n,r,e)}function _r(n,e,t){return Math.max(Math.min(n,t),e)}function F1(n,e){let t,i,o,r,a,s=jn(n[0],e);for(t=0,i=n.length;t<i;++t)a=r,r=s,s=t<i-1&&jn(n[t+1],e),r&&(o=n[t],a&&(o.cp1x=_r(o.cp1x,e.left,e.right),o.cp1y=_r(o.cp1y,e.top,e.bottom)),s&&(o.cp2x=_r(o.cp2x,e.left,e.right),o.cp2y=_r(o.cp2y,e.top,e.bottom)))}function zs(n,e,t,i,o){let r,a,s,l;if(e.spanGaps&&(n=n.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")Rd(n,o);else{let c=i?n[n.length-1]:n[0];for(r=0,a=n.length;r<a;++r)s=n[r],l=Ld(c,s,n[Math.min(r+1,a-(i?0:1))%a],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}e.capBezierPoints&&F1(n,t)}function Rr(){return typeof window<"u"&&typeof document<"u"}function wo(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function xr(n,e,t){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*e.parentNode[t])):i=n,i}var Wr=n=>window.getComputedStyle(n,null);function Wd(n,e){return Wr(n).getPropertyValue(e)}var B1=["top","right","bottom","left"];function zn(n,e,t){let i={};t=t?"-"+t:"";for(let o=0;o<4;o++){let r=B1[o];i[r]=parseFloat(n[e+"-"+r+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var N1=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function V1(n,e){let t=n.touches,i=t&&t.length?t[0]:n,{offsetX:o,offsetY:r}=i,a=!1,s,l;if(N1(o,r,n.target))s=o,l=r;else{let c=e.getBoundingClientRect();s=i.clientX-c.left,l=i.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function hn(n,e){if("native"in n)return n;let{canvas:t,currentDevicePixelRatio:i}=e,o=Wr(t),r=o.boxSizing==="border-box",a=zn(o,"padding"),s=zn(o,"border","width"),{x:l,y:c,box:m}=V1(n,t),p=a.left+(m&&s.left),g=a.top+(m&&s.top),{width:_,height:C}=e;return r&&(_-=a.width+s.width,C-=a.height+s.height),{x:Math.round((l-p)/_*t.width/i),y:Math.round((c-g)/C*t.height/i)}}function L1(n,e,t){let i,o;if(e===void 0||t===void 0){let r=wo(n);if(!r)e=n.clientWidth,t=n.clientHeight;else{let a=r.getBoundingClientRect(),s=Wr(r),l=zn(s,"border","width"),c=zn(s,"padding");e=a.width-c.width-l.width,t=a.height-c.height-l.height,i=xr(s.maxWidth,r,"clientWidth"),o=xr(s.maxHeight,r,"clientHeight")}}return{width:e,height:t,maxWidth:i||Co,maxHeight:o||Co}}var bs=n=>Math.round(n*10)/10;function js(n,e,t,i){let o=Wr(n),r=zn(o,"margin"),a=xr(o.maxWidth,n,"clientWidth")||Co,s=xr(o.maxHeight,n,"clientHeight")||Co,l=L1(n,e,t),{width:c,height:m}=l;if(o.boxSizing==="content-box"){let p=zn(o,"border","width"),g=zn(o,"padding");c-=g.width+p.width,m-=g.height+p.height}return c=Math.max(0,c-r.width),m=Math.max(0,i?Math.floor(c/i):m-r.height),c=bs(Math.min(c,a,l.maxWidth)),m=bs(Math.min(m,s,l.maxHeight)),c&&!m&&(m=bs(c/2)),{width:c,height:m}}function Hr(n,e,t){let i=e||1,o=Math.floor(n.height*i),r=Math.floor(n.width*i);n.height=o/i,n.width=r/i;let a=n.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==o||a.width!==r?(n.currentDevicePixelRatio=i,a.height=o,a.width=r,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}var Ks=function(){let n=!1;try{let e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Gr(n,e){let t=Wd(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ln(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function Xs(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function Qs(n,e,t,i){let o={x:n.cp2x,y:n.cp2y},r={x:e.cp1x,y:e.cp1y},a=ln(n,o,t),s=ln(o,r,t),l=ln(r,e,t),c=ln(a,s,t),m=ln(s,l,t);return ln(c,m,t)}var _d=new Map;function R1(n,e){e=e||{};let t=n+JSON.stringify(e),i=_d.get(t);return i||(i=new Intl.NumberFormat(n,e),_d.set(t,i)),i}function Jn(n,e,t){return R1(e,t).format(n)}var W1=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},H1=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function Pn(n,e,t){return n?W1(e,t):H1()}function Yr(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function Ur(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Hd(n){return n==="angle"?{between:$n,compare:Md,normalize:pe}:{between:Ye,compare:(e,t)=>e-t,normalize:e=>e}}function Cd({start:n,end:e,count:t,loop:i,style:o}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:o}}function G1(n,e,t){let{property:i,start:o,end:r}=t,{between:a,normalize:s}=Hd(i),l=e.length,{start:c,end:m,loop:p}=n,g,_;if(p){for(c+=l,m+=l,g=0,_=l;g<_&&a(s(e[c%l][i]),o,r);++g)c--,m--;c%=l,m%=l}return m<c&&(m+=l),{start:c,end:m,loop:p,style:n.style}}function qr(n,e,t){if(!t)return[n];let{property:i,start:o,end:r}=t,a=e.length,{compare:s,between:l,normalize:c}=Hd(i),{start:m,end:p,loop:g,style:_}=G1(n,e,t),C=[],v=!1,I=null,M,w,k,D=()=>l(o,k,M)&&s(o,k)!==0,A=()=>s(r,M)===0||l(r,k,M),L=()=>v||D(),W=()=>!v||A();for(let U=m,q=m;U<=p;++U)w=e[U%a],!w.skip&&(M=c(w[i]),M!==k&&(v=l(M,o,r),I===null&&L()&&(I=s(M,o)===0?U:q),I!==null&&W()&&(C.push(Cd({start:I,end:U,loop:g,count:a,style:_})),I=null),q=U,k=M));return I!==null&&C.push(Cd({start:I,end:p,loop:g,count:a,style:_})),C}function zr(n,e){let t=[],i=n.segments;for(let o=0;o<i.length;o++){let r=qr(i[o],n.points,e);r.length&&t.push(...r)}return t}function Y1(n,e,t,i){let o=0,r=e-1;if(t&&!i)for(;o<e&&!n[o].skip;)o++;for(;o<e&&n[o].skip;)o++;for(o%=e,t&&(r+=o);r>o&&n[r%e].skip;)r--;return r%=e,{start:o,end:r}}function U1(n,e,t,i){let o=n.length,r=[],a=e,s=n[e],l;for(l=e+1;l<=t;++l){let c=n[l%o];c.skip||c.stop?s.skip||(i=!1,r.push({start:e%o,end:(l-1)%o,loop:i}),e=a=c.stop?l:null):(a=l,s.skip&&(e=l)),s=c}return a!==null&&r.push({start:e%o,end:a%o,loop:i}),r}function $s(n,e){let t=n.points,i=n.options.spanGaps,o=t.length;if(!o)return[];let r=!!n._loop,{start:a,end:s}=Y1(t,o,r,i);if(i===!0)return xd(n,[{start:a,end:s,loop:r}],t,e);let l=s<a?s+o:s,c=!!n._fullLoop&&a===0&&s===o-1;return xd(n,U1(t,a,l,c),t,e)}function xd(n,e,t,i){return!i||!i.setContext||!t?e:q1(n,e,t,i)}function q1(n,e,t,i){let o=n._chart.getContext(),r=Sd(n.options),{_datasetIndex:a,options:{spanGaps:s}}=n,l=t.length,c=[],m=r,p=e[0].start,g=p;function _(C,v,I,M){let w=s?-1:1;if(C!==v){for(C+=l;t[C%l].skip;)C-=w;for(;t[v%l].skip;)v+=w;C%l!==v%l&&(c.push({start:C%l,end:v%l,loop:I,style:M}),m=M,p=v%l)}}for(let C of e){p=s?p:C.start;let v=t[p%l],I;for(g=p+1;g<=C.end;g++){let M=t[g%l];I=Sd(i.setContext(Qe(o,{type:"segment",p0:v,p1:M,p0DataIndex:(g-1)%l,p1DataIndex:g%l,datasetIndex:a}))),z1(I,m)&&_(p,g-1,C.loop,m),v=M,m=I}p<g-1&&_(p,g-1,C.loop,m)}return c}function Sd(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function z1(n,e){return e&&JSON.stringify(n)!==JSON.stringify(e)}var sl=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,o){let r=t.listeners[o],a=t.duration;r.forEach(s=>s({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Tr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,o)=>{if(!i.running||!i.items.length)return;let r=i.items,a=r.length-1,s=!1,l;for(;a>=0;--a)l=r[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),s=!0):(r[a]=r[r.length-1],r.pop());s&&(o.draw(),this._notify(o,i,e,"progress")),r.length||(i.running=!1,this._notify(o,i,e,"complete"),i.initial=!1),t+=r.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,o)=>Math.max(i,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let i=t.items,o=i.length-1;for(;o>=0;--o)i[o].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},pn=new sl,Gd="transparent",j1={boolean(n,e,t){return t>.5?e:n},color(n,e,t){let i=Or(n||Gd),o=i.valid&&Or(e||Gd);return o&&o.valid?o.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}},ll=class{constructor(e,t,i,o){let r=t[i];o=Zn([e.to,o,r,e.from]);let a=Zn([e.from,r,o]);this._active=!0,this._fn=e.fn||j1[e.type||typeof a],this._easing=qn[e.easing]||qn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=a,this._to=o,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);let o=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Zn([e.to,t,o,e.from]),this._from=Zn([e.from,o,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,i=this._duration,o=this._prop,r=this._from,a=this._loop,s=this._to,l;if(this._active=r!==s&&(a||t<i),!this._active){this._target[o]=s,this._notify(!0);return}if(t<0){this._target[o]=r;return}l=t/i%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[o]=this._fn(r,s,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){let t=e?"res":"rej",i=this._promises||[];for(let o=0;o<i.length;o++)i[o][t]()}},K1=["x","y","borderWidth","radius","tension"],X1=["color","borderColor","backgroundColor"];dt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});var Q1=Object.keys(dt.animation);dt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});dt.set("animations",{colors:{type:"color",properties:X1},numbers:{type:"number",properties:K1}});dt.describe("animations",{_fallback:"animation"});dt.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:n=>n|0}}}});var Fi=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!st(e))return;let t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{let o=e[i];if(!st(o))return;let r={};for(let a of Q1)r[a]=o[a];(pt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!t.has(a))&&t.set(a,r)})})}_animateOptions(e,t){let i=t.options,o=Z1(e,i);if(!o)return[];let r=this._createAnimations(o,i);return i.$shared&&$1(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,t){let i=this._properties,o=[],r=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){o.push(...this._animateOptions(e,t));continue}let m=t[c],p=r[c],g=i.get(c);if(p)if(g&&p.active()){p.update(g,m,s);continue}else p.cancel();if(!g||!g.duration){e[c]=m;continue}r[c]=p=new ll(g,e,c,m),o.push(p)}return o}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let i=this._createAnimations(e,t);if(i.length)return pn.add(this._chart,i),!0}};function $1(n,e){let t=[],i=Object.keys(e);for(let o=0;o<i.length;o++){let r=n[i[o]];r&&r.active()&&t.push(r.wait())}return Promise.all(t)}function Z1(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Yd(n,e){let t=n&&n.options||{},i=t.reverse,o=t.min===void 0?e:0,r=t.max===void 0?e:0;return{start:i?r:o,end:i?o:r}}function J1(n,e,t){if(t===!1)return!1;let i=Yd(n,t),o=Yd(e,t);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}function tC(n){let e,t,i,o;return st(n)?(e=n.top,t=n.right,i=n.bottom,o=n.left):e=t=i=o=n,{top:e,right:t,bottom:i,left:o,disabled:n===!1}}function Fu(n,e){let t=[],i=n._getSortedDatasetMetas(e),o,r;for(o=0,r=i.length;o<r;++o)t.push(i[o].index);return t}function Ud(n,e,t,i={}){let o=n.keys,r=i.mode==="single",a,s,l,c;if(e!==null){for(a=0,s=o.length;a<s;++a){if(l=+o[a],l===t){if(i.all)continue;break}c=n.values[l],Et(c)&&(r||e===0||Oe(e)===Oe(c))&&(e+=c)}return e}}function eC(n){let e=Object.keys(n),t=new Array(e.length),i,o,r;for(i=0,o=e.length;i<o;++i)r=e[i],t[i]={x:r,y:n[r]};return t}function qd(n,e){let t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function nC(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function iC(n){let{min:e,max:t,minDefined:i,maxDefined:o}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:o?t:Number.POSITIVE_INFINITY}}function oC(n,e,t){let i=n[e]||(n[e]={});return i[t]||(i[t]={})}function zd(n,e,t,i){for(let o of e.getMatchingVisibleMetas(i).reverse()){let r=n[o.index];if(t&&r>0||!t&&r<0)return o.index}return null}function jd(n,e){let{chart:t,_cachedMeta:i}=n,o=t._stacks||(t._stacks={}),{iScale:r,vScale:a,index:s}=i,l=r.axis,c=a.axis,m=nC(r,a,i),p=e.length,g;for(let _=0;_<p;++_){let C=e[_],{[l]:v,[c]:I}=C,M=C._stacks||(C._stacks={});g=M[c]=oC(o,m,v),g[s]=I,g._top=zd(g,a,!0,i.type),g._bottom=zd(g,a,!1,i.type)}}function Zs(n,e){let t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function rC(n,e){return Qe(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function aC(n,e,t){return Qe(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function To(n,e){let t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(let o of e){let r=o._stacks;if(!r||r[i]===void 0||r[i][t]===void 0)return;delete r[i][t]}}}var Js=n=>n==="reset"||n==="none",Kd=(n,e)=>e?n:Object.assign({},n),sC=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Fu(t,!0),values:null},Je=(()=>{class n{constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,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.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=qd(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&To(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,i=this._cachedMeta,o=this.getDataset(),r=(g,_,C,v)=>g==="x"?_:g==="r"?v:C,a=i.xAxisID=tt(o.xAxisID,Zs(t,"x")),s=i.yAxisID=tt(o.yAxisID,Zs(t,"y")),l=i.rAxisID=tt(o.rAxisID,Zs(t,"r")),c=i.indexAxis,m=i.iAxisID=r(c,a,s,l),p=i.vAxisID=r(c,s,a,l);i.xScale=this.getScaleForId(a),i.yScale=this.getScaleForId(s),i.rScale=this.getScaleForId(l),i.iScale=this.getScaleForId(m),i.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Mr(this._data,this),t._stacked&&To(t)}_dataCheck(){let t=this.getDataset(),i=t.data||(t.data=[]),o=this._data;if(st(i))this._data=eC(i);else if(o!==i){if(o){Mr(o,this);let r=this._cachedMeta;To(r),r._parsed=[]}i&&Object.isExtensible(i)&&Es(i,this),this._syncList=[],this._data=i}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let i=this._cachedMeta,o=this.getDataset(),r=!1;this._dataCheck();let a=i._stacked;i._stacked=qd(i.vScale,i),i.stack!==o.stack&&(r=!0,To(i),i.stack=o.stack),this._resyncElements(t),(r||a!==i._stacked)&&jd(this,i._parsed)}configure(){let t=this.chart.config,i=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){let{_cachedMeta:o,_data:r}=this,{iScale:a,_stacked:s}=o,l=a.axis,c=t===0&&i===r.length?!0:o._sorted,m=t>0&&o._parsed[t-1],p,g,_;if(this._parsing===!1)o._parsed=r,o._sorted=!0,_=r;else{pt(r[t])?_=this.parseArrayData(o,r,t,i):st(r[t])?_=this.parseObjectData(o,r,t,i):_=this.parsePrimitiveData(o,r,t,i);let C=()=>g[l]===null||m&&g[l]<m[l];for(p=0;p<i;++p)o._parsed[p+t]=g=_[p],c&&(C()&&(c=!1),m=g);o._sorted=c}s&&jd(this,_)}parsePrimitiveData(t,i,o,r){let{iScale:a,vScale:s}=t,l=a.axis,c=s.axis,m=a.getLabels(),p=a===s,g=new Array(r),_,C,v;for(_=0,C=r;_<C;++_)v=_+o,g[_]={[l]:p||a.parse(m[v],v),[c]:s.parse(i[v],v)};return g}parseArrayData(t,i,o,r){let{xScale:a,yScale:s}=t,l=new Array(r),c,m,p,g;for(c=0,m=r;c<m;++c)p=c+o,g=i[p],l[c]={x:a.parse(g[0],p),y:s.parse(g[1],p)};return l}parseObjectData(t,i,o,r){let{xScale:a,yScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,m=new Array(r),p,g,_,C;for(p=0,g=r;p<g;++p)_=p+o,C=i[_],m[p]={x:a.parse(je(C,l),_),y:s.parse(je(C,c),_)};return m}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,o){let r=this.chart,a=this._cachedMeta,s=i[t.axis],l={keys:Fu(r,!0),values:i._stacks[t.axis]};return Ud(l,s,a.index,{mode:o})}updateRangeFromParsed(t,i,o,r){let a=o[i.axis],s=a===null?NaN:a,l=r&&o._stacks[i.axis];r&&l&&(r.values=l,s=Ud(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,i){let o=this._cachedMeta,r=o._parsed,a=o._sorted&&t===o.iScale,s=r.length,l=this._getOtherScale(t),c=sC(i,o,this.chart),m={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:g}=iC(l),_,C;function v(){C=r[_];let I=C[l.axis];return!Et(C[t.axis])||p>I||g<I}for(_=0;_<s&&!(!v()&&(this.updateRangeFromParsed(m,t,C,c),a));++_);if(a){for(_=s-1;_>=0;--_)if(!v()){this.updateRangeFromParsed(m,t,C,c);break}}return m}getAllParsedValues(t){let i=this._cachedMeta._parsed,o=[],r,a,s;for(r=0,a=i.length;r<a;++r)s=i[r][t.axis],Et(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(t){let i=this._cachedMeta,o=i.iScale,r=i.vScale,a=this.getParsed(t);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){let i=this._cachedMeta;this.update(t||"default"),i._clip=tC(tt(this.options.clip,J1(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,i=this.chart,o=this._cachedMeta,r=o.data||[],a=i.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||r.length-l,m=this.options.drawActiveElementsOnTop,p;for(o.dataset&&o.dataset.draw(t,a,l,c),p=l;p<l+c;++p){let g=r[p];g.hidden||(g.active&&m?s.push(g):g.draw(t,a))}for(p=0;p<s.length;++p)s[p].draw(t,a)}getStyle(t,i){let o=i?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,i,o){let r=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let s=this._cachedMeta.data[t];a=s.$context||(s.$context=aC(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=rC(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!i,a.mode=o,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",o){let r=i==="active",a=this._cachedDataOpts,s=t+"-"+i,l=a[s],c=this.enableOptionSharing&&Gt(o);if(l)return Kd(l,c);let m=this.chart.config,p=m.datasetElementScopeKeys(this._type,t),g=r?[`${t}Hover`,"hover",t,""]:[t,""],_=m.getOptionScopes(this.getDataset(),p),C=Object.keys(dt.elements[t]),v=()=>this.getContext(o,r),I=m.resolveNamedOptions(_,C,v,g);return I.$shared&&(I.$shared=c,a[s]=Object.freeze(Kd(I,c))),I}_resolveAnimations(t,i,o){let r=this.chart,a=this._cachedDataOpts,s=`animation-${i}`,l=a[s];if(l)return l;let c;if(r.options.animation!==!1){let p=this.chart.config,g=p.datasetAnimationScopeKeys(this._type,i),_=p.getOptionScopes(this.getDataset(),g);c=p.createResolver(_,this.getContext(t,o,i))}let m=new Fi(r,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(m)),m}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||Js(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){let o=this.resolveDataElementOptions(t,i),r=this._sharedOptions,a=this.getSharedOptions(o),s=this.includeOptions(i,a)||a!==r;return this.updateSharedOptions(a,i,o),{sharedOptions:a,includeOptions:s}}updateElement(t,i,o,r){Js(r)?Object.assign(t,o):this._resolveAnimations(i,r).update(t,o)}updateSharedOptions(t,i,o){t&&!Js(i)&&this._resolveAnimations(void 0,i).update(t,o)}_setStyle(t,i,o,r){t.active=r;let a=this.getStyle(i,r);this._resolveAnimations(i,o,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,i,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,i,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let i=this._data,o=this._cachedMeta.data;for(let[l,c,m]of this._syncList)this[l](c,m);this._syncList=[];let r=o.length,a=i.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,i,o=!0){let r=this._cachedMeta,a=r.data,s=t+i,l,c=m=>{for(m.length+=i,l=m.length-1;l>=s;l--)m[l]=m[l-i]};for(c(a),l=t;l<s;++l)a[l]=new this.dataElementType;this._parsing&&c(r._parsed),this.parse(t,i),o&&this.updateElements(a,t,i,"reset")}updateElements(t,i,o,r){}_removeElements(t,i){let o=this._cachedMeta;if(this._parsing){let r=o._parsed.splice(t,i);o._stacked&&To(o,r)}o.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[i,o,r]=t;this[i](o,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let 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,i){i&&this._sync(["_removeElements",t,i]);let o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return n.defaults={},n})();Je.prototype.datasetElementType=null;Je.prototype.dataElementType=null;function lC(n,e){if(!n._cache.$bar){let t=n.getMatchingVisibleMetas(e),i=[];for(let o=0,r=t.length;o<r;o++)i=i.concat(t[o].controller.getAllParsedValues(n));n._cache.$bar=wr(i.sort((o,r)=>o-r))}return n._cache.$bar}function cC(n){let e=n.iScale,t=lC(e,n.type),i=e._length,o,r,a,s,l=()=>{a===32767||a===-32768||(Gt(s)&&(i=Math.min(i,Math.abs(a-s)||i)),s=a)};for(o=0,r=t.length;o<r;++o)a=e.getPixelForValue(t[o]),l();for(s=void 0,o=0,r=e.ticks.length;o<r;++o)a=e.getPixelForTick(o),l();return i}function dC(n,e,t,i){let o=t.barThickness,r,a;return ht(o)?(r=e.min*t.categoryPercentage,a=t.barPercentage):(r=o*i,a=1),{chunk:r/i,ratio:a,start:e.pixels[n]-r/2}}function uC(n,e,t,i){let o=e.pixels,r=o[n],a=n>0?o[n-1]:null,s=n<o.length-1?o[n+1]:null,l=t.categoryPercentage;a===null&&(a=r-(s===null?e.end-e.start:s-r)),s===null&&(s=r+r-a);let c=r-(r-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/i,ratio:t.barPercentage,start:c}}function mC(n,e,t,i){let o=t.parse(n[0],i),r=t.parse(n[1],i),a=Math.min(o,r),s=Math.max(o,r),l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),e[t.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:r,min:a,max:s}}function Bu(n,e,t,i){return pt(n)?mC(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Xd(n,e,t,i){let o=n.iScale,r=n.vScale,a=o.getLabels(),s=o===r,l=[],c,m,p,g;for(c=t,m=t+i;c<m;++c)g=e[c],p={},p[o.axis]=s||o.parse(a[c],c),l.push(Bu(g,p,r,c));return l}function tl(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function hC(n,e,t){return n!==0?Oe(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function pC(n){let e,t,i,o,r;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.base<n.y,t="bottom",i="top"),e?(o="end",r="start"):(o="start",r="end"),{start:t,end:i,reverse:e,top:o,bottom:r}}function fC(n,e,t,i){let o=e.borderSkipped,r={};if(!o){n.borderSkipped=r;return}if(o===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:s,reverse:l,top:c,bottom:m}=pC(n);o==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===i?o=c:(t._bottom||0)===i?o=m:(r[Qd(m,a,s,l)]=!0,o=c)),r[Qd(o,a,s,l)]=!0,n.borderSkipped=r}function Qd(n,e,t,i){return i?(n=gC(n,e,t),n=$d(n,t,e)):n=$d(n,e,t),n}function gC(n,e,t){return n===e?t:n===t?e:n}function $d(n,e,t){return n==="start"?e:n==="end"?t:n}function _C(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}var Sl=(()=>{class n extends Je{parsePrimitiveData(t,i,o,r){return Xd(t,i,o,r)}parseArrayData(t,i,o,r){return Xd(t,i,o,r)}parseObjectData(t,i,o,r){let{iScale:a,vScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,m=a.axis==="x"?l:c,p=s.axis==="x"?l:c,g=[],_,C,v,I;for(_=o,C=o+r;_<C;++_)I=i[_],v={},v[a.axis]=a.parse(je(I,m),_),g.push(Bu(je(I,p),v,s,_));return g}updateRangeFromParsed(t,i,o,r){super.updateRangeFromParsed(t,i,o,r);let a=o._custom;a&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let i=this._cachedMeta,{iScale:o,vScale:r}=i,a=this.getParsed(t),s=a._custom,l=tl(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,t)}updateElements(t,i,o,r){let a=r==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),m=l.isHorizontal(),p=this._getRuler(),{sharedOptions:g,includeOptions:_}=this._getSharedOptions(i,r);for(let C=i;C<i+o;C++){let v=this.getParsed(C),I=a||ht(v[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(C),M=this._calculateBarIndexPixels(C,p),w=(v._stacks||{})[l.axis],k={horizontal:m,base:I.base,enableBorderRadius:!w||tl(v._custom)||s===w._top||s===w._bottom,x:m?I.head:M.center,y:m?M.center:I.head,height:m?M.size:Math.abs(I.size),width:m?Math.abs(I.size):M.size};_&&(k.options=g||this.resolveDataElementOptions(C,t[C].active?"active":r));let D=k.options||t[C].options;fC(k,D,w,s),_C(k,D,p.ratio),this.updateElement(t[C],C,k,r)}}_getStacks(t,i){let{iScale:o}=this._cachedMeta,r=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=o.options.stacked,s=[],l=c=>{let m=c.controller.getParsed(i),p=m&&m[c.vScale.axis];if(ht(p)||isNaN(p))return!0};for(let c of r)if(!(i!==void 0&&l(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,i,o){let r=this._getStacks(t,o),a=i!==void 0?r.indexOf(i):-1;return a===-1?r.length-1:a}_getRuler(){let t=this.options,i=this._cachedMeta,o=i.iScale,r=[],a,s;for(a=0,s=i.data.length;a<s;++a)r.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));let l=t.barThickness;return{min:l||cC(i),pixels:r,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:i,_stacked:o},options:{base:r,minBarLength:a}}=this,s=r||0,l=this.getParsed(t),c=l._custom,m=tl(c),p=l[i.axis],g=0,_=o?this.applyStack(i,l,o):p,C,v;_!==p&&(g=_-p,_=p),m&&(p=c.barStart,_=c.barEnd-c.barStart,p!==0&&Oe(p)!==Oe(c.barEnd)&&(g=0),g+=p);let I=!ht(r)&&!m?r:g,M=i.getPixelForValue(I);if(this.chart.getDataVisibility(t)?C=i.getPixelForValue(g+_):C=M,v=C-M,Math.abs(v)<a){v=hC(v,i,s)*a,p===s&&(M-=v/2);let w=i.getPixelForDecimal(0),k=i.getPixelForDecimal(1),D=Math.min(w,k),A=Math.max(w,k);M=Math.max(Math.min(M,A),D),C=M+v}if(M===i.getPixelForValue(s)){let w=Oe(v)*i.getLineWidthForValue(s)/2;M+=w,v-=w}return{size:v,base:M,head:C,center:C+v/2}}_calculateBarIndexPixels(t,i){let o=i.scale,r=this.options,a=r.skipNull,s=tt(r.maxBarThickness,1/0),l,c;if(i.grouped){let m=a?this._getStackCount(t):i.stackCount,p=r.barThickness==="flex"?uC(t,i,r,m):dC(t,i,r,m),g=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);l=p.start+p.chunk*g+p.chunk/2,c=Math.min(s,p.chunk*p.ratio)}else l=o.getPixelForValue(this.getParsed(t)[o.axis],t),c=Math.min(s,i.min*i.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,i=t.vScale,o=t.data,r=o.length,a=0;for(;a<r;++a)this.getParsed(a)[i.axis]!==null&&o[a].draw(this._ctx)}}return n.id="bar",n.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},n.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}},n})(),CC=(()=>{class n extends Je{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,i,o,r){let a=super.parsePrimitiveData(t,i,o,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+o).radius;return a}parseArrayData(t,i,o,r){let a=super.parseArrayData(t,i,o,r);for(let s=0;s<a.length;s++){let l=i[o+s];a[s]._custom=tt(l[2],this.resolveDataElementOptions(s+o).radius)}return a}parseObjectData(t,i,o,r){let a=super.parseObjectData(t,i,o,r);for(let s=0;s<a.length;s++){let l=i[o+s];a[s]._custom=tt(l&&l.r&&+l.r,this.resolveDataElementOptions(s+o).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,i=0;for(let o=t.length-1;o>=0;--o)i=Math.max(i,t[o].size(this.resolveDataElementOptions(o))/2);return i>0&&i}getLabelAndValue(t){let i=this._cachedMeta,{xScale:o,yScale:r}=i,a=this.getParsed(t),s=o.getLabelForValue(a.x),l=r.getLabelForValue(a.y),c=a._custom;return{label:i.label,value:"("+s+", "+l+(c?", "+c:"")+")"}}update(t){let i=this._cachedMeta.data;this.updateElements(i,0,i.length,t)}updateElements(t,i,o,r){let a=r==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:m}=this._getSharedOptions(i,r),p=s.axis,g=l.axis;for(let _=i;_<i+o;_++){let C=t[_],v=!a&&this.getParsed(_),I={},M=I[p]=a?s.getPixelForDecimal(.5):s.getPixelForValue(v[p]),w=I[g]=a?l.getBasePixel():l.getPixelForValue(v[g]);I.skip=isNaN(M)||isNaN(w),m&&(I.options=c||this.resolveDataElementOptions(_,C.active?"active":r),a&&(I.options.radius=0)),this.updateElement(C,_,I,r)}}resolveDataElementOptions(t,i){let o=this.getParsed(t),r=super.resolveDataElementOptions(t,i);r.$shared&&(r=Object.assign({},r,{$shared:!1}));let a=r.radius;return i!=="active"&&(r.radius=0),r.radius+=tt(o&&o._custom,a),r}}return n.id="bubble",n.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},n.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}},n})();function xC(n,e,t){let i=1,o=1,r=0,a=0;if(e<xt){let s=n,l=s+e,c=Math.cos(s),m=Math.sin(s),p=Math.cos(l),g=Math.sin(l),_=(k,D,A)=>$n(k,s,l,!0)?1:Math.max(D,D*t,A,A*t),C=(k,D,A)=>$n(k,s,l,!0)?-1:Math.min(D,D*t,A,A*t),v=_(0,c,p),I=_(It,m,g),M=C(mt,c,p),w=C(mt+It,m,g);i=(v-M)/2,o=(I-w)/2,r=-(v+M)/2,a=-(I+w)/2}return{ratioX:i,ratioY:o,offsetX:r,offsetY:a}}var Nu=(()=>{class n extends Je{constructor(t,i){super(t,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,i){let o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let a=c=>+o[c];if(st(o[t])){let{key:c="value"}=this._parsing;a=m=>+je(o[m],c)}let s,l;for(s=t,l=t+i;s<l;++s)r._parsed[s]=a(s)}}_getRotation(){return Yt(this.options.rotation-90)}_getCircumference(){return Yt(this.options.circumference)}_getRotationExtents(){let t=xt,i=-xt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)){let r=this.chart.getDatasetMeta(o).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),i=Math.max(i,a+s)}return{rotation:t,circumference:i-t}}update(t){let i=this.chart,{chartArea:o}=i,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-s)/2,0),c=Math.min(Ms(this.options.cutout,l),1),m=this._getRingWeight(this.index),{circumference:p,rotation:g}=this._getRotationExtents(),{ratioX:_,ratioY:C,offsetX:v,offsetY:I}=xC(g,p,c),M=(o.width-s)/_,w=(o.height-s)/C,k=Math.max(Math.min(M,w)/2,0),D=Sr(this.options.radius,k),A=Math.max(D*c,0),L=(D-A)/this._getVisibleDatasetWeightTotal();this.offsetX=v*D,this.offsetY=I*D,r.total=this.calculateTotal(),this.outerRadius=D-L*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-L*m,0),this.updateElements(a,0,a.length,t)}_circumference(t,i){let o=this.options,r=this._cachedMeta,a=this._getCircumference();return i&&o.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/xt)}updateElements(t,i,o,r){let a=r==="reset",s=this.chart,l=s.chartArea,m=s.options.animation,p=(l.left+l.right)/2,g=(l.top+l.bottom)/2,_=a&&m.animateScale,C=_?0:this.innerRadius,v=_?0:this.outerRadius,{sharedOptions:I,includeOptions:M}=this._getSharedOptions(i,r),w=this._getRotation(),k;for(k=0;k<i;++k)w+=this._circumference(k,a);for(k=i;k<i+o;++k){let D=this._circumference(k,a),A=t[k],L={x:p+this.offsetX,y:g+this.offsetY,startAngle:w,endAngle:w+D,circumference:D,outerRadius:v,innerRadius:C};M&&(L.options=I||this.resolveDataElementOptions(k,A.active?"active":r)),w+=D,this.updateElement(A,k,L,r)}}calculateTotal(){let t=this._cachedMeta,i=t.data,o=0,r;for(r=0;r<i.length;r++){let a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!i[r].hidden&&(o+=Math.abs(a))}return o}calculateCircumference(t){let i=this._cachedMeta.total;return i>0&&!isNaN(t)?xt*(Math.abs(t)/i):0}getLabelAndValue(t){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],a=Jn(i._parsed[t],o.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let i=0,o=this.chart,r,a,s,l,c;if(!t){for(r=0,a=o.data.datasets.length;r<a;++r)if(o.isDatasetVisible(r)){s=o.getDatasetMeta(r),t=s.data,l=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)c=l.resolveDataElementOptions(r),c.borderAlign!=="inner"&&(i=Math.max(i,c.borderWidth||0,c.hoverBorderWidth||0));return i}getMaxOffset(t){let i=0;for(let o=0,r=t.length;o<r;++o){let a=this.resolveDataElementOptions(o);i=Math.max(i,a.offset||0,a.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let o=0;o<t;++o)this.chart.isDatasetVisible(o)&&(i+=this._getRingWeight(o));return i}_getRingWeight(t){return Math.max(tt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return n.id="doughnut",n.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"},n.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"},n.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:i}}=e.legend.options;return t.labels.map((o,r)=>{let s=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){let t=e.label,i=": "+e.formattedValue;return pt(t)?(t=t.slice(),t[0]+=i):t+=i,t}}}}},n})(),SC=(()=>{class n extends Je{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let i=this._cachedMeta,{dataset:o,data:r=[],_dataset:a}=i,s=this.chart._animationsDisabled,{start:l,count:c}=Dr(i,r,s);this._drawStart=l,this._drawCount=c,kr(i)&&(l=0,c=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=r;let m=this.resolveDatasetElementOptions(t);this.options.showLine||(m.borderWidth=0),m.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:m},t),this.updateElements(r,l,c,t)}updateElements(t,i,o,r){let a=r==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:m}=this._cachedMeta,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(i,r),_=s.axis,C=l.axis,{spanGaps:v,segment:I}=this.options,M=Ge(v)?v:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||a||r==="none",k=i>0&&this.getParsed(i-1);for(let D=i;D<i+o;++D){let A=t[D],L=this.getParsed(D),W=w?A:{},U=ht(L[C]),q=W[_]=s.getPixelForValue(L[_],D),Q=W[C]=a||U?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,L,c):L[C],D);W.skip=isNaN(q)||isNaN(Q)||U,W.stop=D>0&&Math.abs(L[_]-k[_])>M,I&&(W.parsed=L,W.raw=m.data[D]),g&&(W.options=p||this.resolveDataElementOptions(D,A.active?"active":r)),w||this.updateElement(A,D,W,r),k=L}}getMaxOverflow(){let t=this._cachedMeta,i=t.dataset,o=i.options&&i.options.borderWidth||0,r=t.data||[];if(!r.length)return o;let a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,a,s)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return n.id="line",n.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},n.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}},n})(),bC=(()=>{class n extends Je{constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],a=Jn(i._parsed[t].r,o.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,i,o,r){return Lr.bind(this)(t,i,o,r)}update(t){let i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}getMinMax(){let t=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((o,r)=>{let a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<i.min&&(i.min=a),a>i.max&&(i.max=a))}),i}_updateRadius(){let t=this.chart,i=t.chartArea,o=t.options,r=Math.min(i.right-i.left,i.bottom-i.top),a=Math.max(r/2,0),s=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),l=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,i,o,r){let a=r==="reset",s=this.chart,c=s.options.animation,m=this._cachedMeta.rScale,p=m.xCenter,g=m.yCenter,_=m.getIndexAngle(0)-.5*mt,C=_,v,I=360/this.countVisibleElements();for(v=0;v<i;++v)C+=this._computeAngle(v,r,I);for(v=i;v<i+o;v++){let M=t[v],w=C,k=C+this._computeAngle(v,r,I),D=s.getDataVisibility(v)?m.getDistanceFromCenterForValue(this.getParsed(v).r):0;C=k,a&&(c.animateScale&&(D=0),c.animateRotate&&(w=k=_));let A={x:p,y:g,innerRadius:0,outerRadius:D,startAngle:w,endAngle:k,options:this.resolveDataElementOptions(v,M.active?"active":r)};this.updateElement(M,v,A,r)}}countVisibleElements(){let t=this._cachedMeta,i=0;return t.data.forEach((o,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&i++}),i}_computeAngle(t,i,o){return this.chart.getDataVisibility(t)?Yt(this.resolveDataElementOptions(t,i).angle||o):0}}return n.id="polarArea",n.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},n.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:i}}=e.legend.options;return t.labels.map((o,r)=>{let s=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){return e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}},n})(),yC=(()=>{class n extends Nu{}return n.id="pie",n.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"},n})(),vC=(()=>{class n extends Je{getLabelAndValue(t){let i=this._cachedMeta.vScale,o=this.getParsed(t);return{label:i.getLabels()[t],value:""+i.getLabelForValue(o[i.axis])}}parseObjectData(t,i,o,r){return Lr.bind(this)(t,i,o,r)}update(t){let i=this._cachedMeta,o=i.dataset,r=i.data||[],a=i.iScale.getLabels();if(o.points=r,t!=="resize"){let s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(o,void 0,l,t)}this.updateElements(r,0,r.length,t)}updateElements(t,i,o,r){let a=this._cachedMeta.rScale,s=r==="reset";for(let l=i;l<i+o;l++){let c=t[l],m=this.resolveDataElementOptions(l,c.active?"active":r),p=a.getPointPositionForValue(l,this.getParsed(l).r),g=s?a.xCenter:p.x,_=s?a.yCenter:p.y,C={x:g,y:_,angle:p.angle,skip:isNaN(g)||isNaN(_),options:m};this.updateElement(c,l,C,r)}}}return n.id="radar",n.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},n.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}},n})(),Kt=class{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){let{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return Ge(this.x)&&Ge(this.y)}getProps(e,t){let i=this.$animations;if(!t||!i)return this;let o={};return e.forEach(r=>{o[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),o}};Kt.defaults={};Kt.defaultRoutes=void 0;var Vu={values(n){return pt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";let i=this.chart.options.locale,o,r=n;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(o="scientific"),r=IC(n,t)}let a=Ce(Math.abs(r)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Jn(n,i,l)},logarithmic(n,e,t){if(n===0)return"0";let i=n/Math.pow(10,Math.floor(Ce(n)));return i===1||i===2||i===5?Vu.numeric.call(this,n,e,t):""}};function IC(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var ra={formatters:Vu};dt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:ra.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});dt.route("scale.ticks","color","","color");dt.route("scale.grid","color","","borderColor");dt.route("scale.grid","borderColor","","borderColor");dt.route("scale.title","color","","color");dt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});dt.describe("scales",{_fallback:"scale"});dt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function PC(n,e){let t=n.options.ticks,i=t.maxTicksLimit||MC(n),o=t.major.enabled?TC(e):[],r=o.length,a=o[0],s=o[r-1],l=[];if(r>i)return AC(e,l,o,r/i),l;let c=wC(o,e,i);if(r>0){let m,p,g=r>1?Math.round((s-a)/(r-1)):null;for(jr(e,l,c,ht(g)?0:a-g,a),m=0,p=r-1;m<p;m++)jr(e,l,c,o[m],o[m+1]);return jr(e,l,c,s,ht(g)?e.length:s+g),l}return jr(e,l,c),l}function MC(n){let e=n.options.offset,t=n._tickSize(),i=n._length/t+(e?0:1),o=n._maxLength/t;return Math.floor(Math.min(i,o))}function wC(n,e,t){let i=DC(n),o=e.length/t;if(!i)return Math.max(o,1);let r=Ts(i);for(let a=0,s=r.length-1;a<s;a++){let l=r[a];if(l>o)return l}return Math.max(o,1)}function TC(n){let e=[],t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}function AC(n,e,t,i){let o=0,r=t[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===r&&(e.push(n[a]),o++,r=t[o*i])}function jr(n,e,t,i,o){let r=tt(i,0),a=Math.min(tt(o,n.length),n.length),s=0,l,c,m;for(t=Math.ceil(t),o&&(l=o-i,t=l/Math.floor(l/t)),m=r;m<0;)s++,m=Math.round(r+s*t);for(c=Math.max(r,0);c<a;c++)c===m&&(e.push(n[c]),s++,m=Math.round(r+s*t))}function DC(n){let e=n.length,t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}var kC=n=>n==="left"?"right":n==="right"?"left":n,Zd=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Jd(n,e){let t=[],i=n.length/e,o=n.length,r=0;for(;r<o;r+=i)t.push(n[Math.floor(r)]);return t}function OC(n,e,t){let i=n.ticks.length,o=Math.min(e,i-1),r=n._startPixel,a=n._endPixel,s=1e-6,l=n.getPixelForTick(o),c;if(!(t&&(i===1?c=Math.max(l-r,a-l):e===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(o-1))/2,l+=o<e?c:-c,l<r-s||l>a+s)))return l}function EC(n,e){yt(n,t=>{let i=t.gc,o=i.length/2,r;if(o>e){for(r=0;r<o;++r)delete t.data[i[r]];i.splice(0,o)}})}function Ao(n){return n.drawTicks?n.tickLength:0}function tu(n,e){if(!n.display)return 0;let t=Ft(n.font,e),i=Ut(n.padding);return(pt(n.text)?n.text.length:1)*t.lineHeight+i.height}function FC(n,e){return Qe(n,{scale:e,type:"scale"})}function BC(n,e,t){return Qe(n,{tick:t,index:e,type:"tick"})}function NC(n,e,t){let i=yo(n);return(t&&e!=="right"||!t&&e==="right")&&(i=kC(i)),i}function VC(n,e,t,i){let{top:o,left:r,bottom:a,right:s,chart:l}=n,{chartArea:c,scales:m}=l,p=0,g,_,C,v=a-o,I=s-r;if(n.isHorizontal()){if(_=ie(i,r,s),st(t)){let M=Object.keys(t)[0],w=t[M];C=m[M].getPixelForValue(w)+v-e}else t==="center"?C=(c.bottom+c.top)/2+v-e:C=Zd(n,t,e);g=s-r}else{if(st(t)){let M=Object.keys(t)[0],w=t[M];_=m[M].getPixelForValue(w)-I+e}else t==="center"?_=(c.left+c.right)/2-I+e:_=Zd(n,t,e);C=ie(i,a,o),p=t==="left"?-It:It}return{titleX:_,titleY:C,maxWidth:g,rotation:p}}var ei=class n extends Kt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:o}=this;return e=_e(e,Number.POSITIVE_INFINITY),t=_e(t,Number.NEGATIVE_INFINITY),i=_e(i,Number.POSITIVE_INFINITY),o=_e(o,Number.NEGATIVE_INFINITY),{min:_e(e,i),max:_e(t,o),minDefined:Et(e),maxDefined:Et(t)}}getMinMax(e){let{min:t,max:i,minDefined:o,maxDefined:r}=this.getUserBounds(),a;if(o&&r)return{min:t,max:i};let s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,e),o||(t=Math.min(t,a.min)),r||(i=Math.max(i,a.max));return t=r&&t>i?i:t,i=o&&t>i?t:i,{min:_e(t,_e(i,t)),max:_e(i,_e(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){St(this.options.beforeUpdate,[this])}update(e,t,i){let{beginAtZero:o,grace:r,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,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=Ys(this,r,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=s<this.ticks.length;this._convertTicksToLabels(l?Jd(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=PC(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,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(e){this.chart.notifyPlugins(e,this.getContext()),St(this.options[e],[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(e){let t=this.options.ticks,i,o,r;for(i=0,o=e.length;i<o;i++)r=e[i],r.label=St(t.callback,[r.value,i,e],this)}afterTickToLabelConversion(){St(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){St(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,i=this.ticks.length,o=t.minRotation||0,r=t.maxRotation,a=o,s,l,c;if(!this._isVisible()||!t.display||o>=r||i<=1||!this.isHorizontal()){this.labelRotation=o;return}let m=this._getLabelSizes(),p=m.widest.width,g=m.highest.height,_=Jt(this.chart.width-p,0,this.maxWidth);s=e.offset?this.maxWidth/i:_/(i-1),p+6>s&&(s=_/(i-(e.offset?.5:1)),l=this.maxHeight-Ao(e.grid)-t.padding-tu(e.title,this.chart.options.font),c=Math.sqrt(p*p+g*g),a=Qn(Math.min(Math.asin(Jt((m.highest.height+6)/s,-1,1)),Math.asin(Jt(l/c,-1,1))-Math.asin(Jt(g/c,-1,1)))),a=Math.max(o,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){St(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){St(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:i,title:o,grid:r}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){let l=tu(o,t.options.font);if(s?(e.width=this.maxWidth,e.height=Ao(r)+l):(e.height=this.maxHeight,e.width=Ao(r)+l),i.display&&this.ticks.length){let{first:c,last:m,widest:p,highest:g}=this._getLabelSizes(),_=i.padding*2,C=Yt(this.labelRotation),v=Math.cos(C),I=Math.sin(C);if(s){let M=i.mirror?0:I*p.width+v*g.height;e.height=Math.min(this.maxHeight,e.height+M+_)}else{let M=i.mirror?0:v*p.width+I*g.height;e.width=Math.min(this.maxWidth,e.width+M+_)}this._calculatePadding(c,m,I,v)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,o){let{ticks:{align:r,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){let m=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1),g=0,_=0;l?c?(g=o*e.width,_=i*t.height):(g=i*e.height,_=o*t.width):r==="start"?_=t.width:r==="end"?g=e.width:r!=="inner"&&(g=e.width/2,_=t.width/2),this.paddingLeft=Math.max((g-m+a)*this.width/(this.width-m),0),this.paddingRight=Math.max((_-p+a)*this.width/(this.width-p),0)}else{let m=t.height/2,p=e.height/2;r==="start"?(m=0,p=e.height):r==="end"&&(m=t.height,p=0),this.paddingTop=m+a,this.paddingBottom=p+a}}_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(){let{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t<i;t++)ht(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,i=this.ticks;t<i.length&&(i=Jd(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,t){let{ctx:i,_longestTextCache:o}=this,r=[],a=[],s=0,l=0,c,m,p,g,_,C,v,I,M,w,k;for(c=0;c<t;++c){if(g=e[c].label,_=this._resolveTickFontOptions(c),i.font=C=_.string,v=o[C]=o[C]||{data:{},gc:[]},I=_.lineHeight,M=w=0,!ht(g)&&!pt(g))M=Ai(i,v.data,v.gc,M,g),w=I;else if(pt(g))for(m=0,p=g.length;m<p;++m)k=g[m],!ht(k)&&!pt(k)&&(M=Ai(i,v.data,v.gc,M,k),w+=I);r.push(M),a.push(w),s=Math.max(M,s),l=Math.max(w,l)}EC(o,t);let D=r.indexOf(s),A=a.indexOf(l),L=W=>({width:r[W]||0,height:a[W]||0});return{first:L(0),last:L(t-1),widest:L(D),highest:L(A),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return Ds(this._alignToPixels?dn(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let i=t[e];return i.$context||(i.$context=BC(this.getContext(),e,i))}return this.$context||(this.$context=FC(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,t=Yt(this.labelRotation),i=Math.abs(Math.cos(t)),o=Math.abs(Math.sin(t)),r=this._getLabelSizes(),a=e.autoSkipPadding||0,s=r?r.widest.width+a:0,l=r?r.highest.height+a:0;return this.isHorizontal()?l*i>s*o?s/i:l/o:l*o<s*i?l/i:s/o}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let t=this.axis,i=this.chart,o=this.options,{grid:r,position:a}=o,s=r.offset,l=this.isHorizontal(),m=this.ticks.length+(s?1:0),p=Ao(r),g=[],_=r.setContext(this.getContext()),C=_.drawBorder?_.borderWidth:0,v=C/2,I=function(j){return dn(i,j,C)},M,w,k,D,A,L,W,U,q,Q,et,$;if(a==="top")M=I(this.bottom),L=this.bottom-p,U=M-v,Q=I(e.top)+v,$=e.bottom;else if(a==="bottom")M=I(this.top),Q=e.top,$=I(e.bottom)-v,L=M+v,U=this.top+p;else if(a==="left")M=I(this.right),A=this.right-p,W=M-v,q=I(e.left)+v,et=e.right;else if(a==="right")M=I(this.left),q=e.left,et=I(e.right)-v,A=M+v,W=this.left+p;else if(t==="x"){if(a==="center")M=I((e.top+e.bottom)/2+.5);else if(st(a)){let j=Object.keys(a)[0],it=a[j];M=I(this.chart.scales[j].getPixelForValue(it))}Q=e.top,$=e.bottom,L=M+v,U=L+p}else if(t==="y"){if(a==="center")M=I((e.left+e.right)/2);else if(st(a)){let j=Object.keys(a)[0],it=a[j];M=I(this.chart.scales[j].getPixelForValue(it))}A=M-v,W=A-p,q=e.left,et=e.right}let at=tt(o.ticks.maxTicksLimit,m),lt=Math.max(1,Math.ceil(m/at));for(w=0;w<m;w+=lt){let j=r.setContext(this.getContext(w)),it=j.lineWidth,rt=j.color,ft=j.borderDash||[],qe=j.borderDashOffset,Le=j.tickWidth,ct=j.tickColor,ae=j.tickBorderDash||[],be=j.tickBorderDashOffset;k=OC(this,w,s),k!==void 0&&(D=dn(i,k,it),l?A=W=q=et=D:L=U=Q=$=D,g.push({tx1:A,ty1:L,tx2:W,ty2:U,x1:q,y1:Q,x2:et,y2:$,width:it,color:rt,borderDash:ft,borderDashOffset:qe,tickWidth:Le,tickColor:ct,tickBorderDash:ae,tickBorderDashOffset:be}))}return this._ticksLength=m,this._borderValue=M,g}_computeLabelItems(e){let t=this.axis,i=this.options,{position:o,ticks:r}=i,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:m,mirror:p}=r,g=Ao(i.grid),_=g+m,C=p?-m:_,v=-Yt(this.labelRotation),I=[],M,w,k,D,A,L,W,U,q,Q,et,$,at="middle";if(o==="top")L=this.bottom-C,W=this._getXAxisLabelAlignment();else if(o==="bottom")L=this.top+C,W=this._getXAxisLabelAlignment();else if(o==="left"){let j=this._getYAxisLabelAlignment(g);W=j.textAlign,A=j.x}else if(o==="right"){let j=this._getYAxisLabelAlignment(g);W=j.textAlign,A=j.x}else if(t==="x"){if(o==="center")L=(e.top+e.bottom)/2+_;else if(st(o)){let j=Object.keys(o)[0],it=o[j];L=this.chart.scales[j].getPixelForValue(it)+_}W=this._getXAxisLabelAlignment()}else if(t==="y"){if(o==="center")A=(e.left+e.right)/2-_;else if(st(o)){let j=Object.keys(o)[0],it=o[j];A=this.chart.scales[j].getPixelForValue(it)}W=this._getYAxisLabelAlignment(g).textAlign}t==="y"&&(l==="start"?at="top":l==="end"&&(at="bottom"));let lt=this._getLabelSizes();for(M=0,w=s.length;M<w;++M){k=s[M],D=k.label;let j=r.setContext(this.getContext(M));U=this.getPixelForTick(M)+r.labelOffset,q=this._resolveTickFontOptions(M),Q=q.lineHeight,et=pt(D)?D.length:1;let it=et/2,rt=j.color,ft=j.textStrokeColor,qe=j.textStrokeWidth,Le=W;a?(A=U,W==="inner"&&(M===w-1?Le=this.options.reverse?"left":"right":M===0?Le=this.options.reverse?"right":"left":Le="center"),o==="top"?c==="near"||v!==0?$=-et*Q+Q/2:c==="center"?$=-lt.highest.height/2-it*Q+Q:$=-lt.highest.height+Q/2:c==="near"||v!==0?$=Q/2:c==="center"?$=lt.highest.height/2-it*Q:$=lt.highest.height-et*Q,p&&($*=-1)):(L=U,$=(1-et)*Q/2);let ct;if(j.showLabelBackdrop){let ae=Ut(j.backdropPadding),be=lt.heights[M],te=lt.widths[M],Cn=L+$-ae.top,xn=A-ae.left;switch(at){case"middle":Cn-=be/2;break;case"bottom":Cn-=be;break}switch(W){case"center":xn-=te/2;break;case"right":xn-=te;break}ct={left:xn,top:Cn,width:te+ae.width,height:be+ae.height,color:j.backdropColor}}I.push({rotation:v,label:D,font:q,color:rt,strokeColor:ft,strokeWidth:qe,textOffset:$,textAlign:Le,textBaseline:at,translation:[A,L],backdrop:ct})}return I}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-Yt(this.labelRotation))return e==="top"?"left":"right";let o="center";return t.align==="start"?o="left":t.align==="end"?o="right":t.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:i,mirror:o,padding:r}}=this.options,a=this._getLabelSizes(),s=e+r,l=a.widest.width,c,m;return t==="left"?o?(m=this.right+r,i==="near"?c="left":i==="center"?(c="center",m+=l/2):(c="right",m+=l)):(m=this.right-s,i==="near"?c="right":i==="center"?(c="center",m-=l/2):(c="left",m=this.left)):t==="right"?o?(m=this.left+r,i==="near"?c="right":i==="center"?(c="center",m-=l/2):(c="left",m-=l)):(m=this.left+s,i==="near"?c="left":i==="center"?(c="center",m+=l/2):(c="right",m=this.right)):c="right",{textAlign:c,x:m}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:i,top:o,width:r,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,o,r,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let o=this.ticks.findIndex(r=>r.value===e);return o>=0?t.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){let t=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),r,a,s=(l,c,m)=>{!m.width||!m.color||(i.save(),i.lineWidth=m.width,i.strokeStyle=m.color,i.setLineDash(m.borderDash||[]),i.lineDashOffset=m.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(t.display)for(r=0,a=o.length;r<a;++r){let l=o[r];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({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(){let{chart:e,ctx:t,options:{grid:i}}=this,o=i.setContext(this.getContext()),r=i.drawBorder?o.borderWidth:0;if(!r)return;let a=i.setContext(this.getContext(0)).lineWidth,s=this._borderValue,l,c,m,p;this.isHorizontal()?(l=dn(e,this.left,r)-r/2,c=dn(e,this.right,a)+a/2,m=p=s):(m=dn(e,this.top,r)-r/2,p=dn(e,this.bottom,a)+a/2,l=c=s),t.save(),t.lineWidth=o.borderWidth,t.strokeStyle=o.borderColor,t.beginPath(),t.moveTo(l,m),t.lineTo(c,p),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let i=this.ctx,o=this._computeLabelArea();o&&Ke(i,o);let r=this._labelItems||(this._labelItems=this._computeLabelItems(e)),a,s;for(a=0,s=r.length;a<s;++a){let l=r[a],c=l.font,m=l.label;l.backdrop&&(i.fillStyle=l.backdrop.color,i.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let p=l.textOffset;un(i,m,0,p,c,l)}o&&Xe(i)}drawTitle(){let{ctx:e,options:{position:t,title:i,reverse:o}}=this;if(!i.display)return;let r=Ft(i.font),a=Ut(i.padding),s=i.align,l=r.lineHeight/2;t==="bottom"||t==="center"||st(t)?(l+=a.bottom,pt(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=a.top;let{titleX:c,titleY:m,maxWidth:p,rotation:g}=VC(this,l,t,s);un(e,i.text,0,0,r,{color:i.color,maxWidth:p,rotation:g,textAlign:NC(s,t,o),textBaseline:"middle",translation:[c,m]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,t=e.ticks&&e.ticks.z||0,i=tt(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==n.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[],r,a;for(r=0,a=t.length;r<a;++r){let s=t[r];s[i]===this.id&&(!e||s.type===e)&&o.push(s)}return o}_resolveTickFontOptions(e){let t=this.options.ticks.setContext(this.getContext(e));return Ft(t.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},Ei=class{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),i;WC(t)&&(i=this.register(t));let o=this.items,r=e.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in o||(o[r]=e,LC(e,a,i),this.override&&dt.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){let t=this.items,i=e.id,o=this.scope;i in t&&delete t[i],o&&i in dt[o]&&(delete dt[o][i],this.override&&delete In[i])}};function LC(n,e,t){let i=ke(Object.create(null),[t?dt.get(t):{},dt.get(e),n.defaults]);dt.set(e,i),n.defaultRoutes&&RC(e,n.defaultRoutes),n.descriptors&&dt.describe(e,n.descriptors)}function RC(n,e){Object.keys(e).forEach(t=>{let i=t.split("."),o=i.pop(),r=[n].concat(i).join("."),a=e[t].split("."),s=a.pop(),l=a.join(".");dt.route(r,o,l,s)})}function WC(n){return"id"in n&&"defaults"in n}var cl=class{constructor(){this.controllers=new Ei(Je,"datasets",!0),this.elements=new Ei(Kt,"elements"),this.plugins=new Ei(Object,"plugins"),this.scales=new Ei(ei,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(o=>{let r=i||this._getRegistryForType(o);i||r.isForType(o)||r===this.plugins&&o.id?this._exec(e,r,o):yt(o,a=>{let s=i||this._getRegistryForType(a);this._exec(e,s,a)})})}_exec(e,t,i){let o=xo(e);St(i["before"+o],[],i),t[e](i),St(i["after"+o],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){let o=t.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return o}},Ze=new cl,HC=(()=>{class n extends Je{update(t){let i=this._cachedMeta,{data:o=[]}=i,r=this.chart._animationsDisabled,{start:a,count:s}=Dr(i,o,r);if(this._drawStart=a,this._drawCount=s,kr(i)&&(a=0,s=o.length),this.options.showLine){let{dataset:l,_dataset:c}=i;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=o;let m=this.resolveDatasetElementOptions(t);m.segment=this.options.segment,this.updateElement(l,void 0,{animated:!r,options:m},t)}this.updateElements(o,a,s,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=Ze.getElement("line")),super.addElements()}updateElements(t,i,o,r){let a=r==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:m}=this._cachedMeta,p=this.resolveDataElementOptions(i,r),g=this.getSharedOptions(p),_=this.includeOptions(r,g),C=s.axis,v=l.axis,{spanGaps:I,segment:M}=this.options,w=Ge(I)?I:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||a||r==="none",D=i>0&&this.getParsed(i-1);for(let A=i;A<i+o;++A){let L=t[A],W=this.getParsed(A),U=k?L:{},q=ht(W[v]),Q=U[C]=s.getPixelForValue(W[C],A),et=U[v]=a||q?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,W,c):W[v],A);U.skip=isNaN(Q)||isNaN(et)||q,U.stop=A>0&&Math.abs(W[C]-D[C])>w,M&&(U.parsed=W,U.raw=m.data[A]),_&&(U.options=g||this.resolveDataElementOptions(A,L.active?"active":r)),k||this.updateElement(L,A,U,r),D=W}this.updateSharedOptions(g,r,p)}getMaxOverflow(){let t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let l=0;for(let c=i.length-1;c>=0;--c)l=Math.max(l,i[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let o=t.dataset,r=o.options&&o.options.borderWidth||0;if(!i.length)return r;let a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}}return n.id="scatter",n.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},n.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}},n})(),GC=Object.freeze({__proto__:null,BarController:Sl,BubbleController:CC,DoughnutController:Nu,LineController:SC,PolarAreaController:bC,PieController:yC,RadarController:vC,ScatterController:HC});function ti(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var YC=(()=>{class n{constructor(t){this.options=t||{}}init(t){}formats(){return ti()}parse(t,i){return ti()}format(t,i){return ti()}add(t,i,o){return ti()}diff(t,i,o){return ti()}startOf(t,i,o){return ti()}endOf(t,i){return ti()}}return n.override=function(e){Object.assign(n.prototype,e)},n})(),bl={_date:YC};function UC(n,e,t,i){let{controller:o,data:r,_sorted:a}=n,s=o._cachedMeta.iScale;if(s&&e===s.axis&&e!=="r"&&a&&r.length){let l=s._reversePixels?ks:We;if(i){if(o._sharedOptions){let c=r[0],m=typeof c.getRange=="function"&&c.getRange(e);if(m){let p=l(r,e,t-m),g=l(r,e,t+m);return{lo:p.lo,hi:g.hi}}}}else return l(r,e,t)}return{lo:0,hi:r.length-1}}function Wo(n,e,t,i,o){let r=n.getSortedVisibleDatasetMetas(),a=t[e];for(let s=0,l=r.length;s<l;++s){let{index:c,data:m}=r[s],{lo:p,hi:g}=UC(r[s],e,a,o);for(let _=p;_<=g;++_){let C=m[_];C.skip||i(C,c,_)}}}function qC(n){let e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(i,o){let r=e?Math.abs(i.x-o.x):0,a=t?Math.abs(i.y-o.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function el(n,e,t,i,o){let r=[];return!o&&!n.isPointInArea(e)||Wo(n,t,e,function(s,l,c){!o&&!jn(s,n.chartArea,0)||s.inRange(e.x,e.y,i)&&r.push({element:s,datasetIndex:l,index:c})},!0),r}function zC(n,e,t,i){let o=[];function r(a,s,l){let{startAngle:c,endAngle:m}=a.getProps(["startAngle","endAngle"],i),{angle:p}=Pr(a,{x:e.x,y:e.y});$n(p,c,m)&&o.push({element:a,datasetIndex:s,index:l})}return Wo(n,t,e,r),o}function jC(n,e,t,i,o,r){let a=[],s=qC(t),l=Number.POSITIVE_INFINITY;function c(m,p,g){let _=m.inRange(e.x,e.y,o);if(i&&!_)return;let C=m.getCenterPoint(o);if(!(!!r||n.isPointInArea(C))&&!_)return;let I=s(e,C);I<l?(a=[{element:m,datasetIndex:p,index:g}],l=I):I===l&&a.push({element:m,datasetIndex:p,index:g})}return Wo(n,t,e,c),a}function nl(n,e,t,i,o,r){return!r&&!n.isPointInArea(e)?[]:t==="r"&&!i?zC(n,e,t,o):jC(n,e,t,i,o,r)}function eu(n,e,t,i,o){let r=[],a=t==="x"?"inXRange":"inYRange",s=!1;return Wo(n,t,e,(l,c,m)=>{l[a](e[t],o)&&(r.push({element:l,datasetIndex:c,index:m}),s=s||l.inRange(e.x,e.y,o))}),i&&!s?[]:r}var KC={evaluateInteractionItems:Wo,modes:{index(n,e,t,i){let o=hn(e,n),r=t.axis||"x",a=t.includeInvisible||!1,s=t.intersect?el(n,o,r,i,a):nl(n,o,r,!1,i,a),l=[];return s.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{let m=s[0].index,p=c.data[m];p&&!p.skip&&l.push({element:p,datasetIndex:c.index,index:m})}),l):[]},dataset(n,e,t,i){let o=hn(e,n),r=t.axis||"xy",a=t.includeInvisible||!1,s=t.intersect?el(n,o,r,i,a):nl(n,o,r,!1,i,a);if(s.length>0){let l=s[0].datasetIndex,c=n.getDatasetMeta(l).data;s=[];for(let m=0;m<c.length;++m)s.push({element:c[m],datasetIndex:l,index:m})}return s},point(n,e,t,i){let o=hn(e,n),r=t.axis||"xy",a=t.includeInvisible||!1;return el(n,o,r,i,a)},nearest(n,e,t,i){let o=hn(e,n),r=t.axis||"xy",a=t.includeInvisible||!1;return nl(n,o,r,t.intersect,i,a)},x(n,e,t,i){let o=hn(e,n);return eu(n,o,"x",t.intersect,i)},y(n,e,t,i){let o=hn(e,n);return eu(n,o,"y",t.intersect,i)}}},Lu=["left","top","right","bottom"];function Do(n,e){return n.filter(t=>t.pos===e)}function nu(n,e){return n.filter(t=>Lu.indexOf(t.pos)===-1&&t.box.axis===e)}function ko(n,e){return n.sort((t,i)=>{let o=e?i:t,r=e?t:i;return o.weight===r.weight?o.index-r.index:o.weight-r.weight})}function XC(n){let e=[],t,i,o,r,a,s;for(t=0,i=(n||[]).length;t<i;++t)o=n[t],{position:r,options:{stack:a,stackWeight:s=1}}=o,e.push({index:t,box:o,pos:r,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&r+a,stackWeight:s});return e}function QC(n){let e={};for(let t of n){let{stack:i,pos:o,stackWeight:r}=t;if(!i||!Lu.includes(o))continue;let a=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return e}function $C(n,e){let t=QC(n),{vBoxMaxWidth:i,hBoxMaxHeight:o}=e,r,a,s;for(r=0,a=n.length;r<a;++r){s=n[r];let{fullSize:l}=s.box,c=t[s.stack],m=c&&s.stackWeight/c.weight;s.horizontal?(s.width=m?m*i:l&&e.availableWidth,s.height=o):(s.width=i,s.height=m?m*o:l&&e.availableHeight)}return t}function ZC(n){let e=XC(n),t=ko(e.filter(c=>c.box.fullSize),!0),i=ko(Do(e,"left"),!0),o=ko(Do(e,"right")),r=ko(Do(e,"top"),!0),a=ko(Do(e,"bottom")),s=nu(e,"x"),l=nu(e,"y");return{fullSize:t,leftAndTop:i.concat(r),rightAndBottom:o.concat(l).concat(a).concat(s),chartArea:Do(e,"chartArea"),vertical:i.concat(o).concat(l),horizontal:r.concat(a).concat(s)}}function iu(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Ru(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function JC(n,e,t,i){let{pos:o,box:r}=t,a=n.maxPadding;if(!st(o)){t.size&&(n[o]-=t.size);let p=i[t.stack]||{size:0,count:1};p.size=Math.max(p.size,t.horizontal?r.height:r.width),t.size=p.size/p.count,n[o]+=t.size}r.getPadding&&Ru(a,r.getPadding());let s=Math.max(0,e.outerWidth-iu(a,n,"left","right")),l=Math.max(0,e.outerHeight-iu(a,n,"top","bottom")),c=s!==n.w,m=l!==n.h;return n.w=s,n.h=l,t.horizontal?{same:c,other:m}:{same:m,other:c}}function tx(n){let e=n.maxPadding;function t(i){let o=Math.max(e[i]-n[i],0);return n[i]+=o,o}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function ex(n,e){let t=e.maxPadding;function i(o){let r={left:0,top:0,right:0,bottom:0};return o.forEach(a=>{r[a]=Math.max(e[a],t[a])}),r}return i(n?["left","right"]:["top","bottom"])}function Eo(n,e,t,i){let o=[],r,a,s,l,c,m;for(r=0,a=n.length,c=0;r<a;++r){s=n[r],l=s.box,l.update(s.width||e.w,s.height||e.h,ex(s.horizontal,e));let{same:p,other:g}=JC(e,t,s,i);c|=p&&o.length,m=m||g,l.fullSize||o.push(s)}return c&&Eo(o,e,t,i)||m}function Kr(n,e,t,i,o){n.top=t,n.left=e,n.right=e+i,n.bottom=t+o,n.width=i,n.height=o}function ou(n,e,t,i){let o=t.padding,{x:r,y:a}=e;for(let s of n){let l=s.box,c=i[s.stack]||{count:1,placed:0,weight:1},m=s.stackWeight/c.weight||1;if(s.horizontal){let p=e.w*m,g=c.size||l.height;Gt(c.start)&&(a=c.start),l.fullSize?Kr(l,o.left,a,t.outerWidth-o.right-o.left,g):Kr(l,e.left+c.placed,a,p,g),c.start=a,c.placed+=p,a=l.bottom}else{let p=e.h*m,g=c.size||l.width;Gt(c.start)&&(r=c.start),l.fullSize?Kr(l,r,o.top,g,t.outerHeight-o.bottom-o.top):Kr(l,r,e.top+c.placed,g,p),c.start=r,c.placed+=p,r=l.right}}e.x=r,e.y=a}dt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var de={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){let t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;let o=Ut(n.options.layout.padding),r=Math.max(e-o.width,0),a=Math.max(t-o.height,0),s=ZC(n.boxes),l=s.vertical,c=s.horizontal;yt(n.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});let m=l.reduce((v,I)=>I.box.options&&I.box.options.display===!1?v:v+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:t,padding:o,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/m,hBoxMaxHeight:a/2}),g=Object.assign({},o);Ru(g,Ut(i));let _=Object.assign({maxPadding:g,w:r,h:a,x:o.left,y:o.top},o),C=$C(l.concat(c),p);Eo(s.fullSize,_,p,C),Eo(l,_,p,C),Eo(c,_,p,C)&&Eo(l,_,p,C),tx(_),ou(s.leftAndTop,_,p,C),_.x+=_.w,_.y+=_.h,ou(s.rightAndBottom,_,p,C),n.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h,height:_.h,width:_.w},yt(s.chartArea,v=>{let I=v.box;Object.assign(I,n.chartArea),I.update(_.w,_.h,{left:0,top:0,right:0,bottom:0})})}},ta=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,o){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,o?Math.floor(t/o):i)}}isAttached(e){return!0}updateConfig(e){}},dl=class extends ta{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},Jr="$chartjs",nx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ru=n=>n===null||n==="";function ix(n,e){let t=n.style,i=n.getAttribute("height"),o=n.getAttribute("width");if(n[Jr]={initial:{height:i,width:o,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ru(o)){let r=Gr(n,"width");r!==void 0&&(n.width=r)}if(ru(i))if(n.style.height==="")n.height=n.width/(e||2);else{let r=Gr(n,"height");r!==void 0&&(n.height=r)}return n}var Wu=Ks?{passive:!0}:!1;function ox(n,e,t){n.addEventListener(e,t,Wu)}function rx(n,e,t){n.canvas.removeEventListener(e,t,Wu)}function ax(n,e){let t=nx[n.type]||n.type,{x:i,y:o}=hn(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:o!==void 0?o:null}}function ea(n,e){for(let t of n)if(t===e||t.contains(e))return!0}function sx(n,e,t){let i=n.canvas,o=new MutationObserver(r=>{let a=!1;for(let s of r)a=a||ea(s.addedNodes,i),a=a&&!ea(s.removedNodes,i);a&&t()});return o.observe(document,{childList:!0,subtree:!0}),o}function lx(n,e,t){let i=n.canvas,o=new MutationObserver(r=>{let a=!1;for(let s of r)a=a||ea(s.removedNodes,i),a=a&&!ea(s.addedNodes,i);a&&t()});return o.observe(document,{childList:!0,subtree:!0}),o}var Bo=new Map,au=0;function Hu(){let n=window.devicePixelRatio;n!==au&&(au=n,Bo.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function cx(n,e){Bo.size||window.addEventListener("resize",Hu),Bo.set(n,e)}function dx(n){Bo.delete(n),Bo.size||window.removeEventListener("resize",Hu)}function ux(n,e,t){let i=n.canvas,o=i&&wo(i);if(!o)return;let r=Ar((s,l)=>{let c=o.clientWidth;t(s,l),c<o.clientWidth&&t()},window),a=new ResizeObserver(s=>{let l=s[0],c=l.contentRect.width,m=l.contentRect.height;c===0&&m===0||r(c,m)});return a.observe(o),cx(n,r),a}function il(n,e,t){t&&t.disconnect(),e==="resize"&&dx(n)}function mx(n,e,t){let i=n.canvas,o=Ar(r=>{n.ctx!==null&&t(ax(r,n))},n,r=>{let a=r[0];return[a,a.offsetX,a.offsetY]});return ox(i,e,o),o}var ul=class extends ta{acquireContext(e,t){let i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(ix(e,t),i):null}releaseContext(e){let t=e.canvas;if(!t[Jr])return!1;let i=t[Jr].initial;["height","width"].forEach(r=>{let a=i[r];ht(a)?t.removeAttribute(r):t.setAttribute(r,a)});let o=i.style||{};return Object.keys(o).forEach(r=>{t.style[r]=o[r]}),t.width=t.width,delete t[Jr],!0}addEventListener(e,t,i){this.removeEventListener(e,t);let o=e.$proxies||(e.$proxies={}),a={attach:sx,detach:lx,resize:ux}[t]||mx;o[t]=a(e,t,i)}removeEventListener(e,t){let i=e.$proxies||(e.$proxies={}),o=i[t];if(!o)return;({attach:il,detach:il,resize:il}[t]||rx)(e,t,o),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,o){return js(e,t,i,o)}isAttached(e){let t=wo(e);return!!(t&&t.isConnected)}};function hx(n){return!Rr()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?dl:ul}var ml=class{constructor(){this._init=[]}notify(e,t,i,o){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));let r=o?this._descriptors(e).filter(o):this._descriptors(e),a=this._notify(r,e,t,i);return t==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,t,i,o){o=o||{};for(let r of e){let a=r.plugin,s=a[i],l=[t,o,r.options];if(St(s,l,a)===!1&&o.cancelable)return!1}return!0}invalidate(){ht(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let i=e&&e.config,o=tt(i.options&&i.options.plugins,{}),r=px(i);return o===!1&&!t?[]:gx(e,r,o,t)}_notifyStateChanges(e){let t=this._oldCache||[],i=this._cache,o=(r,a)=>r.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(o(t,i),e,"stop"),this._notify(o(i,t),e,"start")}};function px(n){let e={},t=[],i=Object.keys(Ze.plugins.items);for(let r=0;r<i.length;r++)t.push(Ze.getPlugin(i[r]));let o=n.plugins||[];for(let r=0;r<o.length;r++){let a=o[r];t.indexOf(a)===-1&&(t.push(a),e[a.id]=!0)}return{plugins:t,localIds:e}}function fx(n,e){return!e&&n===!1?null:n===!0?{}:n}function gx(n,{plugins:e,localIds:t},i,o){let r=[],a=n.getContext();for(let s of e){let l=s.id,c=fx(i[l],o);c!==null&&r.push({plugin:s,options:_x(n.config,{plugin:s,local:t[l]},c,a)})}return r}function _x(n,{plugin:e,local:t},i,o){let r=n.pluginScopeKeys(e),a=n.getOptionScopes(i,r);return t&&e.defaults&&a.push(e.defaults),n.createResolver(a,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function hl(n,e){let t=dt.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function Cx(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function xx(n,e){return n===e?"_index_":"_value_"}function Sx(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function pl(n,e){return n==="x"||n==="y"?n:e.axis||Sx(e.position)||n.charAt(0).toLowerCase()}function bx(n,e){let t=In[n.type]||{scales:{}},i=e.scales||{},o=hl(n.type,e),r=Object.create(null),a=Object.create(null);return Object.keys(i).forEach(s=>{let l=i[s];if(!st(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let c=pl(s,l),m=xx(c,o),p=t.scales||{};r[c]=r[c]||s,a[s]=Kn(Object.create(null),[{axis:c},l,p[c],p[m]])}),n.data.datasets.forEach(s=>{let l=s.type||n.type,c=s.indexAxis||hl(l,e),p=(In[l]||{}).scales||{};Object.keys(p).forEach(g=>{let _=Cx(g,c),C=s[_+"AxisID"]||r[_]||_;a[C]=a[C]||Object.create(null),Kn(a[C],[{axis:_},i[C],p[g]])})}),Object.keys(a).forEach(s=>{let l=a[s];Kn(l,[dt.scales[l.type],dt.scale])}),a}function Gu(n){let e=n.options||(n.options={});e.plugins=tt(e.plugins,{}),e.scales=bx(n,e)}function Yu(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function yx(n){return n=n||{},n.data=Yu(n.data),Gu(n),n}var su=new Map,Uu=new Set;function Xr(n,e){let t=su.get(n);return t||(t=e(),su.set(n,t),Uu.add(t)),t}var Oo=(n,e,t)=>{let i=je(e,t);i!==void 0&&n.add(i)},fl=class{constructor(e){this._config=yx(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Yu(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Gu(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Xr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Xr(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Xr(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,i=this.type;return Xr(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let i=this._scopeCache,o=i.get(e);return(!o||t)&&(o=new Map,i.set(e,o)),o}getOptionScopes(e,t,i){let{options:o,type:r}=this,a=this._cachedScopes(e,i),s=a.get(t);if(s)return s;let l=new Set;t.forEach(m=>{e&&(l.add(e),m.forEach(p=>Oo(l,e,p))),m.forEach(p=>Oo(l,o,p)),m.forEach(p=>Oo(l,In[r]||{},p)),m.forEach(p=>Oo(l,dt,p)),m.forEach(p=>Oo(l,Er,p))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uu.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,In[t]||{},dt.datasets[t]||{},{type:t},dt,Er]}resolveNamedOptions(e,t,i,o=[""]){let r={$shared:!0},{resolver:a,subPrefixes:s}=lu(this._resolverCache,e,o),l=a;if(Ix(a,t)){r.$shared=!1,i=oe(i)?i():i;let c=this.createResolver(e,i,s);l=vn(a,i,c)}for(let c of t)r[c]=l[c];return r}createResolver(e,t,i=[""],o){let{resolver:r}=lu(this._resolverCache,e,i);return st(t)?vn(r,t,void 0,o):r}};function lu(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));let o=t.join(),r=i.get(o);return r||(r={resolver:Mo(e,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},i.set(o,r)),r}var vx=n=>st(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||oe(n[t]),!1);function Ix(n,e){let{isScriptable:t,isIndexable:i}=Vr(n);for(let o of e){let r=t(o),a=i(o),s=(a||r)&&n[o];if(r&&(oe(s)||vx(s))||a&&pt(s))return!0}return!1}var Px="3.9.1",Mx=["top","bottom","left","right","chartArea"];function cu(n,e){return n==="top"||n==="bottom"||Mx.indexOf(n)===-1&&e==="x"}function du(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function uu(n){let e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),St(t&&t.onComplete,[n],e)}function wx(n){let e=n.chart,t=e.options.animation;St(t&&t.onProgress,[n],e)}function qu(n){return Rr()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}var na={},zu=n=>{let e=qu(n);return Object.values(na).filter(t=>t.canvas===e).pop()};function Tx(n,e,t){let i=Object.keys(n);for(let o of i){let r=+o;if(r>=e){let a=n[o];delete n[o],(t>0||r>e)&&(n[r+t]=a)}}}function Ax(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}var Xt=class{constructor(e,t){let i=this.config=new fl(t),o=qu(e),r=zu(o);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||hx(o)),this.platform.updateConfig(i);let s=this.platform.acquireContext(o,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,m=l&&l.width;if(this.id=Ps(),this.ctx=s,this.canvas=l,this.width=m,this.height=c,this._options=a,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 ml,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Fs(p=>this.update(p),a.resizeDelay||0),this._dataChanges=[],na[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}pn.listen(this,"complete",uu),pn.listen(this,"progress",wx),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:o,_aspectRatio:r}=this;return ht(e)?t&&r?r:o?i/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Fr(this.canvas,this.ctx),this}stop(){return pn.stop(this),this}resize(e,t){pn.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let i=this.options,o=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,e,t,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Hr(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),St(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let t=this.options.scales||{};yt(t,(i,o)=>{i.id=o})}buildOrUpdateScales(){let e=this.options,t=e.scales,i=this.scales,o=Object.keys(i).reduce((a,s)=>(a[s]=!1,a),{}),r=[];t&&(r=r.concat(Object.keys(t).map(a=>{let s=t[a],l=pl(a,s),c=l==="r",m=l==="x";return{options:s,dposition:c?"chartArea":m?"bottom":"left",dtype:c?"radialLinear":m?"category":"linear"}}))),yt(r,a=>{let s=a.options,l=s.id,c=pl(l,s),m=tt(s.type,a.dtype);(s.position===void 0||cu(s.position,c)!==cu(a.dposition))&&(s.position=a.dposition),o[l]=!0;let p=null;if(l in i&&i[l].type===m)p=i[l];else{let g=Ze.getScale(m);p=new g({id:l,type:m,ctx:this.ctx,chart:this}),i[p.id]=p}p.init(s,e)}),yt(o,(a,s)=>{a||delete i[s]}),yt(i,a=>{de.configure(this,a,a.options),de.addBox(this,a)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((o,r)=>o.index-r.index),i>t){for(let o=t;o<i;++o)this._destroyDatasetMeta(o);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(du("order","index"))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((i,o)=>{t.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,i,o;for(this._removeUnreferencedMetasets(),i=0,o=t.length;i<o;i++){let r=t[i],a=this.getDatasetMeta(i),s=r.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=s,a.indexAxis=r.indexAxis||hl(s,this.options),a.order=r.order||0,a.index=i,a.label=""+r.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{let l=Ze.getController(s),{datasetElementType:c,dataElementType:m}=dt.datasets[s];Object.assign(l.prototype,{dataElementType:Ze.getElement(m),datasetElementType:c&&Ze.getElement(c)}),a.controller=new l(this,i),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){yt(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let t=this.config;t.update();let i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,m=this.data.datasets.length;c<m;c++){let{controller:p}=this.getDatasetMeta(c),g=!o&&r.indexOf(p)===-1;p.buildOrUpdateElements(g),a=Math.max(+p.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),o||yt(r,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(du("z","_idx"));let{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){yt(this.scales,e=>{de.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!br(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:i,start:o,count:r}of t){let a=i==="_removeElements"?-r:r;Tx(e,o,a)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,i=r=>new Set(e.filter(a=>a[0]===r).map((a,s)=>s+","+a.splice(1).join(","))),o=i(0);for(let r=1;r<t;r++)if(!br(o,i(r)))return;return Array.from(o).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;de.update(this,this.width,this.height,e);let t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],yt(this.boxes,o=>{i&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,r)=>{o._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,oe(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){let i=this.getDatasetMeta(e),o={meta:i,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(i.controller._update(t),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(pn.has(this)?this.attached&&!pn.running(this)&&pn.start(this):(this.draw(),uu({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:i,height:o}=this._resizeBeforeDraw;this._resize(i,o),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){let t=this._sortedMetasets,i=[],o,r;for(o=0,r=t.length;o<r;++o){let a=t[o];(!e||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let t=this.ctx,i=e._clip,o=!i.disabled,r=this.chartArea,a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&Ke(t,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),e.controller.draw(),o&&Xe(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return jn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,o){let r=KC.modes[t];return typeof r=="function"?r(this,e,i,o):[]}getDatasetMeta(e){let t=this.data.datasets[e],i=this._metasets,o=i.filter(r=>r&&r._dataset===t).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=Qe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){let i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){let o=i?"show":"hide",r=this.getDatasetMeta(e),a=r.controller._resolveAnimations(void 0,o);Gt(t)?(r.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),a.update(r,{visible:i}),this.update(s=>s.datasetIndex===e?o:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),pn.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Fr(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete na[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,i=(r,a)=>{t.addEventListener(this,r,a),e[r]=a},o=(r,a,s)=>{r.offsetX=a,r.offsetY=s,this._eventHandler(r)};yt(this.options.events,r=>i(r,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,t=this.platform,i=(l,c)=>{t.addEventListener(this,l,c),e[l]=c},o=(l,c)=>{e[l]&&(t.removeEventListener(this,l,c),delete e[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)},a,s=()=>{o("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,o("resize",r),this._stop(),this._resize(0,0),i("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){yt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},yt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){let o=i?"set":"remove",r,a,s,l;for(t==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+o+"DatasetHoverStyle"]()),s=0,l=e.length;s<l;++s){a=e[s];let c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],i=e.map(({datasetIndex:r,index:a})=>{let s=this.getDatasetMeta(r);if(!s)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:s.data[a],index:a}});!ki(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){let o=this.options.hover,r=(l,c)=>l.filter(m=>!c.some(p=>m.datasetIndex===p.datasetIndex&&m.index===p.index)),a=r(t,e),s=i?e:r(e,t);a.length&&this.updateHoverStyle(a,o.mode,!1),s.length&&o.mode&&this.updateHoverStyle(s,o.mode,!0)}_eventHandler(e,t){let i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},o=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,o)===!1)return;let r=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(r||i.changed)&&this.render(),this}_handleEvent(e,t,i){let{_active:o=[],options:r}=this,a=t,s=this._getActiveElements(e,o,i,a),l=ws(e),c=Ax(e,this._lastEvent,i,l);i&&(this._lastEvent=null,St(r.onHover,[e,s,this],this),l&&St(r.onClick,[e,s,this],this));let m=!ki(s,o);return(m||t)&&(this._active=s,this._updateHoverStyles(s,o,t)),this._lastEvent=c,m}_getActiveElements(e,t,i,o){if(e.type==="mouseout")return[];if(!i)return t;let r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,o)}},mu=()=>yt(Xt.instances,n=>n._plugins.invalidate()),Mn=!0;Object.defineProperties(Xt,{defaults:{enumerable:Mn,value:dt},instances:{enumerable:Mn,value:na},overrides:{enumerable:Mn,value:In},registry:{enumerable:Mn,value:Ze},version:{enumerable:Mn,value:Px},getChart:{enumerable:Mn,value:zu},register:{enumerable:Mn,value:(...n)=>{Ze.add(...n),mu()}},unregister:{enumerable:Mn,value:(...n)=>{Ze.remove(...n),mu()}}});function ju(n,e,t){let{startAngle:i,pixelMargin:o,x:r,y:a,outerRadius:s,innerRadius:l}=e,c=o/s;n.beginPath(),n.arc(r,a,s,i-c,t+c),l>o?(c=o/l,n.arc(r,a,l,t+c,i-c,!0)):n.arc(r,a,o,t+It,i-It),n.closePath(),n.clip()}function Dx(n){return Po(n,["outerStart","outerEnd","innerStart","innerEnd"])}function kx(n,e,t,i){let o=Dx(n.options.borderRadius),r=(t-e)/2,a=Math.min(r,i*e/2),s=l=>{let c=(t-Math.min(r,l))*i/2;return Jt(l,0,Math.min(r,c))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:Jt(o.innerStart,0,a),innerEnd:Jt(o.innerEnd,0,a)}}function Oi(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function gl(n,e,t,i,o,r){let{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:m}=e,p=Math.max(e.outerRadius+i+t-c,0),g=m>0?m+i+t+c:0,_=0,C=o-l;if(i){let j=m>0?m-i:0,it=p>0?p-i:0,rt=(j+it)/2,ft=rt!==0?C*rt/(rt+i):C;_=(C-ft)/2}let v=Math.max(.001,C*p-t/mt)/p,I=(C-v)/2,M=l+I+_,w=o-I-_,{outerStart:k,outerEnd:D,innerStart:A,innerEnd:L}=kx(e,g,p,w-M),W=p-k,U=p-D,q=M+k/W,Q=w-D/U,et=g+A,$=g+L,at=M+A/et,lt=w-L/$;if(n.beginPath(),r){if(n.arc(a,s,p,q,Q),D>0){let rt=Oi(U,Q,a,s);n.arc(rt.x,rt.y,D,Q,w+It)}let j=Oi($,w,a,s);if(n.lineTo(j.x,j.y),L>0){let rt=Oi($,lt,a,s);n.arc(rt.x,rt.y,L,w+It,lt+Math.PI)}if(n.arc(a,s,g,w-L/g,M+A/g,!0),A>0){let rt=Oi(et,at,a,s);n.arc(rt.x,rt.y,A,at+Math.PI,M-It)}let it=Oi(W,M,a,s);if(n.lineTo(it.x,it.y),k>0){let rt=Oi(W,q,a,s);n.arc(rt.x,rt.y,k,M-It,q)}}else{n.moveTo(a,s);let j=Math.cos(q)*p+a,it=Math.sin(q)*p+s;n.lineTo(j,it);let rt=Math.cos(Q)*p+a,ft=Math.sin(Q)*p+s;n.lineTo(rt,ft)}n.closePath()}function Ox(n,e,t,i,o){let{fullCircles:r,startAngle:a,circumference:s}=e,l=e.endAngle;if(r){gl(n,e,t,i,a+xt,o);for(let c=0;c<r;++c)n.fill();isNaN(s)||(l=a+s%xt,s%xt===0&&(l+=xt))}return gl(n,e,t,i,l,o),n.fill(),l}function Ex(n,e,t){let{x:i,y:o,startAngle:r,pixelMargin:a,fullCircles:s}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a,m;for(t&&ju(n,e,r+xt),n.beginPath(),n.arc(i,o,c,r+xt,r,!0),m=0;m<s;++m)n.stroke();for(n.beginPath(),n.arc(i,o,l,r,r+xt),m=0;m<s;++m)n.stroke()}function Fx(n,e,t,i,o,r){let{options:a}=e,{borderWidth:s,borderJoinStyle:l}=a,c=a.borderAlign==="inner";s&&(c?(n.lineWidth=s*2,n.lineJoin=l||"round"):(n.lineWidth=s,n.lineJoin=l||"bevel"),e.fullCircles&&Ex(n,e,c),c&&ju(n,e,o),gl(n,e,t,i,o,r),n.stroke())}var Bi=class extends Kt{constructor(e){super(),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,t,i){let o=this.getProps(["x","y"],i),{angle:r,distance:a}=Pr(o,{x:e,y:t}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:m,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),g=this.options.spacing/2,C=tt(p,l-s)>=xt||$n(r,s,l),v=Ye(a,c+g,m+g);return C&&v}getCenterPoint(e){let{x:t,y:i,startAngle:o,endAngle:r,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:l,spacing:c}=this.options,m=(o+r)/2,p=(a+s+c+l)/2;return{x:t+Math.cos(m)*p,y:i+Math.sin(m)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:i}=this,o=(t.offset||0)/2,r=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>xt?Math.floor(i/xt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let s=0;if(o){s=o/2;let c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*s,Math.sin(c)*s),this.circumference>=mt&&(s=o)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;let l=Ox(e,this,s,r,a);Fx(e,this,s,r,l,a),e.restore()}};Bi.id="arc";Bi.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Bi.defaultRoutes={backgroundColor:"backgroundColor"};function Ku(n,e,t=e){n.lineCap=tt(t.borderCapStyle,e.borderCapStyle),n.setLineDash(tt(t.borderDash,e.borderDash)),n.lineDashOffset=tt(t.borderDashOffset,e.borderDashOffset),n.lineJoin=tt(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=tt(t.borderWidth,e.borderWidth),n.strokeStyle=tt(t.borderColor,e.borderColor)}function Bx(n,e,t){n.lineTo(t.x,t.y)}function Nx(n){return n.stepped?Hs:n.tension||n.cubicInterpolationMode==="monotone"?Gs:Bx}function Xu(n,e,t={}){let i=n.length,{start:o=0,end:r=i-1}=t,{start:a,end:s}=e,l=Math.max(o,a),c=Math.min(r,s),m=o<a&&r<a||o>s&&r>s;return{count:i,start:l,loop:e.loop,ilen:c<l&&!m?i+c-l:c-l}}function Vx(n,e,t,i){let{points:o,options:r}=e,{count:a,start:s,loop:l,ilen:c}=Xu(o,t,i),m=Nx(r),{move:p=!0,reverse:g}=i||{},_,C,v;for(_=0;_<=c;++_)C=o[(s+(g?c-_:_))%a],!C.skip&&(p?(n.moveTo(C.x,C.y),p=!1):m(n,v,C,g,r.stepped),v=C);return l&&(C=o[(s+(g?c:0))%a],m(n,v,C,g,r.stepped)),!!l}function Lx(n,e,t,i){let o=e.points,{count:r,start:a,ilen:s}=Xu(o,t,i),{move:l=!0,reverse:c}=i||{},m=0,p=0,g,_,C,v,I,M,w=D=>(a+(c?s-D:D))%r,k=()=>{v!==I&&(n.lineTo(m,I),n.lineTo(m,v),n.lineTo(m,M))};for(l&&(_=o[w(0)],n.moveTo(_.x,_.y)),g=0;g<=s;++g){if(_=o[w(g)],_.skip)continue;let D=_.x,A=_.y,L=D|0;L===C?(A<v?v=A:A>I&&(I=A),m=(p*m+D)/++p):(k(),n.lineTo(D,A),C=L,p=0,v=I=A),M=A}k()}function _l(n){let e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?Lx:Vx}function Rx(n){return n.stepped?Xs:n.tension||n.cubicInterpolationMode==="monotone"?Qs:ln}function Wx(n,e,t,i){let o=e._path;o||(o=e._path=new Path2D,e.path(o,t,i)&&o.closePath()),Ku(n,e.options),n.stroke(o)}function Hx(n,e,t,i){let{segments:o,options:r}=e,a=_l(e);for(let s of o)Ku(n,r,s.style),n.beginPath(),a(n,e,s,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}var Gx=typeof Path2D=="function";function Yx(n,e,t,i){Gx&&!e.options.segment?Wx(n,e,t,i):Hx(n,e,t,i)}var aa=(()=>{class n extends Kt{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,i){let o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){let r=o.spanGaps?this._loop:this._fullLoop;zs(this._points,o,t,r,i),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=$s(this,this.options.segment))}first(){let t=this.segments,i=this.points;return t.length&&i[t[0].start]}last(){let t=this.segments,i=this.points,o=t.length;return o&&i[t[o-1].end]}interpolate(t,i){let o=this.options,r=t[i],a=this.points,s=zr(this,{property:i,start:r,end:r});if(!s.length)return;let l=[],c=Rx(o),m,p;for(m=0,p=s.length;m<p;++m){let{start:g,end:_}=s[m],C=a[g],v=a[_];if(C===v){l.push(C);continue}let I=Math.abs((r-C[i])/(v[i]-C[i])),M=c(C,v,I,o.stepped);M[i]=t[i],l.push(M)}return l.length===1?l[0]:l}pathSegment(t,i,o){return _l(this)(t,this,i,o)}path(t,i,o){let r=this.segments,a=_l(this),s=this._loop;i=i||0,o=o||this.points.length-i;for(let l of r)s&=a(t,this,l,{start:i,end:i+o-1});return!!s}draw(t,i,o,r){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Yx(t,this,o,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return n.id="line",n.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},n.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},n.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"},n})();function hu(n,e,t,i){let o=n.options,{[t]:r}=n.getProps([t],i);return Math.abs(e-r)<o.radius+o.hitRadius}var Ux=(()=>{class n extends Kt{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,i,o){let r=this.options,{x:a,y:s}=this.getProps(["x","y"],o);return Math.pow(t-a,2)+Math.pow(i-s,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,i){return hu(this,t,"x",i)}inYRange(t,i){return hu(this,t,"y",i)}getCenterPoint(t){let{x:i,y:o}=this.getProps(["x","y"],t);return{x:i,y:o}}size(t){t=t||this.options||{};let i=t.radius||0;i=Math.max(i,i&&t.hoverRadius||0);let o=i&&t.borderWidth||0;return(i+o)*2}draw(t,i){let o=this.options;this.skip||o.radius<.1||!jn(this,i,this.size(o)/2)||(t.strokeStyle=o.borderColor,t.lineWidth=o.borderWidth,t.fillStyle=o.backgroundColor,Io(t,o,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return n.id="point",n.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},n.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},n})();function Qu(n,e){let{x:t,y:i,base:o,width:r,height:a}=n.getProps(["x","y","base","width","height"],e),s,l,c,m,p;return n.horizontal?(p=a/2,s=Math.min(t,o),l=Math.max(t,o),c=i-p,m=i+p):(p=r/2,s=t-p,l=t+p,c=Math.min(i,o),m=Math.max(i,o)),{left:s,top:c,right:l,bottom:m}}function wn(n,e,t,i){return n?0:Jt(e,t,i)}function qx(n,e,t){let i=n.options.borderWidth,o=n.borderSkipped,r=Nr(i);return{t:wn(o.top,r.top,0,t),r:wn(o.right,r.right,0,e),b:wn(o.bottom,r.bottom,0,t),l:wn(o.left,r.left,0,e)}}function zx(n,e,t){let{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),o=n.options.borderRadius,r=Ue(o),a=Math.min(e,t),s=n.borderSkipped,l=i||st(o);return{topLeft:wn(!l||s.top||s.left,r.topLeft,0,a),topRight:wn(!l||s.top||s.right,r.topRight,0,a),bottomLeft:wn(!l||s.bottom||s.left,r.bottomLeft,0,a),bottomRight:wn(!l||s.bottom||s.right,r.bottomRight,0,a)}}function jx(n){let e=Qu(n),t=e.right-e.left,i=e.bottom-e.top,o=qx(n,t/2,i/2),r=zx(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:r},inner:{x:e.left+o.l,y:e.top+o.t,w:t-o.l-o.r,h:i-o.t-o.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,r.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(o.b,o.r))}}}}function ol(n,e,t,i){let o=e===null,r=t===null,s=n&&!(o&&r)&&Qu(n,i);return s&&(o||Ye(e,s.left,s.right))&&(r||Ye(t,s.top,s.bottom))}function Kx(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function Xx(n,e){n.rect(e.x,e.y,e.w,e.h)}function rl(n,e,t={}){let i=n.x!==t.x?-e:0,o=n.y!==t.y?-e:0,r=(n.x+n.w!==t.x+t.w?e:0)-i,a=(n.y+n.h!==t.y+t.h?e:0)-o;return{x:n.x+i,y:n.y+o,w:n.w+r,h:n.h+a,radius:n.radius}}var Ni=class extends Kt{constructor(e){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,e&&Object.assign(this,e)}draw(e){let{inflateAmount:t,options:{borderColor:i,backgroundColor:o}}=this,{inner:r,outer:a}=jx(this),s=Kx(a.radius)?mn:Xx;e.save(),(a.w!==r.w||a.h!==r.h)&&(e.beginPath(),s(e,rl(a,t,r)),e.clip(),s(e,rl(r,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),s(e,rl(r,t)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,t,i){return ol(this,e,t,i)}inXRange(e,t){return ol(this,e,null,t)}inYRange(e,t){return ol(this,null,e,t)}getCenterPoint(e){let{x:t,y:i,base:o,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(t+o)/2:t,y:r?i:(i+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}};Ni.id="bar";Ni.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};Ni.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Qx=Object.freeze({__proto__:null,ArcElement:Bi,LineElement:aa,PointElement:Ux,BarElement:Ni});function $x(n,e,t,i,o){let r=o.samples||i;if(r>=t)return n.slice(e,e+t);let a=[],s=(t-2)/(r-2),l=0,c=e+t-1,m=e,p,g,_,C,v;for(a[l++]=n[m],p=0;p<r-2;p++){let I=0,M=0,w,k=Math.floor((p+1)*s)+1+e,D=Math.min(Math.floor((p+2)*s)+1,t)+e,A=D-k;for(w=k;w<D;w++)I+=n[w].x,M+=n[w].y;I/=A,M/=A;let L=Math.floor(p*s)+1+e,W=Math.min(Math.floor((p+1)*s)+1,t)+e,{x:U,y:q}=n[m];for(_=C=-1,w=L;w<W;w++)C=.5*Math.abs((U-I)*(n[w].y-q)-(U-n[w].x)*(M-q)),C>_&&(_=C,g=n[w],v=w);a[l++]=g,m=v}return a[l++]=n[c],a}function Zx(n,e,t,i){let o=0,r=0,a,s,l,c,m,p,g,_,C,v,I=[],M=e+t-1,w=n[e].x,D=n[M].x-w;for(a=e;a<e+t;++a){s=n[a],l=(s.x-w)/D*i,c=s.y;let A=l|0;if(A===m)c<C?(C=c,p=a):c>v&&(v=c,g=a),o=(r*o+s.x)/++r;else{let L=a-1;if(!ht(p)&&!ht(g)){let W=Math.min(p,g),U=Math.max(p,g);W!==_&&W!==L&&I.push(ze(Pe({},n[W]),{x:o})),U!==_&&U!==L&&I.push(ze(Pe({},n[U]),{x:o}))}a>0&&L!==_&&I.push(n[L]),I.push(s),m=A,r=0,C=v=c,p=g=_=a}}return I}function $u(n){if(n._decimated){let e=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{value:e})}}function pu(n){n.data.datasets.forEach(e=>{$u(e)})}function Jx(n,e){let t=e.length,i=0,o,{iScale:r}=n,{min:a,max:s,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=Jt(We(e,r.axis,a).lo,0,t-1)),c?o=Jt(We(e,r.axis,s).hi+1,i,t)-i:o=t-i,{start:i,count:o}}var tS={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,e,t)=>{if(!t.enabled){pu(n);return}let i=n.width;n.data.datasets.forEach((o,r)=>{let{_data:a,indexAxis:s}=o,l=n.getDatasetMeta(r),c=a||o.data;if(Zn([s,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let m=n.scales[l.xAxisID];if(m.type!=="linear"&&m.type!=="time"||n.options.parsing)return;let{start:p,count:g}=Jx(l,c),_=t.threshold||4*i;if(g<=_){$u(o);return}ht(a)&&(o._data=c,delete o.data,Object.defineProperty(o,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let C;switch(t.algorithm){case"lttb":C=$x(c,p,g,i,t);break;case"min-max":C=Zx(c,p,g,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}o._decimated=C})},destroy(n){pu(n)}};function eS(n,e,t){let i=n.segments,o=n.points,r=e.points,a=[];for(let s of i){let{start:l,end:c}=s;c=yl(l,c,o);let m=Cl(t,o[l],o[c],s.loop);if(!e.segments){a.push({source:s,target:m,start:o[l],end:o[c]});continue}let p=zr(e,m);for(let g of p){let _=Cl(t,r[g.start],r[g.end],g.loop),C=qr(s,o,_);for(let v of C)a.push({source:v,target:g,start:{[t]:fu(m,_,"start",Math.max)},end:{[t]:fu(m,_,"end",Math.min)}})}}return a}function Cl(n,e,t,i){if(i)return;let o=e[n],r=t[n];return n==="angle"&&(o=pe(o),r=pe(r)),{property:n,start:o,end:r}}function nS(n,e){let{x:t=null,y:i=null}=n||{},o=e.points,r=[];return e.segments.forEach(({start:a,end:s})=>{s=yl(a,s,o);let l=o[a],c=o[s];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):t!==null&&(r.push({x:t,y:l.y}),r.push({x:t,y:c.y}))}),r}function yl(n,e,t){for(;e>n;e--){let i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function fu(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function Zu(n,e){let t=[],i=!1;return pt(n)?(i=!0,t=n):t=nS(n,e),t.length?new aa({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function gu(n){return n&&n.fill!==!1}function iS(n,e,t){let o=n[e].fill,r=[e],a;if(!t)return o;for(;o!==!1&&r.indexOf(o)===-1;){if(!Et(o))return o;if(a=n[o],!a)return!1;if(a.visible)return o;r.push(o),o=a.fill}return!1}function oS(n,e,t){let i=lS(n);if(st(i))return isNaN(i.value)?!1:i;let o=parseFloat(i);return Et(o)&&Math.floor(o)===o?rS(i[0],e,o,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function rS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function aS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:st(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function sS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:st(n)?i=n.value:i=e.getBaseValue(),i}function lS(n){let e=n.options,t=e.fill,i=tt(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function cS(n){let{scale:e,index:t,line:i}=n,o=[],r=i.segments,a=i.points,s=dS(e,t);s.push(Zu({x:null,y:e.bottom},i));for(let l=0;l<r.length;l++){let c=r[l];for(let m=c.start;m<=c.end;m++)uS(o,a[m],s)}return new aa({points:o,options:{}})}function dS(n,e){let t=[],i=n.getMatchingVisibleMetas("line");for(let o=0;o<i.length;o++){let r=i[o];if(r.index===e)break;r.hidden||t.unshift(r.dataset)}return t}function uS(n,e,t){let i=[];for(let o=0;o<t.length;o++){let r=t[o],{first:a,last:s,point:l}=mS(r,e,"x");if(!(!l||a&&s)){if(a)i.unshift(l);else if(n.push(l),!s)break}}n.push(...i)}function mS(n,e,t){let i=n.interpolate(e,t);if(!i)return{};let o=i[t],r=n.segments,a=n.points,s=!1,l=!1;for(let c=0;c<r.length;c++){let m=r[c],p=a[m.start][t],g=a[m.end][t];if(Ye(o,p,g)){s=o===p,l=o===g;break}}return{first:s,last:l,point:i}}var ia=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){let{x:o,y:r,radius:a}=this;return t=t||{start:0,end:xt},e.arc(o,r,a,t.end,t.start,!0),!i.bounds}interpolate(e){let{x:t,y:i,radius:o}=this,r=e.angle;return{x:t+Math.cos(r)*o,y:i+Math.sin(r)*o,angle:r}}};function hS(n){let{chart:e,fill:t,line:i}=n;if(Et(t))return pS(e,t);if(t==="stack")return cS(n);if(t==="shape")return!0;let o=fS(n);return o instanceof ia?o:Zu(o,i)}function pS(n,e){let t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function fS(n){return(n.scale||{}).getPointPositionForValue?_S(n):gS(n)}function gS(n){let{scale:e={},fill:t}=n,i=aS(t,e);if(Et(i)){let o=e.isHorizontal();return{x:o?i:null,y:o?null:i}}return null}function _S(n){let{scale:e,fill:t}=n,i=e.options,o=e.getLabels().length,r=i.reverse?e.max:e.min,a=sS(t,e,r),s=[];if(i.grid.circular){let l=e.getPointPositionForValue(0,r);return new ia({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<o;++l)s.push(e.getPointPositionForValue(l,a));return s}function al(n,e,t){let i=hS(e),{line:o,scale:r,axis:a}=e,s=o.options,l=s.fill,c=s.backgroundColor,{above:m=c,below:p=c}=l||{};i&&o.points.length&&(Ke(n,t),CS(n,{line:o,target:i,above:m,below:p,area:t,scale:r,axis:a}),Xe(n))}function CS(n,e){let{line:t,target:i,above:o,below:r,area:a,scale:s}=e,l=t._loop?"angle":e.axis;n.save(),l==="x"&&r!==o&&(_u(n,i,a.top),Cu(n,{line:t,target:i,color:o,scale:s,property:l}),n.restore(),n.save(),_u(n,i,a.bottom)),Cu(n,{line:t,target:i,color:r,scale:s,property:l}),n.restore()}function _u(n,e,t){let{segments:i,points:o}=e,r=!0,a=!1;n.beginPath();for(let s of i){let{start:l,end:c}=s,m=o[l],p=o[yl(l,c,o)];r?(n.moveTo(m.x,m.y),r=!1):(n.lineTo(m.x,t),n.lineTo(m.x,m.y)),a=!!e.pathSegment(n,s,{move:a}),a?n.closePath():n.lineTo(p.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function Cu(n,e){let{line:t,target:i,property:o,color:r,scale:a}=e,s=eS(t,i,o);for(let{source:l,target:c,start:m,end:p}of s){let{style:{backgroundColor:g=r}={}}=l,_=i!==!0;n.save(),n.fillStyle=g,xS(n,a,_&&Cl(o,m,p)),n.beginPath();let C=!!t.pathSegment(n,l),v;if(_){C?n.closePath():xu(n,i,p,o);let I=!!i.pathSegment(n,c,{move:C,reverse:!0});v=C&&I,v||xu(n,i,m,o)}n.closePath(),n.fill(v?"evenodd":"nonzero"),n.restore()}}function xS(n,e,t){let{top:i,bottom:o}=e.chart.chartArea,{property:r,start:a,end:s}=t||{};r==="x"&&(n.beginPath(),n.rect(a,i,s-a,o-i),n.clip())}function xu(n,e,t,i){let o=e.interpolate(t,i);o&&n.lineTo(o.x,o.y)}var SS={id:"filler",afterDatasetsUpdate(n,e,t){let i=(n.data.datasets||[]).length,o=[],r,a,s,l;for(a=0;a<i;++a)r=n.getDatasetMeta(a),s=r.dataset,l=null,s&&s.options&&s instanceof aa&&(l={visible:n.isDatasetVisible(a),index:a,fill:oS(s,a,i),chart:n,axis:r.controller.options.indexAxis,scale:r.vScale,line:s}),r.$filler=l,o.push(l);for(a=0;a<i;++a)l=o[a],!(!l||l.fill===!1)&&(l.fill=iS(o,a,t.propagate))},beforeDraw(n,e,t){let i=t.drawTime==="beforeDraw",o=n.getSortedVisibleDatasetMetas(),r=n.chartArea;for(let a=o.length-1;a>=0;--a){let s=o[a].$filler;s&&(s.line.updateControlPoints(r,s.axis),i&&s.fill&&al(n.ctx,s,r))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;let i=n.getSortedVisibleDatasetMetas();for(let o=i.length-1;o>=0;--o){let r=i[o].$filler;gu(r)&&al(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,e,t){let i=e.meta.$filler;!gu(i)||t.drawTime!=="beforeDatasetDraw"||al(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Su=(n,e)=>{let{boxHeight:t=e,boxWidth:i=e}=n;return n.usePointStyle&&(t=Math.min(t,e),i=n.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:t,itemHeight:Math.max(e,t)}},bS=(n,e)=>n!==null&&e!==null&&n.datasetIndex===e.datasetIndex&&n.index===e.index,oa=class extends Kt{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,t,i){this.maxWidth=e,this.maxHeight=t,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(){let e=this.options.labels||{},t=St(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(i=>e.filter(i,this.chart.data))),e.sort&&(t=t.sort((i,o)=>e.sort(i,o,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let i=e.labels,o=Ft(i.font),r=o.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Su(i,r),c,m;t.font=o.string,this.isHorizontal()?(c=this.maxWidth,m=this._fitRows(a,r,s,l)+10):(m=this.maxHeight,c=this._fitCols(a,r,s,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(m,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,o){let{ctx:r,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],m=o+s,p=e;r.textAlign="left",r.textBaseline="middle";let g=-1,_=-m;return this.legendItems.forEach((C,v)=>{let I=i+t/2+r.measureText(C.text).width;(v===0||c[c.length-1]+I+2*s>a)&&(p+=m,c[c.length-(v>0?0:1)]=0,_+=m,g++),l[v]={left:0,top:_,row:g,width:I,height:o},c[c.length-1]+=I+s}),p}_fitCols(e,t,i,o){let{ctx:r,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],m=a-e,p=s,g=0,_=0,C=0,v=0;return this.legendItems.forEach((I,M)=>{let w=i+t/2+r.measureText(I.text).width;M>0&&_+o+2*s>m&&(p+=g+s,c.push({width:g,height:_}),C+=g+s,v++,g=_=0),l[M]={left:C,top:_,col:v,width:w,height:o},g=Math.max(g,w),_+=o+s}),p+=g,c.push({width:g,height:_}),p}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:o},rtl:r}}=this,a=Pn(r,this.left,this.width);if(this.isHorizontal()){let s=0,l=ie(i,this.left+o,this.right-this.lineWidths[s]);for(let c of t)s!==c.row&&(s=c.row,l=ie(i,this.left+o,this.right-this.lineWidths[s])),c.top+=this.top+e+o,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+o}else{let s=0,l=ie(i,this.top+e+o,this.bottom-this.columnSizes[s].height);for(let c of t)c.col!==s&&(s=c.col,l=ie(i,this.top+e+o,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+o,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;Ke(e,this),this._draw(),Xe(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:i,ctx:o}=this,{align:r,labels:a}=e,s=dt.color,l=Pn(e.rtl,this.left,this.width),c=Ft(a.font),{color:m,padding:p}=a,g=c.size,_=g/2,C;this.drawTitle(),o.textAlign=l.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=c.string;let{boxWidth:v,boxHeight:I,itemHeight:M}=Su(a,g),w=function(W,U,q){if(isNaN(v)||v<=0||isNaN(I)||I<0)return;o.save();let Q=tt(q.lineWidth,1);if(o.fillStyle=tt(q.fillStyle,s),o.lineCap=tt(q.lineCap,"butt"),o.lineDashOffset=tt(q.lineDashOffset,0),o.lineJoin=tt(q.lineJoin,"miter"),o.lineWidth=Q,o.strokeStyle=tt(q.strokeStyle,s),o.setLineDash(tt(q.lineDash,[])),a.usePointStyle){let et={radius:I*Math.SQRT2/2,pointStyle:q.pointStyle,rotation:q.rotation,borderWidth:Q},$=l.xPlus(W,v/2),at=U+_;Br(o,et,$,at,a.pointStyleWidth&&v)}else{let et=U+Math.max((g-I)/2,0),$=l.leftForLtr(W,v),at=Ue(q.borderRadius);o.beginPath(),Object.values(at).some(lt=>lt!==0)?mn(o,{x:$,y:et,w:v,h:I,radius:at}):o.rect($,et,v,I),o.fill(),Q!==0&&o.stroke()}o.restore()},k=function(W,U,q){un(o,q.text,W,U+M/2,c,{strikethrough:q.hidden,textAlign:l.textAlign(q.textAlign)})},D=this.isHorizontal(),A=this._computeTitleHeight();D?C={x:ie(r,this.left+p,this.right-i[0]),y:this.top+p+A,line:0}:C={x:this.left+p,y:ie(r,this.top+A+p,this.bottom-t[0].height),line:0},Yr(this.ctx,e.textDirection);let L=M+p;this.legendItems.forEach((W,U)=>{o.strokeStyle=W.fontColor||m,o.fillStyle=W.fontColor||m;let q=o.measureText(W.text).width,Q=l.textAlign(W.textAlign||(W.textAlign=a.textAlign)),et=v+_+q,$=C.x,at=C.y;l.setWidth(this.width),D?U>0&&$+et+p>this.right&&(at=C.y+=L,C.line++,$=C.x=ie(r,this.left+p,this.right-i[C.line])):U>0&&at+L>this.bottom&&($=C.x=$+t[C.line].width+p,C.line++,at=C.y=ie(r,this.top+A+p,this.bottom-t[C.line].height));let lt=l.x($);w(lt,at,W),$=Bs(Q,$+v+_,D?$+et:this.right,e.rtl),k(l.x($),at,W),D?C.x+=et+p:C.y+=L}),Ur(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,i=Ft(t.font),o=Ut(t.padding);if(!t.display)return;let r=Pn(e.rtl,this.left,this.width),a=this.ctx,s=t.position,l=i.size/2,c=o.top+l,m,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),m=this.top+c,p=ie(e.align,p,this.right-g);else{let C=this.columnSizes.reduce((v,I)=>Math.max(v,I.height),0);m=c+ie(e.align,this.top,this.bottom-C-e.labels.padding-this._computeTitleHeight())}let _=ie(s,p,p+g);a.textAlign=r.textAlign(yo(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,un(a,t.text,_,m,i)}_computeTitleHeight(){let e=this.options.title,t=Ft(e.font),i=Ut(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,o,r;if(Ye(e,this.left,this.right)&&Ye(t,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(o=r[i],Ye(e,o.left,o.left+o.width)&&Ye(t,o.top,o.top+o.height))return this.legendItems[i]}return null}handleEvent(e){let t=this.options;if(!yS(e.type,t))return;let i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){let o=this._hoveredItem,r=bS(o,i);o&&!r&&St(t.onLeave,[e,o,this],this),this._hoveredItem=i,i&&!r&&St(t.onHover,[e,i,this],this)}else i&&St(t.onClick,[e,i,this],this)}};function yS(n,e){return!!((n==="mousemove"||n==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(n==="click"||n==="mouseup"))}var vS={id:"legend",_element:oa,start(n,e,t){let i=n.legend=new oa({ctx:n.ctx,options:t,chart:n});de.configure(n,i,t),de.addBox(n,i)},stop(n){de.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,e,t){let i=n.legend;de.configure(n,i,t),i.options=t},afterUpdate(n){let e=n.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(n,e){e.replay||n.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,e,t){let i=e.datasetIndex,o=t.chart;o.isDatasetVisible(i)?(o.hide(i),e.hidden=!0):(o.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){let e=n.data.datasets,{labels:{usePointStyle:t,pointStyle:i,textAlign:o,color:r}}=n.legend.options;return n._getSortedDatasetMetas().map(a=>{let s=a.controller.getStyle(t?0:void 0),l=Ut(s.borderWidth);return{text:e[a.index].label,fillStyle:s.backgroundColor,fontColor:r,hidden:!a.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:s.borderColor,pointStyle:i||s.pointStyle,rotation:s.rotation,textAlign:o||s.textAlign,borderRadius:0,datasetIndex:a.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)}}},No=class extends Kt{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,t){let 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=e,this.height=this.bottom=t;let o=pt(i.text)?i.text.length:1;this._padding=Ut(i.padding);let r=o*Ft(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:t,left:i,bottom:o,right:r,options:a}=this,s=a.align,l=0,c,m,p;return this.isHorizontal()?(m=ie(s,i,r),p=t+e,c=r-i):(a.position==="left"?(m=i+e,p=ie(s,o,t),l=mt*-.5):(m=r-e,p=ie(s,t,o),l=mt*.5),c=o-t),{titleX:m,titleY:p,maxWidth:c,rotation:l}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let i=Ft(t.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:s,maxWidth:l,rotation:c}=this._drawArgs(r);un(e,t.text,0,0,i,{color:t.color,maxWidth:l,rotation:c,textAlign:yo(t.align),textBaseline:"middle",translation:[a,s]})}};function IS(n,e){let t=new No({ctx:n.ctx,options:e,chart:n});de.configure(n,t,e),de.addBox(n,t),n.titleBlock=t}var PS={id:"title",_element:No,start(n,e,t){IS(n,t)},stop(n){let e=n.titleBlock;de.removeBox(n,e),delete n.titleBlock},beforeUpdate(n,e,t){let i=n.titleBlock;de.configure(n,i,t),i.options=t},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}},Qr=new WeakMap,MS={id:"subtitle",start(n,e,t){let i=new No({ctx:n.ctx,options:t,chart:n});de.configure(n,i,t),de.addBox(n,i),Qr.set(n,i)},stop(n){de.removeBox(n,Qr.get(n)),Qr.delete(n)},beforeUpdate(n,e,t){let i=Qr.get(n);de.configure(n,i,t),i.options=t},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}},Fo={average(n){if(!n.length)return!1;let e,t,i=0,o=0,r=0;for(e=0,t=n.length;e<t;++e){let a=n[e].element;if(a&&a.hasValue()){let s=a.tooltipPosition();i+=s.x,o+=s.y,++r}}return{x:i/r,y:o/r}},nearest(n,e){if(!n.length)return!1;let t=e.x,i=e.y,o=Number.POSITIVE_INFINITY,r,a,s;for(r=0,a=n.length;r<a;++r){let l=n[r].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),m=cn(e,c);m<o&&(o=m,s=l)}}if(s){let l=s.tooltipPosition();t=l.x,i=l.y}return{x:t,y:i}}};function $e(n,e){return e&&(pt(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function fn(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
`)>-1?n.split(`
`):n}function wS(n,e){let{element:t,datasetIndex:i,index:o}=e,r=n.getDatasetMeta(i).controller,{label:a,value:s}=r.getLabelAndValue(o);return{chart:n,label:a,parsed:r.getParsed(o),raw:n.data.datasets[i].data[o],formattedValue:s,dataset:r.getDataset(),dataIndex:o,datasetIndex:i,element:t}}function bu(n,e){let t=n.chart.ctx,{body:i,footer:o,title:r}=n,{boxWidth:a,boxHeight:s}=e,l=Ft(e.bodyFont),c=Ft(e.titleFont),m=Ft(e.footerFont),p=r.length,g=o.length,_=i.length,C=Ut(e.padding),v=C.height,I=0,M=i.reduce((D,A)=>D+A.before.length+A.lines.length+A.after.length,0);if(M+=n.beforeBody.length+n.afterBody.length,p&&(v+=p*c.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),M){let D=e.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=_*D+(M-_)*l.lineHeight+(M-1)*e.bodySpacing}g&&(v+=e.footerMarginTop+g*m.lineHeight+(g-1)*e.footerSpacing);let w=0,k=function(D){I=Math.max(I,t.measureText(D).width+w)};return t.save(),t.font=c.string,yt(n.title,k),t.font=l.string,yt(n.beforeBody.concat(n.afterBody),k),w=e.displayColors?a+2+e.boxPadding:0,yt(i,D=>{yt(D.before,k),yt(D.lines,k),yt(D.after,k)}),w=0,t.font=m.string,yt(n.footer,k),t.restore(),I+=C.width,{width:I,height:v}}function TS(n,e){let{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function AS(n,e,t,i){let{x:o,width:r}=i,a=t.caretSize+t.caretPadding;if(n==="left"&&o+r+a>e.width||n==="right"&&o-r-a<0)return!0}function DS(n,e,t,i){let{x:o,width:r}=t,{width:a,chartArea:{left:s,right:l}}=n,c="center";return i==="center"?c=o<=(s+l)/2?"left":"right":o<=r/2?c="left":o>=a-r/2&&(c="right"),AS(c,n,e,t)&&(c="center"),c}function yu(n,e,t){let i=t.yAlign||e.yAlign||TS(n,t);return{xAlign:t.xAlign||e.xAlign||DS(n,e,t,i),yAlign:i}}function kS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function OS(n,e,t){let{y:i,height:o}=n;return e==="top"?i+=t:e==="bottom"?i-=o+t:i-=o/2,i}function vu(n,e,t,i){let{caretSize:o,caretPadding:r,cornerRadius:a}=n,{xAlign:s,yAlign:l}=t,c=o+r,{topLeft:m,topRight:p,bottomLeft:g,bottomRight:_}=Ue(a),C=kS(e,s),v=OS(e,l,c);return l==="center"?s==="left"?C+=c:s==="right"&&(C-=c):s==="left"?C-=Math.max(m,g)+o:s==="right"&&(C+=Math.max(p,_)+o),{x:Jt(C,0,i.width-e.width),y:Jt(v,0,i.height-e.height)}}function $r(n,e,t){let i=Ut(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Iu(n){return $e([],fn(n))}function ES(n,e,t){return Qe(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Pu(n,e){let t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}var Mu=(()=>{class n extends Kt{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||t._chart,this._chart=this.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(){let t=this._cachedAnimations;if(t)return t;let i=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&i.options.animation&&o.animations,a=new Fi(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=ES(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){let{callbacks:o}=i,r=o.beforeTitle.apply(this,[t]),a=o.title.apply(this,[t]),s=o.afterTitle.apply(this,[t]),l=[];return l=$e(l,fn(r)),l=$e(l,fn(a)),l=$e(l,fn(s)),l}getBeforeBody(t,i){return Iu(i.callbacks.beforeBody.apply(this,[t]))}getBody(t,i){let{callbacks:o}=i,r=[];return yt(t,a=>{let s={before:[],lines:[],after:[]},l=Pu(o,a);$e(s.before,fn(l.beforeLabel.call(this,a))),$e(s.lines,l.label.call(this,a)),$e(s.after,fn(l.afterLabel.call(this,a))),r.push(s)}),r}getAfterBody(t,i){return Iu(i.callbacks.afterBody.apply(this,[t]))}getFooter(t,i){let{callbacks:o}=i,r=o.beforeFooter.apply(this,[t]),a=o.footer.apply(this,[t]),s=o.afterFooter.apply(this,[t]),l=[];return l=$e(l,fn(r)),l=$e(l,fn(a)),l=$e(l,fn(s)),l}_createItems(t){let i=this._active,o=this.chart.data,r=[],a=[],s=[],l=[],c,m;for(c=0,m=i.length;c<m;++c)l.push(wS(this.chart,i[c]));return t.filter&&(l=l.filter((p,g,_)=>t.filter(p,g,_,o))),t.itemSort&&(l=l.sort((p,g)=>t.itemSort(p,g,o))),yt(l,p=>{let g=Pu(t.callbacks,p);r.push(g.labelColor.call(this,p)),a.push(g.labelPointStyle.call(this,p)),s.push(g.labelTextColor.call(this,p))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(t,i){let o=this.options.setContext(this.getContext()),r=this._active,a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{let l=Fo[o.position].call(this,r,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);let c=this._size=bu(this,o),m=Object.assign({},l,c),p=yu(this.chart,o,m),g=vu(o,m,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,a={opacity:1,x:g.x,y:g.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,o,r){let a=this.getCaretPosition(t,o,r);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)}getCaretPosition(t,i,o){let{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:l}=o,{topLeft:c,topRight:m,bottomLeft:p,bottomRight:g}=Ue(l),{x:_,y:C}=t,{width:v,height:I}=i,M,w,k,D,A,L;return a==="center"?(A=C+I/2,r==="left"?(M=_,w=M-s,D=A+s,L=A-s):(M=_+v,w=M+s,D=A-s,L=A+s),k=M):(r==="left"?w=_+Math.max(c,p)+s:r==="right"?w=_+v-Math.max(m,g)-s:w=this.caretX,a==="top"?(D=C,A=D-s,M=w-s,k=w+s):(D=C+I,A=D+s,M=w+s,k=w-s),L=D),{x1:M,x2:w,x3:k,y1:D,y2:A,y3:L}}drawTitle(t,i,o){let r=this.title,a=r.length,s,l,c;if(a){let m=Pn(o.rtl,this.x,this.width);for(t.x=$r(this,o.titleAlign,o),i.textAlign=m.textAlign(o.titleAlign),i.textBaseline="middle",s=Ft(o.titleFont),l=o.titleSpacing,i.fillStyle=o.titleColor,i.font=s.string,c=0;c<a;++c)i.fillText(r[c],m.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+l,c+1===a&&(t.y+=o.titleMarginBottom-l)}}_drawColorBox(t,i,o,r,a){let s=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:m,boxPadding:p}=a,g=Ft(a.bodyFont),_=$r(this,"left",a),C=r.x(_),v=c<g.lineHeight?(g.lineHeight-c)/2:0,I=i.y+v;if(a.usePointStyle){let M={radius:Math.min(m,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},w=r.leftForLtr(C,m)+m/2,k=I+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Io(t,M,w,k),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Io(t,M,w,k)}else{t.lineWidth=st(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;let M=r.leftForLtr(C,m-p),w=r.leftForLtr(r.xPlus(C,1),m-p-2),k=Ue(s.borderRadius);Object.values(k).some(D=>D!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,mn(t,{x:M,y:I,w:m,h:c,radius:k}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),mn(t,{x:w,y:I+1,w:m-2,h:c-2,radius:k}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(M,I,m,c),t.strokeRect(M,I,m,c),t.fillStyle=s.backgroundColor,t.fillRect(w,I+1,m-2,c-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,i,o){let{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:m,boxPadding:p}=o,g=Ft(o.bodyFont),_=g.lineHeight,C=0,v=Pn(o.rtl,this.x,this.width),I=function(q){i.fillText(q,v.x(t.x+C),t.y+_/2),t.y+=_+a},M=v.textAlign(s),w,k,D,A,L,W,U;for(i.textAlign=s,i.textBaseline="middle",i.font=g.string,t.x=$r(this,M,o),i.fillStyle=o.bodyColor,yt(this.beforeBody,I),C=l&&M!=="right"?s==="center"?m/2+p:m+2+p:0,A=0,W=r.length;A<W;++A){for(w=r[A],k=this.labelTextColors[A],i.fillStyle=k,yt(w.before,I),D=w.lines,l&&D.length&&(this._drawColorBox(i,t,A,v,o),_=Math.max(g.lineHeight,c)),L=0,U=D.length;L<U;++L)I(D[L]),_=g.lineHeight;yt(w.after,I)}C=0,_=g.lineHeight,yt(this.afterBody,I),t.y-=a}drawFooter(t,i,o){let r=this.footer,a=r.length,s,l;if(a){let c=Pn(o.rtl,this.x,this.width);for(t.x=$r(this,o.footerAlign,o),t.y+=o.footerMarginTop,i.textAlign=c.textAlign(o.footerAlign),i.textBaseline="middle",s=Ft(o.footerFont),i.fillStyle=o.footerColor,i.font=s.string,l=0;l<a;++l)i.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o.footerSpacing}}drawBackground(t,i,o,r){let{xAlign:a,yAlign:s}=this,{x:l,y:c}=t,{width:m,height:p}=o,{topLeft:g,topRight:_,bottomLeft:C,bottomRight:v}=Ue(r.cornerRadius);i.fillStyle=r.backgroundColor,i.strokeStyle=r.borderColor,i.lineWidth=r.borderWidth,i.beginPath(),i.moveTo(l+g,c),s==="top"&&this.drawCaret(t,i,o,r),i.lineTo(l+m-_,c),i.quadraticCurveTo(l+m,c,l+m,c+_),s==="center"&&a==="right"&&this.drawCaret(t,i,o,r),i.lineTo(l+m,c+p-v),i.quadraticCurveTo(l+m,c+p,l+m-v,c+p),s==="bottom"&&this.drawCaret(t,i,o,r),i.lineTo(l+C,c+p),i.quadraticCurveTo(l,c+p,l,c+p-C),s==="center"&&a==="left"&&this.drawCaret(t,i,o,r),i.lineTo(l,c+g),i.quadraticCurveTo(l,c,l+g,c),i.closePath(),i.fill(),r.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){let i=this.chart,o=this.$animations,r=o&&o.x,a=o&&o.y;if(r||a){let s=Fo[t.position].call(this,this._active,this._eventPosition);if(!s)return;let l=this._size=bu(this,t),c=Object.assign({},s,this._size),m=yu(i,t,c),p=vu(t,c,m,i);(r._to!==p.x||a._to!==p.y)&&(this.xAlign=m.xAlign,this.yAlign=m.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){let i=this.options.setContext(this.getContext()),o=this.opacity;if(!o)return;this._updateAnimationTarget(i);let r={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;let s=Ut(i.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&l&&(t.save(),t.globalAlpha=o,this.drawBackground(a,t,r,i),Yr(t,i.textDirection),a.y+=s.top,this.drawTitle(a,t,i),this.drawBody(a,t,i),this.drawFooter(a,t,i),Ur(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){let o=this._active,r=t.map(({datasetIndex:l,index:c})=>{let m=this.chart.getDatasetMeta(l);if(!m)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:m.data[c],index:c}}),a=!ki(o,r),s=this._positionChanged(r,i);(a||s)&&(this._active=r,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,o=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,a=this._active||[],s=this._getActiveElements(t,a,i,o),l=this._positionChanged(s,t),c=i||!ki(s,a)||l;return c&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),c}_getActiveElements(t,i,o,r){let a=this.options;if(t.type==="mouseout")return[];if(!r)return i;let s=this.chart.getElementsAtEventForMode(t,a.mode,a,o);return a.reverse&&s.reverse(),s}_positionChanged(t,i){let{caretX:o,caretY:r,options:a}=this,s=Fo[a.position].call(this,t,i);return s!==!1&&(o!==s.x||r!==s.y)}}return n.positioners=Fo,n})(),vl={id:"tooltip",_element:Mu,positioners:Fo,afterInit(n,e,t){t&&(n.tooltip=new Mu({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){let e=n.tooltip;if(e&&e._willRender()){let t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){let t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.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,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.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:{beforeTitle:He,title(n){if(n.length>0){let e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:He,beforeBody:He,beforeLabel:He,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");let t=n.formattedValue;return ht(t)||(e+=t),e},labelColor(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:He,afterBody:He,beforeFooter:He,footer:He,afterFooter:He}},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"]},FS=Object.freeze({__proto__:null,Decimation:tS,Filler:SS,Legend:vS,SubTitle:MS,Title:PS,Tooltip:vl}),BS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function NS(n,e,t,i){let o=n.indexOf(e);if(o===-1)return BS(n,e,t,i);let r=n.lastIndexOf(e);return o!==r?t:o}var VS=(n,e)=>n===null?null:Jt(Math.round(n),0,e),Vi=class extends ei{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let i=this.getLabels();for(let{index:o,label:r}of t)i[o]===r&&i.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ht(e))return null;let i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:NS(i,e,tt(t,e),this._addedLabels),VS(t,i.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:i,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(o=this.getLabels().length-1)),this.min=i,this.max=o}buildTicks(){let e=this.min,t=this.max,i=this.options.offset,o=[],r=this.getLabels();r=e===0&&t===r.length-1?r:r.slice(e,t+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=e;a<=t;a++)o.push({value:a});return o}getLabelForValue(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};Vi.id="category";Vi.defaults={ticks:{callback:Vi.prototype.getLabelForValue}};function LS(n,e){let t=[],{bounds:o,step:r,min:a,max:s,precision:l,count:c,maxTicks:m,maxDigits:p,includeBounds:g}=n,_=r||1,C=m-1,{min:v,max:I}=e,M=!ht(a),w=!ht(s),k=!ht(c),D=(I-v)/(p+1),A=yr((I-v)/C/_)*_,L,W,U,q;if(A<1e-14&&!M&&!w)return[{value:v},{value:I}];q=Math.ceil(I/A)-Math.floor(v/A),q>C&&(A=yr(q*A/C/_)*_),ht(l)||(L=Math.pow(10,l),A=Math.ceil(A*L)/L),o==="ticks"?(W=Math.floor(v/A)*A,U=Math.ceil(I/A)*A):(W=v,U=I),M&&w&&r&&As((s-a)/r,A/1e3)?(q=Math.round(Math.min((s-a)/A,m)),A=(s-a)/q,W=a,U=s):k?(W=M?a:W,U=w?s:U,q=c-1,A=(U-W)/q):(q=(U-W)/A,Xn(q,Math.round(q),A/1e3)?q=Math.round(q):q=Math.ceil(q));let Q=Math.max(Ir(A),Ir(W));L=Math.pow(10,ht(l)?Q:l),W=Math.round(W*L)/L,U=Math.round(U*L)/L;let et=0;for(M&&(g&&W!==a?(t.push({value:a}),W<a&&et++,Xn(Math.round((W+et*A)*L)/L,a,wu(a,D,n))&&et++):W<a&&et++);et<q;++et)t.push({value:Math.round((W+et*A)*L)/L});return w&&g&&U!==s?t.length&&Xn(t[t.length-1].value,s,wu(s,D,n))?t[t.length-1].value=s:t.push({value:s}):(!w||U===s)&&t.push({value:U}),t}function wu(n,e,{horizontal:t,minRotation:i}){let o=Yt(i),r=(t?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+n).length;return Math.min(e/r,a)}var Li=class extends ei{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return ht(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds(),{min:o,max:r}=this,a=l=>o=t?o:l,s=l=>r=i?r:l;if(e){let l=Oe(o),c=Oe(r);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(o===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||o<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),s(r+l),e||a(o-l)}this.min=o,this.max=r}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:t,stepSize:i}=e,o;return i?(o=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),t=t||11),t&&(o=Math.min(t,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,i=this.getTickLimit();i=Math.max(2,i);let o={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},r=this._range||this,a=LS(o,r);return e.bounds==="ticks"&&vr(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let e=this.ticks,t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){let o=(i-t)/Math.max(e.length-1,1)/2;t-=o,i+=o}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Jn(e,this.chart.options.locale,this.options.ticks.format)}},Vo=class extends Li{determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=Et(e)?e:0,this.max=Et(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,i=Yt(this.options.ticks.minRotation),o=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}};Vo.id="linear";Vo.defaults={ticks:{callback:ra.formatters.numeric}};function Tu(n){return n/Math.pow(10,Math.floor(Ce(n)))===1}function RS(n,e){let t=Math.floor(Ce(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),o=[],r=_e(n.min,Math.pow(10,Math.floor(Ce(e.min)))),a=Math.floor(Ce(r)),s=Math.floor(r/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do o.push({value:r,major:Tu(r)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),r=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<i);let c=_e(n.max,r);return o.push({value:c,major:Tu(r)}),o}var Lo=class extends ei{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let i=Li.prototype.parse.apply(this,[e,t]);if(i===0){this._zero=!0;return}return Et(i)&&i>0?i:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=Et(e)?Math.max(0,e):null,this.max=Et(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),i=this.min,o=this.max,r=l=>i=e?i:l,a=l=>o=t?o:l,s=(l,c)=>Math.pow(10,Math.floor(Ce(l))+c);i===o&&(i<=0?(r(1),a(10)):(r(s(i,-1)),a(s(o,1)))),i<=0&&r(s(o,-1)),o<=0&&a(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=o}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},i=RS(t,this);return e.bounds==="ticks"&&vr(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Jn(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Ce(e),this._valueRange=Ce(this.max)-Ce(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ce(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};Lo.id="logarithmic";Lo.defaults={ticks:{callback:ra.formatters.logarithmic,major:{enabled:!0}}};function xl(n){let e=n.ticks;if(e.display&&n.display){let t=Ut(e.backdropPadding);return tt(e.font&&e.font.size,dt.font.size)+t.height}return 0}function WS(n,e,t){return t=pt(t)?t:[t],{w:Ws(n,e.string,t),h:t.length*e.lineHeight}}function Au(n,e,t,i,o){return n===i||n===o?{start:e-t/2,end:e+t/2}:n<i||n>o?{start:e-t,end:e}:{start:e,end:e+t}}function HS(n){let e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],o=[],r=n._pointLabels.length,a=n.options.pointLabels,s=a.centerPointLabels?mt/r:0;for(let l=0;l<r;l++){let c=a.setContext(n.getPointLabelContext(l));o[l]=c.padding;let m=n.getPointPosition(l,n.drawingArea+o[l],s),p=Ft(c.font),g=WS(n.ctx,p,n._pointLabels[l]);i[l]=g;let _=pe(n.getIndexAngle(l)+s),C=Math.round(Qn(_)),v=Au(C,m.x,g.w,0,180),I=Au(C,m.y,g.h,90,270);GS(t,e,_,v,I)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=YS(n,i,o)}function GS(n,e,t,i,o){let r=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t)),s=0,l=0;i.start<e.l?(s=(e.l-i.start)/r,n.l=Math.min(n.l,e.l-s)):i.end>e.r&&(s=(i.end-e.r)/r,n.r=Math.max(n.r,e.r+s)),o.start<e.t?(l=(e.t-o.start)/a,n.t=Math.min(n.t,e.t-l)):o.end>e.b&&(l=(o.end-e.b)/a,n.b=Math.max(n.b,e.b+l))}function YS(n,e,t){let i=[],o=n._pointLabels.length,r=n.options,a=xl(r)/2,s=n.drawingArea,l=r.pointLabels.centerPointLabels?mt/o:0;for(let c=0;c<o;c++){let m=n.getPointPosition(c,s+a+t[c],l),p=Math.round(Qn(pe(m.angle+It))),g=e[c],_=zS(m.y,g.h,p),C=US(p),v=qS(m.x,g.w,C);i.push({x:m.x,y:_,textAlign:C,left:v,top:_,right:v+g.w,bottom:_+g.h})}return i}function US(n){return n===0||n===180?"center":n<180?"left":"right"}function qS(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function zS(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function jS(n,e){let{ctx:t,options:{pointLabels:i}}=n;for(let o=e-1;o>=0;o--){let r=i.setContext(n.getPointLabelContext(o)),a=Ft(r.font),{x:s,y:l,textAlign:c,left:m,top:p,right:g,bottom:_}=n._pointLabelItems[o],{backdropColor:C}=r;if(!ht(C)){let v=Ue(r.borderRadius),I=Ut(r.backdropPadding);t.fillStyle=C;let M=m-I.left,w=p-I.top,k=g-m+I.width,D=_-p+I.height;Object.values(v).some(A=>A!==0)?(t.beginPath(),mn(t,{x:M,y:w,w:k,h:D,radius:v}),t.fill()):t.fillRect(M,w,k,D)}un(t,n._pointLabels[o],s,l+a.lineHeight/2,a,{color:r.color,textAlign:c,textBaseline:"middle"})}}function Ju(n,e,t,i){let{ctx:o}=n;if(t)o.arc(n.xCenter,n.yCenter,e,0,xt);else{let r=n.getPointPosition(0,e);o.moveTo(r.x,r.y);for(let a=1;a<i;a++)r=n.getPointPosition(a,e),o.lineTo(r.x,r.y)}}function KS(n,e,t,i){let o=n.ctx,r=e.circular,{color:a,lineWidth:s}=e;!r&&!i||!a||!s||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=s,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Ju(n,t,r,i),o.closePath(),o.stroke(),o.restore())}function XS(n,e,t){return Qe(n,{label:t,index:e,type:"pointLabel"})}var ni=class extends Li{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=Ut(xl(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=Et(e)&&!isNaN(e)?e:0,this.max=Et(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/xl(this.options))}generateTickLabels(e){Li.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{let o=St(this.options.pointLabels.callback,[t,i],this);return o||o===0?o:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){let e=this.options;e.display&&e.pointLabels.display?HS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,o){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,o))}getIndexAngle(e){let t=xt/(this._pointLabels.length||1),i=this.options.startAngle||0;return pe(e*t+Yt(i))}getDistanceFromCenterForValue(e){if(ht(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(ht(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let i=t[e];return XS(this.getContext(),e,i)}}getPointPosition(e,t,i=0){let o=this.getIndexAngle(e)-It+i;return{x:Math.cos(o)*t+this.xCenter,y:Math.sin(o)*t+this.yCenter,angle:o}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:i,right:o,bottom:r}=this._pointLabelItems[e];return{left:t,top:i,right:o,bottom:r}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let i=this.ctx;i.save(),i.beginPath(),Ju(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:i,grid:o}=t,r=this._pointLabels.length,a,s,l;if(t.pointLabels.display&&jS(this,r),o.display&&this.ticks.forEach((c,m)=>{if(m!==0){s=this.getDistanceFromCenterForValue(c.value);let p=o.setContext(this.getContext(m-1));KS(this,p,s,r)}}),i.display){for(e.save(),a=r-1;a>=0;a--){let c=i.setContext(this.getPointLabelContext(a)),{color:m,lineWidth:p}=c;!p||!m||(e.lineWidth=p,e.strokeStyle=m,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;let o=this.getIndexAngle(0),r,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;let c=i.setContext(this.getContext(l)),m=Ft(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=m.string,a=e.measureText(s.label).width,e.fillStyle=c.backdropColor;let p=Ut(c.backdropPadding);e.fillRect(-a/2-p.left,-r-m.size/2-p.top,a+p.width,m.size+p.height)}un(e,s.label,0,-r,m,{color:c.color})}),e.restore()}drawTitle(){}};ni.id="radialLinear";ni.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ra.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};ni.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};ni.descriptors={angleLines:{_fallback:"grid"}};var sa={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}},xe=Object.keys(sa);function QS(n,e){return n-e}function Du(n,e){if(ht(e))return null;let t=n._adapter,{parser:i,round:o,isoWeekday:r}=n._parseOpts,a=e;return typeof i=="function"&&(a=i(a)),Et(a)||(a=typeof i=="string"?t.parse(a,i):t.parse(a)),a===null?null:(o&&(a=o==="week"&&(Ge(r)||r===!0)?t.startOf(a,"isoWeek",r):t.startOf(a,o)),+a)}function ku(n,e,t,i){let o=xe.length;for(let r=xe.indexOf(n);r<o-1;++r){let a=sa[xe[r]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-e)/(s*a.size))<=i)return xe[r]}return xe[o-1]}function $S(n,e,t,i,o){for(let r=xe.length-1;r>=xe.indexOf(t);r--){let a=xe[r];if(sa[a].common&&n._adapter.diff(o,i,a)>=e-1)return a}return xe[t?xe.indexOf(t):0]}function ZS(n){for(let e=xe.indexOf(n)+1,t=xe.length;e<t;++e)if(sa[xe[e]].common)return xe[e]}function Ou(n,e,t){if(!t)n[e]=!0;else if(t.length){let{lo:i,hi:o}=bo(t,e),r=t[i]>=e?t[i]:t[o];n[r]=!0}}function JS(n,e,t,i){let o=n._adapter,r=+o.startOf(e[0].value,i),a=e[e.length-1].value,s,l;for(s=r;s<=a;s=+o.add(s,1,i))l=t[s],l>=0&&(e[l].major=!0);return e}function Eu(n,e,t){let i=[],o={},r=e.length,a,s;for(a=0;a<r;++a)s=e[a],o[s]=a,i.push({value:s,major:!1});return r===0||!t?i:JS(n,i,o,t)}var Il=(()=>{class n extends ei{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,i){let o=t.time||(t.time={}),r=this._adapter=new bl._date(t.adapters.date);r.init(i),Kn(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return t===void 0?null:Du(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,i=this._adapter,o=t.time.unit||"day",{min:r,max:a,minDefined:s,maxDefined:l}=this.getUserBounds();function c(m){!s&&!isNaN(m.min)&&(r=Math.min(r,m.min)),!l&&!isNaN(m.max)&&(a=Math.max(a,m.max))}(!s||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),r=Et(r)&&!isNaN(r)?r:+i.startOf(Date.now(),o),a=Et(a)&&!isNaN(a)?a:+i.endOf(Date.now(),o)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],o=t[t.length-1]),{min:i,max:o}}buildTicks(){let t=this.options,i=t.time,o=t.ticks,r=o.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]);let a=this.min,s=this.max,l=Os(r,a,s);return this._unit=i.unit||(o.autoSkip?ku(i.minUnit,this.min,this.max,this._getLabelCapacity(a)):$S(this,l.length,i.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:ZS(this._unit),this.initOffsets(r),t.reverse&&l.reverse(),Eu(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let i=0,o=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?i=1-r:i=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?o=a:o=(a-this.getDecimalForValue(t[t.length-2]))/2);let s=t.length<3?.5:.25;i=Jt(i,0,s),o=Jt(o,0,s),this._offsets={start:i,end:o,factor:1/(i+1+o)}}_generate(){let t=this._adapter,i=this.min,o=this.max,r=this.options,a=r.time,s=a.unit||ku(a.minUnit,i,o,this._getLabelCapacity(i)),l=tt(a.stepSize,1),c=s==="week"?a.isoWeekday:!1,m=Ge(c)||c===!0,p={},g=i,_,C;if(m&&(g=+t.startOf(g,"isoWeek",c)),g=+t.startOf(g,m?"day":s),t.diff(o,i,s)>1e5*l)throw new Error(i+" and "+o+" are too far apart with stepSize of "+l+" "+s);let v=r.ticks.source==="data"&&this.getDataTimestamps();for(_=g,C=0;_<o;_=+t.add(_,l,s),C++)Ou(p,_,v);return(_===o||r.bounds==="ticks"||C===1)&&Ou(p,_,v),Object.keys(p).sort((I,M)=>I-M).map(I=>+I)}getLabelForValue(t){let i=this._adapter,o=this.options.time;return o.tooltipFormat?i.format(t,o.tooltipFormat):i.format(t,o.displayFormats.datetime)}_tickFormatFunction(t,i,o,r){let a=this.options,s=a.time.displayFormats,l=this._unit,c=this._majorUnit,m=l&&s[l],p=c&&s[c],g=o[i],_=c&&p&&g&&g.major,C=this._adapter.format(t,r||(_?p:m)),v=a.ticks.callback;return v?St(v,[C,i,o],this):C}generateTickLabels(t){let i,o,r;for(i=0,o=t.length;i<o;++i)r=t[i],r.label=this._tickFormatFunction(r.value,i,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let i=this._offsets,o=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+o)*i.factor)}getValueForPixel(t){let i=this._offsets,o=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){let i=this.options.ticks,o=this.ctx.measureText(t).width,r=Yt(this.isHorizontal()?i.maxRotation:i.minRotation),a=Math.cos(r),s=Math.sin(r),l=this._resolveTickFontOptions(0).size;return{w:o*a+l*s,h:o*s+l*a}}_getLabelCapacity(t){let i=this.options.time,o=i.displayFormats,r=o[i.unit]||o.millisecond,a=this._tickFormatFunction(t,0,Eu(this,[t],this._majorUnit),r),s=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],i,o;if(t.length)return t;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(i=0,o=r.length;i<o;++i)t=t.concat(r[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],i,o;if(t.length)return t;let r=this.getLabels();for(i=0,o=r.length;i<o;++i)t.push(Du(this,r[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wr(t.sort(QS))}}return n.id="time",n.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}},n})();function Zr(n,e,t){let i=0,o=n.length-1,r,a,s,l;t?(e>=n[i].pos&&e<=n[o].pos&&({lo:i,hi:o}=We(n,"pos",e)),{pos:r,time:s}=n[i],{pos:a,time:l}=n[o]):(e>=n[i].time&&e<=n[o].time&&({lo:i,hi:o}=We(n,"time",e)),{time:r,pos:s}=n[i],{time:a,pos:l}=n[o]);let c=a-r;return c?s+(l-s)*(e-r)/c:s}var Ro=class extends Il{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Zr(t,this.min),this._tableRange=Zr(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:i}=this,o=[],r=[],a,s,l,c,m;for(a=0,s=e.length;a<s;++a)c=e[a],c>=t&&c<=i&&o.push(c);if(o.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,s=o.length;a<s;++a)m=o[a+1],l=o[a-1],c=o[a],Math.round((m+l)/2)!==c&&r.push({time:c,pos:a/(s-1)});return r}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?e=this.normalize(t.concat(i)):e=t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Zr(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return Zr(this._table,i*this._tableRange+this._minPos,!0)}};Ro.id="timeseries";Ro.defaults=Il.defaults;var tb=Object.freeze({__proto__:null,CategoryScale:Vi,LinearScale:Vo,LogarithmicScale:Lo,RadialLinearScale:ni,TimeScale:Il,TimeSeriesScale:Ro}),tm=[GC,Qx,FS,tb];function re(n){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(n)}function ot(n){if(n===null||n===!0||n===!1)return NaN;var e=Number(n);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function R(n,e){if(e.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+e.length+" present")}function Y(n){R(1,arguments);var e=Object.prototype.toString.call(n);return n instanceof Date||re(n)==="object"&&e==="[object Date]"?new Date(n.getTime()):typeof n=="number"||e==="[object Number]"?new Date(n):((typeof n=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Tn(n,e){R(2,arguments);var t=Y(n),i=ot(e);return isNaN(i)?new Date(NaN):(i&&t.setDate(t.getDate()+i),t)}function tn(n,e){R(2,arguments);var t=Y(n),i=ot(e);if(isNaN(i))return new Date(NaN);if(!i)return t;var o=t.getDate(),r=new Date(t.getTime());r.setMonth(t.getMonth()+i+1,0);var a=r.getDate();return o>=a?r:(t.setFullYear(r.getFullYear(),r.getMonth(),o),t)}function la(n,e){if(R(2,arguments),!e||re(e)!=="object")return new Date(NaN);var t=e.years?ot(e.years):0,i=e.months?ot(e.months):0,o=e.weeks?ot(e.weeks):0,r=e.days?ot(e.days):0,a=e.hours?ot(e.hours):0,s=e.minutes?ot(e.minutes):0,l=e.seconds?ot(e.seconds):0,c=Y(n),m=i||t?tn(c,i+t*12):c,p=r||o?Tn(m,r+o*7):m,g=s+a*60,_=l+g*60,C=_*1e3,v=new Date(p.getTime()+C);return v}function Ee(n,e){R(2,arguments);var t=Y(n).getTime(),i=ot(e);return new Date(t+i)}var eb=36e5;function ca(n,e){R(2,arguments);var t=ot(e);return Ee(n,t*eb)}var nb={};function ue(){return nb}function Ho(n,e){var t,i,o,r,a,s,l,c;R(1,arguments);var m=ue(),p=ot((t=(i=(o=(r=e?.weekStartsOn)!==null&&r!==void 0?r:e==null||(a=e.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:m.weekStartsOn)!==null&&i!==void 0?i:(l=m.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=Y(n),_=g.getDay(),C=(_<p?7:0)+_-p;return g.setDate(g.getDate()-C),g.setHours(0,0,0,0),g}function An(n){var e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),n.getTime()-e.getTime()}function ii(n){R(1,arguments);var e=Y(n);return e.setHours(0,0,0,0),e}var ib=864e5;function Pl(n,e){R(2,arguments);var t=ii(n),i=ii(e),o=t.getTime()-An(t),r=i.getTime()-An(i);return Math.round((o-r)/ib)}var ob=6e4;function da(n,e){R(2,arguments);var t=ot(e);return Ee(n,t*ob)}function ua(n,e){R(2,arguments);var t=ot(e),i=t*3;return tn(n,i)}function ma(n,e){R(2,arguments);var t=ot(e);return Ee(n,t*1e3)}function ha(n,e){R(2,arguments);var t=ot(e),i=t*7;return Tn(n,i)}function pa(n,e){R(2,arguments);var t=ot(e);return tn(n,t*12)}function Dn(n,e){R(2,arguments);var t=Y(n),i=Y(e),o=t.getTime()-i.getTime();return o<0?-1:o>0?1:o}var rb=365.2425,ab=Math.pow(10,8)*24*60*60*1e3,oi=6e4,ri=36e5,em=1e3,BT=-ab;var sb=3600;var nm=sb*24,NT=nm*7,lb=nm*rb,cb=lb/12,VT=cb*3;function Ml(n){return R(1,arguments),n instanceof Date||re(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Ri(n){if(R(1,arguments),!Ml(n)&&typeof n!="number")return!1;var e=Y(n);return!isNaN(Number(e))}function wl(n,e){R(2,arguments);var t=Y(n),i=Y(e),o=t.getFullYear()-i.getFullYear(),r=t.getMonth()-i.getMonth();return o*12+r}function Tl(n,e){R(2,arguments);var t=Y(n),i=Y(e);return t.getFullYear()-i.getFullYear()}function im(n,e){var t=n.getFullYear()-e.getFullYear()||n.getMonth()-e.getMonth()||n.getDate()-e.getDate()||n.getHours()-e.getHours()||n.getMinutes()-e.getMinutes()||n.getSeconds()-e.getSeconds()||n.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function Wi(n,e){R(2,arguments);var t=Y(n),i=Y(e),o=im(t,i),r=Math.abs(Pl(t,i));t.setDate(t.getDate()-o*r);var a=+(im(t,i)===-o),s=o*(r-a);return s===0?0:s}function en(n,e){return R(2,arguments),Y(n).getTime()-Y(e).getTime()}var om={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},db="trunc";function nn(n){return n?om[n]:om[db]}function fa(n,e,t){R(2,arguments);var i=en(n,e)/ri;return nn(t?.roundingMethod)(i)}function ga(n,e,t){R(2,arguments);var i=en(n,e)/oi;return nn(t?.roundingMethod)(i)}function Hi(n){R(1,arguments);var e=Y(n);return e.setHours(23,59,59,999),e}function Gi(n){R(1,arguments);var e=Y(n),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Al(n){R(1,arguments);var e=Y(n);return Hi(e).getTime()===Gi(e).getTime()}function Yi(n,e){R(2,arguments);var t=Y(n),i=Y(e),o=Dn(t,i),r=Math.abs(wl(t,i)),a;if(r<1)a=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-o*r);var s=Dn(t,i)===-o;Al(Y(n))&&r===1&&Dn(n,i)===1&&(s=!1),a=o*(r-Number(s))}return a===0?0:a}function _a(n,e,t){R(2,arguments);var i=Yi(n,e)/3;return nn(t?.roundingMethod)(i)}function Ca(n,e,t){R(2,arguments);var i=en(n,e)/1e3;return nn(t?.roundingMethod)(i)}function xa(n,e,t){R(2,arguments);var i=Wi(n,e)/7;return nn(t?.roundingMethod)(i)}function Sa(n,e){R(2,arguments);var t=Y(n),i=Y(e),o=Dn(t,i),r=Math.abs(Tl(t,i));t.setFullYear(1584),i.setFullYear(1584);var a=Dn(t,i)===-o,s=o*(r-Number(a));return s===0?0:s}function ba(n){R(1,arguments);var e=Y(n);return e.setSeconds(0,0),e}function ya(n){R(1,arguments);var e=Y(n),t=e.getMonth(),i=t-t%3;return e.setMonth(i,1),e.setHours(0,0,0,0),e}function va(n){R(1,arguments);var e=Y(n);return e.setDate(1),e.setHours(0,0,0,0),e}function Ia(n){R(1,arguments);var e=Y(n),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Pa(n){R(1,arguments);var e=Y(n),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Ma(n){R(1,arguments);var e=Y(n);return e.setMinutes(59,59,999),e}function wa(n,e){var t,i,o,r,a,s,l,c;R(1,arguments);var m=ue(),p=ot((t=(i=(o=(r=e?.weekStartsOn)!==null&&r!==void 0?r:e==null||(a=e.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:m.weekStartsOn)!==null&&i!==void 0?i:(l=m.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=Y(n),_=g.getDay(),C=(_<p?-7:0)+6-(_-p);return g.setDate(g.getDate()+C),g.setHours(23,59,59,999),g}function Ta(n){R(1,arguments);var e=Y(n);return e.setSeconds(59,999),e}function Aa(n){R(1,arguments);var e=Y(n),t=e.getMonth(),i=t-t%3+3;return e.setMonth(i,0),e.setHours(23,59,59,999),e}function Da(n){R(1,arguments);var e=Y(n);return e.setMilliseconds(999),e}function Go(n,e){R(2,arguments);var t=ot(e);return Ee(n,-t)}var ub=864e5;function Dl(n){R(1,arguments);var e=Y(n),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),o=t-i;return Math.floor(o/ub)+1}function Fe(n){R(1,arguments);var e=1,t=Y(n),i=t.getUTCDay(),o=(i<e?7:0)+i-e;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}function Yo(n){R(1,arguments);var e=Y(n),t=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(t+1,0,4),i.setUTCHours(0,0,0,0);var o=Fe(i),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var a=Fe(r);return e.getTime()>=o.getTime()?t+1:e.getTime()>=a.getTime()?t:t-1}function kl(n){R(1,arguments);var e=Yo(n),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var i=Fe(t);return i}var mb=6048e5;function Uo(n){R(1,arguments);var e=Y(n),t=Fe(e).getTime()-kl(e).getTime();return Math.round(t/mb)+1}function Ie(n,e){var t,i,o,r,a,s,l,c;R(1,arguments);var m=ue(),p=ot((t=(i=(o=(r=e?.weekStartsOn)!==null&&r!==void 0?r:e==null||(a=e.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:m.weekStartsOn)!==null&&i!==void 0?i:(l=m.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=Y(n),_=g.getUTCDay(),C=(_<p?7:0)+_-p;return g.setUTCDate(g.getUTCDate()-C),g.setUTCHours(0,0,0,0),g}function ai(n,e){var t,i,o,r,a,s,l,c;R(1,arguments);var m=Y(n),p=m.getUTCFullYear(),g=ue(),_=ot((t=(i=(o=(r=e?.firstWeekContainsDate)!==null&&r!==void 0?r:e==null||(a=e.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:g.firstWeekContainsDate)!==null&&i!==void 0?i:(l=g.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=new Date(0);C.setUTCFullYear(p+1,0,_),C.setUTCHours(0,0,0,0);var v=Ie(C,e),I=new Date(0);I.setUTCFullYear(p,0,_),I.setUTCHours(0,0,0,0);var M=Ie(I,e);return m.getTime()>=v.getTime()?p+1:m.getTime()>=M.getTime()?p:p-1}function Ol(n,e){var t,i,o,r,a,s,l,c;R(1,arguments);var m=ue(),p=ot((t=(i=(o=(r=e?.firstWeekContainsDate)!==null&&r!==void 0?r:e==null||(a=e.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:m.firstWeekContainsDate)!==null&&i!==void 0?i:(l=m.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1),g=ai(n,e),_=new Date(0);_.setUTCFullYear(g,0,p),_.setUTCHours(0,0,0,0);var C=Ie(_,e);return C}var hb=6048e5;function qo(n,e){R(1,arguments);var t=Y(n),i=Ie(t,e).getTime()-Ol(t,e).getTime();return Math.round(i/hb)+1}function bt(n,e){for(var t=n<0?"-":"",i=Math.abs(n).toString();i.length<e;)i="0"+i;return t+i}var pb={y:function(e,t){var i=e.getUTCFullYear(),o=i>0?i:1-i;return bt(t==="yy"?o%100:o,t.length)},M:function(e,t){var i=e.getUTCMonth();return t==="M"?String(i+1):bt(i+1,2)},d:function(e,t){return bt(e.getUTCDate(),t.length)},a:function(e,t){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(e,t){return bt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return bt(e.getUTCHours(),t.length)},m:function(e,t){return bt(e.getUTCMinutes(),t.length)},s:function(e,t){return bt(e.getUTCSeconds(),t.length)},S:function(e,t){var i=t.length,o=e.getUTCMilliseconds(),r=Math.floor(o*Math.pow(10,i-3));return bt(r,t.length)}},gn=pb;var Ui={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fb={G:function(e,t,i){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})}},y:function(e,t,i){if(t==="yo"){var o=e.getUTCFullYear(),r=o>0?o:1-o;return i.ordinalNumber(r,{unit:"year"})}return gn.y(e,t)},Y:function(e,t,i,o){var r=ai(e,o),a=r>0?r:1-r;if(t==="YY"){var s=a%100;return bt(s,2)}return t==="Yo"?i.ordinalNumber(a,{unit:"year"}):bt(a,t.length)},R:function(e,t){var i=Yo(e);return bt(i,t.length)},u:function(e,t){var i=e.getUTCFullYear();return bt(i,t.length)},Q:function(e,t,i){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return bt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,i){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return bt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,i){var o=e.getUTCMonth();switch(t){case"M":case"MM":return gn.M(e,t);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,i){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return bt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,i,o){var r=qo(e,o);return t==="wo"?i.ordinalNumber(r,{unit:"week"}):bt(r,t.length)},I:function(e,t,i){var o=Uo(e);return t==="Io"?i.ordinalNumber(o,{unit:"week"}):bt(o,t.length)},d:function(e,t,i){return t==="do"?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):gn.d(e,t)},D:function(e,t,i){var o=Dl(e);return t==="Do"?i.ordinalNumber(o,{unit:"dayOfYear"}):bt(o,t.length)},E:function(e,t,i){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,i,o){var r=e.getUTCDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return bt(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,i,o){var r=e.getUTCDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return bt(a,t.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,i){var o=e.getUTCDay(),r=o===0?7:o;switch(t){case"i":return String(r);case"ii":return bt(r,t.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});case"iiii":default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,i){var o=e.getUTCHours(),r=o/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,i){var o=e.getUTCHours(),r;switch(o===12?r=Ui.noon:o===0?r=Ui.midnight:r=o/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,i){var o=e.getUTCHours(),r;switch(o>=17?r=Ui.evening:o>=12?r=Ui.afternoon:o>=4?r=Ui.morning:r=Ui.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,i){if(t==="ho"){var o=e.getUTCHours()%12;return o===0&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return gn.h(e,t)},H:function(e,t,i){return t==="Ho"?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):gn.H(e,t)},K:function(e,t,i){var o=e.getUTCHours()%12;return t==="Ko"?i.ordinalNumber(o,{unit:"hour"}):bt(o,t.length)},k:function(e,t,i){var o=e.getUTCHours();return o===0&&(o=24),t==="ko"?i.ordinalNumber(o,{unit:"hour"}):bt(o,t.length)},m:function(e,t,i){return t==="mo"?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):gn.m(e,t)},s:function(e,t,i){return t==="so"?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):gn.s(e,t)},S:function(e,t){return gn.S(e,t)},X:function(e,t,i,o){var r=o._originalDate||e,a=r.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return am(a);case"XXXX":case"XX":return si(a);case"XXXXX":case"XXX":default:return si(a,":")}},x:function(e,t,i,o){var r=o._originalDate||e,a=r.getTimezoneOffset();switch(t){case"x":return am(a);case"xxxx":case"xx":return si(a);case"xxxxx":case"xxx":default:return si(a,":")}},O:function(e,t,i,o){var r=o._originalDate||e,a=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rm(a,":");case"OOOO":default:return"GMT"+si(a,":")}},z:function(e,t,i,o){var r=o._originalDate||e,a=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rm(a,":");case"zzzz":default:return"GMT"+si(a,":")}},t:function(e,t,i,o){var r=o._originalDate||e,a=Math.floor(r.getTime()/1e3);return bt(a,t.length)},T:function(e,t,i,o){var r=o._originalDate||e,a=r.getTime();return bt(a,t.length)}};function rm(n,e){var t=n>0?"-":"+",i=Math.abs(n),o=Math.floor(i/60),r=i%60;if(r===0)return t+String(o);var a=e||"";return t+String(o)+a+bt(r,2)}function am(n,e){if(n%60===0){var t=n>0?"-":"+";return t+bt(Math.abs(n)/60,2)}return si(n,e)}function si(n,e){var t=e||"",i=n>0?"-":"+",o=Math.abs(n),r=bt(Math.floor(o/60),2),a=bt(o%60,2);return i+r+t+a}var sm=fb;var lm=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},cm=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},gb=function(e,t){var i=e.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return lm(e,t);var a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",lm(o,t)).replace("{{time}}",cm(r,t))},_b={p:cm,P:gb},zo=_b;var Cb=["D","DD"],xb=["YY","YYYY"];function ka(n){return Cb.indexOf(n)!==-1}function Oa(n){return xb.indexOf(n)!==-1}function qi(n,e,t){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Sb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bb=function(e,t,i){var o,r=Sb[e];return typeof r=="string"?o=r:t===1?o=r.one:o=r.other.replace("{{count}}",t.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},dm=bb;function jo(n){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):n.defaultWidth,i=n.formats[t]||n.formats[n.defaultWidth];return i}}var yb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ib={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pb={date:jo({formats:yb,defaultWidth:"full"}),time:jo({formats:vb,defaultWidth:"full"}),dateTime:jo({formats:Ib,defaultWidth:"full"})},um=Pb;var Mb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wb=function(e,t,i,o){return Mb[e]},mm=wb;function li(n){return function(e,t){var i=t!=null&&t.context?String(t.context):"standalone",o;if(i==="formatting"&&n.formattingValues){var r=n.defaultFormattingWidth||n.defaultWidth,a=t!=null&&t.width?String(t.width):r;o=n.formattingValues[a]||n.formattingValues[r]}else{var s=n.defaultWidth,l=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[l]||n.values[s]}var c=n.argumentCallback?n.argumentCallback(e):e;return o[c]}}var Tb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ab={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Db={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},kb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ob={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Eb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Fb=function(e,t){var i=Number(e),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},Bb={ordinalNumber:Fb,era:li({values:Tb,defaultWidth:"wide"}),quarter:li({values:Ab,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:li({values:Db,defaultWidth:"wide"}),day:li({values:kb,defaultWidth:"wide"}),dayPeriod:li({values:Ob,defaultWidth:"wide",formattingValues:Eb,defaultFormattingWidth:"wide"})},hm=Bb;function ci(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.width,o=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],r=e.match(o);if(!r)return null;var a=r[0],s=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?Vb(s,function(p){return p.test(a)}):Nb(s,function(p){return p.test(a)}),c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;var m=e.slice(a.length);return{value:c,rest:m}}}function Nb(n,e){for(var t in n)if(n.hasOwnProperty(t)&&e(n[t]))return t}function Vb(n,e){for(var t=0;t<n.length;t++)if(e(n[t]))return t}function El(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.match(n.matchPattern);if(!i)return null;var o=i[0],r=e.match(n.parsePattern);if(!r)return null;var a=n.valueCallback?n.valueCallback(r[0]):r[0];a=t.valueCallback?t.valueCallback(a):a;var s=e.slice(o.length);return{value:a,rest:s}}}var Lb=/^(\d+)(th|st|nd|rd)?/i,Rb=/\d+/i,Wb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Hb={any:[/^b/i,/^(a|c)/i]},Gb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yb={any:[/1/i,/2/i,/3/i,/4/i]},Ub={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},qb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Kb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qb={ordinalNumber:El({matchPattern:Lb,parsePattern:Rb,valueCallback:function(e){return parseInt(e,10)}}),era:ci({matchPatterns:Wb,defaultMatchWidth:"wide",parsePatterns:Hb,defaultParseWidth:"any"}),quarter:ci({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Yb,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ci({matchPatterns:Ub,defaultMatchWidth:"wide",parsePatterns:qb,defaultParseWidth:"any"}),day:ci({matchPatterns:zb,defaultMatchWidth:"wide",parsePatterns:jb,defaultParseWidth:"any"}),dayPeriod:ci({matchPatterns:Kb,defaultMatchWidth:"any",parsePatterns:Xb,defaultParseWidth:"any"})},pm=Qb;var $b={code:"en-US",formatDistance:dm,formatLong:um,formatRelative:mm,localize:hm,match:pm,options:{weekStartsOn:0,firstWeekContainsDate:1}},fm=$b;var Ea=fm;var Zb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ty=/^'([^]*?)'?$/,ey=/''/g,ny=/[a-zA-Z]/;function Fa(n,e,t){var i,o,r,a,s,l,c,m,p,g,_,C,v,I,M,w,k,D;R(2,arguments);var A=String(e),L=ue(),W=(i=(o=t?.locale)!==null&&o!==void 0?o:L.locale)!==null&&i!==void 0?i:Ea,U=ot((r=(a=(s=(l=t?.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(c=t.locale)===null||c===void 0||(m=c.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&s!==void 0?s:L.firstWeekContainsDate)!==null&&a!==void 0?a:(p=L.locale)===null||p===void 0||(g=p.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=ot((_=(C=(v=(I=t?.weekStartsOn)!==null&&I!==void 0?I:t==null||(M=t.locale)===null||M===void 0||(w=M.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&v!==void 0?v:L.weekStartsOn)!==null&&C!==void 0?C:(k=L.locale)===null||k===void 0||(D=k.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&_!==void 0?_:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!W.localize)throw new RangeError("locale must contain localize property");if(!W.formatLong)throw new RangeError("locale must contain formatLong property");var Q=Y(n);if(!Ri(Q))throw new RangeError("Invalid time value");var et=An(Q),$=Go(Q,et),at={firstWeekContainsDate:U,weekStartsOn:q,locale:W,_originalDate:Q},lt=A.match(Jb).map(function(j){var it=j[0];if(it==="p"||it==="P"){var rt=zo[it];return rt(j,W.formatLong)}return j}).join("").match(Zb).map(function(j){if(j==="''")return"'";var it=j[0];if(it==="'")return iy(j);var rt=sm[it];if(rt)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Oa(j)&&qi(j,e,String(n)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&ka(j)&&qi(j,e,String(n)),rt($,j,W.localize,at);if(it.match(ny))throw new RangeError("Format string contains an unescaped latin alphabet character `"+it+"`");return j}).join("");return lt}function iy(n){var e=n.match(ty);return e?e[1].replace(ey,"'"):n}function Fl(n,e){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}function Bl(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t<e;t++)i[t]=n[t];return i}function gm(n,e){if(n){if(typeof n=="string")return Bl(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Bl(n,e):void 0}}function Nl(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=gm(n))||e&&n&&typeof n.length=="number"){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,a=!0,s=!1;return{s:function(){t=t.call(n)},n:function(){var c=t.next();return a=c.done,c},e:function(c){s=!0,r=c},f:function(){try{a||t.return==null||t.return()}finally{if(s)throw r}}}}function G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ba(n,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Ba(n,e)}function Z(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ba(n,e)}function Ko(n){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ko(n)}function Vl(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vl=function(){return!!n})()}function _m(n,e){if(e&&(re(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function J(n){var e=Vl();return function(){var t,i=Ko(n);if(e){var o=Ko(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return _m(this,t)}}function K(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Cm(n,e){if(re(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(re(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Na(n){var e=Cm(n,"string");return re(e)=="symbol"?e:e+""}function xm(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,Na(i.key),i)}}function X(n,e,t){return e&&xm(n.prototype,e),t&&xm(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function H(n,e,t){return(e=Na(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var oy=10,Sm=function(){function n(){K(this,n),H(this,"priority",void 0),H(this,"subPriority",0)}return X(n,[{key:"validate",value:function(t,i){return!0}}]),n}(),bm=function(n){Z(t,n);var e=J(t);function t(i,o,r,a,s){var l;return K(this,t),l=e.call(this),l.value=i,l.validateValue=o,l.setValue=r,l.priority=a,s&&(l.subPriority=s),l}return X(t,[{key:"validate",value:function(o,r){return this.validateValue(o,this.value,r)}},{key:"set",value:function(o,r,a){return this.setValue(o,r,this.value,a)}}]),t}(Sm),ym=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",oy),H(G(i),"subPriority",-1),i}return X(t,[{key:"set",value:function(o,r){if(r.timestampIsSet)return o;var a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}}]),t}(Sm);var nt=function(){function n(){K(this,n),H(this,"incompatibleTokens",void 0),H(this,"priority",void 0),H(this,"subPriority",void 0)}return X(n,[{key:"run",value:function(t,i,o,r){var a=this.parse(t,i,o,r);return a?{setter:new bm(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(t,i,o){return!0}}]),n}();var vm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",140),H(G(i),"incompatibleTokens",["R","u","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"})||a.era(o,{width:"narrow"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})||a.era(o,{width:"abbreviated"})||a.era(o,{width:"narrow"})}}},{key:"set",value:function(o,r,a){return r.era=a,o.setUTCFullYear(a,0,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Ct={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Be={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Pt(n,e){return n&&{value:e(n.value),rest:n.rest}}function gt(n,e){var t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function Ne(n,e){var t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};var i=t[1]==="+"?1:-1,o=t[2]?parseInt(t[2],10):0,r=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:i*(o*ri+r*oi+a*em),rest:e.slice(t[0].length)}}function Va(n){return gt(Ct.anyDigitsSigned,n)}function ut(n,e){switch(n){case 1:return gt(Ct.singleDigit,e);case 2:return gt(Ct.twoDigits,e);case 3:return gt(Ct.threeDigits,e);case 4:return gt(Ct.fourDigits,e);default:return gt(new RegExp("^\\d{1,"+n+"}"),e)}}function zi(n,e){switch(n){case 1:return gt(Ct.singleDigitSigned,e);case 2:return gt(Ct.twoDigitsSigned,e);case 3:return gt(Ct.threeDigitsSigned,e);case 4:return gt(Ct.fourDigitsSigned,e);default:return gt(new RegExp("^-?\\d{1,"+n+"}"),e)}}function ji(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function La(n,e){var t=e>0,i=t?e:1-e,o;if(i<=50)o=n||100;else{var r=i+50,a=Math.floor(r/100)*100,s=n>=r%100;o=n+a-(s?100:0)}return t?o:1-o}function Ra(n){return n%400===0||n%4===0&&n%100!==0}var Im=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",130),H(G(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){var s=function(c){return{year:c,isTwoDigitYear:r==="yy"}};switch(r){case"y":return Pt(ut(4,o),s);case"yo":return Pt(a.ordinalNumber(o,{unit:"year"}),s);default:return Pt(ut(r.length,o),s)}}},{key:"validate",value:function(o,r){return r.isTwoDigitYear||r.year>0}},{key:"set",value:function(o,r,a){var s=o.getUTCFullYear();if(a.isTwoDigitYear){var l=La(a.year,s);return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}var c=!("era"in r)||r.era===1?a.year:1-a.year;return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Pm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",130),H(G(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){var s=function(c){return{year:c,isTwoDigitYear:r==="YY"}};switch(r){case"Y":return Pt(ut(4,o),s);case"Yo":return Pt(a.ordinalNumber(o,{unit:"year"}),s);default:return Pt(ut(r.length,o),s)}}},{key:"validate",value:function(o,r){return r.isTwoDigitYear||r.year>0}},{key:"set",value:function(o,r,a,s){var l=ai(o,s);if(a.isTwoDigitYear){var c=La(a.year,l);return o.setUTCFullYear(c,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Ie(o,s)}var m=!("era"in r)||r.era===1?a.year:1-a.year;return o.setUTCFullYear(m,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Ie(o,s)}}]),t}(nt);var Mm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",130),H(G(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r){return r==="R"?zi(4,o):zi(r.length,o)}},{key:"set",value:function(o,r,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Fe(s)}}]),t}(nt);var wm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",130),H(G(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r){return r==="u"?zi(4,o):zi(r.length,o)}},{key:"set",value:function(o,r,a){return o.setUTCFullYear(a,0,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Tm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",120),H(G(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"Q":case"QQ":return ut(r.length,o);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"})||a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})||a.quarter(o,{width:"abbreviated",context:"formatting"})||a.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,r){return r>=1&&r<=4}},{key:"set",value:function(o,r,a){return o.setUTCMonth((a-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Am=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",120),H(G(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"q":case"qq":return ut(r.length,o);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"})||a.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})||a.quarter(o,{width:"abbreviated",context:"standalone"})||a.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,r){return r>=1&&r<=4}},{key:"set",value:function(o,r,a){return o.setUTCMonth((a-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Dm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),H(G(i),"priority",110),i}return X(t,[{key:"parse",value:function(o,r,a){var s=function(c){return c-1};switch(r){case"M":return Pt(gt(Ct.month,o),s);case"MM":return Pt(ut(2,o),s);case"Mo":return Pt(a.ordinalNumber(o,{unit:"month"}),s);case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"})||a.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})||a.month(o,{width:"abbreviated",context:"formatting"})||a.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,r){return r>=0&&r<=11}},{key:"set",value:function(o,r,a){return o.setUTCMonth(a,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var km=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",110),H(G(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){var s=function(c){return c-1};switch(r){case"L":return Pt(gt(Ct.month,o),s);case"LL":return Pt(ut(2,o),s);case"Lo":return Pt(a.ordinalNumber(o,{unit:"month"}),s);case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"})||a.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})||a.month(o,{width:"abbreviated",context:"standalone"})||a.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,r){return r>=0&&r<=11}},{key:"set",value:function(o,r,a){return o.setUTCMonth(a,1),o.setUTCHours(0,0,0,0),o}}]),t}(nt);function Ll(n,e,t){R(2,arguments);var i=Y(n),o=ot(e),r=qo(i,t)-o;return i.setUTCDate(i.getUTCDate()-r*7),i}var Om=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",100),H(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"w":return gt(Ct.week,o);case"wo":return a.ordinalNumber(o,{unit:"week"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=1&&r<=53}},{key:"set",value:function(o,r,a,s){return Ie(Ll(o,a,s),s)}}]),t}(nt);function Rl(n,e){R(2,arguments);var t=Y(n),i=ot(e),o=Uo(t)-i;return t.setUTCDate(t.getUTCDate()-o*7),t}var Em=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",100),H(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"I":return gt(Ct.week,o);case"Io":return a.ordinalNumber(o,{unit:"week"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=1&&r<=53}},{key:"set",value:function(o,r,a){return Fe(Rl(o,a))}}]),t}(nt);var ry=[31,28,31,30,31,30,31,31,30,31,30,31],ay=[31,29,31,30,31,30,31,31,30,31,30,31],Fm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"subPriority",1),H(G(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"d":return gt(Ct.date,o);case"do":return a.ordinalNumber(o,{unit:"date"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){var a=o.getUTCFullYear(),s=Ra(a),l=o.getUTCMonth();return s?r>=1&&r<=ay[l]:r>=1&&r<=ry[l]}},{key:"set",value:function(o,r,a){return o.setUTCDate(a),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Bm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"subpriority",1),H(G(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"D":case"DD":return gt(Ct.dayOfYear,o);case"Do":return a.ordinalNumber(o,{unit:"date"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){var a=o.getUTCFullYear(),s=Ra(a);return s?r>=1&&r<=366:r>=1&&r<=365}},{key:"set",value:function(o,r,a){return o.setUTCMonth(0,a),o.setUTCHours(0,0,0,0),o}}]),t}(nt);function di(n,e,t){var i,o,r,a,s,l,c,m;R(2,arguments);var p=ue(),g=ot((i=(o=(r=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:p.weekStartsOn)!==null&&o!==void 0?o:(c=p.locale)===null||c===void 0||(m=c.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&i!==void 0?i:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=Y(n),C=ot(e),v=_.getUTCDay(),I=C%7,M=(I+7)%7,w=(M<g?7:0)+C-v;return _.setUTCDate(_.getUTCDate()+w),_}var Nm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,r){return r>=0&&r<=6}},{key:"set",value:function(o,r,a,s){return o=di(o,a,s),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Vm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a,s){var l=function(m){var p=Math.floor((m-1)/7)*7;return(m+s.weekStartsOn+6)%7+p};switch(r){case"e":case"ee":return Pt(ut(r.length,o),l);case"eo":return Pt(a.ordinalNumber(o,{unit:"day"}),l);case"eee":return a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,r){return r>=0&&r<=6}},{key:"set",value:function(o,r,a,s){return o=di(o,a,s),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Lm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a,s){var l=function(m){var p=Math.floor((m-1)/7)*7;return(m+s.weekStartsOn+6)%7+p};switch(r){case"c":case"cc":return Pt(ut(r.length,o),l);case"co":return Pt(a.ordinalNumber(o,{unit:"day"}),l);case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"})||a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})||a.day(o,{width:"abbreviated",context:"standalone"})||a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,r){return r>=0&&r<=6}},{key:"set",value:function(o,r,a,s){return o=di(o,a,s),o.setUTCHours(0,0,0,0),o}}]),t}(nt);function Wl(n,e){R(2,arguments);var t=ot(e);t%7===0&&(t=t-7);var i=1,o=Y(n),r=o.getUTCDay(),a=t%7,s=(a+7)%7,l=(s<i?7:0)+t-r;return o.setUTCDate(o.getUTCDate()+l),o}var Rm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",90),H(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){var s=function(c){return c===0?7:c};switch(r){case"i":case"ii":return ut(r.length,o);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return Pt(a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Pt(a.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Pt(a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Pt(a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,r){return r>=1&&r<=7}},{key:"set",value:function(o,r,a){return o=Wl(o,a),o.setUTCHours(0,0,0,0),o}}]),t}(nt);var Wm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",80),H(G(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,r,a){return o.setUTCHours(ji(a),0,0,0),o}}]),t}(nt);var Hm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",80),H(G(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,r,a){return o.setUTCHours(ji(a),0,0,0),o}}]),t}(nt);var Gm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",80),H(G(i),"incompatibleTokens",["a","b","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,r,a){return o.setUTCHours(ji(a),0,0,0),o}}]),t}(nt);var Ym=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",70),H(G(i),"incompatibleTokens",["H","K","k","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"h":return gt(Ct.hour12h,o);case"ho":return a.ordinalNumber(o,{unit:"hour"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=1&&r<=12}},{key:"set",value:function(o,r,a){var s=o.getUTCHours()>=12;return s&&a<12?o.setUTCHours(a+12,0,0,0):!s&&a===12?o.setUTCHours(0,0,0,0):o.setUTCHours(a,0,0,0),o}}]),t}(nt);var Um=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",70),H(G(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"H":return gt(Ct.hour23h,o);case"Ho":return a.ordinalNumber(o,{unit:"hour"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=0&&r<=23}},{key:"set",value:function(o,r,a){return o.setUTCHours(a,0,0,0),o}}]),t}(nt);var qm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",70),H(G(i),"incompatibleTokens",["h","H","k","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"K":return gt(Ct.hour11h,o);case"Ko":return a.ordinalNumber(o,{unit:"hour"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=0&&r<=11}},{key:"set",value:function(o,r,a){var s=o.getUTCHours()>=12;return s&&a<12?o.setUTCHours(a+12,0,0,0):o.setUTCHours(a,0,0,0),o}}]),t}(nt);var zm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",70),H(G(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"k":return gt(Ct.hour24h,o);case"ko":return a.ordinalNumber(o,{unit:"hour"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=1&&r<=24}},{key:"set",value:function(o,r,a){var s=a<=24?a%24:a;return o.setUTCHours(s,0,0,0),o}}]),t}(nt);var jm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",60),H(G(i),"incompatibleTokens",["t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"m":return gt(Ct.minute,o);case"mo":return a.ordinalNumber(o,{unit:"minute"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=0&&r<=59}},{key:"set",value:function(o,r,a){return o.setUTCMinutes(a,0,0),o}}]),t}(nt);var Km=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",50),H(G(i),"incompatibleTokens",["t","T"]),i}return X(t,[{key:"parse",value:function(o,r,a){switch(r){case"s":return gt(Ct.second,o);case"so":return a.ordinalNumber(o,{unit:"second"});default:return ut(r.length,o)}}},{key:"validate",value:function(o,r){return r>=0&&r<=59}},{key:"set",value:function(o,r,a){return o.setUTCSeconds(a,0),o}}]),t}(nt);var Xm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",30),H(G(i),"incompatibleTokens",["t","T"]),i}return X(t,[{key:"parse",value:function(o,r){var a=function(l){return Math.floor(l*Math.pow(10,-r.length+3))};return Pt(ut(r.length,o),a)}},{key:"set",value:function(o,r,a){return o.setUTCMilliseconds(a),o}}]),t}(nt);var Qm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",10),H(G(i),"incompatibleTokens",["t","T","x"]),i}return X(t,[{key:"parse",value:function(o,r){switch(r){case"X":return Ne(Be.basicOptionalMinutes,o);case"XX":return Ne(Be.basic,o);case"XXXX":return Ne(Be.basicOptionalSeconds,o);case"XXXXX":return Ne(Be.extendedOptionalSeconds,o);case"XXX":default:return Ne(Be.extended,o)}}},{key:"set",value:function(o,r,a){return r.timestampIsSet?o:new Date(o.getTime()-a)}}]),t}(nt);var $m=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",10),H(G(i),"incompatibleTokens",["t","T","X"]),i}return X(t,[{key:"parse",value:function(o,r){switch(r){case"x":return Ne(Be.basicOptionalMinutes,o);case"xx":return Ne(Be.basic,o);case"xxxx":return Ne(Be.basicOptionalSeconds,o);case"xxxxx":return Ne(Be.extendedOptionalSeconds,o);case"xxx":default:return Ne(Be.extended,o)}}},{key:"set",value:function(o,r,a){return r.timestampIsSet?o:new Date(o.getTime()-a)}}]),t}(nt);var Zm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",40),H(G(i),"incompatibleTokens","*"),i}return X(t,[{key:"parse",value:function(o){return Va(o)}},{key:"set",value:function(o,r,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),t}(nt);var Jm=function(n){Z(t,n);var e=J(t);function t(){var i;K(this,t);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),H(G(i),"priority",20),H(G(i),"incompatibleTokens","*"),i}return X(t,[{key:"parse",value:function(o){return Va(o)}},{key:"set",value:function(o,r,a){return[new Date(a),{timestampIsSet:!0}]}}]),t}(nt);var t0={G:new vm,y:new Im,Y:new Pm,R:new Mm,u:new wm,Q:new Tm,q:new Am,M:new Dm,L:new km,w:new Om,I:new Em,d:new Fm,D:new Bm,E:new Nm,e:new Vm,c:new Lm,i:new Rm,a:new Wm,b:new Hm,B:new Gm,h:new Ym,H:new Um,K:new qm,k:new zm,m:new jm,s:new Km,S:new Xm,X:new Qm,x:new $m,t:new Zm,T:new Jm};var sy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ly=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cy=/^'([^]*?)'?$/,dy=/''/g,uy=/\S/,my=/[a-zA-Z]/;function Wa(n,e,t,i){var o,r,a,s,l,c,m,p,g,_,C,v,I,M,w,k,D,A;R(3,arguments);var L=String(n),W=String(e),U=ue(),q=(o=(r=i?.locale)!==null&&r!==void 0?r:U.locale)!==null&&o!==void 0?o:Ea;if(!q.match)throw new RangeError("locale must contain match property");var Q=ot((a=(s=(l=(c=i?.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(m=i.locale)===null||m===void 0||(p=m.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&l!==void 0?l:U.firstWeekContainsDate)!==null&&s!==void 0?s:(g=U.locale)===null||g===void 0||(_=g.options)===null||_===void 0?void 0:_.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(Q>=1&&Q<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var et=ot((C=(v=(I=(M=i?.weekStartsOn)!==null&&M!==void 0?M:i==null||(w=i.locale)===null||w===void 0||(k=w.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&I!==void 0?I:U.weekStartsOn)!==null&&v!==void 0?v:(D=U.locale)===null||D===void 0||(A=D.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&C!==void 0?C:0);if(!(et>=0&&et<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(W==="")return L===""?Y(t):new Date(NaN);var $={firstWeekContainsDate:Q,weekStartsOn:et,locale:q},at=[new ym],lt=W.match(ly).map(function(Qt){var Mt=Qt[0];if(Mt in zo){var se=zo[Mt];return se(Qt,q.formatLong)}return Qt}).join("").match(sy),j=[],it=Nl(lt),rt;try{var ft=function(){var Mt=rt.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Oa(Mt)&&qi(Mt,W,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&ka(Mt)&&qi(Mt,W,n);var se=Mt[0],Yn=t0[se];if(Yn){var Si=Yn.incompatibleTokens;if(Array.isArray(Si)){var Cc=j.find(function(xc){return Si.includes(xc.token)||xc.token===se});if(Cc)throw new RangeError("The format string mustn't contain `".concat(Cc.fullToken,"` and `").concat(Mt,"` at the same time"))}else if(Yn.incompatibleTokens==="*"&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(Mt,"` and any other token at the same time"));j.push({token:se,fullToken:Mt});var ms=Yn.run(L,Mt,q.match,$);if(!ms)return{v:new Date(NaN)};at.push(ms.setter),L=ms.rest}else{if(se.match(my))throw new RangeError("Format string contains an unescaped latin alphabet character `"+se+"`");if(Mt==="''"?Mt="'":se==="'"&&(Mt=hy(Mt)),L.indexOf(Mt)===0)L=L.slice(Mt.length);else return{v:new Date(NaN)}}};for(it.s();!(rt=it.n()).done;){var qe=ft();if(re(qe)==="object")return qe.v}}catch(Qt){it.e(Qt)}finally{it.f()}if(L.length>0&&uy.test(L))return new Date(NaN);var Le=at.map(function(Qt){return Qt.priority}).sort(function(Qt,Mt){return Mt-Qt}).filter(function(Qt,Mt,se){return se.indexOf(Qt)===Mt}).map(function(Qt){return at.filter(function(Mt){return Mt.priority===Qt}).sort(function(Mt,se){return se.subPriority-Mt.subPriority})}).map(function(Qt){return Qt[0]}),ct=Y(t);if(isNaN(ct.getTime()))return new Date(NaN);var ae=Go(ct,An(ct)),be={},te=Nl(Le),Cn;try{for(te.s();!(Cn=te.n()).done;){var xn=Cn.value;if(!xn.validate(ae,$))return new Date(NaN);var xi=xn.set(ae,be,$);Array.isArray(xi)?(ae=xi[0],Fl(be,xi[1])):ae=xi}}catch(Qt){te.e(Qt)}finally{te.f()}return ae}function hy(n){return n.match(cy)[1].replace(dy,"'")}function Ha(n){R(1,arguments);var e=Y(n);return e.setMinutes(0,0,0),e}function Ga(n){R(1,arguments);var e=Y(n);return e.setMilliseconds(0),e}function kn(n,e){var t;R(1,arguments);var i=ot((t=e?.additionalDigits)!==null&&t!==void 0?t:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var o=_y(n),r;if(o.date){var a=Cy(o.date,i);r=xy(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s=r.getTime(),l=0,c;if(o.time&&(l=Sy(o.time),isNaN(l)))return new Date(NaN);if(o.timezone){if(c=by(o.timezone),isNaN(c))return new Date(NaN)}else{var m=new Date(s+l),p=new Date(0);return p.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),p.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),p}return new Date(s+l+c)}var Ya={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},py=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fy=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gy=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _y(n){var e={},t=n.split(Ya.dateTimeDelimiter),i;if(t.length>2)return e;if(/:/.test(t[0])?i=t[0]:(e.date=t[0],i=t[1],Ya.timeZoneDelimiter.test(e.date)&&(e.date=n.split(Ya.timeZoneDelimiter)[0],i=n.substr(e.date.length,n.length))),i){var o=Ya.timezone.exec(i);o?(e.time=i.replace(o[1],""),e.timezone=o[1]):e.time=i}return e}function Cy(n,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=n.match(t);if(!i)return{year:NaN,restDateString:""};var o=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?o:r*100,restDateString:n.slice((i[1]||i[2]).length)}}function xy(n,e){if(e===null)return new Date(NaN);var t=n.match(py);if(!t)return new Date(NaN);var i=!!t[4],o=Xo(t[1]),r=Xo(t[2])-1,a=Xo(t[3]),s=Xo(t[4]),l=Xo(t[5])-1;if(i)return My(e,s,l)?yy(e,s,l):new Date(NaN);var c=new Date(0);return!Iy(e,r,a)||!Py(e,o)?new Date(NaN):(c.setUTCFullYear(e,r,Math.max(o,a)),c)}function Xo(n){return n?parseInt(n):1}function Sy(n){var e=n.match(fy);if(!e)return NaN;var t=Hl(e[1]),i=Hl(e[2]),o=Hl(e[3]);return wy(t,i,o)?t*ri+i*oi+o*1e3:NaN}function Hl(n){return n&&parseFloat(n.replace(",","."))||0}function by(n){if(n==="Z")return 0;var e=n.match(gy);if(!e)return 0;var t=e[1]==="+"?-1:1,i=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return Ty(i,o)?t*(i*ri+o*oi):NaN}function yy(n,e,t){var i=new Date(0);i.setUTCFullYear(n,0,4);var o=i.getUTCDay()||7,r=(e-1)*7+t+1-o;return i.setUTCDate(i.getUTCDate()+r),i}var vy=[31,null,31,30,31,30,31,31,30,31,30,31];function e0(n){return n%400===0||n%4===0&&n%100!==0}function Iy(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(vy[e]||(e0(n)?29:28))}function Py(n,e){return e>=1&&e<=(e0(n)?366:365)}function My(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function wy(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function Ty(n,e){return e>=0&&e<=59}var Ay={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};bl._date.override({_id:"date-fns",formats:function(){return Ay},parse:function(n,e){if(n===null||typeof n>"u")return null;let t=typeof n;return t==="number"||n instanceof Date?n=Y(n):t==="string"&&(typeof e=="string"?n=Wa(n,e,new Date,this.options):n=kn(n,this.options)),Ri(n)?n.getTime():null},format:function(n,e){return Fa(n,e,this.options)},add:function(n,e,t){switch(t){case"millisecond":return Ee(n,e);case"second":return ma(n,e);case"minute":return da(n,e);case"hour":return ca(n,e);case"day":return Tn(n,e);case"week":return ha(n,e);case"month":return tn(n,e);case"quarter":return ua(n,e);case"year":return pa(n,e);default:return n}},diff:function(n,e,t){switch(t){case"millisecond":return en(n,e);case"second":return Ca(n,e);case"minute":return ga(n,e);case"hour":return fa(n,e);case"day":return Wi(n,e);case"week":return xa(n,e);case"month":return Yi(n,e);case"quarter":return _a(n,e);case"year":return Sa(n,e);default:return 0}},startOf:function(n,e,t){switch(e){case"second":return Ga(n);case"minute":return ba(n);case"hour":return Ha(n);case"day":return ii(n);case"week":return Ho(n);case"isoWeek":return Ho(n,{weekStartsOn:+t});case"month":return va(n);case"quarter":return ya(n);case"year":return Pa(n);default:return n}},endOf:function(n,e){switch(e){case"second":return Da(n);case"minute":return Ta(n);case"hour":return Ma(n);case"day":return Hi(n);case"week":return wa(n);case"month":return Gi(n);case"quarter":return Aa(n);case"year":return Ia(n);default:return n}}});var Dy=Xt.defaults;Dy.elements.financial={color:{up:"rgba(80, 160, 115, 1)",down:"rgba(215, 85, 65, 1)",unchanged:"rgba(90, 90, 90, 1)"}};function ky(n,e){let{x:t,y:i,base:o,width:r,height:a}=n.getProps(["x","low","high","width","height"],e),s,l,c,m,p;return n.horizontal?(p=a/2,s=Math.min(t,o),l=Math.max(t,o),c=i-p,m=i+p):(p=r/2,s=t-p,l=t+p,c=Math.min(i,o),m=Math.max(i,o)),{left:s,top:c,right:l,bottom:m}}function Gl(n,e,t,i){let o=e===null,r=t===null,a=!n||o&&r?!1:ky(n,i);return a&&(o||e>=a.left&&e<=a.right)&&(r||t>=a.top&&t<=a.bottom)}var Ua=class extends Kt{height(){return this.base-this.y}inRange(e,t,i){return Gl(this,e,t,i)}inXRange(e,t){return Gl(this,e,null,t)}inYRange(e,t){return Gl(this,null,e,t)}getRange(e){return e==="x"?this.width/2:this.height/2}getCenterPoint(e){let{x:t,low:i,high:o}=this.getProps(["x","low","high"],e);return{x:t,y:(o+i)/2}}tooltipPosition(e){let{x:t,open:i,close:o}=this.getProps(["x","open","close"],e);return{x:t,y:(i+o)/2}}},ui=Xt.defaults,mi=class extends Ua{draw(e){let t=this,{x:i,open:o,high:r,low:a,close:s}=t,l=tt(t.armLengthRatio,ui.elements.ohlc.armLengthRatio),c=tt(t.armLength,ui.elements.ohlc.armLength);c===null&&(c=t.width*l*.5),s<o?e.strokeStyle=tt(t.color?t.color.up:void 0,ui.elements.ohlc.color.up):s>o?e.strokeStyle=tt(t.color?t.color.down:void 0,ui.elements.ohlc.color.down):e.strokeStyle=tt(t.color?t.color.unchanged:void 0,ui.elements.ohlc.color.unchanged),e.lineWidth=tt(t.lineWidth,ui.elements.ohlc.lineWidth),e.beginPath(),e.moveTo(i,r),e.lineTo(i,a),e.moveTo(i-c,o),e.lineTo(i,o),e.moveTo(i+c,s),e.lineTo(i,s),e.stroke()}};mi.id="ohlc";mi.defaults=ke({},[ui.elements.financial,{lineWidth:2,armLength:null,armLengthRatio:.8}]);function Oy(n,e){let t=n._length,i,o,r,a;for(r=1,a=e.length;r<a;++r)t=Math.min(t,Math.abs(e[r]-e[r-1]));for(r=0,a=n.ticks.length;r<a;++r)o=n.getPixelForTick(r),t=r>0?Math.min(t,Math.abs(o-i)):t,i=o;return t}var n0=(()=>{class n extends Sl{getLabelAndValue(t){let i=this,o=i.getParsed(t),r=i._cachedMeta.iScale.axis,{o:a,h:s,l,c}=o,m=`O: ${a} H: ${s} L: ${l} C: ${c}`;return{label:`${i._cachedMeta.iScale.getLabelForValue(o[r])}`,value:m}}getAllParsedValues(){let t=this._cachedMeta,i=t.iScale.axis,o=t._parsed,r=[];for(let a=0;a<o.length;++a)r.push(o[a][i]);return r}getMinMax(t){let i=this._cachedMeta,o=i._parsed,r=i.iScale.axis;if(o.length<2)return{min:0,max:1};if(t===i.iScale)return{min:o[0][r],max:o[o.length-1][r]};let a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let l=0;l<o.length;l++){let c=o[l];a=Math.min(a,c.l),s=Math.max(s,c.h)}return{min:a,max:s}}_getRuler(){let t=this,i=t.options,o=t._cachedMeta,r=o.iScale,a=r.axis,s=[];for(let m=0;m<o.data.length;++m)s.push(r.getPixelForValue(t.getParsed(m)[a]));let l=i.barThickness;return{min:Oy(r,s),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:t._getStackCount(),scale:r,ratio:l?1:i.categoryPercentage*i.barPercentage}}calculateElementProperties(t,i,o,r){let a=this,s=a._cachedMeta.vScale,l=s.getBasePixel(),c=a._calculateBarIndexPixels(t,i,r),m=a.chart.data.datasets[a.index].data[t],p=s.getPixelForValue(m.o),g=s.getPixelForValue(m.h),_=s.getPixelForValue(m.l),C=s.getPixelForValue(m.c);return{base:o?l:_,x:c.center,y:(_+g)/2,width:c.size,open:p,high:g,low:_,close:C}}draw(){let t=this,i=t.chart,o=t._cachedMeta.data;Ke(i.ctx,i.chartArea);for(let r=0;r<o.length;++r)o[r].draw(t._ctx);Xe(i.ctx)}}return n.overrides={label:"",parsing:!1,hover:{mode:"label"},datasets:{categoryPercentage:.8,barPercentage:.9,animation:{numbers:{type:"number",properties:["x","y","base","width","open","high","low","close"]}}},scales:{x:{type:"timeseries",offset:!0,ticks:{major:{enabled:!0},fontStyle:e=>e.tick.major?"bold":void 0,source:"data",maxRotation:0,autoSkip:!0,autoSkipPadding:75,sampleSize:100},afterBuildTicks:e=>{let t=window&&window.luxon&&window.luxon.DateTime;if(!t)return;let i=e._majorUnit,o=e.ticks,r=o[0];if(!r)return;let a=t.fromMillis(r.value);i==="minute"&&a.second===0||i==="hour"&&a.minute===0||i==="day"&&a.hour===9||i==="month"&&a.day<=3&&a.weekday===1||i==="year"&&a.month===1?r.major=!0:r.major=!1;let s=a.get(i);for(let l=1;l<o.length;l++){let c=o[l];a=t.fromMillis(c.value);let m=a.get(i);c.major=m!==s,s=m}e.ticks=o}},y:{type:"linear"}},plugins:{tooltip:{intersect:!1,mode:"index",callbacks:{label(e){let t=e.parsed;if(!ht(t.y))return dt.plugins.tooltip.callbacks.label(e);let{o:i,h:o,l:r,c:a}=t;return`O: ${i} H: ${o} L: ${r} C: ${a}`}}}}},n})(),Ki=class extends n0{updateElements(e,t,i,o){let r=this,a=r.getDataset(),s=r._ruler||r._getRuler(),l=r.resolveDataElementOptions(t,o),c=r.getSharedOptions(l),m=r.includeOptions(o,c);for(let p=0;p<i;p++){let g=c||r.resolveDataElementOptions(p,o),_=r.calculateElementProperties(p,s,o==="reset",g),C=ze(Pe({},_),{datasetLabel:a.label||"",lineWidth:a.lineWidth,armLength:a.armLength,armLengthRatio:a.armLengthRatio,color:a.color});m&&(C.options=g),r.updateElement(e[p],p,C,o)}}};Ki.id="ohlc";Ki.defaults=ke({dataElementType:mi.id,datasets:{barPercentage:1,categoryPercentage:1}},Xt.defaults.financial);var on=Xt.defaults,hi=class extends Ua{draw(e){let t=this,{x:i,open:o,high:r,low:a,close:s}=t,l=t.borderColor;typeof l=="string"&&(l={up:l,down:l,unchanged:l});let c;s<o?(c=tt(l?l.up:void 0,on.elements.candlestick.borderColor),e.fillStyle=tt(t.color?t.color.up:void 0,on.elements.candlestick.color.up)):s>o?(c=tt(l?l.down:void 0,on.elements.candlestick.borderColor),e.fillStyle=tt(t.color?t.color.down:void 0,on.elements.candlestick.color.down)):(c=tt(l?l.unchanged:void 0,on.elements.candlestick.borderColor),e.fillStyle=tt(t.color?t.color.unchanged:void 0,on.elements.candlestick.color.unchanged)),e.lineWidth=tt(t.borderWidth,on.elements.candlestick.borderWidth),e.strokeStyle=tt(c,on.elements.candlestick.borderColor),e.beginPath(),e.moveTo(i,r),e.lineTo(i,Math.min(o,s)),e.moveTo(i,a),e.lineTo(i,Math.max(o,s)),e.stroke(),e.fillRect(i-t.width/2,s,t.width,o-s),e.strokeRect(i-t.width/2,s,t.width,o-s),e.closePath()}};hi.id="candlestick";hi.defaults=ke({},[on.elements.financial,{borderColor:on.elements.financial.color.unchanged,borderWidth:1}]);var Xi=class extends n0{updateElements(e,t,i,o){let r=this,a=r.getDataset(),s=r._ruler||r._getRuler(),l=r.resolveDataElementOptions(t,o),c=r.getSharedOptions(l),m=r.includeOptions(o,c);r.updateSharedOptions(c,o,l);for(let p=t;p<i;p++){let g=c||r.resolveDataElementOptions(p,o),_=r.calculateElementProperties(p,s,o==="reset",g),C=ze(Pe({},_),{datasetLabel:a.label||"",color:a.color,borderColor:a.borderColor,borderWidth:a.borderWidth});m&&(C.options=g),r.updateElement(e[p],p,C,o)}}};Xi.id="candlestick";Xi.defaults=ke({dataElementType:hi.id},Xt.defaults.financial);var Ey=typeof global=="object"&&global&&global.Object===Object&&global,qa=Ey;var Fy=typeof self=="object"&&self&&self.Object===Object&&self,By=qa||Fy||Function("return this")(),Ve=By;var Ny=Ve.Symbol,Qi=Ny;var i0=Object.prototype,Vy=i0.hasOwnProperty,Ly=i0.toString,Qo=Qi?Qi.toStringTag:void 0;function Ry(n){var e=Vy.call(n,Qo),t=n[Qo];try{n[Qo]=void 0;var i=!0}catch{}var o=Ly.call(n);return i&&(e?n[Qo]=t:delete n[Qo]),o}var o0=Ry;var Wy=Object.prototype,Hy=Wy.toString;function Gy(n){return Hy.call(n)}var r0=Gy;var Yy="[object Null]",Uy="[object Undefined]",a0=Qi?Qi.toStringTag:void 0;function qy(n){return n==null?n===void 0?Uy:Yy:a0&&a0 in Object(n)?o0(n):r0(n)}var On=qy;function zy(n){return n!=null&&typeof n=="object"}var rn=zy;var jy=Array.isArray,$o=jy;function Ky(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Se=Ky;function Xy(n){return n}var za=Xy;var Qy="[object AsyncFunction]",$y="[object Function]",Zy="[object GeneratorFunction]",Jy="[object Proxy]";function tv(n){if(!Se(n))return!1;var e=On(n);return e==$y||e==Zy||e==Qy||e==Jy}var $i=tv;var ev=Ve["__core-js_shared__"],ja=ev;var s0=function(){var n=/[^.]+$/.exec(ja&&ja.keys&&ja.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function nv(n){return!!s0&&s0 in n}var l0=nv;var iv=Function.prototype,ov=iv.toString;function rv(n){if(n!=null){try{return ov.call(n)}catch{}try{return n+""}catch{}}return""}var c0=rv;var av=/[\\^$.*+?()[\]{}|]/g,sv=/^\[object .+?Constructor\]$/,lv=Function.prototype,cv=Object.prototype,dv=lv.toString,uv=cv.hasOwnProperty,mv=RegExp("^"+dv.call(uv).replace(av,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hv(n){if(!Se(n)||l0(n))return!1;var e=$i(n)?mv:sv;return e.test(c0(n))}var d0=hv;function pv(n,e){return n?.[e]}var u0=pv;function fv(n,e){var t=u0(n,e);return d0(t)?t:void 0}var Zi=fv;var m0=Object.create,gv=function(){function n(){}return function(e){if(!Se(e))return{};if(m0)return m0(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}(),h0=gv;function _v(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}var p0=_v;function Cv(n,e){var t=-1,i=n.length;for(e||(e=Array(i));++t<i;)e[t]=n[t];return e}var f0=Cv;var xv=800,Sv=16,bv=Date.now;function yv(n){var e=0,t=0;return function(){var i=bv(),o=Sv-(i-t);if(t=i,o>0){if(++e>=xv)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}var g0=yv;function vv(n){return function(){return n}}var _0=vv;var Iv=function(){try{var n=Zi(Object,"defineProperty");return n({},"",{}),n}catch{}}(),Ji=Iv;var Pv=Ji?function(n,e){return Ji(n,"toString",{configurable:!0,enumerable:!1,value:_0(e),writable:!0})}:za,C0=Pv;var Mv=g0(C0),x0=Mv;var wv=9007199254740991,Tv=/^(?:0|[1-9]\d*)$/;function Av(n,e){var t=typeof n;return e=e??wv,!!e&&(t=="number"||t!="symbol"&&Tv.test(n))&&n>-1&&n%1==0&&n<e}var Ka=Av;function Dv(n,e,t){e=="__proto__"&&Ji?Ji(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}var to=Dv;function kv(n,e){return n===e||n!==n&&e!==e}var En=kv;var Ov=Object.prototype,Ev=Ov.hasOwnProperty;function Fv(n,e,t){var i=n[e];(!(Ev.call(n,e)&&En(i,t))||t===void 0&&!(e in n))&&to(n,e,t)}var S0=Fv;function Bv(n,e,t,i){var o=!t;t||(t={});for(var r=-1,a=e.length;++r<a;){var s=e[r],l=i?i(t[s],n[s],s,t,n):void 0;l===void 0&&(l=n[s]),o?to(t,s,l):S0(t,s,l)}return t}var b0=Bv;var y0=Math.max;function Nv(n,e,t){return e=y0(e===void 0?n.length-1:e,0),function(){for(var i=arguments,o=-1,r=y0(i.length-e,0),a=Array(r);++o<r;)a[o]=i[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=i[o];return s[e]=t(a),p0(n,this,s)}}var v0=Nv;function Vv(n,e){return x0(v0(n,e,za),n+"")}var I0=Vv;var Lv=9007199254740991;function Rv(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Lv}var Xa=Rv;function Wv(n){return n!=null&&Xa(n.length)&&!$i(n)}var eo=Wv;function Hv(n,e,t){if(!Se(t))return!1;var i=typeof e;return(i=="number"?eo(t)&&Ka(e,t.length):i=="string"&&e in t)?En(t[e],n):!1}var P0=Hv;function Gv(n){return I0(function(e,t){var i=-1,o=t.length,r=o>1?t[o-1]:void 0,a=o>2?t[2]:void 0;for(r=n.length>3&&typeof r=="function"?(o--,r):void 0,a&&P0(t[0],t[1],a)&&(r=o<3?void 0:r,o=1),e=Object(e);++i<o;){var s=t[i];s&&n(e,s,i,r)}return e})}var M0=Gv;var Yv=Object.prototype;function Uv(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||Yv;return n===t}var Qa=Uv;function qv(n,e){for(var t=-1,i=Array(n);++t<n;)i[t]=e(t);return i}var w0=qv;var zv="[object Arguments]";function jv(n){return rn(n)&&On(n)==zv}var Yl=jv;var T0=Object.prototype,Kv=T0.hasOwnProperty,Xv=T0.propertyIsEnumerable,Qv=Yl(function(){return arguments}())?Yl:function(n){return rn(n)&&Kv.call(n,"callee")&&!Xv.call(n,"callee")},Zo=Qv;function $v(){return!1}var A0=$v;var O0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D0=O0&&typeof module=="object"&&module&&!module.nodeType&&module,Zv=D0&&D0.exports===O0,k0=Zv?Ve.Buffer:void 0,Jv=k0?k0.isBuffer:void 0,t2=Jv||A0,$a=t2;var e2="[object Arguments]",n2="[object Array]",i2="[object Boolean]",o2="[object Date]",r2="[object Error]",a2="[object Function]",s2="[object Map]",l2="[object Number]",c2="[object Object]",d2="[object RegExp]",u2="[object Set]",m2="[object String]",h2="[object WeakMap]",p2="[object ArrayBuffer]",f2="[object DataView]",g2="[object Float32Array]",_2="[object Float64Array]",C2="[object Int8Array]",x2="[object Int16Array]",S2="[object Int32Array]",b2="[object Uint8Array]",y2="[object Uint8ClampedArray]",v2="[object Uint16Array]",I2="[object Uint32Array]",Bt={};Bt[g2]=Bt[_2]=Bt[C2]=Bt[x2]=Bt[S2]=Bt[b2]=Bt[y2]=Bt[v2]=Bt[I2]=!0;Bt[e2]=Bt[n2]=Bt[p2]=Bt[i2]=Bt[f2]=Bt[o2]=Bt[r2]=Bt[a2]=Bt[s2]=Bt[l2]=Bt[c2]=Bt[d2]=Bt[u2]=Bt[m2]=Bt[h2]=!1;function P2(n){return rn(n)&&Xa(n.length)&&!!Bt[On(n)]}var E0=P2;function M2(n){return function(e){return n(e)}}var F0=M2;var B0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jo=B0&&typeof module=="object"&&module&&!module.nodeType&&module,w2=Jo&&Jo.exports===B0,Ul=w2&&qa.process,T2=function(){try{var n=Jo&&Jo.require&&Jo.require("util").types;return n||Ul&&Ul.binding&&Ul.binding("util")}catch{}}(),ql=T2;var N0=ql&&ql.isTypedArray,A2=N0?F0(N0):E0,Za=A2;var D2=Object.prototype,k2=D2.hasOwnProperty;function O2(n,e){var t=$o(n),i=!t&&Zo(n),o=!t&&!i&&$a(n),r=!t&&!i&&!o&&Za(n),a=t||i||o||r,s=a?w0(n.length,String):[],l=s.length;for(var c in n)(e||k2.call(n,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ka(c,l)))&&s.push(c);return s}var V0=O2;function E2(n,e){return function(t){return n(e(t))}}var L0=E2;function F2(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var R0=F2;var B2=Object.prototype,N2=B2.hasOwnProperty;function V2(n){if(!Se(n))return R0(n);var e=Qa(n),t=[];for(var i in n)i=="constructor"&&(e||!N2.call(n,i))||t.push(i);return t}var W0=V2;function L2(n){return eo(n)?V0(n,!0):W0(n)}var Ja=L2;var R2=Zi(Object,"create"),_n=R2;function W2(){this.__data__=_n?_n(null):{},this.size=0}var H0=W2;function H2(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var G0=H2;var G2="__lodash_hash_undefined__",Y2=Object.prototype,U2=Y2.hasOwnProperty;function q2(n){var e=this.__data__;if(_n){var t=e[n];return t===G2?void 0:t}return U2.call(e,n)?e[n]:void 0}var Y0=q2;var z2=Object.prototype,j2=z2.hasOwnProperty;function K2(n){var e=this.__data__;return _n?e[n]!==void 0:j2.call(e,n)}var U0=K2;var X2="__lodash_hash_undefined__";function Q2(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=_n&&e===void 0?X2:e,this}var q0=Q2;function no(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}no.prototype.clear=H0;no.prototype.delete=G0;no.prototype.get=Y0;no.prototype.has=U0;no.prototype.set=q0;var zl=no;function $2(){this.__data__=[],this.size=0}var z0=$2;function Z2(n,e){for(var t=n.length;t--;)if(En(n[t][0],e))return t;return-1}var Fn=Z2;var J2=Array.prototype,tI=J2.splice;function eI(n){var e=this.__data__,t=Fn(e,n);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():tI.call(e,t,1),--this.size,!0}var j0=eI;function nI(n){var e=this.__data__,t=Fn(e,n);return t<0?void 0:e[t][1]}var K0=nI;function iI(n){return Fn(this.__data__,n)>-1}var X0=iI;function oI(n,e){var t=this.__data__,i=Fn(t,n);return i<0?(++this.size,t.push([n,e])):t[i][1]=e,this}var Q0=oI;function io(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}io.prototype.clear=z0;io.prototype.delete=j0;io.prototype.get=K0;io.prototype.has=X0;io.prototype.set=Q0;var Bn=io;var rI=Zi(Ve,"Map"),ts=rI;function aI(){this.size=0,this.__data__={hash:new zl,map:new(ts||Bn),string:new zl}}var $0=aI;function sI(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}var Z0=sI;function lI(n,e){var t=n.__data__;return Z0(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Nn=lI;function cI(n){var e=Nn(this,n).delete(n);return this.size-=e?1:0,e}var J0=cI;function dI(n){return Nn(this,n).get(n)}var th=dI;function uI(n){return Nn(this,n).has(n)}var eh=uI;function mI(n,e){var t=Nn(this,n),i=t.size;return t.set(n,e),this.size+=t.size==i?0:1,this}var nh=mI;function oo(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}oo.prototype.clear=$0;oo.prototype.delete=J0;oo.prototype.get=th;oo.prototype.has=eh;oo.prototype.set=nh;var ih=oo;var hI=L0(Object.getPrototypeOf,Object),es=hI;var pI="[object Object]",fI=Function.prototype,gI=Object.prototype,oh=fI.toString,_I=gI.hasOwnProperty,CI=oh.call(Object);function xI(n){if(!rn(n)||On(n)!=pI)return!1;var e=es(n);if(e===null)return!0;var t=_I.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&oh.call(t)==CI}var rh=xI;function SI(){this.__data__=new Bn,this.size=0}var ah=SI;function bI(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}var sh=bI;function yI(n){return this.__data__.get(n)}var lh=yI;function vI(n){return this.__data__.has(n)}var ch=vI;var II=200;function PI(n,e){var t=this.__data__;if(t instanceof Bn){var i=t.__data__;if(!ts||i.length<II-1)return i.push([n,e]),this.size=++t.size,this;t=this.__data__=new ih(i)}return t.set(n,e),this.size=t.size,this}var dh=PI;function ro(n){var e=this.__data__=new Bn(n);this.size=e.size}ro.prototype.clear=ah;ro.prototype.delete=sh;ro.prototype.get=lh;ro.prototype.has=ch;ro.prototype.set=dh;var uh=ro;var fh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mh=fh&&typeof module=="object"&&module&&!module.nodeType&&module,MI=mh&&mh.exports===fh,hh=MI?Ve.Buffer:void 0,ph=hh?hh.allocUnsafe:void 0;function wI(n,e){if(e)return n.slice();var t=n.length,i=ph?ph(t):new n.constructor(t);return n.copy(i),i}var gh=wI;var TI=Ve.Uint8Array,jl=TI;function AI(n){var e=new n.constructor(n.byteLength);return new jl(e).set(new jl(n)),e}var _h=AI;function DI(n,e){var t=e?_h(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var Ch=DI;function kI(n){return typeof n.constructor=="function"&&!Qa(n)?h0(es(n)):{}}var xh=kI;function OI(n){return function(e,t,i){for(var o=-1,r=Object(e),a=i(e),s=a.length;s--;){var l=a[n?s:++o];if(t(r[l],l,r)===!1)break}return e}}var Sh=OI;var EI=Sh(),bh=EI;function FI(n,e,t){(t!==void 0&&!En(n[e],t)||t===void 0&&!(e in n))&&to(n,e,t)}var tr=FI;function BI(n){return rn(n)&&eo(n)}var yh=BI;function NI(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}var er=NI;function VI(n){return b0(n,Ja(n))}var vh=VI;function LI(n,e,t,i,o,r,a){var s=er(n,t),l=er(e,t),c=a.get(l);if(c){tr(n,t,c);return}var m=r?r(s,l,t+"",n,e,a):void 0,p=m===void 0;if(p){var g=$o(l),_=!g&&$a(l),C=!g&&!_&&Za(l);m=l,g||_||C?$o(s)?m=s:yh(s)?m=f0(s):_?(p=!1,m=gh(l,!0)):C?(p=!1,m=Ch(l,!0)):m=[]:rh(l)||Zo(l)?(m=s,Zo(s)?m=vh(s):(!Se(s)||$i(s))&&(m=xh(l))):p=!1}p&&(a.set(l,m),o(m,l,i,r,a),a.delete(l)),tr(n,t,m)}var Ih=LI;function Ph(n,e,t,i,o){n!==e&&bh(e,function(r,a){if(o||(o=new uh),Se(r))Ih(n,e,a,t,Ph,i,o);else{var s=i?i(er(n,a),r,a+"",n,e,o):void 0;s===void 0&&(s=r),tr(n,a,s)}},Ja)}var Mh=Ph;var RI=M0(function(n,e,t){Mh(n,e,t)}),ns=RI;var WI=(()=>{class n{constructor(){this.colorschemesOptions=new Sc(void 0)}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=po({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),is=(()=>{class n{constructor(t,i,o){this.zone=i,this.themeService=o,this.type="bar",this.plugins=[],this.chartClick=new hs,this.chartHover=new hs,this.subs=[],this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe(bc()).subscribe(r=>this.themeChanged(r)))}ngOnChanges(t){let i=["type"],o=Object.getOwnPropertyNames(t);if(o.some(r=>i.includes(r))||o.every(r=>t[r].isFirstChange()))this.render();else{let r=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,r.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,r.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,r.options)),this.update()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe())}render(){return this.chart&&this.chart.destroy(),Xt.register(...this.plugins),this.zone.runOutsideAngular(()=>this.chart=new Xt(this.ctx,this.getChartConfiguration()))}update(t){this.chart&&this.zone.runOutsideAngular(()=>this.chart?.update(t))}hideDataset(t,i){this.chart&&(this.chart.getDatasetMeta(t).hidden=i,this.update())}isDatasetHidden(t){return this.chart?.getDatasetMeta(t)?.hidden}toBase64Image(){return this.chart?.toBase64Image()}themeChanged(t){this.themeOverrides=t,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update())}getChartOptions(){return ns({onHover:(t,i)=>{!this.chartHover.observed&&!this.chartHover.observers?.length||this.zone.run(()=>this.chartHover.emit({event:t,active:i}))},onClick:(t,i)=>{!this.chartClick.observed&&!this.chartClick.observers?.length||this.zone.run(()=>this.chartClick.emit({event:t,active:i}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions()}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}}return n.\u0275fac=function(t){return new(t||n)(z(Pc),z(Ic),z(WI))},n.\u0275dir=yc({type:n,selectors:[["canvas","baseChart",""]],inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[vc]}),n})(),HI=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]],GI={datasets:{line:{backgroundColor:n=>fe(ge(n.datasetIndex),.4),borderColor:n=>fe(ge(n.datasetIndex),1),pointBackgroundColor:n=>fe(ge(n.datasetIndex),1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:n=>fe(ge(n.datasetIndex),.8)},bar:{backgroundColor:n=>fe(ge(n.datasetIndex),.6),borderColor:n=>fe(ge(n.datasetIndex),1),hoverBackgroundColor:n=>fe(ge(n.datasetIndex),.8),hoverBorderColor:n=>fe(ge(n.datasetIndex),1)},get radar(){return this.line},doughnut:{backgroundColor:n=>fe(ge(n.dataIndex),.6),borderColor:"#fff",hoverBackgroundColor:n=>fe(ge(n.dataIndex),1),hoverBorderColor:n=>fe(ge(n.dataIndex),1)},get pie(){return this.doughnut},polarArea:{backgroundColor:n=>fe(ge(n.dataIndex),.6),borderColor:n=>fe(ge(n.dataIndex),1),hoverBackgroundColor:n=>fe(ge(n.dataIndex),.8),hoverBorderColor:n=>fe(ge(n.dataIndex),1)},get bubble(){return this.doughnut},get scatter(){return this.doughnut},get area(){return this.polarArea}}};function fe(n,e){return"rgba("+n.concat(e).join(",")+")"}function Kl(n,e){return Math.floor(Math.random()*(e-n+1))+n}function YI(){return[Kl(0,255),Kl(0,255),Kl(0,255)]}function ge(n=0){return HI[n]||YI()}var wh=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=po({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();Xt.register(...tm);var Th=(()=>{class n{constructor(t){t?.plugins&&Xt.register(...t?.plugins);let i=ns(GI,t?.defaults||{});dt.set(i)}static forRoot(t){return{ngModule:n,providers:[{provide:wh,useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)(rr(wh,8))},n.\u0275mod=yi({type:n}),n.\u0275inj=bi({}),n})();var Ah={modes:{point(n,e){return rs(n,e,{intersect:!0})},nearest(n,e,t){return jI(n,e,t)},x(n,e,t){return rs(n,e,{intersect:t.intersect,axis:"x"})},y(n,e,t){return rs(n,e,{intersect:t.intersect,axis:"y"})}}};function ic(n,e,t){return(Ah.modes[t.mode]||Ah.modes.nearest)(n,e,t)}function qI(n,e,t){return t!=="x"&&t!=="y"?n.inRange(e.x,e.y,"x",!0)||n.inRange(e.x,e.y,"y",!0):n.inRange(e.x,e.y,t,!0)}function zI(n,e,t){return t==="x"?{x:n.x,y:e.y}:t==="y"?{x:e.x,y:n.y}:e}function rs(n,e,t){return n.visibleElements.filter(i=>t.intersect?i.inRange(e.x,e.y):qI(i,e,t.axis))}function jI(n,e,t){let i=Number.POSITIVE_INFINITY;return rs(n,e,t).reduce((o,r)=>{let a=r.getCenterPoint(),s=zI(e,a,t.axis),l=cn(e,s);return l<i?(o=[r],i=l):l===i&&o.push(r),o},[]).sort((o,r)=>o._index-r._index).slice(0,1)}var KI=(n,e)=>e>n||n.length>e.length&&n.slice(0,e.length)===e,pi=.001,ss=(n,e,t)=>Math.min(t,Math.max(e,n));function XI(n,e,t){for(let i of Object.keys(n))n[i]=ss(n[i],e,t);return n}function QI(n,e,t,i){if(!n||!e||t<=0)return!1;let o=i/2;return Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)<=Math.pow(t+o,2)}function Kh(n,{x:e,y:t,x2:i,y2:o},r,a){let s=a/2,l=n.x>=e-s-pi&&n.x<=i+s+pi,c=n.y>=t-s-pi&&n.y<=o+s+pi;return r==="x"?l:(r==="y"||l)&&c}function co(n,e){let{centerX:t,centerY:i}=n.getProps(["centerX","centerY"],e);return{x:t,y:i}}function $I(n,e,t,i=!0){let o=t.split("."),r=0;for(let a of e.split(".")){let s=o[r++];if(parseInt(a,10)<parseInt(s,10))break;if(KI(s,a)){if(i)throw new Error(`${n} v${t} is not supported. v${e} or newer is required.`);return!1}}return!0}var Xh=n=>typeof n=="string"&&n.endsWith("%"),Qh=n=>parseFloat(n)/100,$h=n=>ss(Qh(n),0,1);function oc(n,e){return e==="start"?0:e==="end"?n:Xh(e)?$h(e)*n:n/2}function Rn(n,e,t=!0){return typeof e=="number"?e:Xh(e)?(t?$h(e):Qh(e))*n:n}function ZI(n,e){let{x:t,width:i}=n,o=e.textAlign;return o==="center"?t+i/2:o==="end"||o==="right"?t+i:t}function rc(n,e="center"){return st(n)?{x:tt(n.x,e),y:tt(n.y,e)}:(n=tt(n,e),{x:n,y:n})}function Zh(n){return n&&(Gt(n.xValue)||Gt(n.yValue))}function ir(n,e,t,i=!1){let o=t.init;if(o){if(o===!0)return tp(e,i)}else return;return JI(e,i,St(o,[{chart:n,properties:e,options:t}]))}function Jh(n,e,t){let i=!1;return e.forEach(o=>{oe(n[o])?(i=!0,t[o]=n[o]):Gt(t[o])&&delete t[o]}),i}function tp({centerX:n,centerY:e},t){return t?{centerX:n,centerY:e,radius:0,width:0,height:0}:{x:n,y:e,x2:n,y2:e,width:0,height:0}}function JI(n,e,t){if(t===!0)return tp(n,e);if(st(t))return t}var Xl=new Map,tP=n=>isNaN(n)||n<=0,eP=n=>n.reduce(function(e,t){return e+=t.string,e},"");function ls(n){if(n&&typeof n=="object"){let e=n.toString();return e==="[object HTMLImageElement]"||e==="[object HTMLCanvasElement]"}}function ac(n,{x:e,y:t},i){i&&(n.translate(e,t),n.rotate(Yt(i)),n.translate(-e,-t))}function Wn(n,e){if(e&&e.borderWidth)return n.lineCap=e.borderCapStyle,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.lineJoin=e.borderJoinStyle,n.lineWidth=e.borderWidth,n.strokeStyle=e.borderColor,!0}function uo(n,e){n.shadowColor=e.backgroundShadowColor,n.shadowBlur=e.shadowBlur,n.shadowOffsetX=e.shadowOffsetX,n.shadowOffsetY=e.shadowOffsetY}function sc(n,e){let t=e.content;if(ls(t))return{width:Rn(t.width,e.width),height:Rn(t.height,e.height)};let i=e.font,o=pt(i)?i.map(l=>Ft(l)):[Ft(i)],r=e.textStrokeWidth,a=pt(t)?t:[t],s=a.join()+eP(o)+r+(n._measureText?"-spriting":"");return Xl.has(s)||Xl.set(s,aP(n,a,o,r)),Xl.get(s)}function ep(n,e,t){let{x:i,y:o,width:r,height:a}=e;n.save(),uo(n,t);let s=Wn(n,t);n.fillStyle=t.backgroundColor,n.beginPath(),mn(n,{x:i,y:o,w:r,h:a,radius:XI(Ue(t.borderRadius),0,Math.min(r,a)/2)}),n.closePath(),n.fill(),s&&(n.shadowColor=t.borderShadowColor,n.stroke()),n.restore()}function nP(n,e,t){let i=t.content;if(ls(i)){n.save(),n.globalAlpha=cP(t.opacity,i.style.opacity),n.drawImage(i,e.x,e.y,e.width,e.height),n.restore();return}let o=pt(i)?i:[i],r=t.font,a=pt(r)?r.map(p=>Ft(p)):[Ft(r)],s=t.color,l=pt(s)?s:[s],c=ZI(e,t),m=e.y+t.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=t.textAlign,iP(n,t)&&sP(n,{x:c,y:m},o,a),lP(n,{x:c,y:m},o,{fonts:a,colors:l}),n.restore()}function iP(n,e){if(e.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=e.textStrokeWidth,n.strokeStyle=e.textStrokeColor,!0}function oP(n,e,t,i){let{radius:o,options:r}=e,a=r.pointStyle,s=r.rotation,l=(s||0)*So;if(ls(a)){n.save(),n.translate(t,i),n.rotate(l),n.drawImage(a,-a.width/2,-a.height/2,a.width,a.height),n.restore();return}tP(o)||rP(n,{x:t,y:i,radius:o,rotation:s,style:a,rad:l})}function rP(n,{x:e,y:t,radius:i,rotation:o,style:r,rad:a}){let s,l,c,m;switch(n.beginPath(),r){default:n.arc(e,t,i,0,xt),n.closePath();break;case"triangle":n.moveTo(e+Math.sin(a)*i,t-Math.cos(a)*i),a+=Ti,n.lineTo(e+Math.sin(a)*i,t-Math.cos(a)*i),a+=Ti,n.lineTo(e+Math.sin(a)*i,t-Math.cos(a)*i),n.closePath();break;case"rectRounded":m=i*.516,c=i-m,s=Math.cos(a+De)*c,l=Math.sin(a+De)*c,n.arc(e-s,t-l,m,a-mt,a-It),n.arc(e+l,t-s,m,a-It,a),n.arc(e+s,t+l,m,a,a+It),n.arc(e-l,t+s,m,a+It,a+mt),n.closePath();break;case"rect":if(!o){c=Math.SQRT1_2*i,n.rect(e-c,t-c,2*c,2*c);break}a+=De;case"rectRot":s=Math.cos(a)*i,l=Math.sin(a)*i,n.moveTo(e-s,t-l),n.lineTo(e+l,t-s),n.lineTo(e+s,t+l),n.lineTo(e-l,t+s),n.closePath();break;case"crossRot":a+=De;case"cross":s=Math.cos(a)*i,l=Math.sin(a)*i,n.moveTo(e-s,t-l),n.lineTo(e+s,t+l),n.moveTo(e+l,t-s),n.lineTo(e-l,t+s);break;case"star":s=Math.cos(a)*i,l=Math.sin(a)*i,n.moveTo(e-s,t-l),n.lineTo(e+s,t+l),n.moveTo(e+l,t-s),n.lineTo(e-l,t+s),a+=De,s=Math.cos(a)*i,l=Math.sin(a)*i,n.moveTo(e-s,t-l),n.lineTo(e+s,t+l),n.moveTo(e+l,t-s),n.lineTo(e-l,t+s);break;case"line":s=Math.cos(a)*i,l=Math.sin(a)*i,n.moveTo(e-s,t-l),n.lineTo(e+s,t+l);break;case"dash":n.moveTo(e,t),n.lineTo(e+Math.cos(a)*i,t+Math.sin(a)*i);break}n.fill()}function aP(n,e,t,i){n.save();let o=e.length,r=0,a=i;for(let s=0;s<o;s++){let l=t[Math.min(s,t.length-1)];n.font=l.string;let c=e[s];r=Math.max(r,n.measureText(c).width+i),a+=l.lineHeight}return n.restore(),{width:r,height:a}}function sP(n,{x:e,y:t},i,o){n.beginPath();let r=0;i.forEach(function(a,s){let l=o[Math.min(s,o.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(a,e,t+c/2+r),r+=c}),n.stroke()}function lP(n,{x:e,y:t},i,{fonts:o,colors:r}){let a=0;i.forEach(function(s,l){let c=r[Math.min(l,r.length-1)],m=o[Math.min(l,o.length-1)],p=m.lineHeight;n.beginPath(),n.font=m.string,n.fillStyle=c,n.fillText(s,e,t+p/2+a),a+=p,n.fill()})}function cP(n,e){let t=Ge(n)?n:e;return Ge(t)?ss(t,0,1):1}var Dh={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function ao(n,e,t){return e=typeof e=="number"?e:n.parse(e),Et(e)?n.getPixelForValue(e):t}function fi(n,e,t){let i=e[t];if(i||t==="scaleID")return i;let o=t.charAt(0),r=Object.values(n).filter(a=>a.axis&&a.axis===o);return r.length?r[0].id:o}function np(n,e){if(n){let t=n.options.reverse,i=ao(n,e.min,t?e.end:e.start),o=ao(n,e.max,t?e.start:e.end);return{start:i,end:o}}}function ip(n,e){let{chartArea:t,scales:i}=n,o=i[fi(i,e,"xScaleID")],r=i[fi(i,e,"yScaleID")],a=t.width/2,s=t.height/2;return o&&(a=ao(o,e.xValue,o.left+o.width/2)),r&&(s=ao(r,e.yValue,r.top+r.height/2)),{x:a,y:s}}function lc(n,e){let t=n.scales,i=t[fi(t,e,"xScaleID")],o=t[fi(t,e,"yScaleID")];if(!i&&!o)return{};let{left:r,right:a}=i||n.chartArea,{top:s,bottom:l}=o||n.chartArea,c=kh(i,{min:e.xMin,max:e.xMax,start:r,end:a});r=c.start,a=c.end;let m=kh(o,{min:e.yMin,max:e.yMax,start:l,end:s});return s=m.start,l=m.end,{x:r,y:s,x2:a,y2:l,width:a-r,height:l-s,centerX:r+(a-r)/2,centerY:s+(l-s)/2}}function op(n,e){if(!Zh(e)){let t=lc(n,e),i=e.radius;(!i||isNaN(i))&&(i=Math.min(t.width,t.height)/2,e.radius=i);let o=i*2,r=t.centerX+e.xAdjust,a=t.centerY+e.yAdjust;return{x:r-i,y:a-i,x2:r+i,y2:a+i,centerX:r,centerY:a,width:o,height:o,radius:i}}return uP(n,e)}function dP(n,e){let{scales:t,chartArea:i}=n,o=t[e.scaleID],r={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return o?mP(o,r,e):hP(t,r,e),r}function rp(n,e,t){let i=lc(n,e);return i.initProperties=ir(n,i,e,t),i.elements=[{type:"label",optionScope:"label",properties:gP(n,i,e),initProperties:i.initProperties}],i}function uP(n,e){let t=ip(n,e),i=e.radius*2;return{x:t.x-e.radius+e.xAdjust,y:t.y-e.radius+e.yAdjust,x2:t.x+e.radius+e.xAdjust,y2:t.y+e.radius+e.yAdjust,centerX:t.x+e.xAdjust,centerY:t.y+e.yAdjust,radius:e.radius,width:i,height:i}}function kh(n,e){let t=np(n,e)||e;return{start:Math.min(t.start,t.end),end:Math.max(t.start,t.end)}}function mP(n,e,t){let i=ao(n,t.value,NaN),o=ao(n,t.endValue,i);n.isHorizontal()?(e.x=i,e.x2=o):(e.y=i,e.y2=o)}function hP(n,e,t){for(let i of Object.keys(Dh)){let o=n[fi(n,t,i)];if(o){let{min:r,max:a,start:s,end:l,startProp:c,endProp:m}=Dh[i],p=np(o,{min:t[r],max:t[a],start:o[s],end:o[l]});e[c]=p.start,e[m]=p.end}}}function pP({properties:n,options:e},t,i,o){let{x:r,x2:a,width:s}=n;return ap({start:r,end:a,size:s,borderWidth:e.borderWidth},{position:i.x,padding:{start:o.left,end:o.right},adjust:e.label.xAdjust,size:t.width})}function fP({properties:n,options:e},t,i,o){let{y:r,y2:a,height:s}=n;return ap({start:r,end:a,size:s,borderWidth:e.borderWidth},{position:i.y,padding:{start:o.top,end:o.bottom},adjust:e.label.yAdjust,size:t.height})}function ap(n,e){let{start:t,end:i,borderWidth:o}=n,{position:r,padding:{start:a,end:s},adjust:l}=e,c=i-o-t-a-s-e.size;return t+o/2+l+oc(c,r)}function gP(n,e,t){let i=t.label;i.backgroundColor="transparent",i.callout.display=!1;let o=rc(i.position),r=Ut(i.padding),a=sc(n.ctx,i),s=pP({properties:e,options:t},a,o,r),l=fP({properties:e,options:t},a,o,r),c=a.width+r.width,m=a.height+r.height;return{x:s,y:l,x2:s+c,y2:l+m,width:c,height:m,centerX:s+c/2,centerY:l+m/2,rotation:i.rotation}}function Ci(n,e,t){let i=Math.cos(t),o=Math.sin(t),r=e.x,a=e.y;return{x:r+i*(n.x-r)-o*(n.y-a),y:a+o*(n.x-r)+i*(n.y-a)}}var Ql=["enter","leave"],cc=Ql.concat("click");function _P(n,e,t){e.listened=Jh(t,cc,e.listeners),e.moveListened=!1,e._getElements=ic,Ql.forEach(i=>{oe(t[i])&&(e.moveListened=!0)}),(!e.listened||!e.moveListened)&&e.annotations.forEach(i=>{!e.listened&&oe(i.click)&&(e.listened=!0),e.moveListened||Ql.forEach(o=>{oe(i[o])&&(e.listened=!0,e.moveListened=!0)})})}function CP(n,e,t){if(n.listened)switch(e.type){case"mousemove":case"mouseout":return xP(n,e,t);case"click":return SP(n,e,t)}}function xP(n,e,t){if(!n.moveListened)return;let i;e.type==="mousemove"?i=ic(n,e,t.interaction):i=[];let o=n.hovered;n.hovered=i;let r={state:n,event:e},a=Oh(r,"leave",o,i);return Oh(r,"enter",i,o)||a}function Oh({state:n,event:e},t,i,o){let r;for(let a of i)o.indexOf(a)<0&&(r=sp(a.options[t]||n.listeners[t],a,e)||r);return r}function SP(n,e,t){let i=n.listeners,o=ic(n,e,t.interaction),r;for(let a of o)r=sp(a.options.click||i.click,a,e)||r;return r}function sp(n,e,t){return St(n,[e.$context,t])===!0}var as=["afterDraw","beforeDraw"];function bP(n,e,t){let i=e.visibleElements;e.hooked=Jh(t,as,e.hooks),e.hooked||i.forEach(o=>{e.hooked||as.forEach(r=>{oe(o.options[r])&&(e.hooked=!0)})})}function Eh(n,e,t){if(n.hooked){let i=e.options[t]||n.hooks[t];return St(i,[e.$context])}}function yP(n,e,t){let i=wP(n.scales,e,t),o=Fh(e,i,"min","suggestedMin");o=Fh(e,i,"max","suggestedMax")||o,o&&oe(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function vP(n,e){for(let t of n)PP(t,e)}function Fh(n,e,t,i){if(Et(e[t])&&!IP(n.options,t,i)){let o=n[t]!==e[t];return n[t]=e[t],o}}function IP(n,e,t){return Gt(n[e])||Gt(n[t])}function PP(n,e){for(let t of["scaleID","xScaleID","yScaleID"]){let i=fi(e,n,t);i&&!e[i]&&MP(n,t)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function MP(n,e){if(e==="scaleID")return!0;let t=e.charAt(0);for(let i of["Min","Max","Value"])if(Gt(n[t+i]))return!0;return!1}function wP(n,e,t){let i=e.axis,o=e.id,r=i+"ScaleID",a={min:tt(e.min,Number.NEGATIVE_INFINITY),max:tt(e.max,Number.POSITIVE_INFINITY)};for(let s of t)s.scaleID===o?Bh(s,e,["value","endValue"],a):fi(n,s,r)===o&&Bh(s,e,[i+"Min",i+"Max",i+"Value"],a);return a}function Bh(n,e,t,i){for(let o of t){let r=n[o];if(Gt(r)){let a=e.parse(r);i.min=Math.min(i.min,a),i.max=Math.max(i.max,a)}}}var Hn=class extends Kt{inRange(e,t,i,o){let{x:r,y:a}=Ci({x:e,y:t},this.getCenterPoint(o),Yt(-this.options.rotation));return Kh({x:r,y:a},this.getProps(["x","y","x2","y2"],o),i,this.options.borderWidth)}getCenterPoint(e){return co(this,e)}draw(e){e.save(),ac(e,this.getCenterPoint(),this.options.rotation),ep(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return rp(e,t)}};Hn.id="boxAnnotation";Hn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Hn.defaultRoutes={borderColor:"color",backgroundColor:"color"};Hn.descriptors={label:{_fallback:!0}};var lp=["left","bottom","top","right"],gi=class extends Kt{inRange(e,t,i,o){let{x:r,y:a}=Ci({x:e,y:t},this.getCenterPoint(o),Yt(-this.rotation));return Kh({x:r,y:a},this.getProps(["x","y","x2","y2"],o),i,this.options.borderWidth)}getCenterPoint(e){return co(this,e)}draw(e){let t=this.options,i=!Gt(this._visible)||this._visible;!t.display||!t.content||!i||(e.save(),ac(e,this.getCenterPoint(),this.rotation),AP(e,this),ep(e,this,t),nP(e,NP(this),t),e.restore())}resolveElementProperties(e,t){let i;if(Zh(t))i=ip(e,t);else{let{centerX:s,centerY:l}=lc(e,t);i={x:s,y:l}}let o=Ut(t.padding),r=sc(e.ctx,t),a=TP(i,r,t,o);return ze(Pe({initProperties:ir(e,a,t),pointX:i.x,pointY:i.y},a),{rotation:t.rotation})}};gi.id="labelAnnotation";gi.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};gi.defaultRoutes={borderColor:"color"};function TP(n,e,t,i){let o=e.width+i.width+t.borderWidth,r=e.height+i.height+t.borderWidth,a=rc(t.position,"center"),s=Nh(n.x,o,t.xAdjust,a.x),l=Nh(n.y,r,t.yAdjust,a.y);return{x:s,y:l,x2:s+o,y2:l+r,width:o,height:r,centerX:s+o/2,centerY:l+r/2}}function Nh(n,e,t=0,i){return n-oc(e,i)+t}function AP(n,e){let{pointX:t,pointY:i,options:o}=e,r=o.callout,a=r&&r.display&&FP(e,r);if(!a||VP(e,r,a))return;if(n.save(),n.beginPath(),!Wn(n,r))return n.restore();let{separatorStart:l,separatorEnd:c}=DP(e,a),{sideStart:m,sideEnd:p}=OP(e,a,l);(r.margin>0||o.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(m.x,m.y),n.lineTo(p.x,p.y);let g=Ci({x:t,y:i},e.getCenterPoint(),Yt(-e.rotation));n.lineTo(g.x,g.y),n.stroke(),n.restore()}function DP(n,e){let{x:t,y:i,x2:o,y2:r}=n,a=kP(n,e),s,l;return e==="left"||e==="right"?(s={x:t+a,y:i},l={x:s.x,y:r}):(s={x:t,y:i+a},l={x:o,y:s.y}),{separatorStart:s,separatorEnd:l}}function kP(n,e){let{width:t,height:i,options:o}=n,r=o.callout.margin+o.borderWidth/2;return e==="right"?t+r:e==="bottom"?i+r:-r}function OP(n,e,t){let{y:i,width:o,height:r,options:a}=n,s=a.callout.start,l=EP(e,a.callout),c,m;return e==="left"||e==="right"?(c={x:t.x,y:i+Rn(r,s)},m={x:c.x+l,y:c.y}):(c={x:t.x+Rn(o,s),y:t.y},m={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:m}}function EP(n,e){let t=e.side;return n==="left"||n==="top"?-t:t}function FP(n,e){let t=e.position;return lp.includes(t)?t:BP(n,e)}function BP(n,e){let{x:t,y:i,x2:o,y2:r,width:a,height:s,pointX:l,pointY:c,centerX:m,centerY:p,rotation:g}=n,_={x:m,y:p},C=e.start,v=Rn(a,C),I=Rn(s,C),M=[t,t+v,t+v,o],w=[i+I,r,i,r],k=[];for(let D=0;D<4;D++){let A=Ci({x:M[D],y:w[D]},_,Yt(g));k.push({position:lp[D],distance:cn(A,{x:l,y:c})})}return k.sort((D,A)=>D.distance-A.distance)[0].position}function NP({x:n,y:e,width:t,height:i,options:o}){let r=o.borderWidth/2,a=Ut(o.padding);return{x:n+a.left+r,y:e+a.top+r,width:t-a.left-a.right-o.borderWidth,height:i-a.top-a.bottom-o.borderWidth}}function VP(n,e,t){let{pointX:i,pointY:o}=n,r=e.margin,a=i,s=o;return t==="left"?a+=r:t==="right"?a-=r:t==="top"?s+=r:t==="bottom"&&(s-=r),n.inRange(a,s)}var dc=(n,e,t)=>({x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}),$l=(n,e,t)=>dc(e,t,Math.abs((n-e.y)/(t.y-e.y))).x,Vh=(n,e,t)=>dc(e,t,Math.abs((n-e.x)/(t.x-e.x))).y,nr=n=>n*n,LP=(n,e,{x:t,y:i,x2:o,y2:r},a)=>a==="y"?{start:Math.min(i,r),end:Math.max(i,r),value:e}:{start:Math.min(t,o),end:Math.max(t,o),value:n},Lh=(n,e,t,i)=>(1-i)*(1-i)*n+2*(1-i)*i*e+i*i*t,Zl=(n,e,t,i)=>({x:Lh(n.x,e.x,t.x,i),y:Lh(n.y,e.y,t.y,i)}),Rh=(n,e,t,i)=>2*(1-i)*(e-n)+2*i*(t-e),Wh=(n,e,t,i)=>-Math.atan2(Rh(n.x,e.x,t.x,i),Rh(n.y,e.y,t.y,i))+.5*mt,cs=(()=>{class n extends Kt{inRange(t,i,o,r){let a=this.options.borderWidth/2;if(o!=="x"&&o!=="y"){let s={mouseX:t,mouseY:i},{path:l,ctx:c}=this;if(l){Wn(c,this.options);let{chart:p}=this.$context,g=t*p.currentDevicePixelRatio,_=i*p.currentDevicePixelRatio,C=c.isPointInStroke(l,g,_)||Jl(this,s,r);return c.restore(),C}let m=nr(a);return GP(this,s,m,r)||Jl(this,s,r)}return RP(this,{mouseX:t,mouseY:i},o,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return co(this,t)}draw(t){let{x:i,y:o,x2:r,y2:a,cp:s,options:l}=this;if(t.save(),!Wn(t,l))return t.restore();uo(t,l);let c=Math.sqrt(Math.pow(r-i,2)+Math.pow(a-o,2));if(l.curve&&s)return QP(t,this,s,c),t.restore();let{startOpts:m,endOpts:p,startAdjust:g,endAdjust:_}=cp(this),C=Math.atan2(a-o,r-i);t.translate(i,o),t.rotate(C),t.beginPath(),t.moveTo(0+g,0),t.lineTo(c-_,0),t.shadowColor=l.borderShadowColor,t.stroke(),tc(t,0,g,m),tc(t,c,-_,p),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,i){let o=dP(t,i),{x:r,y:a,x2:s,y2:l}=o,c=WP(o,t.chartArea),m=c?HP({x:r,y:a},{x:s,y:l},t.chartArea):{x:r,y:a,x2:s,y2:l,width:Math.abs(s-r),height:Math.abs(l-a)};if(m.centerX=(s+r)/2,m.centerY=(l+a)/2,m.initProperties=ir(t,m,i),i.curve){let g={x:m.x,y:m.y},_={x:m.x2,y:m.y2};m.cp=XP(m,i,cn(g,_))}let p=YP(t,m,i.label);return p._visible=c,m.elements=[{type:"label",optionScope:"label",properties:p,initProperties:m.initProperties}],m}}return n.id="lineAnnotation",n})(),Hh={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};cs.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Hh),fill:!1,length:12,start:Object.assign({},Hh),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},gi.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};cs.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}};cs.defaultRoutes={borderColor:"color"};function RP(n,{mouseX:e,mouseY:t},i,{hBorderWidth:o,useFinalPosition:r}){let a=LP(e,t,n.getProps(["x","y","x2","y2"],r),i);return a.value>=a.start-o&&a.value<=a.end+o||Jl(n,{mouseX:e,mouseY:t},r,i)}function WP({x:n,y:e,x2:t,y2:i},{top:o,right:r,bottom:a,left:s}){return!(n<s&&t<s||n>r&&t>r||e<o&&i<o||e>a&&i>a)}function Gh({x:n,y:e},t,{top:i,right:o,bottom:r,left:a}){return n<a&&(e=Vh(a,{x:n,y:e},t),n=a),n>o&&(e=Vh(o,{x:n,y:e},t),n=o),e<i&&(n=$l(i,{x:n,y:e},t),e=i),e>r&&(n=$l(r,{x:n,y:e},t),e=r),{x:n,y:e}}function HP(n,e,t){let{x:i,y:o}=Gh(n,e,t),{x:r,y:a}=Gh(e,n,t);return{x:i,y:o,x2:r,y2:a,width:Math.abs(r-i),height:Math.abs(a-o)}}function GP(n,{mouseX:e,mouseY:t},i=pi,o){let{x:r,y:a,x2:s,y2:l}=n.getProps(["x","y","x2","y2"],o),c=s-r,m=l-a,p=nr(c)+nr(m),g=p===0?-1:((e-r)*c+(t-a)*m)/p,_,C;return g<0?(_=r,C=a):g>1?(_=s,C=l):(_=r+g*c,C=a+g*m),nr(e-_)+nr(t-C)<=i}function Jl(n,{mouseX:e,mouseY:t},i,o){let r=n.label;return r.options.display&&r.inRange(e,t,o,i)}function YP(n,e,t){let i=t.borderWidth,o=Ut(t.padding),r=sc(n.ctx,t),a=r.width+o.width+i,s=r.height+o.height+i;return qP(e,t,{width:a,height:s,padding:o},n.chartArea)}function UP(n){let{x:e,y:t,x2:i,y2:o}=n,r=Math.atan2(o-t,i-e);return r>mt/2?r-mt:r<mt/-2?r+mt:r}function qP(n,e,t,i){let{width:o,height:r,padding:a}=t,{xAdjust:s,yAdjust:l}=e,c={x:n.x,y:n.y},m={x:n.x2,y:n.y2},p=e.rotation==="auto"?UP(n):Yt(e.rotation),g=zP(o,r,p),_=jP(n,e,{labelSize:g,padding:a},i),C=n.cp?Zl(c,n.cp,m,_):dc(c,m,_),v={size:g.w,min:i.left,max:i.right,padding:a.left},I={size:g.h,min:i.top,max:i.bottom,padding:a.top},M=Uh(C.x,v)+s,w=Uh(C.y,I)+l;return{x:M-o/2,y:w-r/2,x2:M+o/2,y2:w+r/2,centerX:M,centerY:w,pointX:C.x,pointY:C.y,width:o,height:r,rotation:Qn(p)}}function zP(n,e,t){let i=Math.cos(t),o=Math.sin(t);return{w:Math.abs(n*i)+Math.abs(e*o),h:Math.abs(n*o)+Math.abs(e*i)}}function jP(n,e,t,i){let o,r=KP(n,i);return e.position==="start"?o=Yh({w:n.x2-n.x,h:n.y2-n.y},t,e,r):e.position==="end"?o=1-Yh({w:n.x-n.x2,h:n.y-n.y2},t,e,r):o=oc(1,e.position),o}function Yh(n,e,t,i){let{labelSize:o,padding:r}=e,a=n.w*i.dx,s=n.h*i.dy,l=a>0&&(o.w/2+r.left-i.x)/a,c=s>0&&(o.h/2+r.top-i.y)/s;return ss(Math.max(l,c),0,.25)}function KP(n,e){let{x:t,x2:i,y:o,y2:r}=n,a=Math.min(o,r)-e.top,s=Math.min(t,i)-e.left,l=e.bottom-Math.max(o,r),c=e.right-Math.max(t,i);return{x:Math.min(s,c),y:Math.min(a,l),dx:s<=c?1:-1,dy:a<=l?1:-1}}function Uh(n,e){let{size:t,min:i,max:o,padding:r}=e,a=t/2;return t>o-i?(o+i)/2:(i>=n-r-a&&(n=i+r+a),o<=n+r+a&&(n=o-r-a),n)}function cp(n){let e=n.options,t=e.arrowHeads&&e.arrowHeads.start,i=e.arrowHeads&&e.arrowHeads.end;return{startOpts:t,endOpts:i,startAdjust:qh(n,t),endAdjust:qh(n,i)}}function qh(n,e){if(!e||!e.display)return 0;let{length:t,width:i}=e,o=n.options.borderWidth/2,r={x:t,y:i+o};return Math.abs($l(0,r,{x:0,y:o}))}function tc(n,e,t,i){if(!i||!i.display)return;let{length:o,width:r,fill:a,backgroundColor:s,borderColor:l}=i,c=Math.abs(e-o)+t;n.beginPath(),uo(n,i),Wn(n,i),n.moveTo(c,-r),n.lineTo(e+t,0),n.lineTo(c,r),a===!0?(n.fillStyle=s||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function XP(n,e,t){let{x:i,y:o,x2:r,y2:a,centerX:s,centerY:l}=n,c=Math.atan2(a-o,r-i),m=rc(e.controlPoint,0),p={x:s+Rn(t,m.x,!1),y:l+Rn(t,m.y,!1)};return Ci(p,{x:s,y:l},c)}function zh(n,{x:e,y:t},{angle:i,adjust:o},r){!r||!r.display||(n.save(),n.translate(e,t),n.rotate(i),tc(n,0,-o,r),n.restore())}function QP(n,e,t,i){let{x:o,y:r,x2:a,y2:s,options:l}=e,{startOpts:c,endOpts:m,startAdjust:p,endAdjust:g}=cp(e),_={x:o,y:r},C={x:a,y:s},v=Wh(_,t,C,0),I=Wh(_,t,C,1)-mt,M=Zl(_,t,C,p/i),w=Zl(_,t,C,1-g/i),k=new Path2D;n.beginPath(),k.moveTo(M.x,M.y),k.quadraticCurveTo(t.x,t.y,w.x,w.y),n.shadowColor=l.borderShadowColor,n.stroke(k),e.path=k,e.ctx=n,zh(n,M,{angle:v,adjust:p},c),zh(n,w,{angle:I,adjust:g},m)}var _i=class extends Kt{inRange(e,t,i,o){let r=this.options.rotation,a=this.options.borderWidth;if(i!=="x"&&i!=="y")return $P({x:e,y:t},this.getProps(["width","height","centerX","centerY"],o),r,a);let{x:s,y:l,x2:c,y2:m}=this.getProps(["x","y","x2","y2"],o),p=a/2,g=i==="y"?{start:l,end:m}:{start:s,end:c},_=Ci({x:e,y:t},this.getCenterPoint(o),Yt(-r));return _[i]>=g.start-p-pi&&_[i]<=g.end+p+pi}getCenterPoint(e){return co(this,e)}draw(e){let{width:t,height:i,centerX:o,centerY:r,options:a}=this;e.save(),ac(e,this.getCenterPoint(),a.rotation),uo(e,this.options),e.beginPath(),e.fillStyle=a.backgroundColor;let s=Wn(e,a);e.ellipse(o,r,i/2,t/2,mt/2,0,2*mt),e.fill(),s&&(e.shadowColor=a.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,t){return rp(e,t,!0)}};_i.id="ellipseAnnotation";_i.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},Hn.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};_i.defaultRoutes={borderColor:"color",backgroundColor:"color"};_i.descriptors={label:{_fallback:!0}};function $P(n,e,t,i){let{width:o,height:r,centerX:a,centerY:s}=e,l=o/2,c=r/2;if(l<=0||c<=0)return!1;let m=Yt(t||0),p=i/2||0,g=Math.cos(m),_=Math.sin(m),C=Math.pow(g*(n.x-a)+_*(n.y-s),2),v=Math.pow(_*(n.x-a)-g*(n.y-s),2);return C/Math.pow(l+p,2)+v/Math.pow(c+p,2)<=1.0001}var so=class extends Kt{inRange(e,t,i,o){let{x:r,y:a,x2:s,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],o),m=this.options.borderWidth;if(i!=="x"&&i!=="y")return QI({x:e,y:t},this.getCenterPoint(o),c/2,m);let p=m/2,g=i==="y"?{start:a,end:l,value:t}:{start:r,end:s,value:e};return g.value>=g.start-p&&g.value<=g.end+p}getCenterPoint(e){return co(this,e)}draw(e){let t=this.options,i=t.borderWidth;if(t.radius<.1)return;e.save(),e.fillStyle=t.backgroundColor,uo(e,t);let o=Wn(e,t);oP(e,this,this.centerX,this.centerY),o&&!ls(t.pointStyle)&&(e.shadowColor=t.borderShadowColor,e.stroke()),e.restore(),t.borderWidth=i}resolveElementProperties(e,t){let i=op(e,t);return i.initProperties=ir(e,i,t,!0),i}};so.id="pointAnnotation";so.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};so.defaultRoutes={borderColor:"color",backgroundColor:"color"};var lo=class extends Kt{inRange(e,t,i,o){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&JP(this.elements,e,t,o);let r=Ci({x:e,y:t},this.getCenterPoint(o),Yt(-this.options.rotation)),a=this.elements.map(c=>i==="y"?c.bY:c.bX),s=Math.min(...a),l=Math.max(...a);return r[i]>=s&&r[i]<=l}getCenterPoint(e){return co(this,e)}draw(e){let{elements:t,options:i}=this;e.save(),e.beginPath(),e.fillStyle=i.backgroundColor,uo(e,i);let o=Wn(e,i),r=!0;for(let a of t)r?(e.moveTo(a.x,a.y),r=!1):e.lineTo(a.x,a.y);e.closePath(),e.fill(),o&&(e.shadowColor=i.borderShadowColor,e.stroke()),e.restore()}resolveElementProperties(e,t){let i=op(e,t),{sides:o,rotation:r}=t,a=[],s=2*mt/o,l=r*So;for(let c=0;c<o;c++,l+=s){let m=ZP(i,t,l);m.initProperties=ir(e,i,t),a.push(m)}return i.elements=a,i}};lo.id="polygonAnnotation";lo.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};lo.defaultRoutes={borderColor:"color",backgroundColor:"color"};function ZP({centerX:n,centerY:e},{radius:t,borderWidth:i},o){let r=i/2,a=Math.sin(o),s=Math.cos(o),l={x:n+a*t,y:e-s*t};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+a*(t+r),bY:e-s*(t+r)}}}function JP(n,e,t,i){let o=!1,r=n[n.length-1].getProps(["bX","bY"],i);for(let a of n){let s=a.getProps(["bX","bY"],i);s.bY>t!=r.bY>t&&e<(r.bX-s.bX)*(t-s.bY)/(r.bY-s.bY)+s.bX&&(o=!o),r=s}return o}var Ln={box:Hn,ellipse:_i,label:gi,line:cs,point:so,polygon:lo};Object.keys(Ln).forEach(n=>{dt.describe(`elements.${Ln[n].id}`,{_fallback:"plugins.annotation.common"})});var tM={update:Object.assign},eM=cc.concat(as),jh=(n,e)=>st(e)?nc(n,e):n,ec=n=>n==="color"||n==="font";function uc(n="line"){return Ln[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function nM(n,e,t,i){let o=oM(n,t.animations,i),r=e.annotations,a=sM(e.elements,r);for(let s=0;s<r.length;s++){let l=r[s],c=dp(a,s,l.type),m=l.setContext(aM(n,c,l)),p=c.resolveElementProperties(n,m);p.skip=iM(p),"elements"in p&&(rM(c,p.elements,m,o),delete p.elements),Gt(c.x)||Object.assign(c,p),Object.assign(c,p.initProperties),p.options=up(m),o.update(c,p)}}function iM(n){return isNaN(n.x)||isNaN(n.y)}function oM(n,e,t){return t==="reset"||t==="none"||t==="resize"?tM:new Fi(n,e)}function rM(n,e,t,i){let o=n.elements||(n.elements=[]);o.length=e.length;for(let r=0;r<e.length;r++){let a=e[r],s=a.properties,l=dp(o,r,a.type,a.initProperties),c=t[a.optionScope].override(a);s.options=up(c),i.update(l,s)}}function dp(n,e,t,i){let o=Ln[uc(t)],r=n[e];return(!r||!(r instanceof o))&&(r=n[e]=new o,Object.assign(r,i)),r}function up(n){let e=Ln[uc(n.type)],t={};t.id=n.id,t.type=n.type,t.drawTime=n.drawTime,Object.assign(t,nc(n,e.defaults),nc(n,e.defaultRoutes));for(let i of eM)t[i]=n[i];return t}function nc(n,e){let t={};for(let i of Object.keys(e)){let o=e[i],r=n[i];ec(i)&&pt(r)?t[i]=r.map(a=>jh(a,o)):t[i]=jh(r,o)}return t}function aM(n,e,t){return e.$context||(e.$context=Object.assign(Object.create(n.getContext()),{element:e,id:t.id,type:"annotation"}))}function sM(n,e){let t=e.length,i=n.length;if(i<t){let o=t-i;n.splice(i,0,...new Array(o))}else i>t&&n.splice(t,i-t);return n}var lM="2.2.1",Vn=new Map,cM=cc.concat(as),ds={id:"annotation",version:lM,beforeRegister(){$I("chart.js","3.7",Xt.version)},afterRegister(){Xt.register(Ln)},afterUnregister(){Xt.unregister(Ln)},beforeInit(n){Vn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,e,t){let i=Vn.get(n),o=i.annotations=[],r=t.annotations;st(r)?Object.keys(r).forEach(a=>{let s=r[a];st(s)&&(s.id=a,o.push(s))}):pt(r)&&o.push(...r),vP(o,n.scales)},afterDataLimits(n,e){let t=Vn.get(n);yP(n,e.scale,t.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,e,t){let i=Vn.get(n);_P(n,i,t),nM(n,i,t,e.mode),i.visibleElements=i.elements.filter(o=>!o.skip&&o.options.display),bP(n,i,t)},beforeDatasetsDraw(n,e,t){os(n,"beforeDatasetsDraw",t.clip)},afterDatasetsDraw(n,e,t){os(n,"afterDatasetsDraw",t.clip)},beforeDraw(n,e,t){os(n,"beforeDraw",t.clip)},afterDraw(n,e,t){os(n,"afterDraw",t.clip)},beforeEvent(n,e,t){let i=Vn.get(n);CP(i,e.event,t)&&(e.changed=!0)},afterDestroy(n){Vn.delete(n)},_getState(n){return Vn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!cM.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,e)=>`elements.${Ln[uc(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:ec,_fallback:!0},_indexable:ec}},additionalOptionScopes:[""]};function os(n,e,t){let{ctx:i,chartArea:o}=n,r=Vn.get(n);t&&Ke(i,o);let a=dM(r.visibleElements,e).sort((s,l)=>s.element.options.z-l.element.options.z);for(let s of a)uM(i,o,r,s);t&&Xe(i)}function dM(n,e){let t=[];for(let i of n)if(i.options.drawTime===e&&t.push({element:i,main:!0}),i.elements&&i.elements.length)for(let o of i.elements)o.options.display&&o.options.drawTime===e&&t.push({element:o});return t}function uM(n,e,t,i){let o=i.element;i.main?(Eh(t,o,"beforeDraw"),o.draw(n,e),Eh(t,o,"afterDraw")):o.draw(n,e)}var ho={UKNOWN:"Unknown"},_c={CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",OPERA:"Opera",IE:"IE",MS_EDGE:"MS-Edge",MS_EDGE_CHROMIUM:"MS-Edge-Chromium",FB_MESSANGER:"FB-Messanger",SAMSUNG:"Samsung",UCBROWSER:"UC-Browser",UNKNOWN:ho.UKNOWN},us={HTC:/HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,NEXUS_PHONE:/Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,DELL:/Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/,MOTOROLA:new RegExp(`Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|
A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|
MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|
ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|
WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|
XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|
XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052`),SAMSUNG:new RegExp(`\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|
GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|
GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|
GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|
GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|
GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|
GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|
GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|
GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|
GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|
GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|
GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|
GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|
GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|
GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|
GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|
GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|
GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|
SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|
SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|
SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|
SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|
SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|
SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|
SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|
SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|
SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|
SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|
SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|
SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|
SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|
SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|
SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|
SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|
SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|
SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|
SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|
SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|
SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|
SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|
SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|
SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|
SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|
SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|
SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|
SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|
SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|
SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|
SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|
GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|
GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|
GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|
SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|
SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|
SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F`),LG:new RegExp(`\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|
LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|
C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|
LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|
VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|
MS323|M257)`),SONY:/SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,ASUS:/Asus.*Galaxy|PadFone.*Mobile/,NOKIA_LUMIA:/Lumia [0-9]{3,4}/,MICROMAX:/Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b/,PALM:/PalmSource|Palm/,VERTU:/Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,PANTECH:new RegExp(`PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|
IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|
IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|
CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|
P2000|P7040|P7000|C790`),FLY:/IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,WIKO:new RegExp(`KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|
SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|
CINK KING|CINK PEAX|CINK SLIM|SUBLIM`),I_MOBILE:/i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,SIMVALLEY:/\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b/,WOLFGANG:/AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,ALCATEL:/Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,NINTENDO:/Nintendo (3DS|Switch)/,AMOI:/Amoi/,INQ:/INQ/,VITA:/\bVita\b/,BLACKBERRY:/\bBlackBerry\b|\bBB10\b|rim[0-9]+/,FIREFOX_OS:/\bFirefox-OS\b/,IPHONE:/\biPhone\b/,iPod:/\biPod\b/,ANDROID:/\bAndroid\b/,WINDOWS_PHONE:/\bWindows-Phone\b/,GENERIC_PHONE:new RegExp(`Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|
up.link|vodafone|\\bwap\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser`)},mo={iPad:/iPad|iPad.*Mobile/,NexusTablet:/Android.*Nexus[\s]+(7|9|10)/,GoogleTablet:/Android.*Pixel C/,SamsungTablet:new RegExp(`SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|
GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|
SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|
GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|
SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|
GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|
SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|
SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|
GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|
SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|
GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|
SM-T510|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|
SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|
SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|
SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|
SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|
SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|
SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|
SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200|SM-T970`),Kindle:new RegExp(`Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|
KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome /[0-9.]+ (?!Mobile)`),SurfaceTablet:/Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,HPTablet:/HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,AsusTablet:new RegExp(`^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|
TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|
Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|
ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|
ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b`),BlackBerryTablet:/PlayBook|RIM Tablet/,HTCtablet:/HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,MotorolaTablet:/xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,NookTablet:/Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,AcerTablet:new RegExp(`Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|
W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|
\\bA3-A20\\b|\\bA3-A30`),ToshibaTablet:/Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,LGTablet:/\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b/,FujitsuTablet:/Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b/,PrestigioTablet:new RegExp(`PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|
PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|
PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|
PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|
PMT5887|PMT5001|PMT5002`),LenovoTablet:new RegExp(`Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|
YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|
B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F`),DellTablet:/Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,YarvikTablet:new RegExp(`Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|
TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|
TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|
TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|
TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b`),MedionTablet:/Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,ArnovaTablet:/97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,IntensoTablet:/INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,IRUTablet:/M702pro/,MegafonTablet:/MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b/,EbodaTablet:/E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,AllViewTablet:/Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,ArchosTablet:new RegExp(`\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|
Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b`),AinolTablet:/NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,NokiaLumiaTablet:/Lumia 2520/,SonyTablet:new RegExp(`Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|
SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|
EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|
SGP612|SGP712`),PhilipsTablet:/\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b/,CubeTablet:/Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,CobyTablet:new RegExp(`MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|
MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010`),MIDTablet:new RegExp(`M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|
MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|
MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10`),MSITablet:new RegExp(`MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|
Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b`),SMiTTablet:/Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,RockChipTablet:/Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,FlyTablet:/IQ310|Fly Vision/,bqTablet:new RegExp(`Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|
Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus`),HuaweiTablet:new RegExp(`MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|
S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09|AGS-L09`),NecTablet:/\bN-06D|\bN-08D/,PantechTablet:/Pantech.*P4100/,BronchoTablet:/Broncho.*(N701|N708|N802|a710)/,VersusTablet:/TOUCHPAD.*[78910]|\bTOUCHTAB\b/,ZyncTablet:/z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,PositivoTablet:/TB07STA|TB10STA|TB07FTA|TB10FTA/,NabiTablet:/Android.*\bNabi/,KoboTablet:/Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build/,DanewTablet:/DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b/,TexetTablet:new RegExp(`NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|
TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|
TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|
TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|
TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|
TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|
TB-436|TB-416|TB-146SE|TB-126SE`),PlaystationTablet:/Playstation.*(Portable|Vita)/,TrekstorTablet:/ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,PyleAudioTablet:/\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b/,AdvanTablet:new RegExp(`Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|
T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b`),DanyTechTablet:`Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|
Genius TAB GII|Genius TAB GIII|Genius Tab S1`,GalapadTablet:/Android.*\bG1\b(?!\))/,MicromaxTablet:/Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b/,KarbonnTablet:/Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b/,AllFineTablet:/Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,PROSCANTablet:new RegExp(`\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|
PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|
PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|
PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b`),YONESTablet:/BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,ChangJiaTablet:new RegExp(`TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|
TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|
TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|
TPC10111|TPC10203|TPC10205|TPC10503`),GUTablet:/TX-A1301|TX-M9002|Q702|kf026/,PointOfViewTablet:new RegExp(`TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|
TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|
TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|
TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10`),OvermaxTablet:new RegExp(`OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|
MagicTab|Stream|TB-08|TB-09)|Qualcore 1027`),HCLTablet:/HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,DPSTablet:/DPS Dream 9|DPS Dual 7/,VistureTablet:/V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,CrestaTablet:/CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,MediatekTablet:/\bMT8125|MT8389|MT8135|MT8377\b/,ConcordeTablet:/Concorde([ ]+)?Tab|ConCorde ReadMan/,GoCleverTablet:new RegExp(`GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|
TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|
GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|
TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|
TAB R104|TAB R83.3|TAB A1042`),ModecomTablet:new RegExp(`FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|
FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|
FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003`),VoninoTablet:new RegExp(`\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|
Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|
Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b`),ECSTablet:/V07OT2|TM105A|S10OT1|TR10CS1/,StorexTablet:/eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,VodafoneTablet:/SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,EssentielBTablet:/Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,RossMoorTablet:/RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,iMobileTablet:/i-mobile i-note/,TolinoTablet:/tolino tab [0-9.]+|tolino shine/,AudioSonicTablet:/\bC-22Q|T7-QC|T-17B|T-17P\b/,AMPETablet:/Android.* A78 /,SkkTablet:/Android.* (SKYPAD|PHOENIX|CYCLOPS)/,TecnoTablet:/TECNO P9|TECNO DP8D/,JXDTablet:new RegExp(`Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|
S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|
P1000|P300|S18|S6600|S9100)\\b`),iJoyTablet:new RegExp(`Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|
Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|
Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|
Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|
Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)`),FX2Tablet:/FX2 PAD7|FX2 PAD10/,XoroTablet:new RegExp(`KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|
PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|
PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|
TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151`),ViewsonicTablet:/ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,VerizonTablet:/QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,OdysTablet:/LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,CaptivaTablet:/CAPTIVA PAD/,IconbitTablet:new RegExp(`NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|
NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S`),TeclastTablet:new RegExp(`T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|
\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|
\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|
\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|
\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|
\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|
\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|
\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|
\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi`),OndaTablet:new RegExp(`\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|
V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|
V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|
Vi40)\\b[s]+|V10 \\b4G\\b`),JaytechTablet:/TPC-PA762/,BlaupunktTablet:/Endeavour 800NG|Endeavour 1010/,DigmaTablet:/\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b/,EvolioTablet:/ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b/,LavaTablet:/QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b/,AocTablet:/MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,MpmanTablet:new RegExp(`MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|
\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|
MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010`),CelkonTablet:/CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b/,WolderTablet:new RegExp(`miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|
POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|
FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b`),MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:/\bMI PAD\b|\bHM NOTE 1W\b/,NibiruTablet:/Nibiru M1|Nibiru Jupiter One/,NexoTablet:/NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,LeaderTablet:new RegExp(`TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|
TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100`),UbislateTablet:/UbiSlate[\s]?7C/,PocketBookTablet:/Pocketbook/,KocasoTablet:/\b(TB-1207)\b/,HisenseTablet:/\b(F5281|E2371)\b/,Hudl:/Hudl HT7S3|Hudl 2/,TelstraTablet:/T-Hub2/,Honeywell:/RT10A/,GenericTablet:new RegExp(`Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|
A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|
Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107`)},Gn={BLACKBERRY:"Blackberry",FIREFOX_OS:"Firefox-OS",CHROME_BOOK:"Chrome-Book",WINDOWS_PHONE:"Windows-Phone",VITA:"Vita",PS4:"PS4",MAC:"Macintosh",CHROMECAST:"Chromecast",APPLE_TV:"Apple-TV",GOOGLE_TV:"Google-TV",ANDROID:"Android",Tesla:"Tesla",iPad:"iPad",IPHONE:"iPhone",iPod:"iPod",UNKNOWN:ho.UKNOWN,HTC:"HTC",NEXUS_PHONE:"Nexus Phone",NexusTablet:"Nexus Tablet",DELL:"Dell",MOTOROLA:"Motorola",SAMSUNG:"Samsung",LG:"LG",SONY:"Sony",ASUS:"Asus",NOKIA_LUMIA:"Nokia Lumia",MICROMAX:"Micromax",PALM:"Palm",VERTU:"Vertu",PANTECH:"PANTECH",FLY:"Fly",WIKO:"WIKO",I_MOBILE:"i-mobile",SIMVALLEY:"Simvalley",WOLFGANG:"Wolfgang",ALCATEL:"Alcatel",HONEYWELL:"Honeywell",NINTENDO:"Nintendo",AMOI:"Amoi",INQ:"INQ",GENERIC_PHONE:"Generic Phone",MI_SE_9:"Mi SE 9"},mp=[Gn.PS4,Gn.CHROME_BOOK,Gn.MAC,Gn.DELL,Gn.ASUS,Gn.UNKNOWN],mM={WINDOWS:"Windows",MAC:"Mac",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNIX:"Unix",FIREFOX_OS:"Firefox-OS",CHROME_OS:"Chrome-OS",WINDOWS_PHONE:"Windows-Phone",UNKNOWN:ho.UKNOWN},hM={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_11_0:"mac-os-x-11-0",MACOSX_16:"mac-os-x-16",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",iOS:"iOS",ANDROID_9:"android-9",UNKNOWN:ho.UKNOWN.toLowerCase()},hp={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/\bWindows Phone\b/}]},ANDROID:{and:[/\bAndroid\b/,{not:/\bWindows Phone\b/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},pM={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/,/\bHeadlessChrome\b/]},{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},FIREFOX:{or:[/\bFirefox\b/,/\bFxiOS\b/]},SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bWindows Phone\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdg(e|A|iOS)\b/]},MS_EDGE_CHROMIUM:/\bEdg\/\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/,SAMSUNG:/\bSamsungBrowser\b/,UCBROWSER:/\bUCBrowser\b/},fM=ze(Pe(Pe(Pe({},us),mo),hp),{FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,Tesla:/Tesla\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,MI_SE_9:/\bXiaomi\b/,MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]}}),hc={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/,MACOSX_16:/(Mac OS X 10.16)/,MACOSX_11_0:{or:[/11_0 like Mac OS X/,/Mac OS X 11/]},iOS:/(iPhone OS\s*[0-9_]+)/,ANDROID_9:/(Android 9)/},pc={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/,/\bHeadlessChrome\/([\d\.]+)\b/],FIREFOX:[/\bFirefox\/([\d\.]+)\b/,/\bFxiOS\/([\d\.]+)\b/],SAFARI:[/\bVersion\/([\d\.]+)\b/,/\bSafari\/([\d\.]+)\b/],OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdg(?:e|A|iOS)\/([\d\.]+)\b/,MS_EDGE_CHROMIUM:/\bEdg\/([\d\.]+)\b/,SAMSUNG:/\bSamsungBrowser\/([\d\.]+)\b/,UCBROWSER:/\bUCBrowser\/([\d\.]+)\b/},gM=Object.keys(hc).reduce((n,e)=>(n[e]=hc[e],n),{}),pp=Object.keys(pc).reduce((n,e)=>(n[_c[e]]=pc[e],n),{}),an=Object.freeze({__proto__:null,BROWSERS:_c,BROWSERS_RE:pM,BROWSER_VERSIONS_RE:pp,BROWSER_VERSIONS_RE_MAP:pc,DESKTOP_DEVICES:mp,DEVICES:Gn,DEVICES_RE:fM,GENERAL:ho,MOBILES_RE:us,OS:mM,OS_RE:hp,OS_VERSIONS:hM,OS_VERSIONS_RE:gM,OS_VERSIONS_RE_MAP:hc,TABLETS_RE:mo}),fc=class{constructor(){}test(e,t){return typeof t=="string"&&(t=new RegExp(t)),t instanceof RegExp?t.test(e):t&&Array.isArray(t.and)?t.and.every(i=>this.test(e,i)):t&&Array.isArray(t.or)?t.or.some(i=>this.test(e,i)):t&&t.not?!this.test(e,t.not):!1}exec(e,t){return typeof t=="string"&&(t=new RegExp(t)),t instanceof RegExp?t.exec(e):t&&Array.isArray(t)?t.reduce((i,o)=>i||this.exec(e,o),null):null}},or=function(n){return n.Mobile="mobile",n.Tablet="tablet",n.Desktop="desktop",n.Unknown="unknown",n}(or||{}),gc=function(n){return n.Portrait="portrait",n.Landscape="landscape",n}(gc||{}),mc="iPad",fp=(()=>{let e=class e{constructor(i){this.platformId=i,this.ua="",this.userAgent="",this.os="",this.browser="",this.device="",this.os_version="",this.browser_version="",this.reTree=new fc,this.deviceType="",this.orientation="",lr(this.platformId)&&typeof window<"u"&&(this.userAgent=window.navigator.userAgent),this.setDeviceInfo(this.userAgent)}setDeviceInfo(i=this.userAgent){i!==this.userAgent&&(this.userAgent=i);let o=[{const:"OS",prop:"os"},{const:"BROWSERS",prop:"browser"},{const:"DEVICES",prop:"device"},{const:"OS_VERSIONS",prop:"os_version"}];if(o.forEach(r=>{this[r.prop]=Object.keys(an[r.const]).reduce((a,s)=>an[r.const][s]==="device"&&lr(this.platformId)&&(this.reTree.test(this.userAgent,mo[mc])||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)?(a[an[r.const][s]]=mc,Object):(a[an[r.const][s]]=this.reTree.test(i,an[`${r.const}_RE`][s]),a),{})}),o.forEach(r=>{this[r.prop]=Object.keys(an[r.const]).map(a=>an[r.const][a]).reduce((a,s)=>r.prop==="device"&&a===an[r.const].ANDROID?this[r.prop][s]?s:a:a===an[r.const].UNKNOWN&&this[r.prop][s]?s:a,an[r.const].UNKNOWN)}),this.browser_version="0",this.browser!==_c.UNKNOWN){let r=pp[this.browser],a=this.reTree.exec(i,r);a&&(this.browser_version=a[1])}typeof window<"u"&&window.matchMedia?this.orientation=window.matchMedia("(orientation: landscape)").matches?gc.Landscape:gc.Portrait:this.orientation=ho.UKNOWN,this.deviceType=this.isTablet()?or.Tablet:this.isMobile(this.userAgent)?or.Mobile:this.isDesktop(this.userAgent)?or.Desktop:or.Unknown}getDeviceInfo(){return{userAgent:this.userAgent,os:this.os,browser:this.browser,device:this.device,os_version:this.os_version,browser_version:this.browser_version,deviceType:this.deviceType,orientation:this.orientation}}isMobile(i=this.userAgent){return this.isTablet(i)?!1:!!Object.keys(us).find(r=>this.reTree.test(i,us[r]))}isTablet(i=this.userAgent){return lr(this.platformId)&&(this.reTree.test(this.userAgent,mo[mc])||typeof navigator<"u"&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)?!0:!!Object.keys(mo).find(r=>!!this.reTree.test(i,mo[r]))}isDesktop(i=this.userAgent){return this.device===Gn.UNKNOWN&&(this.isMobile(i)||this.isTablet(i))?!1:mp.indexOf(this.device)>-1}};e.\u0275fac=function(o){return new(o||e)(rr(Mc))},e.\u0275prov=po({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function CM(n,e){if(n&1&&(d(0,"option",17),h(1),u()),n&2){let t=e.$implicit;$t("value",t),f(),T(t)}}function xM(n,e){if(n&1&&(d(0,"option",18),h(1),u()),n&2){let t=e.$implicit,i=x();S("value",t.stockno)("selected",i.stockNo===t.stockno),f(),At("",t.stockno,"",t.stockname,"")}}function SM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",19)(2,"canvas",20),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",19)(4,"canvas",21),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",19)(6,"canvas",21),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",19)(8,"canvas",21),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",19)(10,"canvas",21),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}function bM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",19)(2,"canvas",22),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",19)(4,"canvas",23),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",19)(6,"canvas",23),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",19)(8,"canvas",23),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",19)(10,"canvas",23),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}function yM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",19)(2,"canvas",24),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",19)(4,"canvas",25),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",19)(6,"canvas",25),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",19)(8,"canvas",25),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",19)(10,"canvas",25),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}function vM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",26)(2,"canvas",27),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",26)(4,"canvas",28),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",26)(6,"canvas",28),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",26)(8,"canvas",28),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",26)(10,"canvas",28),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}function IM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",29)(2,"canvas",30),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",19)(4,"canvas",31),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",19)(6,"canvas",31),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",19)(8,"canvas",31),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",19)(10,"canvas",31),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}function PM(n,e){if(n&1){let t=O();d(0,"div")(1,"div",26)(2,"canvas",32),P("chartHover",function(o){b(t);let r=x();return y(r.financialChartHovered(o))}),u()(),d(3,"div",26)(4,"canvas",33),P("chartHover",function(o){b(t);let r=x();return y(r.RSIchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.RSIchartClicked(o))}),u()(),d(5,"div",26)(6,"canvas",33),P("chartHover",function(o){b(t);let r=x();return y(r.KDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.KDchartClicked(o))}),u()(),d(7,"div",26)(8,"canvas",33),P("chartHover",function(o){b(t);let r=x();return y(r.BiaschartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.BiaschartClicked(o))}),u()(),d(9,"div",26)(10,"canvas",33),P("chartHover",function(o){b(t);let r=x();return y(r.MACDchartHovered(o))})("chartClick",function(o){b(t);let r=x();return y(r.MACDchartClicked(o))}),u()()()}if(n&2){let t=x();f(2),S("data",t.financialChartData)("options",t.financialChartOptions)("type",t.financialChartType),f(2),S("data",t.RSIlineChartData)("options",t.RSIlineChartOptions)("type",t.RSIlineChartType),f(2),S("data",t.KDlineChartData)("options",t.KDlineChartOptions)("type",t.KDlineChartType),f(2),S("data",t.BiaslineChartData)("options",t.BiaslineChartOptions)("type",t.BiaslineChartType),f(2),S("data",t.MACDlineChartData)("options",t.MACDlineChartOptions)("type",t.MACDlineChartType)}}Xt.register(Xi,Ki,hi,mi);Xt.register(ds,ds);vl.positioners.myCustomPositioner=function(n,e){let t=this.chart;return{x:e.x>250?t.chartArea.left:t.chartArea.right,y:e.y<250?t.chartArea.bottom:t.chartArea.top+170,xAlign:"center",yAlign:"bottom"}};var gp=(()=>{let e=class e{constructor(i,o,r,a,s,l,c,m){this.auth=i,this.toastr=o,this.global=r,this.route=a,this.router=s,this.deviceService=l,this.cookieService=c,this.media=m,this.goQry=0,this.dataSource="A",this.qryStockFinish=1,this.counter=0,this.posX=0,this.intervalLast="",this.deviceInfo=null,this.isMobile=null,this.isTablet=null,this.isDesktopDevice=null,this.heartImg=null,this.DisplayMode=0,this.funcBClick=0,this.lastUpdateTime="",this.StocknoChange=0,this.interval_change=0,this.stockname="",this.rptstockname="",this.stockNo="2330",this.stocklist=localStorage.getItem("stocklist")!=null?JSON.parse(this.NullToString(localStorage.getItem("stocklist"))):"",this.PriceList=[],this.candlestick_xohlc=[],this.ma1=[],this.ma2=[],this.ma3=[],this.ma4=[],this.ma5=[],this.ma6=[],this.ma7=[],this.ma8=[],this.lablepnow="",this.lablema1="",this.lablema2="",this.lablema3="",this.lablema4="",this.lablema5="",this.lablema6="",this.lablema7="",this.lablema8="",this.bias=[],this.biasav1=[],this.biasav2=[],this.lablebias="",this.lablebiasav1="",this.lablebiasav2="",this.KChart=[],this.DChart=[],this.lableK="",this.lableD="",this.RSI1Chart=[],this.RSI2Chart=[],this.lableRSI1="",this.lableRSI2="",this.DIFFChart=[],this.MACDChart=[],this.DIFFMACDChart=[],this.lableDIFF="",this.lableMACD="",this.lableDIFFMACD="",this.LableList=[],this.LableList0=[],this.tHeight=50,this.interval="90m",this.intervals=["1m","5m","10m","15m","20m","30m","60m","90m","1dS","1wkS","1moS"],this.barCount=60,this.initialDateStr="2017-04-01T00:00:00",this.financialChartData={datasets:[{label:"K Bars",data:[],type:"candlestick",borderWidth:.1},{data:[],label:this.lablema1,backgroundColor:"rgba(255, 59, 37, 0.6)",borderColor:"rgba(255, 59, 37, 0.6)",pointBackgroundColor:"rgba(255, 59, 37, 0)",pointBorderColor:"rgba(255, 59, 37, 0)",pointHoverBackgroundColor:"rgba(255, 59, 37, 0)",pointHoverBorderColor:"rgba(255, 59, 37, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema2,backgroundColor:"rgba(255, 130, 37, 0.6)",borderColor:"rgba(255, 130, 37, 0.6)",pointBackgroundColor:"rgba(255, 130, 37, 0)",pointBorderColor:"rgba(255, 130, 37, 0)",pointHoverBackgroundColor:"rgba(255, 130, 37, 0)",pointHoverBorderColor:"rgba(255, 130, 37, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema3,backgroundColor:"rgba(213, 179, 0, 0.6)",borderColor:"rgba(213, 179, 0, 0.6)",pointBackgroundColor:"rgba(213, 179, 0, 0)",pointBorderColor:"rgba(213, 179, 0, 0)",pointHoverBackgroundColor:"rgba(213, 179, 0, 0)",pointHoverBorderColor:"rgba(213, 179, 0, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema4,backgroundColor:"rgba(124, 201, 37, 0.6)",borderColor:"rgba(124, 201, 37, 0.6)",pointBackgroundColor:"rgba(124, 201, 37, 0)",pointBorderColor:"rgba(124, 201, 37, 0)",pointHoverBackgroundColor:"rgba(124, 201, 37, 0)",pointHoverBorderColor:"rgba(124, 201, 37, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema5,backgroundColor:"rgba(36, 137, 175, 0.6)",borderColor:"rgba(36, 137, 175, 0.6)",pointBackgroundColor:"rgba(36, 137, 175, 0)",pointBorderColor:"rgba(36, 137, 175, 0)",pointHoverBackgroundColor:"rgba(36, 137, 175, 0)",pointHoverBorderColor:"rgba(36, 137, 175, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema6,backgroundColor:"rgba(17, 44, 144, 0.6)",borderColor:"rgba(17, 44, 144, 0.6)",pointBackgroundColor:"rgba(17, 44, 144, 0)",pointBorderColor:"rgba(17, 44, 144, 0)",pointHoverBackgroundColor:"rgba(17, 44, 144, 0)",pointHoverBorderColor:"rgba(17, 44, 144, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema7,backgroundColor:"rgba(84, 9, 151, 0.6)",borderColor:"rgba(84, 9, 151, 0.6)",pointBackgroundColor:"rgba(84, 9, 151, 0)",pointBorderColor:"rgba(84, 9, 151, 0)",pointHoverBackgroundColor:"rgba(84, 9, 151, 0)",pointHoverBorderColor:"rgba(84, 9, 151, 0)",borderWidth:1,type:"line"},{data:[],label:this.lablema8,backgroundColor:"rgba(131, 13, 13, 0.6)",borderColor:"rgba(131, 13, 13, 0.6)",pointBackgroundColor:"rgba(131, 13, 13, 0)",pointBorderColor:"rgba(131, 13, 13, 0)",pointHoverBackgroundColor:"rgba(131, 13, 13, 0)",pointHoverBorderColor:"rgba(131, 13, 13, 0)",borderWidth:1,type:"line"}],labels:this.LableList},this.financialChartOptions={responsive:!0,animation:!1,maintainAspectRatio:!1,scales:{x:{time:{unit:"day"}},y:{position:"right",afterFit:function(p){p.width=35}}},plugins:{legend:{display:!0},tooltip:{mode:"index",axis:"y",intersect:!0,position:"myCustomPositioner"}}},this.RSInewLabel="RSI",this.RSIlineChartData={datasets:[{data:[],label:"K",backgroundColor:"rgba(255, 140, 0, 0.6)",borderColor:"rgba(255, 140, 0, 0.6)",pointBackgroundColor:"rgba(255, 140, 0, 0)",pointBorderColor:"rgba(255, 140, 0, 0)",pointHoverBackgroundColor:"rgba(255, 140, 0, 0)",pointHoverBorderColor:"rgba(255, 140, 0, 0)",borderWidth:1},{data:[],label:"D",backgroundColor:"rgba(0, 0, 255, 0.6)",borderColor:"rgba(0, 0, 255, 0.6)",pointBackgroundColor:"rgba(0, 0, 255, 0)",pointBorderColor:"rgba(0, 0, 255, 0)",pointHoverBackgroundColor:"rgba(0, 0, 255, 0)",pointHoverBorderColor:"rgba(0, 0, 255, 0)",borderWidth:1}],labels:this.LableList},this.RSIlineChartOptions={elements:{line:{tension:.01}},scales:{x:{display:!1},y:{position:"right",afterFit:function(p){p.width=35}}},plugins:{tooltip:{mode:"index",axis:"y",intersect:!0,enabled:!1},legend:{display:!1},annotation:{annotations:[{type:"line",scaleID:"x",value:"March",borderWidth:2,label:{display:!1,position:"center",color:"orange",content:"LineAnno",font:{weight:"bold"}}}]}}},this.KDnewLabel="KD",this.KDlineChartData={datasets:[{data:[],label:"K",backgroundColor:"rgba(255, 140, 0, 0.6)",borderColor:"rgba(255, 140, 0, 0.6)",pointBackgroundColor:"rgba(255, 140, 0, 0)",pointBorderColor:"rgba(255, 140, 0, 0)",pointHoverBackgroundColor:"rgba(255, 140, 0, 0)",pointHoverBorderColor:"rgba(255, 140, 0, 0)",borderWidth:1},{data:[],label:"D",backgroundColor:"rgba(0, 0, 255, 0.6)",borderColor:"rgba(0, 0, 255, 0.6)",pointBackgroundColor:"rgba(0, 0, 255, 0)",pointBorderColor:"rgba(0, 0, 255, 0)",pointHoverBackgroundColor:"rgba(0, 0, 255, 0)",pointHoverBorderColor:"rgba(0, 0, 255, 0)",borderWidth:1}],labels:this.LableList},this.KDlineChartOptions={elements:{line:{tension:.01}},scales:{x:{display:!1},y:{position:"right",afterFit:function(p){p.width=35}}},plugins:{tooltip:{mode:"index",axis:"y",intersect:!0,enabled:!1},legend:{display:!1},annotation:{annotations:[{type:"line",scaleID:"x",value:"March",borderWidth:2,label:{display:!1,position:"center",color:"orange",content:"LineAnno",font:{weight:"bold"}}}]}}},this.BiasnewLabel="Bias",this.BiaslineChartData={datasets:[{data:[],label:"bias",backgroundColor:"rgba(255, 0, 0, 0.6)",borderColor:"rgba(255, 0, 0, 0.6)",pointBackgroundColor:"rgba(255, 0, 0, 0)",pointBorderColor:"rgba(255, 0, 0, 0)",pointHoverBackgroundColor:"rgba(255, 0, 0, 0)",pointHoverBorderColor:"rgba(255, 0, 0, 0)",borderWidth:1},{data:[],label:"biasav1",backgroundColor:"rgba(255, 140, 0, 0.6)",borderColor:"rgba(255, 140, 0, 0.6)",pointBackgroundColor:"rgba(255, 140, 0, 0)",pointBorderColor:"rgba(255, 140, 0, 0)",pointHoverBackgroundColor:"rgba(255, 140, 0, 0)",pointHoverBorderColor:"rgba(255, 140, 0, 0)",borderWidth:1},{data:[],label:"biasav2",backgroundColor:"rgba(0, 0, 255, 0.6)",borderColor:"rgba(0, 0, 255, 0.6)",pointBackgroundColor:"rgba(0, 0, 255, 0)",pointBorderColor:"rgba(0, 0, 255, 0)",pointHoverBackgroundColor:"rgba(0, 0, 255, 0)",pointHoverBorderColor:"rgba(0, 0, 255, 0)",borderWidth:1}],labels:this.LableList},this.BiaslineChartOptions={elements:{line:{tension:.01}},scales:{x:{display:!1},y:{position:"right",afterFit:function(p){p.width=35}}},plugins:{tooltip:{mode:"index",axis:"y",intersect:!0,enabled:!1},legend:{display:!1},annotation:{annotations:[{type:"line",scaleID:"x",value:"March",borderWidth:2,label:{display:!1,position:"center",color:"orange",content:"LineAnno",font:{weight:"bold"}}}]}}},this.KDlineChartType="line",this.BiaslineChartType="line",this.RSIlineChartType="line",this.MACDlineChartType="line",this.financialChartType="candlestick",this.MACDnewLabel="MACD",this.MACDlineChartData={datasets:[{data:[],label:"DIFF",backgroundColor:"rgba(255, 140, 0, 0.6)",borderColor:"rgba(255, 140, 0, 0.6)",pointBackgroundColor:"rgba(255, 140, 0, 0)",pointBorderColor:"rgba(255, 140, 0, 0)",pointHoverBackgroundColor:"rgba(255, 140, 0, 0)",pointHoverBorderColor:"rgba(255, 140, 0, 0)",borderWidth:1,type:"line"},{data:[],label:"MACD",backgroundColor:"rgba(0, 0, 255, 0.6)",borderColor:"rgba(0, 0, 255, 0.6)",pointBackgroundColor:"rgba(0, 0, 255, 0)",pointBorderColor:"rgba(0, 0, 255, 0)",pointHoverBackgroundColor:"rgba(0, 0, 255, 0)",pointHoverBorderColor:"rgba(0, 0, 255, 0)",borderWidth:1,type:"line"},{data:[],label:"DIFF-MACD",backgroundColor(p){let g=p.dataIndex;return p.dataset.data[g]>0?"red":"green"},borderColor:"rgba(0, 0, 255, 0.6)",type:"bar"}],labels:this.LableList},this.MACDlineChartOptions={elements:{line:{tension:.01}},scales:{x:{display:!1},y:{position:"right",afterFit:function(p){p.width=35}}},plugins:{tooltip:{mode:"index",axis:"y",intersect:!0,enabled:!0,position:"myCustomPositioner"},legend:{display:!1},annotation:{annotations:[{type:"line",scaleID:"x",value:"March",borderWidth:2,label:{display:!1,position:"center",color:"orange",content:"LineAnno",font:{weight:"bold"}}}]}}},this.epicFunction()}epicFunction(){this.deviceInfo=this.deviceService.getDeviceInfo(),this.isMobile=this.deviceService.isMobile(),this.isTablet=this.deviceService.isTablet(),this.isDesktopDevice=this.deviceService.isDesktop()}ngOnInit(){this.interval_change=0,this.global.print=1,this.getLocalStorageData(null);let i=document.querySelector(".vt"),o=document.querySelector(".hl");document.addEventListener("mousemove",r=>{this.posX=r.clientX,i?.setAttribute("style",`left: ${r.clientX}px;`),o?.setAttribute("style",`top: ${r.clientY}px;`)}),document.addEventListener("touchmove",r=>{this.posX=r.touches[0].clientX,i?.setAttribute("style",`left: ${r.touches[0].clientX}px;`),o?.setAttribute("style",`top: ${r.touches[0].clientY}px;`)}),this.getImgFiles()}NullToString(i){return i==null?"":i.toString()}initChart(){this.RSIlineChartData.datasets[0].data=[],this.RSIlineChartData.datasets[1].data=[],this.KDlineChartData.datasets[0].data=[],this.KDlineChartData.datasets[1].data=[],this.BiaslineChartData.datasets[0].data=[],this.BiaslineChartData.datasets[1].data=[],this.BiaslineChartData.datasets[2].data=[],this.MACDlineChartData.datasets[0].data=[],this.MACDlineChartData.datasets[1].data=[],this.MACDlineChartData.datasets[2].data=[],this.charts?.forEach(i=>{i.chart?.update()})}stocklistChangeIndex(i){for(var o=0,r=0;r<this.stocklist.length;r++)if(this.stocklist[r].stockno==this.stockNo){var a="",s="",l="",c="";if(i=="U"){if(r==0)return;a=this.stocklist[r-1].stockno,s=this.stocklist[r-1].stockname,l=this.stocklist[r].stockno,c=this.stocklist[r].stockname,this.stocklist[r-1].stockno=l,this.stocklist[r-1].stockname=c,this.stocklist[r].stockno=a,this.stocklist[r].stockname=s,o=1;break}else if(i=="D"){if(r==this.stocklist.length)return;a=this.stocklist[r+1].stockno,s=this.stocklist[r+1].stockname,l=this.stocklist[r].stockno,c=this.stocklist[r].stockname,this.stocklist[r+1].stockno=l,this.stocklist[r+1].stockname=c,this.stocklist[r].stockno=a,this.stocklist[r].stockname=s,o=1;break}}o==1&&localStorage.setItem("stocklist",JSON.stringify(this.stocklist))}changeDMode(){var i="";switch(this.isDesktopDevice==!0?i="desktop":this.isMobile==!0?i="mobile":this.isTablet==!0&&(i="tablet"),i){case"desktop":switch(this.DisplayMode){case 0:this.DisplayMode=2;break;case 2:this.DisplayMode=3;break;case 3:this.DisplayMode=0;break}break;case"mobile":switch(this.DisplayMode){case 0:this.DisplayMode=1;break;case 1:this.DisplayMode=0;break}break;case"tablet":switch(this.DisplayMode){case 0:this.DisplayMode=4;break;case 4:this.DisplayMode=5;break;case 5:this.DisplayMode=0;break}break}}deleteStockListItem(i){if(confirm("\u78BA\u5B9A\u8981\u522A\u9664"+i)){for(var o=JSON.parse(this.NullToString(localStorage.getItem("stocklist"))),r=0;r<o.length;r++)if(o[r].stockno==i){o.splice(r,1);break}this.stocklist=o,this.stockNo="",this.stockname="",localStorage.setItem("stocklist",JSON.stringify(o))}}changeSize(){this.tHeight==50?this.tHeight=100:this.tHeight=50,this.charts?.forEach(i=>{i.chart?.update()})}stocknoChange(){this.StocknoChange=1;for(var i=0;i<this.stocklist.length;i++)if(this.stocklist[i].stockno==this.stockNo){this.stockname=this.stocklist[i].stockname;break}else this.stockname=""}intervalChange(){this.funcBClick=1,this.interval_change=1,this.getLocalStorageData(null)}localstorageReset(){localStorage.setItem("1m_candlestick_x",""),localStorage.setItem("1m_candlestick_o",""),localStorage.setItem("1m_candlestick_h",""),localStorage.setItem("1m_candlestick_l",""),localStorage.setItem("1m_candlestick_c",""),localStorage.setItem("1m_ma1",""),localStorage.setItem("1m_ma2",""),localStorage.setItem("1m_ma3",""),localStorage.setItem("1m_ma4",""),localStorage.setItem("1m_ma5",""),localStorage.setItem("1m_ma6",""),localStorage.setItem("1m_ma7",""),localStorage.setItem("1m_ma8",""),localStorage.setItem("1m_RSI1Chart",""),localStorage.setItem("1m_RSI2Chart",""),localStorage.setItem("1m_KChart",""),localStorage.setItem("1m_DChart",""),localStorage.setItem("1m_bias",""),localStorage.setItem("1m_biasav1",""),localStorage.setItem("1m_biasav2",""),localStorage.setItem("1m_DIFF",""),localStorage.setItem("1m_MACD",""),localStorage.setItem("1m_DIFFMACD",""),localStorage.setItem("1m_LableList",""),localStorage.setItem("5m_candlestick_x",""),localStorage.setItem("5m_candlestick_o",""),localStorage.setItem("5m_candlestick_h",""),localStorage.setItem("5m_candlestick_l",""),localStorage.setItem("5m_candlestick_c",""),localStorage.setItem("5m_ma1",""),localStorage.setItem("5m_ma2",""),localStorage.setItem("5m_ma3",""),localStorage.setItem("5m_ma4",""),localStorage.setItem("5m_ma5",""),localStorage.setItem("5m_ma6",""),localStorage.setItem("5m_ma7",""),localStorage.setItem("5m_ma8",""),localStorage.setItem("5m_RSI1Chart",""),localStorage.setItem("5m_RSI2Chart",""),localStorage.setItem("5m_KChart",""),localStorage.setItem("5m_DChart",""),localStorage.setItem("5m_bias",""),localStorage.setItem("5m_biasav1",""),localStorage.setItem("5m_biasav2",""),localStorage.setItem("5m_DIFF",""),localStorage.setItem("5m_MACD",""),localStorage.setItem("5m_DIFFMACD",""),localStorage.setItem("5m_LableList",""),localStorage.setItem("10m_candlestick_x",""),localStorage.setItem("10m_candlestick_o",""),localStorage.setItem("10m_candlestick_h",""),localStorage.setItem("10m_candlestick_l",""),localStorage.setItem("10m_candlestick_c",""),localStorage.setItem("10m_ma1",""),localStorage.setItem("10m_ma2",""),localStorage.setItem("10m_ma3",""),localStorage.setItem("10m_ma4",""),localStorage.setItem("10m_ma5",""),localStorage.setItem("10m_ma6",""),localStorage.setItem("10m_ma7",""),localStorage.setItem("10m_ma8",""),localStorage.setItem("10m_RSI1Chart",""),localStorage.setItem("10m_RSI2Chart",""),localStorage.setItem("10m_KChart",""),localStorage.setItem("10m_DChart",""),localStorage.setItem("10m_bias",""),localStorage.setItem("10m_biasav1",""),localStorage.setItem("10m_biasav2",""),localStorage.setItem("10m_DIFF",""),localStorage.setItem("10m_MACD",""),localStorage.setItem("10m_DIFFMACD",""),localStorage.setItem("10m_LableList",""),localStorage.setItem("15m_candlestick_x",""),localStorage.setItem("15m_candlestick_o",""),localStorage.setItem("15m_candlestick_h",""),localStorage.setItem("15m_candlestick_l",""),localStorage.setItem("15m_candlestick_c",""),localStorage.setItem("15m_ma1",""),localStorage.setItem("15m_ma2",""),localStorage.setItem("15m_ma3",""),localStorage.setItem("15m_ma4",""),localStorage.setItem("15m_ma5",""),localStorage.setItem("15m_ma6",""),localStorage.setItem("15m_ma7",""),localStorage.setItem("15m_ma8",""),localStorage.setItem("15m_RSI1Chart",""),localStorage.setItem("15m_RSI2Chart",""),localStorage.setItem("15m_KChart",""),localStorage.setItem("15m_DChart",""),localStorage.setItem("15m_bias",""),localStorage.setItem("15m_biasav1",""),localStorage.setItem("15m_biasav2",""),localStorage.setItem("15m_DIFF",""),localStorage.setItem("15m_MACD",""),localStorage.setItem("15m_DIFFMACD",""),localStorage.setItem("15m_LableList",""),localStorage.setItem("20m_candlestick_x",""),localStorage.setItem("20m_candlestick_o",""),localStorage.setItem("20m_candlestick_h",""),localStorage.setItem("20m_candlestick_l",""),localStorage.setItem("20m_candlestick_c",""),localStorage.setItem("20m_ma1",""),localStorage.setItem("20m_ma2",""),localStorage.setItem("20m_ma3",""),localStorage.setItem("20m_ma4",""),localStorage.setItem("20m_ma5",""),localStorage.setItem("20m_ma6",""),localStorage.setItem("20m_ma7",""),localStorage.setItem("20m_ma8",""),localStorage.setItem("20m_RSI1Chart",""),localStorage.setItem("20m_RSI2Chart",""),localStorage.setItem("20m_KChart",""),localStorage.setItem("20m_DChart",""),localStorage.setItem("20m_bias",""),localStorage.setItem("20m_biasav1",""),localStorage.setItem("20m_biasav2",""),localStorage.setItem("20m_DIFF",""),localStorage.setItem("20m_MACD",""),localStorage.setItem("20m_DIFFMACD",""),localStorage.setItem("20m_LableList",""),localStorage.setItem("30m_candlestick_x",""),localStorage.setItem("30m_candlestick_o",""),localStorage.setItem("30m_candlestick_h",""),localStorage.setItem("30m_candlestick_l",""),localStorage.setItem("30m_candlestick_c",""),localStorage.setItem("30m_ma1",""),localStorage.setItem("30m_ma2",""),localStorage.setItem("30m_ma3",""),localStorage.setItem("30m_ma4",""),localStorage.setItem("30m_ma5",""),localStorage.setItem("30m_ma6",""),localStorage.setItem("30m_ma7",""),localStorage.setItem("30m_ma8",""),localStorage.setItem("30m_RSI1Chart",""),localStorage.setItem("30m_RSI2Chart",""),localStorage.setItem("30m_KChart",""),localStorage.setItem("30m_DChart",""),localStorage.setItem("30m_bias",""),localStorage.setItem("30m_biasav1",""),localStorage.setItem("30m_biasav2",""),localStorage.setItem("30m_DIFF",""),localStorage.setItem("30m_MACD",""),localStorage.setItem("30m_DIFFMACD",""),localStorage.setItem("30m_LableList",""),localStorage.setItem("60m_candlestick_x",""),localStorage.setItem("60m_candlestick_o",""),localStorage.setItem("60m_candlestick_h",""),localStorage.setItem("60m_candlestick_l",""),localStorage.setItem("60m_candlestick_c",""),localStorage.setItem("60m_ma1",""),localStorage.setItem("60m_ma2",""),localStorage.setItem("60m_ma3",""),localStorage.setItem("60m_ma4",""),localStorage.setItem("60m_ma5",""),localStorage.setItem("60m_ma6",""),localStorage.setItem("60m_ma7",""),localStorage.setItem("60m_ma8",""),localStorage.setItem("60m_RSI1Chart",""),localStorage.setItem("60m_RSI2Chart",""),localStorage.setItem("60m_KChart",""),localStorage.setItem("60m_DChart",""),localStorage.setItem("60m_bias",""),localStorage.setItem("60m_biasav1",""),localStorage.setItem("60m_biasav2",""),localStorage.setItem("60m_DIFF",""),localStorage.setItem("60m_MACD",""),localStorage.setItem("60m_DIFFMACD",""),localStorage.setItem("60m_LableList",""),localStorage.setItem("90m_candlestick_x",""),localStorage.setItem("90m_candlestick_o",""),localStorage.setItem("90m_candlestick_h",""),localStorage.setItem("90m_candlestick_l",""),localStorage.setItem("90m_candlestick_c",""),localStorage.setItem("90m_ma1",""),localStorage.setItem("90m_ma2",""),localStorage.setItem("90m_ma3",""),localStorage.setItem("90m_ma4",""),localStorage.setItem("90m_ma5",""),localStorage.setItem("90m_ma6",""),localStorage.setItem("90m_ma7",""),localStorage.setItem("90m_ma8",""),localStorage.setItem("90m_RSI1Chart",""),localStorage.setItem("90m_RSI2Chart",""),localStorage.setItem("90m_KChart",""),localStorage.setItem("90m_DChart",""),localStorage.setItem("90m_bias",""),localStorage.setItem("90m_biasav1",""),localStorage.setItem("90m_biasav2",""),localStorage.setItem("90m_DIFF",""),localStorage.setItem("90m_MACD",""),localStorage.setItem("90m_DIFFMACD",""),localStorage.setItem("90m_LableList",""),localStorage.setItem("1d_candlestick_x",""),localStorage.setItem("1d_candlestick_o",""),localStorage.setItem("1d_candlestick_h",""),localStorage.setItem("1d_candlestick_l",""),localStorage.setItem("1d_candlestick_c",""),localStorage.setItem("1d_ma1",""),localStorage.setItem("1d_ma2",""),localStorage.setItem("1d_ma3",""),localStorage.setItem("1d_ma4",""),localStorage.setItem("1d_ma5",""),localStorage.setItem("1d_ma6",""),localStorage.setItem("1d_ma7",""),localStorage.setItem("1d_ma8",""),localStorage.setItem("1d_RSI1Chart",""),localStorage.setItem("1d_RSI2Chart",""),localStorage.setItem("1d_KChart",""),localStorage.setItem("1d_DChart",""),localStorage.setItem("1d_bias",""),localStorage.setItem("1d_biasav1",""),localStorage.setItem("1d_biasav2",""),localStorage.setItem("1d_DIFF",""),localStorage.setItem("1d_MACD",""),localStorage.setItem("1d_DIFFMACD",""),localStorage.setItem("1d_LableList",""),localStorage.setItem("1dY_candlestick_x",""),localStorage.setItem("1dY_candlestick_o",""),localStorage.setItem("1dY_candlestick_h",""),localStorage.setItem("1dY_candlestick_l",""),localStorage.setItem("1dY_candlestick_c",""),localStorage.setItem("1dY_ma1",""),localStorage.setItem("1dY_ma2",""),localStorage.setItem("1dY_ma3",""),localStorage.setItem("1dY_ma4",""),localStorage.setItem("1dY_ma5",""),localStorage.setItem("1dY_ma6",""),localStorage.setItem("1dY_ma7",""),localStorage.setItem("1dY_ma8",""),localStorage.setItem("1dY_RSI1Chart",""),localStorage.setItem("1dY_RSI2Chart",""),localStorage.setItem("1dY_KChart",""),localStorage.setItem("1dY_DChart",""),localStorage.setItem("1dY_bias",""),localStorage.setItem("1dY_biasav1",""),localStorage.setItem("1dY_biasav2",""),localStorage.setItem("1dY_DIFF",""),localStorage.setItem("1dY_MACD",""),localStorage.setItem("1dY_DIFFMACD",""),localStorage.setItem("1dY_LableList",""),localStorage.setItem("1dF_candlestick_x",""),localStorage.setItem("1dF_candlestick_o",""),localStorage.setItem("1dF_candlestick_h",""),localStorage.setItem("1dF_candlestick_l",""),localStorage.setItem("1dF_candlestick_c",""),localStorage.setItem("1dF_ma1",""),localStorage.setItem("1dF_ma2",""),localStorage.setItem("1dF_ma3",""),localStorage.setItem("1dF_ma4",""),localStorage.setItem("1dF_ma5",""),localStorage.setItem("1dF_ma6",""),localStorage.setItem("1dF_ma7",""),localStorage.setItem("1dF_ma8",""),localStorage.setItem("1dF_RSI1Chart",""),localStorage.setItem("1dF_RSI2Chart",""),localStorage.setItem("1dF_KChart",""),localStorage.setItem("1dF_DChart",""),localStorage.setItem("1dF_bias",""),localStorage.setItem("1dF_biasav1",""),localStorage.setItem("1dF_biasav2",""),localStorage.setItem("1dF_DIFF",""),localStorage.setItem("1dF_MACD",""),localStorage.setItem("1dF_DIFFMACD",""),localStorage.setItem("1dF_LableList",""),localStorage.setItem("1dS_candlestick_x",""),localStorage.setItem("1dS_candlestick_o",""),localStorage.setItem("1dS_candlestick_h",""),localStorage.setItem("1dS_candlestick_l",""),localStorage.setItem("1dS_candlestick_c",""),localStorage.setItem("1dS_ma1",""),localStorage.setItem("1dS_ma2",""),localStorage.setItem("1dS_ma3",""),localStorage.setItem("1dS_ma4",""),localStorage.setItem("1dS_ma5",""),localStorage.setItem("1dS_ma6",""),localStorage.setItem("1dS_ma7",""),localStorage.setItem("1dS_ma8",""),localStorage.setItem("1dS_RSI1Chart",""),localStorage.setItem("1dS_RSI2Chart",""),localStorage.setItem("1dS_KChart",""),localStorage.setItem("1dS_DChart",""),localStorage.setItem("1dS_bias",""),localStorage.setItem("1dS_biasav1",""),localStorage.setItem("1dS_biasav2",""),localStorage.setItem("1dS_DIFF",""),localStorage.setItem("1dS_MACD",""),localStorage.setItem("1dS_DIFFMACD",""),localStorage.setItem("1dS_LableList",""),localStorage.setItem("1wk_candlestick_x",""),localStorage.setItem("1wk_candlestick_o",""),localStorage.setItem("1wk_candlestick_h",""),localStorage.setItem("1wk_candlestick_l",""),localStorage.setItem("1wk_candlestick_c",""),localStorage.setItem("1wk_ma1",""),localStorage.setItem("1wk_ma2",""),localStorage.setItem("1wk_ma3",""),localStorage.setItem("1wk_ma4",""),localStorage.setItem("1wk_ma5",""),localStorage.setItem("1wk_ma6",""),localStorage.setItem("1wk_ma7",""),localStorage.setItem("1wk_ma8",""),localStorage.setItem("1wk_RSI1Chart",""),localStorage.setItem("1wk_RSI2Chart",""),localStorage.setItem("1wk_KChart",""),localStorage.setItem("1wk_DChart",""),localStorage.setItem("1wk_bias",""),localStorage.setItem("1wk_biasav1",""),localStorage.setItem("1wk_biasav2",""),localStorage.setItem("1wk_DIFF",""),localStorage.setItem("1wk_MACD",""),localStorage.setItem("1wk_DIFFMACD",""),localStorage.setItem("1wk_LableList",""),localStorage.setItem("1wkY_candlestick_x",""),localStorage.setItem("1wkY_candlestick_o",""),localStorage.setItem("1wkY_candlestick_h",""),localStorage.setItem("1wkY_candlestick_l",""),localStorage.setItem("1wkY_candlestick_c",""),localStorage.setItem("1wkY_ma1",""),localStorage.setItem("1wkY_ma2",""),localStorage.setItem("1wkY_ma3",""),localStorage.setItem("1wkY_ma4",""),localStorage.setItem("1wkY_ma5",""),localStorage.setItem("1wkY_ma6",""),localStorage.setItem("1wkY_ma7",""),localStorage.setItem("1wkY_ma8",""),localStorage.setItem("1wkY_RSI1Chart",""),localStorage.setItem("1wkY_RSI2Chart",""),localStorage.setItem("1wkY_KChart",""),localStorage.setItem("1wkY_DChart",""),localStorage.setItem("1wkY_bias",""),localStorage.setItem("1wkY_biasav1",""),localStorage.setItem("1wkY_biasav2",""),localStorage.setItem("1wkY_DIFF",""),localStorage.setItem("1wkY_MACD",""),localStorage.setItem("1wkY_DIFFMACD",""),localStorage.setItem("1wkY_LableList",""),localStorage.setItem("1wkF_candlestick_x",""),localStorage.setItem("1wkF_candlestick_o",""),localStorage.setItem("1wkF_candlestick_h",""),localStorage.setItem("1wkF_candlestick_l",""),localStorage.setItem("1wkF_candlestick_c",""),localStorage.setItem("1wkF_ma1",""),localStorage.setItem("1wkF_ma2",""),localStorage.setItem("1wkF_ma3",""),localStorage.setItem("1wkF_ma4",""),localStorage.setItem("1wkF_ma5",""),localStorage.setItem("1wkF_ma6",""),localStorage.setItem("1wkF_ma7",""),localStorage.setItem("1wkF_ma8",""),localStorage.setItem("1wkF_RSI1Chart",""),localStorage.setItem("1wkF_RSI2Chart",""),localStorage.setItem("1wkF_KChart",""),localStorage.setItem("1wkF_DChart",""),localStorage.setItem("1wkF_bias",""),localStorage.setItem("1wkF_biasav1",""),localStorage.setItem("1wkF_biasav2",""),localStorage.setItem("1wkF_DIFF",""),localStorage.setItem("1wkF_MACD",""),localStorage.setItem("1wkF_DIFFMACD",""),localStorage.setItem("1wkF_LableList",""),localStorage.setItem("1wkS_candlestick_x",""),localStorage.setItem("1wkS_candlestick_o",""),localStorage.setItem("1wkS_candlestick_h",""),localStorage.setItem("1wkS_candlestick_l",""),localStorage.setItem("1wkS_candlestick_c",""),localStorage.setItem("1wkS_ma1",""),localStorage.setItem("1wkS_ma2",""),localStorage.setItem("1wkS_ma3",""),localStorage.setItem("1wkS_ma4",""),localStorage.setItem("1wkS_ma5",""),localStorage.setItem("1wkS_ma6",""),localStorage.setItem("1wkS_ma7",""),localStorage.setItem("1wkS_ma8",""),localStorage.setItem("1wkS_RSI1Chart",""),localStorage.setItem("1wkS_RSI2Chart",""),localStorage.setItem("1wkS_KChart",""),localStorage.setItem("1wkS_DChart",""),localStorage.setItem("1wkS_bias",""),localStorage.setItem("1wkS_biasav1",""),localStorage.setItem("1wkS_biasav2",""),localStorage.setItem("1wkS_DIFF",""),localStorage.setItem("1wkS_MACD",""),localStorage.setItem("1wkS_DIFFMACD",""),localStorage.setItem("1wkS_LableList",""),localStorage.setItem("1mo_candlestick_x",""),localStorage.setItem("1mo_candlestick_o",""),localStorage.setItem("1mo_candlestick_h",""),localStorage.setItem("1mo_candlestick_l",""),localStorage.setItem("1mo_candlestick_c",""),localStorage.setItem("1mo_ma1",""),localStorage.setItem("1mo_ma2",""),localStorage.setItem("1mo_ma3",""),localStorage.setItem("1mo_ma4",""),localStorage.setItem("1mo_ma5",""),localStorage.setItem("1mo_ma6",""),localStorage.setItem("1mo_ma7",""),localStorage.setItem("1mo_ma8",""),localStorage.setItem("1mo_RSI1Chart",""),localStorage.setItem("1mo_RSI2Chart",""),localStorage.setItem("1mo_KChart",""),localStorage.setItem("1mo_DChart",""),localStorage.setItem("1mo_bias",""),localStorage.setItem("1mo_biasav1",""),localStorage.setItem("1mo_biasav2",""),localStorage.setItem("1mo_DIFF",""),localStorage.setItem("1mo_MACD",""),localStorage.setItem("1mo_DIFFMACD",""),localStorage.setItem("1mo_LableList",""),localStorage.setItem("1moY_candlestick_x",""),localStorage.setItem("1moY_candlestick_o",""),localStorage.setItem("1moY_candlestick_h",""),localStorage.setItem("1moY_candlestick_l",""),localStorage.setItem("1moY_candlestick_c",""),localStorage.setItem("1moY_ma1",""),localStorage.setItem("1moY_ma2",""),localStorage.setItem("1moY_ma3",""),localStorage.setItem("1moY_ma4",""),localStorage.setItem("1moY_ma5",""),localStorage.setItem("1moY_ma6",""),localStorage.setItem("1moY_ma7",""),localStorage.setItem("1moY_ma8",""),localStorage.setItem("1moY_RSI1Chart",""),localStorage.setItem("1moY_RSI2Chart",""),localStorage.setItem("1moY_KChart",""),localStorage.setItem("1moY_DChart",""),localStorage.setItem("1moY_bias",""),localStorage.setItem("1moY_biasav1",""),localStorage.setItem("1moY_biasav2",""),localStorage.setItem("1moY_DIFF",""),localStorage.setItem("1moY_MACD",""),localStorage.setItem("1moY_DIFFMACD",""),localStorage.setItem("1moY_LableList",""),localStorage.setItem("1moF_candlestick_x",""),localStorage.setItem("1moF_candlestick_o",""),localStorage.setItem("1moF_candlestick_h",""),localStorage.setItem("1moF_candlestick_l",""),localStorage.setItem("1moF_candlestick_c",""),localStorage.setItem("1moF_ma1",""),localStorage.setItem("1moF_ma2",""),localStorage.setItem("1moF_ma3",""),localStorage.setItem("1moF_ma4",""),localStorage.setItem("1moF_ma5",""),localStorage.setItem("1moF_ma6",""),localStorage.setItem("1moF_ma7",""),localStorage.setItem("1moF_ma8",""),localStorage.setItem("1moF_RSI1Chart",""),localStorage.setItem("1moF_RSI2Chart",""),localStorage.setItem("1moF_KChart",""),localStorage.setItem("1moF_DChart",""),localStorage.setItem("1moF_bias",""),localStorage.setItem("1moF_biasav1",""),localStorage.setItem("1moF_biasav2",""),localStorage.setItem("1moF_DIFF",""),localStorage.setItem("1moF_MACD",""),localStorage.setItem("1moF_DIFFMACD",""),localStorage.setItem("1moF_LableList",""),localStorage.setItem("1moS_candlestick_x",""),localStorage.setItem("1moS_candlestick_o",""),localStorage.setItem("1moS_candlestick_h",""),localStorage.setItem("1moS_candlestick_l",""),localStorage.setItem("1moS_candlestick_c",""),localStorage.setItem("1moS_ma1",""),localStorage.setItem("1moS_ma2",""),localStorage.setItem("1moS_ma3",""),localStorage.setItem("1moS_ma4",""),localStorage.setItem("1moS_ma5",""),localStorage.setItem("1moS_ma6",""),localStorage.setItem("1moS_ma7",""),localStorage.setItem("1moS_ma8",""),localStorage.setItem("1moS_RSI1Chart",""),localStorage.setItem("1moS_RSI2Chart",""),localStorage.setItem("1moS_KChart",""),localStorage.setItem("1moS_DChart",""),localStorage.setItem("1moS_bias",""),localStorage.setItem("1moS_biasav1",""),localStorage.setItem("1moS_biasav2",""),localStorage.setItem("1moS_DIFF",""),localStorage.setItem("1moS_MACD",""),localStorage.setItem("1moS_DIFFMACD",""),localStorage.setItem("1moS_LableList","")}setLocalstorage(i){i.stockname!=null&&i.stockname!=""&&(this.stockname=i.stockname),this.rptstockname=i.stockname;var o=i.m1,r=i.m5,a=i.m10,s=i.m15,l=i.m20,c=i.m30,m=i.m60,p=i.m90,g=i.d1,_=i.wk1,C=i.mo1;if(o!=null&&(localStorage.setItem("1m_candlestick_x",o.candlestick_xohlc.x),localStorage.setItem("1m_candlestick_o",o.candlestick_xohlc.o),localStorage.setItem("1m_candlestick_h",o.candlestick_xohlc.h),localStorage.setItem("1m_candlestick_l",o.candlestick_xohlc.l),localStorage.setItem("1m_candlestick_c",o.candlestick_xohlc.c),localStorage.setItem("1m_ma1",o.ma18.ma1),localStorage.setItem("1m_ma2",o.ma18.ma2),localStorage.setItem("1m_ma3",o.ma18.ma3),localStorage.setItem("1m_ma4",o.ma18.ma4),localStorage.setItem("1m_ma5",o.ma18.ma5),localStorage.setItem("1m_ma6",o.ma18.ma6),localStorage.setItem("1m_ma7",o.ma18.ma7),localStorage.setItem("1m_ma8",o.ma18.ma8),localStorage.setItem("1m_RSI1Chart",o.RSIChart.RSI1),localStorage.setItem("1m_RSI2Chart",o.RSIChart.RSI2),localStorage.setItem("1m_KChart",o.KDChart.K),localStorage.setItem("1m_DChart",o.KDChart.D),localStorage.setItem("1m_bias",o.BiasChart.bias),localStorage.setItem("1m_biasav1",o.BiasChart.biasav1),localStorage.setItem("1m_biasav2",o.BiasChart.biasav2),localStorage.setItem("1m_DIFF",o.MACDFinalChart.DIFF),localStorage.setItem("1m_MACD",o.MACDFinalChart.MACD),localStorage.setItem("1m_DIFFMACD",o.MACDFinalChart.DIFFMACD),localStorage.setItem("1m_LableList",o.LableList)),r!=null&&(localStorage.setItem("5m_candlestick_x",r.candlestick_xohlc.x),localStorage.setItem("5m_candlestick_o",r.candlestick_xohlc.o),localStorage.setItem("5m_candlestick_h",r.candlestick_xohlc.h),localStorage.setItem("5m_candlestick_l",r.candlestick_xohlc.l),localStorage.setItem("5m_candlestick_c",r.candlestick_xohlc.c),localStorage.setItem("5m_ma1",r.ma18.ma1),localStorage.setItem("5m_ma2",r.ma18.ma2),localStorage.setItem("5m_ma3",r.ma18.ma3),localStorage.setItem("5m_ma4",r.ma18.ma4),localStorage.setItem("5m_ma5",r.ma18.ma5),localStorage.setItem("5m_ma6",r.ma18.ma6),localStorage.setItem("5m_ma7",r.ma18.ma7),localStorage.setItem("5m_ma8",r.ma18.ma8),localStorage.setItem("5m_RSI1Chart",r.RSIChart.RSI1),localStorage.setItem("5m_RSI2Chart",r.RSIChart.RSI2),localStorage.setItem("5m_KChart",r.KDChart.K),localStorage.setItem("5m_DChart",r.KDChart.D),localStorage.setItem("5m_bias",r.BiasChart.bias),localStorage.setItem("5m_biasav1",r.BiasChart.biasav1),localStorage.setItem("5m_biasav2",r.BiasChart.biasav2),localStorage.setItem("5m_DIFF",r.MACDFinalChart.DIFF),localStorage.setItem("5m_MACD",r.MACDFinalChart.MACD),localStorage.setItem("5m_DIFFMACD",r.MACDFinalChart.DIFFMACD),localStorage.setItem("5m_LableList",r.LableList)),a!=null&&(localStorage.setItem("10m_candlestick_x",a.candlestick_xohlc.x),localStorage.setItem("10m_candlestick_o",a.candlestick_xohlc.o),localStorage.setItem("10m_candlestick_h",a.candlestick_xohlc.h),localStorage.setItem("10m_candlestick_l",a.candlestick_xohlc.l),localStorage.setItem("10m_candlestick_c",a.candlestick_xohlc.c),localStorage.setItem("10m_ma1",a.ma18.ma1),localStorage.setItem("10m_ma2",a.ma18.ma2),localStorage.setItem("10m_ma3",a.ma18.ma3),localStorage.setItem("10m_ma4",a.ma18.ma4),localStorage.setItem("10m_ma5",a.ma18.ma5),localStorage.setItem("10m_ma6",a.ma18.ma6),localStorage.setItem("10m_ma7",a.ma18.ma7),localStorage.setItem("10m_ma8",a.ma18.ma8),localStorage.setItem("10m_RSI1Chart",a.RSIChart.RSI1),localStorage.setItem("10m_RSI2Chart",a.RSIChart.RSI2),localStorage.setItem("10m_KChart",a.KDChart.K),localStorage.setItem("10m_DChart",a.KDChart.D),localStorage.setItem("10m_bias",a.BiasChart.bias),localStorage.setItem("10m_biasav1",a.BiasChart.biasav1),localStorage.setItem("10m_biasav2",a.BiasChart.biasav2),localStorage.setItem("10m_DIFF",a.MACDFinalChart.DIFF),localStorage.setItem("10m_MACD",a.MACDFinalChart.MACD),localStorage.setItem("10m_DIFFMACD",a.MACDFinalChart.DIFFMACD),localStorage.setItem("10m_LableList",a.LableList)),s!=null&&(localStorage.setItem("15m_candlestick_x",s.candlestick_xohlc.x),localStorage.setItem("15m_candlestick_o",s.candlestick_xohlc.o),localStorage.setItem("15m_candlestick_h",s.candlestick_xohlc.h),localStorage.setItem("15m_candlestick_l",s.candlestick_xohlc.l),localStorage.setItem("15m_candlestick_c",s.candlestick_xohlc.c),localStorage.setItem("15m_ma1",s.ma18.ma1),localStorage.setItem("15m_ma2",s.ma18.ma2),localStorage.setItem("15m_ma3",s.ma18.ma3),localStorage.setItem("15m_ma4",s.ma18.ma4),localStorage.setItem("15m_ma5",s.ma18.ma5),localStorage.setItem("15m_ma6",s.ma18.ma6),localStorage.setItem("15m_ma7",s.ma18.ma7),localStorage.setItem("15m_ma8",s.ma18.ma8),localStorage.setItem("15m_RSI1Chart",s.RSIChart.RSI1),localStorage.setItem("15m_RSI2Chart",s.RSIChart.RSI2),localStorage.setItem("15m_KChart",s.KDChart.K),localStorage.setItem("15m_DChart",s.KDChart.D),localStorage.setItem("15m_bias",s.BiasChart.bias),localStorage.setItem("15m_biasav1",s.BiasChart.biasav1),localStorage.setItem("15m_biasav2",s.BiasChart.biasav2),localStorage.setItem("15m_DIFF",s.MACDFinalChart.DIFF),localStorage.setItem("15m_MACD",s.MACDFinalChart.MACD),localStorage.setItem("15m_DIFFMACD",s.MACDFinalChart.DIFFMACD),localStorage.setItem("15m_LableList",s.LableList)),l!=null&&(localStorage.setItem("20m_candlestick_x",l.candlestick_xohlc.x),localStorage.setItem("20m_candlestick_o",l.candlestick_xohlc.o),localStorage.setItem("20m_candlestick_h",l.candlestick_xohlc.h),localStorage.setItem("20m_candlestick_l",l.candlestick_xohlc.l),localStorage.setItem("20m_candlestick_c",l.candlestick_xohlc.c),localStorage.setItem("20m_ma1",l.ma18.ma1),localStorage.setItem("20m_ma2",l.ma18.ma2),localStorage.setItem("20m_ma3",l.ma18.ma3),localStorage.setItem("20m_ma4",l.ma18.ma4),localStorage.setItem("20m_ma5",l.ma18.ma5),localStorage.setItem("20m_ma6",l.ma18.ma6),localStorage.setItem("20m_ma7",l.ma18.ma7),localStorage.setItem("20m_ma8",l.ma18.ma8),localStorage.setItem("20m_RSI1Chart",l.RSIChart.RSI1),localStorage.setItem("20m_RSI2Chart",l.RSIChart.RSI2),localStorage.setItem("20m_KChart",l.KDChart.K),localStorage.setItem("20m_DChart",l.KDChart.D),localStorage.setItem("20m_bias",l.BiasChart.bias),localStorage.setItem("20m_biasav1",l.BiasChart.biasav1),localStorage.setItem("20m_biasav2",l.BiasChart.biasav2),localStorage.setItem("20m_DIFF",l.MACDFinalChart.DIFF),localStorage.setItem("20m_MACD",l.MACDFinalChart.MACD),localStorage.setItem("20m_DIFFMACD",l.MACDFinalChart.DIFFMACD),localStorage.setItem("20m_LableList",l.LableList)),c!=null&&(localStorage.setItem("30m_candlestick_x",c.candlestick_xohlc.x),localStorage.setItem("30m_candlestick_o",c.candlestick_xohlc.o),localStorage.setItem("30m_candlestick_h",c.candlestick_xohlc.h),localStorage.setItem("30m_candlestick_l",c.candlestick_xohlc.l),localStorage.setItem("30m_candlestick_c",c.candlestick_xohlc.c),localStorage.setItem("30m_ma1",c.ma18.ma1),localStorage.setItem("30m_ma2",c.ma18.ma2),localStorage.setItem("30m_ma3",c.ma18.ma3),localStorage.setItem("30m_ma4",c.ma18.ma4),localStorage.setItem("30m_ma5",c.ma18.ma5),localStorage.setItem("30m_ma6",c.ma18.ma6),localStorage.setItem("30m_ma7",c.ma18.ma7),localStorage.setItem("30m_ma8",c.ma18.ma8),localStorage.setItem("30m_RSI1Chart",c.RSIChart.RSI1),localStorage.setItem("30m_RSI2Chart",c.RSIChart.RSI2),localStorage.setItem("30m_KChart",c.KDChart.K),localStorage.setItem("30m_DChart",c.KDChart.D),localStorage.setItem("30m_bias",c.BiasChart.bias),localStorage.setItem("30m_biasav1",c.BiasChart.biasav1),localStorage.setItem("30m_biasav2",c.BiasChart.biasav2),localStorage.setItem("30m_DIFF",c.MACDFinalChart.DIFF),localStorage.setItem("30m_MACD",c.MACDFinalChart.MACD),localStorage.setItem("30m_DIFFMACD",c.MACDFinalChart.DIFFMACD),localStorage.setItem("30m_LableList",c.LableList)),m!=null&&(localStorage.setItem("60m_candlestick_x",m.candlestick_xohlc.x),localStorage.setItem("60m_candlestick_o",m.candlestick_xohlc.o),localStorage.setItem("60m_candlestick_h",m.candlestick_xohlc.h),localStorage.setItem("60m_candlestick_l",m.candlestick_xohlc.l),localStorage.setItem("60m_candlestick_c",m.candlestick_xohlc.c),localStorage.setItem("60m_ma1",m.ma18.ma1),localStorage.setItem("60m_ma2",m.ma18.ma2),localStorage.setItem("60m_ma3",m.ma18.ma3),localStorage.setItem("60m_ma4",m.ma18.ma4),localStorage.setItem("60m_ma5",m.ma18.ma5),localStorage.setItem("60m_ma6",m.ma18.ma6),localStorage.setItem("60m_ma7",m.ma18.ma7),localStorage.setItem("60m_ma8",m.ma18.ma8),localStorage.setItem("60m_RSI1Chart",m.RSIChart.RSI1),localStorage.setItem("60m_RSI2Chart",m.RSIChart.RSI2),localStorage.setItem("60m_KChart",m.KDChart.K),localStorage.setItem("60m_DChart",m.KDChart.D),localStorage.setItem("60m_bias",m.BiasChart.bias),localStorage.setItem("60m_biasav1",m.BiasChart.biasav1),localStorage.setItem("60m_biasav2",m.BiasChart.biasav2),localStorage.setItem("60m_DIFF",m.MACDFinalChart.DIFF),localStorage.setItem("60m_MACD",m.MACDFinalChart.MACD),localStorage.setItem("60m_DIFFMACD",m.MACDFinalChart.DIFFMACD),localStorage.setItem("60m_LableList",m.LableList)),p!=null&&(localStorage.setItem("90m_candlestick_x",p.candlestick_xohlc.x),localStorage.setItem("90m_candlestick_o",p.candlestick_xohlc.o),localStorage.setItem("90m_candlestick_h",p.candlestick_xohlc.h),localStorage.setItem("90m_candlestick_l",p.candlestick_xohlc.l),localStorage.setItem("90m_candlestick_c",p.candlestick_xohlc.c),localStorage.setItem("90m_ma1",p.ma18.ma1),localStorage.setItem("90m_ma2",p.ma18.ma2),localStorage.setItem("90m_ma3",p.ma18.ma3),localStorage.setItem("90m_ma4",p.ma18.ma4),localStorage.setItem("90m_ma5",p.ma18.ma5),localStorage.setItem("90m_ma6",p.ma18.ma6),localStorage.setItem("90m_ma7",p.ma18.ma7),localStorage.setItem("90m_ma8",p.ma18.ma8),localStorage.setItem("90m_RSI1Chart",p.RSIChart.RSI1),localStorage.setItem("90m_RSI2Chart",p.RSIChart.RSI2),localStorage.setItem("90m_KChart",p.KDChart.K),localStorage.setItem("90m_DChart",p.KDChart.D),localStorage.setItem("90m_bias",p.BiasChart.bias),localStorage.setItem("90m_biasav1",p.BiasChart.biasav1),localStorage.setItem("90m_biasav2",p.BiasChart.biasav2),localStorage.setItem("90m_DIFF",p.MACDFinalChart.DIFF),localStorage.setItem("90m_MACD",p.MACDFinalChart.MACD),localStorage.setItem("90m_DIFFMACD",p.MACDFinalChart.DIFFMACD),localStorage.setItem("90m_LableList",p.LableList)),g!=null)switch(this.dataSource){case"Y":localStorage.setItem("1dY_candlestick_x",g.candlestick_xohlc.x),localStorage.setItem("1dY_candlestick_o",g.candlestick_xohlc.o),localStorage.setItem("1dY_candlestick_h",g.candlestick_xohlc.h),localStorage.setItem("1dY_candlestick_l",g.candlestick_xohlc.l),localStorage.setItem("1dY_candlestick_c",g.candlestick_xohlc.c),localStorage.setItem("1dY_ma1",g.ma18.ma1),localStorage.setItem("1dY_ma2",g.ma18.ma2),localStorage.setItem("1dY_ma3",g.ma18.ma3),localStorage.setItem("1dY_ma4",g.ma18.ma4),localStorage.setItem("1dY_ma5",g.ma18.ma5),localStorage.setItem("1dY_ma6",g.ma18.ma6),localStorage.setItem("1dY_ma7",g.ma18.ma7),localStorage.setItem("1dY_ma8",g.ma18.ma8),localStorage.setItem("1dY_RSI1Chart",g.RSIChart.RSI1),localStorage.setItem("1dY_RSI2Chart",g.RSIChart.RSI2),localStorage.setItem("1dY_KChart",g.KDChart.K),localStorage.setItem("1dY_DChart",g.KDChart.D),localStorage.setItem("1dY_bias",g.BiasChart.bias),localStorage.setItem("1dY_biasav1",g.BiasChart.biasav1),localStorage.setItem("1dY_biasav2",g.BiasChart.biasav2),localStorage.setItem("1dY_DIFF",g.MACDFinalChart.DIFF),localStorage.setItem("1dY_MACD",g.MACDFinalChart.MACD),localStorage.setItem("1dY_DIFFMACD",g.MACDFinalChart.DIFFMACD),localStorage.setItem("1dY_LableList",g.LableList);break;case"F":localStorage.setItem("1dF_candlestick_x",g.candlestick_xohlc.x),localStorage.setItem("1dF_candlestick_o",g.candlestick_xohlc.o),localStorage.setItem("1dF_candlestick_h",g.candlestick_xohlc.h),localStorage.setItem("1dF_candlestick_l",g.candlestick_xohlc.l),localStorage.setItem("1dF_candlestick_c",g.candlestick_xohlc.c),localStorage.setItem("1dF_ma1",g.ma18.ma1),localStorage.setItem("1dF_ma2",g.ma18.ma2),localStorage.setItem("1dF_ma3",g.ma18.ma3),localStorage.setItem("1dF_ma4",g.ma18.ma4),localStorage.setItem("1dF_ma5",g.ma18.ma5),localStorage.setItem("1dF_ma6",g.ma18.ma6),localStorage.setItem("1dF_ma7",g.ma18.ma7),localStorage.setItem("1dF_ma8",g.ma18.ma8),localStorage.setItem("1dF_RSI1Chart",g.RSIChart.RSI1),localStorage.setItem("1dF_RSI2Chart",g.RSIChart.RSI2),localStorage.setItem("1dF_KChart",g.KDChart.K),localStorage.setItem("1dF_DChart",g.KDChart.D),localStorage.setItem("1dF_bias",g.BiasChart.bias),localStorage.setItem("1dF_biasav1",g.BiasChart.biasav1),localStorage.setItem("1dF_biasav2",g.BiasChart.biasav2),localStorage.setItem("1dF_DIFF",g.MACDFinalChart.DIFF),localStorage.setItem("1dF_MACD",g.MACDFinalChart.MACD),localStorage.setItem("1dF_DIFFMACD",g.MACDFinalChart.DIFFMACD),localStorage.setItem("1dF_LableList",g.LableList);break;case"S":localStorage.setItem("1dS_candlestick_x",g.candlestick_xohlc.x),localStorage.setItem("1dS_candlestick_o",g.candlestick_xohlc.o),localStorage.setItem("1dS_candlestick_h",g.candlestick_xohlc.h),localStorage.setItem("1dS_candlestick_l",g.candlestick_xohlc.l),localStorage.setItem("1dS_candlestick_c",g.candlestick_xohlc.c),localStorage.setItem("1dS_ma1",g.ma18.ma1),localStorage.setItem("1dS_ma2",g.ma18.ma2),localStorage.setItem("1dS_ma3",g.ma18.ma3),localStorage.setItem("1dS_ma4",g.ma18.ma4),localStorage.setItem("1dS_ma5",g.ma18.ma5),localStorage.setItem("1dS_ma6",g.ma18.ma6),localStorage.setItem("1dS_ma7",g.ma18.ma7),localStorage.setItem("1dS_ma8",g.ma18.ma8),localStorage.setItem("1dS_RSI1Chart",g.RSIChart.RSI1),localStorage.setItem("1dS_RSI2Chart",g.RSIChart.RSI2),localStorage.setItem("1dS_KChart",g.KDChart.K),localStorage.setItem("1dS_DChart",g.KDChart.D),localStorage.setItem("1dS_bias",g.BiasChart.bias),localStorage.setItem("1dS_biasav1",g.BiasChart.biasav1),localStorage.setItem("1dS_biasav2",g.BiasChart.biasav2),localStorage.setItem("1dS_DIFF",g.MACDFinalChart.DIFF),localStorage.setItem("1dS_MACD",g.MACDFinalChart.MACD),localStorage.setItem("1dS_DIFFMACD",g.MACDFinalChart.DIFFMACD),localStorage.setItem("1dS_LableList",g.LableList);break}if(_!=null)switch(this.dataSource){case"Y":localStorage.setItem("1wkY_candlestick_x",_.candlestick_xohlc.x),localStorage.setItem("1wkY_candlestick_o",_.candlestick_xohlc.o),localStorage.setItem("1wkY_candlestick_h",_.candlestick_xohlc.h),localStorage.setItem("1wkY_candlestick_l",_.candlestick_xohlc.l),localStorage.setItem("1wkY_candlestick_c",_.candlestick_xohlc.c),localStorage.setItem("1wkY_ma1",_.ma18.ma1),localStorage.setItem("1wkY_ma2",_.ma18.ma2),localStorage.setItem("1wkY_ma3",_.ma18.ma3),localStorage.setItem("1wkY_ma4",_.ma18.ma4),localStorage.setItem("1wkY_ma5",_.ma18.ma5),localStorage.setItem("1wkY_ma6",_.ma18.ma6),localStorage.setItem("1wkY_ma7",_.ma18.ma7),localStorage.setItem("1wkY_ma8",_.ma18.ma8),localStorage.setItem("1wkY_RSI1Chart",_.RSIChart.RSI1),localStorage.setItem("1wkY_RSI2Chart",_.RSIChart.RSI2),localStorage.setItem("1wkY_KChart",_.KDChart.K),localStorage.setItem("1wkY_DChart",_.KDChart.D),localStorage.setItem("1wkY_bias",_.BiasChart.bias),localStorage.setItem("1wkY_biasav1",_.BiasChart.biasav1),localStorage.setItem("1wkY_biasav2",_.BiasChart.biasav2),localStorage.setItem("1wkY_DIFF",_.MACDFinalChart.DIFF),localStorage.setItem("1wkY_MACD",_.MACDFinalChart.MACD),localStorage.setItem("1wkY_DIFFMACD",_.MACDFinalChart.DIFFMACD),localStorage.setItem("1wkY_LableList",_.LableList);break;case"F":localStorage.setItem("1wkF_candlestick_x",_.candlestick_xohlc.x),localStorage.setItem("1wkF_candlestick_o",_.candlestick_xohlc.o),localStorage.setItem("1wkF_candlestick_h",_.candlestick_xohlc.h),localStorage.setItem("1wkF_candlestick_l",_.candlestick_xohlc.l),localStorage.setItem("1wkF_candlestick_c",_.candlestick_xohlc.c),localStorage.setItem("1wkF_ma1",_.ma18.ma1),localStorage.setItem("1wkF_ma2",_.ma18.ma2),localStorage.setItem("1wkF_ma3",_.ma18.ma3),localStorage.setItem("1wkF_ma4",_.ma18.ma4),localStorage.setItem("1wkF_ma5",_.ma18.ma5),localStorage.setItem("1wkF_ma6",_.ma18.ma6),localStorage.setItem("1wkF_ma7",_.ma18.ma7),localStorage.setItem("1wkF_ma8",_.ma18.ma8),localStorage.setItem("1wkF_RSI1Chart",_.RSIChart.RSI1),localStorage.setItem("1wkF_RSI2Chart",_.RSIChart.RSI2),localStorage.setItem("1wkF_KChart",_.KDChart.K),localStorage.setItem("1wkF_DChart",_.KDChart.D),localStorage.setItem("1wkF_bias",_.BiasChart.bias),localStorage.setItem("1wkF_biasav1",_.BiasChart.biasav1),localStorage.setItem("1wkF_biasav2",_.BiasChart.biasav2),localStorage.setItem("1wkF_DIFF",_.MACDFinalChart.DIFF),localStorage.setItem("1wkF_MACD",_.MACDFinalChart.MACD),localStorage.setItem("1wkF_DIFFMACD",_.MACDFinalChart.DIFFMACD),localStorage.setItem("1wkF_LableList",_.LableList);break;case"S":localStorage.setItem("1wkS_candlestick_x",_.candlestick_xohlc.x),localStorage.setItem("1wkS_candlestick_o",_.candlestick_xohlc.o),localStorage.setItem("1wkS_candlestick_h",_.candlestick_xohlc.h),localStorage.setItem("1wkS_candlestick_l",_.candlestick_xohlc.l),localStorage.setItem("1wkS_candlestick_c",_.candlestick_xohlc.c),localStorage.setItem("1wkS_ma1",_.ma18.ma1),localStorage.setItem("1wkS_ma2",_.ma18.ma2),localStorage.setItem("1wkS_ma3",_.ma18.ma3),localStorage.setItem("1wkS_ma4",_.ma18.ma4),localStorage.setItem("1wkS_ma5",_.ma18.ma5),localStorage.setItem("1wkS_ma6",_.ma18.ma6),localStorage.setItem("1wkS_ma7",_.ma18.ma7),localStorage.setItem("1wkS_ma8",_.ma18.ma8),localStorage.setItem("1wkS_RSI1Chart",_.RSIChart.RSI1),localStorage.setItem("1wkS_RSI2Chart",_.RSIChart.RSI2),localStorage.setItem("1wkS_KChart",_.KDChart.K),localStorage.setItem("1wkS_DChart",_.KDChart.D),localStorage.setItem("1wkS_bias",_.BiasChart.bias),localStorage.setItem("1wkS_biasav1",_.BiasChart.biasav1),localStorage.setItem("1wkS_biasav2",_.BiasChart.biasav2),localStorage.setItem("1wkS_DIFF",_.MACDFinalChart.DIFF),localStorage.setItem("1wkS_MACD",_.MACDFinalChart.MACD),localStorage.setItem("1wkS_DIFFMACD",_.MACDFinalChart.DIFFMACD),localStorage.setItem("1wkS_LableList",_.LableList);break}if(C!=null)switch(this.dataSource){case"Y":localStorage.setItem("1moY_candlestick_x",C.candlestick_xohlc.x),localStorage.setItem("1moY_candlestick_o",C.candlestick_xohlc.o),localStorage.setItem("1moY_candlestick_h",C.candlestick_xohlc.h),localStorage.setItem("1moY_candlestick_l",C.candlestick_xohlc.l),localStorage.setItem("1moY_candlestick_c",C.candlestick_xohlc.c),localStorage.setItem("1moY_ma1",C.ma18.ma1),localStorage.setItem("1moY_ma2",C.ma18.ma2),localStorage.setItem("1moY_ma3",C.ma18.ma3),localStorage.setItem("1moY_ma4",C.ma18.ma4),localStorage.setItem("1moY_ma5",C.ma18.ma5),localStorage.setItem("1moY_ma6",C.ma18.ma6),localStorage.setItem("1moY_ma7",C.ma18.ma7),localStorage.setItem("1moY_ma8",C.ma18.ma8),localStorage.setItem("1moY_RSI1Chart",C.RSIChart.RSI1),localStorage.setItem("1moY_RSI2Chart",C.RSIChart.RSI2),localStorage.setItem("1moY_KChart",C.KDChart.K),localStorage.setItem("1moY_DChart",C.KDChart.D),localStorage.setItem("1moY_bias",C.BiasChart.bias),localStorage.setItem("1moY_biasav1",C.BiasChart.biasav1),localStorage.setItem("1moY_biasav2",C.BiasChart.biasav2),localStorage.setItem("1moY_DIFF",C.MACDFinalChart.DIFF),localStorage.setItem("1moY_MACD",C.MACDFinalChart.MACD),localStorage.setItem("1moY_DIFFMACD",C.MACDFinalChart.DIFFMACD),localStorage.setItem("1moY_LableList",C.LableList);break;case"F":localStorage.setItem("1moF_candlestick_x",C.candlestick_xohlc.x),localStorage.setItem("1moF_candlestick_o",C.candlestick_xohlc.o),localStorage.setItem("1moF_candlestick_h",C.candlestick_xohlc.h),localStorage.setItem("1moF_candlestick_l",C.candlestick_xohlc.l),localStorage.setItem("1moF_candlestick_c",C.candlestick_xohlc.c),localStorage.setItem("1moF_ma1",C.ma18.ma1),localStorage.setItem("1moF_ma2",C.ma18.ma2),localStorage.setItem("1moF_ma3",C.ma18.ma3),localStorage.setItem("1moF_ma4",C.ma18.ma4),localStorage.setItem("1moF_ma5",C.ma18.ma5),localStorage.setItem("1moF_ma6",C.ma18.ma6),localStorage.setItem("1moF_ma7",C.ma18.ma7),localStorage.setItem("1moF_ma8",C.ma18.ma8),localStorage.setItem("1moF_RSI1Chart",C.RSIChart.RSI1),localStorage.setItem("1moF_RSI2Chart",C.RSIChart.RSI2),localStorage.setItem("1moF_KChart",C.KDChart.K),localStorage.setItem("1moF_DChart",C.KDChart.D),localStorage.setItem("1moF_bias",C.BiasChart.bias),localStorage.setItem("1moF_biasav1",C.BiasChart.biasav1),localStorage.setItem("1moF_biasav2",C.BiasChart.biasav2),localStorage.setItem("1moF_DIFF",C.MACDFinalChart.DIFF),localStorage.setItem("1moF_MACD",C.MACDFinalChart.MACD),localStorage.setItem("1moF_DIFFMACD",C.MACDFinalChart.DIFFMACD),localStorage.setItem("1moF_LableList",C.LableList);break;case"S":localStorage.setItem("1moS_candlestick_x",C.candlestick_xohlc.x),localStorage.setItem("1moS_candlestick_o",C.candlestick_xohlc.o),localStorage.setItem("1moS_candlestick_h",C.candlestick_xohlc.h),localStorage.setItem("1moS_candlestick_l",C.candlestick_xohlc.l),localStorage.setItem("1moS_candlestick_c",C.candlestick_xohlc.c),localStorage.setItem("1moS_ma1",C.ma18.ma1),localStorage.setItem("1moS_ma2",C.ma18.ma2),localStorage.setItem("1moS_ma3",C.ma18.ma3),localStorage.setItem("1moS_ma4",C.ma18.ma4),localStorage.setItem("1moS_ma5",C.ma18.ma5),localStorage.setItem("1moS_ma6",C.ma18.ma6),localStorage.setItem("1moS_ma7",C.ma18.ma7),localStorage.setItem("1moS_ma8",C.ma18.ma8),localStorage.setItem("1moS_RSI1Chart",C.RSIChart.RSI1),localStorage.setItem("1moS_RSI2Chart",C.RSIChart.RSI2),localStorage.setItem("1moS_KChart",C.KDChart.K),localStorage.setItem("1moS_DChart",C.KDChart.D),localStorage.setItem("1moS_bias",C.BiasChart.bias),localStorage.setItem("1moS_biasav1",C.BiasChart.biasav1),localStorage.setItem("1moS_biasav2",C.BiasChart.biasav2),localStorage.setItem("1moS_DIFF",C.MACDFinalChart.DIFF),localStorage.setItem("1moS_MACD",C.MACDFinalChart.MACD),localStorage.setItem("1moS_DIFFMACD",C.MACDFinalChart.DIFFMACD),localStorage.setItem("1moS_LableList",C.LableList);break}var v="";v=this.interval!=null&&this.interval!=null?this.interval:"",localStorage.setItem("stockname",this.stockname),localStorage.setItem("stockno",this.stockNo),localStorage.setItem("interval",v);var I=-1,M=[],w=localStorage.getItem("stocklist");if(w!=null){M=JSON.parse(this.NullToString(localStorage.getItem("stocklist")));for(var k=0;k<M.length;k++){var D=M[k];if(D.stockno==this.stockNo){I=k,this.stockname!=""&&(M[k].stockname=this.stockname,this.stocklist[k].stockname=this.stockname);break}}}if(I==-1){var A={stockno:this.stockNo,stockname:this.stockname};M.push(A)}var L=JSON.stringify(M);localStorage.setItem("stocklist",L)}getLocalStorageData(i){var o=JSON.parse(this.NullToString(localStorage.getItem("stocklist"))),r=o.findIndex(Si=>Si.stockno=="");if(r==-1){var a=o.length,s={stockno:"",stockname:""};o[a]=s}var l=localStorage.getItem("stockno"),c=localStorage.getItem("stockname"),m=localStorage.getItem("interval");this.interval_change!=0&&(this.interval_change=0,m=this.interval),this.rptstockname=c??"";var p=localStorage.getItem("1dY_candlestick_x"),g=localStorage.getItem("1dY_candlestick_o"),_=localStorage.getItem("1dY_candlestick_h"),C=localStorage.getItem("1dY_candlestick_l"),v=localStorage.getItem("1dY_candlestick_c"),I=localStorage.getItem("1dY_ma1"),M=localStorage.getItem("1dY_ma2"),w=localStorage.getItem("1dY_ma3"),k=localStorage.getItem("1dY_ma4"),D=localStorage.getItem("1dY_ma5"),A=localStorage.getItem("1dY_ma6"),L=localStorage.getItem("1dY_ma7"),W=localStorage.getItem("1dY_ma8"),U=localStorage.getItem("1dY_RSI1Chart"),q=localStorage.getItem("1dY_RSI2Chart"),Q=localStorage.getItem("1dY_KChart"),et=localStorage.getItem("1dY_DChart"),$=localStorage.getItem("1dY_bias"),at=localStorage.getItem("1dY_biasav1"),lt=localStorage.getItem("1dY_biasav2"),j=localStorage.getItem("1dY_DIFF"),it=localStorage.getItem("1dY_MACD"),rt=localStorage.getItem("1dY_DIFFMACD"),ft=localStorage.getItem("1dY_LableList");switch(m=this.interval,m){case"1m":p=localStorage.getItem("1m_candlestick_x"),g=localStorage.getItem("1m_candlestick_o"),_=localStorage.getItem("1m_candlestick_h"),C=localStorage.getItem("1m_candlestick_l"),v=localStorage.getItem("1m_candlestick_c"),I=localStorage.getItem("1m_ma1"),M=localStorage.getItem("1m_ma2"),w=localStorage.getItem("1m_ma3"),k=localStorage.getItem("1m_ma4"),D=localStorage.getItem("1m_ma5"),A=localStorage.getItem("1m_ma6"),L=localStorage.getItem("1m_ma7"),W=localStorage.getItem("1m_ma8"),U=localStorage.getItem("1m_RSI1Chart"),q=localStorage.getItem("1m_RSI2Chart"),Q=localStorage.getItem("1m_KChart"),et=localStorage.getItem("1m_DChart"),$=localStorage.getItem("1m_bias"),at=localStorage.getItem("1m_biasav1"),lt=localStorage.getItem("1m_biasav2"),j=localStorage.getItem("1m_DIFF"),it=localStorage.getItem("1m_MACD"),rt=localStorage.getItem("1m_DIFFMACD"),ft=localStorage.getItem("1m_LableList");break;case"5m":p=localStorage.getItem("5m_candlestick_x"),g=localStorage.getItem("5m_candlestick_o"),_=localStorage.getItem("5m_candlestick_h"),C=localStorage.getItem("5m_candlestick_l"),v=localStorage.getItem("5m_candlestick_c"),I=localStorage.getItem("5m_ma1"),M=localStorage.getItem("5m_ma2"),w=localStorage.getItem("5m_ma3"),k=localStorage.getItem("5m_ma4"),D=localStorage.getItem("5m_ma5"),A=localStorage.getItem("5m_ma6"),L=localStorage.getItem("5m_ma7"),W=localStorage.getItem("5m_ma8"),U=localStorage.getItem("5m_RSI1Chart"),q=localStorage.getItem("5m_RSI2Chart"),Q=localStorage.getItem("5m_KChart"),et=localStorage.getItem("5m_DChart"),$=localStorage.getItem("5m_bias"),at=localStorage.getItem("5m_biasav1"),lt=localStorage.getItem("5m_biasav2"),j=localStorage.getItem("5m_DIFF"),it=localStorage.getItem("5m_MACD"),rt=localStorage.getItem("5m_DIFFMACD"),ft=localStorage.getItem("5m_LableList");break;case"10m":p=localStorage.getItem("10m_candlestick_x"),g=localStorage.getItem("10m_candlestick_o"),_=localStorage.getItem("10m_candlestick_h"),C=localStorage.getItem("10m_candlestick_l"),v=localStorage.getItem("10m_candlestick_c"),I=localStorage.getItem("10m_ma1"),M=localStorage.getItem("10m_ma2"),w=localStorage.getItem("10m_ma3"),k=localStorage.getItem("10m_ma4"),D=localStorage.getItem("10m_ma5"),A=localStorage.getItem("10m_ma6"),L=localStorage.getItem("10m_ma7"),W=localStorage.getItem("10m_ma8"),U=localStorage.getItem("10m_RSI1Chart"),q=localStorage.getItem("10m_RSI2Chart"),Q=localStorage.getItem("10m_KChart"),et=localStorage.getItem("10m_DChart"),$=localStorage.getItem("10m_bias"),at=localStorage.getItem("10m_biasav1"),lt=localStorage.getItem("10m_biasav2"),j=localStorage.getItem("10m_DIFF"),it=localStorage.getItem("10m_MACD"),rt=localStorage.getItem("10m_DIFFMACD"),ft=localStorage.getItem("10m_LableList");break;case"15m":p=localStorage.getItem("15m_candlestick_x"),g=localStorage.getItem("15m_candlestick_o"),_=localStorage.getItem("15m_candlestick_h"),C=localStorage.getItem("15m_candlestick_l"),v=localStorage.getItem("15m_candlestick_c"),I=localStorage.getItem("15m_ma1"),M=localStorage.getItem("15m_ma2"),w=localStorage.getItem("15m_ma3"),k=localStorage.getItem("15m_ma4"),D=localStorage.getItem("15m_ma5"),A=localStorage.getItem("15m_ma6"),L=localStorage.getItem("15m_ma7"),W=localStorage.getItem("15m_ma8"),U=localStorage.getItem("15m_RSI1Chart"),q=localStorage.getItem("15m_RSI2Chart"),Q=localStorage.getItem("15m_KChart"),et=localStorage.getItem("15m_DChart"),$=localStorage.getItem("15m_bias"),at=localStorage.getItem("15m_biasav1"),lt=localStorage.getItem("15m_biasav2"),j=localStorage.getItem("15m_DIFF"),it=localStorage.getItem("15m_MACD"),rt=localStorage.getItem("15m_DIFFMACD"),ft=localStorage.getItem("15m_LableList");break;case"20m":p=localStorage.getItem("20m_candlestick_x"),g=localStorage.getItem("20m_candlestick_o"),_=localStorage.getItem("20m_candlestick_h"),C=localStorage.getItem("20m_candlestick_l"),v=localStorage.getItem("20m_candlestick_c"),I=localStorage.getItem("20m_ma1"),M=localStorage.getItem("20m_ma2"),w=localStorage.getItem("20m_ma3"),k=localStorage.getItem("20m_ma4"),D=localStorage.getItem("20m_ma5"),A=localStorage.getItem("20m_ma6"),L=localStorage.getItem("20m_ma7"),W=localStorage.getItem("20m_ma8"),U=localStorage.getItem("20m_RSI1Chart"),q=localStorage.getItem("20m_RSI2Chart"),Q=localStorage.getItem("20m_KChart"),et=localStorage.getItem("20m_DChart"),$=localStorage.getItem("20m_bias"),at=localStorage.getItem("20m_biasav1"),lt=localStorage.getItem("20m_biasav2"),j=localStorage.getItem("20m_DIFF"),it=localStorage.getItem("20m_MACD"),rt=localStorage.getItem("20m_DIFFMACD"),ft=localStorage.getItem("20m_LableList");break;case"30m":p=localStorage.getItem("30m_candlestick_x"),g=localStorage.getItem("30m_candlestick_o"),_=localStorage.getItem("30m_candlestick_h"),C=localStorage.getItem("30m_candlestick_l"),v=localStorage.getItem("30m_candlestick_c"),I=localStorage.getItem("30m_ma1"),M=localStorage.getItem("30m_ma2"),w=localStorage.getItem("30m_ma3"),k=localStorage.getItem("30m_ma4"),D=localStorage.getItem("30m_ma5"),A=localStorage.getItem("30m_ma6"),L=localStorage.getItem("30m_ma7"),W=localStorage.getItem("30m_ma8"),U=localStorage.getItem("30m_RSI1Chart"),q=localStorage.getItem("30m_RSI2Chart"),Q=localStorage.getItem("30m_KChart"),et=localStorage.getItem("30m_DChart"),$=localStorage.getItem("30m_bias"),at=localStorage.getItem("30m_biasav1"),lt=localStorage.getItem("30m_biasav2"),j=localStorage.getItem("30m_DIFF"),it=localStorage.getItem("30m_MACD"),rt=localStorage.getItem("30m_DIFFMACD"),ft=localStorage.getItem("30m_LableList");break;case"60m":p=localStorage.getItem("60m_candlestick_x"),g=localStorage.getItem("60m_candlestick_o"),_=localStorage.getItem("60m_candlestick_h"),C=localStorage.getItem("60m_candlestick_l"),v=localStorage.getItem("60m_candlestick_c"),I=localStorage.getItem("60m_ma1"),M=localStorage.getItem("60m_ma2"),w=localStorage.getItem("60m_ma3"),k=localStorage.getItem("60m_ma4"),D=localStorage.getItem("60m_ma5"),A=localStorage.getItem("60m_ma6"),L=localStorage.getItem("60m_ma7"),W=localStorage.getItem("60m_ma8"),U=localStorage.getItem("60m_RSI1Chart"),q=localStorage.getItem("60m_RSI2Chart"),Q=localStorage.getItem("60m_KChart"),et=localStorage.getItem("60m_DChart"),$=localStorage.getItem("60m_bias"),at=localStorage.getItem("60m_biasav1"),lt=localStorage.getItem("60m_biasav2"),j=localStorage.getItem("60m_DIFF"),it=localStorage.getItem("60m_MACD"),rt=localStorage.getItem("60m_DIFFMACD"),ft=localStorage.getItem("60m_LableList");break;case"90m":p=localStorage.getItem("90m_candlestick_x"),g=localStorage.getItem("90m_candlestick_o"),_=localStorage.getItem("90m_candlestick_h"),C=localStorage.getItem("90m_candlestick_l"),v=localStorage.getItem("90m_candlestick_c"),I=localStorage.getItem("90m_ma1"),M=localStorage.getItem("90m_ma2"),w=localStorage.getItem("90m_ma3"),k=localStorage.getItem("90m_ma4"),D=localStorage.getItem("90m_ma5"),A=localStorage.getItem("90m_ma6"),L=localStorage.getItem("90m_ma7"),W=localStorage.getItem("90m_ma8"),U=localStorage.getItem("90m_RSI1Chart"),q=localStorage.getItem("90m_RSI2Chart"),Q=localStorage.getItem("90m_KChart"),et=localStorage.getItem("90m_DChart"),$=localStorage.getItem("90m_bias"),at=localStorage.getItem("90m_biasav1"),lt=localStorage.getItem("90m_biasav2"),j=localStorage.getItem("90m_DIFF"),it=localStorage.getItem("90m_MACD"),rt=localStorage.getItem("90m_DIFFMACD"),ft=localStorage.getItem("90m_LableList");break;case"1dY":p=localStorage.getItem("1dY_candlestick_x"),g=localStorage.getItem("1dY_candlestick_o"),_=localStorage.getItem("1dY_candlestick_h"),C=localStorage.getItem("1dY_candlestick_l"),v=localStorage.getItem("1dY_candlestick_c"),I=localStorage.getItem("1dY_ma1"),M=localStorage.getItem("1dY_ma2"),w=localStorage.getItem("1dY_ma3"),k=localStorage.getItem("1dY_ma4"),D=localStorage.getItem("1dY_ma5"),A=localStorage.getItem("1dY_ma6"),L=localStorage.getItem("1dY_ma7"),W=localStorage.getItem("1dY_ma8"),U=localStorage.getItem("1dY_RSI1Chart"),q=localStorage.getItem("1dY_RSI2Chart"),Q=localStorage.getItem("1dY_KChart"),et=localStorage.getItem("1dY_DChart"),$=localStorage.getItem("1dY_bias"),at=localStorage.getItem("1dY_biasav1"),lt=localStorage.getItem("1dY_biasav2"),j=localStorage.getItem("1dY_DIFF"),it=localStorage.getItem("1dY_MACD"),rt=localStorage.getItem("1dY_DIFFMACD"),ft=localStorage.getItem("1dY_LableList");break;case"1dF":p=localStorage.getItem("1dF_candlestick_x"),g=localStorage.getItem("1dF_candlestick_o"),_=localStorage.getItem("1dF_candlestick_h"),C=localStorage.getItem("1dF_candlestick_l"),v=localStorage.getItem("1dF_candlestick_c"),I=localStorage.getItem("1dF_ma1"),M=localStorage.getItem("1dF_ma2"),w=localStorage.getItem("1dF_ma3"),k=localStorage.getItem("1dF_ma4"),D=localStorage.getItem("1dF_ma5"),A=localStorage.getItem("1dF_ma6"),L=localStorage.getItem("1dF_ma7"),W=localStorage.getItem("1dF_ma8"),U=localStorage.getItem("1dF_RSI1Chart"),q=localStorage.getItem("1dF_RSI2Chart"),Q=localStorage.getItem("1dF_KChart"),et=localStorage.getItem("1dF_DChart"),$=localStorage.getItem("1dF_bias"),at=localStorage.getItem("1dF_biasav1"),lt=localStorage.getItem("1dF_biasav2"),j=localStorage.getItem("1dF_DIFF"),it=localStorage.getItem("1dF_MACD"),rt=localStorage.getItem("1dF_DIFFMACD"),ft=localStorage.getItem("1dF_LableList");break;case"1dS":p=localStorage.getItem("1dS_candlestick_x"),g=localStorage.getItem("1dS_candlestick_o"),_=localStorage.getItem("1dS_candlestick_h"),C=localStorage.getItem("1dS_candlestick_l"),v=localStorage.getItem("1dS_candlestick_c"),I=localStorage.getItem("1dS_ma1"),M=localStorage.getItem("1dS_ma2"),w=localStorage.getItem("1dS_ma3"),k=localStorage.getItem("1dS_ma4"),D=localStorage.getItem("1dS_ma5"),A=localStorage.getItem("1dS_ma6"),L=localStorage.getItem("1dS_ma7"),W=localStorage.getItem("1dS_ma8"),U=localStorage.getItem("1dS_RSI1Chart"),q=localStorage.getItem("1dS_RSI2Chart"),Q=localStorage.getItem("1dS_KChart"),et=localStorage.getItem("1dS_DChart"),$=localStorage.getItem("1dS_bias"),at=localStorage.getItem("1dS_biasav1"),lt=localStorage.getItem("1dS_biasav2"),j=localStorage.getItem("1dS_DIFF"),it=localStorage.getItem("1dS_MACD"),rt=localStorage.getItem("1dS_DIFFMACD"),ft=localStorage.getItem("1dS_LableList");break;case"1wkY":p=localStorage.getItem("1wkY_candlestick_x"),g=localStorage.getItem("1wkY_candlestick_o"),_=localStorage.getItem("1wkY_candlestick_h"),C=localStorage.getItem("1wkY_candlestick_l"),v=localStorage.getItem("1wkY_candlestick_c"),I=localStorage.getItem("1wkY_ma1"),M=localStorage.getItem("1wkY_ma2"),w=localStorage.getItem("1wkY_ma3"),k=localStorage.getItem("1wkY_ma4"),D=localStorage.getItem("1wkY_ma5"),A=localStorage.getItem("1wkY_ma6"),L=localStorage.getItem("1wkY_ma7"),W=localStorage.getItem("1wkY_ma8"),U=localStorage.getItem("1wkY_RSI1Chart"),q=localStorage.getItem("1wkY_RSI2Chart"),Q=localStorage.getItem("1wkY_KChart"),et=localStorage.getItem("1wkY_DChart"),$=localStorage.getItem("1wkY_bias"),at=localStorage.getItem("1wkY_biasav1"),lt=localStorage.getItem("1wkY_biasav2"),j=localStorage.getItem("1wkY_DIFF"),it=localStorage.getItem("1wkY_MACD"),rt=localStorage.getItem("1wkY_DIFFMACD"),ft=localStorage.getItem("1wkY_LableList");break;case"1wkF":p=localStorage.getItem("1wkF_candlestick_x"),g=localStorage.getItem("1wkF_candlestick_o"),_=localStorage.getItem("1wkF_candlestick_h"),C=localStorage.getItem("1wkF_candlestick_l"),v=localStorage.getItem("1wkF_candlestick_c"),I=localStorage.getItem("1wkF_ma1"),M=localStorage.getItem("1wkF_ma2"),w=localStorage.getItem("1wkF_ma3"),k=localStorage.getItem("1wkF_ma4"),D=localStorage.getItem("1wkF_ma5"),A=localStorage.getItem("1wkF_ma6"),L=localStorage.getItem("1wkF_ma7"),W=localStorage.getItem("1wkF_ma8"),U=localStorage.getItem("1wkF_RSI1Chart"),q=localStorage.getItem("1wkF_RSI2Chart"),Q=localStorage.getItem("1wkF_KChart"),et=localStorage.getItem("1wkF_DChart"),$=localStorage.getItem("1wkF_bias"),at=localStorage.getItem("1wkF_biasav1"),lt=localStorage.getItem("1wkF_biasav2"),j=localStorage.getItem("1wkF_DIFF"),it=localStorage.getItem("1wkF_MACD"),rt=localStorage.getItem("1wkF_DIFFMACD"),ft=localStorage.getItem("1wkF_LableList");break;case"1wkS":p=localStorage.getItem("1wkS_candlestick_x"),g=localStorage.getItem("1wkS_candlestick_o"),_=localStorage.getItem("1wkS_candlestick_h"),C=localStorage.getItem("1wkS_candlestick_l"),v=localStorage.getItem("1wkS_candlestick_c"),I=localStorage.getItem("1wkS_ma1"),M=localStorage.getItem("1wkS_ma2"),w=localStorage.getItem("1wkS_ma3"),k=localStorage.getItem("1wkS_ma4"),D=localStorage.getItem("1wkS_ma5"),A=localStorage.getItem("1wkS_ma6"),L=localStorage.getItem("1wkS_ma7"),W=localStorage.getItem("1wkS_ma8"),U=localStorage.getItem("1wkS_RSI1Chart"),q=localStorage.getItem("1wkS_RSI2Chart"),Q=localStorage.getItem("1wkS_KChart"),et=localStorage.getItem("1wkS_DChart"),$=localStorage.getItem("1wkS_bias"),at=localStorage.getItem("1wkS_biasav1"),lt=localStorage.getItem("1wkS_biasav2"),j=localStorage.getItem("1wkS_DIFF"),it=localStorage.getItem("1wkS_MACD"),rt=localStorage.getItem("1wkS_DIFFMACD"),ft=localStorage.getItem("1wkS_LableList");break;case"1moY":p=localStorage.getItem("1moY_candlestick_x"),g=localStorage.getItem("1moY_candlestick_o"),_=localStorage.getItem("1moY_candlestick_h"),C=localStorage.getItem("1moY_candlestick_l"),v=localStorage.getItem("1moY_candlestick_c"),I=localStorage.getItem("1moY_ma1"),M=localStorage.getItem("1moY_ma2"),w=localStorage.getItem("1moY_ma3"),k=localStorage.getItem("1moY_ma4"),D=localStorage.getItem("1moY_ma5"),A=localStorage.getItem("1moY_ma6"),L=localStorage.getItem("1moY_ma7"),W=localStorage.getItem("1moY_ma8"),U=localStorage.getItem("1moY_RSI1Chart"),q=localStorage.getItem("1moY_RSI2Chart"),Q=localStorage.getItem("1moY_KChart"),et=localStorage.getItem("1moY_DChart"),$=localStorage.getItem("1moY_bias"),at=localStorage.getItem("1moY_biasav1"),lt=localStorage.getItem("1moY_biasav2"),j=localStorage.getItem("1moY_DIFF"),it=localStorage.getItem("1moY_MACD"),rt=localStorage.getItem("1moY_DIFFMACD"),ft=localStorage.getItem("1moY_LableList");break;case"1moF":p=localStorage.getItem("1moF_candlestick_x"),g=localStorage.getItem("1moF_candlestick_o"),_=localStorage.getItem("1moF_candlestick_h"),C=localStorage.getItem("1moF_candlestick_l"),v=localStorage.getItem("1moF_candlestick_c"),I=localStorage.getItem("1moF_ma1"),M=localStorage.getItem("1moF_ma2"),w=localStorage.getItem("1moF_ma3"),k=localStorage.getItem("1moF_ma4"),D=localStorage.getItem("1moF_ma5"),A=localStorage.getItem("1moF_ma6"),L=localStorage.getItem("1moF_ma7"),W=localStorage.getItem("1moF_ma8"),U=localStorage.getItem("1moF_RSI1Chart"),q=localStorage.getItem("1moF_RSI2Chart"),Q=localStorage.getItem("1moF_KChart"),et=localStorage.getItem("1moF_DChart"),$=localStorage.getItem("1moF_bias"),at=localStorage.getItem("1moF_biasav1"),lt=localStorage.getItem("1moF_biasav2"),j=localStorage.getItem("1moF_DIFF"),it=localStorage.getItem("1moF_MACD"),rt=localStorage.getItem("1moF_DIFFMACD"),ft=localStorage.getItem("1moF_LableList");break;case"1moS":p=localStorage.getItem("1moS_candlestick_x"),g=localStorage.getItem("1moS_candlestick_o"),_=localStorage.getItem("1moS_candlestick_h"),C=localStorage.getItem("1moS_candlestick_l"),v=localStorage.getItem("1moS_candlestick_c"),I=localStorage.getItem("1moS_ma1"),M=localStorage.getItem("1moS_ma2"),w=localStorage.getItem("1moS_ma3"),k=localStorage.getItem("1moS_ma4"),D=localStorage.getItem("1moS_ma5"),A=localStorage.getItem("1moS_ma6"),L=localStorage.getItem("1moS_ma7"),W=localStorage.getItem("1moS_ma8"),U=localStorage.getItem("1moS_RSI1Chart"),q=localStorage.getItem("1moS_RSI2Chart"),Q=localStorage.getItem("1moS_KChart"),et=localStorage.getItem("1moS_DChart"),$=localStorage.getItem("1moS_bias"),at=localStorage.getItem("1moS_biasav1"),lt=localStorage.getItem("1moS_biasav2"),j=localStorage.getItem("1moS_DIFF"),it=localStorage.getItem("1moS_MACD"),rt=localStorage.getItem("1moS_DIFFMACD"),ft=localStorage.getItem("1moS_LableList");break}if(p!=""){if(i==null&&(i=0),i!=null){var qe=this.LableList.length,Le=10,ct=qe,ae=ft==null?0:ft.length;i==0?ct=140:i==9?ct=ae:i==1?(ct=qe-Le,ct=ct<30?30:ct):i==-1&&(ct=qe+Le,ct=ct>ae?ae:ct),p=this.DataResize(p,ct),g=this.DataResize(g,ct),_=this.DataResize(_,ct),C=this.DataResize(C,ct),v=this.DataResize(v,ct),I=this.DataResize(I,ct),M=this.DataResize(M,ct),w=this.DataResize(w,ct),k=this.DataResize(k,ct),D=this.DataResize(D,ct),A=this.DataResize(A,ct),L=this.DataResize(L,ct),W=this.DataResize(W,ct),U=this.DataResize(U,ct),q=this.DataResize(q,ct),Q=this.DataResize(Q,ct),et=this.DataResize(et,ct),$=this.DataResize($,ct),at=this.DataResize(at,ct),lt=this.DataResize(lt,ct),j=this.DataResize(j,ct),it=this.DataResize(it,ct),rt=this.DataResize(rt,ct),ft=this.DataResize(ft,ct)}if(this.funcBClick==0){if(this.stocklist==null&&(this.stocklist=o),this.stocklist.length!=o.length){var be=o.at(-1);(be.stockname==null||be.stockname=="")&&this.stockname!=""&&(be.stockname=this.stockname),this.stocklist.push(be)}this.stockNo=this.NullToString(l),this.stockname=this.NullToString(c)}this.interval=m,this.intervalLast=this.NullToString(this.interval),p=p??"";var te=this.stringToArrayLable(p);g=g??"";var Cn=this.stringToArray(g);_=_??"";var xn=this.stringToArray(_);C=C??"";var xi=this.stringToArray(C);v=v??"";var Qt=this.stringToArray(v);this.PriceList=[],this.PriceList=this.GetCandleStickPriceList(te,Cn,xn,xi,Qt),this.financialChartData.datasets[0].data=this.PriceList,I=I??"",this.ma1=[],this.ma1=this.stringToArray(I),this.financialChartData.datasets[1].data=this.GetCandleStickMAList(te,this.ma1),M=M??"",this.ma2=[],this.ma2=this.stringToArray(M),this.financialChartData.datasets[2].data=this.GetCandleStickMAList(te,this.ma2),w=w??"",this.ma3=[],this.ma3=this.stringToArray(w),this.financialChartData.datasets[3].data=this.GetCandleStickMAList(te,this.ma3),k=k??"",this.ma4=[],this.ma4=this.stringToArray(k),this.financialChartData.datasets[4].data=this.GetCandleStickMAList(te,this.ma4),D=D??"",this.ma5=[],this.ma5=this.stringToArray(D),this.financialChartData.datasets[5].data=this.GetCandleStickMAList(te,this.ma5);for(var Mt=[],se=0;se<250;se++)Mt.push(se);A=A??"",this.ma6=[],this.ma6=this.stringToArray(A),this.financialChartData.datasets[6].data=this.GetCandleStickMAList(te,this.ma6),L=L??"",this.ma7=[],this.ma7=this.stringToArray(L),this.financialChartData.datasets[7].data=this.GetCandleStickMAList(te,this.ma7),W=W??"",this.ma8=[],this.ma8=this.stringToArray(W),this.financialChartData.datasets[8].data=this.GetCandleStickMAList(te,this.ma8);var Yn=te.at(-1)?.toString();this.lastUpdateTime=Yn??"",this.lablepnow=Qt.at(-1).toString(),this.lablema1="MA1: "+this.ma1.at(-1),this.lablema2="MA2: "+this.ma2.at(-1),this.lablema3="MA3: "+this.ma3.at(-1),this.lablema4="MA4: "+this.ma4.at(-1),this.lablema5="MA5: "+this.ma5.at(-1),this.lablema6="MA6: "+this.ma6.at(-1),this.lablema7="MA7: "+this.ma7.at(-1),this.lablema8="MA8: "+this.ma8.at(-1),this.financialChartData.datasets[0].label=this.lablepnow,this.financialChartData.datasets[1].label=this.lablema1,this.financialChartData.datasets[2].label=this.lablema2,this.financialChartData.datasets[3].label=this.lablema3,this.financialChartData.datasets[4].label=this.lablema4,this.financialChartData.datasets[5].label=this.lablema5,this.financialChartData.datasets[6].label=this.lablema6,this.financialChartData.datasets[7].label=this.lablema7,this.financialChartData.datasets[8].label=this.lablema8,U=U??"",this.RSI1Chart=[],this.RSI1Chart=this.stringToArray(U),this.RSIlineChartData.datasets[0].data=this.RSI1Chart,q=q??"",this.RSI2Chart=[],this.RSI2Chart=this.stringToArray(q),this.RSIlineChartData.datasets[1].data=this.RSI2Chart,this.lableRSI1="RSI1: "+this.RSI1Chart.at(-1),this.lableRSI2="RSI2: "+this.RSI2Chart.at(-1),this.RSIlineChartData.datasets[0].label=this.lableRSI1,this.RSIlineChartData.datasets[1].label=this.lableRSI2,Q=Q??"",this.KChart=[],this.KChart=this.stringToArray(Q),this.KDlineChartData.datasets[0].data=this.KChart,et=et??"",this.DChart=[],this.DChart=this.stringToArray(et),this.KDlineChartData.datasets[1].data=this.DChart,this.lableK="K: "+this.KChart.at(-1),this.lableD="D: "+this.DChart.at(-1),this.KDlineChartData.datasets[0].label=this.lableK,this.KDlineChartData.datasets[1].label=this.lableD,$=$??"",this.bias=[],this.bias=this.stringToArray($),this.BiaslineChartData.datasets[0].data=this.bias,at=at??"",this.biasav1=[],this.biasav1=this.stringToArray(at),this.BiaslineChartData.datasets[1].data=this.biasav1,lt=lt??"",this.biasav2=[],this.biasav2=this.stringToArray(lt),this.BiaslineChartData.datasets[2].data=this.biasav2,this.lablebias="bias: "+this.bias.at(-1),this.lablebiasav1="biasav1: "+this.biasav1.at(-1),this.lablebiasav2="biasav2: "+this.biasav2.at(-1),this.BiaslineChartData.datasets[0].label=this.lablebias,this.BiaslineChartData.datasets[1].label=this.lablebiasav1,this.BiaslineChartData.datasets[2].label=this.lablebiasav2,j=j??"",this.DIFFChart=[],this.DIFFChart=this.stringToArray(j),this.MACDlineChartData.datasets[0].data=this.DIFFChart,it=it??"",this.MACDChart=[],this.MACDChart=this.stringToArray(it),this.MACDlineChartData.datasets[1].data=this.MACDChart,rt=rt??"",this.DIFFMACDChart=[],this.DIFFMACDChart=this.stringToArray(rt),this.MACDlineChartData.datasets[2].data=this.DIFFMACDChart,this.lableDIFF=this.DIFFChart.at(-1),this.lableMACD=this.MACDChart.at(-1),this.lableDIFFMACD=this.DIFFMACDChart.at(-1),this.MACDlineChartData.datasets[0].label=this.lableDIFF,this.MACDlineChartData.datasets[1].label=this.lableMACD,this.MACDlineChartData.datasets[2].label=this.lableDIFFMACD,ft=ft??"",this.LableList=[],this.LableList=this.stringToArrayLable(ft),this.BiaslineChartData.labels=this.LableList,this.KDlineChartData.labels=this.LableList,this.RSIlineChartData.labels=this.LableList,this.MACDlineChartData.labels=this.LableList,this.financialChartData.labels=this.LableList,this.charts?.forEach(Si=>{Si.chart?.update()})}}DataResize(i,o){var r=this.stringToArrayLable(i),a=[];if(r.length>o)for(var s=r.length-o;s<r.length;s++)a.push(r[s]);else a=r;var l=a.toString();return l}GetCandleStickMAList(i,o){for(var r=[],a=0;a<i.length;a++){var s=new qc;s.x=+kn(i[a]),s.y=o[a]>0?Number(o[a]):void 0,r.push(s)}return r}GetCandleStickPriceList(i,o,r,a,s){for(var l=[],c=0;c<i.length;c++){var m=new Uc;m.x=+kn(i[c]),m.o=Number(o[c]),m.h=Number(r[c]),m.l=Number(a[c]),m.c=Number(s[c]),l.push(m)}return l}stringToArray(i){var o=[],r="";do{var a=i.indexOf(",");a<0?(a=i.length,r=i.substring(0,a),i=""):(r=i.substring(0,a),i=i.substring(a+1,i.length)),o.push(parseFloat(r))}while(i.length>0);return o}stringToArrayLable(i){var o=[],r="";do{var a=i.indexOf(",");a<0?(a=i.length,r=i.substring(0,a),i=""):(r=i.substring(0,a),i=i.substring(a+1,i.length)),o.push(r)}while(i.length>0);return o}tick(){this.counter+=1;var i=setTimeout(()=>{this.tick()},1e3);this.qryStockFinish==1&&clearTimeout(i)}qryStock(){this.dataSource="",this.qryStockFinish=0,this.counter=0,this.tick(),this.intervalLast=this.NullToString(this.interval);var i=this.interval!=null?this.interval:"1d";i.indexOf("Y")!=-1&&(i=i?.substring(0,i.indexOf("Y"))),i.indexOf("F")!=-1&&(i=i?.substring(0,i.indexOf("F"))),i.indexOf("S")!=-1&&(i=i?.substring(0,i.indexOf("S")));var o=this.global.serverip+"/api/twse/qryStockMainEntry",r={stockNo:this.stockNo,interval:i,source:"Y"};this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D");var a=new Promise((l,c)=>{this.auth.httpDo(o,r).then(m=>{this.toastr.clear(),this.dataSource=m.dataSource,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"+this.dataSource);var p=0;(this.StocknoChange==1||p==1)&&(this.localstorageReset(),this.StocknoChange=0),this.setLocalstorage(m),this.getLocalStorageData(null),l(!0)},m=>{c(!1)})});if(this.interval?.indexOf("d")!=-1){var r={stockNo:this.stockNo,interval:i,source:"F"};this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u4E2D");var a=new Promise((m,p)=>{this.auth.httpDo(o,r).then(g=>{this.toastr.clear(),this.dataSource=g.dataSource,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"+this.dataSource);var _=0;(this.StocknoChange==1||_==1)&&(this.localstorageReset(),this.StocknoChange=0),this.setLocalstorage(g),this.getLocalStorageData(null),m(!0)},g=>{p(!1)})})}if(this.interval?.indexOf("d")!=-1||this.interval?.indexOf("wk")!=-1||this.interval.indexOf("mo")!=-1){this.qryStockFinish=1;return}r={stockNo:this.stockNo,interval:i,source:"S"},this.goQry=1;var s=new Promise((l,c)=>{this.auth.httpDo(o,r).then(m=>{this.toastr.clear(),this.dataSource=m.dataSource,this.toastr.info("\u8CC7\u6599\u67E5\u8A62\u5B8C\u6210"+this.dataSource),this.qryStockFinish=1;var p=0;m.stockno!=this.stockNo&&this.goQry==1||(this.goQry=0,(this.StocknoChange==1||p==1)&&(this.localstorageReset(),this.StocknoChange=0),this.setLocalstorage(m),this.getLocalStorageData(null),l(!0))},m=>{c(!1)})})}MakeCandleStickColor(){}randomNumber(i,o){return Math.random()*(o-i)+i}randomBar(i,o){let r=this.randomNumber(o*.95,o*1.05),a=this.randomNumber(r*.95,r*1.05),s=this.randomNumber(Math.max(r,a),Math.max(r,a)*1.1),l=this.randomNumber(Math.min(r,a)*.9,Math.min(r,a));return{x:+i,o:r,h:s,l,c:a}}getRandomData(i,o){let r=kn(i),a=[this.randomBar(r,30)];for(;a.length<o;)r=la(r,{days:1}),r.getDay()<=5&&a.push(this.randomBar(r,a[a.length-1].c));return a}update(){this.financialChartType=this.financialChartType==="candlestick"?"ohlc":"candlestick"}financialChartHovered({event:i,active:o}){}RSIchartClicked({event:i,active:o}){}RSIchartHovered({event:i,active:o}){}KDchartClicked({event:i,active:o}){}KDchartHovered({event:i,active:o}){}static generateNumber(i){return Math.floor(Math.random()*(i<2?100:1e3)+1)}randomize(){for(let i=0;i<this.BiaslineChartData.datasets.length;i++)for(let o=0;o<this.BiaslineChartData.datasets[i].data.length;o++)this.BiaslineChartData.datasets[i].data[o]=e.generateNumber(i);this.charts?.forEach(i=>{i.chart?.update()})}BiaschartClicked({event:i,active:o}){}BiaschartHovered({event:i,active:o}){}MACDchartClicked({event:i,active:o}){}MACDchartHovered({event:i,active:o}){}getImgFiles(){var i="heart";this.media.getMedia(i,"images").then(o=>{this.heartImg=o})}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(Me),z(wt),z(fp),z(zc),z(mr))},e.\u0275cmp=_t({type:e,selectors:[["app-bias"]],viewQuery:function(o,r){if(o&1&&vi(is,5),o&2){let a;Ii(a=Pi())&&(r.charts=a)}},decls:42,vars:20,consts:[[1,"cursor"],[1,"vt"],[1,"hl"],[3,"ngModelChange","change","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value","selected",4,"ngFor","ngForOf"],["type","text",2,"width","35px",3,"ngModelChange","keydown.enter","change","ngModel"],["type","text",2,"width","60px",3,"ngModelChange","ngModel"],[1,"button",3,"click"],[2,"margin-left","5px","border","none"],[2,"margin-left","1px","border","none"],[2,"margin-left","50px",3,"click"],[2,"color","red",3,"click"],[2,"float","right",3,"click"],[3,"click"],[2,"margin-left","5px","width","12px","height","12px",3,"src"],[4,"ngIf"],[3,"value"],[3,"value","selected"],[2,"height","50%"],["baseChart","","height","650",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","height","130",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"],["baseChart","","height","400",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","height","75",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"],["baseChart","","height","320",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","height","25",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"],[2,"width","50%","height","50%","float","left"],["baseChart","","width","200","height","700",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","width","200","height","50",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"],[2,"height","600px"],["baseChart","",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","height","50",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"],["baseChart","","width","200","height","950",1,"chart","chartlocal",3,"chartHover","data","options","type"],["baseChart","","width","200","height","70",1,"chart","chartlocal",3,"chartHover","chartClick","data","options","type"]],template:function(o,r){o&1&&(d(0,"div",0),F(1,"div",1)(2,"div",2),u(),d(3,"select",3),V("ngModelChange",function(s){return N(r.interval,s)||(r.interval=s),s}),P("change",function(){return r.intervalChange()}),E(4,CM,2,2,"option",4),u(),d(5,"select",3),V("ngModelChange",function(s){return N(r.stockNo,s)||(r.stockNo=s),s}),P("change",function(){return r.stocknoChange()}),E(6,xM,2,4,"option",5),u(),d(7,"input",6),V("ngModelChange",function(s){return N(r.stockNo,s)||(r.stockNo=s),s}),P("keydown.enter",function(){return r.qryStock()})("change",function(){return r.stocknoChange()}),u(),d(8,"input",7),V("ngModelChange",function(s){return N(r.stockname,s)||(r.stockname=s),s}),u(),d(9,"span",8),P("click",function(){return r.stocklistChangeIndex("U")}),h(10,"\u4E0A"),u(),d(11,"span",8),P("click",function(){return r.stocklistChangeIndex("D")}),h(12,"\u4E0B"),u(),d(13,"span",9),h(14),u(),d(15,"span",10),h(16),u(),d(17,"button",11),P("click",function(){return r.changeDMode()}),h(18),u(),d(19,"button",12),P("click",function(){return r.qryStock()}),h(20,"\u66F4\u65B0\u8CC7\u6599"),u(),d(21,"button",13),P("click",function(){return r.deleteStockListItem(r.stockNo)}),h(22,"\u522A\u9664\u8A18\u9304"),u(),d(23,"div"),h(24),u(),d(25,"div")(26,"button",14),P("click",function(){return r.funcBClick=1,r.getLocalStorageData(0)}),h(27,"reset"),u(),d(28,"button",14),P("click",function(){return r.funcBClick=1,r.getLocalStorageData(9)}),h(29,"max"),u(),d(30,"button",14),P("click",function(){return r.funcBClick=1,r.getLocalStorageData(1)}),h(31,"+"),u(),d(32,"button",14),P("click",function(){return r.funcBClick=1,r.getLocalStorageData(-1)}),h(33,"-"),u(),F(34,"img",15),u(),d(35,"div"),E(36,SM,11,15,"div",16)(37,bM,11,15,"div",16)(38,yM,11,15,"div",16)(39,vM,11,15,"div",16)(40,IM,11,15,"div",16)(41,PM,11,15,"div",16),u()),o&2&&(f(3),B("ngModel",r.interval),f(),S("ngForOf",r.intervals),f(),B("ngModel",r.stockNo),f(),S("ngForOf",r.stocklist),f(),B("ngModel",r.stockNo),f(),B("ngModel",r.stockname),f(6),T(r.counter),f(2),T(r.dataSource),f(2),vt("\u986F\u793A\u6A21\u5F0F",r.DisplayMode,""),f(6),Un("",r.intervalLast,", ",r.stockNo,", ",r.rptstockname,", \u6700\u5F8C\u6642\u9593\uFF1A",r.lastUpdateTime,""),f(10),S("src",r.heartImg,ar),f(2),S("ngIf",r.DisplayMode==0),f(),S("ngIf",r.DisplayMode==1),f(),S("ngIf",r.DisplayMode==2),f(),S("ngIf",r.DisplayMode==3),f(),S("ngIf",r.DisplayMode==4),f(),S("ngIf",r.DisplayMode==5))},dependencies:[Dt,Nt,Wt,Ht,jt,Rt,Vt,Lt,is],styles:[".cursor[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1;pointer-events:none}.vt[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:1px;background:red}.hl[_ngcontent-%COMP%]{position:absolute;height:1px;left:0;right:0;background:red}span[_ngcontent-%COMP%]{display:inline-block;width:15px;border:1px solid darkgray;font-size:10px;padding:auto;border-radius:2px}.m1[_ngcontent-%COMP%]{height:20px}.m2[_ngcontent-%COMP%]{height:30px}.m3[_ngcontent-%COMP%]{height:40px}.m4[_ngcontent-%COMP%]{height:50px}.chartlocal[_ngcontent-%COMP%]{height:30}@media only screen and (max-width: 500px){.chartlocal[_ngcontent-%COMP%]{height:100}}"]});let n=e;return n})();var _p=(()=>{let e=class e{constructor(){this.barcode="11310CD123497084758",this.qrcode_left="CD1234970811310034758000010cc000011a30000000012345678Y7IWhbRf0JWQi4tgUHmlQA==:**********:1:1:0:",this.qrcode_right="**\u6E2C\u8A66\u5F71\u97F3\u5546\u54C11:1:4515"}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=_t({type:e,selectors:[["app-invoice-form"]],decls:14,vars:0,consts:[[1,"invoice-container"],[1,"transaction-details"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"h2"),h(2,"\u96FB\u5B50\u767C\u7968\u8B49\u660E\u806F"),u(),d(3,"p"),h(4,"108\u5E7401-02\u6708"),u(),d(5,"h3"),h(6,"AB-11223344"),u(),d(7,"div",1)(8,"p"),h(9,"\u96A8\u6A5F\u78BC: 9999 \u7D71\u4E00\u7DE8\u865F: 12345678"),u(),d(10,"p"),h(11,"\u8CB7\u65B9: 09876543 \u8CE3\u65B9: 87654321"),u()(),d(12,"p"),h(13,"\u54C1\u540D\u3001\u6578\u91CF\u3001\u55AE\u50F9\u3001\u91D1\u984D\u3001\u7E3D\u8A08\u7B49"),u()())},styles:[".invoice-container[_ngcontent-%COMP%]{width:5.7cm;height:9cm;border:1px solid black;padding:10px}.transaction-details[_ngcontent-%COMP%], .qr-codes[_ngcontent-%COMP%]{margin-top:10px}.qr-codes[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]});let n=e;return n})();function MM(n,e){if(n&1&&(d(0,"span",11),h(1),u()),n&2){let t=e.$implicit;f(),Un(" ",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName," ",t.Note," ")}}function wM(n,e){if(n&1&&(d(0,"span",11),h(1),u()),n&2){let t=e.$implicit;f(),Un(" ",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName," ",t.Note," ")}}function TM(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),ee(3,"date"),u(),d(4,"td")(5,"a",9),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.gotoAVBill(o.AVM.AvbillId))}),h(6),u()(),d(7,"td"),h(8),u(),d(9,"td"),E(10,MM,2,4,"span",10),u(),d(11,"td"),E(12,wM,2,4,"span",10),u()()}if(n&2){let t=e.$implicit,i=x(2);f(2),T(ne(3,5,t.AVM.Avdate,"yyyy-MM-dd")),f(4),T(t.AVM.AvbillId),f(2),T(i.getPayAmountInD(t.AVDSs)),f(2),S("ngForOf",i.getFilteredPaymentsInC(t.AVDSs)),f(2),S("ngForOf",i.getFilteredPaymentsInD(t.AVDSs))}}function AM(n,e){if(n&1){let t=O();d(0,"div",3)(1,"div")(2,"span"),h(3,"\u4ED8\u6B3E\u65E5\u671F\uFF1A"),d(4,"input",4),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryPayDate,o)||(r.qryPayDate=o),y(o)}),u()(),d(5,"span"),h(6,"\u4ED8\u6B3E\u91D1\u984D\uFF1A"),d(7,"input",5),V("ngModelChange",function(o){b(t);let r=x();return N(r.qryPayAmount,o)||(r.qryPayAmount=o),y(o)}),u()(),d(8,"button",6),P("click",function(){b(t);let o=x();return y(o.qryPaymentList())}),h(9,"\u67E5\u8A62"),u()(),d(10,"table",7)(11,"tr")(12,"td"),h(13,"\u4ED8\u6B3E\u65E5\u671F"),u(),d(14,"td"),h(15,"\u6703\u8A08\u50B3\u7968\u7DE8\u865F"),u(),d(16,"td"),h(17,"\u4ED8\u6B3E\u91D1\u984D"),u(),d(18,"td"),h(19,"\u652F\u4ED8\u65B9\u5F0F"),u(),d(20,"td"),h(21,"\u652F\u4ED8\u660E\u7D30"),u()(),E(22,TM,13,8,"tr",8),u()()}if(n&2){let t=x();f(4),B("ngModel",t.qryPayDate),f(3),B("ngModel",t.qryPayAmount),f(15),S("ngForOf",t.PaymentList)}}function DM(n,e){if(n&1&&(d(0,"option",27),h(1),u()),n&2){let t=e.$implicit;Oc("value","",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName,""),f(),me("",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName,"")}}function kM(n,e){if(n&1){let t=O();d(0,"select",16),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.PayType,o)||(r.PayType=o),y(o)}),P("change",function(){b(t);let o=x(3);return y(o.CheckPayType())}),E(1,DM,2,7,"option",26),u()}if(n&2){let t=x(3);B("ngModel",t.PayType),f(),S("ngForOf",t.PayMethod)}}function OM(n,e){if(n&1&&(d(0,"option",27),h(1),u()),n&2){let t=e.$implicit;kc("value","",t.VenderNo,"",t.VenderShortName,""),f(),At("",t.VenderNo,"",t.VenderShortName,"")}}function EM(n,e){if(n&1){let t=O();d(0,"select",28),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.PayVender,o)||(r.PayVender=o),y(o)}),P("change",function(){b(t);let o=x(3);return y(o.ModifyAccountPayableSubAccount())}),F(1,"option",29),E(2,OM,2,5,"option",26),u()}if(n&2){let t=x(3);B("ngModel",t.PayVender),f(2),S("ngForOf",t.Venders)}}function FM(n,e){if(n&1){let t=O();d(0,"input",30),V("ngModelChange",function(o){b(t);let r=x(3);return N(r.VenderName,o)||(r.VenderName=o),y(o)}),P("change",function(){b(t);let o=x(3);return y(o.checkIfAddToVender())}),u()}if(n&2){let t=x(3);B("ngModel",t.VenderName)}}function BM(n,e){if(n&1){let t=O();d(0,"span")(1,"span"),h(2,"\u4ED8\u6B3E\u65B9\u5F0F\uFF1A"),u(),E(3,kM,2,2,"select",19)(4,EM,3,2,"select",23),d(5,"input",24),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.VenderNo,o)||(r.VenderNo=o),y(o)}),u(),E(6,FM,1,1,"input",25),u()}if(n&2){let t=x(2);f(3),S("ngIf",t.showPayTypeSelect),f(),S("ngIf",t.ShowPayVender),f(),B("ngModel",t.VenderNo),f(),S("ngIf",t.ShowPayVender==!0&&t.PayVender=="")}}function NM(n,e){if(n&1){let t=O();d(0,"span")(1,"input",31),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayType,o)||(r.PayType=o),y(o)}),u()()}if(n&2){let t=x(2);f(),B("ngModel",t.PayType)}}function VM(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td")(8,"button",6),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.deletePayDetail(o))}),h(9,"\u522A\u9664"),u()()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),T(t.PayType),f(2),T(t.PayAmount)}}function LM(n,e){if(n&1&&(d(0,"option",32),h(1),u()),n&2){let t=e.$implicit;S("ngValue",t),f(),me("",t.AccountNo,"-",t.SubAccountNo," ",t.AccountName,"")}}function RM(n,e){if(n&1){let t=O();d(0,"input",33),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayItemContent,o)||(r.PayItemContent=o),y(o)}),u()}if(n&2){let t=x(2);B("ngModel",t.PayItemContent)}}function WM(n,e){if(n&1&&(d(0,"option",32),h(1),u()),n&2){let t=e.$implicit;S("ngValue",t),f(),T(t.ProdName)}}function HM(n,e){if(n&1){let t=O();d(0,"select",16),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.PayItemContent,o)||(r.PayItemContent=o),y(o)}),P("change",function(){b(t);let o=x(2);return y(o.SetStockTheGoodDS(o.PayItemContent))}),E(1,WM,2,2,"option",17),u()}if(n&2){let t=x(2);B("ngModel",t.PayItemContent),f(),S("ngForOf",t.ProductItems)}}function GM(n,e){if(n&1){let t=O();d(0,"span"),h(1,"\u6578\u91CF\uFF1A"),d(2,"input",34),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.ProductItemQty,o)||(r.ProductItemQty=o),y(o)}),P("focus",function(o){b(t);let r=x(2);return y(r.onFocus(o))}),u(),h(3,"\u500B\uFF0C"),u()}if(n&2){let t=x(2);f(2),B("ngModel",t.ProductItemQty)}}function YM(n,e){if(n&1&&(d(0,"option",32),h(1),u()),n&2){let t=e.$implicit;S("ngValue",t),f(),T(t.VenderShortName)}}function UM(n,e){if(n&1&&(d(0,"select"),E(1,YM,2,2,"option",17),u()),n&2){let t=x(3);f(),S("ngForOf",t.Venders)}}function qM(n,e){if(n&1){let t=O();d(0,"span"),h(1," \u4F9B\u61C9\u5546\uFF1A"),E(2,UM,2,1,"select",13),d(3,"input",24),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.VenderNo,o)||(r.VenderNo=o),y(o)}),u(),d(4,"input",35),V("ngModelChange",function(o){b(t);let r=x(2);return N(r.VenderName,o)||(r.VenderName=o),y(o)}),P("change",function(){b(t);let o=x(2);return y(o.qryVender())}),u()()}if(n&2){let t=x(2);f(2),S("ngIf",t.ShowPayVender==!0),f(),B("ngModel",t.VenderNo),f(),B("ngModel",t.VenderName)}}function zM(n,e){if(n&1){let t=O();d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td")(10,"button",6),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.deletePayItemDetail(o))}),h(11,"\u522A\u9664"),u()()()}if(n&2){let t=e.$implicit,i=e.index;f(2),T(i+1),f(2),At("",t.PayItemAccountNo,"",t.PayItemAccountName,""),f(2),T(t.PayItemContent),f(2),T(t.PayItemAmount)}}function jM(n,e){if(n&1&&(d(0,"div",36),h(1),u()),n&2){let t=x(2);f(),vt("\u6709\u5DEE\u7570\u91D1\u984D\uFF1A",t.TotalDiff,"\uFF0C\u4E0D\u6B63\u78BA\uFF0C\u8ACB\u6AA2\u67E5\uFF01\uFF01")}}function KM(n,e){if(n&1){let t=O();d(0,"div",37)(1,"span",38),P("click",function(){b(t);let o=x(2);return y(o.updatePayment())}),h(2,"\u78BA\u5B9A\u5B58\u6A94"),u()()}}function XM(n,e){if(n&1){let t=O();d(0,"div",3)(1,"div",12)(2,"h1"),h(3,"\u65B0\u589E\u4ED8\u6B3E\u55AE"),u(),h(4," \u4ED8\u6B3E\u65E5\u671F\uFF1A"),d(5,"input",4),V("ngModelChange",function(o){b(t);let r=x();return N(r.PayDate,o)||(r.PayDate=o),y(o)}),u(),E(6,BM,7,4,"span",13)(7,NM,2,1,"span",13),d(8,"input",14),V("ngModelChange",function(o){b(t);let r=x();return N(r.PayAmount,o)||(r.PayAmount=o),y(o)}),P("focus",function(o){b(t);let r=x();return y(r.onFocus(o))})("keydown.enter",function(){b(t);let o=x();return y(o.addPayDetail())}),u(),d(9,"button",6),P("click",function(){b(t);let o=x();return y(o.addPayDetail())}),h(10,"\u78BA\u5B9A"),u(),F(11,"br"),u(),d(12,"table",15)(13,"tr")(14,"td"),h(15,"\u9805\u6B21"),u(),d(16,"td"),h(17,"\u4ED8\u6B3E\u65B9\u5F0F"),u(),d(18,"td"),h(19,"\u4ED8\u6B3E\u91D1\u984D"),u(),F(20,"td"),u(),E(21,VM,10,3,"tr",8),d(22,"tr"),F(23,"td"),d(24,"td"),h(25,"\u5408\u8A08\u4ED8\u6B3E\u91D1\u984D"),u(),d(26,"td"),h(27),u(),F(28,"td"),u()(),d(29,"div",12)(30,"span"),h(31,"\u652F\u4ED8\u79D1\u76EE\uFF1A"),u(),d(32,"select",16),V("ngModelChange",function(o){b(t);let r=x();return N(r.PayItemAccount,o)||(r.PayItemAccount=o),y(o)}),P("change",function(){b(t);let o=x();return y(o.PayItemAccountSelected())}),E(33,LM,2,4,"option",17),u(),E(34,RM,1,1,"input",18)(35,HM,2,2,"select",19)(36,GM,4,1,"span",13),h(37," \u5408\u8A08\u91D1\u984D\uFF1A"),d(38,"input",14),V("ngModelChange",function(o){b(t);let r=x();return N(r.PayItemAmount,o)||(r.PayItemAmount=o),y(o)}),P("focus",function(o){b(t);let r=x();return y(r.onFocus(o))})("keydown.enter",function(){b(t);let o=x();return y(o.addPayItemDetail())}),u(),E(39,qM,5,3,"span",13),d(40,"button",20),P("click",function(){b(t);let o=x();return y(o.addPayItemDetail())}),h(41,"\u78BA\u5B9A"),u(),F(42,"br"),u(),d(43,"table",15)(44,"tr")(45,"td"),h(46,"\u9805\u6B21"),u(),d(47,"td"),h(48,"\u652F\u4ED8\u9805\u76EE\u79D1\u76EE"),u(),d(49,"td"),h(50,"\u652F\u4ED8\u5167\u5BB9"),u(),d(51,"td"),h(52,"\u652F\u4ED8\u91D1\u984D"),u(),F(53,"td"),u(),E(54,zM,12,5,"tr",8),d(55,"tr"),F(56,"td"),d(57,"td"),h(58,"\u5408\u8A08\u4ED8\u6B3E\u9805\u76EE\u91D1\u984D"),u(),d(59,"td"),h(60),u(),F(61,"td")(62,"td"),u()(),E(63,jM,2,1,"div",21)(64,KM,3,0,"div",22),u()}if(n&2){let t=x();f(5),B("ngModel",t.PayDate),f(),S("ngIf",t.showPayTypeSelect),f(),S("ngIf",!t.showPayTypeSelect),f(),B("ngModel",t.PayAmount),f(13),S("ngForOf",t.PayDetail),f(6),T(t.TotalPayAmount),f(5),B("ngModel",t.PayItemAccount),f(),S("ngForOf",t.PayTarget),f(),S("ngIf",t.PayItemAccountNo!="1201-001"),f(),S("ngIf",t.PayItemAccountNo=="1201-001"),f(),S("ngIf",t.PayItemAccountNo=="1201-001"),f(2),B("ngModel",t.PayItemAmount),f(),S("ngIf",t.PayItemAccountNo=="1201-001"),f(),S("disabled",t.isSubmitDisabled),f(14),S("ngForOf",t.PayItemDetail),f(6),T(t.TotalPayItemAmount),f(3),S("ngIf",t.TotalDiff!=0),f(),S("ngIf",t.PayDetail.length>0&&t.PayItemDetail.length>0&&t.TotalDiff==0)}}var Cp=(()=>{let e=class e{constructor(i,o,r,a,s,l){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.datePipe=s,this.http=l,this.PayMethod=[{AccountNo:"1101",SubAccountNo:"001",AccountName:"\u73FE\u91D1"},{AccountNo:"1141",SubAccountNo:"002",AccountName:"\u4FE1\u7528\u5361"},{AccountNo:"1102",SubAccountNo:"101",AccountName:"\u532F\u6B3E"},{AccountNo:"2143",SubAccountNo:"",AccountName:"\u61C9\u4ED8\u5E33\u6B3E"},{AccountNo:"1141",SubAccountNo:"003",AccountName:"LinePay"},{AccountNo:"1141",SubAccountNo:"004",AccountName:"\u8857\u53E3"},{AccountNo:"1251",SubAccountNo:"002",AccountName:"\u5B78\u54E1\u5B58\u647A"},{AccountNo:"5901",SubAccountNo:"002",AccountName:"\u6298\u50F9\u5377"},{AccountNo:"5901",SubAccountNo:"003",AccountName:"\u9AD4\u9A57\u5377"},{AccountNo:"1141",SubAccountNo:"005",AccountName:"PayPal"},{AccountNo:"1101",SubAccountNo:"001",AccountName:"\u6298\u6263"}],this.PayTarget=[{AccountNo:"1201",SubAccountNo:"001",AccountName:"\u5546\u54C1\u5B58\u8CA8-\u5BE6\u9AD4\u5546\u54C1"},{AccountNo:"1201",SubAccountNo:"001",AccountName:"\u5546\u54C1\u5B58\u8CA8-\u5F71\u97F3\u5546\u54C1"},{AccountNo:"6201",SubAccountNo:"001",AccountName:"\u85AA\u8CC7\u8CBB\u7528"},{AccountNo:"6201",SubAccountNo:"002",AccountName:"\u8B1B\u5E2B\u8CBB\u7528"},{AccountNo:"6202",SubAccountNo:"001",AccountName:"\u623F\u5C4B\u79DF\u91D1"},{AccountNo:"6202",SubAccountNo:"002",AccountName:"\u5F71\u5370\u6A5F\u79DF\u91D1"},{AccountNo:"6205",SubAccountNo:"001",AccountName:"\u904B\u8CBB"},{AccountNo:"6225",SubAccountNo:"001",AccountName:"\u4EA4\u901A\u8CBB"},{AccountNo:"6206",SubAccountNo:"002",AccountName:"\u96FB\u8A71\u8CBB"},{AccountNo:"6209",SubAccountNo:"001",AccountName:"\u6C34\u8CBB"},{AccountNo:"6209",SubAccountNo:"002",AccountName:"\u96FB\u8CBB"},{AccountNo:"6207",SubAccountNo:"001",AccountName:"\u4FEE\u7E55\u8CBB"},{AccountNo:"6210",SubAccountNo:"001",AccountName:"\u5065\u4FDD\u8CBB"},{AccountNo:"6210",SubAccountNo:"002",AccountName:"\u52DE\u4FDD\u8CBB"},{AccountNo:"6210",SubAccountNo:"003",AccountName:"\u52DE\u9000\u8CBB"},{AccountNo:"6218",SubAccountNo:"001",AccountName:"\u4F19\u98DF\u8CBB"},{AccountNo:"6221",SubAccountNo:"001",AccountName:"\u6703\u8A08\u8CBB"},{AccountNo:"6221",SubAccountNo:"002",AccountName:"\u6703\u8A08\u5E2B\u7C3D\u8B49\u8CBB"},{AccountNo:"6221",SubAccountNo:"003",AccountName:"\u5916\u5305\u52DE\u52D9"},{AccountNo:"6249",SubAccountNo:"001",AccountName:"\u71DF\u696D\u8CBB\u7528"},{AccountNo:"6249",SubAccountNo:"002",AccountName:"\u6703\u8A08\u76F8\u95DC\u8CBB\u7528"},{AccountNo:"6249",SubAccountNo:"003",AccountName:"\u5176\u4ED6\u8CBB\u7528"},{AccountNo:"8101",SubAccountNo:"001",AccountName:"\u6240\u5F97\u7A05"},{AccountNo:"8201",SubAccountNo:"001",AccountName:"\u71DF\u696D\u7A05"},{AccountNo:"2143",SubAccountNo:"001",AccountName:"\u61C9\u4ED8\u5E33\u6B3E"}],this.PayDate=new Date().toISOString().substring(0,10),this.PayDetail=[],this.PayType="\u73FE\u91D1",this.PayAmount=0,this.TotalPayAmount=0,this.TotalDiff=0,this.NewPayment=!1,this.fName="QueryData",this.PayItemAccountNo="",this.PayItemAccountName="",this.PayItemContent="",this.PayItemAmount=0,this.PayItemDetail=[],this.TotalPayItemAmount=0,this.ProductItems=[],this.ProductItemQty=0,this.StockTheGoodDSs=[],this.StockTheGoodDS=new ur,this.StockTheGood_ProductId="",this.StockTheGood_ProductName="",this.Venders=[],this.VenderNo="",this.VenderName="",this.isSubmitDisabled=!1,this.qryPayDate=new Date().toISOString().substring(0,10),this.PaymentList=[],this.ShowPayVender=!1,this.PayVender="",this.showPayTypeSelect=!0}ngOnInit(){this.initial(),this.qryAccountList(),this.qryPaymentList(),this.qryVender()}onFocus(i){i.target.select()}initial(){this.fName="QueryData",this.PayDate=new Date().toISOString().substring(0,10),this.PayDetail=[],this.PayType="\u73FE\u91D1",this.PayAmount=0,this.TotalPayAmount=0,this.TotalDiff=0,this.PayItemAccountNo="",this.PayItemAccountName="",this.PayItemContent="",this.PayItemAmount=0,this.PayItemDetail=[],this.TotalPayItemAmount=0,this.ProductItems=[],this.ProductItemQty=0,this.StockTheGoodDSs=[],this.StockTheGoodDS=new ur,this.StockTheGood_ProductId="",this.StockTheGood_ProductName="",this.isSubmitDisabled=!1,this.qryPayDate=new Date().toISOString().substring(0,10),this.qryPayAmount=void 0,this.ShowPayVender=!1,this.PayVender="",this.showPayTypeSelect=!0}pFunction(i){this.fName=i}addPayDetail(){if(!(this.PayAmount==0||this.PayAmount==null||this.PayAmount==null)){var i=new dr;i.PayType=this.PayType,i.PayAmount=this.PayAmount,this.PayDetail.push(i),this.countTotalPayAmount(),this.PayAmount=0,this.scrollToBottom(),this.PayType="\u73FE\u91D1",this.showPayTypeSelect=!0}}deletePayDetail(i){if(confirm("\u8981\u522A\u9664\u6B64\u9805\u4ED8\u6B3E\u65B9\u5F0F\u55CE\uFF1F")){var o=this.PayDetail.findIndex(r=>r.PayType==i.PayType&&r.PayAmount==i.PayAmount);o>=0&&this.PayDetail.splice(o,1),this.countTotalPayAmount()}}countTotalPayAmount(){this.TotalPayAmount=0;for(var i=0;i<this.PayDetail.length;i++)this.TotalPayAmount+=this.PayDetail[i].PayAmount;this.TotalDiff=this.TotalPayItemAmount-this.TotalPayAmount}countTotalPayItemAmount(){this.TotalPayItemAmount=0;for(var i=0;i<this.PayItemDetail.length;i++)this.TotalPayItemAmount+=this.PayItemDetail[i].PayItemAmount;this.TotalDiff=this.TotalPayItemAmount-this.TotalPayAmount}scrollToBottom(){window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}SetStockTheGoodDS(i){this.StockTheGood_ProductId=i.ProductId,this.StockTheGood_ProductName=i.ProdName}addPayItemDetail(){if(!(this.PayItemAmount==0||this.PayItemAmount==null||this.PayItemAmount==null)){var i=new ur,o=new Yc;o.PayItemAccountNo=this.PayItemAccountNo,o.PayItemAccountName=this.PayItemAccountName,this.PayItemAccountNo=="1201-001"&&(this.PayItemContent=this.StockTheGood_ProductId+" "+this.StockTheGood_ProductName+" *"+this.ProductItemQty+"\u500B "+this.VenderName,this.StockTheGoodDS.ProductId=this.StockTheGood_ProductId,this.StockTheGoodDS.Qty=this.ProductItemQty,this.StockTheGoodDS.UnitPrice=Math.round(this.PayItemAmount/this.ProductItemQty*100)/100,this.StockTheGoodDSs.push(this.StockTheGoodDS)),o.PayItemContent=this.PayItemContent,o.PayItemAmount=this.PayItemAmount,o.VenderNo=this.VenderNo,o.VenderName=this.VenderName,this.PayItemDetail.push(o),this.countTotalPayItemAmount(),this.PayItemAmount=0,this.scrollToBottom(),this.PayItemAccountNo="",this.PayItemAccountName="",this.PayItemContent=""}}deletePayItemDetail(i){if(confirm("\u8981\u522A\u9664\u6B64\u9805\u76EE\u55CE\uFF1F")){var o=this.PayItemDetail.findIndex(s=>s.PayItemAccountNo==i.PayItemAccountNo&&s.PayItemAmount==i.PayItemAmount),r="";if(o>=0&&(r=i.PayItemContent.substring(0,i.PayItemContent.indexOf(" ")),this.PayItemDetail.splice(o,1)),r!=""){var a=this.StockTheGoodDSs.findIndex(s=>s.ProductId==r);a>=0&&this.StockTheGoodDSs.splice(a,1)}this.countTotalPayAmount(),this.countTotalPayItemAmount()}}PayItemAccountSelected(){this.PayItemAccountNo=this.PayItemAccount.AccountNo+"-"+this.PayItemAccount.SubAccountNo,this.PayItemAccountName=this.PayItemAccount.AccountName,this.PayItemAccountNo=="1201-001"&&this.qryProducts()}qryAccountList(){var i=this.global.serverip+"/api/Accounting/qryAccountList",o={};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.AccountList=s,r(!0)},s=>{a(!1)})})}qryProducts(){var i=this.global.serverip+"/api/Product/qryProducts",o={PhysicalProduct:"1"};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.ProductItems=s,r(!0)},s=>{a(!1)})})}checkIfAddToVender(){this.isSubmitDisabled=!0;var i=this.global.serverip+"/api/Payment/checkIfAddToVender",o={VenderName:this.VenderName};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.qryVender(),r(!0)},s=>{a(!1)})})}qryVender(){this.isSubmitDisabled=!0;var i=this.global.serverip+"/api/Payment/qryVender",o={VenderName:this.VenderName};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.Venders=s,this.isSubmitDisabled=!1,this.Venders.length<=1&&this.addPayItemDetail(),r(!0)},s=>{a(!1)})})}updatePayment(){var i=this.global.serverip+"/api/payment/UpdatePayment",a={PayDate:new Date(this.PayDate).toISOString().split(".")[0],PayDetails:this.PayDetail,PayItemDetails:this.PayItemDetail,StockTheGoodDSs:this.StockTheGoodDSs};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDoFromBody(i,a).then(c=>{var m=c;m!=!0&&this.toastr.warning("\u5B58\u6A94\u932F\u8AA4\uFF01"),this.initial(),this.qryPaymentList(),s(!0)},c=>{l(!1)})})}qryPaymentList(){var i=this.global.serverip+"/api/payment/qryPaymentList";let o=new Date,r="";this.qryPayDate!=null&&(o=new Date(this.qryPayDate),r=o.toISOString().split(".")[0]);var a={PayDate:r,PayAmount:this.qryPayAmount};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((s,l)=>{this.auth.httpDo(i,a).then(c=>{this.PaymentList=c,console.log(this.PaymentList),s(!0)},c=>{l(!1)})})}getPayAmountInD(i){return i.filter(r=>r.DorC==="D").reduce((r,a)=>r+a.Amount,0)}getFilteredPaymentsInD(i){return i.filter(o=>o.DorC==="D")}getFilteredPaymentsInC(i){return i.filter(o=>o.DorC==="C")}gotoAVBill(i){var o="/mgnh/accounting";this.router.navigate([o],{queryParams:{AVBillId:i,func:"fun2"}})}CheckPayType(){console.log(this.PayVender),this.PayType=="2143- \u61C9\u4ED8\u5E33\u6B3E"&&(this.ShowPayVender=!0)}ModifyAccountPayableSubAccount(){var i=this.PayVender.substring(0,3);this.VenderNo=i;var o=this.PayVender.substring(3,this.PayVender.length);this.VenderName=o,this.PayType="2143-"+i+" \u61C9\u4ED8\u5E33\u6B3E",this.showPayTypeSelect=!1}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(zt),z(Rc))},e.\u0275cmp=_t({type:e,selectors:[["app-payments"]],decls:7,vars:2,consts:[[1,"banner"],["href","javascript:void(0);",1,"banner",3,"click"],["class","tableContainer",4,"ngIf"],[1,"tableContainer"],["type","date",3,"ngModelChange","ngModel"],["type","number",3,"ngModelChange","ngModel"],[3,"click"],["border","1",2,"width","100%"],[4,"ngFor","ngForOf"],["href","javascript:void(0);",3,"click"],["style","display:block;float:left",4,"ngFor","ngForOf"],[2,"display","block","float","left"],[2,"background-color","lightgreen","padding","10px"],[4,"ngIf"],["type","number",1,"ImportantNotice",3,"ngModelChange","focus","keydown.enter","ngModel"],["border","1",2,"background-color","lightblue","width","100%"],[1,"ImportantNotice",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],["type","text","class","ImportantNotice",3,"ngModel","ngModelChange",4,"ngIf"],["class","ImportantNotice",3,"ngModel","ngModelChange","change",4,"ngIf"],[3,"click","disabled"],["style","margin:20px;background-color:red; color:white; font-size:48px;",4,"ngIf"],["style","margin:20px;font-size:48px; text-align: center;",4,"ngIf"],[3,"ngModel","ngModelChange","change",4,"ngIf"],["type","text",2,"display","none",3,"ngModelChange","ngModel"],["type","text","placeholder","\u4F9B\u61C9\u5546\u540D\u7A31",3,"ngModel","ngModelChange","change",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"ngModelChange","change","ngModel"],["value",""],["type","text","placeholder","\u4F9B\u61C9\u5546\u540D\u7A31",3,"ngModelChange","change","ngModel"],["type","text","disabled","",2,"width","200px",3,"ngModelChange","ngModel"],[3,"ngValue"],["type","text",1,"ImportantNotice",3,"ngModelChange","ngModel"],["type","number",1,"ImportantNotice",3,"ngModelChange","focus","ngModel"],["type","text",3,"ngModelChange","change","ngModel"],[2,"margin","20px","background-color","red","color","white","font-size","48px"],[2,"margin","20px","font-size","48px","text-align","center"],[1,"button",2,"border","1px black solid",3,"click"]],template:function(o,r){o&1&&(d(0,"div",0)(1,"a",1),P("click",function(){return r.pFunction("NewPayment")}),h(2,"\u65B0\u589E\u4ED8\u6B3E\u55AE"),u(),d(3,"a",1),P("click",function(){return r.pFunction("QueryData")}),h(4,"\u67E5\u8A62\u4ED8\u6B3E\u55AE"),u()(),E(5,AM,23,3,"div",2)(6,XM,65,18,"div",2)),o&2&&(f(5),S("ngIf",r.fName=="QueryData"),f(),S("ngIf",r.fName=="NewPayment"))},dependencies:[Dt,Nt,Wt,Ht,jt,cr,Rt,Vt,Lt,zt],styles:[".banner[_ngcontent-%COMP%]{margin:10px}a.banner[_ngcontent-%COMP%]{margin-left:5px;cursor:pointer;color:#00008b}a.banner[_ngcontent-%COMP%]:hover{background-color:#ff0}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%]{width:100px;font-size:18px}input[type=date][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font-size:18px}"]});let n=e;return n})();function QM(n,e){if(n&1){let t=O();d(0,"tr",3),P("click",function(){let o=b(t).$implicit,r=x(2);return y(r.ShowShoppingCartDetail(o))}),d(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u()()}if(n&2){let t=e.$implicit;f(2),T(t.Username),f(2),T(t.Tel),f(2),T(t.Cname)}}function $M(n,e){if(n&1&&(d(0,"div")(1,"h3"),h(2,"\u5BA2\u4EBA\u8CFC\u7269\u8ECA\u7BA1\u7406"),u(),d(3,"table")(4,"tr")(5,"td"),h(6,"\u5BA2\u4EBA\u5E33\u865F"),u(),d(7,"td"),h(8,"\u5BA2\u4EBA\u59D3\u540D"),u(),d(9,"td"),h(10,"\u5BA2\u4EBA\u96FB\u8A71"),u()(),E(11,QM,7,3,"tr",2),u()()),n&2){let t=x();f(11),S("ngForOf",t.ShoppingCartLists)}}function ZM(n,e){if(n&1){let t=O();d(0,"span",8),P("click",function(){b(t);let o=x(3);return y(o.ModifyZ04Fee())}),h(1,"\u6539\u50F9"),u()}}function JM(n,e){if(n&1&&(d(0,"tr")(1,"td"),h(2),u(),d(3,"td"),h(4),u(),d(5,"td"),h(6),u(),d(7,"td"),h(8),u(),d(9,"td"),h(10),E(11,ZM,2,0,"span",7),u(),d(12,"td"),h(13),u(),d(14,"td"),h(15),u()()),n&2){let t=e.$implicit;f(2),T(t.ProductId),f(2),T(t.ProdName),f(2),T(t.UnitPrice),f(2),T(t.Qty),f(2),vt(" ",t.Amount," "),f(),S("ngIf",t.ProductId=="Z04"),f(2),T(t.TaxAmount),f(2),T(t.Amount+t.TaxAmount)}}function tw(n,e){if(n&1){let t=O();d(0,"div")(1,"h3"),h(2,"\u5BA2\u4EBA\u8CFC\u7269\u8ECA\u7BA1\u7406"),u(),d(3,"div",4)(4,"span",5),P("click",function(){b(t);let o=x();return y(o.closeDetail())}),h(5,"\u95DC\u9589\u660E\u7D30"),u()(),d(6,"p"),h(7),F(8,"br"),h(9),F(10,"br"),h(11),u(),d(12,"table")(13,"tr")(14,"td"),h(15,"\u5546\u54C1\u7DE8\u865F"),u(),d(16,"td"),h(17,"\u5546\u54C1\u540D\u7A31"),u(),d(18,"td"),h(19,"\u672A\u7A05\u55AE\u50F9"),u(),d(20,"td"),h(21,"\u6578\u91CF"),u(),d(22,"td"),h(23,"\u672A\u7A05\u5408\u8A08"),u(),d(24,"td"),h(25,"\u7A05\u91D1"),u(),d(26,"td"),h(27,"\u5408\u8A08"),u(),F(28,"td"),u(),E(29,JM,16,8,"tr",6),u()()}if(n&2){let t=x();f(7),vt(" \u5BA2\u6236\u5E33\u865F\uFF1A",t.ShoppingCartNow.Username,""),f(2),vt(" \u5BA2\u6236\u59D3\u540D\uFF1A",t.ShoppingCartNow.Cname,""),f(2),vt(" \u5BA2\u6236\u96FB\u8A71\uFF1A",t.ShoppingCartNow.Tel," "),f(18),S("ngForOf",t.ShoppingCartDetail)}}var xp=(()=>{let e=class e{constructor(i,o,r,a,s){this.auth=i,this.toastr=o,this.global=r,this.router=a,this.datePipe=s,this.showDetail=!1}ngOnInit(){this.qryAutoIssueInvoice()}qryAutoIssueInvoice(){var i=this.global.serverip+"/api/ShoppingCart/qryShoppingCartLists",o={};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((r,a)=>{this.auth.httpDo(i,o).then(s=>{this.toastr.clear(),this.ShoppingCartLists=s,r(!0)},s=>{a(!1)})})}ShowShoppingCartDetail(i){this.ShoppingCartNow=i,this.showDetail=!0,this.ShoppingCartDetail=i.ShoppingCartDetail}closeDetail(){this.ShoppingCartNow=null,this.ShoppingCartDetail=null,this.showDetail=!1}ModifyZ04Fee(){var i=prompt("\u8ACB\u8F38\u5165\u55AE\u50F9","0"),o=this.global.serverip+"/api/ShoppingCart/ModifyInternationalTransportFee",r={Username:this.ShoppingCartNow.Username,Unitprice:i};return this.toastr.info("\u67E5\u8A62\u8CC7\u6599\u4E2D\uFF0C\u8ACB\u7A0D\u5F8C..."),new Promise((a,s)=>{this.auth.httpDo(o,r).then(l=>{this.toastr.clear(),l!=!1&&(this.ShoppingCartDetail=l,this.qryAutoIssueInvoice()),a(!0)},l=>{s(!1)})})}};e.\u0275fac=function(o){return new(o||e)(z(Ot),z(kt),z(Tt),z(wt),z(zt))},e.\u0275cmp=_t({type:e,selectors:[["app-shopping-cart-management"]],standalone:!0,features:[Bc],decls:3,vars:2,consts:[[1,"tableContainer"],[4,"ngIf"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[2,"display","flex","justify-content","flex-end"],[1,"button",3,"click"],[4,"ngFor","ngForOf"],["class","button AddButton",3,"click",4,"ngIf"],[1,"button","AddButton",3,"click"]],template:function(o,r){o&1&&(d(0,"div",0),E(1,$M,12,1,"div",1)(2,tw,30,4,"div",1),u()),o&2&&(f(),S("ngIf",!r.showDetail),f(),S("ngIf",r.showDetail))},dependencies:[sr,Dt,Nt],styles:["table[_ngcontent-%COMP%]{width:98%;margin:0 auto;border-collapse:collapse}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid black}tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{height:50px;font-size:18px}.AddButton[_ngcontent-%COMP%]{color:#fff;background-color:#f08bc3;border:0}.AddButton[_ngcontent-%COMP%]:hover{color:#f08bc3}"]});let n=e;return n})();var ew=[{path:"",component:Kc,title:"\u7BA1\u7406\u9996\u9801",canActivate:[ce],children:[{path:"accounting",component:_s,title:"\u6703\u8A08\u7CFB\u7D71",canActivate:[ce],children:[{path:"rpt1",component:Qc,title:"\u6703\u8A08\u7CFB\u7D71"},{path:"rpt2",component:$c,title:"\u6703\u8A08\u7CFB\u7D71"},{path:"rpt3",component:Zc,title:"\u6703\u8A08\u7CFB\u7D71"}]},{path:"finance",component:rd,title:"\u8CA1\u52D9\u7CFB\u7D71",canActivate:[ce]},{path:"finance/financereport",component:ad,title:"\u8CA1\u52D9\u5831\u544A",canActivate:[ce]},{path:"finance/financereport/rpt1",component:sd,title:"\u8AB2\u7A0B\u8CA1\u52D9\u5206\u6790\u8868",canActivate:[ce]},{path:"accounting/:func",component:_s,title:"\u6703\u8A08\u7CFB\u7D71",canActivate:[ce]},{path:"productprofile",component:Jc,title:"\u5546\u54C1\u7DAD\u8B77",canActivate:[ce]},{path:"coursemanagement",component:td,title:"\u8AB2\u7A0B\u7DAD\u8B77",canActivate:[ce]},{path:"checkoutcounter",component:ed,title:"\u6536\u9280\u53F0",canActivate:[ce]},{path:"invoiceform",component:_p,title:"\u767C\u7968\u8CC7\u8A0A",canActivate:[ce]},{path:"customerorders",component:id,title:"\u5BA2\u8A02\u55AE\u7BA1\u7406",canActivate:[ce]},{path:"customermanagement",component:od,title:"\u5BA2\u4EBA\u8CC7\u8A0A\u7BA1\u7406",canActivate:[ce]},{path:"payments",component:Cp,title:"\u5BA2\u4EBA\u8CC7\u8A0A\u7BA1\u7406",canActivate:[ce]},{path:"shoppingcartmanagement",component:xp,title:"\u5BA2\u4EBA\u8CFC\u7269\u8ECA\u7BA1\u7406",canActivate:[ce]},{path:"bias",component:gp,title:"bias",canActivate:[ce]}]}],Sp=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=yi({type:e}),e.\u0275inj=bi({imports:[fs.forChild(ew),fs]});let n=e;return n})();var CW=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=yi({type:e}),e.\u0275inj=bi({imports:[sr,Sp,Wc,Th]});let n=e;return n})();export{Th as a,CW as b};