PageSourceSearch

https://minasidor.k2a.se/355.f6f14d5b997dbdbf.js

js k2a.se collected 2026-10-02 06:20:32 UTC 319,846 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktaiga=self.webpackChunktaiga||[]).push([[355],{4355(gr,Wn,S){S.d(Wn,{ContractModule:()=>i0});var te=S(1630),Xn=S(7468),Un=S(2806),Lt=S(7002),qi=S(1397),Y=S(4058),ct=S(9437),Pt=S(9338),ee=S(8056),Ke=S(3723),o=S(3664),P=S(2615),dt=S(8793),Nt=S(2043),mr=S(6354),Yn=S(5850);let _r=(()=>{class e{constructor(t){this.request=t}getConsumption(t){return this.request.get("session",{H\u00e4mtaTillg\u00e4ngligaObjekt:!0,H\u00e4mtaM\u00e4tdata:!0,H\u00e4mtaKundEkonomiAviseringarAntM\u00e5n:12,H\u00e4mtaKundAviseringarAntM\u00e5n:12}).pipe((0,mr.T)(i=>{if(i&&i.Tillg\u00e4ngligaObjekt){const s=i.Tillg\u00e4ngligaObjekt.filter(a=>"Hyresobjekt"===a.Typ&&a.Entitet&&+a.Entitet.Id===t);if(s&&s.length>0)return s[0].M\u00e4tdataAnl\u00e4ggningar}return null}))}static{this.\u0275fac=function(i){return new(i||e)(P.KVO(Yn.B))}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var br=S(9015),yr=S(6844),xr=S(7033),Je=S(666);let vr=(()=>{class e{constructor(t){this.request=t}getMaintenanceStatusByNodeIds(t){return this.request.get("underhall",{nodIdLista:t})}static{this.\u0275fac=function(i){return new(i||e)(P.KVO(Yn.B))}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ts=(()=>{class e{constructor(t){this.request=t}getErrandsInspections(t){return this.request.get("v2/errands/inspections",{contractId:t},{cache:!1})}getErrandsInspectionsReport(t){return this.request.get(`v2/errands/inspections/${t}/report`,null,{responseType:"blob",cache:!1})}static{this.\u0275fac=function(i){return new(i||e)(P.KVO(Yn.B))}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Cr=S(2280),Mr=S(1715),K=S(8018),$t=S(56),Kn=S(1580),Sr=S(2304),Or=S(345),es=S(2591),Tr=S(4959);const Pr=e=>({startTag:'<span class="mat-body-strong">',endTag:"</span>",amount:e});function kr(e,n){if(1&e){const t=o.RV6();o.j41(0,"taiga-quick-actions",12),o.bIt("featureClicked",function(s){P.eBV(t);const a=o.XpG(3);return P.Njj(a.featureClicked(s))}),o.k0s()}if(2&e){const t=o.XpG(3);o.Y8G("initialCount",t.mediaQueryService.isMobile()?2:3)("featureList",t.featureList)}}function Rr(e,n){if(1&e&&(o.nrm(0,"div",7),o.j41(1,"h2",8),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.nVh(4,kr,1,2,"taiga-quick-actions",11)),2&e){const t=o.XpG(2);o.R7$(2),o.JRh(o.bMT(3,2,"QUICKACTIONS")),o.R7$(2),o.vxM(t.featureList?4:-1)}}function Fr(e,n){if(1&e&&(o.j41(0,"div",16),o.nrm(1,"taiga-maintenance-table",17),o.k0s()),2&e){const t=n.$implicit,i=o.XpG(3);o.R7$(),o.Y8G("maintenance",t)("isMobile",i.mediaQueryService.isMobile())}}function Ir(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"div",7),o.j41(2,"h2",8),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"p",13),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"mat-accordion")(9,"mat-expansion-panel")(10,"mat-expansion-panel-header",14)(11,"mat-panel-title",15),o.EFF(12),o.nI1(13,"translate"),o.nI1(14,"lowercase"),o.k0s()(),o.Z7z(15,Fr,2,2,"div",16,o.fX1),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,4,"MAINTENANCE")),o.R7$(3),o.JRh(o.bMT(7,6,"MAINTENANCEHELP")),o.R7$(6),o.Lme(" ",t.maintenanceList.length," ",o.bMT(14,10,o.bMT(13,8,"SPACES"))," "),o.R7$(3),o.Dyx(t.maintenanceList)}}function Ar(e,n){if(1&e&&(o.j41(0,"div",18)(1,"div",19)(2,"mat-icon",20),o.EFF(3,"info"),o.k0s()(),o.j41(4,"div"),o.nrm(5,"taiga-markdown",21),o.nI1(6,"translate"),o.k0s()()),2&e){const t=o.XpG(4);o.R7$(5),o.Y8G("markdown",o.i5U(6,1,"TOTALDISCOUNTINFOHLU",o.eq3(4,Pr,t.totalDiscountString)))}}function Er(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"mat-card")(2,"taiga-hlu-legacy-shopping-cart",22),o.bIt("itemClicked",function(s){P.eBV(t);const a=o.XpG(4);return P.Njj(a.deleteoShoppingCart(s))}),o.k0s()(),o.nrm(3,"div",7),o.k0s()}if(2&e){const t=o.XpG(4);o.R7$(2),o.Y8G("items",t.hluOrder)("contractId",t.contract.id)}}function wr(e,n){if(1&e&&(o.nrm(0,"div",7),o.j41(1,"h2",8),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.nVh(4,Ar,7,6,"div",18),o.nVh(5,Er,4,2,"div")),2&e){const t=o.XpG(3);o.R7$(2),o.JRh(o.bMT(3,3,"TENANTCONTROLLEDMAINTENANCE")),o.R7$(2),o.vxM(t.totalDiscountString?4:-1),o.R7$(),o.vxM((null==t.hluOrder?null:t.hluOrder.length)>0?5:-1)}}function Dr(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title",23),o.EFF(4),o.k0s()(),o.j41(5,"taiga-hlu-legacy",24),o.bIt("itemClicked",function(s){P.eBV(t);const a=o.XpG(3);return P.Njj(a.addToShoppingCart(s))}),o.k0s()()()}if(2&e){const t=o.XpG(3);o.R7$(4),o.SpI(" ",t.canBeOrdered.length," st "),o.R7$(),o.Y8G("maintenanceStatusResult",t.canBeOrdered)}}function jr(e,n){if(1&e&&(o.nrm(0,"div",7),o.j41(1,"h2",8),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"mat-accordion")(5,"mat-expansion-panel")(6,"mat-expansion-panel-header")(7,"mat-panel-title",15),o.EFF(8),o.k0s()(),o.nrm(9,"taiga-hlu-legacy",25),o.k0s()()),2&e){const t=o.XpG(3);o.R7$(2),o.JRh(o.bMT(3,4,"ORDEREDMAINTENANCE")),o.R7$(6),o.SpI(" ",t.allreadyOrdered.length," st "),o.R7$(),o.Y8G("maintenanceStatusResult",t.allreadyOrdered)("isAllreadyOrdered",!0)}}function Lr(e,n){if(1&e&&(o.j41(0,"div"),o.nVh(1,wr,6,5),o.nVh(2,Dr,6,2,"mat-accordion"),o.nVh(3,jr,10,6),o.k0s()),2&e){const t=o.XpG(2);o.R7$(),o.vxM((null==t.canBeOrdered?null:t.canBeOrdered.length)>0||(null==t.hluOrder?null:t.hluOrder.length)>0?1:-1),o.R7$(),o.vxM((null==t.canBeOrdered?null:t.canBeOrdered.length)>0?2:-1),o.R7$(),o.vxM((null==t.allreadyOrdered?null:t.allreadyOrdered.length)>0?3:-1)}}function Nr(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"lowercase"),o.k0s()),2&e){const t=o.XpG(3);o.R7$(),o.Lme("",t.contractsItemKeySerieItem.count," ",o.bMT(3,4,o.bMT(2,2,"KEYSRECEIPT")))}}function $r(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"lowercase"),o.k0s()),2&e){const t=o.XpG(3);o.R7$(),o.Lme("",t.contractsItemKeySerieItem.count," ",o.bMT(3,4,o.bMT(2,2,"KEYSRECEIPTS")))}}function Br(e,n){1&e&&o.EFF(0," , ")}function Vr(e,n){if(1&e&&(o.EFF(0),o.nVh(1,Br,1,0)),2&e){const t=n.$implicit,i=n.$index,s=o.XpG(2).$implicit;o.SpI(" ",t.displayName," "),o.R7$(),o.vxM((null==s.keys?null:s.keys.length)>1&&i!==(null==s.keys?null:s.keys.length)-1&&t.displayName?1:-1)}}function zr(e,n){if(1&e&&o.Z7z(0,Vr,2,2,null,null,o.fX1),2&e){const t=o.XpG().$implicit;o.Dyx(t.keys)}}function Hr(e,n){1&e&&o.EFF(0," - ")}function Gr(e,n){if(1&e){const t=o.RV6();o.j41(0,"button",34),o.nI1(1,"translate"),o.bIt("click",function(){P.eBV(t);const s=o.XpG().$implicit,a=o.XpG(3);return P.Njj(a.getContractsItemKeySeriesReport(s.id,"Nyckelkvittens"))}),o.j41(2,"mat-icon"),o.EFF(3,"picture_as_pdf"),o.k0s()()}2&e&&o.BMQ("aria-label",o.bMT(1,1,"DOWNLOADKEYRECEIPTASPDF"))}function Wr(e,n){if(1&e&&(o.j41(0,"div",27)(1,"h3",28),o.EFF(2),o.k0s(),o.j41(3,"div",29),o.EFF(4),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",30),o.EFF(7),o.nI1(8,"translate"),o.k0s(),o.j41(9,"div",31),o.EFF(10),o.nI1(11,"translate"),o.nVh(12,zr,2,0)(13,Hr,1,0),o.k0s(),o.j41(14,"div",32),o.EFF(1
15),o.nI1(16,"translate"),o.nVh(17,Gr,4,3,"button",33),o.k0s()()),2&e){const t=n.$implicit,i=o.XpG(3);o.R7$(2),o.SpI(" ",t.displayNameTypeOfChange," "),o.R7$(2),o.Lme(" ",o.bMT(5,10,"KEYTYPE"),": ",t.displayName," "),o.R7$(3),o.Lme(" ",o.bMT(8,12,"NUMBER"),": ",t.number," "),o.R7$(3),o.SpI(" ",o.bMT(11,14,"MARKING"),": "),o.R7$(2),o.vxM(i.hasDisplayNameKeys(t.keys)?12:13),o.R7$(3),o.Lme(" ",o.bMT(16,16,"QUANTITY"),": ",t.count," "),o.R7$(2),o.vxM(null!=t&&null!=t.report&&t.report.mimeType?17:-1)}}function Xr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"div",7),o.j41(2,"h2",8),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"p",13),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"mat-accordion")(9,"mat-expansion-panel",26)(10,"mat-expansion-panel-header")(11,"mat-panel-title",15),o.nVh(12,Nr,4,6,"div"),o.nVh(13,$r,4,6,"div"),o.k0s()(),o.Z7z(14,Wr,18,18,"div",27,o.fX1),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,4,"KEYS")),o.R7$(3),o.JRh(o.bMT(7,6,"KEYSHELP")),o.R7$(6),o.vxM(1===t.contractsItemKeySerieItem.count?12:-1),o.R7$(),o.vxM(1!==t.contractsItemKeySerieItem.count?13:-1),o.R7$(),o.Dyx(t.contractsItemKeySerieItem.keySeries)}}function Ur(e,n){if(1&e&&(o.j41(0,"div",41),o.nrm(1,"taiga-consumption-widget",42),o.k0s()),2&e){const t=n.$implicit;o.XpG();const i=o.sdS(11),s=o.XpG(2);o.R7$(),o.Y8G("chartType",i.value)("anlaggning",t)("isMobile",s.mediaQueryService.isMobile())}}function Yr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"div",7),o.j41(2,"div",35)(3,"div")(4,"h2",8),o.EFF(5),o.nI1(6,"translate"),o.k0s(),o.nrm(7,"taiga-markdown",21),o.nI1(8,"translate"),o.k0s(),o.j41(9,"div")(10,"mat-button-toggle-group",36,0)(12,"mat-button-toggle",37),o.EFF(13),o.nI1(14,"translate"),o.k0s(),o.j41(15,"mat-button-toggle",38),o.EFF(16),o.nI1(17,"translate"),o.k0s()()()(),o.j41(18,"mat-accordion")(19,"mat-expansion-panel",39),o.nI1(20,"translate"),o.nI1(21,"lowercase"),o.nI1(22,"translate"),o.j41(23,"mat-expansion-panel-header")(24,"mat-panel-title",40),o.EFF(25),o.nI1(26,"translate"),o.nI1(27,"lowercase"),o.k0s()(),o.Z7z(28,Ur,2,3,"div",41,o.fX1),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(5),o.JRh(o.bMT(6,11,"CONSUMPTION")),o.R7$(2),o.Y8G("markdown",o.bMT(8,13,"CONSUMPTIONHELP")),o.R7$(3),o.Y8G("value",t.chartType),o.R7$(3),o.JRh(o.bMT(14,15,"BAR")),o.R7$(3),o.JRh(o.bMT(17,17,"LINE")),o.R7$(3),o.Y8G("eventLabel",o.mNQ(o.bMT(21,21,o.bMT(20,19,"METERGROUPS"))))("eventCategory",o.mNQ(o.bMT(22,23,"CONSUMPTION"))),o.R7$(6),o.Lme(" ",t.anlaggningar.length," ",o.bMT(27,27,o.bMT(26,25,"METERGROUPS"))," "),o.R7$(3),o.Dyx(t.anlaggningar)}}function Kr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"div",7),o.j41(2,"h2",8),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"mat-accordion")(6,"mat-expansion-panel",43)(7,"mat-expansion-panel-header")(8,"mat-panel-title",44),o.EFF(9),o.nI1(10,"translate"),o.nI1(11,"lowercase"),o.k0s()(),o.nrm(12,"taiga-inspection",45),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,4,"INSPECTIONS")),o.R7$(6),o.Lme(" ",t.errandsInspections.count," ",o.bMT(11,8,o.bMT(10,6,"PCS"))," "),o.R7$(3),o.Y8G("errandsInspections",t.errandsInspections)}}function Jr(e,n){if(1&e&&(o.j41(0,"div",2)(1,"div"),o.nrm(2,"taiga-medium-header",3),o.nI1(3,"translate"),o.k0s(),o.nrm(4,"taiga-page-cards"),o.j41(5,"div",4)(6,"div",5)(7,"div",6),o.nrm(8,"div",7),o.j41(9,"h2",8),o.EFF(10),o.k0s(),o.nrm(11,"taiga-object-widget",9),o.k0s(),o.j41(12,"div",10),o.nVh(13,Rr,5,4),o.k0s()()(),o.nVh(14,Ir,17,12,"div"),o.nVh(15,Lr,4,3,"div"),o.nVh(16,Xr,16,8,"div"),o.nVh(17,Yr,30,29,"div"),o.nVh(18,Kr,13,10,"div"),o.k0s()),2&e){const t=o.XpG();o.AVh("is-mobile",t.mediaQueryService.isMobile())("is-desktop",!t.mediaQueryService.isMobile()),o.R7$(2),o.Y8G("text",null==t.contract.primaryObject?null:t.contract.primaryObject.location.address.address)("subText",o.bMT(3,16,"WELCOMEHELP")),o.R7$(8),o.Lme("",t.contract.type.displayName," ",null==t.contract?null:t.contract.number),o.R7$(),o.Y8G("object",t.contract)("contractId",t.route.snapshot.params.id),o.R7$(2),o.vxM(t.featureList&&t.featureList.length>0?13:-1),o.R7$(),o.vxM(t.maintenanceList&&t.maintenanceList.length>0?14:-1),o.R7$(),o.vxM(t.myPagesResult&&(null==t.myPagesResult.Result?null:t.myPagesResult.Result.length)>0?15:-1),o.R7$(),o.vxM(t.contractsItemKeySerieItem&&(null==t.contractsItemKeySerieItem.keySeries?null:t.contractsItemKeySerieItem.keySeries.length)>0?16:-1),o.R7$(),o.vxM(t.anlaggningar?17:-1),o.R7$(),o.vxM(t.errandsInspections&&(null==t.errandsInspections.items?null:t.errandsInspections.items.length)>0?18:-1)}}let ns=(()=>{class e{constructor(t,i,s,a,r,l,c,h,d,u,f,p,g,m,_,b,y,v,M){this.route=t,this.mediaQueryService=i,this.consumptionService=s,this.router=a,this.errorReportService=r,this.featureService=l,this.laundryBookingService=c,this.clientConfigurationService=h,this.maintenanceService=d,this.inspectionService=u,this.rightSheet=f,this.errandService=p,this.translate=g,this.contractService=m,this.fileService=_,this.hluLegacyService=b,this.titleService=y,this.dialog=v,this.chatService=M,this.contract=null,this.hluOrder=[],this.SHOPPINGCART="SHOPPINGCART"}ngOnInit(){this.chartType="bar",this.route.data.subscribe(t=>{this.contract=t.contract,this.anlaggningar=null,this.contract&&((0,Xn.p)({bookingObjectsObjectType:this.lau
1ndryBookingService.getBookingObjectsObjectType(),clientConfigurationFeatures:this.clientConfigurationService.getClientConfigurationFeatures(),errandTypes:this.errandService.getErrandsTypes()}).subscribe(i=>{this.featureList=this.featureService.getFeaturesForQuickActions({contracts:null,laundryBooking:i.bookingObjectsObjectType,features:i.clientConfigurationFeatures,contract:this.contract,hasContract:!0,errandsTypes:i.errandTypes}),i.clientConfigurationFeatures?.consumption?.enabled&&this.consumptionService.getConsumption(+this.contract.primaryObject?.localId).subscribe(s=>{if(s){const a=s.find(r=>null!=r.M\u00e4tare);a&&a.M\u00e4tare.find(l=>null!=l.M\u00e4tdata)&&(this.anlaggningar=s)}}),i.clientConfigurationFeatures?.maintenance?.enabled&&this.contract?.status?.active&&this.maintenanceService.getMaintenanceStatusByNodeIds([+this.contract.primaryObject?.localId]).subscribe(s=>{this.maintenanceList=new Array,(0,Un.H)(s).pipe((0,Lt.$)(a=>a.Avser.split(" / ")[1]),(0,qi.Z)(a=>a.pipe((0,Y.$)()))).subscribe(a=>{this.maintenanceList.push({Utrymme:a[0].Avser.split(" / ")[1],Underh\u00e5ll:a})})}),i.clientConfigurationFeatures?.inspections?.enabled&&this.inspectionService.getErrandsInspections([this.route.snapshot.params.id]).subscribe(s=>{this.errandsInspections=s}),this.contractService.getContractsItemKeySerie(this.route.snapshot.params.id).subscribe(s=>{this.contractsItemKeySerieItem=s}),i.clientConfigurationFeatures?.hLU?.enabled&&this.contract?.status?.active&&this.getAllMaintenanceStatus()}),this.clientConfigurationService.getClientConfigurationApp().subscribe(i=>{this.titleService.setTitle(`${this.contract?.primaryObject?.location?.address?.address} - ${i?.name}`)}))})}filterBookingObjects(t,i){const s=[];for(const a of t)a.contractVersionId.find(r=>r===i)&&s.push(a);return s}featureClicked(t){t.type===te.l.ErrorReport?this.openErrorReportSheet():t.type===te.l.LaundryBooking?this.openLaundryBooking(t):t.type===te.l.Errands?this.openErrandsSheet():this.router.navigate([t.path])}openErrorReportSheet(){this.chatService.isChatEnabled()?this.chatService.requestOpenChat(this.contract.primaryObject?.number):this.errorReportService.openErrorReportSheet(this.contract.primaryObject?.number)}openErrandsSheet(){this.errandService.getErrandsTypes().subscribe(t=>{this.rightSheet.open(ee.o,{data:{errandsTypes:t},panelClass:"custom-rightsheet",scrollStrategy:new Pt.t0,ariaLabel:this.translate.instant("ERRORREPORT"),autoFocus:!1}).afterDismissed().subscribe(s=>{})})}openLaundryBooking(t){const s=this.filterBookingObjects(t.data.laundryBooking.objects,this.route.snapshot.params.id);1===s.length?this.laundryBookingService.getBookingObjectLink(s[0].bookingObjectId,this.route.snapshot.params.id).pipe((0,ct.W)(a=>{throw a})).subscribe(a=>{this.dialog.open(Ke.O,{data:{bookingContracts:[{address:s[0].displayName,bookingLink:a.webAddress}]},scrollStrategy:new Pt.t0})}):this.router.navigate([t.path])}getContractsItemKeySeriesReport(t,i){this.contractService.getContractsItemKeySeriesReport(this.route.snapshot.params.id,t).subscribe(s=>{if(s){const r=s?.type?.split("/").pop();this.fileService.saveBlobWithFilename(s,`${i}.${r}`)}})}hasDisplayNameKeys(t){return t.some(i=>i.hasOwnProperty("displayName"))}getAllMaintenanceStatus(){this.hluLegacyService.getAllMaintenanceStatus([+this.contract.primaryObject?.localId]).subscribe(t=>{if(this.myPagesResult=t,this.canBeOrdered=this.myPagesResult?.Re
1sult.filter(s=>s.MeasureTypeCode&&s.MeasureTypeCode.startsWith("HLU")&&!s.HasBeenOrdered&&!s.ClientOrderedDate),this.allreadyOrdered=this.myPagesResult?.Result.filter(s=>s.HasBeenOrdered||s.ClientOrderedDate),this.periodicMaintence=this.myPagesResult?.Result.filter(s=>!(s.HasBeenOrdered||s.MeasureTypeCode&&s.MeasureTypeCode.startsWith("HLU"))),sessionStorage.getItem(`${this.SHOPPINGCART}_${this.route.snapshot.params.id}`)){let s=JSON.parse(sessionStorage.getItem(`${this.SHOPPINGCART}_${this.route.snapshot.params.id}`));for(let a of s)this.canBeOrdered.find(r=>r.DK_UhAtgardId===a.id).CanBeOrdered=!1;this.hluOrder=s}else this.hluOrder=[];let i=this.myPagesResult?.Result?.reduce((s,a)=>a.HasBeenOrdered||!a.DiscountToday?s:s+a.DiscountToday,0);if(this.totalDiscountString=i?.toFixed().toString()+" kr",this.myPagesResult.Result.find(s=>s.DiscountToday)?.DiscountToday){let s=this.myPagesResult.Result.find(a=>a.DiscountToday).DiscountTypeToday;s&&(this.totalDiscountString+="/"+s)}})}addToShoppingCart(t){this.hluOrder.push(t),sessionStorage.setItem(`${this.SHOPPINGCART}_${this.route.snapshot.params.id}`,JSON.stringify(this.hluOrder)),this.canBeOrdered.find(i=>i.DK_UhAtgardId===t.id).CanBeOrdered=!1}deleteoShoppingCart(t){this.hluOrder.splice(this.hluOrder.indexOf(t),1),sessionStorage.setItem(`${this.SHOPPINGCART}_${this.route.snapshot.params.id}`,JSON.stringify(this.hluOrder)),this.canBeOrdered.find(i=>i.DK_UhAtgardId===t.id).CanBeOrdered=!0}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(dt.nX),o.rXU(Nt.M),o.rXU(_r),o.rXU(dt.Ix),o.rXU(br.Y),o.rXU(yr.w),o.rXU(xr.m),o.rXU(Je.t),o.rXU(vr),o.rXU(ts),o.rXU(Cr.c9),o.rXU(Mr.Q),o.rXU(K.c$),o.rXU($t.y),o.rXU(Kn.E),o.rXU(Sr.I),o.rXU(Or.hE),o.rXU(es.bZ),o.rXU(Tr.m))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-contract-home"]],standalone:!1,decls:1,vars:1,consts:[["group","matButtonToggleGroup"],[1,"page",3,"is-mobile","is-desktop"],[1,"page"],[3,"text","subText"],[1,"body-content"],[1,"row"],[1,"column","left-column"],[1,"divider"],[1,"mat-h2","header-text"],[3,"object","contractId"],[1,"column"],[3,"initialCount","featureList"],[3,"featureClicked","initialCount","featureList"],[1,"help-text"],["data-mom-test","MyPages_Agreement_Maintenance"],[2,"font-size","1.125rem"],[1,"maintenance"],[3,"maintenance","isMobile"],[1,"totalDiscount"],[1,"icon-wrapper"],["color","primary",2,"margin-right","10px"],[3,"markdown"],[3,"itemClicked","items","contractId"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance",2,"font-size","1.125rem"],[3,"itemClicked","maintenanceStatusResult"],[3,"maintenanceStatusResult","isAllreadyOrdered"],["data-mom-test","MyPages_Agreement_KeysOverviewWithArrow"],[1,"key-serie"],["data-mom-test","MyPages_Agreement_KeysReceiptType",1,"mat-h3",2,"margin","0"],["data-mom-test","MyPages_Agreement_KeysType"],["data-mom-test","MyPages_Agreement_KeysNumber"],["data-mom-test","MyPages_Agreement_KeysMarking"],["data-mom-test","MyPages_Agreement_KeysCount",2,"display","flex","justify-content","space-between"],["mat-icon-button","","color","primary","data-mom-test","MyPages_Agreement_KeysPDF"],["mat-icon-button","","color","primary","data-mom-test","MyPages_Agreement_KeysPDF",3,"click"],[1,"header"],[3,"value"],["value","bar"],["value","line"],["taigaEventTracker","",3,"eventLabel","eventCategory"],["data-mom-test","MyPages_Agreement_Consumption",2,"font-size","1.125rem"],[2,"padding-bottom","10px"],[3,"chartType","anlaggning","isMobile"],["data-mom-test","MyPages_Agreement_InspectionOverviewWithArrow"],["data-mom-test","MyPages_Agreement_Inspections",2,"font-size","1.125rem"],[3,"errandsInspections"]],template:function(i,s){1&i&&o.nVh(0,Jr,19,18,"div",1),2&i&&o.vxM(s.contract?0:-1)},styles:[".large-header[_ngcontent-%COMP%]{font-size:1.875rem}.page[_ngcontent-%COMP%]{display:block}.is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;flex-wrap:wrap}.header-text[_ngcontent-%COMP%]{font-weight:600}.row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-basis:100%;flex:1;width:100%}.left-column[_ngcontent-%COMP%]{padding-bottom:16px}.is-desktop[_ngcontent-%COMP%]   .left-column[_ngcontent-%COMP%]{flex:2;margin-right:16px}@media(max-width:1024px){.row[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}}taiga-object-widget[_ngcontent-%COMP%]{margin-top:10px}.divider[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:15px}.maintenance[_ngcontent-%COMP%]:not(:first-of-type), .key-serie[_ngcontent-%COMP%]:not(:first-of-type){margin-top:45px}.totalDiscount[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}}return e})();var Qr=S(9963),Zr=S(7586),ut=S.n(Zr),Jn=S(7052),qr=S(8709),tl=S(6090),be=S(8132),is=S(5665),ye=S(9213),ne=S(8834),st=S(5596);const ss=(e,n)=>[e,n];function el(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",1),2&e){const t=o.XpG(2);o.Y8G("text",t.getStatusText(t.object.status,t.object.notice))}}function nl(e,n){1&e&&(o.j41(0,"span"),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"translate"),o.k0s()),2&e&&(o.R7$(),o.Lme("",o.bMT(2,2,"KR"),"/",o.bMT(3,4,"MONTH")))}function il(e,n){if(1&e&&(o.j41(0,"div")(1,"div",3),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",17),o.EFF(5),o.k0s()()),2&e){const t=o.XpG(2);o.R7$(2),o.JRh(o.bMT(3,2,"APARTMENTNUMBER")),o.R7$(3),o.SpI(" ",null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.identity?null:t.object.primaryObject.identity.officialNumber," ")}}function sl(e,n){if(1&e&&(o.j41(0,"div")(1,"div",3),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",18),o.EFF(5),o.k0s()()),2&e){const t=o.XpG(2);o.R7$(2),o.JRh(o.bMT(3,2,"SIGNNUMBER")),o.R7$(3),o.SpI(" ",null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.location?null:t.object.primaryObject.location.signNumber," ")}}function ol(e,n){if(1&e&&(o.j41(0,"div")(1,"div",3),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",19),o.EFF(5),o.k0s()()),2&e){const t=o.XpG(2);o.R7$(2),o.JRh(o.bMT(3,2,"CONTRACTPERIODTO")),o.R7$(3),o.JRh(t.formatDate(null==t.object||null==t.object.status?null:t.object.status.endDate))}}function al(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"picture_as_pdf"),o.k0s())}function rl(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"picture_as_pdf"),o.k0s())}function ll(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"attachment"),o.k0s())}function cl(e,n){if(1&e){const t=o.RV6();o.j41(0,"button",21),o.nI1(1,"translate"),o.bIt("click",function(){const s=P.eBV(t).$implicit,a=o.XpG(3);return P.Njj(a.getContractsItemFloorPlansItem(s.floorPlanId,s.displayName))}),o.nVh(2,al,2,0,"mat-icon")(3,rl,2,0,"mat-icon")(4,ll,2,0,"mat-icon"),o.EFF(5),o.nI1(6,"translate"),o.k0s()}if(2&e){let t;const i=n.$implicit,s=n.$index;o.BMQ("aria-label",o.bMT(1,4,"DOWNLOADFLOORPLANASPDF")),o.R7$(2),o.vxM((t=!0)==("application/pdf"===i.mediaType)?2:t===("image/jpeg"===i.mediaType||"image/bmp"===i.mediaType||"image/png"===i.mediaType||"image/gif"===i.mediaType)?3:4),o.R7$(3),o.Lme(" ",o.bMT(6,6,"FLOORPLAN")," ",0===s?"":s+1," ")}}function hl(e,n){if(1&e&&(o.j41(0,"div",13),o.Z7z(1,cl,7,8,"button",20,o.fX1),o.k0s()),2&e){const t=o.XpG(2);o.R7$(),o.Dyx(t.contractsItemFloorPlans.items)}}function dl(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",14)(1,"button",22),o.nI1(2,"translate"),o.bIt("click",function(){P.eBV(t);const s=o.XpG(2);return P.Njj(s.getReport())}),o.j41(3,"mat-icon"),o.EFF(4,"picture_as_pdf"),o.k0s(),o.EFF(5),o.nI1(6,"translate"),o.k0s()()}2&e&&(o.R7$(),o.BMQ("aria-label",o.bMT(2,2,"DOWNLOADCONTRACTASPDF")),o.R7$(4),o.SpI(" ",o.bMT(6,4,"DOWNLOADCONTRACT")," "))}function ul(e,n){if(1&e&&(o.j41(0,"div",15)(1,"button",23),o.EFF(2),o.nI1(3,"translate"),o.k0s()()),2&e){const t=o.XpG(2);o.R7$(),o.Y8G("routerLink",o.l_i(4,ss,t.noticeLink,t._contractId)),o.R7$(),o.SpI(" ",o.bMT(3,2,"TERMINATECONTRACT")," ")}}function fl(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",16)(1,"p"),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"button",24),o.EFF(5),o.nI1(6,"translate"),o.k0s(),o.j41(7,"button",25),o.bIt("click",function(){P.eBV(t);const s=o.XpG(2);return P.Njj(s.deleteContractsItemNotice())}),o.EFF(8),o.nI1(9,"translate"),o.k0s()()}if(2&e){const t=o.XpG(2);
1o.R7$(2),o.JRh(o.bMT(3,4,"PENDINGSIGNING")),o.R7$(2),o.Y8G("routerLink",o.l_i(10,ss,t.signingsLink,t.signingId)),o.R7$(),o.SpI(" ",o.bMT(6,6,"SIGN")," "),o.R7$(3),o.SpI(" ",o.bMT(9,8,"CANCELTERMINATION")," ")}}function pl(e,n){if(1&e&&(o.j41(0,"mat-card-content")(1,"div",0),o.nVh(2,el,1,1,"taiga-pill-badge",1),o.k0s(),o.j41(3,"div",2)(4,"div")(5,"div",3),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"div",4),o.EFF(9),o.k0s(),o.j41(10,"div",5),o.EFF(11),o.k0s()(),o.j41(12,"div")(13,"div",3),o.EFF(14),o.nI1(15,"translate"),o.k0s(),o.j41(16,"div",6),o.EFF(17),o.k0s(),o.j41(18,"div",7),o.EFF(19),o.k0s()(),o.j41(20,"div")(21,"div",3),o.EFF(22),o.nI1(23,"translate"),o.k0s(),o.j41(24,"div",8),o.EFF(25),o.k0s()(),o.j41(26,"div")(27,"div",3),o.EFF(28),o.nI1(29,"translate"),o.k0s(),o.j41(30,"div",9),o.EFF(31),o.nVh(32,nl,4,6,"span"),o.k0s()(),o.nVh(33,il,6,4,"div"),o.nVh(34,sl,6,4,"div"),o.j41(35,"div")(36,"div",3),o.EFF(37),o.nI1(38,"translate"),o.k0s(),o.j41(39,"div",10),o.EFF(40),o.k0s()(),o.nVh(41,ol,6,4,"div"),o.j41(42,"div")(43,"div",3),o.EFF(44),o.nI1(45,"translate"),o.k0s(),o.j41(46,"div",11),o.EFF(47),o.k0s()()()(),o.j41(48,"mat-card-actions",12),o.nVh(49,hl,3,0,"div",13),o.nVh(50,dl,7,6,"div",14),o.nVh(51,ul,4,7,"div",15),o.nVh(52,fl,10,13,"div",16),o.k0s()),2&e){const t=o.XpG();o.R7$(2),o.vxM(t.getStatusText(t.object.status,t.object.notice)?2:-1),o.R7$(4),o.JRh(o.bMT(7,24,"ADDRESS")),o.R7$(3),o.JRh(null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.location||null==t.object.primaryObject.location.address?null:t.object.primaryObject.location.address.address),o.R7$(2),o.Lme(" ",null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.location||null==t.object.primaryObject.location.address?null:t.object.primaryObject.location.address.postcode," ",null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.location||null==t.object.primaryObject.location.address?null:t.object.primaryObject.location.address.city," "),o.R7$(3),o.JRh(o.bMT(15,26,"AREA")),o.R7$(3),o.JRh(t.formatArea(null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.size?null:t.object.primaryObject.size.area,0)),o.R7$(2),o.JRh(null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.size?null:t.object.primaryObject.size.roomsDisplayName),o.R7$(3),o.JRh(o.bMT(23,28,"OBJECTNO")),o.R7$(3),o.JRh(null==t.object||null==t.object.primaryObject?null:t.object.primaryObject.number),o.R7$(3),o.JRh(o.bMT(29,30,"RENT")),o.R7$(3),o.SpI(" ",t.formatNumber(null==t.object||null==t.object.pricing?null:t.object.pricing.price,0)," "),o.R7$(),o.vxM(null!=t.object&&null!=t.object.pricing&&t.object.pricing.price?32:-1),o.R7$(),o.vxM(null!=t.object&&null!=t.object.primaryObject&&null!=t.object.primaryObject.identity&&t.object.primaryObject.identity.officialNumber?33:-1),o.R7$(),o.vxM(null!=t.object&&null!=t.object.primaryObject&&null!=t.object.primaryObject.location&&t.object.primaryObject.location.signNumber?34:-1),o.R7$(3),o.JRh(o.bMT(38,32,"CONTRACTPERIODFROM")),o.R7$(3),o.JRh(t.formatDate(null==t.object||null==t.object.status?null:t.object.status.startDate)),o.R7$(),o.vxM(null!=t.object&&null!=t.object.status&&t.object.status.endDate?41:-1),o.R7$(3),o.JRh(o.bMT(45,34,"NOTICEPERIOD")),o.R7$(3),o.JRh(null==t.object||null==t.object.notice?null:t.object.notice.tenantPeriodDescription),o.R7$(2),o.vxM((null==t.contractsItemFloorPlans||null==t.contractsItemFloorPlans.items?null:t.contractsItemFloorPlans.items.length)>0?49:-1),o.R7$(),o.vxM(null!=t.object&&t.object.report?50:-1),o.R7$(),o.vxM(t.allowDigitalNotice?51:-1),o.R7$(),o.vxM(!t.signingId||null!=t.object&&null!=t.object.notice&&t.object.notice.dateOfNotice?-1:52)}}let gl=(()=>{class e{set contractId(t){this._contractId=t,this.getContractsItemNotice(this._contractId),this.clientConfigurationService.getClientConfigurationFeatures().subscribe(i=>{i?.contractfloorplan?.enabled&&this.getContractsItemFloorPlans()})}set object(t){this.objectInt=t,"Ingen"===this.objectInt?.primaryObject?.size?.roomsDisplayName&&(this.objectInt.primaryObject.size.roomsDisplayName="")}get object(){return this.objectInt}constructor(t,i,s,a,r,l){this.translate=t,this.contractService=i,this.fileService=s,this.dialog=a,this.clientConfigurationService=r,this.mediaQueryService=l,this.noticeLink=Jn.i.NOTICE,this.signingsLink=Jn.t.SIGNINGS}formatDate(t){return ut()(t).format("YYYY-MM-DD")}
1formatNumber(t,i){return t?t.toFixed(i):""}formatArea(t,i){const s=this.formatNumber(t,i);return s?this.translate.instant("CA")+" "+s+" "+this.translate.instant("M2"):"-"}getStatusText(t,i){switch(!0){case t.active&&!t.future&&!i?.dateOfNotice:return this.translate.instant("ACTIVELY");case t.expired:return this.translate.instant("HISTORIC");case t.future:return this.translate.instant("COMING");case!!i?.dateOfNotice:return this.translate.instant("TERMINATED")}}getReport(){this.contractService.getReport(this._contractId).subscribe(t=>{t&&this.fileService.saveBlobWithFilename(t,`Avtal_${this.objectInt.number}.pdf`)})}getContractsItemNotice(t){this.contractService.getContractsItemNotice(t).subscribe(i=>{this.allowDigitalNotice=i?.allowDigitalNotice,this.signingId=i?.signingId})}deleteContractsItemNotice(){this.dialog.open(qr.w,{data:{heading:null,text:this.translate.instant("CONFIRMREMOVENOTICE"),dialogChoices:tl.$.YesNo},scrollStrategy:new Pt.t0,ariaLabel:this.translate.instant("CONFIRMREMOVENOTICE"),autoFocus:!1}).afterClosed().subscribe(i=>{"yes"===i&&this.contractService.deleteContractsItemNotice(this._contractId).subscribe(()=>{this.getContractsItemNotice(this._contractId)})})}getContractsItemFloorPlans(){this.contractService.getContractsItemFloorPlans(this._contractId).subscribe(t=>{this.contractsItemFloorPlans=t})}getContractsItemFloorPlansItem(t,i){this.contractService.getContractsItemFloorPlansItem(this._contractId,t).subscribe(s=>{if(s){const r=s?.type?.split("/").pop();this.fileService.saveBlobWithFilename(s,`${i}.${r}`)}})}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(K.c$),o.rXU($t.y),o.rXU(Kn.E),o.rXU(es.bZ),o.rXU(Je.t),o.rXU(Nt.M))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-object-widget"]],inputs:{contractId:"contractId",object:"object"},standalone:!1,decls:2,vars:3,consts:[[1,"badge-container"],["data-mom-test","MyPages_Agreement_Status",1,"badge-info",3,"text"],[1,"grid","object-info"],[1,"label"],["data-mom-test","MyPages_Agreement_StreetAddress"],["data-mom-test","MyPages_Agreement_PostCodeAndCity"],["data-mom-test","MyPages_Agreement_ObjectArea"],["data-mom-test","MyPages_Agreement_ObjectRooms"],["data-mom-test","MyPages_Agreement_ObjectNumber"],["data-mom-test","MyPages_Agreement_ObjectPrice"],["data-mom-test","MyPages_Agreement_AgreementPeriodFrom"],["data-mom-test","MyPages_Agreement_NoticePeriod"],["align","end"],[1,"floor-plan-buttons-container"],[1,"report-button-container"],[1,"notice-button-container"],[1,"signing-button-container"],["data-mom-test","MyPages_Agreement_OfficialNumber"],["data-mom-test","MyPages_Agreement_SignNumber"],["data-mom-test","MyPages_Agreement_AgreementPeriodTo"],["matButton","filled","data-mom-test","MyPages_Agreement_FloorPlan",1,"floor-plan-button"],["matButton","filled","data-mom-test","MyPages_Agreement_FloorPlan",1,"floor-plan-button",3,"click"],["matButton","filled",3,"click"],["matButton","filled","data-mom-test","MyPages_Agreement_StartTerminationProcess",3,"routerLink"],["matButton","filled","data-mom-test","MyPages_Agreement_GoToSignTermination",1,"sign-notice-button",3,"routerLink"],["matButton","filled","data-mom-test","MyPages_Agreement_CancelTermination",1,"delete-notice-button",3,"click"]],template:function(i,s){1&i&&(o.j41(0,"mat-card"),o.nVh(1,pl,53,36),o.k0s()),2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile()),o.R7$(),o.vxM(s.object?1:-1))},dependencies:[be.Wk,is.Y,ye.An,ne.$z,st.RN,st.YY,st.m2,K.D9],styles:['mat-card[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap}.object-image[_ngcontent-%COMP%]{text-align:center;justify-content:center;margin-bottom:25px}.object-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%}.flex-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-grow:1;flex-flow:wrap}.flex-row[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{flex-grow:1}.is-mobile[_nghost-%COMP%]   .flex-row[_ngcontent-%COMP%], .is-mobile   [_nghost-%COMP%]   .flex-row[_ngcontent-%COMP%]{width:100%}.is-mobile[_nghost-%COMP%]   .grid[_ngcontent-%COMP%], .is-mobile   [_nghost-%COMP%]   .grid[_ngcontent-%COMP%]{grid-template-areas:"a"}.grid[_ngcontent-%COMP%]{width:100%;display:grid;grid-template-areas:"a a";grid-gap:10px;grid-auto-rows:1fr 1fr 1fr}.label[_ngcontent-%COMP%]{margin:10px 0 0;font-weight:700}.object-info[_ngcontent-%COMP%]{padding:10px}.report-button-container[_ngcontent-%COMP%], .notice-button-container[_ngcontent-%COMP%], .signing-button-container[_ngcontent-%COMP%], .floor-plan-buttons-container[_ngcontent-%COMP%]{padding:10px;align-self:flex-end}.badge-container[_ngcontent-%COMP%]{position:absolute;right:15px;top:10px}.pdf-icon[_ngcontent-%COMP%]{margin-right:10px}.sign-notice-button[_ngcontent-%COMP%], .floor-plan-button[_ngcontent-%COMP%]{margin-right:5px}.delete-notice-button[_ngcontent-%COMP%], .floor-plan-button[_ngcontent-%COMP%]{margin-top:5px}.is-mobile[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]   .report-button-container[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]   .notice-button-container[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]   .signing-button-container[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]   .floor-plan-buttons-container[_ngcontent-%COMP%]{width:100%}mat-card-actions[_ngcontent-%COMP%]{flex-wrap:wrap}']})}}return e})();function ie(e){return e+.5|0}const bt=(e,n,t)=>Math.max(Math.min(e,t),n);function xe(e){return bt(ie(2.55*e),0,255)}function kt(e){return bt(ie(255*e),0,255)}function yt(e){return bt(ie(e/2.55)/100,0,1)}function os(e){return bt(ie(100*e),0,100)}const ht={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},Qn=[..."0123456789ABCDEF"],ml=e=>Qn[15&e],_l=e=>Qn[(240&e)>>4]+Qn[15&e],Qe=e=>(240&e)>>4==(15&e);const Cl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function as(e,n,t){const i=n*Math.min(t,1-t),s=(a,r=(a+e/30)%12)=>t-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Ml(e,n,t){const i=(s,a=(s+e/60)%6)=>t-t*n*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function Sl(e,n,t){const i=as(e,1,.5);let s;for(n+t>1&&(s=1/(n+t),n*=s,t*=s),s=0;s<3;s++)i[s]*=1-n-t,i[s]+=n;return i}function Zn(e){const t=e.r/255,i=e.g/255,s=e.b/255,a=Math.max(t,i,s),r=Math.min(t,i,s),l=(a+r)/2;let c,h,d;return a!==r&&(d=a-r,h=l>.5?d/(2-a-r):d/(a+r),c=function Ol(e,n,t,i,s){return e===s?(n-t)/i+(n<t?6:0):n===s?(t-e)/i+2:(e-n)/i+4}
1(t,i,s,d,a),c=60*c+.5),[0|c,h||0,l]}function qn(e,n,t,i){return(Array.isArray(n)?e(n[0],n[1],n[2]):e(n,t,i)).map(kt)}function ti(e,n,t){return qn(as,e,n,t)}function rs(e){return(e%360+360)%360}const ls={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"},cs={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"};let Ze;const El=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,ei=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,se=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function qe(e,n,t){if(e){let i=Zn(e);i[n]=Math.max(0,Math.min(i[n]+i[n]*t,0===n?360:1)),i=ti(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function hs(e,n){return e&&Object.assign(n||{},e)}function ds(e){var n={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(n={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(n.a=kt(e[3]))):(n=hs(e,{r:0,g:0,b:0,a:1})).a=kt(n.a),n}function Ll(e){return"r"===e.charAt(0)?function wl(e){const n=El.exec(e);let i,s,a,t=255;if(n){if(n[7]!==i){const r=+n[7];t=n[8]?xe(r):bt(255*r,0,255)}return i=+n[1],s=+n[3],a=+n[5],i=255&(n[2]?xe(i):bt(i,0,255)),s=255&(n[4]?xe(s):bt(s,0,255)),a=255&(n[6]?xe(a):bt(a,0,255)),{r:i,g:s,b:a,a:t}}}(e):function kl(e){const n=Cl.exec(e);let i,t=255;if(!n)return;n[5]!==i&&(t=n[6]?xe(+n[5]):kt(+n[5]));const s=rs(+n[2]),a=+n[3]/100,r=+n[4]/100;return i="hwb"===n[1]?function Tl(e,n,t){return qn(Sl,e,n,t)}(s,a,r):"hsv"===n[1]?function Pl(e,n,t){return qn(Ml,e,n,t)}(s,a,r):ti(s,a,r),{r:i[0],g:i[1],b:i[2],a:t}}(e)}class oe{constructor(n){if(n instanceof oe)return n;const t=typeof n;let i;"object"===t?i=ds(n):"string"===t&&(i=function yl(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*ht[e[1]],g:255&17*ht[e[2]],b:255&17*ht[e[3]],a:5===n?17*ht[e[4]]:255}:(7===n||9===n)&&(t={r:ht[e[1]]<<4|ht[e[2]],g:ht[e[3]]<<4|ht[e[4]],b:ht[e[5]]<<4|ht[e[6]],a:9===n?ht[e[7]]<<4|ht[e[8]
1]:255})),t}(n)||function Al(e){Ze||(Ze=function Il(){const e={},n=Object.keys(cs),t=Object.keys(ls);let i,s,a,r,l;for(i=0;i<n.length;i++){for(r=l=n[i],s=0;s<t.length;s++)a=t[s],l=l.replace(a,ls[a]);a=parseInt(cs[r],16),e[l]=[a>>16&255,a>>8&255,255&a]}return e}(),Ze.transparent=[0,0,0,0]);const n=Ze[e.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:4===n.length?n[3]:255}}(n)||Ll(n)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var n=hs(this._rgb);return n&&(n.a=yt(n.a)),n}set rgb(n){this._rgb=ds(n)}rgbString(){return this._valid?function Dl(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${yt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?function vl(e){var n=(e=>Qe(e.r)&&Qe(e.g)&&Qe(e.b)&&Qe(e.a))(e)?ml:_l;return e?"#"+n(e.r)+n(e.g)+n(e.b)+((e,n)=>e<255?n(e):"")(e.a,n):void 0}(this._rgb):void 0}hslString(){return this._valid?function Fl(e){if(!e)return;const n=Zn(e),t=n[0],i=os(n[1]),s=os(n[2]);return e.a<255?`hsla(${t}, ${i}%, ${s}%, ${yt(e.a)})`:`hsl(${t}, ${i}%, ${s}%)`}(this._rgb):void 0}mix(n,t){if(n){const i=this.rgb,s=n.rgb;let a;const r=t===a?.5:t,l=2*r-1,c=i.a-s.a,h=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;a=1-h,i.r=255&h*i.r+a*s.r+.5,i.g=255&h*i.g+a*s.g+.5,i.b=255&h*i.b+a*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(n,t){return n&&(this._rgb=function jl(e,n,t){const i=se(yt(e.r)),s=se(yt(e.g)),a=se(yt(e.b));return{r:kt(ei(i+t*(se(yt(n.r))-i))),g:kt(ei(s+t*(se(yt(n.g))-s))),b:kt(ei(a+t*(se(yt(n.b))-a))),a:e.a+t*(n.a-e.a)}}(this._rgb,n._rgb,t)),this}clone(){return new oe(this.rgb)}alpha(n){return this._rgb.a=kt(n),this}clearer(n){return this._rgb.a*=1-n,this}greyscale(){const n=this._rgb,t=ie(.3*n.r+.59*n.g+.11*n.b);return n.r=n.g=n.b=t,this}opaquer(n){return this._rgb.a*=1+n,this}negate(){const n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return qe(this._rgb,2,n),this}darken(n){return qe(this._rgb,2,-n),this}saturate(n){return qe(this._rgb,1,n),this}desaturate(n){return qe(this._rgb,1,-n),this}rotate(n){return function Rl(e,n){var t=Zn(e);t[0]=rs(t[0]+n),t=ti(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,n),this}}function xt(){}const Nl=(()=>{let e=0;return()=>e++})();function A(e){return null==e}function B(e){if(Array.isArray&&Array.isArray(e))return!0;const n=Object.prototype.toString.call(e);return"[object"===n.slice(0,7)&&"Array]"===n.slice(-6)}function E(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function G(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function rt(e,n){return G(e)?e:n}function R(e,n){return typeof e>"u"?n:e}const us=(e,n)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*n:+e;function N(e,n,t){if(e&&"function"==typeof e.call)return e.apply(t,n)}function j(e,n,t,i){let s,a,r;if(B(e))if(a=e.length,i)for(s=a-1;s>=0;s--)n.call(t,e[s],s);else for(s=0;s<a;s++)n.call(t,e[s],s);else if(E(e))for(r=Object.keys(e),a=r.length,s=0;s<a;s++)n.call(t,e[r[s]],r[s])}function tn(e,n){let t,i,s,a;if(!e||!n||e.length!==n.length)return!1;for(t=0,i=e.length;t<i;++t)if(s=e[t],a=n[t],s.datasetIndex!==a.datasetIndex||s.index!==a.index)return!1;return!0}function en(e){if(B(e))return e.map(en);if(E(e)){const n=Object.create(null),t=Object.keys(e),i=t.length;let s=0;for(;s<i;++s)n[t[s]]=en(e[t[s]]);return n}return e}function fs(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function Bl(e,n,t,i){if(!fs(e))return;const s=n[e],a=t[e];E(s)&&E(a)?ve(s,a,i):n[e]=en(a)}function ve(e,n,t){const i=B(n)?n:[n],s=i.length;if(!E(e))return e;const a=(t=t||{}).merger||Bl;let r;for(let l=0;l<s;++l){if(r=i[l],!E(r))continue;const c=Object.keys(r);for(let h=0,d=c.length;h<d;++h)a(c[h],e,r,t)}return e}function Ce(e,n){return ve(e,n,{merger:Vl})}function Vl(e,n,t){if(!fs(e))return;const i=n[e],s=t[e];E(i)&&E(s)?Ce(i,s):Object.prototype.hasOwnProperty.call(n,e)||(n[e]=en(s))}const ps={"":e=>e,x:e=>e.x,y:e=>e.y};function Rt(e,n){return(ps[n]||(ps[n]=function Hl(e){const n=function zl(e){const n=e.split("."),t=[];let i="";for(const s of n)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}(e);return t=>{for(const i of n){if(""===i)break;t=t&&t[i]}return t}}(n)))(e)}function ni(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Me=e=>typeof e<"u",Ft=e=>"function"==typeof e,gs=(e,n)=>{if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0},D=Math.PI,V=2*D,Wl=V+D,nn=Number.POSITIVE_INFINITY,Xl=D/180,W=D/2,Bt=D/4,ms=2*D/3,It=Math.log10,gt=Math.sign;function Se(e,n,t){return Math.abs(e-n)<t}function _s(e){const n=Math.round(e);e=Se(e,n,e/1e3)?n:e;const t=Math.pow(10,Math.floor(It(e))),i=e/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function ae(e){return!function Yl(e){return"symbol"==typeof e||"object"==typeof e&&null!==e&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function bs(e,n,t){let i,s,a;for(i=0,s=e.length;i<s;
1i++)a=e[i][t],isNaN(a)||(n.min=Math.min(n.min,a),n.max=Math.max(n.max,a))}function ft(e){return e*(D/180)}function ii(e){return e*(180/D)}function ys(e){if(!G(e))return;let n=1,t=0;for(;Math.round(e*n)/n!==e;)n*=10,t++;return t}function xs(e,n){const t=n.x-e.x,i=n.y-e.y,s=Math.sqrt(t*t+i*i);let a=Math.atan2(i,t);return a<-.5*D&&(a+=V),{angle:a,distance:s}}function si(e,n){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function Jl(e,n){return(e-n+Wl)%V-D}function q(e){return(e%V+V)%V}function Oe(e,n,t,i){const s=q(e),a=q(n),r=q(t),l=q(a-s),c=q(r-s),h=q(s-a),d=q(s-r);return s===a||s===r||i&&a===r||l>c&&h<d}function J(e,n,t){return Math.max(n,Math.min(t,e))}function vt(e,n,t,i=1e-6){return e>=Math.min(n,t)-i&&e<=Math.max(n,t)+i}function oi(e,n,t){t=t||(r=>e[r]<n);let a,i=e.length-1,s=0;for(;i-s>1;)a=s+i>>1,t(a)?s=a:i=a;return{lo:s,hi:i}}const Ct=(e,n,t,i)=>oi(e,t,i?s=>{const a=e[s][n];return a<t||a===t&&e[s+1][n]===t}:s=>e[s][n]<t),Zl=(e,n,t)=>oi(e,t,i=>e[i][n]>=t),vs=["push","pop","shift","splice","unshift"];function Cs(e,n){const t=e._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(n);-1!==s&&i.splice(s,1),!(i.length>0)&&(vs.forEach(a=>{delete e[a]}),delete e._chartjs)}function Ms(e){const n=new Set(e);return n.size===e.length?e:Array.from(n)}const Ss=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function Os(e,n){let t=[],i=!1;return function(...s){t=s,i||(i=!0,Ss.call(window,()=>{i=!1,e.apply(n,t)}))}}const ai=e=>"start"===e?"left":"end"===e?"right":"center",tt=(e,n,t)=>"start"===e?n:"end"===e?t:(n+t)/2;function Ts(e,n,t){const i=n.length;let s=0,a=i;if(e._sorted){const{iScale:r,vScale:l,_parsed:c}=e,h=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,d=r.axis,{min:u,max:f,minDefined:p,maxDefined:g}=r.getUserBounds();if(p){if(s=Math.min(Ct(c,d,u).lo,t?i:Ct(n,d,r.getPixelForValue(u)).lo),h){const m=c.slice(0,s+1).reverse().findIndex(_=>!A(_[l.axis]));s-=Math.max(0,m)}s=J(s,0,i-1)}if(g){let m=Math.max(Ct(c,r.axis,f,!0).hi+1,t?0:Ct(n,d,r.getPixelForValue(f),!0).hi+1);if(h){const _=c.slice(m-1).findIndex(b=>!A(b[l.axis]));m+=Math.max(0,_)}a=J(m,s,i)-s}else a=i-s}return{start:s,count:a}}function Ps(e){const{xScale:n,yScale:t,_scaleRanges:i}=e,s={xmin:n.min,xmax:n.max,ymin:t.min,ymax:t.max};if(!i)return e._scaleRanges=s,!0;const a=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),a}const sn=e=>0===e||1===e,ks=(e,n,t)=>-Math.pow(2,10*(e-=1))*Math.sin((e-n)*V/t),Rs=(e,n,t)=>Math.pow(2,-10*e)*Math.sin((e-n)*V/t)+1,Te={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*W),easeOutSine:e=>Math.sin(e*W),easeInOutSine:e=>-.5*(Math.cos(D*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>sn(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>sn(e)?e:ks(e,.075,.3),easeOutElastic:e=>sn(e)?e:Rs(e,.075,.3),easeInOutElastic:e=>sn(e)?e:e<.5?.5*ks(2*e,.1125,.45):.5+.5*Rs(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let n=1.70158;return(e/=.5)<1?e*e*((1+(n*=1.525))*e-n)*.5:.5*((e-=2)*e*((1+(n*=1.525))*e+n)+2)},easeInBounce:e=>1-Te.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?.5*Te.easeInBounce(2*e):.5*Te.easeOutBounce(2*e-1)+.5};function ri(e){if(e&&"object"==typeof e){const n=e.toString();return"[object CanvasPattern]"===n||"[object CanvasGradient]"===n}return!1}function Fs(e){return ri(e)?e:new oe(e)}function li(e){return ri(e)?e:new oe(e).saturate(.5).darken(.1).hexString()}const ic=["x","y","borderWidth","radius","tension"],sc=["color","borderColor","backgroundColor"],Is=new Map;function Pe(e,n,t){return function rc(e,n){n=n||{};const t=e+JSON.stringify(n);let i=Is.get(t);
vendor: 1,936 bytes, line 1
1return i||(i=new Intl.NumberFormat(e,n),Is.set(t,i)),i}(n,t).format(e)}const As={values:e=>B(e)?e:""+e,numeric(e,n,t){if(0===e)return"0";const i=this.chart.options.locale;let s,a=e;if(t.length>1){const h=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(h<1e-4||h>1e15)&&(s="scientific"),a=function lc(e,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}(e,t)}const r=It(Math.abs(a)),l=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),c={notation:s,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Pe(e,i,c)},logarithmic(e,n,t){if(0===e)return"0";const i=t[n].significand||e/Math.pow(10,Math.floor(It(e)));return[1,2,3,5,10,15].includes(i)||n>.8*t.length?As.numeric.call(this,e,n,t):""}};var on={formatters:As};const Vt=Object.create(null),ci=Object.create(null);function ke(e,n){if(!n)return e;const t=n.split(".");for(let i=0,s=t.length;i<s;++i){const a=t[i];e=e[a]||(e[a]=Object.create(null))}return e}function hi(e,n,t){return"string"==typeof n?ve(ke(e,n),t):ve(ke(e,""),n)}class hc{constructor(n,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>li(s.backgroundColor),this.hoverBorderColor=(i,s)=>li(s.borderColor),this.hoverColor=(i,s)=>li(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
vendor: 4,255 bytes, line 1
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(t)}set(n,t){return hi(this,n,t)}get(n){return ke(this,n)}describe(n,t){return hi(ci,n,t)}override(n,t){return hi(Vt,n,t)}route(n,t,i,s){const a=ke(this,n),r=ke(this,i),l="_"+t;Object.defineProperties(a,{[l]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){const c=this[l],h=r[s];return E(c)?Object.assign({},h,c):R(c,h)},set(c){this[l]=c}}})}apply(n){n.forEach(t=>t(this))}}var $=new hc({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function oc(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>"onProgress"!==n&&"onComplete"!==n&&"fn"!==n}),e.set("animations",{colors:{type:"color",properties:sc},numbers:{type:"number",properties:ic}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>0|n}}}})},function ac(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function cc(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:on.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&"callback"!==n&&"parser"!==n,_indexable:n=>"borderDash"!==n&&"tickBorderDash"!==n&&"dash"!==n}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:n=>"backdropPadding"!==n&&"callback"!==n,_indexable:n=>"backdropPadding"!==n})}]);function an(e,n,t,i,s){let a=n[s];return a||(a=n[s]=e.measureText(s).width,t.push(s)),a>i&&(i=a),i}function uc(e,n,t,i){let s=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==n&&(s=i.data={},a=i.garbageCollect=[],i.font=n),e.save(),e.font=n;let r=0;const l=t.length;let c,h,d,u,f;for(c=0;c<l;c++)if(u=t[c],null==u||B(u)){if(B(u))for(h=0,d=u.length;h<d;h++)f=u[h],null!=f&&!B(f)&&(r=an(e,s,a,r,f))}else r=an(e,s,a,r,u);e.restore();const p=a.length/2;if(p>t.length){for(c=0;c<p;c++)delete s[a[c]];a.splice(0,p)}return r}function zt(e,n,t){const i=e.currentDevicePixelRatio,s=0!==t?Math.max(t/2,.5):0;return Math.round((n-s)*i)/i+s}function Es(e,n){!n&&!e||((n=n||e.getContext("2d")).save(),n.resetTransform(),n.clearRect(0,0,e.width,e.height),n.restore())}function di(e,n,t,i){ws(e,n,t,i,null)}function ws(e,n,t,i,s){let a,r,l,c,h,d,u,f;const p=n.pointStyle,g=n.rotation,m=n.radius;let _=(g||0)*Xl;if(p&&"object"==typeof p&&(a=p.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(t,i),e.rotate(_),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:s?e.ellipse(t,i,s/2,m,0,0,V):e.arc(t,i,m,0,V),e.closePath();break;case"triangle":d=s?s/2:m,e.moveTo(t+Math.sin(_)*d,i-Math.cos(_)*m),_+=ms,e.lineTo(t+Math.sin(_)*d,i-Math.cos(_)*m),_+=ms,e.lineTo(t+Math.sin(_)*d,i-Math.cos(_)*m),e.closePath();break;case"rectRounded":h=.516*m,c=m-h,r=Math.cos(_+Bt)*c,u=Math.cos(_+Bt)*(s?s/2-h:c),l=Math.sin(_+Bt)*c,f=Math.sin(_+Bt)*(s?s/2-h:c),e.arc(t-u,i-l,h,_-D,_-W),e.arc(t+f,i-r,h,_-W,_),e.arc(t+u,i+l,h,_,_+W),e.arc(t-f,i+r,h,_+W,_+D),e.closePath();break;
vendor: 6,368 bytes, line 1
1case"rect":if(!g){c=Math.SQRT1_2*m,d=s?s/2:c,e.rect(t-d,i-c,2*d,2*c);break}_+=Bt;case"rectRot":u=Math.cos(_)*(s?s/2:m),r=Math.cos(_)*m,l=Math.sin(_)*m,f=Math.sin(_)*(s?s/2:m),e.moveTo(t-u,i-l),e.lineTo(t+f,i-r),e.lineTo(t+u,i+l),e.lineTo(t-f,i+r),e.closePath();break;case"crossRot":_+=Bt;case"cross":u=Math.cos(_)*(s?s/2:m),r=Math.cos(_)*m,l=Math.sin(_)*m,f=Math.sin(_)*(s?s/2:m),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-r),e.lineTo(t-f,i+r);break;case"star":u=Math.cos(_)*(s?s/2:m),r=Math.cos(_)*m,l=Math.sin(_)*m,f=Math.sin(_)*(s?s/2:m),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-r),e.lineTo(t-f,i+r),_+=Bt,u=Math.cos(_)*(s?s/2:m),r=Math.cos(_)*m,l=Math.sin(_)*m,f=Math.sin(_)*(s?s/2:m),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-r),e.lineTo(t-f,i+r);break;case"line":r=s?s/2:Math.cos(_)*m,l=Math.sin(_)*m,e.moveTo(t-r,i-l),e.lineTo(t+r,i+l);break;case"dash":e.moveTo(t,i),e.lineTo(t+Math.cos(_)*(s?s/2:m),i+Math.sin(_)*m);break;case!1:e.closePath()}e.fill(),n.borderWidth>0&&e.stroke()}}function Mt(e,n,t){return t=t||.5,!n||e&&e.x>n.left-t&&e.x<n.right+t&&e.y>n.top-t&&e.y<n.bottom+t}function rn(e,n){e.save(),e.beginPath(),e.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),e.clip()}function ln(e){e.restore()}function fc(e,n,t,i,s){if(!n)return e.lineTo(t.x,t.y);if("middle"===s){const a=(n.x+t.x)/2;e.lineTo(a,n.y),e.lineTo(a,t.y)}else"after"===s!=!!i?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(t.x,t.y)}function pc(e,n,t,i){if(!n)return e.lineTo(t.x,t.y);e.bezierCurveTo(i?n.cp1x:n.cp2x,i?n.cp1y:n.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function mc(e,n,t,i,s){if(s.strikethrough||s.underline){const a=e.measureText(i),r=n-a.actualBoundingBoxLeft,l=n+a.actualBoundingBoxRight,h=t+a.actualBoundingBoxDescent,d=s.strikethrough?(t-a.actualBoundingBoxAscent+h)/2:h;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,d),e.lineTo(l,d),e.stroke()}}function _c(e,n){const t=e.fillStyle;e.fillStyle=n.color,e.fillRect(n.left,n.top,n.width,n.height),e.fillStyle=t}function Ht(e,n,t,i,s,a={}){const r=B(n)?n:[n],l=a.strokeWidth>0&&""!==a.strokeColor;let c,h;for(e.save(),e.font=s.string,function gc(e,n){n.translation&&e.translate(n.translation[0],n.translation[1]),A(n.rotation)||e.rotate(n.rotation),n.color&&(e.fillStyle=n.color),n.textAlign&&(e.textAlign=n.textAlign),n.textBaseline&&(e.textBaseline=n.textBaseline)}(e,a),c=0;c<r.length;++c)h=r[c],a.backdrop&&_c(e,a.backdrop),l&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),A(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(h,t,i,a.maxWidth)),e.fillText(h,t,i,a.maxWidth),mc(e,t,i,h,a),i+=Number(s.lineHeight);e.restore()}function Re(e,n){const{x:t,y:i,w:s,h:a,radius:r}=n;e.arc(t+r.topLeft,i+r.topLeft,r.topLeft,1.5*D,D,!0),e.lineTo(t,i+a-r.bottomLeft),e.arc(t+r.bottomLeft,i+a-r.bottomLeft,r.bottomLeft,D,W,!0),e.lineTo(t+s-r.bottomRight,i+a),e.arc(t+s-r.bottomRight,i+a-r.bottomRight,r.bottomRight,W,0,!0),e.lineTo(t+s,i+r.topRight),e.arc(t+s-r.topRight,i+r.topRight,r.topRight,0,-W,!0),e.lineTo(t+r.topLeft,i)}const bc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xc(e,n){const t=(""+e).match(bc);if(!t||"normal"===t[1])return 1.2*n;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100}return n*e}const vc=e=>+e||0;function ui(e,n){const t={},i=E(n),s=i?Object.keys(n):n,a=E(e)?i?r=>R(e[r],e[n[r]]):r=>e[r]:()=>e;for(const r of s)t[r]=vc(a(r));return t}function Ds(e){return ui(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Gt(e){return ui(e,["topLeft","topRight","bottomLeft","bottomRight"])}function et(e){const n=Ds(e);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function U(e,n){let t=R((e=e||{}).size,(n=n||$.font).size);"string"==typeof t&&(t=parseInt(t,10));let i=R(e.style,n.style);i&&!(""+i).match(yc)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(e.family,n.family),lineHeight:xc(R(e.lineHeight,n.lineHeight),t),size:t,style:i,weight:R(e.weight,n.weight),string:""};return s.string=function dc(e){return!e||A(e.size)||A(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(s),s}function Fe(e,n,t,i){let a,r,l,s=!0;for(a=0,r=e.length;a<r;++a)if(l=e[a],void 0!==l&&(void 0!==n&&"function"==typeof l&&(l=l(n),s=!1),void 0!==t&&B(l)&&(l=l[t%l.length],s=!1),void 0!==l))return i&&!s&&(i.cacheable=!1),l}function At(e,n){return Object.assign(Object.create(e),n)}function fi(e,n=[""],t,i,s=()=>e[0]){const a=t||e;typeof i>"u"&&(i=Bs("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:s,override:l=>fi([l,...e],n,a,i)};return new Proxy(r,{deleteProperty:(l,c)=>(delete l[c],delete l._keys,delete e[0][c],!0),get:(l,c)=>Ls(l,c,()=>function Fc(e,n,t,i){let s;for(const a of n)if(s=Bs(Mc(a,e),t),typeof s<"u")return pi(e,s)?gi(t,i,e,s):s}(c,n,e,l)),getOwnPropertyDescriptor:(l,c)=>Reflect.getOwnPropertyDescriptor(l._scopes[0],c),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(l,c)=>Vs(l).includes(c),ownKeys:l=>Vs(l),set(l,c,h){const d=l._storage||(l._storage=s());return l[c]=d[c]=h,delete l._keys,!0}})}function re(e,n,t,i){const s={_cacheable:!1,_proxy:e,_context:n,_subProxy:t,_stack:new Set,_descriptors:js(e,i),setContext:a=>re(e,a,t,i),override:a=>re(e.override(a),n,t,i)};return new Proxy(s,{deleteProperty:(a,r)=>(delete a[r],delete e[r],!0),get:(a,r,l)=>Ls(a,r,()=>function Sc(e,n,t){const{_proxy:i,_context:s,_subProxy:a,_descriptors:r}=e;let l=i[n];return Ft(l)&&r.isScriptable(n)&&(l=function Oc(e,n,t,i){const{_proxy:s,_context:a,_subProxy:r,_stack:l}=t;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=n(a,r||i);return l.delete(e),pi(e,c)&&(c=gi(s._scopes,s,e,c)),c}(n,l,e,t)),B(l)&&l.length&&(l=function Tc(e,n,t,i){const{_proxy:s,_context:a,_subProxy:r,_descriptors:l}=t;if(typeof a.index<"u"&&i(e))return n[a.index%n.length];if(E(n[0])){const c=n,h=s._scopes.filter(d=>d!==c);n=[];for(const d of c){const u=gi(h,s,e,d);n.push(re(u,a,r&&r[e],l))}}return n}(n,l,e,r.isIndexable)),pi(n,l)&&(l=re(l,s,a&&a[n],r)),l}(a,r,l)),getOwnPropertyDescriptor:(a,r)=>a._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(a,r)=>
1Reflect.has(e,r),ownKeys:()=>Reflect.ownKeys(e),set:(a,r,l)=>(e[r]=l,delete a[r],!0)})}function js(e,n={scriptable:!0,indexable:!0}){const{_scriptable:t=n.scriptable,_indexable:i=n.indexable,_allKeys:s=n.allKeys}=e;return{allKeys:s,scriptable:t,indexable:i,isScriptable:Ft(t)?t:()=>t,isIndexable:Ft(i)?i:()=>i}}const Mc=(e,n)=>e?e+ni(n):n,pi=(e,n)=>E(n)&&"adapters"!==e&&(null===Object.getPrototypeOf(n)||n.constructor===Object);function Ls(e,n,t){if(Object.prototype.hasOwnProperty.call(e,n)||"constructor"===n)return e[n];const i=t();return e[n]=i,i}function Ns(e,n,t){return Ft(e)?e(n,t):e}const Pc=(e,n)=>!0===e?n:"string"==typeof e?Rt(n,e):void 0;function kc(e,n,t,i,s){for(const a of n){const r=Pc(t,a);if(r){e.add(r);const l=Ns(r._fallback,t,s);if(typeof l<"u"&&l!==t&&l!==i)return l}else if(!1===r&&typeof i<"u"&&t!==i)return null}return!1}function gi(e,n,t,i){const s=n._rootScopes,a=Ns(n._fallback,t,i),r=[...e,...s],l=new Set;l.add(i);let c=$s(l,r,t,a||t,i);return!(null===c||typeof a<"u"&&a!==t&&(c=$s(l,r,a,c,i),null===c))&&fi(Array.from(l),[""],s,a,()=>function Rc(e,n,t){const i=e._getTarget();n in i||(i[n]={});const s=i[n];return B(s)&&E(t)?t:s||{}}(n,t,i))}function $s(e,n,t,i,s){for(;t;)t=kc(e,n,t,i,s);return t}function Bs(e,n){for(const t of n){if(!t)continue;const i=t[e];if(typeof i<"u")return i}}function Vs(e){let n=e._keys;return n||(n=e._keys=function Ic(e){const n=new Set;for(const t of e)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))n.add(i);return Array.from(n)}(e._scopes)),n}function zs(e,n,t,i){const{iScale:s}=e,{key:a="r"}=this._parsing,r=new Array(i);let l,c,h,d;for(l=0,c=i;l<c;++l)h=l+t,d=n[h],r[l]={r:s.parse(Rt(d,a),h)};return r}const Ac=Number.EPSILON||1e-14,le=(e,n)=>n<e.length&&!e[n].skip&&e[n],Hs=e=>"x"===e?"y":"x";function Ec(e,n,t,i){const s=e.skip?n:e,a=n,r=t.skip?n:t,l=si(a,s),c=si(r,a);let h=l/(l+c),d=c/(l+c);h=isNaN(h)?0:h,d=isNaN(d)?0:d;const u=i*h,f=i*d;return{previous:{x:a.x-u*(r.x-s.x),y:a.y-u*(r.y-s.y)},next:{x:a.x+f*(r.x-s.x),y:a.y+f*(r.y-s.y)}}}function cn(e,n,t){return Math.max(Math.min(e,t),n)}function Nc(e,n,t,i,s){let a,r,l,c;if(n.spanGaps&&(e=e.filter(h=>!h.skip)),"monotone"===n.cubicInterpolationMode)!function jc(e,n="x"){const t=Hs(n),i=e.length,s=Array(i).fill(0),a=Array(i);let r,l,c,h=le(e,0);for(r=0;r<i;++r)if(l=c,c=h,h=le(e,r+1),c){if(h){const d=h[n]-c[n];s[r]=0!==d?(h[t]-c[t])/d:0}a[r]=l?h?gt(s[r-1])!==gt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}(function wc(e,n,t){const i=e.length;let s,a,r,l,c,h=le(e,0);for(let d=0;d<i-1;++d)if(c=h,h=le(e,d+1),c&&h){if(Se(n[d],0,Ac)){t[d]=t[d+1]=0;continue}s=t[d]/n[d],a=t[d+1]/n[d],l=Math.pow(s,2)+Math.pow(a,2),!(l<=9)&&(r=3/Math.sqrt(l),t[d]=s*r*n[d],t[d+1]=a*r*n[d])}})(e,s,a),function Dc(e,n,t="x"){const i=Hs(t),s=e.length;let a,r,l,c=le(e,0);for(let h=0;h<s;++h){if(r=l,l=c,c=le(e,h+1),!l)continue;const d=l[t],u=l[i];r&&(a=(d-r[t])/3,l[`cp1${t}`]=d-a,l[`cp1${i}`]=u-a*n[h]),c&&(a=(c[t]-d)/3,l[`cp2${t}`]=d+a,l[`cp2${i}`]=u+a*n[h])}}(e,a,n)}(e,s);else{let h=i?e[e.length-1]:e[0];for(a=0,r=e.length;a<r;++a)l=e[a],c=Ec(h,l,e[Math.min(a+1,r-(i?0:1))%r],n.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,h=l}n.capBezierPoints&&function Lc(e,n){let t,i,s,a,r,l=Mt(e[0],n);for(t=0,i=e.length;t<i;++t)r=a,a=l,l=t<i-1&&Mt(e[t+1],n),a&&(s=e[t],r&&(s.cp1x=cn(s.cp1x,n.left,n.right),s.cp1y=cn(s.cp1y,n.top,n.bottom)),l&&(s.cp2x=cn(s.cp2x,n.left,n.right),s.cp2y=cn(s.cp2y,n.top,n.bottom)))}(e,t)}function mi(){return typeof window<"u"&&typeof document<"u"}function _i(e){let n=e.parentNode;return n&&"[object ShadowRoot]"===n.toString()&&(n=n.host),n}function hn(e,n,t){let i;return"string"==typeof e?(i=parseInt(e,10),-1!==e.indexOf("%")&&(i=i/100*n.parentNode[t])):i=e,i}const dn=e=>e.ownerDocument.defaultView.getComputedStyle(e,null),Bc=["top","right","bottom","left"];function Wt(e,n,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const a=Bc[s];i[a]=parseFloat(e[n+"-"+a+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Xt(e,n){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:i}=n,s=dn(t),a="border-box"===s.boxSizing,r=Wt(s,"padding"),l=Wt(s,"border","width"),{x:c,y:h,box:d}
vendor: 4,243 bytes, line 1
1=function zc(e,n){const t=e.touches,i=t&&t.length?t[0]:e,{offsetX:s,offsetY:a}=i;let l,c,r=!1;if(((e,n,t)=>(e>0||n>0)&&(!t||!t.shadowRoot))(s,a,e.target))l=s,c=a;else{const h=n.getBoundingClientRect();l=i.clientX-h.left,c=i.clientY-h.top,r=!0}return{x:l,y:c,box:r}}(e,t),u=r.left+(d&&l.left),f=r.top+(d&&l.top);let{width:p,height:g}=n;return a&&(p-=r.width+l.width,g-=r.height+l.height),{x:Math.round((c-u)/p*t.width/i),y:Math.round((h-f)/g*t.height/i)}}const Et=e=>Math.round(10*e)/10;function Gs(e,n,t){const i=n||1,s=Et(e.height*i),a=Et(e.width*i);e.height=Et(e.height),e.width=Et(e.width);const r=e.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==i||r.height!==s||r.width!==a)&&(e.currentDevicePixelRatio=i,r.height=s,r.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0)}const Wc=function(){let e=!1;try{const n={get passive(){return e=!0,!1}};mi()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return e}();function Ws(e,n){const t=function $c(e,n){return dn(e).getPropertyValue(n)}(e,n),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ut(e,n,t,i){return{x:e.x+t*(n.x-e.x),y:e.y+t*(n.y-e.y)}}function Xc(e,n,t,i){return{x:e.x+t*(n.x-e.x),y:"middle"===i?t<.5?e.y:n.y:"after"===i?t<1?e.y:n.y:t>0?n.y:e.y}}function Uc(e,n,t,i){const s={x:e.cp2x,y:e.cp2y},a={x:n.cp1x,y:n.cp1y},r=Ut(e,s,t),l=Ut(s,a,t),c=Ut(a,n,t),h=Ut(r,l,t),d=Ut(l,c,t);return Ut(h,d,t)}function ce(e,n,t){return e?function(e,n){return{x:t=>e+e+n-t,setWidth(t){n=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,i)=>t-i,leftForLtr:(t,i)=>t-i}}(n,t):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,n)=>e+n,leftForLtr:(e,n)=>e}}function Xs(e,n){let t,i;("ltr"===n||"rtl"===n)&&(t=e.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",n,"important"),e.prevTextDirection=i)}function Us(e,n){void 0!==n&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",n[0],n[1]))}function Ys(e){return"angle"===e?{between:Oe,compare:Jl,normalize:q}:{between:vt,compare:(n,t)=>n-t,normalize:n=>n}}function Ks({start:e,end:n,count:t,loop:i,style:s}){return{start:e%t,end:n%t,loop:i&&(n-e+1)%t==0,style:s}}function Js(e,n,t){if(!t)return[e];const{property:i,start:s,end:a}=t,r=n.length,{compare:l,between:c,normalize:h}=Ys(i),{start:d,end:u,loop:f,style:p}=function Jc(e,n,t){const{property:i,start:s,end:a}=t,{between:r,normalize:l}=Ys(i),c=n.length;let f,p,{start:h,end:d,loop:u}=e;if(u){for(h+=c,d+=c,f=0,p=c;f<p&&r(l(n[h%c][i]),s,a);++f)h--,d--;h%=c,d%=c}return d<h&&(d+=c),{start:h,end:d,loop:u,style:e.style}}(e,n,t),g=[];let b,y,v,m=!1,_=null;const C=()=>m||c(s,v,b)&&0!==l(s,v),T=()=>!m||0===l(a,b)||c(a,v,b);for(let O=d,k=d;O<=u;++O)y=n[O%r],!y.skip&&(b=h(y[i]),b!==v&&(m=c(b,s,a),null===_&&C()&&(_=0===l(b,s)?O:k),null!==_&&T()&&(g.push(Ks({start:_,end:O,loop:f,count:r,style:p})),_=null),k=O,v=b));return null!==_&&g.push(Ks({start:_,end:u,loop:f,count:r,style:p})),g}function Qs(e,n){const t=[],i=e.segments;for(let s=0;s<i.length;s++){const a=Js(i[s],e.points,n);a.length&&t.push(...a)}return t}function qs(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function eh(e,n){if(!n)return!1;const t=[],i=function(s,a){return ri(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(n,i)}function un(e,n,t){return e.options.clip?e[t]:n[t]}function to(e,n){const t=n._clip;if(t.disabled)return!1;const i=function nh(e,n){const{xScale:t,yScale:i}=e;return t&&i?{left:un(t,n,"left"),right:un(t,n,"right"),top:un(i,n,"top"),bottom:un(i,n,"bottom")}:n}(n,e.chartArea);return{left:!1===t.left?0:i.left-(!0===t.left?0:t.left),right:!1===t.right?e.width:i.right+(!0===t.right?0:t.right),top:!1===t.top?0:i.top-(!0===t.top?0:t.top),bottom:!1===t.bottom?e.height:i.bottom+(!0===t.bottom?0:t.bottom)}}class ih{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,i,s){const r=t.duration;
vendor: 3,359 bytes, line 1
1t.listeners[s].forEach(l=>l({chart:n,initial:t.initial,numSteps:r,currentStep:Math.min(i-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Ss.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const a=i.items;let c,r=a.length-1,l=!1;for(;r>=0;--r)c=a[r],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(n),l=!0):(a[r]=a[a.length-1],a.pop());l&&(s.draw(),this._notify(s,i,n,"progress")),a.length||(i.running=!1,this._notify(s,i,n,"complete"),i.initial=!1),t+=a.length}),this._lastDate=n,0===t&&(this._running=!1)}_getAnims(n){const t=this._charts;let i=t.get(n);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,i)),i}listen(n,t,i){this._getAnims(n).listeners[t].push(i)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){const t=this._charts.get(n);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(n){if(!this._running)return!1;const t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){const t=this._charts.get(n);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}}var St=new ih;const eo="transparent",sh={boolean:(e,n,t)=>t>.5?n:e,color(e,n,t){const i=Fs(e||eo),s=i.valid&&Fs(n||eo);return s&&s.valid?s.mix(i,t).hexString():n},number:(e,n,t)=>e+(n-e)*t};class oh{constructor(n,t,i,s){const a=t[i];s=Fe([n.to,s,a,n.from]);const r=Fe([n.from,a,s]);this._active=!0,this._fn=n.fn||sh[n.type||typeof r],this._easing=Te[n.easing]||Te.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(n,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],a=i-this._start,r=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(r,n.duration)),this._total+=a,this._loop=!!n.loop,this._to=Fe([n.to,t,s,n.from]),this._from=Fe([n.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){const t=n-this._start,i=this._duration,s=this._prop,a=this._from,r=this._loop,l=this._to;let c;if(this._active=a!==l&&(r||t<i),!this._active)return this._target[s]=l,void this._notify(!0);t<0?this._target[s]=a:(c=t/i%2,c=r&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(a,l,c))}wait(){const n=this._promises||(this._promises=[]);return new Promise((t,i)=>{n.push({res:t,rej:i})})}_notify(n){const t=n?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}class no{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!E(n))return;const t=Object.keys($.animation),i=this._properties;Object.getOwnPropertyNames(n).forEach(s=>{const a=n[s];if(!E(a))return;const r={};for(const l of t)r[l]=a[l];(B(a.properties)&&a.properties||[s]).forEach(l=>{(l===s||!i.has(l))&&i.set(l,r)})})}_animateOptions(n,t){const i=t.options,s=function rh(e,n){if(!n)return;let t=e.options;
vendor: 9,042 bytes, line 1
1if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=n}(n,i);if(!s)return[];const a=this._createAnimations(s,i);return i.$shared&&function ah(e,n){const t=[],i=Object.keys(n);for(let s=0;s<i.length;s++){const a=e[i[s]];a&&a.active()&&t.push(a.wait())}return Promise.all(t)}(n.options.$animations,i).then(()=>{n.options=i},()=>{}),a}_createAnimations(n,t){const i=this._properties,s=[],a=n.$animations||(n.$animations={}),r=Object.keys(t),l=Date.now();let c;for(c=r.length-1;c>=0;--c){const h=r[c];if("$"===h.charAt(0))continue;if("options"===h){s.push(...this._animateOptions(n,t));continue}const d=t[h];let u=a[h];const f=i.get(h);if(u){if(f&&u.active()){u.update(f,d,l);continue}u.cancel()}f&&f.duration?(a[h]=u=new oh(f,n,h,d),s.push(u)):n[h]=d}return s}update(n,t){if(0===this._properties.size)return void Object.assign(n,t);const i=this._createAnimations(n,t);return i.length?(St.add(this._chart,i),!0):void 0}}function io(e,n){const t=e&&e.options||{},i=t.reverse,s=void 0===t.min?n:0,a=void 0===t.max?n:0;return{start:i?a:s,end:i?s:a}}function so(e,n){const t=[],i=e._getSortedDatasetMetas(n);let s,a;for(s=0,a=i.length;s<a;++s)t.push(i[s].index);return t}function oo(e,n,t,i={}){const s=e.keys,a="single"===i.mode;let r,l,c,h;if(null===n)return;let d=!1;for(r=0,l=s.length;r<l;++r){if(c=+s[r],c===t){if(d=!0,i.all)continue;break}h=e.values[c],G(h)&&(a||0===n||gt(n)===gt(h))&&(n+=h)}return d||i.all?n:0}function bi(e,n){const t=e&&e.options.stacked;return t||void 0===t&&void 0!==n.stack}function fh(e,n,t){const i=e[n]||(e[n]={});return i[t]||(i[t]={})}function ao(e,n,t,i){for(const s of n.getMatchingVisibleMetas(i).reverse()){const a=e[s.index];if(t&&a>0||!t&&a<0)return s.index}return null}function ro(e,n){const{chart:t,_cachedMeta:i}=e,s=t._stacks||(t._stacks={}),{iScale:a,vScale:r,index:l}=i,c=a.axis,h=r.axis,d=function dh(e,n,t){return`${e.id}.${n.id}.${t.stack||t.type}`}(a,r,i),u=n.length;let f;for(let p=0;p<u;++p){const g=n[p],{[c]:m,[h]:_}=g;f=(g._stacks||(g._stacks={}))[h]=fh(s,d,m),f[l]=_,f._top=ao(f,r,!0,i.type),f._bottom=ao(f,r,!1,i.type),(f._visualValues||(f._visualValues={}))[l]=_}}function yi(e,n){const t=e.scales;return Object.keys(t).filter(i=>t[i].axis===n).shift()}function Ie(e,n){const t=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){n=n||e._parsed;for(const s of n){const a=s._stacks;if(!a||void 0===a[i]||void 0===a[i][t])return;delete a[i][t],void 0!==a[i]._visualValues&&void 0!==a[i]._visualValues[t]&&delete a[i]._visualValues[t]}}}const xi=e=>"reset"===e||"none"===e,lo=(e,n)=>n?e:Object.assign({},e);let wt=(()=>class e{static defaults={};static datasetElementType=null;static dataElementType=null;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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=bi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ie(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,i=this._cachedMeta,s=this.getDataset(),a=(f,p,g,m)=>"x"===f?p:"r"===f?m:g,r=i.xAxisID=R(s.xAxisID,yi(t,"x")),l=i.yAxisID=R(s.yAxisID,yi(t,"y")),c=i.rAxisID=R(s.rAxisID,yi(t,"r")),h=i.indexAxis,d=i.iAxisID=a(h,r,l,c),u=i.vAxisID=a(h,l,r,c);i.xScale=this.getScaleForId(r),i.yScale=this.getScaleForId(l),i.rScale=this.getScaleForId(c),i.iScale=this.getScaleForId(d),i.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Cs(this._data,this),t._stacked&&Ie(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),s=this._data;if(E(i))this._data=function hh(e,n){const{iScale:t,vScale:i}=n,s="x"===t.axis?"x":"y",a="x"===i.axis?"x":"y",r=Object.keys(e),l=new Array(r.length);let c,h,d;for(c=0,h=r.length;c<h;++c)d=r[c],l[c]={[s]:d,[a]:e[d]};return l}(i,this._cachedMeta);else if(s!==i){if(s){Cs(s,this);const a=this._cachedMeta;Ie(a),a._parsed=[]}i&&Object.isExtensible(i)&&function tc(e,n){e._chartjs?e._chartjs.listeners.push(n):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),vs.forEach(t=>{const i="_onData"+ni(t),s=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...a){const r=s.apply(this,a);return e._chartjs.listeners.forEach(l=>{"function"==typeof l[i]&&l[i](...a)}),r}})}))}(i,this),this._syncList=[],this._data=i}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const i=this._cachedMeta,s=this.getDataset();let a=!1;this._dataCheck();const r=i._stacked;i._stacked=bi(i.vScale,i),i.stack!==s.stack&&(a=!0,Ie(i),i.stack=s.stack),this._resyncElements(t),(a||r!==i._stacked)&&(ro(this,i._parsed),i._stacked=bi(i.vScale,i))}configure(){const t=this.chart.config,i=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){const{_cachedMeta:s,_data:a}=this,{iScale:r,_stacked:l}=s,c=r.axis;let u,f,p,h=0===t&&i===a.length||s._sorted,d=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=a,s._sorted=!0,p=a;else{p=B(a[t])?this.parseArrayData(s,a,t,i):E(a[t])?this.parseObjectData(s,a,t,i):this.parsePrimitiveData(s,a,t,i);const g=()=>null===f[c]||d&&f[c]<d[c];for(u=0;u<i;++u)s._parsed[u+t]=f=p[u],h&&(g()&&(h=!1),d=f);s._sorted=h}l&&ro(this,p)}parsePrimitiveData(t,i,s,a){const{iScale:r,vScale:l}=t,c=r.axis,h=l.axis,d=r.getLabels(),u=r===l,f=new Array(a);let p,g,m;for(p=0,g=a;p<g;++p)m=p+s,f[p]={[c]:u||r.parse(d[m],m),[h]:l.parse(i[m],m)};return f}parseArrayData(t,i,s,a){const{xScale:r,yScale:l}=t,c=new Array(a);let h,d,u,f;for(h=0,d=a;h<d;++h)u=h+s,f=i[u],c[h]={x:r.parse(f[0],u),y:l.parse(f[1],u)};return c}parseObjectData(t,i,s,a){const{xScale:r,yScale:l}=t,{xAxisKey:c="x",yAxisKey:h="y"}=this._parsing,d=new Array(a);let u,f,p,g;for(u=0,f=a;u<f;++u)p=u+s,g=i[p],d[u]={x:r.parse(Rt(g,c),p),y:l.parse(Rt(g,h),p)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,s){const r=this._cachedMeta,l=i[t.axis];return oo({keys:so(this.chart,!0),values:i._stacks[t.axis]._visualValues},l,r.index,{mode:s})}updateRangeFromParsed(t,i,s,a){const r=s[i.axis];let l=null===r?NaN:r;const c=a&&s._stacks[i.axis];a&&c&&(a.values=c,l=oo(a,r,this._cachedMeta.index)),t.min=Math.min(t.min,l),t.max=Math.max(t.max,l)}getMinMax(t,i){const s=this._cachedMeta,a=s._parsed,r=s._sorted&&t===s.iScale,l=a.length,c=this._getOtherScale(t),h=((e,n)=>e&&!n.hidden&&n._stacked&&{keys:so(this.chart,!0),values:null})(i,s),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=function uh(e){const{min:n,max:t,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?n:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}(c);let p,g;function m(){g=a[p];const _=g[c.axis];return!G(g[t.axis])||u>_||f<_}for(p=0;p<l&&(m()||(this.updateRangeFromParsed(d,t,g,h),!r));++p);if(r)for(p=l-1;p>=0;--p)if(!m()){this.updateRangeFromParsed(d,t,g,h);break}return d}getAllParsedValues(t){const i=this._cachedMeta._parsed,s=[];let a,r,l;for(a=0,r=i.length;a<r;++a)l=i[a][t.axis],G(l)&&s.push(l);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this._cachedMeta,s=i.iScale,a=i.vScale,r=this.getParsed(t);return{label:s?""+s.getLabelForValue(r[s.axis]):"",value:a?""+a.getLabelForValue(r[a.axis]):""}}_update(t){const i=this._cachedMeta;this.update(t||"default"),i._clip=function ch(e){let n,t,i,s;return E(e)?(n=e.top,t=e.right,i=e.bottom,s=e.left):n=t=i=s=e,{top:n,right:t,bottom:i,left:s,disabled:!1===e}}(R(this.options.clip,function lh(e,n,t){if(!1===t)return!1;const i=io(e,t),s=io(n,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this._cachedMeta,a=s.data||[],r=this.chart.chartArea,l=[],c=this._drawStart||0,h=this._drawCount||a.length-c,d=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(t,r,c,h),u=c;u<c+h;++u){const f=a[u];f.hidden||(f.active&&d?l.push(f):f.draw(t,r))}for(u=0;
vendor: 5,867 bytes, line 1
1u<l.length;++u)l[u].draw(t,r)}getStyle(t,i){const s=i?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,i,s){const a=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const l=this._cachedMeta.data[t];r=l.$context||(l.$context=function gh(e,n,t){return At(e,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}(this.getContext(),t,l)),r.parsed=this.getParsed(t),r.raw=a.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function ph(e,n){return At(e,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=a,r.index=r.datasetIndex=this.index;return r.active=!!i,r.mode=s,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",s){const a="active"===i,r=this._cachedDataOpts,l=t+"-"+i,c=r[l],h=this.enableOptionSharing&&Me(s);if(c)return lo(c,h);const d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),f=a?[`${t}Hover`,"hover",t,""]:[t,""],p=d.getOptionScopes(this.getDataset(),u),g=Object.keys($.elements[t]),_=d.resolveNamedOptions(p,g,()=>this.getContext(s,a,i),f);return _.$shared&&(_.$shared=h,r[l]=Object.freeze(lo(_,h))),_}_resolveAnimations(t,i,s){const a=this.chart,r=this._cachedDataOpts,l=`animation-${i}`,c=r[l];if(c)return c;let h;if(!1!==a.options.animation){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,i),p=u.getOptionScopes(this.getDataset(),f);h=u.createResolver(p,this.getContext(t,s,i))}const d=new no(a,h&&h.animations);return h&&h._cacheable&&(r[l]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||xi(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){const s=this.resolveDataElementOptions(t,i),a=this._sharedOptions,r=this.getSharedOptions(s),l=this.includeOptions(i,r)||r!==a;return this.updateSharedOptions(r,i,s),{sharedOptions:r,includeOptions:l}}updateElement(t,i,s,a){xi(a)?Object.assign(t,s):this._resolveAnimations(i,a).update(t,s)}updateSharedOptions(t,i,s){t&&!xi(i)&&this._resolveAnimations(void 0,i).update(t,s)}_setStyle(t,i,s,a){t.active=a;const r=this.getStyle(i,a);this._resolveAnimations(i,s,a).update(t,{options:!a&&this.getSharedOptions(r)||r})}removeHoverStyle(t,i,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,i,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const i=this._data,s=this._cachedMeta.data;for(const[c,h,d]of this._syncList)this[c](h,d);this._syncList=[];const a=s.length,r=i.length,l=Math.min(r,a);l&&this.parse(0,l),r>a?this._insertElements(a,r-a,t):r<a&&this._removeElements(r,a-r)}_insertElements(t,i,s=!0){const a=this._cachedMeta,r=a.data,l=t+i;let c;const h=d=>{for(d.length+=i,c=d.length-1;c>=l;c--)d[c]=d[c-i]};for(h(r),c=t;c<l;++c)r[c]=new this.dataElementType;this._parsing&&h(a._parsed),this.parse(t,i),s&&this.updateElements(r,t,i,"reset")}updateElements(t,i,s,a){}_removeElements(t,i){const s=this._cachedMeta;if(this._parsing){const a=s._parsed.splice(t,i);s._stacked&&Ie(s,a)}s.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[i,s,a]=t;this[i](s,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,i){i&&this._sync(["_removeElements",t,i]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}})();function bh(e){const n=e.iScale,t=function _h(e,n){if(!e._cache.$bar){const t=e.getMatchingVisibleMetas(n);let i=[];for(let s=0,a=t.length;s<a;s++)i=i.concat(t[s].controller.getAllParsedValues(e));e._cache.$bar=Ms(i.sort((s,a)=>s-a))}return e._cache.$bar}(n,e.type);let s,a,r,l,i=n._length;const c=()=>{32767===r||-32768===r||(Me(l)&&(i=Math.min(i,Math.abs(r-l)||i)),l=r)};for(s=0,a=t.length;s<a;++s)r=n.getPixelForValue(t[s]),c();for(l=void 0,s=0,a=n.ticks.length;s<a;++s)r=n.getPixelForTick(s),c();return i}function co(e,n,t,i){return B(e)?function vh(e,n,t,i){const s=t.parse(e[0],i),a=t.parse(e[1],i),r=Math.min(s,a),l=Math.max(s,a);let c=r,h=l;Math.abs(r)>Math.abs(l)&&(c=l,h=r),n[t.axis]=h,n._custom={barStart:c,barEnd:h,start:s,end:a,min:r,max:l}}(e,n,t,i):n[t.axis]=t.parse(e,i),n}function ho(e,n,t,i){const s=e.iScale,a=e.vScale,r=s.getLabels(),l=s===a,c=[];let h,d,u,f;for(h=t,d=t+i;h<d;++h)f=n[h],u={},u[s.axis]=l||s.parse(r[h],h),c.push(co(f,u,a,h));return c}function vi(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function Sh(e,n,t,i){let s=n.borderSkipped;const a={};if(!s)return void(e.borderSkipped=a);if(!0===s)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:l,reverse:c,top:h,bottom:d}=function Mh(e){let n,t,i,s,a;return e.horizontal?(n=e.base>e.x,t="left",i="right"):(n=e.base<e.y,t="bottom",i="top"),n?(s="end",a="start"):(s="start",a="end"),{start:t,end:i,reverse:n,top:s,bottom:a}}(e);"middle"===s&&t&&(e.enableBorderRadius=!0,(t._top||0)===i?s=h:(t._bottom||0)===i?s=d:(a[uo(d,r,l,c)]=!0,s=h)),a[uo(s,r,l,c)]=!0,e.borderSkipped=a}function uo(e,n,t,i){return i?(e=function Oh(e,n,t){return e===n?t:e===t?n:e}(e,n,t),e=fo(e,t,n)):e=fo(e,n,t),e}function fo(e,n,t){return"start"===e?n:"end"===e?t:e}
vendor: 13,381 bytes, line 1
1function Th(e,{inflateAmount:n},t){e.inflateAmount="auto"===n?1===t?.33:0:n}let Ph=(()=>class e extends wt{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,i,s,a){return ho(t,i,s,a)}parseArrayData(t,i,s,a){return ho(t,i,s,a)}parseObjectData(t,i,s,a){const{iScale:r,vScale:l}=t,{xAxisKey:c="x",yAxisKey:h="y"}=this._parsing,d="x"===r.axis?c:h,u="x"===l.axis?c:h,f=[];let p,g,m,_;for(p=s,g=s+a;p<g;++p)_=i[p],m={},m[r.axis]=r.parse(Rt(_,d),p),f.push(co(Rt(_,u),m,l,p));return f}updateRangeFromParsed(t,i,s,a){super.updateRangeFromParsed(t,i,s,a);const r=s._custom;r&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const i=this._cachedMeta,{iScale:s,vScale:a}=i,r=this.getParsed(t),l=r._custom,c=vi(l)?"["+l.start+", "+l.end+"]":""+a.getLabelForValue(r[a.axis]);return{label:""+s.getLabelForValue(r[s.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,t)}updateElements(t,i,s,a){const r="reset"===a,{index:l,_cachedMeta:{vScale:c}}=this,h=c.getBasePixel(),d=c.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(i,a);for(let g=i;g<i+s;g++){const m=this.getParsed(g),_=r||A(m[c.axis])?{base:h,head:h}:this._calculateBarValuePixels(g),b=this._calculateBarIndexPixels(g,u),y=(m._stacks||{})[c.axis],v={horizontal:d,base:_.base,enableBorderRadius:!y||vi(m._custom)||l===y._top||l===y._bottom,x:d?_.head:b.center,y:d?b.center:_.head,height:d?b.size:Math.abs(_.size),width:d?Math.abs(_.size):b.size};p&&(v.options=f||this.resolveDataElementOptions(g,t[g].active?"active":a));const M=v.options||t[g].options;Sh(v,M,y,l),Th(v,M,u.ratio),this.updateElement(t[g],g,v,a)}}_getStacks(t,i){const{iScale:s}=this._cachedMeta,a=s.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),r=s.options.stacked,l=[],c=this._cachedMeta.controller.getParsed(i),h=c&&c[s.axis],d=u=>{const f=u._parsed.find(g=>g[s.axis]===h),p=f&&f[u.vScale.axis];if(A(p)||isNaN(p))return!0};for(const u of a)if((void 0===i||!d(u))&&((!1===r||-1===l.indexOf(u.stack)||void 0===r&&void 0===u.stack)&&l.push(u.stack),u.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,i=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===i).shift()}_getAxis(){const t={},i=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[R("x"===this.chart.options.indexAxis?s.xAxisID:s.yAxisID,i)]=!0;return Object.keys(t)}_getStackIndex(t,i,s){const a=this._getStacks(t,s),r=void 0!==i?a.indexOf(i):-1;return-1===r?a.length-1:r}_getRuler(){const t=this.options,i=this._cachedMeta,s=i.iScale,a=[];let r,l;for(r=0,l=i.data.length;r<l;++r)a.push(s.getPixelForValue(this.getParsed(r)[s.axis],r));const c=t.barThickness;return{min:c||bh(i),pixels:a,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:i,_stacked:s,index:a},options:{base:r,minBarLength:l}}=this,c=r||0,h=this.getParsed(t),d=h._custom,u=vi(d);let m,_,f=h[i.axis],p=0,g=s?this.applyStack(i,h,s):f;g!==f&&(p=g-f,g=f),u&&(f=d.barStart,g=d.barEnd-d.barStart,0!==f&&gt(f)!==gt(d.barEnd)&&(p=0),p+=f);const b=A(r)||u?p:r;let y=i.getPixelForValue(b);if(m=this.chart.getDataVisibility(t)?i.getPixelForValue(p+g):y,_=m-y,Math.abs(_)<l){_=function Ch(e,n,t){return 0!==e?gt(e):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}(_,i,c)*l,f===c&&(y-=_/2);const v=i.getPixelForDecimal(0),M=i.getPixelForDecimal(1),x=Math.min(v,M),C=Math.max(v,M);y=Math.max(Math.min(y,C),x),m=y+_,s&&!u&&(h._stacks[i.axis]._visualValues[a]=i.getValueForPixel(m)-i.getValueForPixel(y))}if(y===i.getPixelForValue(c)){const v=gt(_)*i.getLineWidthForValue(c)/2;y+=v,_-=v}return{size:_,base:y,head:m,center:m+_/2}}_calculateBarIndexPixels(t,i){const s=i.scale,a=this.options,r=a.skipNull,l=R(a.maxBarThickness,1/0);let c,h;const d=this._getAxisCount();if(i.grouped){const u=r?this._getStackCount(t):i.stackCount,f="flex"===a.barThickness?function xh(e,n,t,i){const s=n.pixels,a=s[e];let r=e>0?s[e-1]:null,l=e<s.length-1?s[e+1]:null;const c=t.categoryPercentage;null===r&&(r=a-(null===l?n.end-n.start:l-a)),null===l&&(l=a+a-r);const h=a-(a-Math.min(r,l))/2*c;return{chunk:Math.abs(l-r)/2*c/i,ratio:t.barPercentage,start:h}}(t,i,a,u*d):function yh(e,n,t,i){const s=t.barThickness;let a,r;return A(s)?(a=n.min*t.categoryPercentage,r=t.barPercentage):(a=s*i,r=1),{chunk:a/i,ratio:r,start:n.pixels[e]-a/2}}(t,i,a,u*d),p="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(R(p,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+g;c=f.start+f.chunk*m+f.chunk/2,h=Math.min(l,f.chunk*f.ratio)}else c=s.getPixelForValue(this.getParsed(t)[s.axis],t),h=Math.min(l,i.min*i.ratio);return{base:c-h/2,head:c+h/2,center:c,size:h}}draw(){const t=this._cachedMeta,i=t.vScale,s=t.data,a=s.length;let r=0;for(;r<a;++r)null!==this.getParsed(r)[i.axis]&&!s[r].hidden&&s[r].draw(this._ctx)}})(),kh=(()=>class e extends wt{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,i,s,a){const r=super.parsePrimitiveData(t,i,s,a);for(let l=0;l<r.length;l++)r[l]._custom=this.resolveDataElementOptions(l+s).radius;return r}parseArrayData(t,i,s,a){const r=super.parseArrayData(t,i,s,a);for(let l=0;l<r.length;l++)r[l]._custom=R(i[s+l][2],this.resolveDataElementOptions(l+s).radius);return r}parseObjectData(t,i,s,a){const r=super.parseObjectData(t,i,s,a);for(let l=0;l<r.length;l++){const c=i[s+l];r[l]._custom=R(c&&c.r&&+c.r,this.resolveDataElementOptions(l+s).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let i=0;for(let s=t.length-1;s>=0;--s)i=Math.max(i,t[s].size(this.resolveDataElementOptions(s))/2);return i>0&&i}getLabelAndValue(t){const i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:a,yScale:r}=i,l=this.getParsed(t),c=a.getLabelForValue(l.x),h=r.getLabelForValue(l.y),d=l._custom;return{label:s[t]||"",value:"("+c+", "+h+(d?", "+d:"")+")"}}update(t){const i=this._cachedMeta.data;this.updateElements(i,0,i.length,t)}updateElements(t,i,s,a){const r="reset"===a,{iScale:l,vScale:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(i,a),u=l.axis,f=c.axis;for(let p=i;p<i+s;p++){const g=t[p],m=!r&&this.getParsed(p),_={},b=_[u]=r?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),y=_[f]=r?c.getBasePixel():c.getPixelForValue(m[f]);_.skip=isNaN(b)||isNaN(y),d&&(_.options=h||this.resolveDataElementOptions(p,g.active?"active":a),r&&(_.options.radius=0)),this.updateElement(g,p,_,a)}}resolveDataElementOptions(t,i){const s=this.getParsed(t);let a=super.resolveDataElementOptions(t,i);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const r=a.radius;return"active"!==i&&(a.radius=0),a.radius+=R(s&&s._custom,r),a}})(),Ci=(()=>class e extends wt{static id="doughnut";static 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"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data,{labels:{pointStyle:s,textAlign:a,color:r,useBorderRadius:l,borderRadius:c}}=t.legend.options;return i.labels.length&&i.datasets.length?i.labels.map((h,d)=>{const f=t.getDatasetMeta(0).controller.getStyle(d);return{text:h,fillStyle:f.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(d),lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:f.borderWidth,strokeStyle:f.borderColor,textAlign:a,pointStyle:s,borderRadius:l&&(c||f.borderRadius),index:d}}):[]}},onClick(t,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}}};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){const s=this.getDataset().data,a=this._cachedMeta;if(!1===this._parsing)a._parsed=s;else{let l,c,r=h=>+s[h];if(E(s[t])){const{key:h="value"}=this._parsing;r=d=>+Rt(s[d],h)}for(l=t,c=t+i;l<c;++l)a._parsed[l]=r(l)}}_getRotation(){return ft(this.options.rotation-90)}_getCircumference(){return ft(this.options.circumference)}_getRotationExtents(){let t=V,i=-V;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const a=this.chart.getDatasetMeta(s).controller,r=a._getRotation(),l=a._getCircumference();t=Math.min(t,r),i=Math.max(i,r+l)}return{rotation:t,circumference:i-t}}update(t){const i=this.chart,{chartArea:s}=i,a=this._cachedMeta,r=a.data,l=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,c=Math.max((Math.min(s.width,s.height)-l)/2,0),h=Math.min(((e,n)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/n)(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:g,offsetX:m,offsetY:_}=function Rh(e,n,t){let i=1,s=1,a=0,r=0;if(n<V){const l=e,c=l+n,h=Math.cos(l),d=Math.sin(l),u=Math.cos(c),f=Math.sin(c),p=(v,M,x)=>Oe(v,l,c,!0)?1:Math.max(M,M*t,x,x*t),g=(v,M,x)=>Oe(v,l,c,!0)?-1:Math.min(M,M*t,x,x*t),m=p(0,h,u),_=p(W,d,f),b=g(D,h,u),y=g(D+W,d,f);i=(m-b)/2,s=(_-y)/2,a=-(m+b)/2,r=-(_+y)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:r}}(f,u,h),v=Math.max(Math.min((s.width-l)/p,(s.height-l)/g)/2,0),M=us(this.options.radius,v),C=(M-Math.max(M*h,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*M,this.offsetY=_*M,a.total=this.calculateTotal(),this.outerRadius=M-C*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-C*d,0),this.updateElements(r,0,r.length,t)}_circumference(t,i){const s=this.options,a=this._cachedMeta,r=this._getCircumference();return i&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*r/V)}updateElements(t,i,s,a){const r="reset"===a,l=this.chart,c=l.chartArea,u=(c.left+c.right)/2,f=(c.top+c.bottom)/2,p=r&&l.options.animation.animateScale,g=p?0:this.innerRadius,m=p?0:this.outerRadius,{sharedOptions:_,includeOptions:b}=this._getSharedOptions(i,a);let v,y=this._getRotation();for(v=0;v<i;++v)y+=this._circumference(v,r);for(v=i;v<i+s;++v){const M=this._circumference(v,r),x=t[v],C={x:u+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+M,circumference:M,outerRadius:m,innerRadius:g};b&&(C.options=_||this.resolveDataElementOptions(v,x.active?"active":a)),y+=M,this.updateElement(x,v,C,a)}}calculateTotal(){const t=this._cachedMeta,i=t.data;let a,s=0;for(a=0;a<i.length;a++){const r=t._parsed[a];null!==r&&!isNaN(r)&&this.chart.getDataVisibility(a)&&!i[a].hidden&&(s+=Math.abs(r))}return s}calculateCircumference(t){const i=this._cachedMeta.total;return i>0&&!isNaN(t)?V*(Math.abs(t)/i):0}getLabelAndValue(t){const s=this.chart,a=s.data.labels||[],r=Pe(this._cachedMeta._parsed[t],s.options.locale);return{label:a[t]||"",value:r}}getMaxBorderWidth(t){let i=0;const s=this.chart;let a,r,l,c,h;if(!t)for(a=0,r=s.data.datasets.length;a<r;++a)if(s.isDatasetVisible(a)){l=s.getDatasetMeta(a),t=l.data,c=l.controller;break}if(!t)return 0;for(a=0,r=t.length;a<r;++a)h=c.resolveDataElementOptions(a),"inner"!==h.borderAlign&&(i=Math.max(i,h.borderWidth||0,h.hoverBorderWidth||0));return i}getMaxOffset(t){let i=0;for(let s=0,a=t.length;s<a;++s){const r=this.resolveDataElementOptions(s);i=Math.max(i,r.offset||0,r.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(i+=this._getRingWeight(s));return i}_getRingWeight(t){return Math.max(R(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}})(),Fh=(()=>class e extends wt{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const i=this._cachedMeta,{dataset:s,data:a=[],_dataset:r}=i,l=this.chart._animationsDisabled;let{start:c,count:h}
vendor: 4,370 bytes, line 1
1=Ts(i,a,l);this._drawStart=c,this._drawCount=h,Ps(i)&&(c=0,h=a.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=a;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(s,void 0,{animated:!l,options:d},t),this.updateElements(a,c,h,t)}updateElements(t,i,s,a){const r="reset"===a,{iScale:l,vScale:c,_stacked:h,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(i,a),p=l.axis,g=c.axis,{spanGaps:m,segment:_}=this.options,b=ae(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||"none"===a,v=i+s,M=t.length;let x=i>0&&this.getParsed(i-1);for(let C=0;C<M;++C){const T=t[C],O=y?T:{};if(C<i||C>=v){O.skip=!0;continue}const k=this.getParsed(C),I=A(k[g]),F=O[p]=l.getPixelForValue(k[p],C),w=O[g]=r||I?c.getBasePixel():c.getPixelForValue(h?this.applyStack(c,k,h):k[g],C);O.skip=isNaN(F)||isNaN(w)||I,O.stop=C>0&&Math.abs(k[p]-x[p])>b,_&&(O.parsed=k,O.raw=d.data[C]),f&&(O.options=u||this.resolveDataElementOptions(C,T.active?"active":a)),y||this.updateElement(T,C,O,a),x=k}}getMaxOverflow(){const t=this._cachedMeta,i=t.dataset,s=i.options&&i.options.borderWidth||0,a=t.data||[];if(!a.length)return s;const r=a[0].size(this.resolveDataElementOptions(0)),l=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(s,r,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}})(),po=(()=>class e extends wt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:s,color:a}}=t.legend.options;return i.labels.map((r,l)=>{const h=t.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:h.backgroundColor,strokeStyle:h.borderColor,fontColor:a,lineWidth:h.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const s=this.chart,a=s.data.labels||[],r=Pe(this._cachedMeta._parsed[t].r,s.options.locale);return{label:a[t]||"",value:r}}parseObjectData(t,i,s,a){return zs.bind(this)(t,i,s,a)}update(t){const i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}getMinMax(){const i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((s,a)=>{const r=this.getParsed(a).r;!isNaN(r)&&this.chart.getDataVisibility(a)&&(r<i.min&&(i.min=r),r>i.max&&(i.max=r))}),i}_updateRadius(){const t=this.chart,i=t.chartArea,s=t.options,a=Math.min(i.right-i.left,i.bottom-i.top),r=Math.max(a/2,0),c=(r-Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,i,s,a){const r="reset"===a,l=this.chart,h=l.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,f=d.yCenter,p=d.getIndexAngle(0)-.5*D;let m,g=p;const _=360/this.countVisibleElements();for(m=0;m<i;++m)g+=this._computeAngle(m,a,_);for(m=i;m<i+s;m++){const b=t[m];let y=g,v=g+this._computeAngle(m,a,_),M=l.getDataVisibility(m)?d.getDistanceFromCenterForValue(this.getParsed(m).r):0;g=v,r&&(h.animateScale&&(M=0),h.animateRotate&&(y=v=p));const x={x:u,y:f,innerRadius:0,outerRadius:M,startAngle:y,endAngle:v,options:this.resolveDataElementOptions(m,b.active?"active":a)};this.updateElement(b,m,x,a)}}countVisibleElements(){let i=0;return this._cachedMeta.data.forEach((s,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&i++}),i}_computeAngle(t,i,s){return this.chart.getDataVisibility(t)?ft(this.resolveDataElementOptions(t,i).angle||s):0}})();var Ih=Object.freeze({__proto__:null,BarController:Ph,BubbleController:kh,DoughnutController:Ci,LineController:Fh,PieController:(()=>class e extends Ci{static id="pie";
vendor: 4,238 bytes, line 1
1static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:po,RadarController:(()=>class e extends wt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const i=this._cachedMeta.vScale,s=this.getParsed(t);return{label:i.getLabels()[t],value:""+i.getLabelForValue(s[i.axis])}}parseObjectData(t,i,s,a){return zs.bind(this)(t,i,s,a)}update(t){const i=this._cachedMeta,s=i.dataset,a=i.data||[],r=i.iScale.getLabels();if(s.points=a,"resize"!==t){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),this.updateElement(s,void 0,{_loop:!0,_fullLoop:r.length===a.length,options:l},t)}this.updateElements(a,0,a.length,t)}updateElements(t,i,s,a){const r=this._cachedMeta.rScale,l="reset"===a;for(let c=i;c<i+s;c++){const h=t[c],d=this.resolveDataElementOptions(c,h.active?"active":a),u=r.getPointPositionForValue(c,this.getParsed(c).r),f=l?r.xCenter:u.x,p=l?r.yCenter:u.y,g={x:f,y:p,angle:u.angle,skip:isNaN(f)||isNaN(p),options:d};this.updateElement(h,c,g,a)}}})(),ScatterController:(()=>class e extends wt{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:a,yScale:r}=i,l=this.getParsed(t),c=a.getLabelForValue(l.x),h=r.getLabelForValue(l.y);return{label:s[t]||"",value:"("+c+", "+h+")"}}update(t){const i=this._cachedMeta,{data:s=[]}=i,a=this.chart._animationsDisabled;let{start:r,count:l}=Ts(i,s,a);if(this._drawStart=r,this._drawCount=l,Ps(i)&&(r=0,l=s.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:h}=i;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!h._decimated,c.points=s;const d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(c,void 0,{animated:!a,options:d},t)}else this.datasetElementType&&(delete i.dataset,this.datasetElementType=!1);this.updateElements(s,r,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,i,s,a){const r="reset"===a,{iScale:l,vScale:c,_stacked:h,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(i,a),f=this.getSharedOptions(u),p=this.includeOptions(a,f),g=l.axis,m=c.axis,{spanGaps:_,segment:b}=this.options,y=ae(_)?_:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||"none"===a;let M=i>0&&this.getParsed(i-1);for(let x=i;x<i+s;++x){const C=t[x],T=this.getParsed(x),O=v?C:{},k=A(T[m]),I=O[g]=l.getPixelForValue(T[g],x),F=O[m]=r||k?c.getBasePixel():c.getPixelForValue(h?this.applyStack(c,T,h):T[m],x);O.skip=isNaN(I)||isNaN(F)||k,O.stop=x>0&&Math.abs(T[g]-M[g])>y,b&&(O.parsed=T,O.raw=d.data[x]),p&&(O.options=f||this.resolveDataElementOptions(x,C.active?"active":a)),v||this.updateElement(C,x,O,a),M=T}this.updateSharedOptions(f,a,u)}getMaxOverflow(){const t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let c=0;for(let h=i.length-1;h>=0;--h)c=Math.max(c,i[h].size(this.resolveDataElementOptions(h))/2);return c>0&&c}const s=t.dataset,a=s.options&&s.options.borderWidth||0;if(!i.length)return a;const r=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(a,r,l)/2}})()});function Yt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Mi{static override(n){Object.assign(Mi.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return Yt()}parse(){return Yt()}format(){return Yt()}add(){return Yt()}diff(){return Yt()}startOf(){return Yt()}endOf(){return Yt()}}var Ah__date=Mi;function Eh(e,n,t,i){const{controller:s,data:a,_sorted:r}=e,l=s._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&n===l.axis&&"r"!==n&&r&&a.length){const h=l._reversePixels?Zl:Ct;if(!i){const d=h(a,n,t);
1if(c){const{vScale:u}=s._cachedMeta,{_parsed:f}=e,p=f.slice(0,d.lo+1).reverse().findIndex(m=>!A(m[u.axis]));d.lo-=Math.max(0,p);const g=f.slice(d.hi).findIndex(m=>!A(m[u.axis]));d.hi+=Math.max(0,g)}return d}if(s._sharedOptions){const d=a[0],u="function"==typeof d.getRange&&d.getRange(n);if(u){const f=h(a,n,t-u),p=h(a,n,t+u);return{lo:f.lo,hi:p.hi}}}}return{lo:0,hi:a.length-1}}function Ae(e,n,t,i,s){const a=e.getSortedVisibleDatasetMetas(),r=t[n];for(let l=0,c=a.length;l<c;++l){const{index:h,data:d}=a[l],{lo:u,hi:f}=Eh(a[l],n,r,s);for(let p=u;p<=f;++p){const g=d[p];g.skip||i(g,h,p)}}}function Si(e,n,t,i,s){const a=[];return!s&&!e.isPointInArea(n)||Ae(e,t,n,function(l,c,h){!s&&!Mt(l,e.chartArea,0)||l.inRange(n.x,n.y,i)&&a.push({element:l,datasetIndex:c,index:h})},!0),a}function Oi(e,n,t,i,s,a){return a||e.isPointInArea(n)?"r"!==t||i?function jh(e,n,t,i,s,a){let r=[];const l=function wh(e){const n=-1!==e.indexOf("x"),t=-1!==e.indexOf("y");return function(i,s){const a=n?Math.abs(i.x-s.x):0,r=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}(t);let c=Number.POSITIVE_INFINITY;return Ae(e,t,n,function h(d,u,f){const p=d.inRange(n.x,n.y,s);if(i&&!p)return;const g=d.getCenterPoint(s);if(!a&&!e.isPointInArea(g)&&!p)return;const _=l(n,g);_<c?(r=[{element:d,datasetIndex:u,index:f}],c=_):_===c&&r.push({element:d,datasetIndex:u,index:f})}),r}(e,n,t,i,s,a):function Dh(e,n,t,i){let s=[];return Ae(e,t,n,function a(r,l,c){const{startAngle:h,endAngle:d}=r.getProps(["startAngle","endAngle"],i),{angle:u}=xs(r,{x:n.x,y:n.y});Oe(u,h,d)&&s.push({element:r,datasetIndex:l,index:c})}),s}(e,n,t,s):[]}function go(e,n,t,i,s){const a=[],r="x"===t?"inXRange":"inYRange";let l=!1;return Ae(e,t,n,(c,h,d)=>{c[r]&&c[r](n[t],s)&&(a.push({element:c,datasetIndex:h,index:d}),l=l||c.inRange(n.x,n.y,s))}),i&&!l?[]:a}var Lh={evaluateInteractionItems:Ae,modes:{index(e,n,t,i){const s=Xt(n,e),a=t.axis||"x",r=t.includeInvisible||!1,l=t.intersect?Si(e,s,a,i,r):Oi(e,s,a,!1,i,r),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(h=>{const d=l[0].index,u=h.data[d];u&&!u.skip&&c.push({element:u,datasetIndex:h.index,index:d})}),c):[]},dataset(e,n,t,i){const s=Xt(n,e),a=t.axis||"xy",r=t.includeInvisible||!1;let l=t.intersect?Si(e,s,a,i,r):Oi(e,s,a,!1,i,r);if(l.length>0){const c=l[0].datasetIndex,h=e.getDatasetMeta(c).data;l=[];for(let d=0;d<h.length;++d)l.push({element:h[d],datasetIndex:c,index:d})}return l},point:(e,n,t,i)=>Si(e,Xt(n,e),t.axis||"xy",i,t.includeInvisible||!1),nearest:(e,n,t,i)=>Oi(e,Xt(n,e),t.axis||"xy",t.intersect,i,t.includeInvisible||!1),x:(e,n,t,i)=>go(e,Xt(n,e),"x",t.intersect,i),y:(e,n,t,i)=>go(e,Xt(n,e),"y",t.intersect,i)}};const mo=["left","top","right","bottom"];function Ee(e,n){return e.filter(t=>t.pos===n)}function _o(e,n){return e.filter(t=>-1===mo.indexOf(t.pos)&&t.box.axis===n)}function we(e,n){return e.sort((t,i)=>{const s=n?i:t,a=n?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function bo(e,n,t,i){return Math.max(e[t],n[t])+Math.max(e[i],n[i])}function yo(e,n){e.top=Math.max(e.top,n.top),e.left=Math.max(e.left,n.left),e.bottom=Math.max(e.bottom,n.bottom),e.right=Math.max(e.right,n.right)}function zh(e,n,t,i){const{pos:s,box:a}=t,r=e.maxPadding;if(!E(s)){t.size&&(e[s]-=t.size);const u=i[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?a.height:a.width),t.size=u.size/u.count,e[s]+=t.size}a.getPadding&&yo(r,a.getPadding());const l=Math.max(0,n.outerWidth-bo(r,e,"left","right")),c=Math.max(0,n.outerHeight-bo(r,e,"top","bottom")),h=l!==e.w,d=c!==e.h;return e.w=l,e.h=c,t.horizontal?{same:h,other:d}:{same:d,other:h}}function Gh(e,n){const t=n.maxPadding;return function i(s){const a={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{a[r]=Math.max(n[r],t[r])}),a}(e?["left","right"]:["top","bottom"])}function De(e,n,t,i){const s=[];let a,r,l,c,h,d;for(a=0,r=e.length,h=0;a<r;++a){l=e[a],c=l.box,c.update(l.width||n.w,l.height||n.h,Gh(l.horizontal,n));const{same:u,other:f}=zh(n,t,l,i);h|=u&&s.length,d=d||f,c.fullSize||s.push(l)}return h&&De(s,n,t,i)||d}function fn(e,n,t,i,s){e.top=t,e.left=n,e.right=n+i,e.bottom=t+s,e.width=i,e.height=s}function xo(e,n,t,i){const s=t.padding;let{x:a,y:r}=n;for(const l of e){const c=l.box,h=i[l.stack]||{count:1,placed:0,weight:1},d=l.stackWeight/h.weight||1;if(l.horizontal){const u=n.w*d,f=h.size||c.height;Me(h.start)&&(r=h.start),c.fullSize?fn(c,s.left,r,t.outerWidth-s.right-s.left,f):fn(c,n.left+h.placed,r,u,f),h.start=r,h.placed+=u,r=c.bottom}else{const u=n.h*d,f=h.size||c.width;Me(h.start)&&(a=h.start),c.fullSize?fn(c,a,s.top,f,t.outerHeight-s.bottom-s.top):fn(c,a,n.top+h.placed,f,u),h.start=a,h.placed+=u,a=c.right}}n.x=a,n.y=r}
vendor: 4,349 bytes, line 1
1var nt={addBox(e,n){e.boxes||(e.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},e.boxes.push(n)},removeBox(e,n){const t=e.boxes?e.boxes.indexOf(n):-1;-1!==t&&e.boxes.splice(t,1)},configure(e,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(e,n,t,i){if(!e)return;const s=et(e.options.layout.padding),a=Math.max(n-s.width,0),r=Math.max(t-s.height,0),l=function Vh(e){const n=function Nh(e){const n=[];let t,i,s,a,r,l;for(t=0,i=(e||[]).length;t<i;++t)s=e[t],({position:a,options:{stack:r,stackWeight:l=1}}=s),n.push({index:t,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&a+r,stackWeight:l});return n}(e),t=we(n.filter(h=>h.box.fullSize),!0),i=we(Ee(n,"left"),!0),s=we(Ee(n,"right")),a=we(Ee(n,"top"),!0),r=we(Ee(n,"bottom")),l=_o(n,"x"),c=_o(n,"y");return{fullSize:t,leftAndTop:i.concat(a),rightAndBottom:s.concat(c).concat(r).concat(l),chartArea:Ee(n,"chartArea"),vertical:i.concat(s).concat(c),horizontal:a.concat(r).concat(l)}}(e.boxes),c=l.vertical,h=l.horizontal;j(e.boxes,m=>{"function"==typeof m.beforeLayout&&m.beforeLayout()});const d=c.reduce((m,_)=>_.box.options&&!1===_.box.options.display?m:m+1,0)||1,u=Object.freeze({outerWidth:n,outerHeight:t,padding:s,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),f=Object.assign({},s);yo(f,et(i));const p=Object.assign({maxPadding:f,w:a,h:r,x:s.left,y:s.top},s),g=function Bh(e,n){const t=function $h(e){const n={};for(const t of e){const{stack:i,pos:s,stackWeight:a}=t;if(!i||!mo.includes(s))continue;const r=n[i]||(n[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return n}(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=n;let a,r,l;for(a=0,r=e.length;a<r;++a){l=e[a];const{fullSize:c}=l.box,h=t[l.stack],d=h&&l.stackWeight/h.weight;l.horizontal?(l.width=d?d*i:c&&n.availableWidth,l.height=s):(l.width=i,l.height=d?d*s:c&&n.availableHeight)}return t}(c.concat(h),u);De(l.fullSize,p,u,g),De(c,p,u,g),De(h,p,u,g)&&De(c,p,u,g),function Hh(e){const n=e.maxPadding;function t(i){const s=Math.max(n[i]-e[i],0);return e[i]+=s,s}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}(p),xo(l.leftAndTop,p,u,g),p.x+=p.w,p.y+=p.h,xo(l.rightAndBottom,p,u,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},j(l.chartArea,m=>{const _=m.box;Object.assign(_,e.chartArea),_.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class vo{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,i){}removeEventListener(n,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,i,s){return t=Math.max(0,t||n.width),i=i||n.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(n){return!0}updateConfig(n){}}class Wh extends vo{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const pn="$chartjs",Xh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Co=e=>null===e||""===e,Mo=!!Wc&&{passive:!0};function Kh(e,n,t){e&&e.canvas&&e.canvas.removeEventListener(n,t,Mo)}function gn(e,n){for(const t of e)if(t===n||t.contains(n))return!0}function Qh(e,n,t){const i=e.canvas,s=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||gn(l.addedNodes,i),r=r&&!gn(l.removedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Zh(e,n,t){const i=e.canvas,s=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||gn(l.removedNodes,i),r=r&&!gn(l.addedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const je=new Map;let So=0;function Oo(){const e=window.devicePixelRatio;e!==So&&(So=e,je.forEach((n,t)=>{t.currentDevicePixelRatio!==e&&n()}))}function ed(e,n,t){const i=e.canvas,s=i&&_i(i);if(!s)return;const a=Os((l,c)=>{const h=s.clientWidth;t(l,c),h<s.clientWidth&&t()},window),r=new ResizeObserver(l=>{const c=l[0],h=c.contentRect.width,d=c.contentRect.height;0===h&&0===d||a(h,d)});return r.observe(s),function qh(e,n){je.size||window.addEventListener("resize",Oo),je.set(e,n)}(e,a),r}function Ti(e,n,t){t&&t.disconnect(),"resize"===n&&function td(e){je.delete(e),je.size||window.removeEventListener("resize",Oo)}(e)}
vendor: 5,810 bytes, line 1
1function nd(e,n,t){const i=e.canvas,s=Os(a=>{null!==e.ctx&&t(function Jh(e,n){const t=Xh[e.type]||e.type,{x:i,y:s}=Xt(e,n);return{type:t,chart:n,native:e,x:void 0!==i?i:null,y:void 0!==s?s:null}}(a,e))},e);return function Yh(e,n,t){e&&e.addEventListener(n,t,Mo)}(i,n,s),s}class id extends vo{acquireContext(n,t){const i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(function Uh(e,n){const t=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[pn]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Co(s)){const a=Ws(e,"width");void 0!==a&&(e.width=a)}if(Co(i))if(""===e.style.height)e.height=e.width/(n||2);else{const a=Ws(e,"height");void 0!==a&&(e.height=a)}}(n,t),i):null}releaseContext(n){const t=n.canvas;if(!t[pn])return!1;const i=t[pn].initial;["height","width"].forEach(a=>{const r=i[a];A(r)?t.removeAttribute(a):t.setAttribute(a,r)});const s=i.style||{};return Object.keys(s).forEach(a=>{t.style[a]=s[a]}),t.width=t.width,delete t[pn],!0}addEventListener(n,t,i){this.removeEventListener(n,t),(n.$proxies||(n.$proxies={}))[t]=({attach:Qh,detach:Zh,resize:ed}[t]||nd)(n,t,i)}removeEventListener(n,t){const i=n.$proxies||(n.$proxies={}),s=i[t];s&&(({attach:Ti,detach:Ti,resize:Ti}[t]||Kh)(n,t,s),i[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,i,s){return function Gc(e,n,t,i){const s=dn(e),a=Wt(s,"margin"),r=hn(s.maxWidth,e,"clientWidth")||nn,l=hn(s.maxHeight,e,"clientHeight")||nn,c=function Hc(e,n,t){let i,s;if(void 0===n||void 0===t){const a=e&&_i(e);if(a){const r=a.getBoundingClientRect(),l=dn(a),c=Wt(l,"border","width"),h=Wt(l,"padding");n=r.width-h.width-c.width,t=r.height-h.height-c.height,i=hn(l.maxWidth,a,"clientWidth"),s=hn(l.maxHeight,a,"clientHeight")}else n=e.clientWidth,t=e.clientHeight}return{width:n,height:t,maxWidth:i||nn,maxHeight:s||nn}}(e,n,t);let{width:h,height:d}=c;if("content-box"===s.boxSizing){const f=Wt(s,"border","width"),p=Wt(s,"padding");h-=p.width+f.width,d-=p.height+f.height}return h=Math.max(0,h-a.width),d=Math.max(0,i?h/i:d-a.height),h=Et(Math.min(h,r,c.maxWidth)),d=Et(Math.min(d,l,c.maxHeight)),h&&!d&&(d=Et(h/2)),(void 0!==n||void 0!==t)&&i&&c.height&&d>c.height&&(d=c.height,h=Et(Math.floor(d*i))),{width:h,height:d}}(n,t,i,s)}isAttached(n){const t=n&&_i(n);return!(!t||!t.isConnected)}}class Ot{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(n){const{x:t,y:i}=this.getProps(["x","y"],n);return{x:t,y:i}}hasValue(){return ae(this.x)&&ae(this.y)}getProps(n,t){const i=this.$animations;if(!t||!i)return this;const s={};return n.forEach(a=>{s[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),s}}function mn(e,n,t,i,s){const a=R(i,0),r=Math.min(R(s,e.length),e.length);let c,h,d,l=0;for(t=Math.ceil(t),s&&(c=s-i,t=c/Math.floor(c/t)),d=a;d<0;)l++,d=Math.round(a+l*t);for(h=Math.max(a,0);h<r;h++)h===d&&(n.push(e[h]),l++,d=Math.round(a+l*t))}const To=(e,n,t)=>"top"===n||"left"===n?e[n]+t:e[n]-t,Po=(e,n)=>Math.min(n||e,e);function ko(e,n){const t=[],i=e.length/n,s=e.length;let a=0;for(;a<s;a+=i)t.push(e[Math.floor(a)]);return t}function ud(e,n,t){const i=e.ticks.length,s=Math.min(n,i-1),a=e._startPixel,r=e._endPixel,l=1e-6;let h,c=e.getPixelForTick(s);if(!(t&&(h=1===i?Math.max(c-a,r-c):0===n?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(s-1))/2,c+=s<n?h:-h,c<a-l||c>r+l)))return c}function Le(e){return e.drawTicks?e.tickLength:0}function Ro(e,n){if(!e.display)return 0;const t=U(e.font,n),i=et(e.padding);return(B(e.text)?e.text.length:1)*t.lineHeight+i.height}function md(e,n,t){let i=ai(e);return(t&&"right"!==n||!t&&"right"===n)&&(i=(e=>"left"===e?"right":"right"===e?"left":e)(i)),i}class Kt extends Ot{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return n=rt(n,Number.POSITIVE_INFINITY),t=rt(t,Number.NEGATIVE_INFINITY),i=rt(i,Number.POSITIVE_INFINITY),s=rt(s,Number.NEGATIVE_INFINITY),{min:rt(n,i),max:rt(t,s),minDefined:G(n),maxDefined:G(t)}}getMinMax(n){let r,{min:t,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();if(s&&a)return{min:t,max:i};const l=this.getMatchingVisibleMetas();for(let c=0,h=l.length;c<h;++c)r=l[c].controller.getMinMax(this,n),s||(t=Math.min(t,r.min)),a||(i=Math.max(i,r.max));return t=a&&t>i?i:t,i=s&&t>i?t:i,{min:rt(t,rt(i,t)),max:rt(i,rt(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(){const n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}
vendor: 11,867 bytes, line 1
1getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(n,t,i){const{beginAtZero:s,grace:a,ticks:r}=this.options,l=r.sampleSize;this.beforeUpdate(),this.maxWidth=n,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=function Cc(e,n,t){const{min:i,max:s}=e,a=us(n,(s-i)/2),r=(l,c)=>t&&0===l?0:l+c;return{min:r(i,-Math.abs(a)),max:r(s,a)}}(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?ko(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function od(e,n){const t=e.options.ticks,i=function ad(e){const n=e.options.offset,t=e._tickSize();return Math.floor(Math.min(e._length/t+(n?0:1),e._maxLength/t))}(e),s=Math.min(t.maxTicksLimit||i,i),a=t.major.enabled?function ld(e){const n=[];let t,i;for(t=0,i=e.length;t<i;t++)e[t].major&&n.push(t);return n}(n):[],r=a.length,l=a[0],c=a[r-1],h=[];if(r>s)return function cd(e,n,t,i){let r,s=0,a=t[0];for(i=Math.ceil(i),r=0;r<e.length;r++)r===a&&(n.push(e[r]),s++,a=t[s*i])}(n,h,a,r/s),h;const d=function rd(e,n,t){const i=function hd(e){const n=e.length;let t,i;if(n<2)return!1;for(i=e[0],t=1;t<n;++t)if(e[t]-e[t-1]!==i)return!1;return i}(e),s=n.length/t;if(!i)return Math.max(s,1);const a=function Ul(e){const n=[],t=Math.sqrt(e);let i;for(i=1;i<t;i++)e%i===0&&(n.push(i),n.push(e/i));return t===(0|t)&&n.push(t),n.sort((s,a)=>s-a).pop(),n}(i);for(let r=0,l=a.length-1;r<l;r++){const c=a[r];if(c>s)return c}return Math.max(s,1)}(a,n,s);if(r>0){let u,f;const p=r>1?Math.round((c-l)/(r-1)):null;for(mn(n,h,d,A(p)?0:l-p,l),u=0,f=r-1;u<f;u++)mn(n,h,d,a[u],a[u+1]);return mn(n,h,d,c,A(p)?n.length:c+p),h}return mn(n,h,d),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,i,n=this.options.reverse;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,n=!n),this._startPixel=t,this._endPixel=i,this._reversePixels=n,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){N(this.options.afterUpdate,[this])}beforeSetDimensions(){N(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(){N(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),N(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){N(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){const t=this.options.ticks;let i,s,a;for(i=0,s=n.length;i<s;i++)a=n[i],a.label=N(t.callback,[a.value,i,n],this)}afterTickToLabelConversion(){N(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){N(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,i=Po(this.ticks.length,n.ticks.maxTicksLimit),s=t.minRotation||0,a=t.maxRotation;let l,c,h,r=s;if(!this._isVisible()||!t.display||s>=a||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const d=this._getLabelSizes(),u=d.widest.width,f=d.highest.height,p=J(this.chart.width-u,0,this.maxWidth);l=n.offset?this.maxWidth/i:p/(i-1),u+6>l&&(l=p/(i-(n.offset?.5:1)),c=this.maxHeight-Le(n.grid)-t.padding-Ro(n.title,this.chart.options.font),h=Math.sqrt(u*u+f*f),r=ii(Math.min(Math.asin(J((d.highest.height+6)/l,-1,1)),Math.asin(J(c/h,-1,1))-Math.asin(J(f/h,-1,1)))),r=Math.max(s,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){const n={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:a}}=this,r=this._isVisible(),l=this.isHorizontal();if(r){const c=Ro(s,t.options.font);if(l?(n.width=this.maxWidth,n.height=Le(a)+c):(n.height=this.maxHeight,n.width=Le(a)+c),i.display&&this.ticks.length){const{first:h,last:d,widest:u,highest:f}=this._getLabelSizes(),p=2*i.padding,g=ft(this.labelRotation),m=Math.cos(g),_=Math.sin(g);l?n.height=Math.min(this.maxHeight,n.height+(i.mirror?0:_*u.width+m*f.height)+p):n.width=Math.min(this.maxWidth,n.width+(i.mirror?0:m*u.width+_*f.height)+p),this._calculatePadding(h,d,_,m)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,i,s){const{ticks:{align:a,padding:r},position:l}=this.options,c=0!==this.labelRotation,h="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;c?h?(f=s*n.width,p=i*t.height):(f=i*n.height,p=s*t.width):"start"===a?p=t.width:"end"===a?f=n.width:"inner"!==a&&(f=n.width/2,p=t.width/2),this.paddingLeft=Math.max((f-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-u+r)*this.width/(this.width-u),0)}else{let d=t.height/2,u=n.height/2;"start"===a?(d=0,u=n.height):"end"===a&&(d=t.height,u=0),this.paddingTop=d+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){N(this.options.afterFit,[this])}isHorizontal(){const{axis:n,position:t}=this.options;return"top"===t||"bottom"===t||"x"===n}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(n),t=0,i=n.length;t<i;t++)A(n[t].label)&&(n.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=ko(i,t)),this._labelSizes=n=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return n}_computeLabelSizes(n,t,i){const{ctx:s,_longestTextCache:a}=this,r=[],l=[],c=Math.floor(t/Po(t,i));let u,f,p,g,m,_,b,y,v,M,x,h=0,d=0;for(u=0;u<t;u+=c){if(g=n[u].label,m=this._resolveTickFontOptions(u),s.font=_=m.string,b=a[_]=a[_]||{data:{},gc:[]},y=m.lineHeight,v=M=0,A(g)||B(g)){if(B(g))for(f=0,p=g.length;f<p;++f)x=g[f],!A(x)&&!B(x)&&(v=an(s,b.data,b.gc,v,x),M+=y)}else v=an(s,b.data,b.gc,v,g),M=y;r.push(v),l.push(M),h=Math.max(v,h),d=Math.max(M,d)}!function fd(e,n){j(e,t=>{const i=t.gc,s=i.length/2;let a;if(s>n){for(a=0;a<s;++a)delete t.data[i[a]];i.splice(0,s)}})}(a,t);const C=r.indexOf(h),T=l.indexOf(d),O=k=>({width:r[k]||0,height:l[k]||0});return{first:O(0),last:O(t-1),widest:O(C),highest:O(T),widths:r,heights:l}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);const t=this._startPixel+n*this._length;return function Ql(e){return J(e,-32768,32767)}(this._alignToPixels?zt(this.chart,t,0):t)}getDecimalForPixel(n){const t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){const t=this.ticks||[];if(n>=0&&n<t.length){const i=t[n];return i.$context||(i.$context=function gd(e,n,t){return At(e,{tick:t,index:n,type:"tick"})}(this.getContext(),n,i))}return this.$context||(this.$context=function pd(e,n){return At(e,{scale:n,type:"scale"})}(this.chart.getContext(),this))}_tickSize(){const n=this.options.ticks,t=ft(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),a=this._getLabelSizes(),r=n.autoSkipPadding||0,l=a?a.widest.width+r:0,c=a?a.highest.height+r:0;return this.isHorizontal()?c*i>l*s?l/i:c/s:c*s<l*i?c/i:l/s}_isVisible(){const n=this.options.display;return"auto"!==n?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){const t=this.axis,i=this.chart,s=this.options,{grid:a,position:r,border:l}=s,c=a.offset,h=this.isHorizontal(),u=this.ticks.length+(c?1:0),f=Le(a),p=[],g=l.setContext(this.getContext()),m=g.display?g.width:0,_=m/2,b=function(H){return zt(i,H,m)};let y,v,M,x,C,T,O,k,I,F,w,Z;if("top"===r)y=b(this.bottom),T=this.bottom-f,k=y-_,F=b(n.top)+_,Z=n.bottom;else if("bottom"===r)y=b(this.top),F=n.top,Z=b(n.bottom)-_,T=y+_,k=this.top+f;else if("left"===r)y=b(this.right),C=this.right-f,O=y-_,I=b(n.left)+_,w=n.right;else if("right"===r)y=b(this.left),I=n.left,w=b(n.right)-_,C=y+_,O=this.left+f;else if("x"===t){if("center"===r)y=b((n.top+n.bottom)/2+.5);else if(E(r)){const H=Object.keys(r)[0];y=b(this.chart.scales[H].getPixelForValue(r[H]))}F=n.top,Z=n.bottom,T=y+_,k=T+f}else if("y"===t){if("center"===r)y=b((n.left+n.right)/2);else if(E(r)){const H=Object.keys(r)[0];y=b(this.chart.scales[H].getPixelForValue(r[H]))}C=y-_,O=C-f,I=n.left,w=n.right}const lt=R(s.ticks.maxTicksLimit,u),L=Math.max(1,Math.ceil(u/lt));for(v=0;v<u;v+=L){const H=this.getContext(v),X=a.setContext(H),pt=l.setContext(H),it=X.lineWidth,me=X.color,Gn=pt.dash||[],_e=pt.dashOffset,Ue=X.tickWidth,Zt=X.tickColor,Ye=X.tickBorderDash||[],qt=X.tickBorderDashOffset;M=ud(this,v,c),void 0!==M&&(x=zt(i,M,it),h?C=O=I=w=x:T=k=F=Z=x,p.push({tx1:C,ty1:T,tx2:O,ty2:k,x1:I,y1:F,x2:w,y2:Z,width:it,color:me,borderDash:Gn,borderDashOffset:_e,tickWidth:Ue,tickColor:Zt,tickBorderDash:Ye,tickBorderDashOffset:qt}))}return this._ticksLength=u,this._borderValue=y,p}_computeLabelItems(n){const t=this.axis,i=this.options,{position:s,ticks:a}=i,r=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:h,padding:d,mirror:u}=a,f=Le(i.grid),p=f+d,g=u?-d:p,m=-ft(this.labelRotation),_=[];let b,y,v,M,x,C,T,O,k,I,F,w,Z="middle";if("top"===s)C=this.bottom-g,T=this._getXAxisLabelAlignment();else if("bottom"===s)C=this.top+g,T=this._getXAxisLabelAlignment();else if("left"===s){const L=this._getYAxisLabelAlignment(f);T=L.textAlign,x=L.x}else if("right"===s){const L=this._getYAxisLabelAlignment(f);T=L.textAlign,x=L.x}else if("x"===t){if("center"===s)C=(n.top+n.bottom)/2+p;else if(E(s)){const L=Object.keys(s)[0];C=this.chart.scales[L].getPixelForValue(s[L])+p}T=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===s)x=(n.left+n.right)/2-p;else if(E(s)){const L=Object.keys(s)[0];x=this.chart.scales[L].getPixelForValue(s[L])}T=this._getYAxisLabelAlignment(f).textAlign}"y"===t&&("start"===c?Z="top":"end"===c&&(Z="bottom"));const lt=this._getLabelSizes();for(b=0,y=l.length;b<y;++b){v=l[b],M=v.label;const L=a.setContext(this.getContext(b));O=this.getPixelForTick(b)+a.labelOffset,k=this._resolveTickFontOptions(b),I=k.lineHeight,F=B(M)?M.length:1;
vendor: 9,960 bytes, line 1
1const H=F/2,X=L.color,pt=L.textStrokeColor,it=L.textStrokeWidth;let Gn,me=T;if(r?(x=O,"inner"===T&&(me=b===y-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),w="top"===s?"near"===h||0!==m?-F*I+I/2:"center"===h?-lt.highest.height/2-H*I+I:I/2-lt.highest.height:"near"===h||0!==m?I/2:"center"===h?lt.highest.height/2-H*I:lt.highest.height-F*I,u&&(w*=-1),0!==m&&!L.showLabelBackdrop&&(x+=I/2*Math.sin(m))):(C=O,w=(1-F)*I/2),L.showLabelBackdrop){const _e=et(L.backdropPadding),Ue=lt.heights[b],Zt=lt.widths[b];let Ye=w-_e.top,qt=0-_e.left;switch(Z){case"middle":Ye-=Ue/2;break;case"bottom":Ye-=Ue}switch(T){case"center":qt-=Zt/2;break;case"right":qt-=Zt;break;case"inner":b===y-1?qt-=Zt:b>0&&(qt-=Zt/2)}Gn={left:qt,top:Ye,width:Zt+_e.width,height:Ue+_e.height,color:L.backdropColor}}_.push({label:M,font:k,textOffset:w,options:{rotation:m,color:X,strokeColor:pt,strokeWidth:it,textAlign:me,textBaseline:Z,translation:[x,C],backdrop:Gn}})}return _}_getXAxisLabelAlignment(){const{position:n,ticks:t}=this.options;if(-ft(this.labelRotation))return"top"===n?"left":"right";let s="center";return"start"===t.align?s="left":"end"===t.align?s="right":"inner"===t.align&&(s="inner"),s}_getYAxisLabelAlignment(n){const{position:t,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,l=n+a,c=this._getLabelSizes().widest.width;let h,d;return"left"===t?s?(d=this.right+a,"near"===i?h="left":"center"===i?(h="center",d+=c/2):(h="right",d+=c)):(d=this.right-l,"near"===i?h="right":"center"===i?(h="center",d-=c/2):(h="left",d=this.left)):"right"===t?s?(d=this.left+a,"near"===i?h="right":"center"===i?(h="center",d-=c/2):(h="left",d-=c)):(d=this.left+l,"near"===i?h="left":"center"===i?(h="center",d+=c/2):(h="right",d=this.right)):h="right",{textAlign:h,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const n=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:n.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:n.width}:void 0}drawBackground(){const{ctx:n,options:{backgroundColor:t},left:i,top:s,width:a,height:r}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(i,s,a,r),n.restore())}getLineWidthForValue(n){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(a=>a.value===n);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(n){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n));let a,r;const l=(c,h,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(t.display)for(a=0,r=s.length;a<r;++a){const c=s[a];t.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),t.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:n,ctx:t,options:{border:i,grid:s}}=this,a=i.setContext(this.getContext()),r=i.display?a.width:0;if(!r)return;const l=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let h,d,u,f;this.isHorizontal()?(h=zt(n,this.left,r)-r/2,d=zt(n,this.right,l)+l/2,u=f=c):(u=zt(n,this.top,r)-r/2,f=zt(n,this.bottom,l)+l/2,h=d=c),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(h,u),t.lineTo(d,f),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&rn(i,s);const a=this.getLabelItems(n);for(const r of a)Ht(i,r.label,0,r.textOffset,r.font,r.options);s&&ln(i)}drawTitle(){const{ctx:n,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const a=U(i.font),r=et(i.padding),l=i.align;let c=a.lineHeight/2;"bottom"===t||"center"===t||E(t)?(c+=r.bottom,B(i.text)&&(c+=a.lineHeight*(i.text.length-1))):c+=r.top;const{titleX:h,titleY:d,maxWidth:u,rotation:f}=function _d(e,n,t,i){const{top:s,left:a,bottom:r,right:l,chart:c}=e,{chartArea:h,scales:d}=c;let f,p,g,u=0;const m=r-s,_=l-a;if(e.isHorizontal()){if(p=tt(i,a,l),E(t)){const b=Object.keys(t)[0];g=d[b].getPixelForValue(t[b])+m-n}else g="center"===t?(h.bottom+h.top)/2+m-n:To(e,t,n);f=l-a}else{if(E(t)){const b=Object.keys(t)[0];p=d[b].getPixelForValue(t[b])-_+n}else p="center"===t?(h.left+h.right)/2-_+n:To(e,t,n);g=tt(i,r,s),u="left"===t?-W:W}return{titleX:p,titleY:g,maxWidth:f,rotation:u}}(this,c,t,l);Ht(n,i.text,0,0,a,{color:i.color,maxWidth:u,rotation:f,textAlign:md(l,t,s),textBaseline:"middle",translation:[h,d]})}draw(n){this._isVisible()&&(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){const n=this.options,t=n.ticks&&n.ticks.z||0,i=R(n.grid&&n.grid.z,-1),s=R(n.border&&n.border.z,0);return this._isVisible()&&this.draw===Kt.prototype.draw?[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:a=>{this.drawLabels(a)}}]:[{z:t,draw:a=>{this.draw(a)}}]}getMatchingVisibleMetas(n){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let a,r;for(a=0,r=t.length;a<r;++a){const l=t[a];l[i]===this.id&&(!n||l.type===n)&&s.push(l)}return s}_resolveTickFontOptions(n){return U(this.options.ticks.setContext(this.getContext(n)).font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class _n{constructor(n,t,i){this.type=n,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){const t=Object.getPrototypeOf(n);let i;(function xd(e){return"id"in e&&"defaults"in e})(t)&&(i=this.register(t));const s=this.items,a=n.id,r=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+n);return a in s||(s[a]=n,function bd(e,n,t){const i=ve(Object.create(null),[t?$.get(t):{},$.get(n),e.defaults]);$.set(n,i),e.defaultRoutes&&function yd(e,n){Object.keys(n).forEach(t=>{const i=t.split("."),s=i.pop(),a=[e].concat(i).join("."),r=n[t].split("."),l=r.pop(),c=r.join(".");$.route(a,s,c,l)})}(n,e.defaultRoutes),e.descriptors&&$.describe(n,e.descriptors)}(n,r,i),this.override&&$.override(n.id,n.overrides)),r}get(n){return this.items[n]}unregister(n){const t=this.items,i=n.id,s=this.scope;i in t&&delete t[i],s&&i in $[s]&&(delete $[s][i],this.override&&delete Vt[i])}}class vd{constructor(){this.controllers=new _n(wt,"datasets",!0),this.elements=new _n(Ot,"elements"),this.plugins=new _n(Object,"plugins"),this.scales=new _n(Kt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,i){[...t].forEach(s=>{const a=i||this._getRegistryForType(s);i||a.isForType(s)||a===this.plugins&&s.id?this._exec(n,a,s):j(s,r=>{const l=i||this._getRegistryForType(r);this._exec(n,l,r)})})}_exec(n,t,i){const s=ni(n);N(i["before"+s],[],i),t[n](i),N(i["after"+s],[],i)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(n))return i}return this.plugins}_get(n,t,i){const s=t.get(n);if(void 0===s)throw new Error('"'+n+'" is not a registered '+i+".");return s}}var mt=new vd;class Cd{constructor(){this._init=void 0}notify(n,t,i,s){if("beforeInit"===t&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install")),void 0===this._init)return;const a=s?this._descriptors(n).filter(s):this._descriptors(n),r=this._notify(a,n,t,i);return"afterDestroy"===t&&(this._notify(a,n,"stop"),this._notify(this._init,n,"uninstall"),this._init=void 0),r}_notify(n,t,i,s){s=s||{};for(const a of n){const r=a.plugin;if(!1===N(r[i],[t,s,a.options],r)&&s.cancelable)return!1}return!0}invalidate(){A(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){const i=n&&n.config,s=R(i.options&&i.options.plugins,{}),a=function Md(e){const n={},t=[],i=Object.keys(mt.plugins.items);for(let a=0;a<i.length;a++)t.push(mt.getPlugin(i[a]));const s=e.plugins||[];for(let a=0;a<s.length;a++){const r=s[a];-1===t.indexOf(r)&&(t.push(r),n[r.id]=!0)}return{plugins:t,localIds:n}}(i);return!1!==s||t?function Od(e,{plugins:n,localIds:t},i,s){const a=[],r=e.getContext();for(const l of n){const c=l.id,h=Sd(i[c],s);null!==h&&a.push({plugin:l,options:Td(e.config,{plugin:l,local:t[c]},h,r)})}return a}(n,a,s,t):[]}_notifyStateChanges(n){const t=this._oldCache||[],i=this._cache,s=(a,r)=>a.filter(l=>!r.some(c=>l.plugin.id===c.plugin.id));this._notify(s(t,i),n,"stop"),this._notify(s(i,t),n,"start")}}function Sd(e,n){return n||!1!==e?!0===e?{}:e:null}function Td(e,{plugin:n,local:t},i,s){const a=e.pluginScopeKeys(n),r=e.getOptionScopes(i,a);return t&&n.defaults&&r.push(n.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Pi(e,n){return((n.datasets||{})[e]||{}).indexAxis||n.indexAxis||($.datasets[e]||{}).indexAxis||"x"}function Fo(e){if("x"===e||"y"===e||"r"===e)return e}
vendor: 18,650 bytes, line 1
1function Rd(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function ki(e,...n){if(Fo(e))return e;for(const t of n){const i=t.axis||Rd(t.position)||e.length>1&&Fo(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Io(e,n,t){if(t[n+"AxisID"]===e)return{axis:n}}function Ao(e){const n=e.options||(e.options={});n.plugins=R(n.plugins,{}),n.scales=function Id(e,n){const t=Vt[e.type]||{scales:{}},i=n.scales||{},s=Pi(e.type,n),a=Object.create(null);return Object.keys(i).forEach(r=>{const l=i[r];if(!E(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=ki(r,l,function Fd(e,n){if(n.data&&n.data.datasets){const t=n.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(t.length)return Io(e,"x",t[0])||Io(e,"y",t[0])}return{}}(r,e),$.scales[l.type]),h=function kd(e,n){return e===n?"_index_":"_value_"}(c,s),d=t.scales||{};a[r]=Ce(Object.create(null),[{axis:c},l,d[c],d[h]])}),e.data.datasets.forEach(r=>{const l=r.type||e.type,c=r.indexAxis||Pi(l,n),d=(Vt[l]||{}).scales||{};Object.keys(d).forEach(u=>{const f=function Pd(e,n){let t=e;return"_index_"===e?t=n:"_value_"===e&&(t="x"===n?"y":"x"),t}(u,c),p=r[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Ce(a[p],[{axis:f},i[p],d[u]])})}),Object.keys(a).forEach(r=>{const l=a[r];Ce(l,[$.scales[l.type],$.scale])}),a}(e,n)}function Eo(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const wo=new Map,Do=new Set;function bn(e,n){let t=wo.get(e);return t||(t=n(),wo.set(e,t),Do.add(t)),t}const Ne=(e,n,t)=>{const i=Rt(n,t);void 0!==i&&e.add(i)};class Ed{constructor(n){this._config=function Ad(e){return(e=e||{}).data=Eo(e.data),Ao(e),e}(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Eo(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){const n=this._config;this.clearCache(),Ao(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return bn(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return bn(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return bn(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id;return bn(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){const i=this._scopeCache;let s=i.get(n);return(!s||t)&&(s=new Map,i.set(n,s)),s}getOptionScopes(n,t,i){const{options:s,type:a}=this,r=this._cachedScopes(n,i),l=r.get(t);if(l)return l;const c=new Set;t.forEach(d=>{n&&(c.add(n),d.forEach(u=>Ne(c,n,u))),d.forEach(u=>Ne(c,s,u)),d.forEach(u=>Ne(c,Vt[a]||{},u)),d.forEach(u=>Ne(c,$,u)),d.forEach(u=>Ne(c,ci,u))});const h=Array.from(c);return 0===h.length&&h.push(Object.create(null)),Do.has(t)&&r.set(t,h),h}chartOptionScopes(){const{options:n,type:t}=this;return[n,Vt[t]||{},$.datasets[t]||{},{type:t},$,ci]}resolveNamedOptions(n,t,i,s=[""]){const a={$shared:!0},{resolver:r,subPrefixes:l}=jo(this._resolverCache,n,s);let c=r;(function Dd(e,n){const{isScriptable:t,isIndexable:i}=js(e);for(const s of n){const a=t(s),r=i(s),l=(r||a)&&e[s];if(a&&(Ft(l)||wd(l))||r&&B(l))return!0}return!1})(r,t)&&(a.$shared=!1,c=re(r,i=Ft(i)?i():i,this.createResolver(n,i,l)));for(const h of t)a[h]=c[h];return a}createResolver(n,t,i=[""],s){const{resolver:a}=jo(this._resolverCache,n,i);return E(t)?re(a,t,void 0,s):a}}function jo(e,n,t){let i=e.get(n);i||(i=new Map,e.set(n,i));const s=t.join();let a=i.get(s);return a||(a={resolver:fi(n,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},i.set(s,a)),a}const wd=e=>E(e)&&Object.getOwnPropertyNames(e).some(n=>Ft(e[n])),Ld=["top","bottom","left","right","chartArea"];function Lo(e,n){return"top"===e||"bottom"===e||-1===Ld.indexOf(e)&&"x"===n}function No(e,n){return function(t,i){return t[e]===i[e]?t[n]-i[n]:t[e]-i[e]}}function $o(e){const n=e.chart,t=n.options.animation;n.notifyPlugins("afterRender"),N(t&&t.onComplete,[e],n)}function Nd(e){const n=e.chart,t=n.options.animation;N(t&&t.onProgress,[e],n)}function Bo(e){return mi()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const yn={},Vo=e=>{const n=Bo(e);return Object.values(yn).filter(t=>t.canvas===n).pop()};function $d(e,n,t){const i=Object.keys(e);for(const s of i){const a=+s;if(a>=n){const r=e[s];delete e[s],(t>0||a>n)&&(e[a+t]=r)}}}let xn=(()=>class e{static defaults=$;static instances=yn;static overrides=Vt;static registry=mt;static version="4.5.1";static getChart=Vo;static register(...t){mt.add(...t),zo()}static unregister(...t){mt.remove(...t),zo()}constructor(t,i){const s=this.config=new Ed(i),a=Bo(t),r=Vo(a);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.");const l=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||function sd(e){return!mi()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Wh:id}(a)),this.platform.updateConfig(s);const c=this.platform.acquireContext(a,l.aspectRatio),h=c&&c.canvas,d=h&&h.height,u=h&&h.width;this.id=Nl(),this.ctx=c,this.canvas=h,this.width=u,this.height=d,this._options=l,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 Cd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function ec(e,n){let t;return function(...i){return n?(clearTimeout(t),t=setTimeout(e,n,i)):e.apply(this,i),n}}(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],yn[this.id]=this,c&&h?(St.listen(this,"complete",$o),St.listen(this,"progress",Nd),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:i},width:s,height:a,_aspectRatio:r}=this;return A(t)?i&&r?r:a?s/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Es(this.canvas,this.ctx),this}stop(){return St.stop(this),this}resize(t,i){St.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){const s=this.options,l=this.platform.getMaximumSize(this.canvas,t,i,s.maintainAspectRatio&&this.aspectRatio),c=s.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Gs(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),N(s.onResize,[this,l],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){j(this.options.scales||{},(s,a)=>{s.id=a})}buildOrUpdateScales(){const t=this.options,i=t.scales,s=this.scales,a=Object.keys(s).reduce((l,c)=>(l[c]=!1,l),{});let r=[];i&&(r=r.concat(Object.keys(i).map(l=>{const c=i[l],h=ki(l,c),d="r"===h,u="x"===h;return{options:c,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),j(r,l=>{const c=l.options,h=c.id,d=ki(h,c),u=R(c.type,l.dtype);(void 0===c.position||Lo(c.position,d)!==Lo(l.dposition))&&(c.position=l.dposition),a[h]=!0;let f=null;h in s&&s[h].type===u?f=s[h]:(f=new(mt.getScale(u))({id:h,type:u,ctx:this.ctx,chart:this}),s[f.id]=f),f.init(c,t)}),j(a,(l,c)=>{l||delete s[c]}),j(s,l=>{nt.configure(this,l,l.options),nt.addBox(this,l)})}_updateMetasets(){const t=this._metasets,i=this.data.datasets.length,s=t.length;if(t.sort((a,r)=>a.index-r.index),s>i){for(let a=i;a<s;++a)this._destroyDatasetMeta(a);t.splice(i,s-i)}this._sortedMetasets=t.slice(0).sort(No("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((s,a)=>{0===i.filter(r=>r===s._dataset).length&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const t=[],i=this.data.datasets;let s,a;for(this._removeUnreferencedMetasets(),s=0,a=i.length;s<a;s++){const r=i[s];let l=this.getDatasetMeta(s);const c=r.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(s),l=this.getDatasetMeta(s)),l.type=c,l.indexAxis=r.indexAxis||Pi(c,this.options),l.order=r.order||0,l.index=s,l.label=""+r.label,l.visible=this.isDatasetVisible(s),l.controller)l.controller.updateIndex(s),l.controller.linkScales();else{const h=mt.getController(c),{datasetElementType:d,dataElementType:u}=$.datasets[c];Object.assign(h,{dataElementType:mt.getElement(u),datasetElementType:d&&mt.getElement(d)}),l.controller=new h(this,s),t.push(l.controller)}}return this._updateMetasets(),t}_resetElements(){j(this.data.datasets,(t,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const i=this.config;i.update();const s=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let d=0,u=this.data.datasets.length;d<u;d++){const{controller:f}=this.getDatasetMeta(d),p=!a&&-1===r.indexOf(f);f.buildOrUpdateElements(p),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=s.layout.autoPadding?l:0,this._updateLayout(l),a||j(r,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(No("z","_idx"));const{_active:c,_lastEvent:h}=this;h?this._eventHandler(h,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){j(this.scales,t=>{nt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,i=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!gs(i,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,i=this._getUniformDataChanges()||[];for(const{method:s,start:a,count:r}of i)$d(t,a,"_removeElements"===s?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const i=this.data.datasets.length,s=r=>new Set(t.filter(l=>l[0]===r).map((l,c)=>c+","+l.splice(1).join(","))),a=s(0);for(let r=1;r<i;r++)if(!gs(a,s(r)))return;return Array.from(a).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;nt.update(this,this.width,this.height,t);const i=this.chartArea,s=i.width<=0||i.height<=0;this._layers=[],j(this.boxes,a=>{s&&"chartArea"===a.position||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,r)=>{a._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let i=0,s=this.data.datasets.length;i<s;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,s=this.data.datasets.length;i<s;++i)this._updateDataset(i,Ft(t)?t({datasetIndex:i}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){const s=this.getDatasetMeta(t),a={meta:s,index:t,mode:i,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",a)&&(s.controller._update(i),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(St.has(this)?this.attached&&!St.running(this)&&St.start(this):(this.draw(),$o({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,a)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const i=this._sortedMetasets,s=[];let a,r;for(a=0,r=i.length;a<r;++a){const l=i[a];(!t||l.visible)&&s.push(l)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let i=t.length-1;i>=0;--i)this._drawDataset(t[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const i=this.ctx,s={meta:t,index:t.index,cancelable:!0},a=to(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(a&&rn(i,a),t.controller.draw(),a&&ln(i),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,s,a){const r=Lh.modes[i];return"function"==typeof r?r(this,t,s,a):[]}getDatasetMeta(t){const i=this.data.datasets[t],s=this._metasets;let a=s.filter(r=>r&&r._dataset===i).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:t,_dataset:i,_parsed:[],_sorted:!1},s.push(a)),a}getContext(){return this.$context||(this.$context=At(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const i=this.data.datasets[t];if(!i)return!1;const s=this.getDatasetMeta(t);return"boolean"==typeof s.hidden?!s.hidden:!i.hidden}setDatasetVisibility(t,i){this.getDatasetMeta(t).hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,i,s){const a=s?"show":"hide",r=this.getDatasetMeta(t),l=r.controller._resolveAnimations(void 0,a);Me(i)?(r.data[i].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),l.update(r,{visible:s}),this.update(c=>c.datasetIndex===t?a:void 0))}hide(t,i){this._updateVisibility(t,i,!1)}show(t,i){this._updateVisibility(t,i,!0)}_destroyDatasetMeta(t){const i=this._metasets[t];i&&i.controller&&i.controller._destroy(),delete this._metasets[t]}_stop(){let t,i;for(this.stop(),St.remove(this),t=0,i=this.data.datasets.length;t<i;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:i}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Es(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete yn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,i=this.platform,s=(r,l)=>{i.addEventListener(this,r,l),t[r]=l},a=(r,l,c)=>{r.offsetX=l,r.offsetY=c,this._eventHandler(r)};j(this.options.events,r=>s(r,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,i=this.platform,s=(h,d)=>{i.addEventListener(this,h,d),t[h]=d},a=(h,d)=>{t[h]&&(i.removeEventListener(this,h,d),delete t[h])},r=(h,d)=>{this.canvas&&this.resize(h,d)};let l;const c=()=>{a("attach",c),this.attached=!0,this.resize(),s("resize",r),s("detach",l)};l=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),s("attach",c)},i.isAttached(this.canvas)?c():l()}unbindEvents(){j(this._listeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._listeners={},j(this._responsiveListeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,i,s){const a=s?"set":"remove";let r,l,c,h;for("dataset"===i&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+a+"DatasetHoverStyle"]()),c=0,h=t.length;c<h;++c){l=t[c];const d=l&&this.getDatasetMeta(l.datasetIndex).controller;d&&d[a+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const i=this._active||[],s=t.map(({datasetIndex:r,index:l})=>{const c=this.getDatasetMeta(r);if(!c)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:c.data[l],index:l}});!tn(s,i)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,i))}notifyPlugins(t,i,s){return this._plugins.notify(this,t,i,s)}isPluginEnabled(t){return 1===this._plugins._cache.filter(i=>i.plugin.id===t).length}_updateHoverStyles(t,i,s){const a=this.options.hover,r=(h,d)=>h.filter(u=>!d.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=r(i,t),c=s?t:r(t,i);l.length&&this.updateHoverStyle(l,a.mode,!1),c.length&&a.mode&&this.updateHoverStyle(c,a.mode,!0)}_eventHandler(t,i){const s={event:t,replay:i,cancelable:!0,inChartArea:this.isPointInArea(t)},a=l=>(l.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",s,a))return;const r=this._handleEvent(t,i,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,a),(r||s.changed)&&this.render(),this}_handleEvent(t,i,s){const{_active:a=[],options:r}=this,c=this._getActiveElements(t,a,s,i),h=function Gl(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),d=function Bd(e,n,t,i){return t&&"mouseout"!==e.type?i?n:e:null}(t,this._lastEvent,s,h);s&&(this._lastEvent=null,N(r.onHover,[t,c,this],this),h&&N(r.onClick,[t,c,this],this));const u=!tn(c,a);return(u||i)&&(this._active=c,this._updateHoverStyles(c,a,i)),this._lastEvent=d,u}_getActiveElements(t,i,s,a){if("mouseout"===t.type)return[];if(!s)return i;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,a)}})();function zo(){return j(xn.instances,e=>e._plugins.invalidate())}function he(e,n,t,i){return{x:t+e*Math.cos(n),y:i+e*Math.sin(n)}}function vn(e,n,t,i,s,a){const{x:r,y:l,startAngle:c,pixelMargin:h,innerRadius:d}
vendor: 11,408 bytes, line 1
1=n,u=Math.max(n.outerRadius+i+t-h,0),f=d>0?d+i+t+h:0;let p=0;const g=s-c;if(i){const X=((d>0?d-i:0)+(u>0?u-i:0))/2;p=(g-(0!==X?g*X/(X+i):g))/2}const _=(g-Math.max(.001,g*u-t/D)/u)/2,b=c+_+p,y=s-_-p,{outerStart:v,outerEnd:M,innerStart:x,innerEnd:C}=function Gd(e,n,t,i){const s=function Hd(e){return ui(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),a=(t-n)/2,r=Math.min(a,i*n/2),l=c=>{const h=(t-Math.min(a,c))*i/2;return J(c,0,Math.min(a,h))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:J(s.innerStart,0,r),innerEnd:J(s.innerEnd,0,r)}}(n,f,u,y-b),T=u-v,O=u-M,k=b+v/T,I=y-M/O,F=f+x,w=f+C,Z=b+x/F,lt=y-C/w;if(e.beginPath(),a){const L=(k+I)/2;if(e.arc(r,l,u,k,L),e.arc(r,l,u,L,I),M>0){const it=he(O,I,r,l);e.arc(it.x,it.y,M,I,y+W)}const H=he(w,y,r,l);if(e.lineTo(H.x,H.y),C>0){const it=he(w,lt,r,l);e.arc(it.x,it.y,C,y+W,lt+Math.PI)}const X=(y-C/f+(b+x/f))/2;if(e.arc(r,l,f,y-C/f,X,!0),e.arc(r,l,f,X,b+x/f,!0),x>0){const it=he(F,Z,r,l);e.arc(it.x,it.y,x,Z+Math.PI,b-W)}const pt=he(T,b,r,l);if(e.lineTo(pt.x,pt.y),v>0){const it=he(T,k,r,l);e.arc(it.x,it.y,v,b-W,k)}}else{e.moveTo(r,l);const L=Math.cos(k)*u+r,H=Math.sin(k)*u+l;e.lineTo(L,H);const X=Math.cos(I)*u+r,pt=Math.sin(I)*u+l;e.lineTo(X,pt)}e.closePath()}function Ho(e,n,t=n){e.lineCap=R(t.borderCapStyle,n.borderCapStyle),e.setLineDash(R(t.borderDash,n.borderDash)),e.lineDashOffset=R(t.borderDashOffset,n.borderDashOffset),e.lineJoin=R(t.borderJoinStyle,n.borderJoinStyle),e.lineWidth=R(t.borderWidth,n.borderWidth),e.strokeStyle=R(t.borderColor,n.borderColor)}function Yd(e,n,t){e.lineTo(t.x,t.y)}function Go(e,n,t={}){const i=e.length,{start:s=0,end:a=i-1}=t,{start:r,end:l}=n,c=Math.max(s,r),h=Math.min(a,l);return{count:i,start:c,loop:n.loop,ilen:h<c&&!(s<r&&a<r||s>l&&a>l)?i+h-c:h-c}}function Jd(e,n,t,i){const{points:s,options:a}=n,{count:r,start:l,loop:c,ilen:h}=Go(s,t,i),d=function Kd(e){return e.stepped?fc:e.tension||"monotone"===e.cubicInterpolationMode?pc:Yd}(a);let p,g,m,{move:u=!0,reverse:f}=i||{};for(p=0;p<=h;++p)g=s[(l+(f?h-p:p))%r],!g.skip&&(u?(e.moveTo(g.x,g.y),u=!1):d(e,m,g,f,a.stepped),m=g);return c&&(g=s[(l+(f?h:0))%r],d(e,m,g,f,a.stepped)),!!c}function Qd(e,n,t,i){const s=n.points,{count:a,start:r,ilen:l}=Go(s,t,i),{move:c=!0,reverse:h}=i||{};let f,p,g,m,_,b,d=0,u=0;const y=M=>(r+(h?l-M:M))%a,v=()=>{m!==_&&(e.lineTo(d,_),e.lineTo(d,m),e.lineTo(d,b))};for(c&&(p=s[y(0)],e.moveTo(p.x,p.y)),f=0;f<=l;++f){if(p=s[y(f)],p.skip)continue;const M=p.x,x=p.y,C=0|M;C===g?(x<m?m=x:x>_&&(_=x),d=(u*d+M)/++u):(v(),e.lineTo(M,x),g=C,u=0,m=_=x),b=x}v()}function Ri(e){const n=e.options;return e._decimated||e._loop||n.tension||"monotone"===n.cubicInterpolationMode||n.stepped||n.borderDash&&n.borderDash.length?Jd:Qd}const eu="function"==typeof Path2D;let Cn=(()=>class e extends Ot{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};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){const s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||(Nc(this._points,s,t,s.spanGaps?this._loop:this._fullLoop,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=function qc(e,n){const t=e.points,i=e.options.spanGaps,s=t.length;if(!s)return[];const a=!!e._loop,{start:r,end:l}=function Qc(e,n,t,i){let s=0,a=n-1;if(t&&!i)for(;s<n&&!e[s].skip;)s++;for(;s<n&&e[s].skip;)s++;for(s%=n,t&&(a+=s);a>s&&e[a%n].skip;)a--;return a%=n,{start:s,end:a}}(t,s,a,i);return function Zs(e,n,t,i){return i&&i.setContext&&t?function th(e,n,t,i){const s=e._chart.getContext(),a=qs(e.options),{_datasetIndex:r,options:{spanGaps:l}}=e,c=t.length,h=[];let d=a,u=n[0].start,f=u;function p(g,m,_,b){const y=l?-1:1;if(g!==m){for(g+=c;t[g%c].skip;)g-=y;for(;t[m%c].skip;)m+=y;g%c!==m%c&&(h.push({start:g%c,end:m%c,loop:_,style:b}),d=b,u=m%c)}}for(const g of n){u=l?u:g.start;let _,m=t[u%c];for(f=u+1;f<=g.end;f++){const b=t[f%c];_=qs(i.setContext(At(s,{type:"segment",p0:m,p1:b,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:r}))),eh(_,d)&&p(u,f-1,g.loop,d),m=b,d=_}u<f-1&&p(u,f-1,g.loop,d)}return h}(e,n,t,i):n}(e,!0===i?[{start:r,end:l,loop:a}]:function Zc(e,n,t,i){const s=e.length,a=[];let c,r=n,l=e[n];for(c=n+1;c<=t;++c){const h=e[c%s];h.skip||h.stop?l.skip||(a.push({start:n%s,end:(c-1)%s,loop:i=!1}),n=r=h.stop?c:null):(r=c,l.skip&&(n=c)),l=h}return null!==r&&a.push({start:n%s,end:r%s,loop:i}),a}(t,r,l<r?l+s:l,!!e._fullLoop&&0===r&&l===s-1),t,n)}(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,s=t.length;return s&&this.points[t[s-1].end]}interpolate(t,i){const s=this.options,a=t[i],r=this.points,l=Qs(this,{property:i,start:a,end:a});if(!l.length)return;const c=[],h=function Zd(e){return e.stepped?Xc:e.tension||"monotone"===e.cubicInterpolationMode?Uc:Ut}(s);let d,u;for(d=0,u=l.length;d<u;++d){const{start:f,end:p}=l[d],g=r[f],m=r[p];if(g===m){c.push(g);continue}const b=h(g,m,Math.abs((a-g[i])/(m[i]-g[i])),s.stepped);b[i]=t[i],c.push(b)}return 1===c.length?c[0]:c}pathSegment(t,i,s){return Ri(this)(t,this,i,s)}path(t,i,s){const a=this.segments,r=Ri(this);let l=this._loop;i=i||0,s=s||this.points.length-i;for(const c of a)l&=r(t,this,c,{start:i,end:i+s-1});return!!l}draw(t,i,s,a){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function nu(e,n,t,i){eu&&!n.options.segment?function qd(e,n,t,i){let s=n._path;s||(s=n._path=new Path2D,n.path(s,t,i)&&s.closePath()),Ho(e,n.options),e.stroke(s)}(e,n,t,i):function tu(e,n,t,i){const{segments:s,options:a}=n,r=Ri(n);for(const l of s)Ho(e,a,l.style),e.beginPath(),r(e,n,l,{start:t,end:t+i-1})&&e.closePath(),e.stroke()}(e,n,t,i)}(t,this,s,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}})();function Wo(e,n,t,i){const s=e.options,{[t]:a}=e.getProps([t],i);return Math.abs(n-a)<s.radius+s.hitRadius}let iu=(()=>class e extends Ot{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};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,s){const a=this.options,{x:r,y:l}=this.getProps(["x","y"],s);return Math.pow(t-r,2)+Math.pow(i-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,i){return Wo(this,t,"x",i)}inYRange(t,i){return Wo(this,t,"y",i)}getCenterPoint(t){const{x:i,y:s}=this.getProps(["x","y"],t);return{x:i,y:s}}size(t){let i=(t=t||this.options||{}).radius||0;return i=Math.max(i,i&&t.hoverRadius||0),2*(i+(i&&t.borderWidth||0))}draw(t,i){const s=this.options;this.skip||s.radius<.1||!Mt(this,i,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,di(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}})();function Xo(e,n){const{x:t,y:i,base:s,width:a,height:r}=e.getProps(["x","y","base","width","height"],n);let l,c,h,d,u;return e.horizontal?(u=r/2,l=Math.min(t,s),c=Math.max(t,s),h=i-u,d=i+u):(u=a/2,l=t-u,c=t+u,h=Math.min(i,s),d=Math.max(i,s)),{left:l,top:h,right:c,bottom:d}}function Dt(e,n,t,i){return e?0:J(n,t,i)}function Fi(e,n,t,i){const s=null===n,a=null===t,l=e&&!(s&&a)&&Xo(e,i);return l&&(s||vt(n,l.left,l.right))&&(a||vt(t,l.top,l.bottom))}function lu(e,n){e.rect(n.x,n.y,n.w,n.h)}function Ii(e,n,t={}){const i=e.x!==t.x?-n:0,s=e.y!==t.y?-n:0;return{x:e.x+i,y:e.y+s,w:e.w+((e.x+e.w!==t.x+t.w?n:0)-i),h:e.h+((e.y+e.h!==t.y+t.h?n:0)-s),radius:e.radius}}var hu=Object.freeze({__proto__:null,ArcElement:class Ud extends Ot{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:n=>"borderDash"!==n};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(n){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,n&&Object.assign(this,n)}inRange(n,t,i){const s=this.getProps(["x","y"],i),{angle:a,distance:r}=xs(s,{x:n,y:t}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=(this.options.spacing+this.options.borderWidth)/2,p=R(u,c-l),g=Oe(a,l,c)&&l!==c,m=p>=V||g,_=vt(r,h+f,d+f);return m&&_}getCenterPoint(n){const{x:t,y:i,startAngle:s,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:h}=this.options,d=(s+a)/2,u=(r+l+h+c)/2;return{x:t+Math.cos(d)*u,y:i+Math.sin(d)*u}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:t,circumference:i}=this,s=(t.offset||0)/4,a=(t.spacing||0)/2,r=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>V?Math.floor(i/V):0,0===i||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const h=s*(1-Math.sin(Math.min(D,i||0)));n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,function Wd(e,n,t,i,s){const{fullCircles:a,startAngle:r,circumference:l}=n;let c=n.endAngle;if(a){vn(e,n,t,i,c,s);for(let h=0;h<a;++h)e.fill();isNaN(l)||(c=r+(l%V||V))}vn(e,n,t,i,c,s),e.fill()}(n,this,h,a,r),function Xd(e,n,t,i,s){const{fullCircles:a,startAngle:r,circumference:l,options:c}=n,{borderWidth:h,borderJoinStyle:d,borderDash:u,borderDashOffset:f,borderRadius:p}=c,g="inner"===c.borderAlign;if(!h)return;e.setLineDash(u||[]),e.lineDashOffset=f,g?(e.lineWidth=2*h,e.lineJoin=d||"round"):(e.lineWidth=h,e.lineJoin=d||"bevel");let m=n.endAngle;if(a){vn(e,n,t,i,m,s);for(let _=0;_<a;++_)e.stroke();isNaN(l)||(m=r+(l%V||V))}g&&function zd(e,n,t){const{startAngle:i,pixelMargin:s,x:a,y:r,outerRadius:l,innerRadius:c}=n;let h=s/l;e.beginPath(),e.arc(a,r,l,i-h,t+h),c>s?(h=s/c,e.arc(a,r,c,t+h,i-h,!0)):e.arc(a,r,s,t+W,i-W),e.closePath(),e.clip()}(e,n,m),c.selfJoin&&m-r>=D&&0===p&&"miter"!==d&&function Vd(e,n,t){const{startAngle:i,x:s,y:a,outerRadius:r,innerRadius:l,options:c}=n,{borderWidth:h,borderJoinStyle:d}=c,u=Math.min(h/r,q(i-t));if(e.beginPath(),e.arc(s,a,r-h/2,i+u/2,t-u/2),l>0){const f=Math.min(h/l,q(i-t));e.arc(s,a,l+h/2,t-f/2,i+f/2,!0)}else{const f=Math.min(h/2,r*q(i-t));if("round"===d)e.arc(s,a,f,t-D/2,i+D/2,!0);else if("bevel"===d){const p=2*f*f,g=-p*Math.cos(t+D/2)+s,m=-p*Math.sin(t
1+D/2)+a,_=p*Math.cos(i+D/2)+s,b=p*Math.sin(i+D/2)+a;e.lineTo(g,m),e.lineTo(_,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}(e,n,m),a||(vn(e,n,t,i,m,s),e.stroke())}(n,this,h,a,r),n.restore()}},BarElement:class cu extends Ot{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(n){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,n&&Object.assign(this,n)}draw(n){const{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:a,outer:r}=function au(e){const n=Xo(e),t=n.right-n.left,i=n.bottom-n.top,s=function su(e,n,t){const s=e.borderSkipped,a=Ds(e.options.borderWidth);return{t:Dt(s.top,a.top,0,t),r:Dt(s.right,a.right,0,n),b:Dt(s.bottom,a.bottom,0,t),l:Dt(s.left,a.left,0,n)}}(e,t/2,i/2),a=function ou(e,n,t){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,a=Gt(s),r=Math.min(n,t),l=e.borderSkipped,c=i||E(s);return{topLeft:Dt(!c||l.top||l.left,a.topLeft,0,r),topRight:Dt(!c||l.top||l.right,a.topRight,0,r),bottomLeft:Dt(!c||l.bottom||l.left,a.bottomLeft,0,r),bottomRight:Dt(!c||l.bottom||l.right,a.bottomRight,0,r)}}(e,t/2,i/2);return{outer:{x:n.left,y:n.top,w:t,h:i,radius:a},inner:{x:n.left+s.l,y:n.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}(this),l=function ru(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(r.radius)?Re:lu;n.save(),(r.w!==a.w||r.h!==a.h)&&(n.beginPath(),l(n,Ii(r,t,a)),n.clip(),l(n,Ii(a,-t,r)),n.fillStyle=i,n.fill("evenodd")),n.beginPath(),l(n,Ii(a,t)),n.fillStyle=s,n.fill(),n.restore()}inRange(n,t,i){return Fi(this,n,t,i)}inXRange(n,t){return Fi(this,n,null,t)}inYRange(n,t){return Fi(this,null,n,t)}getCenterPoint(n){const{x:t,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],n);return{x:a?(t+s)/2:t,y:a?i:(i+s)/2}}getRange(n){return"x"===n?this.width/2:this.height/2}},LineElement:Cn,PointElement:iu});const Ai=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Uo=Ai.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Yo(e){return Ai[e%Ai.length]}function Ko(e){return Uo[e%Uo.length]}function Jo(e){let n;for(n in e)if(e[n].borderColor||e[n].backgroundColor)return!0;return!1}var _u={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,n,t){if(!t.enabled)return;const{data:{datasets:i},options:s}=e.config,{elements:a}=s,r=Jo(i)||function gu(e){return e&&(e.borderColor||e.backgroundColor)}(s)||a&&Jo(a)||function mu(){return"rgba(0,0,0,0.1)"!==$.borderColor||"rgba(0,0,0,0.1)"!==$.backgroundColor}();if(!t.forceOverride&&r)return;const l=function pu(e){let n=0;return(t,i)=>{const s=e.getDatasetMeta(i).controller;s instanceof Ci?n=function uu(e,n){return e.backgroundColor=e.data.map(()=>Yo(n++)),n}(t,n):s instanceof po?n=function fu(e,n){return e.backgroundColor=e.data.map(()=>Ko(n++)),n}(t,n):s&&(n=function du(e,n){return e.borderColor=Yo(n),e.backgroundColor=Ko(n),++n}(t,n))}}(e);i.forEach(l)}};function Qo(e){if(e._decimated){const n=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function Zo(e){e.data.datasets.forEach(n=>{Qo(n)})}var vu={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,n,t)=>{if(!t.enabled)return void Zo(e);const i=e.width;e.data.datasets.forEach((s,a)=>{const{_data:r,indexAxis:l}=s,c=e.getDatasetMeta(a),h=r||s.data;if("y"===Fe([l,e.options.indexAxis])||!c.controller.supportsDecimation)return;const d=e.scales[c.xAxisID];if("linear"!==d.type&&"time"!==d.type||e.options.parsing)return;let g,{start:u,count:f}=function xu(e,n){const t=n.length;let s,i=0;const{iScale:a}=e,{min:r,max:l,minDefined:c,maxDefined:h}=a.getUserBounds();return c&&(i=J(Ct(n,a.axis,r).lo,0,t-1)),s=h?J(Ct(n,a.axis,l).hi+1,i,t)-i:t-i,{start:i,count:s}}(c,h);if(f<=(t.threshold||4*i))Qo(s);else{switch(A(r)&&(s._data=h,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}})),t.algorithm){case"lttb":g=function bu(e,n,t,i,s){const a=s.samples||i;if(a>=t)return e.slice(n,n+t);const r=[],l=(t-2)/(a-2);let c=0;const h=n+t-1;let u,f,p,g,m,d=n;for(r[c++]=e[d],u=0;u<a-2;u++){let y,_=0,b=0;const v=Math.floor((u+1)*l)+1+n,M=Math.min(Math.floor((u+2)*l)+1,t)+n,x=M-v;for(y=v;y<M;y++)_+=e[y].x,b+=e[y].y;_/=x,b/=x;const C=Math.floor(u*l)+1+n,T=Math.min(Math.floor((u+1)*l)+1,t)+n,{x:O,y:k}=e[d];for(p=g=-1,y=C;y<T;y++)g=.5*Math.abs((O-_)*(e[y].y-k)-(O-e[y].x)*(b-k)),g>p&&(p=g,f=e[y],m=y);r[c++]=f,d=m}return r[c++]=e[h],r}(h,u,f,i,t);break;case"min-max":g=function yu(e,n,t,i){let r,l,c,h,d,u,f,p,g,m,s=0,a=0;const _=[],y=e[n].x,M=e[n+t-1].x-y;for(r=n;r<n+t;++r){l=e[r],c=(l.x-y)/M*i,h=l.y;const x=0|c;if(x===d)h<g?(g=h,u=r):h>m&&(m=h,f=r),s=(a*s+l.x)/++a;else{const C=r-1;if(!A(u)&&!A(f)){const T=Math.min(u,f),O=Math.max(u,f);T!==p&&T!==C&&_.push({...e[T],x:s}),O!==p&&O!==C&&_.push({...e[O],x:s})}r>
10&&C!==p&&_.push(e[C]),_.push(l),d=x,a=0,g=m=h,u=f=p=r}}return _}(h,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g}})},destroy(e){Zo(e)}};function Ei(e,n,t,i){if(i)return;let s=n[e],a=t[e];return"angle"===e&&(s=q(s),a=q(a)),{property:e,start:s,end:a}}function Mn(e,n,t){for(;n>e;n--){const i=t[n];if(!isNaN(i.x)&&!isNaN(i.y))break}return n}function qo(e,n,t,i){return e&&n?i(e[t],n[t]):e?e[t]:n?n[t]:0}function ta(e,n){let t=[],i=!1;return B(e)?(i=!0,t=e):t=function Mu(e,n){const{x:t=null,y:i=null}=e||{},s=n.points,a=[];return n.segments.forEach(({start:r,end:l})=>{l=Mn(r,l,s);const c=s[r],h=s[l];null!==i?(a.push({x:c.x,y:i}),a.push({x:h.x,y:i})):null!==t&&(a.push({x:t,y:c.y}),a.push({x:t,y:h.y}))}),a}(e,n),t.length?new Cn({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function ea(e){return e&&!1!==e.fill}function Su(e,n,t){let s=e[n].fill;const a=[n];let r;if(!t)return s;for(;!1!==s&&-1===a.indexOf(s);){if(!G(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;a.push(s),s=r.fill}return!1}function Ou(e,n,t){const i=function Ru(e){const n=e.options,t=n.fill;let i=R(t&&t.target,t);return void 0===i&&(i=!!n.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(e);if(E(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return G(s)&&Math.floor(s)===s?function Tu(e,n,t,i){return("-"===e||"+"===e)&&(t=n+t),!(t===n||t<0||t>=i)&&t}(i[0],n,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Au(e,n,t){const i=[];for(let s=0;s<t.length;s++){const a=t[s],{first:r,last:l,point:c}=Eu(a,n,"x");if(!(!c||r&&l))if(r)i.unshift(c);else if(e.push(c),!l)break}e.push(...i)}function Eu(e,n,t){const i=e.interpolate(n,t);if(!i)return{};const s=i[t],a=e.segments,r=e.points;let l=!1,c=!1;for(let h=0;h<a.length;h++){const d=a[h],u=r[d.start][t],f=r[d.end][t];if(vt(s,u,f)){l=s===u,c=s===f;break}}return{first:l,last:c,point:i}}class na{constructor(n){this.x=n.x,this.y=n.y,this.radius=n.radius}pathSegment(n,t,i){const{x:s,y:a,radius:r}=this;return n.arc(s,a,r,(t=t||{start:0,end:V}).end,t.start,!0),!i.bounds}interpolate(n){const{x:t,y:i,radius:s}=this,a=n.angle;return{x:t+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function wi(e,n,t){const i=function wu(e){const{chart:n,fill:t,line:i}=e;if(G(t))return function Du(e,n){const t=e.getDatasetMeta(n);return t&&e.isDatasetVisible(n)?t.dataset:null}(n,t);if("stack"===t)return function Fu(e){const{scale:n,index:t,line:i}=e,s=[],a=i.segments,r=i.points,l=function Iu(e,n){const t=[],i=e.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const a=i[s];if(a.index===n)break;a.hidden||t.unshift(a.dataset)}return t}(n,t);l.push(ta({x:null,y:n.bottom},i));for(let c=0;c<a.length;c++){const h=a[c];for(let d=h.start;d<=h.end;d++)Au(s,r[d],l)}return new Cn({points:s,options:{}})}(e);if("shape"===t)return!0;const s=function ju(e){return(e.scale||{}).getPointPositionForValue?function Nu(e){const{scale:n,fill:t}=e,i=n.options,s=n.getLabels().length,a=i.reverse?n.max:n.min,r=function ku(e,n,t){let i;return i="start"===e?t:"end"===e?n.options.reverse?n.min:n.max:E(e)?e.value:n.getBaseValue(),i}(t,n,a),l=[];if(i.grid.circular){const c=n.getPointPositionForValue(0,a);return new na({x:c.x,y:c.y,radius:n.getDistanceFromCenterForValue(r)})}for(let c=0;c<s;++c)l.push(n.getPointPositionForValue(c,r));return l}(e):function Lu(e){const{scale:n={},fill:t}=e,i=function Pu(e,n){let t=null;return"start"===e?t=n.bottom:"end"===e?t=n.top:E(e)?t=n.getPixelForValue(e.value):n.getBasePixel&&(t=n.getBasePixel()),t}(t,n);if(G(i)){const s=n.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}(e)}(e);return s instanceof na?s:ta(s,i)}(n),{chart:s,index:a,line:r,scale:l,axis:c}=n,h=r.options,d=h.fill,u=h.backgroundColor,{above:f=u,below:p=u}=d||{},g=s.getDatasetMeta(a),m=to(s,g);i&&r.points.length&&(rn(e,t),function $u(e,n){const{line:t,target:i,above:s,below:a,area:r,scale:l,clip:c}=n,h=t._loop?"angle":n.axis;e.save();let d=a;a!==s&&("x"===h?(ia(e,i,r.top),Di(e,{line:t,target:i,color:s,scale:l,property:h,clip:c}),e.restore(),e.save(),ia(e,i,r.bottom)):"y"===h&&(sa(e,i,r.left),Di(e,{line:t,target:i,color:a,scale:l,property:h,clip:c}
vendor: 4,716 bytes, line 1
1),e.restore(),e.save(),sa(e,i,r.right),d=s)),Di(e,{line:t,target:i,color:d,scale:l,property:h,clip:c}),e.restore()}(e,{line:r,target:i,above:f,below:p,area:t,scale:l,axis:c,clip:m}),ln(e))}function ia(e,n,t){const{segments:i,points:s}=n;let a=!0,r=!1;e.beginPath();for(const l of i){const{start:c,end:h}=l,d=s[c],u=s[Mn(c,h,s)];a?(e.moveTo(d.x,d.y),a=!1):(e.lineTo(d.x,t),e.lineTo(d.x,d.y)),r=!!n.pathSegment(e,l,{move:r}),r?e.closePath():e.lineTo(u.x,t)}e.lineTo(n.first().x,t),e.closePath(),e.clip()}function sa(e,n,t){const{segments:i,points:s}=n;let a=!0,r=!1;e.beginPath();for(const l of i){const{start:c,end:h}=l,d=s[c],u=s[Mn(c,h,s)];a?(e.moveTo(d.x,d.y),a=!1):(e.lineTo(t,d.y),e.lineTo(d.x,d.y)),r=!!n.pathSegment(e,l,{move:r}),r?e.closePath():e.lineTo(t,u.y)}e.lineTo(t,n.first().y),e.closePath(),e.clip()}function Di(e,n){const{line:t,target:i,property:s,color:a,scale:r,clip:l}=n,c=function Cu(e,n,t){const i=e.segments,s=e.points,a=n.points,r=[];for(const l of i){let{start:c,end:h}=l;h=Mn(c,h,s);const d=Ei(t,s[c],s[h],l.loop);if(!n.segments){r.push({source:l,target:d,start:s[c],end:s[h]});continue}const u=Qs(n,d);for(const f of u){const p=Ei(t,a[f.start],a[f.end],f.loop),g=Js(l,s,p);for(const m of g)r.push({source:m,target:f,start:{[t]:qo(d,p,"start",Math.max)},end:{[t]:qo(d,p,"end",Math.min)}})}}return r}(t,i,s);for(const{source:h,target:d,start:u,end:f}of c){const{style:{backgroundColor:p=a}={}}=h,g=!0!==i;e.save(),e.fillStyle=p,Bu(e,r,l,g&&Ei(s,u,f)),e.beginPath();const m=!!t.pathSegment(e,h);let _;if(g){m?e.closePath():oa(e,i,f,s);const b=!!i.pathSegment(e,d,{move:m,reverse:!0});_=m&&b,_||oa(e,i,u,s)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function Bu(e,n,t,i){const s=n.chart.chartArea,{property:a,start:r,end:l}=i||{};if("x"===a||"y"===a){let c,h,d,u;"x"===a?(c=r,h=s.top,d=l,u=s.bottom):(c=s.left,h=r,d=s.right,u=l),e.beginPath(),t&&(c=Math.max(c,t.left),d=Math.min(d,t.right),h=Math.max(h,t.top),u=Math.min(u,t.bottom)),e.rect(c,h,d-c,u-h),e.clip()}}function oa(e,n,t,i){const s=n.interpolate(t,i);s&&e.lineTo(s.x,s.y)}var Vu={id:"filler",afterDatasetsUpdate(e,n,t){const i=(e.data.datasets||[]).length,s=[];let a,r,l,c;for(r=0;r<i;++r)a=e.getDatasetMeta(r),l=a.dataset,c=null,l&&l.options&&l instanceof Cn&&(c={visible:e.isDatasetVisible(r),index:r,fill:Ou(l,r,i),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,s.push(c);for(r=0;r<i;++r)c=s[r],c&&!1!==c.fill&&(c.fill=Su(s,r,t.propagate))},beforeDraw(e,n,t){const i="beforeDraw"===t.drawTime,s=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let r=s.length-1;r>=0;--r){const l=s[r].$filler;l&&(l.line.updateControlPoints(a,l.axis),i&&l.fill&&wi(e.ctx,l,a))}},beforeDatasetsDraw(e,n,t){if("beforeDatasetsDraw"!==t.drawTime)return;const i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const a=i[s].$filler;ea(a)&&wi(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,n,t){const i=n.meta.$filler;!ea(i)||"beforeDatasetDraw"!==t.drawTime||wi(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const aa=(e,n)=>{let{boxHeight:t=n,boxWidth:i=n}=e;return e.usePointStyle&&(t=Math.min(t,n),i=e.pointStyleWidth||Math.min(i,n)),{boxWidth:i,boxHeight:t,itemHeight:Math.max(n,t)}};class ra extends Ot{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t,i){this.maxWidth=n,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(){const n=this.options.labels||{};let t=N(n.generateLabels,[this.chart],this)||[];n.filter&&(t=t.filter(i=>n.filter(i,this.chart.data))),n.sort&&(t=t.sort((i,s)=>n.sort(i,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:n,ctx:t}=this;if(!n.display)return void(this.width=this.height=0);const i=n.labels,s=U(i.font),a=s.size,r=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=aa(i,a);let h,d;t.font=s.string,this.isHorizontal()?(h=this.maxWidth,d=this._fitRows(r,a,l,c)+10):(d=this.maxHeight,h=this._fitCols(r,s,l,c)+10),this.width=Math.min(h,n.maxWidth||this.maxWidth),this.height=Math.min(d,n.maxHeight||this.maxHeight)}
vendor: 2,756 bytes, line 1
1_fitRows(n,t,i,s){const{ctx:a,maxWidth:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.lineWidths=[0],d=s+l;let u=n;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-d;return this.legendItems.forEach((g,m)=>{const _=i+t/2+a.measureText(g.text).width;(0===m||h[h.length-1]+_+2*l>r)&&(u+=d,h[h.length-(m>0?0:1)]=0,p+=d,f++),c[m]={left:0,top:p,row:f,width:_,height:s},h[h.length-1]+=_+l}),u}_fitCols(n,t,i,s){const{ctx:a,maxHeight:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.columnSizes=[],d=r-n;let u=l,f=0,p=0,g=0,m=0;return this.legendItems.forEach((_,b)=>{const{itemWidth:y,itemHeight:v}=function Hu(e,n,t,i,s){const a=function Gu(e,n,t,i){let s=e.text;return s&&"string"!=typeof s&&(s=s.reduce((a,r)=>a.length>r.length?a:r)),n+t.size/2+i.measureText(s).width}(i,e,n,t),r=function Wu(e,n,t){let i=e;return"string"!=typeof n.text&&(i=la(n,t)),i}(s,i,n.lineHeight);return{itemWidth:a,itemHeight:r}}(i,t,a,_,s);b>0&&p+v+2*l>d&&(u+=f+l,h.push({width:f,height:p}),g+=f+l,m++,f=p=0),c[b]={left:g,top:p,col:m,width:y,height:v},f=Math.max(f,y),p+=v+l}),u+=f,h.push({width:f,height:p}),u}adjustHitBoxes(){if(!this.options.display)return;const n=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:s},rtl:a}}=this,r=ce(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=tt(i,this.left+s,this.right-this.lineWidths[l]);for(const h of t)l!==h.row&&(l=h.row,c=tt(i,this.left+s,this.right-this.lineWidths[l])),h.top+=this.top+n+s,h.left=r.leftForLtr(r.x(c),h.width),c+=h.width+s}else{let l=0,c=tt(i,this.top+n+s,this.bottom-this.columnSizes[l].height);for(const h of t)h.col!==l&&(l=h.col,c=tt(i,this.top+n+s,this.bottom-this.columnSizes[l].height)),h.top=c,h.left+=this.left+s,h.left=r.leftForLtr(r.x(h.left),h.width),c+=h.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const n=this.ctx;rn(n,this),this._draw(),ln(n)}}_draw(){const{options:n,columnSizes:t,lineWidths:i,ctx:s}=this,{align:a,labels:r}=n,l=$.color,c=ce(n.rtl,this.left,this.width),h=U(r.font),{padding:d}=r,u=h.size,f=u/2;let p;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:g,boxHeight:m,itemHeight:_}=aa(r,u),v=this.isHorizontal(),M=this._computeTitleHeight();p=v?{x:tt(a,this.left+d,this.right-i[0]),y:this.top+d+M,line:0}:{x:this.left+d,y:tt(a,this.top+M+d,this.bottom-t[0].height),line:0},Xs(this.ctx,n.textDirection);const x=_+d;this.legendItems.forEach((C,T)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const O=s.measureText(C.text).width,k=c.textAlign(C.textAlign||(C.textAlign=r.textAlign)),I=g+f+O;let F=p.x,w=p.y;c.setWidth(this.width),v?T>0&&F+I+d>
vendor: 4,218 bytes, line 1
1this.right&&(w=p.y+=x,p.line++,F=p.x=tt(a,this.left+d,this.right-i[p.line])):T>0&&w+x>this.bottom&&(F=p.x=F+t[p.line].width+d,p.line++,w=p.y=tt(a,this.top+M+d,this.bottom-t[p.line].height)),function(C,T,O){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const k=R(O.lineWidth,1);if(s.fillStyle=R(O.fillStyle,l),s.lineCap=R(O.lineCap,"butt"),s.lineDashOffset=R(O.lineDashOffset,0),s.lineJoin=R(O.lineJoin,"miter"),s.lineWidth=k,s.strokeStyle=R(O.strokeStyle,l),s.setLineDash(R(O.lineDash,[])),r.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:k},F=c.xPlus(C,g/2);ws(s,I,F,T+f,r.pointStyleWidth&&g)}else{const I=T+Math.max((u-m)/2,0),F=c.leftForLtr(C,g),w=Gt(O.borderRadius);s.beginPath(),Object.values(w).some(Z=>0!==Z)?Re(s,{x:F,y:I,w:g,h:m,radius:w}):s.rect(F,I,g,m),s.fill(),0!==k&&s.stroke()}s.restore()}(c.x(F),w,C),F=((e,n,t,i)=>e===(i?"left":"right")?t:"center"===e?(n+t)/2:n)(k,F+g+f,v?F+I:this.right,n.rtl),function(C,T,O){Ht(s,O.text,C,T+_/2,h,{strikethrough:O.hidden,textAlign:c.textAlign(O.textAlign)})}(c.x(F),w,C),v?p.x+=I+d:p.y+="string"!=typeof C.text?la(C,h.lineHeight)+d:x}),Us(this.ctx,n.textDirection)}drawTitle(){const n=this.options,t=n.title,i=U(t.font),s=et(t.padding);if(!t.display)return;const a=ce(n.rtl,this.left,this.width),r=this.ctx,l=t.position,h=s.top+i.size/2;let d,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),d=this.top+h,u=tt(n.align,u,this.right-f);else{const g=this.columnSizes.reduce((m,_)=>Math.max(m,_.height),0);d=h+tt(n.align,this.top,this.bottom-g-n.labels.padding-this._computeTitleHeight())}const p=tt(l,u,u+f);r.textAlign=a.textAlign(ai(l)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=i.string,Ht(r,t.text,p,d,i)}_computeTitleHeight(){const n=this.options.title,t=U(n.font),i=et(n.padding);return n.display?t.lineHeight+i.height:0}_getLegendItemAt(n,t){let i,s,a;if(vt(n,this.left,this.right)&&vt(t,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(s=a[i],vt(n,s.left,s.left+s.width)&&vt(t,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(n){const t=this.options;if(!function Xu(e,n){return!(("mousemove"!==e&&"mouseout"!==e||!n.onHover&&!n.onLeave)&&(!n.onClick||"click"!==e&&"mouseup"!==e))}(n.type,t))return;const i=this._getLegendItemAt(n.x,n.y);if("mousemove"===n.type||"mouseout"===n.type){const s=this._hoveredItem,a=((e,n)=>null!==e&&null!==n&&e.datasetIndex===n.datasetIndex&&e.index===n.index)(s,i);s&&!a&&N(t.onLeave,[n,s,this],this),this._hoveredItem=i,i&&!a&&N(t.onHover,[n,i,this],this)}else i&&N(t.onClick,[n,i,this],this)}}function la(e,n){return n*(e.text?e.text.length:0)}var Uu={id:"legend",_element:ra,start(e,n,t){const i=e.legend=new ra({ctx:e.ctx,options:t,chart:e});nt.configure(e,i,t),nt.addBox(e,i)},stop(e){nt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,n,t){const i=e.legend;nt.configure(e,i,t),i.options=t},afterUpdate(e){const n=e.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(e,n){n.replay||e.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,n,t){const i=n.datasetIndex,s=t.chart;s.isDatasetVisible(i)?(s.hide(i),n.hidden=!0):(s.show(i),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const n=e.data.datasets,{labels:{usePointStyle:t,pointStyle:i,textAlign:s,color:a,useBorderRadius:r,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const h=c.controller.getStyle(t?0:void 0),d=et(h.borderWidth);return{text:n[c.index].label,fillStyle:h.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:i||h.pointStyle,rotation:h.rotation,textAlign:s||h.textAlign,borderRadius:r&&(l||h.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};
vendor: 4,622 bytes, line 1
1class ji extends Ot{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=n,this.height=this.bottom=t;const s=B(i.text)?i.text.length:1;this._padding=et(i.padding);const a=s*U(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const n=this.options.position;return"top"===n||"bottom"===n}_drawArgs(n){const{top:t,left:i,bottom:s,right:a,options:r}=this,l=r.align;let h,d,u,c=0;return this.isHorizontal()?(d=tt(l,i,a),u=t+n,h=a-i):("left"===r.position?(d=i+n,u=tt(l,s,t),c=-.5*D):(d=a-n,u=tt(l,t,s),c=.5*D),h=s-t),{titleX:d,titleY:u,maxWidth:h,rotation:c}}draw(){const n=this.ctx,t=this.options;if(!t.display)return;const i=U(t.font),a=i.lineHeight/2+this._padding.top,{titleX:r,titleY:l,maxWidth:c,rotation:h}=this._drawArgs(a);Ht(n,t.text,0,0,i,{color:t.color,maxWidth:c,rotation:h,textAlign:ai(t.align),textBaseline:"middle",translation:[r,l]})}}var Ku={id:"title",_element:ji,start(e,n,t){!function Yu(e,n){const t=new ji({ctx:e.ctx,options:n,chart:e});nt.configure(e,t,n),nt.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){nt.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,n,t){const i=e.titleBlock;nt.configure(e,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}};const Sn=new WeakMap;var Ju={id:"subtitle",start(e,n,t){const i=new ji({ctx:e.ctx,options:t,chart:e});nt.configure(e,i,t),nt.addBox(e,i),Sn.set(e,i)},stop(e){nt.removeBox(e,Sn.get(e)),Sn.delete(e)},beforeUpdate(e,n,t){const i=Sn.get(e);nt.configure(e,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}};const $e={average(e){if(!e.length)return!1;let n,t,i=new Set,s=0,a=0;for(n=0,t=e.length;n<t;++n){const l=e[n].element;if(l&&l.hasValue()){const c=l.tooltipPosition();i.add(c.x),s+=c.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce((l,c)=>l+c)/i.size,y:s/a}},nearest(e,n){if(!e.length)return!1;let a,r,l,t=n.x,i=n.y,s=Number.POSITIVE_INFINITY;for(a=0,r=e.length;a<r;++a){const c=e[a].element;if(c&&c.hasValue()){const d=si(n,c.getCenterPoint());d<s&&(s=d,l=c)}}if(l){const c=l.tooltipPosition();t=c.x,i=c.y}return{x:t,y:i}}};function _t(e,n){return n&&(B(n)?Array.prototype.push.apply(e,n):e.push(n)),e}function Tt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Qu(e,n){const{element:t,datasetIndex:i,index:s}=n,a=e.getDatasetMeta(i).controller,{label:r,value:l}=a.getLabelAndValue(s);return{chart:e,label:r,parsed:a.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:l,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function ca(e,n){const t=e.chart.ctx,{body:i,footer:s,title:a}=e,{boxWidth:r,boxHeight:l}=n,c=U(n.bodyFont),h=U(n.titleFont),d=U(n.footerFont),u=a.length,f=s.length,p=i.length,g=et(n.padding);let m=g.height,_=0,b=i.reduce((M,x)=>M+x.before.length+x.lines.length+x.after.length,0);b+=e.beforeBody.length+e.afterBody.length,u&&(m+=u*h.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),b&&(m+=p*(n.displayColors?Math.max(l,c.lineHeight):c.lineHeight)+(b-p)*c.lineHeight+(b-1)*n.bodySpacing),f&&(m+=n.footerMarginTop+f*d.lineHeight+(f-1)*n.footerSpacing);let y=0;const v=function(M){_=Math.max(_,t.measureText(M).width+y)};return t.save(),t.font=h.string,j(e.title,v),t.font=c.string,j(e.beforeBody.concat(e.afterBody),v),y=n.displayColors?r+2+n.boxPadding:0,j(i,M=>{j(M.before,v),j(M.lines,v),j(M.after,v)}),y=0,t.font=d.string,j(e.footer,v),t.restore(),_+=g.width,{width:_,height:m}}function tf(e,n,t,i){const{x:s,width:a}=t,{width:r,chartArea:{left:l,right:c}}=e;let h="center";return"center"===i?h=s<=(l+c)/2?"left":"right":s<=a/2?h="left":s>=r-a/2&&(h="right"),function qu(e,n,t,i){const{x:s,width:a}=i,r=t.caretSize+t.caretPadding;if("left"===e&&s+a+r>n.width||"right"===e&&s-a-r<0)return!0}(h,e,n,t)&&(h="center"),h}function ha(e,n,t){const i=t.yAlign||n.yAlign||function Zu(e,n){const{y:t,height:i}=n;return t<i/2?"top":t>e.height-i/2?"bottom":"center"}(e,t);return{xAlign:t.xAlign||n.xAlign||tf(e,n,t,i),yAlign:i}}
vendor: 8,238 bytes, line 1
1function da(e,n,t,i){const{caretSize:s,caretPadding:a,cornerRadius:r}=e,{xAlign:l,yAlign:c}=t,h=s+a,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Gt(r);let g=function ef(e,n){let{x:t,width:i}=e;return"right"===n?t-=i:"center"===n&&(t-=i/2),t}(n,l);const m=function nf(e,n,t){let{y:i,height:s}=e;return"top"===n?i+=t:i-="bottom"===n?s+t:s/2,i}(n,c,h);return"center"===c?"left"===l?g+=h:"right"===l&&(g-=h):"left"===l?g-=Math.max(d,f)+s:"right"===l&&(g+=Math.max(u,p)+s),{x:J(g,0,i.width-n.width),y:J(m,0,i.height-n.height)}}function On(e,n,t){const i=et(t.padding);return"center"===n?e.x+e.width/2:"right"===n?e.x+e.width-i.right:e.x+i.left}function ua(e){return _t([],Tt(e))}function fa(e,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?e.override(t):e}const pa={beforeTitle:xt,title(e){if(e.length>0){const n=e[0],t=n.chart.data.labels,i=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return n.dataset.label||"";if(n.label)return n.label;if(i>0&&n.dataIndex<i)return t[n.dataIndex]}return""},afterTitle:xt,beforeBody:xt,beforeLabel:xt,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let n=e.dataset.label||"";n&&(n+=": ");const t=e.formattedValue;return A(t)||(n+=t),n},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:xt,afterBody:xt,beforeFooter:xt,footer:xt,afterFooter:xt};function ot(e,n,t,i){const s=e[n].call(t,i);return typeof s>"u"?pa[n].call(t,i):s}let ga=(()=>class e extends Ot{static positioners=$e;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const i=this.chart,s=this.options.setContext(this.getContext()),a=s.enabled&&i.options.animation&&s.animations,r=new no(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=function sf(e,n,t){return At(e,{tooltip:n,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){const{callbacks:s}=i,a=ot(s,"beforeTitle",this,t),r=ot(s,"title",this,t),l=ot(s,"afterTitle",this,t);let c=[];return c=_t(c,Tt(a)),c=_t(c,Tt(r)),c=_t(c,Tt(l)),c}getBeforeBody(t,i){return ua(ot(i.callbacks,"beforeBody",this,t))}getBody(t,i){const{callbacks:s}=i,a=[];return j(t,r=>{const l={before:[],lines:[],after:[]},c=fa(s,r);_t(l.before,Tt(ot(c,"beforeLabel",this,r))),_t(l.lines,ot(c,"label",this,r)),_t(l.after,Tt(ot(c,"afterLabel",this,r))),a.push(l)}),a}getAfterBody(t,i){return ua(ot(i.callbacks,"afterBody",this,t))}getFooter(t,i){const{callbacks:s}=i,a=ot(s,"beforeFooter",this,t),r=ot(s,"footer",this,t),l=ot(s,"afterFooter",this,t);let c=[];return c=_t(c,Tt(a)),c=_t(c,Tt(r)),c=_t(c,Tt(l)),c}_createItems(t){const i=this._active,s=this.chart.data,a=[],r=[],l=[];let h,d,c=[];for(h=0,d=i.length;h<d;++h)c.push(Qu(this.chart,i[h]));return t.filter&&(c=c.filter((u,f,p)=>t.filter(u,f,p,s))),t.itemSort&&(c=c.sort((u,f)=>t.itemSort(u,f,s))),j(c,u=>{const f=fa(t.callbacks,u);a.push(ot(f,"labelColor",this,u)),r.push(ot(f,"labelPointStyle",this,u)),l.push(ot(f,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=r,this.labelTextColors=l,this.dataPoints=c,c}update(t,i){const s=this.options.setContext(this.getContext()),a=this._active;let r,l=[];if(a.length){const c=$e[s.position].call(this,a,this._eventPosition);l=this._createItems(s),this.title=this.getTitle(l,s),this.beforeBody=this.getBeforeBody(l,s),this.body=this.getBody(l,s),this.afterBody=this.getAfterBody(l,s),this.footer=this.getFooter(l,s);const h=this._size=ca(this,s),d=Object.assign({},c,h),u=ha(this.chart,s,d),f=da(s,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:h.width,height:h.height,caretX:c.x,caretY:c.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=l,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,s,a){const r=this.getCaretPosition(t,s,a);i.lineTo(r.x1,r.y1),i.lineTo(r.x2,r.y2),i.lineTo(r.x3,r.y3)}getCaretPosition(t,i,s){const{xAlign:a,yAlign:r}=this,{caretSize:l,cornerRadius:c}=s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Gt(c),{x:p,y:g}=t,{width:m,height:_}=i;let b,y,v,M,x,C;return"center"===r?(x=g+_/2,"left"===a?(b=p,y=b-l,M=x+l,C=x-l):(b=p+m,y=b+l,M=x-l,C=x+l),v=b):(y="left"===a?p+Math.max(h,u)+l:"right"===a?p+m-Math.max(d,f)-l:this.caretX,"top"===r?(M=g,x=M-l,b=y-l,v=y+l):(M=g+_,x=M+l,b=y+l,v=y-l),C=M),{x1:b,x2:y,x3:v,y1:M,y2:x,y3:C}}drawTitle(t,i,s){const a=this.title,r=a.length;let l,c,h;if(r){const d=ce(s.rtl,this.x,this.width);for(t.x=On(this,s.titleAlign,s),i.textAlign=d.textAlign(s.titleAlign),i.textBaseline="middle",l=U(s.titleFont),c=s.titleSpacing,i.fillStyle=s.titleColor,i.font=l.string,h=0;h<r;++h)i.fillText(a[h],d.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+c,h+1===r&&(t.y+=s.titleMarginBottom-c)}}_drawColorBox(t,i,s,a,r){const l=this.labelColors[s],c=this.labelPointStyles[s],{boxHeight:h,boxWidth:d}=r,u=U(r.bodyFont),f=On(this,"left",r),p=a.x(f),m=i.y+(h<u.lineHeight?(u.lineHeight-h)/2:0);if(r.usePointStyle){const _={radius:Math.min(d,h)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},b=a.leftForLtr(p,d)+d/2,y=m+h/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,di(t,_,b,y),t.strokeStyle=l.borderColor,t.fillStyle=l.backgroundColor,di(t,_,b,y)}else{t.lineWidth=E(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,t.strokeStyle=l.borderColor,t.setLineDash(l.borderDash||[]),t.lineDashOffset=l.borderDashOffset||0;const _=a.leftForLtr(p,d),b=a.leftForLtr(a.xPlus(p,1),d-2),y=Gt(l.borderRadius);Object.values(y).some(v=>0!==v)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Re(t,{x:_,y:m,w:d,h,radius:y}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),Re(t,{x:b,y:m+1,w:d-2,h:h-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(_,m,d,h),t.strokeRect(_,m,d,h),t.fillStyle=l.backgroundColor,t.fillRect(b,m+1,d-2,h-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,i,s){const{body:a}=this,{bodySpacing:r,bodyAlign:l,displayColors:c,boxHeight:h,boxWidth:d,boxPadding:u}=s,f=U(s.bodyFont);let p=f.lineHeight,g=0;const m=ce(s.rtl,this.x,this.width),_=function(k){i.fillText(k,m.x(t.x+g),t.y+p/2),t.y+=p+r},b=m.textAlign(l);let y,v,M,x,C,T,O;for(i.textAlign=l,i.textBaseline="middle",i.font=f.string,t.x=On(this,b,s),i.fillStyle=s.bodyColor,j(this.beforeBody,_),g=c&&"right"!==b?"center"===l?d/2+u:d+2+u:0,x=0,T=a.length;x<T;++x){for(y=a[x],v=this.labelTextColors[x],i.fillStyle=v,j(y.before,_),M=y.lines,c&&M.length&&(this._drawColorBox(i,t,x,m,s),p=Math.max(f.lineHeight,h)),C=0,O=M.length;C<O;++C)_(M[C]),p=f.lineHeight;j(y.after,_)}g=0,p=f.lineHeight,j(this.afterBody,_),t.y-=r}drawFooter(t,i,s){const a=this.footer,r=a.length;let l,c;if(r){const h=ce(s.rtl,this.x,this.width);for(t.x=On(this,s.footerAlign,s),t.y+=s.footerMarginTop,i.textAlign=h.textAlign(s.footerAlign),i.textBaseline="middle",l=U(s.footerFont),i.fillStyle=s.footerColor,i.font=l.string,c=0;c<r;++c)i.fillText(a[c],h.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+s.footerSpacing}}
vendor: 3,826 bytes, line 1
1drawBackground(t,i,s,a){const{xAlign:r,yAlign:l}=this,{x:c,y:h}=t,{width:d,height:u}=s,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:m}=Gt(a.cornerRadius);i.fillStyle=a.backgroundColor,i.strokeStyle=a.borderColor,i.lineWidth=a.borderWidth,i.beginPath(),i.moveTo(c+f,h),"top"===l&&this.drawCaret(t,i,s,a),i.lineTo(c+d-p,h),i.quadraticCurveTo(c+d,h,c+d,h+p),"center"===l&&"right"===r&&this.drawCaret(t,i,s,a),i.lineTo(c+d,h+u-m),i.quadraticCurveTo(c+d,h+u,c+d-m,h+u),"bottom"===l&&this.drawCaret(t,i,s,a),i.lineTo(c+g,h+u),i.quadraticCurveTo(c,h+u,c,h+u-g),"center"===l&&"left"===r&&this.drawCaret(t,i,s,a),i.lineTo(c,h+f),i.quadraticCurveTo(c,h,c+f,h),i.closePath(),i.fill(),a.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this.chart,s=this.$animations,a=s&&s.x,r=s&&s.y;if(a||r){const l=$e[t.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=ca(this,t),h=Object.assign({},l,this._size),d=ha(i,t,h),u=da(t,h,d,i);(a._to!==u.x||r._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const i=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(i);const a={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const l=et(i.padding);i.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,a,i),Xs(t,i.textDirection),r.y+=l.top,this.drawTitle(r,t,i),this.drawBody(r,t,i),this.drawFooter(r,t,i),Us(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const s=this._active,a=t.map(({datasetIndex:c,index:h})=>{const d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[h],index:h}}),r=!tn(s,a),l=this._positionChanged(a,i);(r||l)&&(this._active=a,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,s=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,r=this._active||[],l=this._getActiveElements(t,r,i,s),c=this._positionChanged(l,t),h=i||!tn(l,r)||c;return h&&(this._active=l,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),h}_getActiveElements(t,i,s,a){const r=this.options;if("mouseout"===t.type)return[];if(!a)return i.filter(c=>this.chart.data.datasets[c.datasetIndex]&&void 0!==this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index));const l=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&l.reverse(),l}_positionChanged(t,i){const{caretX:s,caretY:a,options:r}=this,l=$e[r.position].call(this,t,i);return!1!==l&&(s!==l.x||a!==l.y)}})();var of={id:"tooltip",_element:ga,positioners:$e,afterInit(e,n,t){t&&(e.tooltip=new ga({chart:e,options:t}))},beforeUpdate(e,n,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,n,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const n=e.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(!1===e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;n.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,n){e.tooltip&&e.tooltip.handleEvent(n.event,n.replay,n.inChartArea)&&(n.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,n)=>
vendor: 4,348 bytes, line 1
1n.bodyFont.size,boxWidth:(e,n)=>n.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:pa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},af=Object.freeze({__proto__:null,Colors:_u,Decimation:vu,Filler:Vu,Legend:Uu,SubTitle:Ju,Title:Ku,Tooltip:of});function ma(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]:e}let hf=(()=>class e extends Kt{static id="category";static defaults={ticks:{callback:ma}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const i=this._addedLabels;if(i.length){const s=this.getLabels();for(const{index:a,label:r}of i)s[a]===r&&s.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,i){if(A(t))return null;const s=this.getLabels();return((e,n)=>null===e?null:J(Math.round(e),0,n))(i=isFinite(i)&&s[i]===t?i:function lf(e,n,t,i){const s=e.indexOf(n);return-1===s?((e,n,t,i)=>("string"==typeof n?(t=e.push(n)-1,i.unshift({index:t,label:n})):isNaN(n)&&(t=null),t))(e,n,t,i):s!==e.lastIndexOf(n)?t:s}(s,t,R(i,t),this._addedLabels),s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(s=0),i||(a=this.getLabels().length-1)),this.min=s,this.max=a}buildTicks(){const t=this.min,i=this.max,s=this.options.offset,a=[];let r=this.getLabels();r=0===t&&i===r.length-1?r:r.slice(t,i+1),this._valueRange=Math.max(r.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let l=t;l<=i;l++)a.push({value:l});return a}getLabelForValue(t){return ma.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}})();function _a(e,n,{horizontal:t,minRotation:i}){const s=ft(i),a=(t?Math.sin(s):Math.cos(s))||.001;return Math.min(n/a,.75*n*(""+e).length)}class Tn extends Kt{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return A(n)||("number"==typeof n||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const r=c=>s=t?s:c,l=c=>a=i?a:c;if(n){const c=gt(s),h=gt(a);c<0&&h<0?l(0):c>0&&h>0&&r(0)}if(s===a){let c=0===a?1:Math.abs(.05*a);l(a+c),n||r(s-c)}this.min=s,this.max=a}getTickLimit(){const n=this.options.ticks;let s,{maxTicksLimit:t,stepSize:i}=n;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r=function df(e,n){const t=[],{bounds:s,step:a,min:r,max:l,precision:c,count:h,maxTicks:d,maxDigits:u,includeBounds:f}=e,p=a||1,g=d-1,{min:m,max:_}=n,b=!A(r),y=!A(l),v=!A(h),M=(_-m)/(u+1);let C,T,O,k,x=_s((_-m)/g/p)*p;if(x<1e-14&&!b&&!y)return[{value:m},{value:_}];k=Math.ceil(_/x)-Math.floor(m/x),k>g&&(x=_s(k*x/g/p)*p),A(c)||(C=Math.pow(10,c),x=Math.ceil(x*C)/C),"ticks"===s?(T=Math.floor(m/x)*x,O=Math.ceil(_/x)*x):(T=m,O=_),b&&y&&a&&function Kl(e,n){const t=Math.round(e);return t-n<=e&&t+n>=e}((l-r)/a,x/1e3)?(k=Math.round(Math.min((l-r)/x,d)),x=(l-r)/k,T=r,O=l):v?(T=b?r:T,O=y?l:O,k=h-1,x=(O-T)/k):(k=(O-T)/x,k=Se(k,Math.round(k),x/1e3)?Math.round(k):Math.ceil(k));const I=Math.max(ys(x),ys(T));
1C=Math.pow(10,A(c)?I:c),T=Math.round(T*C)/C,O=Math.round(O*C)/C;let F=0;for(b&&(f&&T!==r?(t.push({value:r}),T<r&&F++,Se(Math.round((T+F*x)*C)/C,r,_a(r,M,e))&&F++):T<r&&F++);F<k;++F){const w=Math.round((T+F*x)*C)/C;if(y&&w>l)break;t.push({value:w})}return y&&f&&O!==l?t.length&&Se(t[t.length-1].value,l,_a(l,M,e))?t[t.length-1].value=l:t.push({value:l}):(!y||O===l)&&t.push({value:O}),t}({maxTicks:i,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===n.bounds&&bs(r,this,"value"),n.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const n=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&n.length){const s=(i-t)/Math.max(n.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(n){return Pe(n,this.chart.options.locale,this.options.ticks.format)}}const Be=e=>Math.floor(It(e)),Jt=(e,n)=>Math.pow(10,Be(e)+n);function ba(e){return e/Math.pow(10,Be(e))===1}function ya(e,n,t){const i=Math.pow(10,t),s=Math.floor(e/i);return Math.ceil(n/i)-s}function Li(e){const n=e.ticks;if(n.display&&e.display){const t=et(n.backdropPadding);return R(n.font&&n.font.size,$.font.size)+t.height}return 0}function mf(e,n,t){return t=B(t)?t:[t],{w:uc(e,n.string,t),h:t.length*n.lineHeight}}function xa(e,n,t,i,s){return e===i||e===s?{start:n-t/2,end:n+t/2}:e<i||e>s?{start:n-t,end:n}:{start:n,end:n+t}}
1function bf(e,n,t,i,s){const a=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let l=0,c=0;i.start<n.l?(l=(n.l-i.start)/a,e.l=Math.min(e.l,n.l-l)):i.end>n.r&&(l=(i.end-n.r)/a,e.r=Math.max(e.r,n.r+l)),s.start<n.t?(c=(n.t-s.start)/r,e.t=Math.min(e.t,n.t-c)):s.end>n.b&&(c=(s.end-n.b)/r,e.b=Math.max(e.b,n.b+c))}function yf(e,n,t){const i=e.drawingArea,{extra:s,additionalAngle:a,padding:r,size:l}=t,c=e.getPointPosition(n,i+s+r,a),h=Math.round(ii(q(c.angle+W))),d=function Sf(e,n,t){return 90===t||270===t?e-=n/2:(t>270||t<90)&&(e-=n),e}(c.y,l.h,h),u=function Cf(e){return 0===e||180===e?"center":e<180?"left":"right"}(h),f=function Mf(e,n,t){return"right"===t?e-=n:"center"===t&&(e-=n/2),e}(c.x,l.w,u);return{visible:!0,x:c.x,y:d,textAlign:u,left:f,top:d,right:f+l.w,bottom:d+l.h}}function xf(e,n){if(!n)return!0;const{left:t,top:i,right:s,bottom:a}=e;return!(Mt({x:t,y:i},n)||Mt({x:t,y:a},n)||Mt({x:s,y:i},n)||Mt({x:s,y:a},n))}function Of(e,n,t){const{left:i,top:s,right:a,bottom:r}=t,{backdropColor:l}=n;if(!A(l)){const c=Gt(n.borderRadius),h=et(n.backdropPadding);e.fillStyle=l;const d=i-h.left,u=s-h.top,f=a-i+h.width,p=r-s+h.height;Object.values(c).some(g=>0!==g)?(e.beginPath(),Re(e,{x:d,y:u,w:f,h:p,radius:c}),e.fill()):e.fillRect(d,u,f,p)}}function va(e,n,t,i){const{ctx:s}=e;if(t)s.arc(e.xCenter,e.yCenter,n,0,V);else{let a=e.getPointPosition(0,n);s.moveTo(a.x,a.y);for(let r=1;r<i;r++)a=e.getPointPosition(r,n),s.lineTo(a.x,a.y)}}const Pn={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}},at=Object.keys(Pn);function Ca(e,n){return e-n}function Ma(e,n){if(A(n))return null;const t=e._adapter,{parser:i,round:s,isoWeekday:a}=e._parseOpts;let r=n;return"function"==typeof i&&(r=i(r)),G(r)||(r="string"==typeof i?t.parse(r,i):t.parse(r)),null===r?null:(s&&(r="week"!==s||!ae(a)&&!0!==a?t.startOf(r,s):t.startOf(r,"isoWeek",a)),+r)}function Sa(e,n,t,i){const s=at.length;for(let a=at.indexOf(e);a<s-1;++a){const r=Pn[at[a]];if(r.common&&Math.ceil((t-n)/((r.steps?r.steps:Number.MAX_SAFE_INTEGER)*r.size))<=i)return at[a]}return at[s-1]}function Oa(e,n,t){if(t){if(t.length){const{lo:i,hi:s}=oi(t,n);e[t[i]>=n?t[i]:t[s]]=!0}}else e[n]=!0}function Ta(e,n,t){const i=[],s={},a=n.length;let r,l;for(r=0;r<a;++r)l=n[r],s[l]=r,i.push({value:l,major:!1});return 0!==a&&t?function Af(e,n,t,i){const s=e._adapter,a=+s.startOf(n[0].value,i),r=n[n.length-1].value;let l,c;for(l=a;l<=r;l=+s.add(l,1,i))c=t[l],c>=0&&(n[c].major=!0);return n}(e,i,s,t):i}let Ni=(()=>class e extends Kt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};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={}){const s=t.time||(t.time={}),a=this._adapter=new Ah__date(t.adapters.date);a.init(i),Ce(s.displayFormats,a.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return void 0===t?null:Ma(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,i=this._adapter,s=t.time.unit||"day";let{min:a,max:r,minDefined:l,maxDefined:c}=this.getUserBounds();function h(d){!l&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!c&&!isNaN(d.max)&&(r=Math.max(r,d.max))}(!l||!c)&&(h(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&h(this.getMinMax(!1))),a=G(a)&&!isNaN(a)?a:+i.startOf(Date.now(),s),r=G(r)&&!isNaN(r)?r:+i.endOf(Date.now(),s)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],s=t[t.length-1]),{min:i,max:s}}buildTicks(){const t=this.options,i=t.time,s=t.ticks,a="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);
vendor: 2,944 bytes, line 1
1const r=this.min,c=function ql(e,n,t){let i=0,s=e.length;for(;i<s&&e[i]<n;)i++;for(;s>i&&e[s-1]>t;)s--;return i>0||s<e.length?e.slice(i,s):e}(a,r,this.max);return this._unit=i.unit||(s.autoSkip?Sa(i.minUnit,this.min,this.max,this._getLabelCapacity(r)):function Ff(e,n,t,i,s){for(let a=at.length-1;a>=at.indexOf(t);a--){const r=at[a];if(Pn[r].common&&e._adapter.diff(s,i,r)>=n-1)return r}return at[t?at.indexOf(t):0]}(this,c.length,i.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?function If(e){for(let n=at.indexOf(e)+1,t=at.length;n<t;++n)if(Pn[at[n]].common)return at[n]}(this._unit):void 0,this.initOffsets(a),t.reverse&&c.reverse(),Ta(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a,r,i=0,s=0;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),i=1===t.length?1-a:(this.getDecimalForValue(t[1])-a)/2,r=this.getDecimalForValue(t[t.length-1]),s=1===t.length?r:(r-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;i=J(i,0,l),s=J(s,0,l),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,i=this.min,s=this.max,a=this.options,r=a.time,l=r.unit||Sa(r.minUnit,i,s,this._getLabelCapacity(i)),c=R(a.ticks.stepSize,1),h="week"===l&&r.isoWeekday,d=ae(h)||!0===h,u={};let p,g,f=i;if(d&&(f=+t.startOf(f,"isoWeek",h)),f=+t.startOf(f,d?"day":l),t.diff(s,i,l)>1e5*c)throw new Error(i+" and "+s+" are too far apart with stepSize of "+c+" "+l);const m="data"===a.ticks.source&&this.getDataTimestamps();for(p=f,g=0;p<s;p=+t.add(p,c,l),g++)Oa(u,p,m);return(p===s||"ticks"===a.bounds||1===g)&&Oa(u,p,m),Object.keys(u).sort(Ca).map(_=>+_)}getLabelForValue(t){const s=this.options.time;return this._adapter.format(t,s.tooltipFormat?s.tooltipFormat:s.displayFormats.datetime)}format(t,i){return this._adapter.format(t,i||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,i,s,a){const r=this.options,l=r.ticks.callback;if(l)return N(l,[t,i,s],this);const c=r.time.displayFormats,h=this._unit,d=this._majorUnit,f=d&&c[d],p=s[i];return this._adapter.format(t,a||(d&&f&&p&&p.major?f:h&&c[h]))}generateTickLabels(t){let i,s,a;for(i=0,s=t.length;i<s;++i)a=t[i],a.label=this._tickFormatFunction(a.value,i,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const i=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+s)*i.factor)}getValueForPixel(t){const i=this._offsets,s=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const i=this.options.ticks,s=this.ctx.measureText(t).width,a=ft(this.isHorizontal()?i.maxRotation:i.minRotation),r=Math.cos(a),l=Math.sin(a),c=this._resolveTickFontOptions(0).size;return{w:s*r+c*l,h:s*l+c*r}}_getLabelCapacity(t){const i=this.options.time,s=i.displayFormats,a=s[i.unit]||s.millisecond,r=this._tick
vendor: 7,596 bytes, line 1
1FormatFunction(t,0,Ta(this,[t],this._majorUnit),a),l=this._getLabelSize(r),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let i,s,t=this._cache.data||[];if(t.length)return t;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(i=0,s=a.length;i<s;++i)t=t.concat(a[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let i,s;if(t.length)return t;const a=this.getLabels();for(i=0,s=a.length;i<s;++i)t.push(Ma(this,a[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ms(t.sort(Ca))}})();function kn(e,n,t){let a,r,l,c,i=0,s=e.length-1;t?(n>=e[i].pos&&n<=e[s].pos&&({lo:i,hi:s}=Ct(e,"pos",n)),({pos:a,time:l}=e[i]),({pos:r,time:c}=e[s])):(n>=e[i].time&&n<=e[s].time&&({lo:i,hi:s}=Ct(e,"time",n)),({time:a,pos:l}=e[i]),({time:r,pos:c}=e[s]));const h=r-a;return h?l+(c-l)*(n-a)/h:l}var wf=Object.freeze({__proto__:null,CategoryScale:hf,LinearScale:class uf extends Tn{static id="linear";static defaults={ticks:{callback:on.formatters.numeric}};determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=G(n)?n:0,this.max=G(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,i=ft(this.options.ticks.minRotation),s=(n?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,a.lineHeight/s))}getPixelForValue(n){return null===n?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}},LogarithmicScale:class gf extends Kt{static id="logarithmic";static defaults={ticks:{callback:on.formatters.logarithmic,major:{enabled:!0}}};constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const i=Tn.prototype.parse.apply(this,[n,t]);if(0!==i)return G(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=G(n)?Math.max(0,n):null,this.max=G(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!G(this._userMin)&&(this.min=n===Jt(this.min,0)?Jt(this.min,-1):Jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const a=l=>i=n?i:l,r=l=>s=t?s:l;i===s&&(i<=0?(a(1),r(10)):(a(Jt(i,-1)),r(Jt(s,1)))),i<=0&&a(Jt(s,-1)),s<=0&&r(Jt(i,1)),this.min=i,this.max=s}buildTicks(){const n=this.options,i=function pf(e,{min:n,max:t}){n=rt(e.min,n);const i=[],s=Be(n);let a=function ff(e,n){let i=Be(n-e);for(;ya(e,n,i)>10;)i++;for(;ya(e,n,i)<10;)i--;return Math.min(i,Be(e))}(n,t),r=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=s>a?Math.pow(10,s):0,h=Math.round((n-c)*r)/r,d=Math.floor((n-c)/l/10)*l*10;let u=Math.floor((h-d)/Math.pow(10,a)),f=rt(e.min,Math.round((c+d+u*Math.pow(10,a))*r)/r);for(;f<t;)i.push({value:f,major:ba(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,r=a>=0?1:r),f=Math.round((c+d+u*Math.pow(10,a))*r)/r;const p=rt(e.max,f);return i.push({value:p,major:ba(p),significand:u}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===n.bounds&&bs(i,this,"value"),n.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(n){return void 0===n?"0":Pe(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=It(n),this._valueRange=It(this.max)-It(n)}getPixelForValue(n){return(void 0===n||0===n)&&(n=this.min),null===n||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(It(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class Rf extends Tn{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:on.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:n=>n,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=et(Li(this.options)/2),t=this.width=this.maxWidth-n.width,i=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+i/2+n.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=G(n)&&!isNaN(n)?n:0,this.max=G(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Li(this.options))}generateTickLabels(n){Tn.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,i)=>{const s=N(this.options.pointLabels.callback,[t,i],this);return s||0===s?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const n=this.options;n.display&&n.pointLabels.display?function _f(e){const n={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},n),i=[],s=[],a=e._pointLabels.length,r=e.options.pointLabels,l=r.centerPointLabels?D/a:0;for(let c=0;c<a;c++){const h=r.setContext(e.getPointLabelContext(c));s[c]=h.padding;const d=e.getPointPosition(c,e.drawingArea+s[c],l),u=U(h.font),f=mf(e.ctx,u,e._pointLabels[c]);i[c]=f;const p=q(e.getIndexAngle(c)+l),g=Math.round(ii(p));bf(t,n,p,xa(g,d.x,f.w,0,180),xa(g,d.y,f.h,90,270))}e.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),e._pointLabelItems=function vf(e,n,t){const i=[],s=e._pointLabels.length,a=e.options,{centerPointLabels:r,display:l}=a.pointLabels,c={extra:Li(a)/2,additionalAngle:r?D/s:0};let h;for(let d=0;d<s;d++){c.padding=t[d],c.size=n[d];const u=yf(e,d,c);i.push(u),"auto"===l&&(u.visible=xf(u,h),u.visible&&(h=u))}return i}(e,i,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,i,s){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,i,s))}getIndexAngle(n){return q(n*(V/(this._pointLabels.length||1))+ft(this.options.startAngle||0))}getDistanceFromCenterForValue(n){if(A(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(A(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const i=t[n];return function kf(e,n,t){return At(e,{label:t,index:n,type:"pointLabel"})}(this.getContext(),n,i)}}getPointPosition(n,t,i=0){const s=this.getIndexAngle(n)-W+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:i,right:s,bottom:a}=this._pointLabelItems[n];return{left:t,top:i,right:s,bottom:a}}
1drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const i=this.ctx;i.save(),i.beginPath(),va(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=n,i.fill(),i.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:i,grid:s,border:a}=t,r=this._pointLabels.length;let l,c,h;if(t.pointLabels.display&&function Tf(e,n){const{ctx:t,options:{pointLabels:i}}=e;for(let s=n-1;s>=0;s--){const a=e._pointLabelItems[s];if(!a.visible)continue;const r=i.setContext(e.getPointLabelContext(s));Of(t,r,a);const l=U(r.font),{x:c,y:h,textAlign:d}=a;Ht(t,e._pointLabels[s],c,h+l.lineHeight/2,l,{color:r.color,textAlign:d,textBaseline:"middle"})}}(this,r),s.display&&this.ticks.forEach((d,u)=>{if(0!==u||0===u&&this.min<0){c=this.getDistanceFromCenterForValue(d.value);const f=this.getContext(u),p=s.setContext(f),g=a.setContext(f);!function Pf(e,n,t,i,s){const a=e.ctx,r=n.circular,{color:l,lineWidth:c}=n;!r&&!i||!l||!c||t<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(s.dash||[]),a.lineDashOffset=s.dashOffset,a.beginPath(),va(e,t,r,i),a.closePath(),a.stroke(),a.restore())}(this,p,c,r,g)}}),i.display){for(n.save(),l=r-1;l>=0;l--){const d=i.setContext(this.getPointLabelContext(l)),{color:u,lineWidth:f}=d;!f||!u||(n.lineWidth=f,n.strokeStyle=u,n.setLineDash(d.borderDash),n.lineDashOffset=d.borderDashOffset,c=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),h=this.getPointPosition(l,c),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(h.x,h.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,r;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(s),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((l,c)=>{if(0===c&&this.min>=0&&!t.reverse)return;const h=i.setContext(this.getContext(c)),d=U(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),h.showLabelBackdrop){n.font=d.string,r=n.measureText(l.label).width,n.fillStyle=h.backdropColor;const u=et(h.backdropPadding);n.fillRect(-r/2-u.left,-a-d.size/2-u.top,r+u.width,d.size+u.height)}Ht(n,l.label,0,-a,d,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),n.restore()}drawTitle(){}},TimeScale:Ni,TimeSeriesScale:class Ef extends Ni{static id="timeseries";static defaults=Ni.defaults;constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=kn(t,this.min),this._tableRange=kn(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:i}=this,s=[],a=[];let r,l,c,h,d;for(r=0,l=n.length;r<l;++r)h=n[r],h>=t&&h<=i&&s.push(h);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(r=0,l=s.length;r<l;++r)d=s[r+1],c=s[r-1],h=s[r],Math.round((d+c)/2)!==h&&a.push({time:h,pos:r/(l-1)});return a}_generate(){const n=this.min,t=this.max;let i=super.getDataTimestamps();return(!i.includes(n)||!i.length)&&i.splice(0,0,n),(!i.includes(t)||1===i.length)&&i.push(t),i.sort((s,a)=>s-a)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return n=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,n=this._cache.all=n,n}getDecimalForValue(n){return(kn(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,i=this.getDecimalForPixel(n)/t.factor-t.end;return kn(this._table,i*this._tableRange+this._minPos,!0)}}});const Df=[Ih,hu,af,wf];var jf=S(1413),Lf=S(6977),jt=S(6984),Nf=S(913);const Rn=function Vf(e,n){return e===n||e!=e&&n!=n},Fn=function zf(e,n){for(var t=e.length;t--;)if(Rn(e[t][0],n))return t;return-1};var Gf=Array.prototype.splice;function de(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}de.prototype.clear=function $f(){this.__data__=[],this.size=0},de.prototype.delete=function Wf(e){var n=this.__data__,t=Fn(n,e);return!(t<0||(t==n.length-1?n.pop():Gf.call(n,t,1),--this.size,0))},de.prototype.get=function Uf(e){var n=this.__data__,t=Fn(n,e);return t<0?void 0:n[t][1]},de.prototype.has=function Kf(e){return Fn(this.__data__,e)>-1},de.prototype.set=function Qf(e,n){var t=this.__data__,i=Fn(t,e);return i<0?(++this.size,t.push([e,n])):t[i][1]=n,this};const In=de,Pa="object"==typeof global&&global&&global.Object===Object&&global;var lp="object"==typeof self&&self&&self.Object===Object&&self;const ue=Pa||lp||Function("return this")();var hp=ue.Symbol,ka=Object.prototype,dp=ka.hasOwnProperty,up=ka.toString,Ve=hp?hp.toStringTag:void 0;var mp=Object.prototype.toString;var Ra=hp?hp.toStringTag:void 0;const En=function vp(e){return null==e?void 0===e?"[object Undef
1ined]":"[object Null]":Ra&&Ra in Object(e)?function fp(e){var n=dp.call(e,Ve),t=e[Ve];try{e[Ve]=void 0;var i=!0}catch{}var s=up.call(e);return i&&(n?e[Ve]=t:delete e[Ve]),s}(e):function _p(e){return mp.call(e)}(e)},Qt=function Cp(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},$i=function Pp(e){if(!Qt(e))return!1;var n=En(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n};var e,kp=ue["__core-js_shared__"],Fa=(e=/[^.]+$/.exec(kp&&kp.keys&&kp.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";var Ap=Function.prototype.toString;var jp=/^\[object .+?Constructor\]$/,Vp=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Hp=function zp(e){return!(!Qt(e)||function Rp(e){return!!Fa&&Fa in e}(e))&&($i(e)?Vp:jp).test(function Ep(e){if(null!=e){try{return Ap.call(e)}catch{}try{return e+""}catch{}}return""}(e))},Vi=function Xp(e,n){var t=function Gp(e,n){return e?.[n]}(e,n);return Hp(t)?t:void 0},Ia=Vi(ue,"Map"),ze=Vi(Object,"create");var eg=Object.prototype.hasOwnProperty;var og=Object.prototype.hasOwnProperty;function fe(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}fe.prototype.clear=function Kp(){this.__data__=ze?ze(null):{},this.size=0},fe.prototype.delete=function Qp(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n},fe.prototype.get=function ng(e){var n=this.__data__;if(ze){var t=n[e];return"__lodash_hash_undefined__"===t?void 0:t}return eg.call(n,e)?n[e]:void 0},fe.prototype.has=function ag(e){var n=this.__data__;return ze?void 0!==n[e]:og.call(n,e)},fe.prototype.set=function cg(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ze&&void 0===n?"__lodash_hash_undefined__":n,this};const Aa=fe,wn=function gg(e,n){var t=e.__data__;return function fg(e){var n=typeof e;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e}(n)?t["string"==typeof n?"string":"hash"]:t.map};function pe(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}pe.prototype.clear=function dg(){this.size=0,this.__data__={hash:new Aa,map:new(Ia||In),string:new Aa}},pe.prototype.delete=function mg(e){var n=wn(this,e).delete(e);return this.size-=n?1:0,n},pe.prototype.get=function bg(e){return wn(this,e).get(e)},pe.prototype.has=function xg(e){return wn(this,e).has(e)},pe.prototype.set=function Cg(e,n){var t=wn(this,e),i=t.size;return t.set(e,n),this.size+=t.size==i?0:1,this};const Sg=pe;function ge(e){var n=this.__data__=new In(e);this.size=n.size}ge.prototype.clear=function qf(){this.__data__=new In,this.size=0},ge.prototype.delete=function ep(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t},ge.prototype.get=function ip(e){return this.__data__.get(e)},ge.prototype.has=function op(e){return this.__data__.has(e)},ge.prototype.set=function Tg(e,n){var t=this.__data__;if(t instanceof In){var i=t.__data__;if(!Ia||i.length<199)return i.push([e,n]),this.size=++t.size,this;t=this.__data__=new Sg(i)}return t.set(e,n),this.size=t.size,this};const kg=ge;var Rg=function(){try{var e=Vi(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Dn=Rg,zi=function Fg(e,n,t){"__proto__"==n&&Dn?Dn(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t},Hi=function Ig(e,n,t){(void 0!==t&&!Rn(e[n],t)||void 0===t&&!(n in e))&&zi(e,n,t)};var Eg=function Ag(e){return function(n,t,i){for(var s=-1,a=Object(n),r=i(n),l=r.length;l--;){var c=r[e?l:++s];if(!1===t(a[c],c,a))break}return n}}();const wg=Eg;var Ea="object"==typeof exports&&exports&&!exports.nodeType&&exports,wa=Ea&&"object"==typeof module&&module&&!module.nodeType&&module,Da=wa&&wa.exports===Ea?ue.Buffer:void 0,ja=Da?Da.allocUnsafe:void 0;const La=ue.Uint8Array,zg=function Vg(e,n){var t=n?function $g(e){var n=new e.constructor(e.byteLength);return new La(n).set(new La(e)),n}(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)};var Na=Object.create,Wg=function(){function e(){}return function(n){if(!Qt(n))return{};if(Na)return Na(n);e.prototype=n;var t=new e;return e.prototype=void 0,t}}();const Xg=Wg;var Yg=function Ug(e,n){return function(t){return e(n(t))}}(Object.getPrototypeOf,Object);const $a=Yg;var Kg=Object.prototype;const Ba=function Jg(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||Kg)},He=function qg(e){return null!=e&&"object"==typeof e},Va=function em(e){return He(e)&&"[object Arguments]"==En(e)};var za=Object.prototype,nm=za.hasOwnProperty,im=za.propertyIsEnumerable,sm=Va(function(){return arguments}())?Va:function(e){return He(e)&&nm.call(e,"callee")&&!im.call(e,"callee")};const Gi=sm,Wi=Array.isArray,Ha=function rm(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Xi=function lm(e){return null!=e&&Ha(e.length)&&!$i(e)};var Ga="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wa=Ga&&"object"==typeof module&&module&&!module.nodeType&&module,Xa=Wa&&Wa.exports===Ga?ue.Buffer:void 0;const Ua=(Xa?Xa.isBuffer:void 0)||function dm(){return!1};var Ya=Function.prototype.toString,ym=Object.prototype.hasOwnProperty,xm=Ya.call(Object);var z={};
1z["[object Float32Array]"]=z["[object Float64Array]"]=z["[object Int8Array]"]=z["[object Int16Array]"]=z["[object Int32Array]"]=z["[object Uint8Array]"]=z["[object Uint8ClampedArray]"]=z["[object Uint16Array]"]=z["[object Uint32Array]"]=!0,z["[object Arguments]"]=z["[object Array]"]=z["[object ArrayBuffer]"]=z["[object Boolean]"]=z["[object DataView]"]=z["[object Date]"]=z["[object Error]"]=z["[object Function]"]=z["[object Map]"]=z["[object Number]"]=z["[object Object]"]=z["[object RegExp]"]=z["[object Set]"]=z["[object String]"]=z["[object WeakMap]"]=!1;var Ka="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ge=Ka&&"object"==typeof module&&module&&!module.nodeType&&module,Ui=Ge&&Ge.exports===Ka&&Pa.process,Zm=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ui&&Ui.binding&&Ui.binding("util")}catch{}}(),Qa=Zm&&Zm.isTypedArray;const Za=Qa?function Km(e){return function(n){return e(n)}}(Qa):function Um(e){return He(e)&&Ha(e.length)&&!!z[En(e)]},Yi=function t_(e,n){if(("constructor"!==n||"function"!=typeof e[n])&&"__proto__"!=n)return e[n]};var n_=Object.prototype.hasOwnProperty;const s_=function i_(e,n,t){var i=e[n];(!n_.call(e,n)||!Rn(i,t)||void 0===t&&!(n in e))&&zi(e,n,t)};var h_=/^(?:0|[1-9]\d*)$/;const qa=function d_(e,n){var t=typeof e;return!!(n=n??9007199254740991)&&("number"==t||"symbol"!=t&&h_.test(e))&&e>-1&&e%1==0&&e<n};var f_=Object.prototype.hasOwnProperty;const g_=function p_(e,n){var t=Wi(e),i=!t&&Gi(e),s=!t&&!i&&Ua(e),a=!t&&!i&&!s&&Za(e),r=t||i||s||a,l=r?function r_(e,n){for(var t=-1,i=Array(e);++t<e;)i[t]=n(t);return i}(e.length,String):[],c=l.length;for(var h in e)(n||f_.call(e,h))&&(!r||!("length"==h||s&&("offset"==h||"parent"==h)||a&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||qa(h,c)))&&l.push(h);return l};var y_=Object.prototype.hasOwnProperty;const v_=function x_(e){if(!Qt(e))return function m_(e){var n=[];if(null!=e)for(var t in Object(e))n.push(t);return n}(e);var n=Ba(e),t=[];for(var i in e)"constructor"==i&&(n||!y_.call(e,i))||t.push(i);return t},tr=function C_(e){return Xi(e)?g_(e,!0):v_(e)},S_=function M_(e){return function o_(e,n,t,i){var s=!t;t||(t={});for(var a=-1,r=n.length;++a<r;){var l=n[a],c=i?i(t[l],e[l],l,t,e):void 0;void 0===c&&(c=e[l]),s?zi(t,l,c):s_(t,l,c)}return t}(e,tr(e))},T_=function O_(e,n,t,i,s,a,r){var l=Yi(e,t),c=Yi(n,t),h=r.get(c);if(h)Hi(e,t,h);else{var d=a?a(l,c,t+"",e,n,r):void 0,u=void 0===d;if(u){var f=Wi(c),p=!f&&Ua(c),g=!f&&!p&&Za(c);
1d=c,f||p||g?Wi(l)?d=l:function cm(e){return He(e)&&Xi(e)}(l)?d=function Hg(e,n){var t=-1,i=e.length;for(n||(n=Array(i));++t<i;)n[t]=e[t];return n}(l):p?(u=!1,d=function jg(e,n){if(n)return e.slice();var t=e.length,i=ja?ja(t):new e.constructor(t);return e.copy(i),i}(c,!0)):g?(u=!1,d=zg(c,!0)):d=[]:function vm(e){if(!He(e)||"[object Object]"!=En(e))return!1;var n=$a(e);if(null===n)return!0;var t=ym.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&Ya.call(t)==xm}(c)||Gi(c)?(d=l,Gi(l)?d=S_(l):(!Qt(l)||$i(l))&&(d=function Qg(e){return"function"!=typeof e.constructor||Ba(e)?{}:Xg($a(e))}(c))):u=!1}u&&(r.set(c,d),s(d,c,i,a,r),r.delete(c)),Hi(e,t,d)}},P_=function er(e,n,t,i,s){e!==n&&wg(n,function(a,r){if(s||(s=new kg),Qt(a))T_(e,n,r,t,er,i,s);else{var l=i?i(Yi(e,r),a,r+"",e,n,s):void 0;void 0===l&&(l=a),Hi(e,r,l)}},tr)},nr=function k_(e){return e};var ir=Math.max;const w_=function E_(e){return function(){return e}};var D_=Dn?function(e,n){return Dn(e,"toString",{configurable:!0,enumerable:!1,value:w_(n),writable:!0})}:nr,$_=Date.now,V_=function B_(e){var n=0,t=0;return function(){var i=$_(),s=16-(i-t);if(t=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}(D_);const z_=V_,G_=function H_(e,n){return z_(function I_(e,n,t){return n=ir(void 0===n?e.length-1:n,0),function(){for(var i=arguments,s=-1,a=ir(i.length-n,0),r=Array(a);++s<a;)r[s]=i[n+s];s=-1;for(var l=Array(n+1);++s<n;)l[s]=i[s];return l[n]=t(r),function R_(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}(e,this,l)}}(e,n,nr),e+"")};var Y_=function U_(e){return G_(function(n,t){var i=-1,s=t.length,a=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(a=e.length>3&&"function"==typeof a?(s--,a):void 0,r&&function W_(e,n,t){if(!Qt(t))return!1;var i=typeof n;return!!("number"==i?Xi(t)&&qa(n,t.length):"string"==i&&n in t)&&Rn(t[n],e)}(t[0],t[1],r)&&(a=s<3?void 0:a,s=1),n=Object(n);++i<s;){var l=t[i];l&&e(n,l,i,a)}return n})}(function(e,n,t){P_(e,n,t)});const K_=Y_;var J_=S(4412),Q_=S(3294);const sr=new P.nKC("Configuration for ngCharts");let or=(()=>{class e{constructor(){this.colorschemesOptions=new J_.t(void 0)}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t)}getColorschemesOptions(){return this.pColorschemesOptions}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),tb=(()=>{class e{constructor(t,i,s,a){this.zone=i,this.themeService=s,this.type="bar",this.plugins=[],this.chartClick=new o.bkB,this.chartHover=new o.bkB,this.subs=[],this.themeOverrides={},a?.registerables&&xn.register(...a.registerables),a?.defaults&&$.set(a.defaults),this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe((0,Q_.F)()).subscribe(r=>this.themeChanged(r)))}ngOnChanges(t){const i=["type"],s=Object.getOwnPropertyNames(t);if(s.some(a=>i.includes(a))||s.every(a=>t[a].isFirstChange()))this.render();else{const a=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,a.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,a.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,a.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(),this.zone.runOutsideAngular(()=>this.chart=new xn(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 K_({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}))}}
1,this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(o.aKT),o.rXU(o.SKi),o.rXU(or),o.rXU(sr,8))}}static{this.\u0275dir=o.FsC({type:e,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:[o.OA$]})}}return e})();function eb(e,n){if(1&e&&(o.j41(0,"div")(1,"div",1),o.nrm(2,"canvas",2),o.k0s()()),2&e){const t=o.XpG();o.AVh("is-mobile",t.isMobile),o.R7$(2),o.Y8G("type",t.barChartType)("datasets",t.barChartData)("labels",t.barChartLabels)("options",t.barChartOptions)("legend",t.barChartLegend)}}const ar=[0,75,285],rr=ar.length,ib=[.5,.64,.76],sb=[.5,.58,.66];function Ki(e){const n=e/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function lb(e){const n=Ki((0,jt.Cb)(e)),t=Ki((0,jt.Qm)(e)),i=Ki((0,jt.rE)(e)),s=Math.cbrt(.4122214708*n+.5363325363*t+.0514459929*i),a=Math.cbrt(.2119034982*n+.6806995451*t+.1073969566*i),r=Math.cbrt(.0883024619*n+.2817188376*t+.6299787005*i);return{lightness:.2104542553*s+.793617785*a-.0040720468*r,chroma:Math.hypot(1.9779984951*s-2.428592205*a+.4505937099*r,.0259040371*s+.7827717662*a-.808675766*r)}}function cb(e,n,t){let i=0,s=Number.MAX_VALUE,a=50,r=Number.MAX_VALUE;for(let l=10;l<=95;l++){const{lightness:c,chroma:h}=lb(e.tone(l));if(c>t)continue;const d=Math.abs(c-n);d<r&&(r=d,a=l),h>=.1&&d<s&&(s=d,i=l)}return i||a}let db=(()=>{class e{set anlaggning(t){this.meterGroup=t,this.updateConsumptionData()}set chartType(t){this.barChartType=t}constructor(t,i,s){this.styleService=t,this.themeService=i,this.translate=s,this.series=[],this.barChartOptions={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!0,font:{size:16,weight:"normal"}},legend:{display:!0,position:"bottom",labels:{usePointStyle:!1}},tooltip:{displayColors:!1}},scales:{x:{grid:{drawOnChartArea:!1}},y:{grid:{drawOnChartArea:!1}}}},this.barChartLabels=["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sept","Okt","Nov","Dec"],this.barChartType="bar",this.barChartLegend=!0,this.componentDestroyed=new jf.B,$.font.family="Inter",this.barChartLabels=this.translate.instant("ALLMONTHS").split(","),this.styleService.themeState.pipe((0,Lf.Q)(this.componentDestroyed)).subscribe(a=>{a&&(this.updateConsumptionData()||this.setTheme())}),xn.register(...Df)}ngOnDestroy(){this.componentDestroyed.next(!0),this.componentDestroyed.complete()}updateConsumptionData(){if(this.meterGroup?.M\u00e4tare?.length>0){const t=[];for(const r of this.meterGroup.M\u00e4tare)if(r.M\u00e4tdata?.length>0)for(const l of r.M\u00e4tdata)t.push(l);const i=this.groupByYearAndMonth(t),s=Object.values(i),a=[...new Set(s.map(r=>r.year))].reverse();this.series=this.createSeries(a,s),this.setUsageAndUnit(s.filter(r=>null!=r.unit)),this.barChartData=[];for(const r of this.series)this.barChartData.push({data:r.data,label:r.title,fill:!0,tension:.4,backgroundColor:r.color,borderColor:r.borderColor,hoverBackgroundColor:r.hoverColor,pointBackgroun
1dColor:r.color,pointBorderColor:"#ffffff",pointHoverBackgroundColor:"#ffffff",pointHoverBorderColor:r.color});return this.barChartOptions.plugins.title.text=this.usage,this.setTheme(),!0}return!1}setTheme(){const t=this.textColor;this.themeService.setColorschemesOptions({plugins:{title:{color:t},legend:{labels:{color:t}}},scales:{x:{grid:{color:t},border:{color:t},scaleLabel:{color:t},ticks:{color:t}},y:{grid:{color:t},border:{color:t},scaleLabel:{color:t},ticks:{color:t}}}})}groupByYearAndMonth(t){return t.reduce((s,{Datum:a,F\u00f6rbrukning:r,Enhet:l})=>{const c=ut()(a).utc(!1),[h,d]=c.format("YYYY-MM").split("-");return r&&(s[h+d]?s[h+d].consumption+=r:s[h+d]={year:h,month:d,consumption:r,unit:l}),s},{})}createSeries(t,i){const s=[],a=this.styleService.getPrimaryColor(),r=a?function hb(e,n,t){const i=jt.Ge.fromInt((0,jt.cd)(e)),s=Math.max(i.chroma,60),a=n?sb:ib,r=n?.67:.77,l=[];for(let c=0;c<t;c++){const h=jt.g0.fromHueAndChroma((i.hue+ar[c])%360,s),d=cb(h,a[c],r),u=Math.min(Math.max(d+(n?12:-12),10),95);l.push({color:(0,jt.K0)(h.tone(d)),hoverColor:(0,jt.K0)(h.tone(u))})}return l}(a,this.styleService.isDarkMode,rr):[];let l=0;for(const c of t){if(l>=rr)break;let h=[0,0,0,0,0,0,0,0,0,0,0,0],d=i.filter(p=>p.year===c);for(const p of d)h.splice(+p.month-1,1,p.consumption);const u=r[l];s.push({title:c,data:h,color:u?.color,borderColor:u?.color,hoverColor:u?.hoverColor}),l++}return s}setUsageAndUnit(t){null!=t&&t.length>0&&(this.usage=this.meterGroup.Anv\u00e4ndning+" ("+t[0].unit+")")}get textColor(){return this.styleService.isDarkMode?"rgb(255,255,255)":"rgba(0,0,0,0.6)"}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(Nf.J),o.rXU(or),o.rXU(K.c$))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-consumption-widget"]],inputs:{isMobile:"isMobile",anlaggning:"anlaggning",chartType:"chartType"},standalone:!1,decls:1,vars:1,consts:[[3,"is-mobile"],[1,"chart"],["baseChart","",1,"chart",3,"type","datasets","labels","options","legend"]],template:function(i,s){1&i&&o.nVh(0,eb,3,7,"div",0),2&i&&o.vxM(s.barChartData?0:-1)},dependencies:[tb],styles:[".chart[_ngcontent-%COMP%]{height:400px}.is-mobile[_ngcontent-%COMP%]   .chart[_ngcontent-%COMP%]{height:250px}"]})}}return e})();var We=S(1336),Ji=S(7673),ub=S(983),fb=S(6697),cr=S(6380),hr=S(7342);let pb=(()=>{class e{constructor(t,i,s,a,r){this.contractService=t,this.errorService=i,this.userMessageService=s,this.router=a,this.translate=r}resolve(t){const i=t.paramMap.get("id");return this.contractService.getContract(i).pipe((0,fb.s)(1),(0,qi.Z)(s=>s?(0,Ji.of)(s):ub.w),(0,ct.W)(s=>{const a=this.errorService.parseError(s);let r=this.translate.instant("UNKNOWNERROR");return r=a.isClientError||0===a.status||504===a.status?r:a.message,this.userMessageService.errorWithHeader(r,"",a.displayErrorReportNumber?a.errorReportNumber:""),this.router.navigateByUrl("/"),(0,Ji.of)(null)}))}static{this.\u0275fac=function(i){return new(i||e)(P.KVO($t.y),P.KVO(cr.I),P.KVO(hr.z),P.KVO(dt.Ix),P.KVO(K.c$))}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gb=S(9496),jn=S(6695),Ln=S(3013),Nn=S(7201);function mb(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",8),2&e){const t=o.XpG().$implicit,i=o.XpG();o.Y8G("text",i.getStatusText(t.status))}}function _b(e,n){if(1&e&&(o.j41(0,"div",14),o.EFF(1),o.k0s(),o.j41(2,"div"),o.EFF(3),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.SpI(" ",null==t||null==t.primaryObject||null==t.primaryObject.location||null==t.primaryObject.location.address?null:t.primaryObject.location.address.address," "),o.R7$(2),o.Lme(" ",null==t||null==t.primaryObject||null==t.primaryObject.location||null==t.primaryObject.location.address?null:t.primaryObject.location.address.postcode," ",null==t||null==t.primaryObject||null==t.primaryObject.location||null==t.primaryObject.location.address?null:t.primaryObject.location.address.city," ")}}function bb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function yb(e,n){if(1&e&&(o.j41(0,"div",11),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.JRh(null==t||null==t.primaryObject?null:t.primaryObject.number)}}function xb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function vb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.JRh(null==t||null==t.primaryObject||null==t.primaryObject.identity?null:t.primaryObject.identity.officialNumber)}}function Cb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Mb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG(2).$implicit;o.R7$(),o.JRh(null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.roomsDisplayName)}}function Sb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s(),o.nVh(2,Mb,2,1,"div")),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.JRh(i.formatArea(null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.area,0)),o.R7$(),o.vxM("Ingen"!==(null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.roomsDisplayName)?2:-1)}}function Ob(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Tb(e,n){1&e&&(o.j41(0,"span"),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"translate"),o.k0s()),2&e&&(o.R7$(),o.Lme("",o.bMT(2,2,"KR"),"/",o.bMT(3,4,"MONTH")))}function Pb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.nVh(2,Tb,4,6,"span"),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatNumber(null==t||null==t.pricing?null:t.pricing.price,0)," "),o.R7$(),o.vxM(null!=t&&null!=t.pricing&&t.pricing.price?2:-1)}}function kb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Rb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatDate(null==t||null==t.status?null:t.status.startDate)," ")}}function Fb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Ib(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatDate(null==t||null==t.status?null:t.status.endDate)," ")}}function Ab(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Eb(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-card",4)(1,"div",6)(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"div",7),o.nVh(5,mb,1,1,"taiga-pill-badge",8),o.k0s()(),o.j41(6,"mat-card-content")(7,"div",9)(8,"div",10)(9,"h4"),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.nVh(12,_b,4,3)(13,bb,2,0,"div"),o.j41(14,"h4"),o.EFF(1
15),o.nI1(16,"translate"),o.k0s(),o.nVh(17,yb,2,1,"div",11)(18,xb,2,0,"div"),o.j41(19,"h4"),o.EFF(20),o.nI1(21,"translate"),o.k0s(),o.nVh(22,vb,2,1,"div")(23,Cb,2,0,"div"),o.k0s(),o.j41(24,"div",10)(25,"h4"),o.EFF(26),o.nI1(27,"translate"),o.k0s(),o.nVh(28,Sb,3,2)(29,Ob,2,0,"div"),o.j41(30,"h4"),o.EFF(31),o.nI1(32,"translate"),o.k0s(),o.nVh(33,Pb,3,2,"div")(34,kb,2,0,"div"),o.k0s(),o.j41(35,"div",10)(36,"h4"),o.EFF(37),o.nI1(38,"translate"),o.k0s(),o.nVh(39,Rb,2,1,"div")(40,Fb,2,0,"div"),o.j41(41,"h4"),o.EFF(42),o.nI1(43,"translate"),o.k0s(),o.nVh(44,Ib,2,1,"div")(45,Ab,2,0,"div"),o.k0s(),o.j41(46,"div",12)(47,"button",13),o.bIt("click",function(){const s=P.eBV(t).$implicit,a=o.XpG();return P.Njj(a.showContract(s.id))}),o.EFF(48),o.nI1(49,"translate"),o.k0s()()()()()}if(2&e){const t=n.$implicit,i=o.XpG();o.R7$(3),o.Lme(" ",t.type.displayName," ",t.number," "),o.R7$(2),o.vxM(i.getStatusText(t.status)?5:-1),o.R7$(5),o.JRh(o.bMT(11,20,"ADDRESS")),o.R7$(2),o.vxM(null!=t&&null!=t.primaryObject&&null!=t.primaryObject.location&&null!=t.primaryObject.location.address&&t.primaryObject.location.address.address?12:13),o.R7$(3),o.JRh(o.bMT(16,22,"OBJECTNO")),o.R7$(2),o.vxM(null!=t&&null!=t.primaryObject&&t.primaryObject.number?17:18),o.R7$(3),o.JRh(o.bMT(21,24,"APARTMENTNUMBER")),o.R7$(2),o.vxM(null!=t&&null!=t.primaryObject&&null!=t.primaryObject.identity&&t.primaryObject.identity.officialNumber?22:23),o.R7$(4),o.JRh(o.bMT(27,26,"AREA")),o.R7$(2),o.vxM(null!=t&&null!=t.primaryObject&&null!=t.primaryObject.size&&t.primaryObject.size.area?28:29),o.R7$(3),o.JRh(o.bMT(32,28,"RENT")),o.R7$(2),o.vxM(null!=t&&null!=t.pricing&&t.pricing.price?33:34),o.R7$(4),o.JRh(o.bMT(38,30,"CONTRACTPERIODFROM")),o.R7$(2),o.vxM(null!=t&&null!=t.status&&t.status.startDate?39:40),o.R7$(3),o.JRh(o.bMT(43,32,"CONTRACTPERIODTO")),o.R7$(2),o.vxM(null!=t&&null!=t.status&&t.status.endDate?44:45),o.R7$(2),o.AVh("full-width",i.mediaQueryService.isMobile()),o.R7$(2),o.SpI(" ",o.bMT(49,34,"SHOW")," ")}}function wb(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",8),2&e){const t=o.XpG().$implicit,i=o.XpG();o.Y8G("text",i.getStatusText(t))}}function Db(e,n){if(1&e&&(o.j41(0,"div",14),o.EFF(1),o.k0s(),o.j41(2,"div"),o.EFF(3),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.locationAddress),o.R7$(2),o.Lme(" ",null==t||null==t.objectPrimary?null:t.objectPrimary.locationPostCode," ",null==t||null==t.objectPrimary?null:t.objectPrimary.locationCity," ")}}function jb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Lb(e,n){if(1&e&&(o.j41(0,"div",11),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.number)}}function Nb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function $b(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.identityOfficialApartmentNumber)}}function Bb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Vb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG(2).$implicit;o.R7$(),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.sizeRoomsDisplayName)}}function zb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s(),o.nVh(2,Vb,2,1,"div")),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.JRh(i.formatArea(null==t||null==t.objectPrimary?null:t.objectPrimary.sizeAreaValue,0)),o.R7$(),o.vxM("Ingen"!==(null==t||null==t.objectPrimary?null:t.objectPrimary.sizeRoomsDisplayName)?2:-1)}}function Hb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Gb(e,n){1&e&&(o.j41(0,"span"),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"translate"),o.k0s()),2&e&&(o.R7$(),o.Lme("",o.bMT(2,2,"KR"),"/",o.bMT(3,4,"MONTH")))}function Wb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.nVh(2,Gb,4,6,"span"),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatNumber(null==t?null:t.pricingPrice,0)," "),o.R7$(),o.vxM(null!=t&&t.pricingPrice?2:-1)}}function Xb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Ub(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatDate(t.statusStart)," ")}}function Yb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Kb(e,n){if(1&e&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatDate(t.statusEnd)," ")}}function Jb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Qb(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-card",4)(1,"div",6)(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"div",7),o.nVh(5,wb,1,1,"taiga-pill-badge",8),o.k0s()(),o.j41(6,"mat-card-content")(7,"div",9)(8,"div",10)(9,"h4"),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.nVh(12,Db,4,3)(13,jb,2,0,"div"),o.j41(14,"h4"),o.EFF(1
15),o.nI1(16,"translate"),o.k0s(),o.nVh(17,Lb,2,1,"div",11)(18,Nb,2,0,"div"),o.j41(19,"h4"),o.EFF(20),o.nI1(21,"translate"),o.k0s(),o.nVh(22,$b,2,1,"div")(23,Bb,2,0,"div"),o.k0s(),o.j41(24,"div",10)(25,"h4"),o.EFF(26),o.nI1(27,"translate"),o.k0s(),o.nVh(28,zb,3,2)(29,Hb,2,0,"div"),o.j41(30,"h4"),o.EFF(31),o.nI1(32,"translate"),o.k0s(),o.nVh(33,Wb,3,2,"div")(34,Xb,2,0,"div"),o.k0s(),o.j41(35,"div",10)(36,"h4"),o.EFF(37),o.nI1(38,"translate"),o.k0s(),o.nVh(39,Ub,2,1,"div")(40,Yb,2,0,"div"),o.j41(41,"h4"),o.EFF(42),o.nI1(43,"translate"),o.k0s(),o.nVh(44,Kb,2,1,"div")(45,Jb,2,0,"div"),o.k0s(),o.j41(46,"div",12)(47,"button",13),o.bIt("click",function(){const s=P.eBV(t).$implicit,a=o.XpG();return P.Njj(a.showContract(null==s?null:s.guid))}),o.EFF(48),o.nI1(49,"translate"),o.k0s()()()()()}if(2&e){const t=n.$implicit,i=o.XpG();o.R7$(3),o.Lme(" ",null==t.nodeClass?null:t.nodeClass.displayName," ",t.number," "),o.R7$(2),o.vxM(i.getStatusText(t)?5:-1),o.R7$(5),o.JRh(o.bMT(11,20,"ADDRESS")),o.R7$(2),o.vxM(null!=t&&null!=t.objectPrimary&&t.objectPrimary.locationAddress?12:13),o.R7$(3),o.JRh(o.bMT(16,22,"OBJECTNO")),o.R7$(2),o.vxM(null!=t&&null!=t.objectPrimary&&t.objectPrimary.number?17:18),o.R7$(3),o.JRh(o.bMT(21,24,"APARTMENTNUMBER")),o.R7$(2),o.vxM(null!=t&&null!=t.objectPrimary&&t.objectPrimary.identityOfficialApartmentNumber?22:23),o.R7$(4),o.JRh(o.bMT(27,26,"AREA")),o.R7$(2),o.vxM(null!=t&&null!=t.objectPrimary&&t.objectPrimary.sizeAreaValue?28:29),o.R7$(3),o.JRh(o.bMT(32,28,"RENT")),o.R7$(2),o.vxM(null!=t&&t.pricingPrice?33:34),o.R7$(4),o.JRh(o.bMT(38,30,"CONTRACTPERIODFROM")),o.R7$(2),o.vxM(null!=t&&t.statusStart?39:40),o.R7$(3),o.JRh(o.bMT(43,32,"CONTRACTPERIODTO")),o.R7$(2),o.vxM(null!=t&&t.statusEnd?44:45),o.R7$(2),o.AVh("full-width",i.mediaQueryService.isMobile()),o.R7$(2),o.SpI(" ",o.bMT(49,34,"SHOW")," ")}}let Zb=(()=>{class e{constructor(t,i,s,a,r,l){this.contractService=t,this.route=i,this.mediaQueryService=s,this.translate=a,this.router=r,this.clientConfigurationService=l,this.contractLink=`${Jn.i.
1CONTRACT}`,this.chips=[],this.pageSize=10}ngAfterViewInit(){this.paginator._intl.itemsPerPageLabel=null,this.paginator._intl.nextPageLabel=this.translate.instant("NEXTPAGE"),this.paginator._intl.previousPageLabel=this.translate.instant("PREVIOUSPAGE"),this.paginator._intl.getRangeLabel=(t,i,s)=>{if(0===s||0===i)return`0 ${this.translate.instant("OF")} ${s}`;const a=t*i;return`${a+1} \u2013 ${a<(s=Math.max(s,0))?Math.min(a+i,s):a+i} ${this.translate.instant("OF")} ${s}`}}ngOnInit(){this.clientConfigurationService.getClientConfigurationFeatures().subscribe(t=>{this.useGraphQl=t.graphQL?.enabled,this.useGraphQl&&this.contractService.fetchContractsTotalCount().subscribe(i=>{this.contractsCount=i.data.contracts.totalCount}),this.route.queryParams.subscribe(i=>{this.pageSize=i.pageSize??this.pageSize,this.page=this.route.snapshot.queryParams.page??1,this.before=i.before??null,this.after=i.after??null;const s=this.pageSize*this.page-this.pageSize;this.useGraphQl?this.contractService.fetchContracts(this.before,this.after).subscribe(a=>{this.contractsQuery=a.data,this.before=this.contractsQuery.contracts.pageInfo.startCursor,this.after=this.contractsQuery.contracts.pageInfo.endCursor}):this.contractService.getAllContractsSorted(this.pageSize,0===s?null:s,null).subscribe(a=>{this.contracts=a,this.contractsCount=this.contracts.count,this.visiblecontractsListItems=this.contracts.items})})})}changeSelected(t){this.visiblecontractsListItems=[];for(const i of t)i.selected&&this.visiblecontractsListItems.push(...this.contractsListItems.filter(s=>s.type.displayName===i.chipType))}onPageChange(t){window.scroll(0,0);let i=this.pageSize;this.pageSize=t.pageSize,this.page=t.pageIndex+1;let s={pageSize:this.pageSize,page:this.page};switch(!0){case 0===t.pageIndex:break;case+i!==this.pageSize:s={...s,page:1};break;case t.pageIndex>t.previousPageIndex:s={...s,after:this.after};break;case t.pageIndex<t.previousPageIndex:s={...s,before:this.before}}this.router.navigate([],{relativeTo:this.route,queryParams:s})}getStatusText(t){switch(!0){case t.active&&!t.future&&!t.cancelledDate||t.statusActive&&!t.statusFuture&&(!t.terminationPrimary?.id||t.terminationPrimary?.statusDraft):return this.translate.instant("ACTIVELY");case t.expired||t.statusExpired:return this.translate.instant("HISTORIC");case t.future||t.statusFuture:return this.translate.instant("COMING");case!!t.cancelledDate||!!t.terminationPrimary?.id&&!t.terminationPrimary?.statusDraft:return this.translate.instant("TERMINATED")}}formatDate(t){const i=ut()(t);return"9999"!==i.format("YYYY")?i.format("YYYY-MM-DD"):"-"}formatNumber(t,i){return t?t.toFixed(i):""}formatArea(t,i){const s=this.formatNumber(t,i);return s?this.translate.instant("CA")+" "+s+" "+this.translate.instant("M2"):"-"}showContract(t){this.router.navigate([this.contractLink+"/"+t])}static{this.\u0275fac=function(i){return new(i||e)(o.rXU($t.y),o.rXU(dt.nX),o.rXU(Nt.M),o.rXU(K.c$),o.rXU(dt.Ix),o.rXU(Je.t))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-contracts-list"]],viewQuery:function(i,s){if(1&i&&o.GBs(jn.iy,7),2&i){let a;o.mGM(a=o.lsd())&&(s.paginator=a.first)}},standalone:!1,decls:16,vars:14,consts:[[1,"card"],[1,"title"],["data-mom-test","MyPages_Agreement_AllAgreementsTitle",1,"overflow-ellipsis"],[3,"text"],["data-mom-test","MyPages_Agreement_AllAgreements_AgreementCard",1,"invoice-card"],["data-mom-test","MyPages_Agreement_NumberOfObjectsPerPage",3,"page","length","pageIndex","pageSize","hidePageSize"],[1,"card-title"],[1,"pill-badge"],[1,"badge-info",3,"text"],[1,"flex-contaioner"],[1,"flex-item"],["data-mom-test","MyPages_Agreement_AllAgreementsObjectNumber"],[1,"button-row"],["mat-raised-button","","color","primary","data-mom-test","MyPages_Agreement_AllAgreementsShowAgreement",3,"click"],["data-mom-test","MyPages_Agreement_AllAgreementsAddress"]],template:function(i,s){1&i&&(o.j41(0,"div")(1,"mat-card",0)(2,"mat-card-title")(3,"div",1)(4,"div",2),o.nrm(5,"taiga-medium-header",3),o.nI1(6,"translate"),o.k0s()()(),o.j41(7,"mat-card-subtitle"),o.EFF(8),o.nI1(9,"translate"),o.k0s()(),o.nrm(10,"taiga-page-cards"),o.Z7z(11,Eb,50,36,"mat-card",4,o.fX1),o.Z7z(13,Qb,50,36,"mat-card",4,o.fX1),o.j41(15,"mat-paginator",5),o.bIt("page",function(r){return s.onPageChange(r)}),o.k0s()()),2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(5),o.Y8G("text",o.bMT(6,10,"CONTRACT")),o.R7$(3),o.SpI(" ",o.bMT(9,12,"CONTRACTLISTINFO")," "),o.R7$(3),o.Dyx(s.visiblecontractsListItems),o.R7$(2),o.Dyx(null==s.contractsQuery||null==s.contractsQuery.contracts?null:s.contractsQuery.contracts.nodes),o.R7$(2),o.Y8G("length",s.contractsCount)("pageIndex",s.page-1)("pageSize",s.pageSize)("hidePageSize",!0))},dependencies:[is.Y,ne.$z,st.RN,st.m2,st.Lc,st.dh,Ln.o,jn.iy,Nn.K,K.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.flex-contaioner[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.flex-item[_ngcontent-%COMP%]{margin:0 5px}.status[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between}.button-row[_ngcontent-%COMP%]{margin:10px 0 0;align-items:flex-end;display:flex;justify-content:space-between}.button-row[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-left:5px}.full-width[_ngcontent-%COMP%]{width:100%}.mat-success[_ngcontent-%COMP%]{background-color:#d4edda}.mat-warn[_ngcontent-%COMP%]{background-color:#b82e2e;color:#fff!important}.card-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-wrap:wrap-reverse;line-height:1.5625rem}mat-card-title[_ngcontent-%COMP%]{font-size:1.25rem}.invoice-card[_ngcontent-%COMP%]{margin:10px 0}.specification-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:5px}h4[_ngcontent-%COMP%]{margin:10px 0 0;font-weight:700}mat-chip[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400}.pill-badge[_ngcontent-%COMP%]{margin-left:auto;margin-bottom:8px;display:flex}"]}
1)}}return e})();var Q=S(9417),qb=S(5263),$n=S(9945),t1=S(2899),Bn=S(1585),e1=S(7705),n1=S(5661),i1=S(100),Vn=S(9588),Qi=S(5084),s1=S(6183),o1=S(3029),a1=S(2765),Xe=S(6233),dr=S(2200),r1=S(1301),ur=S(6112);const Zi=e=>({invalidChars:e});function l1(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"CHOOSECONTRACTS"))}function c1(e,n){1&e&&(o.j41(0,"span"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e&&(o.R7$(),o.SpI("(",o.bMT(2,1,"PRIMARYCONTRACT"),")"))}function h1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",12)(1,"div",25)(2,"div",26),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"div",27),o.EFF(6),o.k0s()(),o.j41(7,"div",25)(8,"div",26),o.EFF(9),o.nI1(10,"translate"),o.k0s(),o.j41(11,"div",28),o.EFF(12),o.k0s()(),o.j41(13,"div",25)(14,"div",26),o.EFF(15),o.nI1(16,"translate"),o.k0s(),o.j41(17,"div",29),o.EFF(18),o.k0s()(),o.j41(19,"div",25)(20,"div",26),o.EFF(21),o.nI1(22,"translate"),o.k0s(),o.j41(23,"div",30),o.EFF(24),o.k0s()(),o.j41(25,"div",25)(26,"div",26),o.EFF(27),o.nI1(28,"translate"),o.k0s(),o.j41(29,"div",31),o.EFF(30),o.k0s()(),o.j41(31,"div",32)(32,"mat-checkbox",33),o.bIt("change",function(){P.eBV(t),o.XpG();const s=o.sdS(21);return P.Njj(s.reset())}),o.EFF(33),o.nI1(34,"translate"),o.nVh(35,c1,3,3,"span"),o.k0s()()()}if(2&e){const t=n.$implicit,i=o.XpG();o.R7$(3),o.JRh(o.bMT(4,13,"CONTRACT")),o.R7$(3),o.SpI(" ",t.displayName," "),o.R7$(3),o.JRh(o.bMT(10,15,"TYPE")),o.R7$(3),o.SpI(" ",t.typeDisplayName," "),o.R7$(3),o.JRh(o.bMT(16,17,"ADDRESS")),o.R7$(3),o.SpI(" ",t.primaryObjectLocationAddress," "),o.R7$(3),o.JRh(o.bMT(22,19,"OBJECTTYPE")),o.R7$(3),o.SpI(" ",t.primaryObjectTypeDisplayName," "),o.R7$(3),o.JRh(o.bMT(28,21,"NOTICEPERIOD")),o.R7$(3),o.SpI(" ",t.noticeTenantPeriodDescription," "),o.R7$(2),o.Y8G("formControlName",t.id),o.R7$(),o.SpI("",o.bMT(34,23,"TERMINATE")," "),o.R7$(2),o.vxM(t.isPrimaryContract&&(null==i.contractsItemNoticeContracts||null==i.contractsItemNoticeContracts.items?null:i.contractsItemNoticeContracts.items.length)>1?35:-1)}}function d1(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"MOVINGOUT"))}function u1(e,n){if(1&e&&(o.j41(0,"mat-option",35),o.EFF(1),o.k0s()),2&e){const t=n.$implicit;o.Y8G("value",t.id),o.R7$(),o.SpI(" ",t.displayName," ")}}function f1(e,n){if(1&e&&(o.j41(0,"div")(1,"mat-form-field",17)(2,"mat-label"),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"mat-select",34),o.Z7z(6,u1,2,2,"mat-option",35,o.fX1),o.k0s(),o.j41(8,"mat-error"),o.EFF(9),o.nI1(10,"translate"),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,3,"MOVINGOUTREASON")),o.R7$(2),o.Y8G("required",null==t.s.reasonTypes.errors?null:t.s.reasonTypes.errors.required),o.R7$(),o.Dyx(t.contractsItemNoticeOptions.reasonTypes),o.R7$(3),o.SpI(" ",o.bMT(10,5,"INPUTREQUIRED")," ")}}function p1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"mat-form-field",36),o.bIt("click",function(){P.eBV(t);const s=o.sdS(8);return P.Njj(s.open())}),o.j41(2,"mat-label"),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.nrm(5,"input",37)(6,"mat-datepicker-toggle",38)(7,"mat-datepicker",39,2),o.j41(9,"mat-error"),o.EFF(10),o.nI1(11,"translate"),o.k0s()()()}if(2&e){const t=o.sdS(8),i=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,6,"MOVINGOUTDATE")),o.R7$(2),o.Y8G("matDatepickerFilter",i.allowedEndDates)("matDatepicker",t),o.R7$(),o.Y8G("for",t),o.R7$(),o.Y8G("startAt",i.firstAllowedEndDate),o.R7$(3),o.SpI(" ",o.bMT(11,8,"INPUTREQUIRED")," ")}}
1function g1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"div",40)(2,"mat-checkbox",41)(3,"div",42),o.nrm(4,"taiga-markdown",43),o.nI1(5,"translate"),o.k0s()()(),o.j41(6,"mat-form-field",36),o.bIt("click",function(){P.eBV(t);const s=o.sdS(13);return P.Njj(s.open())}),o.j41(7,"mat-label"),o.EFF(8),o.nI1(9,"translate"),o.k0s(),o.nrm(10,"input",44)(11,"mat-datepicker-toggle",38)(12,"mat-datepicker",39,3),o.j41(14,"mat-error"),o.EFF(15),o.nI1(16,"translate"),o.k0s()()()}if(2&e){const t=o.sdS(13),i=o.XpG(2);o.R7$(4),o.Y8G("markdown",o.bMT(5,8,"MOVINGOUTHELP")),o.R7$(4),o.JRh(o.bMT(9,10,"DESIREDMOVINGOUTDATE")),o.R7$(2),o.Y8G("required",i.s.earlyEndDatesCheckbox.value)("matDatepickerFilter",i.earlyEndDates)("matDatepicker",t),o.R7$(),o.Y8G("for",t),o.R7$(),o.Y8G("startAt",i.firstEarlyEndDate),o.R7$(3),o.SpI(" ",o.bMT(16,12,"INPUTREQUIRED")," ")}}function m1(e,n){if(1&e&&(o.j41(0,"div"),o.nVh(1,f1,11,7,"div"),o.nVh(2,p1,12,10,"div"),o.nVh(3,g1,17,14,"div"),o.k0s()),2&e){const t=o.XpG();o.R7$(),o.vxM(t.contractsItemNoticeOptions.reasonTypes&&t.contractsItemNoticeOptions.reasonTypes.length>0?1:-1),o.R7$(),o.vxM(t.contractsItemNoticeOptions.allowedEndDates&&t.contractsItemNoticeOptions.allowedEndDates.length>0?2:-1),o.R7$(),o.vxM(t.contractsItemNoticeOptions.showEarlyEndDates&&t.contractsItemNoticeOptions.earlyEndDates&&t.contractsItemNoticeOptions.earlyEndDates.length>0?3:-1)}}function _1(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"NEWADDRESS"))}function b1(e,n){1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e&&(o.R7$(),o.SpI(" ",o.bMT(2,1,"INPUTREQUIRED")," "))}function y1(e,n){if(1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e){let t;const i=o.XpG();o.R7$(),o.SpI(" ",o.i5U(2,1,"INVALIDCHARACTERS",o.eq3(4,Zi,null==(t=i.t.address.getError("allowedCharacters"))?null:t.invalidChars))," ")}}function x1(e,n){1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e&&(o.R7$(),o.SpI(" ",o.bMT(2,1,"INPUTREQUIRED")," "))}function v1(e,n){if(1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e){let t;const i=o.XpG();o.R7$(),o.SpI(" ",o.i5U(2,1,"INVALIDCHARACTERS",o.eq3(4,Zi,null==(t=i.t.postcode.getError("allowedCharacters"))?null:t.invalidChars))," ")}}function C1(e,n){1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e&&(o.R7$(),o.SpI(" ",o.bMT(2,1,"INPUTREQUIRED")," "))}function M1(e,n){if(1&e&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&e){let t;const i=o.XpG();o.R7$(),o.SpI(" ",o.i5U(2,1,"INVALIDCHARACTERS",o.eq3(4,Zi,null==(t=i.t.city.getError("allowedCharacters"))?null:t.invalidChars))," ")}}let S1=(()=>{class e{get s(){return this.secondFormGroup.controls}get t(){return this.thirdFormGroup.controls}constructor(t,i,s,a,r,l,c){this.contractService=t,this.mediaQueryService=i,this.formBuilder=s,this.route=a,this.adapter=r,this.router=l,this.changeDetectorRef=c,this.additionalContractIds=[],this.adapter.setLocale("sv"),this.preSelectedContractId=this.route.snapshot.params.id}ngAfterViewInit(){this.addTabRoles()}ngOnInit(){this.firstFormGroup=this.formBuilder.group({}),this.secondFormGroup=this.formBuilder.group({reasonTypes:[null,[Q.k0.required]],allowedEndDates:[null,[Q.k0.required]],earlyEndDates:[{value:null,disabled:!0}],earlyEndDatesCheckbox:null}),this.secondFormGroup.controls.earlyEndDatesCheckbox.valueChanges.subscribe(t=>{t?this.secondFormGroup.controls.earlyEndDates.enable():this.secondFormGroup.controls.earlyEndDates.disable()}),this.thirdFormGroup=this.formBuilder.group({address:[null,[(0,Bn.f)()]],postcode:[null,[(0,Bn.f)()]],city:[null,[(0,Bn.f)()]],country:[null,[(0,Bn.f)()]]}),this.route.data.subscribe(t=>{this.contractsItemNoticeContracts=t?.contractsItemNoticeContracts,this.contractsItemNoticeContracts?.items?.sort((i,s)=>i.id===this.preSelectedContractId?-1:s.id===this.preSelectedContractId?1:0),this.primaryContractId=this.contractsItemNoticeContracts?.items?.find(i=>i.isPrimaryContract)?.id,this.firstFormGroupAddControls()})}firstFormGroupAddControls(){for(const t of this.contractsItemNoticeContracts?.items)this.firstFormGroup.addControl(t.id,t.id===this.preSelectedContractId?new Q.hs({value:!0,disabled:!0}):new Q.hs)}secondFormGroupSetControls(t){t||(this.secondFormGroup.controls.reasonTypes.removeValidators([Q.k0.required]),this.secondFormGroup.controls.reasonTypes.updateV
1alueAndValidity())}thirdFormGroupSetControls(t){this.addressRequired=t,t&&(this.thirdFormGroup.controls.address.setValidators([Q.k0.required]),this.thirdFormGroup.controls.postcode.setValidators([Q.k0.required]),this.thirdFormGroup.controls.city.setValidators([Q.k0.required]),this.thirdFormGroup.controls.country.setValidators([Q.k0.required]),this.thirdFormGroup.controls.country.setValue("SE"),this.thirdFormGroup.controls.address.updateValueAndValidity(),this.thirdFormGroup.controls.postcode.updateValueAndValidity(),this.thirdFormGroup.controls.city.updateValueAndValidity(),this.thirdFormGroup.controls.country.updateValueAndValidity())}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}selectionChange(t){1===t.selectedIndex&&this.getContractsItemNoticeOptions()}getContractsItemNoticeOptions(){this.contractId="",this.additionalContractIds=[],this.contractId=!0===this.firstFormGroup.get(this.primaryContractId)?.value?this.primaryContractId:this.preSelectedContractId,Object.keys(this.firstFormGroup.controls).forEach(t=>{t!==this.contractId&&!0===this.firstFormGroup.controls[t].value&&this.additionalContractIds.push(t)}),this.contractService.getContractsItemNoticeOptions(this.contractId,this.additionalContractIds).subscribe(t=>{this.contractsItemNoticeOptions=t,this.secondFormGroupSetControls(this.contractsItemNoticeOptions.reasonTypeRequired),this.thirdFormGroupSetControls(this.contractsItemNoticeOptions.addressRequired);const i=this.getMomentDates(this.contractsItemNoticeOptions.allowedEndDates),s=this.getMomentDates(this.contractsItemNoticeOptions.earlyEndDates);this.firstAllowedEndDate=i[0],this.firstEarlyEndDate=s[0],this.allowedEndDates=a=>i.findIndex(r=>ut()(a).format("YYYY-MM-DD")==r)>=0,this.earlyEndDates=a=>s.findIndex(r=>ut()(a).format("YYYY-MM-DD")==r)>=0})}getMomentDates(t){const i=[];for(const s of t)i.push(ut()(s).format("YYYY-MM-DD"));return i}putContractsItemNotice(){if(this.firstFormGroup.get(this.preSelectedContractId).enable(),this.firstFormGroup.valid&&this.secondFormGroup.valid&&this.thirdFormGroup.valid){const t={contractId:this.contractId,additionalContractIds:this.additionalContractIds,reasonType:this.secondFormGroup.controls.reasonTypes.value,endDate:ut()(this.secondFormGroup.controls.allowedEndDates.value).utc(!0).format("YYYY-MM-DD"),earlyEndDate:null!==this.secondFormGroup.controls.earlyEndDates?.value?ut()(this.secondFormGroup.controls.earlyEndDates?.value).utc(!0).format("YYYY-MM-DD"):null};null!==this.thirdFormGroup.controls.address.value&&(t.address={address1:this.thirdFormGroup.controls.address.value,postcode:this.thirdFormGroup.controls.postcode.value,city:this.thirdFormGroup.controls.city.value,countryId:this.thirdFormGroup.controls.country.value}),this.disableSaveButton=!0,this.contractService.putContractsItemNotice(t).pipe((0,ct.W)(i=>{throw this.disableSaveButton=!1,i})).subscribe(i=>{this.router.navigateByUrl(`signings/${i.signingId}`)})}this.firstFormGroup.get(this.preSelectedContractId).disable()}addTabRoles(){const t=document.getElementsByClassName("mat-vertical-content-container");for(let i of Array.from(t))i.setAttribute("role","tab")}static{this.\u0275fac=function(i){return new(i||e)(o.rXU($t.y),o.rXU(Nt.M),o.rXU(Q.ze),o.rXU(dt.nX),o.rXU($n.MJ),o.rXU(dt.Ix),o.rXU(e1.gRc))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-notice"]],standalone:!1,features:[o.Jv_([{provide:$n.MJ,useClass:qb.QH,deps:[$n.Ju]},{provide:$n.de,useValue:t1.D}])],decls:68,vars:55,consts:[["stepper",""],["secondStep",""],["allowedEndDatesPicker",""],["earlyEndDatesPicker",""],["data-mom-test","MyPages_Agreement_TerminationProcess_Title",1,"header-container"],[3,"text"],["orientation","vertical","linear","true",3,"selectionChange"],[3,"stepControl"],[3,"formGroup"],["matStepLabel",""],[1,"step-help-text"],[1,"contracts-container"],[1,"contract"],["matButton","filled","matStepperNext","","data-mom-test","MyPages_Agreement_TerminationProcess_NextToStep2",1,"step-button"],["matButton","tonal","matStepperPrevious","","data-mom-test","MyPages_Agreement_TerminationProcess_BackToStep1",1,"step-button"],["matButton","filled","matStepperNext","","data-mom-test","MyPages_Agreement_TerminationProcess_NextToStep3",1,"step-button"],[1,"address-container"],[1,"form-field"],["matInput","","formControlName","address","maxlength","128","data-mom-test","MyPages_Agreement_TerminationProcess_StreetAddress","autocomplete","street-address",3,"required"],[4,"ngIf"],["matInput","","formControlName","postcode","maxlength","64","data-mom-test","MyPages_Agreement_TerminationProcess_PostalCode","autocomplete","postal-code",3,"required"],["matInput","","formControlName","city","maxlength","64","data-mom-test","MyPages_Agreement_TerminationProcess_City","autocomplete","address-level2",3,"required"],["controlName","country","data-mom-test","MyPages_Agreement_TerminationProcess_Country",3,"useV2","required"],["matButton","tonal","matStepperPrevious","","data-mom-test","MyPages_Agreement_TerminationProcess_BackToStep2",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MyPages_Agreement_TerminationProcess_NextToSigning",1,"step-button",3,"clicked","disabled","spin","text"],[1,"item"],[1,"label"],["data-mom-test","MyPages_Agreement_TerminateProcess_Agreement",1,"value"],["data-mom-test","MyPages_Agreement_TerminationProcess_AgreementType",1,"value"],["data-mom-test","MyPages_Agreement_TerminationProcess_AgreementAddress",1,"value"],["data-mom-test","MyPages_Agreement_TerminateProcess_Objecttype",1,"value"],["data-mom-test","MyPages_Agreement_TerminationProcess_AgreementTerminationPeriod",1,"value"],["data-mom-test","MyPages_Agreement_TerminationProcess_AgreementCheckbox",1,"checkbox"],["color","primary",3,"change","formControlName"],["formControlName","reasonTypes","data-mom-test","MyPages_Agreement_TerminationProcess_MoveOutReason",3,"required"],[3,"value"],[1,"form-field","pointer",3,"click"],["matInput","","readonly","true","required","","formControlName","allowedEndDates","data-mom-test","MyPages_Agreement_TerminationProcess_MoveOutDate","autocomplete","off",1,"pointer",3,"matDatepickerFilter","matDatepicker"],["matSuffix","",3,"for"],[3,"startAt"],[2,"margin-top","30px","margin-bottom","10px"],["color","primary","formControlName","earlyEndDatesCheckbox","data-mom-test","MyPages_Agreement_TerminationProcess_DesiredMoveOutCheckbox"],[1,"checkbox-label"],[3,"markdown"],["matInput","","readonly","true","formControlName","earlyEndDates","data-mom-test","MyPages_Agreement_TerminationProcess_DesiredMoveOutDate","autocomplete","off",1,"pointer",3,"required","matDatepickerFilter","matDatepicker"]],template:function(i,s){if(1&i){const a=o.RV6();o.j41(0,"div")(1,"div",4),o.nrm(2,"taiga-medium-header",5),o.nI1(3,"translate"),o.k0s(),o.nrm(4,"taiga-page-cards"),o.j41(5,"mat-stepper",6,0),o.bIt("selectionChange",function(l){return P.eBV(a),P.Njj(s.selectionChange(l))}),o.j41(7,"mat-step",7)(8,"form",8),o.DNE(9,l1,2,3,"ng-template",9),o.j41(10,"div",10),o.EFF(11),o.nI1(12,"translate"),o.k0s(),o.j41(13,"div",11),o.Z7z(14,h1,36,25,"div",12,o.fX1),o.k0s(),o.j41(16,"div")(17,"button",13),o.EFF(18),o.nI1(19,"translate"),o.k0s()()()(),o.j41(20,"mat-step",7,1)(22,"form",8),o.DNE(23,d1,2,3,"ng-template",9),o.nVh(24,m1,4,3,"div"),o.j41(25,"div")(26,"button",14),o.EFF(27),o.nI1(28,"translate"),o.k0s(),o.j41(29,"button",15),o.EFF(30),o.nI1(31,"translate"),o.k0s()()()(),o.j41(32,"mat-step",7)(33,"form",8),o.DNE(34,_1,2,3,"ng-template",9),o.j41(35,"div",16)(36,"div")(37,"mat-form-field",17)(38,"mat-label"),o.EFF(39),o.nI1(40,"translate"),o.k0s(),o.nrm(41,"input",18),o.DNE(42,b1,3,3,"mat-error",19)(43,y1,3,6,"mat-error",19),o.k0s()(),o.j41(44,"div")(45,"mat-form-field",17)(46,"mat-label"),o.EFF(47),o.nI1(48,"translate"),o.k0s(),o.nrm(49,"input",20),o.DNE(50,x1,3,3,"mat-error",19)(51,v1,3,6,"mat-error",19),o.k0s()(),o.j41(52,"div")(53,"mat-form-field",17)(54,"mat-label"),o.EFF(55),o.nI1(56,"translate"),o.k0s(),o.nrm(57,"input",21),o.DNE(58,C1,3,3,"mat-error",19)(59,M1,3,6,"mat-error",19),o.k0s()(),o.j41(60,"div"),o.nrm(61,"taiga-country-select",22),o.k0s()(),o.j41(62,"div")(63,"button",23),o.EFF(64),o.nI1(65,"translate"),o.k0s(),o.j41(66,"taiga-loading-button",24),o.nI1(67,"translate"),o.bIt("clicked",function(){return P.eBV(a),P.Njj(s.putContractsItemNotice())}),o.k0s()()()()()()}2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(2),o.Y8G("text",o.mNQ(o.bMT(3,35,"NOTICE"))),o.R7$(5),o.Y8G("stepControl",s.firstFormGroup),o.R7$(),o.Y8G("formGroup",s.firstFormGroup),o.R7$(3),o.JRh(o.bMT(12,37,"CHOOSECONTRACTSHELP")),o.R7$(3),o.Dyx(null==s.contractsItemNoticeContracts?null:s.contractsItemNoticeContracts.items),o.R7$(4),o.SpI(" ",o.bMT(19,39,"NEXT")," "),o.R7$(2),o.Y8G("stepControl",s.secondFormGroup),o.R7$(2),o.Y8G("formGroup",s.secondFormGroup),o.R7$(2),o.vxM(s.contractsItemNoticeOptions?24:-1),o.R7$(3),o.SpI(" ",o.bMT(28,41,"BACK")," "),o.R7$(3),o.SpI(" ",o.bMT(31,43,"NEXT")," "),o.R7$(2),o.Y8G("stepControl",s.thirdFormGroup),o.R7$(),o.Y8G("formGroup",s.thirdFormGroup),o.R7$(6),o.JRh(o.bMT(40,45,"ADDRESS")),o.R7$(2),o.Y8G("required",null==s.t.address.errors?null:s.t.address.errors.required),o.R7$(),o.Y8G("ngIf",s.t.address.hasError("required")),o.R7$(),o.Y8G("ngIf",s.t.address.hasError("allowedCharacters")),o.R7$(4),o.JRh(o.bMT(48,47,"POSTALCODE")),o.R7$(2),o.Y8G("required",null==s.t.postcode.errors?null:s.t.postcode.errors.required),o.R7$(),o.Y8G("ngIf",s.t.postcode.hasError("required")),o.R7$(),o.Y8G("ngIf",s.t.postcode.hasError("allowedCharacters")),o.R7$(4),o.JRh(o.bMT(56,49,"POSTALADDRESS")),o.R7$(2),o.Y8G("required",null==s.t.city.errors?null:s.t.city.errors.required),o.R7$(),o.Y8G("ngIf",s.t.city.hasError("required")),o.R7$(),o.Y8G("ngIf",s.t.city.hasError("allowedCharacters")),o.R7$(2),o.Y8G("useV2",!0)("required",s.addressRequired),o.R7$(3),o.SpI(" ",o.bMT(65,51,"BACK")," "),o.R7$(2),o.Y8G("disabled",s.disableSaveButton)("spin",s.disableSaveButton)("text",o.bMT(67,53,"GOTOSIGNING")))},dependencies:[n1.m,ne.$z,i1.fg,Vn.rl,Vn.nJ,Vn.TL,Vn.yw,Qi.Vh,Qi.bZ,Qi.bU,s1.VO,o1.wT,a1.So,Xe.V5,Xe.Ti,Xe.M6,Xe.F7,Xe.FR,dr.bT,Q.qT,Q.me,Q.BC,Q.cb,Q.YS,Q.tU,Q.j4,Q.JD,Ln.o,r1.A,ur.N,Nn.K,K.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:16px}.is-desktop[_ngcontent-%COMP%]   .form-field[_ngcontent-%COMP%]{width:100%}.is-mobile[_ngcontent-%COMP%]{padding:16px}.is-mobile[_ngcontent-%COMP%]   .form-field[_ngcontent-%COMP%]{width:100%}.form-field[_ngcontent-%COMP%]{margin-top:5px}.contracts-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.contract[_ngcontent-%COMP%]{margin-top:20px;margin-right:10px;margin-bottom:20px;width:250px}.item[_ngcontent-%COMP%]{margin-bottom:7px}.label[_ngcontent-%COMP%]{font-weight:700}.checkbox[_ngcontent-%COMP%]{margin-top:15px}.divider[_ngcontent-%COMP%]{margin-top:30px;margin-bottom:30px;width:100%}.step-button[_ngcontent-%COMP%]{margin-top:10px;margin-right:10px}.header-container[_ngcontent-%COMP%]{margin-bottom:20px}.step-help-text[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px}.checkbox-label[_ngcontent-%COMP%]{white-space:normal}.pointer[_ngcontent-%COMP%]{cursor:pointer}"]})}}return e})(),O1=(()=>{class e{constructor(t,i,s,a){this.contractService=t,this.errorService=i,this.userMessageService=s,this.router=a}resolve(t){return this.contractService.getContractsItemNoticeContracts(t.params.id).pipe((0,ct.W)(i=>{const s=this.errorService.parseError(i);return this.userMessageService.errorWithHeader(s.message,"",s.displayErrorReportNumber?s.errorReportNumber:""),this.router.navigateByUrl("/"),(0,Ji.of)(null)}))}static{this.\u0275fac=function(i){return new(i||e)(P.KVO($t.y),P.KVO(cr.I),P.KVO(hr.z),P.KVO(dt.Ix))}}static{this.\u0275prov=P.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function T1(e,n){if(1&e&&(o.j41(0,"mat-card",1)(1,"mat-card-header")(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"mat-card-subtitle"),o.EFF(5),o.k0s()(),o.nrm(6,"mat-card-content"),o.j41(7,"mat-card-actions",3)(8,"button",4),o.EFF(9),o.nI1(10,"translate"),o.k0s()()()),2&e){const t=n.$implicit;o.R7$(3),o.JRh(null==t||null==t.primaryObject||null==t.primaryObject.location||null==t.primaryObject.location.address?null:t.primaryObject.location.address.address),o.R7$(2),o.Lme("",t.type.displayName," ",t.number," "),o.R7$(3),o.Y8G("routerLink","/mypages/contract/"+t.id+"/webshop"),o.R7$(),o.SpI(" ",o.bMT(10,5,"SELECT")," ")}}function P1(e,n){if(1&e&&(o.j41(0,"mat-card",1)(1,"mat-card-header")(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"mat-card-subtitle"),o.EFF(5),o.k0s()(),o.nrm(6,"mat-card-content"),o.j41(7,"mat-card-actions",3)(8,"button",5),o.EFF(9),o.nI1(10,"translate"),o.k0s()()()),2&e){const t=n.$implicit;o.R7$(3),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.locationAddress),o.R7$(2),o.Lme("",null==t.nodeClass?null:t.nodeClass.displayName," ",t.number),o.R7$(3),o.Y8G("routerLink","/mypages/contract/"+t.guid+"/webshop"),o.R7$(),o.SpI(" ",o.bMT(10,5,"SELECT")," ")}}function k1(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-paginator",6),o.bIt("page",function(s){P.eBV(t);const a=o.XpG();return P.Njj(a.onPageChange(s))}),o.k0s()}if(2&e){const t=o.XpG();o.Y8G("length",t.contractsCount)("pageIndex",t.page-1)("pageSize",t.pageSize)("hidePageSize",!0)}}let R1=(()=>{class e{set matPaginator(t){t&&(t._intl.itemsPerPageLabel=null,t._intl.nextPageLabel=this.translate.instant("NEXTPAGE"),t._intl.previousPageLabel=this.translate.instant("PREVIOUSPAGE"),t._intl.getRangeLabel=(i,s,a)=>
1{if(0===a||0===s)return`0 ${this.translate.instant("OF")} ${a}`;const r=i*s;return`${r+1} \u2013 ${r<(a=Math.max(a,0))?Math.min(r+s,a):r+s} ${this.translate.instant("OF")} ${a}`})}constructor(t,i,s,a,r,l){this.contractService=t,this.route=i,this.mediaQueryService=s,this.router=a,this.clientConfigurationService=r,this.translate=l,this.chips=[],this.pageSize=10}ngOnInit(){this.clientConfigurationService.getClientConfigurationFeatures().subscribe(t=>{this.useGraphQl=t.graphQL?.enabled,this.useGraphQl&&this.contractService.fetchActiveContractsTotalCount(!0).subscribe(i=>{this.contractsCount=i.data.contracts.totalCount}),this.route.queryParams.subscribe(i=>{this.pageSize=i.pageSize??this.pageSize,this.page=this.route.snapshot.queryParams.page??1,this.before=i.before??null,this.after=i.after??null;const s=this.pageSize*this.page-this.pageSize;this.useGraphQl?this.contractService.fetchActiveContracts(this.before,this.after,!0).subscribe(a=>{this.contractsQuery=a.data,this.before=this.contractsQuery.contracts.pageInfo.startCursor,this.after=this.contractsQuery.contracts.pageInfo.endCursor}):this.contractService.getAllContractsSorted(this.pageSize,0===s?null:s,null,!1).subscribe(a=>{this.contracts=a,this.contractsCount=this.contracts.count,this.visiblecontractsListItems=this.contracts.items})})})}onPageChange(t){window.scroll(0,0);let i=this.pageSize;this.pageSize=t.pageSize,this.page=t.pageIndex+1;let s={pageSize:this.pageSize,page:this.page};switch(!0){case 0===t.pageIndex:break;case+i!==this.pageSize:s={...s,page:1};break;case t.pageIndex>t.previousPageIndex:s={...s,after:this.after};break;case t.pageIndex<t.previousPageIndex:s={...s,before:this.before}}this.router.navigate([],{relativeTo:this.route,queryParams:s})}static{this.\u0275fac=function(i){return new(i||e)(o.rXU($t.y),o.rXU(dt.nX),o.rXU(Nt.M),o.rXU(dt.Ix),o.rXU(Je.t),o.rXU(K.c$))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-contract-webshop-list"]],viewQuery:function(i,s){if(1&i&&o.GBs(jn.iy,5),2&i){let a;o.mGM(a=o.lsd())&&(s.matPaginator=a.first)}},standalone:!1,decls:10,vars:11,consts:[[3,"text","subText"],[1,"contract-card"],[3,"length","pageIndex","pageSize","hidePageSize"],["align","end"],["matButton","tonal",",","","color","primary","data-mom-test","MyPages_Webshop_ContractSelection",3,"routerLink"],["matButton","tonal","color","primary","data-mom-test","MyPages_Webshop_ContractSelection",3,"routerLink"],[3,"page","length","pageIndex","pageSize","hidePageSize"]],template:function(i,s){1&i&&(o.j41(0,"div"),o.nrm(1,"taiga-medium-header",0),o.nI1(2,"translate"),o.nI1(3,"translate"),o.nrm(4,"taiga-page-cards"),o.Z7z(5,T1,11,7,"mat-card",1,o.fX1),o.Z7z(7,P1,11,7,"mat-card",1,o.fX1),o.nVh(9,k1,1,4,"mat-paginator",2),o.k0s()),2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(),o.Y8G("text",o.bMT(2,7,"WEBSHOP"))("subText",o.bMT(3,9,"WEBSHOPSELECTCONTRACTHELP")),o.R7$(4),o.Dyx(s.visiblecontractsListItems),o.R7$(2),o.Dyx(null==s.contractsQuery||null==s.contractsQuery.contracts?null:s.contractsQuery.contracts.nodes),o.R7$(2),o.vxM(s.contractsCount>10?9:-1))},dependencies:[be.Wk,ne.$z,st.RN,st.YY,st.m2,st.MM,st.Lc,st.dh,Ln.o,jn.iy,Nn.K,K.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.contract-card[_ngcontent-%COMP%]{margin:16px 0}"]})}}return e})();const F1=[{path:"",component:Zb,canActivate:[We.q],title:"MYCONTRACTS"},{path:"webshop",component:R1,canActivate:[We.q],title:"WEBSHOP"},{path:":id/webshop",loadChildren:()=>Promise.all([S.e(76),S.e(835)]).then(S.bind(S,2835)).then(e=>e.WebshopModule),canActivate:[We.q]},{path:":id",component:ns,canActivate:[We.q,gb.u],resolve:{contract:pb},title:"HANDLE-IN-COMPONENT"},{path:"notice/:id",component:S1,canActivate:[We.q],resolve:{contractsItemNoticeContracts:O1},title:"NOTICE"}];let I1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=o.$C({type:e})}static{this.\u0275inj=P.G2t({imports:[be.iI.forChild(F1),be.iI]})}}return e})();var zn=S(1997);function A1(e,n){if(1&e&&(o.j41(0,"div")(1,"div",4)(2,"div",5)(3,"div",6),o.EFF(4),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",7),o.EFF(7),o.k0s()(),o.j41(8,"div",1)(9,"div",8)(10,"div",9),o.EFF(11),o.nI1(12,"translate"),o.k0s(),o.j41(13,"div",10),o.EFF(14),o.k0s()(),o.j41(15,"div",8)(16,"div",11),o.EFF(17),o.nI1(18,"translate"),o.k0s(),o.j41(19,"div",12),o.EFF(20),o.k0s()(),o.j41(21,"div",8)(22,"div",13),o.EFF(23),o.nI1(24,"translate"),o.k0s(),o.j41(25,"div",14),o.EFF(26),o.k0s()()()(),o.nrm(27,"mat-divider",15),o.k0s()),2&e){let t;const i=n.$implicit,s=o.XpG(2);o.R7$(4),o.SpI(" ",o.bMT(5,8,"REFERS")," "),o.R7$(3),o.SpI(" ",null==i.Avser||null==(t=i.Avser.substring(i.Avser.indexOf("/",i.Avser.indexOf("/")+1)))||null==(t=t.replace("/",""))?null:t.trim()," "),o.R7$(4),o.SpI(" ",o.bMT(12,10,"ACTION")," "),o.R7$(3),o.JRh(i.\u00c5tg\u00e4rd),o.R7$(3),o.SpI(" ",o.bMT(18,12,"PLANNED")," "),o.R7$(3),o.JRh(s.formatDate(i.Planerad)),o.R7$(3),o.SpI(" ",o.bMT(24,14,"DONE")," "),o.R7$(3),o.JRh(s.formatDate(i.Utf\u00f6rd))}}function E1(e,n){if(1&e&&(o.j41(0,"div")(1,"div",1)(2,"div",2)(3,"h3",3),o.EFF(4),o.k0s()()(),o.Z7z(5,A1,28,16,"div",null,o.fX1),o.k0s()),2&e){const t=o.XpG();o.AVh("is-mobile",t.mediaQueryService.isMobile())("is-desktop",!t.mediaQueryService.isMobile()),o.R7$(4),o.JRh(t.maintenanceStatus.Utrymme),o.R7$(),o.Dyx(t.maintenanceStatus.Underh\u00e5ll)}}let w1=(()=>{class e{set maintenance(t){this.maintenanceStatus=t}constructor(t,i){this.translate=t,this.mediaQueryService=i}formatDate(t){return t?ut()(t).format("YYYY"):this.translate.instant("MISSING")}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(K.c$),o.rXU(Nt.M))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-maintenance-table"]],inputs:{isMobile:"isMobile",maintenance:"maintenance"},standalone:!1,decls:1,vars:1,consts:[[3,"is-mobile","is-desktop"],[1,"flex-container"],["data-mom-test","MyPages_Agreement_Maintenance_Space"],[1,"mat-h3","title"],["data-mom-test","MyPages_Agreement_Maintenance_Status",1,"flex-container"],[1,"flex-item","width-400"],["data-mom-test","MyPages_Agreement_Maintenance_Refers",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_Maintenance_RefersValue"],[1,"flex-item","width-140"],["data-mom-test","MyPages_Agreement_Maintenance_Action",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_Maintenance_ActionValue"],["data-mom-test","MyPages_Agreement_Maintenance_Planned",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_Maintenance_PlannedValue"],["data-mom-test","MyPages_Agreement_Maintenance_Done",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_Maintenance_DoneValue"],[1,"divi
1der"]],template:function(i,s){1&i&&o.nVh(0,E1,7,5,"div",0),2&i&&o.vxM(s.maintenanceStatus?0:-1)},dependencies:[zn.q,K.D9],styles:[".divider[_ngcontent-%COMP%]{margin-bottom:15px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.is-desktop[_ngcontent-%COMP%]   .width-400[_ngcontent-%COMP%]{width:400px}.is-desktop[_ngcontent-%COMP%]   .width-140[_ngcontent-%COMP%]{width:140px}.flex-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin-right:10px}.information-container[_ngcontent-%COMP%]{margin-top:10px}.flex-item[_ngcontent-%COMP%]{margin-bottom:15px}.is-mobile[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{flex-direction:column}"]})}}return e})();var fr=S(2598);function D1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",8)(1,"button",10),o.nI1(2,"translate"),o.bIt("click",function(){P.eBV(t);const s=o.XpG().$implicit,a=o.XpG();return P.Njj(a.getErrandsInspectionsReport(s.id))}),o.j41(3,"mat-icon"),o.EFF(4,"picture_as_pdf"),o.k0s()()()}2&e&&(o.R7$(),o.BMQ("aria-label",o.bMT(2,1,"DOWNLOADINSPECTIONREPORTASPDF")))}function j1(e,n){if(1&e&&(o.j41(0,"div",0)(1,"div",1)(2,"div")(3,"h3",2),o.EFF(4),o.k0s(),o.j41(5,"div",3),o.EFF(6),o.k0s()(),o.j41(7,"div",4),o.EFF(8),o.k0s()(),o.j41(9,"div",1)(10,"div")(11,"h3",5),o.EFF(12),o.k0s(),o.j41(13,"div",6),o.EFF(14),o.k0s(),o.j41(15,"div",7),o.EFF(16),o.k0s()(),o.nVh(17,D1,5,3,"div",8),o.k0s()(),o.nrm(18,"mat-divider",9)),2&e){const t=n.$implicit,i=o.XpG();o.R7$(4),o.SpI(" ",t.type.displayName," "),o.R7$(2),o.JRh(t.number),o.R7$(2),o.SpI(" ",i.formatDate(null==t.status?null:t.status.estimatedStart)," "),o.R7$(4),o.SpI(" ",null==t.primaryObject?null:t.primaryObject.typeDisplayName," "),o.R7$(2),o.JRh(null==t.primaryObject?null:t.primaryObject.number),o.R7$(2),o.JRh(null==t.primaryObject?null:t.primaryObject.displayName),o.R7$(),o.vxM(t.report?17:-1)}}let L1=(()=>{class e{constructor(t,i){this.inspectionService=t,this.fileService=i}formatDate(t){return t?ut()(t).format("YYYY-MM-DD"):""}getErrandsInspectionsReport(t){this.inspectionService.getErrandsInspectionsReport(t).subscribe(i=>{this.fileService.saveBlobWithFilename(i,`${t}.pdf`)})}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(ts),o.rXU(Kn.E))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-inspection"]],inputs:{errandsInspections:"errandsInspections"},standalone:!1,decls:2,vars:0,consts:[["data-mom-test","MyPages_Agreement_InspectionCard"],[1,"flex-container"],["data-mom-test","MyPages_Agreement_InspectionType",1,"mat-h3","title"],["data-mom-test","MyPages_Agreement_InspectionErrandNumber"],["data-mom-test","MyPages_Agreement_Inspection_EstimatedStart",1,"mat-small"],["data-mom-test","MyPages_Agreement_Inspection_ObjectType",1,"mat-h3","title"],["data-mom-test","MyPages_Agreement_InspectionObjectNumber"],["data-mom-test","MyPages_Agreement_Inspection_ObjectAddress"],[1,"icon-container"],[1,"divider"],["mat-icon-button","","color","primary","data-mom-test","MyPages_Agreement_InspectionPDF",3,"click"]],template:function(i,s){1&i&&o.Z7z(0,j1,19,7,null,null,o.fX1),2&i&&o.Dyx(null==s.errandsInspections?null:s.errandsInspections.items)},dependencies:[zn.q,ye.An,fr.iY,K.D9],styles:[".divider[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:15px}.title[_ngcontent-%COMP%]{margin-bottom:0}.flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.flex-container[_ngcontent-%COMP%]:first-of-type{margin-bottom:15px}.icon-container[_ngcontent-%COMP%]{align-self:flex-end}"]})}}return e})();function N1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",10),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",11),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.SpI(" ",o.bMT(3,2,"PERFORMED")," "),o.R7$(3),o.SpI(" ",t.Performed," ")}}function $1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",12),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",13),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.SpI(" ",o.bMT(3,2,"PLANNED")," "),o.R7$(3),o.JRh(t.Planned)}}function B1(e,n){if(1&e&&(o.j41(0,"div",15),o.EFF(1),o.k0s()),2&e){const t=o.XpG(2).$implicit,i=o.XpG();o.R7$(),o.SpI(" ",i.formatDate(t.OrderedDate)," ")}}function V1(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}
1function z1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",14),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.nVh(4,B1,2,1,"div",15)(5,V1,2,0,"div"),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.SpI(" ",o.bMT(3,2,"PROCESSEDDATE")," "),o.R7$(2),o.vxM(t.OrderedDate?4:5)}}function H1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",16),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",17),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.SpI(" ",o.bMT(3,3,"DISCOUNT")," "),o.R7$(3),o.Lme(" ",t.DiscountToday.toFixed()," kr/",t.DiscountTypeToday," ")}}function G1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",18),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",19),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.SpI(" ",o.bMT(3,2,"CANBEORDERED")," "),o.R7$(3),o.SpI(" ",t.OfferAccepted?"Tackat ja "+t.OfferAccepted:t.CanBeOrdered?"Ja":"Nej"," ")}}function W1(e,n){if(1&e&&(o.j41(0,"div",7),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.SpI(" ",t.ResidualValue.toFixed()," kr ")}}function X1(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.SpI(" ",o.bMT(1,1,"NONE")," ")}function U1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",20),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",21),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",o.bMT(3,2,"ORDERDATE")," "),o.R7$(3),o.SpI(" ",i.formatDate(t.ClientOrderedDate)," ")}}function Y1(e,n){if(1&e&&(o.j41(0,"div",5)(1,"div",22),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",23),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",o.bMT(3,2,"REPLYBY")," "),o.R7$(3),o.SpI(" ",i.formatDate(t.AnswerAtLatest)," ")}}function K1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",8)(1,"button",24),o.bIt("click",function(){P.eBV(t);const s=o.XpG().$implicit,a=o.XpG();return P.Njj(a.itemClick(s.Space,s.DK_UhAtgardId,s.Measure,s.OfferedCost))}),o.EFF(2),o.nI1(3,"translate"),o.k0s()()}2&e&&(o.R7$(2),o.SpI(" ",o.bMT(3,1,"ADDTOCART")," "))}function J1(e,n){if(1&e&&(o.j41(0,"div",0)(1,"div",1)(2,"h3",2),o.EFF(3),o.j41(4,"mat-icon",3),o.EFF(5,"arrow_forward"),o.k0s(),o.EFF(6),o.k0s()()(),o.j41(7,"div")(8,"div",4)(9,"div",4),o.nVh(10,N1,6,4,"div",5),o.nVh(11,$1,6,4,"div",5),o.nVh(12,z1,6,4,"div",5),o.nVh(13,H1,6,5,"div",5),o.nVh(14,G1,6,4,"div",5),o.j41(15,"div",5)(16,"div",6),o.EFF(17),o.nI1(18,"translate"),o.k0s(),o.nVh(19,W1,2,1,"div",7)(20,X1,2,3),o.k0s(),o.nVh(21,U1,6,4,"div",5),o.nVh(22,Y1,6,4,"div",5),o.nVh(23,K1,4,3,"div",8),o.k0s()(),o.nrm(24,"mat-divider",9),o.k0s()),2&e){const t=n.$implicit,i=o.XpG();o.R7$(3),o.SpI(" ",t.Space," "),o.R7$(3),o.SpI("",t.Measure," "),o.R7$(4),o.vxM(t.Performed?10:-1),o.R7$(),o.vxM(t.Planned?11:-1),o.R7$(),o.vxM(i.isAllreadyOrdered?12:-1),o.R7$(),o.vxM(i.isNumber(t.DiscountToday)?13:-1),o.R7$(),o.vxM(i.isAllreadyOrdered||!0!==t.CanBeOrdered&&!1!==t.CanBeOrdered?-1:14),o.R7$(3),o.SpI(" ",o.bMT(18,12,"ADVANCECOST")," "),o.R7$(2),o.vxM(t.ResidualValue?19:20),o.R7$(2),o.vxM(t.ClientOrderedDate?21:-1),o.R7$(),o.vxM(!i.isAllreadyOrdered&&t.AnswerAtLatest?22:-1),o.R7$(),o.vxM(i.isAllreadyOrdered||!0!==t.CanBeOrdered?-1:23)}}let Q1=(()=>{class e{constructor(t,i){this.mediaQueryService=t,this.translate=i,this.itemClicked=new o.bkB}formatDate(t){return t?ut()(t).format("YYYY-MM-DD"):this.translate.instant("MISSING")}itemClick(t,i,s,a){this.itemClicked.emit({space:t,id:i,measure:s,offeredCost:a})}isNumber(t){return"number"==typeof t}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(Nt.M),o.rXU(K.c$))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-hlu-legacy"]],inputs:{maintenanceStatusResult:"maintenanceStatusResult",isAllreadyOrdered:"isAllreadyOrdered"},outputs:{itemClicked:"itemClicked"},standalone:!1,decls:4,vars:4,consts:[["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Status",1,"flex-container"],[1,"title"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Refers",1,"mat-h3","title"],["color","primary"],[1,"flex-container"],[1,"flex-item","width-180"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_AdvanceCost",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_AdvanceCostValue"],[1,"flex-item",2,"margin-left","auto"],[1,"divi
1der"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Performed",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_PerformedValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Planned",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_PlannedValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_ProcessedDate",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_ProcessedDateValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Discount",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_DiscountValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_CanBeOrdered",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_CanBeOrderedValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_OrderDate",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_OrderDateValue"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_ReplyBy",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_ReplyByValue"],["mat-raised-button","","data-mom-test","MyPages_Agreement_TenantControlledMaintenance_AddToCart",3,"click"]],template:function(i,s){1&i&&(o.qex(0),o.j41(1,"div"),o.Z7z(2,J1,25,14,null,null,o.fX1),o.k0s(),o.bVm()),2&i&&(o.R7$(),o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(),o.Dyx(s.maintenanceStatusResult))},dependencies:[zn.q,ye.An,ne.$z,K.D9],styles:[".divider[_ngcontent-%COMP%]{margin-bottom:15px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.is-desktop[_ngcontent-%COMP%]   .width-400[_ngcontent-%COMP%]{width:400px}.is-desktop[_ngcontent-%COMP%]   .width-180[_ngcontent-%COMP%]{width:180px}.flex-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin-right:10px}.information-container[_ngcontent-%COMP%]{margin-top:10px}.flex-item[_ngcontent-%COMP%]{margin-bottom:15px}.is-mobile[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{flex-direction:column}.title[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}"]})}}return e})();function Z1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"div",3)(2,"div",4)(3,"h3",5),o.EFF(4),o.j41(5,"mat-icon",1),o.EFF(6,"arrow_forward"),o.k0s(),o.EFF(7),o.k0s()(),o.j41(8,"div",6)(9,"button",7),o.bIt("click",function(){const s=P.eBV(t).$implicit,a=o.XpG();return P.Njj(a.deleteItem(s))}),o.EFF(10),o.nI1(11,"translate"),o.k0s()()(),o.nrm(12,"mat-divider",8),o.k0s()}if(2&e){const t=n.$implicit;o.R7$(4),o.SpI(" ",t.space," "),o.R7$(3),o.SpI("",t.measure," "),o.R7$(3),o.JRh(o.bMT(11,3,"DELETE"))}}function q1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",2)(1,"button",9),o.bIt("click",function(){P.eBV(t);const s=o.XpG();return P.Njj(s.goToCheckout())}),o.EFF(2),o.nI1(3,"translate"),o.k0s()()}2&e&&(o.R7$(2),o.JRh(o.bMT(3,1,"GOTOCHECKOUT")))}let t0=(()=>{class e{constructor(t){this.router=t,this.itemClicked=new o.bkB}deleteItem(t){this.itemClicked.emit(t)}goToCheckout(){this.router.navigateByUrl("mypages/checkout/"+this.contractId)}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(dt.Ix))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-hlu-legacy-shopping-cart"]],inputs:{items:"items",contractId:"contractId"},outputs:{itemClicked:"itemClicked"},standalone:!1,decls:6,vars:1,consts:[[1,"shopping-cart-title"],["color","primary"],[1,"send-button"],[1,"flex-container"],[1,"flex-item","width-180"],[1,"mat-h3","title"],[1,"flex-item",2,"margin-left","auto"],["mat-raised-button","","data-mom-test","MyPages_HLUCart_DeleteItemButton",3,"click"],[1,"divider"],["mat-raised-button","","color","primary","data-mom-test","MyPages_HLUCart_GoToCheckoutButton",3,"click"]],template:function(i,s){1&i&&(o.j41(0,"div",0)(1,"mat-icon",1),o.EFF(2,"shopping_cart"),o.k0s()(),o.Z7z(3,Z1,13,5,"div",null,o.fX1),o.nVh(5,q1,4,3,"div",2)),2&i&&(o.R7$(3),o.Dyx(s.items),o.R7$(2),o.vxM((null==s.items?null:s.items.length)>0?5:-1))}
1,dependencies:[zn.q,ye.An,ne.$z,K.D9],styles:[".divider[_ngcontent-%COMP%]{margin-bottom:15px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.is-desktop[_ngcontent-%COMP%]   .width-400[_ngcontent-%COMP%]{width:400px}.is-desktop[_ngcontent-%COMP%]   .width-180[_ngcontent-%COMP%]{width:180px}.flex-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin-right:10px}.information-container[_ngcontent-%COMP%]{margin-top:10px}.flex-item[_ngcontent-%COMP%]{margin-bottom:15px}.is-mobile[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{flex-direction:column}.send-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.shopping-cart-title[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.title[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}"]})}}return e})();var e0=S(293),Hn=S(9454),pr=S(5571),n0=S(1843);let i0=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=o.$C({type:e})}static{this.\u0275inj=P.G2t({imports:[K.h.forChild(),be.iI,Qr.G,I1]})}}return e})();o.wjB(ns,function(){return[e0.g,ye.An,fr.iY,st.RN,Hn.BS,Hn.GK,Hn.Z2,Hn.WN,pr.ec,pr.pc,n0.u,Ln.o,ur.N,Nn.K,gl,db,w1,L1,Q1,t0]},function(){return[K.D9,dr.GH]})},1580(gr,Wn,S){S.d(Wn,{E:()=>Un});var te=S(2615),Xn=S(5850);let Un=(()=>{class Lt{constructor(Y){this.requestService=Y}saveBlob(Y,ct){const Pt=new Blob([Y],{type:ct});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(Pt);else{const ee=window.URL.createObjectURL(Pt);window.open(ee,"_blank"),setTimeout(()=>{window.URL.revokeObjectURL(ee)},100)}}saveBlobWithFilename(Y,ct){const Pt=ct.split(".").pop(),ee=this.getMimeType(Pt),Ke=new Blob([Y],{type:ee});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(Ke,ct);else{const o=window.URL.createObjectURL(Ke),P=document.createElement("a");typeof P.download>"u"?window.open(o,"_blank"):(P.href=o,P.download=ct,document.body.appendChild(P),P.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))),setTimeout(()=>{window.URL.revokeObjectURL(o),P&&P.remove()},100)}}getMimeType(Y){switch(Y=Y.replace(".","")){case"3g2":return"video/3gpp2";case"3gp":return"video/3gpp";case"au":return"audio/basic";case"avi":return"video/x-msvideo";case"bmp":return"image/bmp";case"doc":return"application/msword";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"eps":case"ps":return"application/postscript";case"gif":return"image/gif";case"h264":return"video/h264";case"htm":case"html":return"text/html";case"ico":return"image/x-icon";case"jpe":case"jpeg":case"jpg":return"image/jpeg";case"m4v":return"video/x-m4v";case"mkv":return"video/x-matroska";case"mov":case"qt":return"video/quicktime";case"mp3":case"mpga":return"audio/mpeg";case"mp4":case"mpg4":return"video/mp4";case"mpe":case"mpeg":case"mpg":return"video/mpeg";case"ogg":return"application/ogg";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"ra":case"ram":return"audio/x-pn-realaudio";case"rm":return"application/vnd.rn-realmedia";case"rtf":return"text/rtf";case"rtx":return"text/richtext";case"svg":return"image/svg+xml";case"swf":return"application/x-shockwave-flash";case"tif":case"tiff":return"image/tiff";case"txt":return"text/plain";case"wav":return"audio/x-wav";case"wbmp":return"image/vnd.wap.wbmp";case"wmv":return"video/x-ms-wmv";case"xhtml":return"application/xhtml+xml";case"xls":return"application/vnd.ms-excel";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"application/xml";default:return""}}getValidMediaType(Y){switch(Y){case"application/pdf":case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getValidImageMediaType(Y){switch(Y){case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getBlobFromUrl(Y){return this.requestService.getBlobFromUrl(Y)}static{this.\u0275fac=function(ct){return new(ct||Lt)(te.KVO(Xn.B))}}static{this.\u0275prov=te.jDH({token:Lt,factory:Lt.\u0275fac,providedIn:"root"})}}return Lt})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.